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,aAAc,OAAQ,UAClCuC,EAAYvC,aAAc,gBAAiBzH,EAAQxJ,IAGnD,IAAM+K,EAAO1F,SAAS6O,cAAe,QACrCnJ,EAAKqD,UAAUxN,IAAK,UAAW,iBAAkB,uBACjDmK,EAAKkG,aAAc,eAAe,GAElCsC,EAAmB/J,EAASgK,EAAazI,EAAM0I,GAG/CM,EAAQK,UAAY,GACpBL,EAAQrI,OAAQX,GAChBgJ,EAAQrI,OAAQ8H,GAGhBO,EAAQ9H,iBAAkB,SAAS,kBA5CrC,SAAiBzC,EAASgK,EAAazI,GAEtCwI,EAAmB/J,EAASgK,EAAazI,GADjBvB,EAAQkK,OAEjC,CAyC2CxD,CAAQ1G,EAASgK,EAAazI,EAAM,GAC9E,GACD,E","sources":["webpack://mfModules/./src/mobile.init/editor.js","webpack://mfModules/./src/mobile.init/editorLoadingOverlay.js","webpack://mfModules/./src/mobile.init/lazyLoadedImages.js","webpack://mfModules/./src/mobile.init/mobile.init.js","webpack://mfModules/./src/mobile.init/toggling.js","webpack://mfModules/./src/mobile.startup/Toggler.js","webpack://mfModules/./src/mobile.startup/isCollapsedByDefault.js","webpack://mfModules/./src/mobile.startup/sectionCollapsing.js"],"sourcesContent":["/* global $ */\nconst M = require( '../mobile.startup/moduleLoaderSingleton' ),\n\tutil = require( '../mobile.startup/util' ),\n\teditorLoadingOverlay = require( './editorLoadingOverlay' ),\n\tOverlayManager = require( '../mobile.startup/OverlayManager' ),\n\t// #ca-edit, .mw-editsection are standard MediaWiki elements\n\t// .edit-link can be added to links anywhere to trigger the editor (e.g. MobileFrontend\n\t// user page creation CTA, edit-full-page overflow menu item)\n\t// Links in content are handled separately to allow reloading the content (T324686)\n\t$editTab = $( '#ca-edit, #ca-editsource, #ca-viewsource, #ca-ve-edit, #ca-ve-create, #ca-createsource' ),\n\thasTwoEditIcons = $editTab.length > 1,\n\tEDITSECTION_SELECTOR = '.mw-editsection a, .edit-link',\n\tuser = mw.user,\n\tCtaDrawer = require( '../mobile.startup/CtaDrawer' ),\n\tveConfig = mw.config.get( 'wgVisualEditorConfig' ),\n\teditorPath = /^\\/editor\\/(\\d+|T-\\d+|all)$/;\n\nlet editorOverride = null;\n\n/**\n * Event handler for edit link clicks. Will prevent default link\n * behaviour and will not allow propagation\n *\n * @method\n * @ignore\n * @param {HTMLElement} elem\n * @param {jQuery.Event} ev\n * @param {Router} router\n */\nfunction onEditLinkClick( elem, ev, router ) {\n\tlet section;\n\tif ( $( EDITSECTION_SELECTOR ).length === 0 ) {\n\t\t// If section edit links are not available, the only edit link\n\t\t// should allow editing the whole page (T232170)\n\t\tsection = 'all';\n\t} else {\n\t\tsection = mw.util.getParamValue( 'section', elem.href ) || 'all';\n\t}\n\t// Don't do anything for section edit links for different pages (transcluded)\n\tif ( mw.config.get( 'wgPageName' ) !== mw.util.getParamValue( 'title', elem.href ) ) {\n\t\treturn;\n\t}\n\tif ( hasTwoEditIcons ) {\n\t\tif ( elem.id === 'ca-ve-edit' || elem.id === 'ca-ve-create' ) {\n\t\t\t// \"Edit\" tab loads the visual editor\n\t\t\teditorOverride = 'VisualEditor';\n\t\t} else if ( elem.id === 'ca-editsource' || elem.id === 'ca-createsource' ) {\n\t\t\t// \"Edit source\" tab loads the source editor\n\t\t\teditorOverride = 'SourceEditor';\n\t\t} else {\n\t\t\t// Any other edit links (e.g. for sections) load the preferred editor\n\t\t}\n\t}\n\trouter.navigate( '#/editor/' + section );\n\t// DO NOT USE stopPropagation or you'll break click tracking in WikimediaEvents\n\t// You DO NOT NEED to\n\t// prevent folding section when clicking Edit by stopping propagation\n\t// as this is a concern of the Toggler class and taken care of by inspecting\n\t// !ev.target.href (see Toggler.js)\n\t// avoid navigating to ?action=edit\n\tev.preventDefault();\n}\n\n/**\n * Retrieve the user's preferred editor setting. If none is set, return the default\n * editor for this wiki.\n *\n * @method\n * @ignore\n * @return {string} Either 'VisualEditor' or 'SourceEditor'\n */\nfunction getPreferredEditor() {\n\tif ( editorOverride ) {\n\t\t// Temporary override, set via the URL for this request\n\t\t// or by clicking the chosen mode when both tabs are shown\n\t\treturn editorOverride;\n\t}\n\tconst preferredEditor = mw.user.options.get( 'mobile-editor' ) || mw.storage.get( 'preferredEditor' );\n\tif ( preferredEditor ) {\n\t\treturn preferredEditor;\n\t}\n\tswitch ( mw.config.get( 'wgMFDefaultEditor' ) ) {\n\t\tcase 'source':\n\t\t\treturn 'SourceEditor';\n\t\tcase 'visual':\n\t\t\treturn 'VisualEditor';\n\t\tcase 'preference':\n\t\t\t// First check if the user has actually used the desktop editor.\n\t\t\t// This is done hackily by checking if they have the preference\n\t\t\t// set to suppress the welcome dialog or user education popups. (T261423)\n\t\t\tif ( mw.user.options.get( 'visualeditor-hidebetawelcome' ) || mw.user.options.get( 'visualeditor-hideusered' ) ) {\n\t\t\t\treturn mw.user.options.get( 'visualeditor-editor' ) === 'visualeditor' ? 'VisualEditor' : 'SourceEditor';\n\t\t\t} else {\n\t\t\t\t// When there is no desktop preference, we use MFFallbackEditor.\n\t\t\t\treturn mw.config.get( 'wgMFFallbackEditor' ) === 'visual' ? 'VisualEditor' : 'SourceEditor';\n\t\t\t}\n\t}\n\t// In the event of misconfiguration, fall back to source\n\treturn 'SourceEditor';\n}\n\n/**\n * Initialize the edit button so that it launches the editor interface when clicked.\n *\n * @method\n * @ignore\n * @param {Page} page The page to edit.\n * @param {Skin} skin\n * @param {module:mobile.startup/PageHTMLParser} currentPageHTMLParser\n * @param {Router} router\n */\nfunction setupEditor( page, skin, currentPageHTMLParser, router ) {\n\tconst\n\t\toverlayManager = OverlayManager.getSingleton(),\n\t\tisNewPage = page.id === 0;\n\n\t$editTab.add( '.edit-link' ).on( 'click.mfeditlink', function ( ev ) {\n\t\tonEditLinkClick( this, ev, overlayManager.router );\n\t} );\n\tmw.hook( 'wikipage.content' ).add( function ( $content ) {\n\t\t// make sure that any .edit-link links in here don't get double-handled\n\t\t$content.find( EDITSECTION_SELECTOR ).off( 'click.mfeditlink' ).on( 'click.mfeditlink', function ( ev ) {\n\t\t\tonEditLinkClick( this, ev, overlayManager.router );\n\t\t} );\n\t} );\n\n\toverlayManager.add( editorPath, function ( sectionId ) {\n\t\tconst\n\t\t\tscrollTop = window.pageYOffset,\n\t\t\t$contentText = $( '#mw-content-text' ),\n\t\t\turl = new URL( location.href ),\n\t\t\teditorOptions = {\n\t\t\t\toverlayManager: overlayManager,\n\t\t\t\tcurrentPageHTMLParser: currentPageHTMLParser,\n\t\t\t\tfakeScroll: 0,\n\t\t\t\tapi: new mw.Api(),\n\t\t\t\tlicenseMsg: skin.getLicenseMsg(),\n\t\t\t\ttitle: page.title,\n\t\t\t\ttitleObj: page.titleObj,\n\t\t\t\tisAnon: user.isAnon(),\n\t\t\t\tisNewPage: isNewPage,\n\t\t\t\toldId: mw.util.getParamValue( 'oldid' ),\n\t\t\t\tcontentLang: $contentText.attr( 'lang' ),\n\t\t\t\tcontentDir: $contentText.attr( 'dir' ),\n\t\t\t\t// Arrange preload content if we're on a page with those URL parameters\n\t\t\t\tpreload: url.searchParams.get( 'preload' ),\n\t\t\t\tpreloadparams: mw.util.getArrayParam( 'preloadparams', url.searchParams ),\n\t\t\t\teditintro: url.searchParams.get( 'editintro' )\n\t\t\t},\n\t\t\tvisualAbortPromise = $.Deferred();\n\n\t\tconst animationDelayDeferred = util.Deferred();\n\n\t\tlet abortableDataPromise, overlayPromise,\n\t\t\tinitMechanism = mw.util.getParamValue( 'redlink' ) ? 'new' : 'click';\n\n\t\tif ( sectionId !== 'all' ) {\n\t\t\teditorOptions.sectionId = page.isWikiText() ? sectionId : undefined;\n\t\t}\n\n\t\tfunction showLoading() {\n\t\t\tlet $sectionTop, fakeScroll, enableVisualSectionEditing;\n\n\t\t\t$( document.body ).addClass( 've-loading' );\n\n\t\t\tconst $page = $( '#mw-mf-page-center' );\n\t\t\tconst $content = $( '#content' );\n\t\t\tif ( sectionId === '0' || sectionId === 'all' ) {\n\t\t\t\t$sectionTop = $( '#bodyContent' );\n\t\t\t} else {\n\t\t\t\t$sectionTop = $(\n\t\t\t\t\t// ends with section=N\n\t\t\t\t\t'a[href$=\"section=' + sectionId + '\"],' +\n\t\t\t\t\t// contains section=N&...\n\t\t\t\t\t'a[href*=\"section=' + sectionId + '&\"]'\n\t\t\t\t).closest( '.mw-heading, h1, h2, h3, h4, h5, h6' );\n\t\t\t\t// When loading on action=edit URLs, there is no page content\n\t\t\t\tif ( !$sectionTop.length ) {\n\t\t\t\t\t$sectionTop = $( '#bodyContent' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Pretend that we didn't just scroll the page to the top.\n\t\t\t$page.prop( 'scrollTop', scrollTop );\n\t\t\t// Then, pretend that we're scrolling to the position of the clicked heading.\n\t\t\tfakeScroll = $sectionTop[0].getBoundingClientRect().top;\n\t\t\t// Adjust for height of the toolbar.\n\t\t\tfakeScroll -= 48;\n\t\t\tif ( shouldLoadVisualEditor() ) {\n\t\t\t\tenableVisualSectionEditing = veConfig.enableVisualSectionEditing === true ||\n\t\t\t\t\t// === ve.init.mw.MobileArticleTarget.static.trackingName\n\t\t\t\t\tveConfig.enableVisualSectionEditing === 'mobile';\n\t\t\t\tif ( sectionId === '0' || sectionId === 'all' || enableVisualSectionEditing ) {\n\t\t\t\t\t// Adjust for surface padding. Only needed if we're at the beginning of the doc.\n\t\t\t\t\tfakeScroll -= 16;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( sectionId === '0' || sectionId === 'all' ) {\n\t\t\t\t\tfakeScroll -= 16;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content.css( {\n\t\t\t\t// Use transform instead of scroll for smoother animation (via CSS transitions).\n\t\t\t\ttransform: 'translate( 0, ' + -fakeScroll + 'px )',\n\t\t\t\t// If the clicked heading is near the end of the page, we might need to insert\n\t\t\t\t// some extra space to allow us to scroll \"beyond the end\" of the page.\n\t\t\t\t'padding-bottom': '+=' + fakeScroll,\n\t\t\t\t'margin-bottom': '-=' + fakeScroll\n\t\t\t} );\n\t\t\teditorOptions.fakeScroll = fakeScroll;\n\t\t\tsetTimeout( animationDelayDeferred.resolve, 500 );\n\t\t}\n\n\t\tfunction clearLoading() {\n\t\t\tif ( abortableDataPromise && abortableDataPromise.abort ) {\n\t\t\t\tabortableDataPromise.abort();\n\t\t\t}\n\n\t\t\t$( '#content' ).css( {\n\t\t\t\ttransform: '',\n\t\t\t\t'padding-bottom': '',\n\t\t\t\t'margin-bottom': ''\n\t\t\t} );\n\n\t\t\t$( document.body ).removeClass( 've-loading' );\n\t\t}\n\n\t\tfunction loadBasicEditor() {\n\t\t\t// Note that this option was used when logging a wikitext init later\n\t\t\tinitMechanism = 'tooslow';\n\n\t\t\t// This restarts the loading (whether it was aborted when loading the code or the data)\n\t\t\tvisualAbortPromise.reject();\n\t\t\tif ( abortableDataPromise && abortableDataPromise.abort ) {\n\t\t\t\tabortableDataPromise.abort();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Log init event to edit schema.\n\t\t * Need to log this from outside the Overlay object because that module\n\t\t * won't have loaded yet.\n\t\t *\n\t\t * @private\n\t\t * @ignore\n\t\t * @param {string} editor name e.g. wikitext or visualeditor\n\t\t * @method\n\t\t */\n\t\tfunction logInit( editor ) {\n\t\t\tmw.track( 'editAttemptStep', {\n\t\t\t\taction: 'init',\n\t\t\t\ttype: 'section',\n\t\t\t\tmechanism: initMechanism,\n\t\t\t\tintegration: 'page',\n\t\t\t\t/* eslint-disable camelcase */\n\t\t\t\teditor_interface: editor\n\t\t\t\t/* eslint-enable camelcase */\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Check whether VisualEditor should be loaded\n\t\t *\n\t\t * @private\n\t\t * @ignore\n\t\t * @method\n\t\t * @return {bool}\n\t\t */\n\t\tfunction shouldLoadVisualEditor() {\n\t\t\tconst preferredEditor = getPreferredEditor();\n\n\t\t\treturn page.isVESourceAvailable() || (\n\t\t\t\tpage.isVEVisualAvailable() &&\n\t\t\t\t// If the user prefers visual mode or the user has no preference and\n\t\t\t\t// the visual mode is the default editor for this wiki\n\t\t\t\tpreferredEditor === 'VisualEditor'\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Load source editor\n\t\t *\n\t\t * @ignore\n\t\t * @method\n\t\t * @return {jQuery.Promise} Promise resolved with the editor overlay\n\t\t * @fires mobileFrontend.editorOpening\n\t\t */\n\t\tfunction loadSourceEditor() {\n\t\t\tlogInit( 'wikitext' );\n\t\t\t// Inform other interested code that we're loading the editor\n\t\t\t/**\n\t\t\t * Internal for use in GrowthExperiments only.\n\t\t\t *\n\t\t\t * @event ~'mobileFrontend.editorOpening'\n\t\t\t * @memberof Hooks\n\t\t\t */\n\t\t\tmw.hook( 'mobileFrontend.editorOpening' ).fire();\n\n\t\t\treturn mw.loader.using( 'mobile.editor.overlay' ).then( function () {\n\t\t\t\tconst SourceEditorOverlay = M.require( 'mobile.editor.overlay/SourceEditorOverlay' );\n\t\t\t\treturn new SourceEditorOverlay( editorOptions );\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Load visual editor. If it fails to load for any reason, load the source editor instead.\n\t\t *\n\t\t * @private\n\t\t * @ignore\n\t\t * @method\n\t\t * @return {jQuery.Promise} Promise resolved with the editor overlay\n\t\t */\n\t\tfunction loadVisualEditorMaybe() {\n\t\t\tlogInit( 'visualeditor' );\n\t\t\t// Inform other interested code that we're loading the editor\n\t\t\t/**\n\t\t\t * Internal for use in GrowthExperiments only.\n\t\t\t *\n\t\t\t * @event ~'mobileFrontend.editorOpening'\n\t\t\t * @memberof Hooks\n\t\t\t */\n\t\t\tmw.hook( 'mobileFrontend.editorOpening' ).fire();\n\n\t\t\teditorOptions.mode = mw.config.get( 'wgMFEnableVEWikitextEditor' ) && getPreferredEditor() === 'SourceEditor' ?\n\t\t\t\t'source' :\n\t\t\t\t'visual';\n\t\t\teditorOptions.dataPromise = mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {\n\t\t\t\tabortableDataPromise = mw.libs.ve.targetLoader.requestPageData(\n\t\t\t\t\teditorOptions.mode,\n\t\t\t\t\teditorOptions.titleObj.getPrefixedDb(),\n\t\t\t\t\t{\n\t\t\t\t\t\tsessionStore: true,\n\t\t\t\t\t\tsection: editorOptions.sectionId === undefined ?\n\t\t\t\t\t\t\tnull : editorOptions.sectionId,\n\t\t\t\t\t\toldId: editorOptions.oldId || undefined,\n\t\t\t\t\t\tpreload: editorOptions.preload,\n\t\t\t\t\t\tpreloadparams: editorOptions.preloadparams,\n\t\t\t\t\t\teditintro: editorOptions.editintro,\n\t\t\t\t\t\t// Should be ve.init.mw.MobileArticleTarget.static.trackingName,\n\t\t\t\t\t\t// but the class hasn't loaded yet.\n\t\t\t\t\t\ttargetName: 'mobile'\n\t\t\t\t\t} );\n\t\t\t\treturn abortableDataPromise;\n\t\t\t} );\n\n\t\t\tconst visualLoadingPromise = mw.loader.using( 'ext.visualEditor.targetLoader' )\n\t\t\t\t.then( function () {\n\t\t\t\t\t// Load 'mobile.editor.overlay' separately, so that if we fall back to basic\n\t\t\t\t\t// editor, we can display it without waiting for the visual code\n\t\t\t\t\treturn mw.loader.using( 'mobile.editor.overlay' ).then( function () {\n\t\t\t\t\t\tmw.libs.ve.targetLoader.addPlugin( 'ext.visualEditor.mobileArticleTarget' );\n\t\t\t\t\t\tif ( mw.config.get( 'wgMFEnableVEWikitextEditor' ) ) {\n\t\t\t\t\t\t\t// Target loader only loads wikitext editor if the desktop\n\t\t\t\t\t\t\t// preference is set.\n\t\t\t\t\t\t\t// TODO: Have a cleaner API for this instead of duplicating\n\t\t\t\t\t\t\t// the module name here.\n\t\t\t\t\t\t\tmw.libs.ve.targetLoader.addPlugin( 'ext.visualEditor.mwwikitext' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn mw.libs.ve.targetLoader.loadModules( editorOptions.mode );\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\t// Continue when loading is completed or aborted\n\t\t\tconst visualPromise = $.Deferred();\n\t\t\tvisualLoadingPromise.then( visualPromise.resolve, visualPromise.reject );\n\t\t\tvisualAbortPromise.then( visualPromise.reject, visualPromise.reject );\n\n\t\t\treturn visualPromise\n\t\t\t\t.then( function () {\n\t\t\t\t\tconst VisualEditorOverlay = M.require( 'mobile.editor.overlay/VisualEditorOverlay' ),\n\t\t\t\t\t\tSourceEditorOverlay = M.require( 'mobile.editor.overlay/SourceEditorOverlay' );\n\t\t\t\t\teditorOptions.SourceEditorOverlay = SourceEditorOverlay;\n\t\t\t\t\treturn new VisualEditorOverlay( editorOptions );\n\t\t\t\t}, function () {\n\t\t\t\t\treturn loadSourceEditor();\n\t\t\t\t} );\n\t\t}\n\n\t\t// showLoading() has to run after the overlay has opened, which disables page scrolling.\n\t\t// clearLoading() has to run after the loading overlay is hidden in any way\n\t\t// (either when loading is aborted, or when the editor overlay is shown instead).\n\t\tconst loadingOverlay = editorLoadingOverlay(\n\t\t\tshowLoading, clearLoading, shouldLoadVisualEditor() ? loadBasicEditor : null\n\t\t);\n\n\t\tif ( shouldLoadVisualEditor() ) {\n\t\t\toverlayPromise = loadVisualEditorMaybe();\n\t\t} else {\n\t\t\toverlayPromise = loadSourceEditor();\n\t\t}\n\n\t\t// Wait for the scroll animation to finish before we show the editor overlay\n\t\tutil.Promise.all( [ overlayPromise, animationDelayDeferred ] ).then( function ( overlay ) {\n\t\t\t// Wait for the data to load before we show the editor overlay\n\t\t\toverlay.getLoadingPromise().catch( function ( error ) {\n\t\t\t\tif ( visualAbortPromise.state() === 'rejected' ) {\n\t\t\t\t\treturn loadSourceEditor().then( function ( sourceOverlay ) {\n\t\t\t\t\t\toverlay = sourceOverlay;\n\t\t\t\t\t\treturn overlay.getLoadingPromise();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn $.Deferred().reject( error ).promise();\n\t\t\t} ).then( function () {\n\t\t\t\t// Make sure the user did not close the loading overlay while we were waiting\n\t\t\t\tconst overlayData = overlayManager.stack[0];\n\t\t\t\tif ( !overlayData || overlayData.overlay !== loadingOverlay ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Show the editor!\n\t\t\t\toverlayManager.replaceCurrent( overlay );\n\t\t\t}, function ( error, apiResponse ) {\n\t\t\t\t// Could not load the editor.\n\t\t\t\toverlayManager.router.back();\n\t\t\t\tif ( error.show ) {\n\t\t\t\t\t// Probably a blockMessageDrawer returned because the user is blocked.\n\t\t\t\t\tdocument.body.appendChild( error.$el[ 0 ] );\n\t\t\t\t\terror.show();\n\t\t\t\t} else if ( apiResponse ) {\n\t\t\t\t\tmw.notify( editorOptions.api.getErrorMessage( apiResponse ) );\n\t\t\t\t} else {\n\t\t\t\t\tmw.notify( mw.msg( 'mobile-frontend-editor-error-loading' ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// Reset the temporary override for the next load\n\t\teditorOverride = null;\n\n\t\treturn loadingOverlay;\n\t} );\n\n\t$( '#ca-edit a, a#ca-edit, #ca-editsource a, a#ca-editsource' ).prop( 'href', function ( i, href ) {\n\t\tconst editUrl = new URL( href, location.href );\n\t\t// By default the editor opens section 0 (lead section), rather than the whole article.\n\t\t// This might be changed in the future (T210659).\n\t\teditUrl.searchParams.set( 'section', '0' );\n\t\treturn editUrl.toString();\n\t} );\n\n\t// We use wgAction instead of getParamValue('action') as the former can be\n\t// overridden by hooks to stop the editor loading automatically.\n\tif ( !router.getPath() && ( mw.util.getParamValue( 'veaction' ) || mw.config.get( 'wgAction' ) === 'edit' ) ) {\n\t\tif ( mw.util.getParamValue( 'veaction' ) === 'edit' ) {\n\t\t\teditorOverride = 'VisualEditor';\n\t\t} else if ( mw.util.getParamValue( 'veaction' ) === 'editsource' ) {\n\t\t\teditorOverride = 'SourceEditor';\n\t\t}\n\t\t// else: action=edit, for which we allow the default to take effect\n\t\tconst fragment = '#/editor/' + ( mw.util.getParamValue( 'section' ) || ( mw.config.get( 'wgAction' ) === 'edit' ? 'all' : '0' ) );\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tif ( window.history && history.pushState ) {\n\t\t\t// We're reformatting the action=edit URL into a view URL and\n\t\t\t// replacing it into the history, and then will fall through to\n\t\t\t// router.navigate which will move us to the editing URL for the\n\t\t\t// mobile site. We do this because the editor overlay deeply\n\t\t\t// expects to have been opened on top of an actual page, and e.g.\n\t\t\t// closing the editor via the X will produce unexpected behavior\n\t\t\t// otherwise.\n\t\t\tconst url = new URL( location.href );\n\t\t\turl.searchParams.delete( 'action' );\n\t\t\turl.searchParams.delete( 'veaction' );\n\t\t\turl.searchParams.delete( 'section' );\n\t\t\thistory.replaceState( null, document.title, url );\n\t\t}\n\t\tutil.docReady( function () {\n\t\t\trouter.navigate( fragment );\n\t\t} );\n\t}\n}\n\n/**\n * Hide any section id icons in the page. This will not hide the edit icon in the page action\n * menu.\n *\n * @method\n * @ignore\n * @param {module:mobile.startup/PageHTMLParser} currentPageHTMLParser\n */\nfunction hideSectionEditIcons( currentPageHTMLParser ) {\n\tcurrentPageHTMLParser.$el.find( '.mw-editsection' ).hide();\n}\n\n/**\n * Show a drawer with log in / sign up buttons.\n *\n * @method\n * @ignore\n * @param {Router} router\n */\nfunction bindEditLinksLoginDrawer( router ) {\n\tlet drawer;\n\tfunction showLoginDrawer() {\n\t\tif ( !drawer ) {\n\t\t\tdrawer = new CtaDrawer( {\n\t\t\t\tcontent: mw.msg( 'mobile-frontend-editor-disabled-anon' ),\n\t\t\t\tsignupQueryParams: {\n\t\t\t\t\twarning: 'mobile-frontend-watchlist-signup-action'\n\t\t\t\t}\n\t\t\t} );\n\t\t\tdocument.body.appendChild( drawer.$el[ 0 ] );\n\t\t}\n\t\tdrawer.show();\n\t}\n\t$editTab.on( 'click', function ( ev ) {\n\t\tshowLoginDrawer();\n\t\tev.preventDefault();\n\t} );\n\tmw.hook( 'wikipage.content' ).add( function ( $content ) {\n\t\t$content.find( EDITSECTION_SELECTOR ).on( 'click', function ( ev ) {\n\t\t\tshowLoginDrawer();\n\t\t\tev.preventDefault();\n\t\t} );\n\t} );\n\trouter.addRoute( editorPath, function () {\n\t\tshowLoginDrawer();\n\t} );\n\trouter.checkRoute();\n}\n\n/**\n * Setup the editor if the user can edit the page otherwise show a sorry toast.\n *\n * @method\n * @ignore\n * @param {Page} currentPage\n * @param {module:mobile.startup/PageHTMLParser} currentPageHTMLParser\n * @param {Skin} skin\n * @param {Router} router\n */\nfunction init( currentPage, currentPageHTMLParser, skin, router ) {\n\tlet editErrorMessage, editRestrictions;\n\t// see: https://www.mediawiki.org/wiki/Manual:Interface/JavaScript#Page-specific\n\tconst isReadOnly = mw.config.get( 'wgMinervaReadOnly' );\n\tconst isEditable = !isReadOnly && mw.config.get( 'wgIsProbablyEditable' );\n\n\tif ( isEditable ) {\n\t\t// Edit button updated in setupEditor.\n\t\tsetupEditor( currentPage, skin, currentPageHTMLParser, router );\n\t} else {\n\t\thideSectionEditIcons( currentPageHTMLParser );\n\t\teditRestrictions = mw.config.get( 'wgRestrictionEdit' );\n\t\tif ( mw.user.isAnon() && Array.isArray( editRestrictions ) && !editRestrictions.length ) {\n\t\t\tbindEditLinksLoginDrawer( router );\n\t\t} else {\n\t\t\tconst $link = $( '<a>' ).attr( 'href', mw.util.getUrl( mw.config.get( 'wgPageName' ), { action: 'edit' } ) );\n\t\t\teditErrorMessage = isReadOnly ? mw.msg( 'apierror-readonly' ) : mw.message( 'mobile-frontend-editor-disabled', $link ).parseDom();\n\t\t\tbindEditLinksSorryToast( editErrorMessage, router );\n\t\t}\n\t}\n}\n\n/**\n * Wire up events that ensure we\n * show a toast message with sincere condolences when user navigates to\n * #/editor or clicks on an edit button\n *\n * @method\n * @ignore\n * @param {string} msg Message for sorry message\n * @param {Router} router\n */\nfunction bindEditLinksSorryToast( msg, router ) {\n\t$editTab.on( 'click', function ( ev ) {\n\t\tmw.notify( msg );\n\t\tev.preventDefault();\n\t} );\n\tmw.hook( 'wikipage.content' ).add( function ( $content ) {\n\t\t$content.find( EDITSECTION_SELECTOR ).on( 'click', function ( ev ) {\n\t\t\tmw.notify( msg );\n\t\t\tev.preventDefault();\n\t\t} );\n\t} );\n\trouter.addRoute( editorPath, function () {\n\t\tmw.notify( msg );\n\t} );\n\trouter.checkRoute();\n}\n\nmodule.exports = function ( currentPage, currentPageHTMLParser, skin ) {\n\tconst router = __non_webpack_require__( 'mediawiki.router' );\n\n\tif ( currentPage.inNamespace( 'file' ) && currentPage.id === 0 ) {\n\t\t// Is a new file page (enable upload image only) T60311\n\t\tbindEditLinksSorryToast( mw.msg( 'mobile-frontend-editor-uploadenable' ), router );\n\t} else {\n\t\t// Edit button is currently hidden. A call to init() will update it as needed.\n\t\tinit( currentPage, currentPageHTMLParser, skin, router );\n\t}\n};\n","const\n\tfakeToolbar = require( './fakeToolbar' ),\n\tIconButton = require( '../mobile.startup/IconButton' ),\n\tOverlay = require( '../mobile.startup/Overlay' );\n\n/* global $ */\n\n/**\n * Like loadingOverlay(), but with a fake editor toolbar instead of the spinner.\n *\n * @private\n * @param {Function} afterShow Callback which runs after overlay is shown\n * @param {Function} afterHide Callback which runs after overlay is hidden\n * @param {Function} [loadBasicEditor] Callback for the \"Use basic editor\" button\n * @return {module:mobile.startup/Overlay}\n */\nmodule.exports = function editorLoadingOverlay( afterShow, afterHide, loadBasicEditor ) {\n\tlet timeout;\n\tconst\n\t\t$fakeToolbar = fakeToolbar(),\n\t\t$loadBasicWrapper = $( '<div>' ).addClass( 've-loadbasiceditor' ),\n\t\tloadBasicButton = new IconButton( {\n\t\t\tlabel: mw.msg( 'mobile-frontend-editor-loadbasiceditor' ),\n\t\t\taction: 'progressive',\n\t\t\tweight: 'normal',\n\t\t\tsize: 'medium',\n\t\t\tisIconOnly: false,\n\t\t\ticon: null\n\t\t} ),\n\t\toverlay = new Overlay( {\n\t\t\tclassName: 'overlay overlay-loading',\n\t\t\tnoHeader: true,\n\t\t\tisBorderBox: false,\n\t\t\tonBeforeExit: function ( exit ) {\n\t\t\t\texit();\n\t\t\t\tafterHide();\n\t\t\t\tif ( timeout ) {\n\t\t\t\t\tclearTimeout( timeout );\n\t\t\t\t}\n\t\t\t}\n\t\t} ),\n\t\tlogFeatureUse = function ( feature, action ) {\n\t\t\tmw.track( 'visualEditorFeatureUse', {\n\t\t\t\tfeature: feature,\n\t\t\t\taction: action,\n\t\t\t\t// eslint-disable-next-line camelcase\n\t\t\t\teditor_interface: 'visualeditor'\n\t\t\t} );\n\t\t};\n\n\toverlay.show = function () {\n\t\tOverlay.prototype.show.call( this );\n\t\tafterShow();\n\t};\n\n\toverlay.$el.find( '.overlay-content' ).append( $fakeToolbar );\n\n\tif ( loadBasicEditor ) {\n\t\toverlay.$el.find( '.overlay-content' ).append(\n\t\t\t$loadBasicWrapper.append(\n\t\t\t\t$( '<p>' ).text( mw.msg( 'mobile-frontend-editor-loadingtooslow' ) ),\n\t\t\t\tloadBasicButton.$el\n\t\t\t)\n\t\t);\n\n\t\ttimeout = setTimeout( function () {\n\t\t\t$loadBasicWrapper.addClass( 've-loadbasiceditor-shown' );\n\t\t\tlogFeatureUse( 'mobileVisualFallback', 'context-show' );\n\t\t}, 3000 );\n\n\t\tloadBasicButton.$el.on( 'click', function () {\n\t\t\t$loadBasicWrapper.removeClass( 've-loadbasiceditor-shown' );\n\t\t\tlogFeatureUse( 'mobileVisualFallback', 'fallback-confirm' );\n\t\t\tloadBasicEditor();\n\t\t} );\n\t}\n\n\t// Animate the toolbar sliding into place.\n\t$fakeToolbar.addClass( 'toolbar-hidden' );\n\tsetTimeout( function () {\n\t\t$fakeToolbar.addClass( 'toolbar-shown' );\n\t\tsetTimeout( function () {\n\t\t\t$fakeToolbar.addClass( 'toolbar-shown-done' );\n\t\t}, 250 );\n\t} );\n\n\treturn overlay;\n};\n","const lazyImageLoader = require( '../mobile.startup/lazyImages/lazyImageLoader' );\n\n/**\n * @namespace Hooks\n */\n\n/**\n * Initialise lazy loading images to supplement the HTML changes inside the\n * MobileFormatter.\n *\n * @param {jQuery} $container\n * @private\n */\nfunction init( $container ) {\n\n\t// T360781 - since this is invoked via hook, the value of $container is not guaranteed.\n\t// If undefined, return early since no further work can be done on $container.\n\tif ( !( $container[ 0 ] instanceof HTMLElement ) ) {\n\t\treturn;\n\t}\n\n\tconst imagePlaceholders = lazyImageLoader.queryPlaceholders( $container[ 0 ] );\n\n\t// Regardless of whether or not lazy load is turned on\n\t// We need to load in all images before print\n\twindow.addEventListener( 'beforeprint', function () {\n\t\tlazyImageLoader.loadImages( imagePlaceholders );\n\t} );\n\n\tif ( !mw.config.get( 'wgMFLazyLoadImages' ) ) {\n\t\treturn;\n\t}\n\n\t// eslint-disable-next-line compat/compat\n\tconst observer = new IntersectionObserver(\n\t\t( entries ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tconst placeholder = entry.target;\n\t\t\t\t// If intersecting load image and stop observing it to free up resources.\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tlazyImageLoader.loadImage( placeholder );\n\t\t\t\t\tobserver.unobserve( placeholder );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API\n\t\t{\n\t\t\t// Setup the area for observing.\n\t\t\t// By default the root is the viewport.\n\t\t\t// We want the detection area to be as tall as 150% of the viewport height,\n\t\t\t// allowing elements to be detected before they reach the viewport.\n\t\t\t// This is achieved with a 50% bottom margin.\n\t\t\trootMargin: '0px 0px 50% 0px',\n\t\t\t// The default is 0 (meaning as soon as even one pixel is visible,\n\t\t\t// the callback will be run), however we explicitly set this so that\n\t\t\t// it is clear we have made this choice in case we want to revisit later.\n\t\t\tthreshold: 0\n\t\t}\n\t);\n\n\t// observe all the placeholders\n\timagePlaceholders.forEach( ( placeholder ) => {\n\t\tobserver.observe( placeholder );\n\t} );\n}\n\n/**\n * Make modifications after an image was lazy loaded, stable for use.\n *\n * @event ~'mobileFrontend.loadLazyImages'\n * @memberof Hooks\n * @param {jQuery} $container\n */\nmw.hook( 'mobileFrontend.loadLazyImages' ).add( function ( $container ) {\n\tconst imagePlaceholders = lazyImageLoader.queryPlaceholders( $container[ 0 ] );\n\tlazyImageLoader.loadImages( imagePlaceholders );\n} );\n\nmodule.exports = function () {\n\tmw.hook( 'wikipage.content' ).add( init );\n};\n","// FIXME: make this an object with a constructor to facilitate testing\n// (see https://bugzilla.wikimedia.org/show_bug.cgi?id=44264)\n/**\n * mobileFrontend namespace\n * @private\n */\nlet url;\n\nconst\n\ttoggling = require( './toggling' ),\n\tFONT_SIZE_KEY = 'mf-font-size',\n\tSECTION_COLLAPSING_TOGGLE = 'mf-expand-sections',\n\tstorage = mw.storage,\n\tapi = new mw.Api(),\n\tlazyLoadedImages = require( './lazyLoadedImages' ),\n\teditor = require( './editor' ),\n\tcurrentPage = require( '../mobile.startup/currentPage' )(),\n\tcurrentPageHTMLParser = require( '../mobile.startup/currentPageHTMLParser' )(),\n\tmfUtil = require( '../mobile.startup/util' ),\n\t$window = mfUtil.getWindow(),\n\tSkin = require( '../mobile.startup/Skin' ),\n\teventBus = require( '../mobile.startup/eventBusSingleton' );\n\nconst skin = Skin.getSingleton();\n\n/**\n * Given 2 functions, it returns a function that will run both with it's\n * context and parameters and return the results combined\n *\n * @private\n * @param {Function} fn1\n * @param {Function} fn2\n * @return {Function} which returns void\n */\nfunction apply2( fn1, fn2 ) {\n\treturn function () {\n\t\tfn1.apply( this, arguments );\n\t\tfn2.apply( this, arguments );\n\t};\n}\n\n/**\n * The `window`'s resize event debounced at 100 ms.\n * The `resize:throttled` event is the `window`'s\n * resize event throttled to 200 ms.\n *\n * @event resize\n * @memberof window\n */\n\n/**\n * The `window`'s scroll event debounced at 100 ms.\n * The `scroll:throttled` event is the `window`'s\n * scroll event throttled to 200 ms.\n *\n * @event scroll\n * @memberof window\n */\n\n$window\n\t.on( 'resize', apply2(\n\t\tmw.util.debounce( function () {\n\t\t\teventBus.emit( 'resize' );\n\t\t}, 100 ),\n\t\tmw.util.throttle( function () {\n\t\t\teventBus.emit( 'resize:throttled' );\n\t\t}, 200 )\n\t) )\n\t.on( 'scroll', apply2(\n\t\tmw.util.debounce( function () {\n\t\t\teventBus.emit( 'scroll' );\n\t\t}, 100 ),\n\t\tmw.util.throttle( function () {\n\t\t\teventBus.emit( 'scroll:throttled' );\n\t\t}, 200 )\n\t) );\n\n// Hide URL flags used to pass state through reloads\n// venotify is normally handled in ve.init.mw.DesktopArticleTarget.init.js\n// but that's not loaded on mobile\n// eslint-disable-next-line no-restricted-properties\nif ( window.history && history.pushState ) {\n\t// eslint-disable-next-line no-restricted-properties\n\turl = new URL( window.location.href );\n\tif ( url.searchParams.has( 'venotify' ) || url.searchParams.has( 'mfnotify' ) ) {\n\t\turl.searchParams.delete( 'venotify' );\n\t\turl.searchParams.delete( 'mfnotify' );\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\twindow.history.replaceState( null, document.title, url.toString() );\n\t}\n}\n\n// Recruit volunteers through the console\n// (note console.log may not be a function so check via apply)\n/* eslint-disable no-console */\nif ( window.console && window.console.log && window.console.log.apply &&\n\t\tmw.config.get( 'wgMFEnableJSConsoleRecruitment' ) ) {\n\tconsole.log( mw.msg( 'mobile-frontend-console-recruit' ) );\n}\n/* eslint-enable no-console */\n\n// Setup editor, if supported for the current page view\nif ( mw.config.get( 'wgMFIsSupportedEditRequest' ) ) {\n\teditor( currentPage, currentPageHTMLParser, skin );\n}\n\nfunction migrateXLargeToLarge() {\n\tif ( document.documentElement.classList.contains( 'mf-font-size-clientpref-xlarge' ) ) {\n\t\tif ( mw.user.isAnon() ) {\n\t\t\tmw.user.clientPrefs.set( FONT_SIZE_KEY, 'large' );\n\t\t} else {\n\t\t\tapi.saveOption( FONT_SIZE_KEY, 'large' );\n\t\t}\n\t}\n}\n\nfunction migrateLegacyExpandAllSectionsToggle() {\n\tconst currentValue = mw.storage.get( 'expandSections' );\n\tif ( currentValue ) {\n\t\tif ( mw.user.isAnon() ) {\n\t\t\tmw.user.clientPrefs.set( SECTION_COLLAPSING_TOGGLE, '1' );\n\t\t} else {\n\t\t\tapi.saveOption( SECTION_COLLAPSING_TOGGLE, '1' );\n\t\t}\n\t\tstorage.remove( 'expandSections' );\n\t}\n}\n\nmigrateXLargeToLarge();\nmigrateLegacyExpandAllSectionsToggle();\ntoggling();\nlazyLoadedImages();\n","module.exports = function () {\n\tconst\n\t\tcurrentPage = require( '../mobile.startup/currentPage' )(),\n\t\tToggler = require( '../mobile.startup/Toggler' ),\n\t\tsectionCollapsing = require( '../mobile.startup/sectionCollapsing' ),\n\t\teventBus = require( '../mobile.startup/eventBusSingleton' );\n\n\t/**\n\t * Initialises toggling code.\n\t *\n\t * @method\n\t * @param {jQuery.Object} $container to enable toggling on\n\t * @param {string} prefix a prefix to use for the id.\n\t * @param {Page} page The current page\n\t * @ignore\n\t */\n\tfunction init( $container, prefix, page ) {\n\t\tconst isParsoidEnabled = !!document.querySelector( '.mw-parser-output[data-mw-parsoid-version]' );\n\t\tif ( isParsoidEnabled ) {\n\t\t\tsectionCollapsing.init( $container[0] );\n\t\t} else {\n\t\t\t// Only handle headings in content processed by MakeSectionsTransform.\n\t\t\t// Remove event handler added by MakeSectionsTransform::interimTogglingSupport().\n\t\t\t$container.find( '.section-heading' ).removeAttr( 'onclick' );\n\t\t\t// Cleanup global as it is no longer needed. We check if it's undefined because\n\t\t\t// there is no guarantee this won't be run on other skins e.g. Vector or cached HTML.\n\t\t\tif ( window.mfTempOpenSection !== undefined ) {\n\t\t\t\tdelete window.mfTempOpenSection;\n\t\t\t}\n\t\t\t// eslint-disable-next-line no-new\n\t\t\tnew Toggler( {\n\t\t\t\t$container: $container,\n\t\t\t\tprefix: prefix,\n\t\t\t\tpage: page,\n\t\t\t\teventBus: eventBus\n\t\t\t} );\n\t\t}\n\t}\n\n\tif (\n\t\t// Avoid this running on Watchlist.\n\t\t!currentPage.inNamespace( 'special' ) &&\n\t\t(\n\t\t\tmw.config.get( 'wgAction' ) === 'view' ||\n\t\t\tmw.config.get( 'wgAction' ) === 'edit'\n\t\t)\n\t) {\n\t\tmw.hook( 'wikipage.content' ).add( function ( $container ) {\n\t\t\tlet $contentContainer = $container.find( '.mw-parser-output' );\n\t\t\t// If there was no mw-parser-output wrapper, just use the parent.\n\t\t\tif ( $contentContainer.length === 0 ) {\n\t\t\t\t$contentContainer = $container;\n\t\t\t}\n\t\t\tinit( $contentContainer, 'content-', currentPage );\n\t\t} );\n\t}\n};\n","const\n\tutil = require( './util' ),\n\tescapeSelector = util.escapeSelector,\n\tarrowOptions = {\n\t\ticon: 'expand',\n\t\tisSmall: true,\n\t\tadditionalClassNames: 'indicator'\n\t},\n\tIcon = require( './Icon' );\nconst isCollapsedByDefault = require( './isCollapsedByDefault.js' );\n\n/**\n * @typedef {Object} ToggledEvent\n * @prop {boolean} expanded True if section is opened, false if closed.\n * @prop {Page} page\n * @prop {jQuery.Object} $heading\n * @memberof module:mobile.startup\n * @ignore\n */\n\n/**\n * A class for enabling toggling\n *\n * Toggling can be disabled on a sepcific heading by adding the\n * collapsible-heading-disabled class.\n *\n * @class Toggler\n * @param {Object} options\n * @param {OO.EventEmitter} options.eventBus Object used to emit section-toggled events.\n * @param {jQuery.Object} options.$container to apply toggling to\n * @param {string} options.prefix a prefix to use for the id.\n * @param {Page} options.page to allow storage of session for future visits\n */\nfunction Toggler( options ) {\n\tthis.eventBus = options.eventBus;\n\tthis.$container = options.$container;\n\tthis.prefix = options.prefix;\n\tthis.page = options.page;\n\tthis._enable();\n}\n\n/**\n * Using the settings module looks at what sections were previously expanded on\n * existing page.\n *\n * @param {Page} page\n * @return {Object} representing open sections\n * @ignore\n */\nfunction getExpandedSections( page ) {\n\tconst expandedSections = mw.storage.session.getObject( 'expandedSections' ) || {};\n\texpandedSections[page.title] = expandedSections[page.title] || {};\n\treturn expandedSections;\n}\n\n/**\n * Save expandedSections to sessionStorage\n *\n * @param {Object} expandedSections\n * @ignore\n */\nfunction saveExpandedSections( expandedSections ) {\n\tmw.storage.session.setObject(\n\t\t'expandedSections', expandedSections\n\t);\n}\n\n/**\n * Given an expanded heading, store it to sessionStorage.\n * If the heading is collapsed, remove it from sessionStorage.\n *\n * @param {jQuery.Object} $heading - A heading belonging to a section\n * @param {Page} page\n * @ignore\n */\nfunction storeSectionToggleState( $heading, page ) {\n\tconst headline = $heading.find( '.mw-headline' ).attr( 'id' ),\n\t\texpandedSections = getExpandedSections( page );\n\n\tif ( headline && expandedSections[page.title] ) {\n\t\tconst isSectionOpen = $heading.hasClass( 'open-block' );\n\t\tif ( isSectionOpen ) {\n\t\t\texpandedSections[page.title][headline] = true;\n\t\t} else {\n\t\t\tdelete expandedSections[page.title][headline];\n\t\t}\n\n\t\tsaveExpandedSections( expandedSections );\n\t}\n}\n\n/**\n * Expand sections that were previously expanded before leaving this page.\n *\n * @param {Toggler} toggler\n * @param {jQuery.Object} $container\n * @param {Page} page\n * @ignore\n */\nfunction expandStoredSections( toggler, $container, page ) {\n\tconst expandedSections = getExpandedSections( page ),\n\t\t$headlines = $container.find( '.section-heading span' );\n\n\t$headlines.each( function () {\n\t\tconst $headline = $container.find( this );\n\t\tconst $sectionHeading = $headline.parents( '.section-heading' );\n\t\t// toggle only if the section is not already expanded\n\t\tif (\n\t\t\texpandedSections[page.title][$headline.attr( 'id' )] &&\n\t\t\t!$sectionHeading.hasClass( 'open-block' )\n\t\t) {\n\t\t\ttoggler.toggle( $sectionHeading, true );\n\t\t}\n\t} );\n}\n\n/**\n * Check if sections should be collapsed by default\n *\n * @return {boolean}\n */\nToggler.prototype.isCollapsedByDefault = function () {\n\tif ( this._isCollapsedByDefault === undefined ) {\n\t\t// Thess classes override site settings and user preferences. For example:\n\t\t// * ...-collapsed used on talk pages by DiscussionTools. (T321618, T322628)\n\t\t// * ...-expanded used in previews (T336572)\n\t\tconst $override = this.$container.closest( '.collapsible-headings-collapsed, .collapsible-headings-expanded' );\n\t\tif ( $override.length ) {\n\t\t\tthis._isCollapsedByDefault = $override.hasClass( 'collapsible-headings-collapsed' );\n\t\t} else {\n\t\t\t// Check site config\n\t\t\tthis._isCollapsedByDefault = isCollapsedByDefault();\n\t\t}\n\t}\n\treturn this._isCollapsedByDefault;\n};\n\n/**\n * Given a heading, toggle it and any of its children\n *\n * @memberof Toggler\n * @instance\n * @param {jQuery.Object} $heading A heading belonging to a section\n * @param {boolean} fromSaved Section is being toggled from a saved state\n * @return {boolean}\n */\nToggler.prototype.toggle = function ( $heading, fromSaved ) {\n\tif ( !fromSaved && $heading.hasClass( 'collapsible-heading-disabled' ) ) {\n\t\treturn false;\n\t}\n\n\tconst self = this,\n\t\twasExpanded = $heading.is( '.open-block' );\n\n\t$heading.toggleClass( 'open-block' );\n\n\tarrowOptions.rotation = wasExpanded ? 0 : 180;\n\tconst newIndicator = new Icon( arrowOptions );\n\tconst $indicatorElement = $heading.data( 'indicator' );\n\tif ( $indicatorElement ) {\n\t\t$indicatorElement.replaceWith( newIndicator.$el );\n\t\t$heading.data( 'indicator', newIndicator.$el );\n\t}\n\n\tconst $headingLabel = $heading.find( '.mw-headline' );\n\t$headingLabel.attr( 'aria-expanded', !wasExpanded );\n\n\tconst $content = $heading.next();\n\tif ( $content.hasClass( 'open-block' ) ) {\n\t\t$content.removeClass( 'open-block' );\n\t\t// jquery doesn't allow custom values for the hidden attribute it seems.\n\t\t$content.get( 0 ).setAttribute( 'hidden', 'until-found' );\n\t} else {\n\t\t$content.addClass( 'open-block' );\n\t\t$content.removeAttr( 'hidden' );\n\t}\n\n\t/* T239418 We consider this event as a low-priority one and emit it asynchronously.\n\tThis ensures that any logic associated with section toggling is async and not contributing\n\tdirectly to a slow click/press event handler.\n\n\tCurrently costly reflow-inducing viewport size computation is being done for lazy-loaded\n\timages by the main listener to this event. */\n\tmw.requestIdleCallback( () => {\n\t\t/**\n\t\t * Global event emitted after a section has been toggled\n\t\t *\n\t\t * @event ~section-toggled\n\t\t * @type {ToggledEvent}\n\t\t * @memberof module:mobile.startup~Toggler\n\t\t * @ignore\n\t\t */\n\n\t\tself.eventBus.emit( 'section-toggled', {\n\t\t\texpanded: wasExpanded,\n\t\t\t$heading\n\t\t} );\n\t\t/**\n\t\t * Internal for use inside ExternalGuidance.\n\t\t *\n\t\t * @event ~'mobileFrontend.section-toggled'\n\t\t * @memberof Hooks\n\t\t */\n\t\tmw.hook( 'mobileFrontend.section-toggled' ).fire( {\n\t\t\texpanded: wasExpanded,\n\t\t\t$heading\n\t\t} );\n\t} );\n\n\tif ( this.isCollapsedByDefault() ) {\n\t\tstoreSectionToggleState( $heading, this.page );\n\t}\n\treturn true;\n};\n\n/**\n * Enables toggling via enter and space keys\n *\n * @param {Toggler} toggler instance.\n * @param {jQuery.Object} $heading\n * @ignore\n */\nfunction enableKeyboardActions( toggler, $heading ) {\n\t$heading.on( 'keypress', ( ev ) => {\n\t\tif ( ev.which === 13 || ev.which === 32 ) {\n\t\t\t// Only handle keypresses on the \"Enter\" or \"Space\" keys\n\t\t\ttoggler.toggle( $heading );\n\t\t}\n\t} ).find( 'a' ).on( 'keypress mouseup', ( ev ) => ev.stopPropagation() );\n}\n\n/**\n * Reveals an element and its parent section as identified by it's id\n *\n * @memberof Toggler\n * @instance\n * @param {string} id An element ID within the $container\n * @return {boolean} Target ID was found\n */\nToggler.prototype.reveal = function ( id ) {\n\tlet $target;\n\t// jQuery will throw for hashes containing certain characters which can break toggling\n\ttry {\n\t\t$target = this.$container.find( '#' + escapeSelector( id ) );\n\t} catch ( e ) {}\n\tif ( !$target || !$target.length ) {\n\t\treturn false;\n\t}\n\n\tlet $heading = $target.parents( '.collapsible-heading' );\n\t// The heading is not a section heading, check if in a content block!\n\tif ( !$heading.length ) {\n\t\t$heading = $target.parents( '.collapsible-block' ).prev( '.collapsible-heading' );\n\t}\n\tif ( $heading.length && !$heading.hasClass( 'open-block' ) ) {\n\t\tthis.toggle( $heading );\n\t}\n\tif ( $heading.length ) {\n\t\t// scroll again after opening section (opening section makes the page longer)\n\t\twindow.scrollTo( 0, $target.offset().top );\n\t}\n\treturn true;\n};\n\n/**\n * Enables section toggling in a given container.\n *\n * @memberof Toggler\n * @instance\n * @private\n */\nToggler.prototype._enable = function () {\n\tconst self = this;\n\n\t// FIXME This should use .find() instead of .children(), some extensions like Wikibase\n\t// want to toggle other headlines than direct descendants of $container. (T95889)\n\tthis.$container.children( '.section-heading' ).each( function ( i ) {\n\t\tconst $heading = self.$container.find( this ),\n\t\t\t$headingLabel = $heading.find( '.mw-headline' ),\n\t\t\t$indicator = $heading.find( '.indicator' ),\n\t\t\tid = self.prefix + 'collapsible-block-' + i;\n\t\t// Be sure there is a `section` wrapping the section content.\n\t\t// Otherwise, collapsible sections for this page is not enabled.\n\t\tif ( $heading.next().is( 'section' ) ) {\n\t\t\tconst $content = $heading.next( 'section' );\n\t\t\t$heading\n\t\t\t\t.addClass( 'collapsible-heading ' )\n\t\t\t\t.data( 'section-number', i )\n\t\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\t\t// don't toggle, if the click target was a link\n\t\t\t\t\t// (a link in a section heading)\n\t\t\t\t\t// See T117880\n\t\t\t\t\tconst clickedLink = ev.target.closest( 'a' );\n\t\t\t\t\tif ( !clickedLink || !clickedLink.href ) {\n\t\t\t\t\t\t// prevent taps/clicks on edit button after toggling (T58209)\n\t\t\t\t\t\tev.preventDefault();\n\t\t\t\t\t\tself.toggle( $heading );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t$headingLabel\n\t\t\t\t.attr( {\n\t\t\t\t\ttabindex: 0,\n\t\t\t\t\trole: 'button',\n\t\t\t\t\t'aria-controls': id,\n\t\t\t\t\t'aria-expanded': 'false'\n\t\t\t\t} );\n\n\t\t\tarrowOptions.rotation = !self.isCollapsedByDefault() ? 180 : 0;\n\t\t\tconst indicator = new Icon( arrowOptions );\n\t\t\tif ( $indicator.length ) {\n\t\t\t\t// replace the existing indicator\n\t\t\t\t$indicator.replaceWith( indicator.$el );\n\t\t\t} else {\n\t\t\t\tindicator.prependTo( $heading );\n\t\t\t}\n\t\t\t$heading.data( 'indicator', indicator.$el );\n\t\t\t$content\n\t\t\t\t.addClass( 'collapsible-block' )\n\t\t\t\t.eq( 0 )\n\t\t\t\t.attr( {\n\t\t\t\t\t// We need to give each content block a unique id as that's\n\t\t\t\t\t// the only way we can tell screen readers what element we're\n\t\t\t\t\t// referring to via `aria-controls`.\n\t\t\t\t\tid\n\t\t\t\t} )\n\t\t\t\t.on( 'beforematch', () => self.toggle( $heading ) )\n\t\t\t\t.addClass( 'collapsible-block-js' )\n\t\t\t\t.get( 0 ).setAttribute( 'hidden', 'until-found' );\n\n\t\t\tenableKeyboardActions( self, $heading );\n\n\t\t\tif ( !self.isCollapsedByDefault() ) {\n\t\t\t\t// Expand sections by default on wide screen devices\n\t\t\t\t// or if the expand sections setting is set.\n\t\t\t\t// The wide screen logic for determining whether to collapse sections initially\n\t\t\t\t// should be kept in sync with mobileoptions#initLocalStorageElements().\n\t\t\t\tself.toggle( $heading );\n\t\t\t}\n\t\t}\n\t} );\n\n\t/**\n\t * Checks the existing hash and toggles open any section that contains the fragment.\n\t *\n\t * @method\n\t */\n\tfunction checkHash() {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tlet hash = window.location.hash;\n\t\tif ( hash.indexOf( '#' ) === 0 ) {\n\t\t\thash = hash.slice( 1 );\n\t\t\t// Per https://html.spec.whatwg.org/multipage/browsing-the-web.html#target-element\n\t\t\t// we try the raw fragment first, then the percent-decoded fragment.\n\t\t\tif ( !self.reveal( hash ) ) {\n\t\t\t\tconst decodedHash = mw.util.percentDecodeFragment( hash );\n\t\t\t\tif ( decodedHash ) {\n\t\t\t\t\tself.reveal( decodedHash );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks the value of wgInternalRedirectTargetUrl and sets the hash if present.\n\t * checkHash() will reveal the collapsed section that contains it afterwards.\n\t *\n\t * @method\n\t */\n\tfunction checkInternalRedirectAndHash() {\n\t\tconst internalRedirect = mw.config.get( 'wgInternalRedirectTargetUrl' ),\n\t\t\tinternalRedirectHash = internalRedirect ? internalRedirect.split( '#' )[1] : false;\n\n\t\tif ( internalRedirectHash ) {\n\t\t\t// eslint-disable-next-line no-restricted-properties\n\t\t\twindow.location.hash = internalRedirectHash;\n\t\t}\n\t}\n\n\tcheckInternalRedirectAndHash();\n\tcheckHash();\n\n\tutil.getWindow().on( 'hashchange', () => checkHash() );\n\n\tif ( this.isCollapsedByDefault() && this.page ) {\n\t\texpandStoredSections( this, this.$container, this.page );\n\t}\n};\n\nToggler._getExpandedSections = getExpandedSections;\nToggler._expandStoredSections = expandStoredSections;\n\nmodule.exports = Toggler;\n","const browser = require( './Browser' ).getSingleton();\n\n/**\n * Checks if sections should be collapsed by default.\n * @ignore\n *\n * @return {boolean}\n */\nfunction isCollapsedByDefault() {\n\treturn mw.config.get( 'wgMFCollapseSectionsByDefault' ) && !browser.isWideScreen() &&\n\t\t// Section collapsing can be disabled in MobilePreferences\n\t\t!document.documentElement.classList.contains(\n\t\t\t'mf-expand-sections-clientpref-1'\n\t\t);\n}\n\nmodule.exports = isCollapsedByDefault;\n","const isCollapsedByDefault = require( './isCollapsedByDefault' );\n\n/**\n * Sets attributes on collapsible elements based on collapsed state\n *\n * @method\n * @param {HTMLElement} container div element containing collapsible heading\n * @param {HTMLElement} headingText span element containing heading text\n * @param {HTMLElement} icon span element for icon\n * @param {boolean} isCollapsed collapsed state to set\n * @ignore\n */\nfunction setCollapsedState( content, headingText, icon, isCollapsed ) {\n\t// show the content if hidden, hide if shown (until found so find in page works)\n\tcontent.hidden = isCollapsed ? 'until-found' : false;\n\n\t// update the dropdown state based on the content visibility\n\tif ( isCollapsed ) {\n\t\theadingText.setAttribute( 'aria-expanded', 'true' );\n\t\ticon.classList.add( 'mf-icon-expand' );\n\t\ticon.classList.remove( 'mf-icon-collapse' );\n\t} else {\n\t\theadingText.setAttribute( 'aria-expanded', 'false' );\n\t\ticon.classList.add( 'mf-icon-collapse' );\n\t\ticon.classList.remove( 'mf-icon-expand' );\n\t}\n}\n\n/**\n * Toggles collapsible state for a heading\n *\n * @method\n * @param {HTMLElement} container div element containing collapsible heading\n * @param {HTMLElement} headingText span element containing heading text\n * @param {HTMLElement} icon span element for icon\n * @ignore\n */\nfunction toggle( content, headingText, icon ) {\n\tconst currentlyHidden = content.hidden;\n\tsetCollapsedState( content, headingText, icon, !currentlyHidden );\n}\n\n/**\n * Initialises collapsing code.\n *\n * @method\n * @param {HTMLElement} container to enable collapsing on\n * @ignore\n */\nfunction init( container ) {\n\tconst isCollapsed = isCollapsedByDefault();\n\tconst headingWrappers = Array.from( container.querySelectorAll( '.mw-parser-output > section > .mw-heading' ) );\n\theadingWrappers.forEach( ( wrapper ) => {\n\t\twrapper.classList.add( 'mf-collapsible-heading' );\n\t\tconst heading = wrapper.firstElementChild;\n\n\t\t// Add class to collapsible content\n\t\t// Used in CSS before hidden attribute is added\n\t\tconst content = wrapper.nextElementSibling;\n\t\tcontent.classList.add( 'mf-collapsible-content' );\n\n\t\t// Update the heading text to account for semantics of collapsing sections\n\t\tconst headingText = document.createElement( 'span' );\n\t\theadingText.textContent = heading.textContent;\n\t\theadingText.setAttribute( 'tabindex', '0' );\n\t\theadingText.setAttribute( 'role', 'button' );\n\t\theadingText.setAttribute( 'aria-controls', content.id );\n\n\t\t// Create the dropdown arrow\n\t\tconst icon = document.createElement( 'span' );\n\t\ticon.classList.add( 'mf-icon', 'mf-icon--small', 'mf-collapsible-icon' );\n\t\ticon.setAttribute( 'aria-hidden', true );\n\n\t\tsetCollapsedState( content, headingText, icon, isCollapsed );\n\n\t\t// Replace contents of the heading element\n\t\theading.innerHTML = '';\n\t\theading.append( icon );\n\t\theading.append( headingText );\n\n\t\t// Register the click handlers\n\t\theading.addEventListener( 'click', () => toggle( content, headingText, icon ) );\n\t} );\n}\n\nmodule.exports = { init };\n"],"names":["M","require","util","editorLoadingOverlay","OverlayManager","$editTab","$","hasTwoEditIcons","length","EDITSECTION_SELECTOR","user","mw","CtaDrawer","veConfig","config","get","editorPath","editorOverride","onEditLinkClick","elem","ev","router","section","getParamValue","href","id","navigate","preventDefault","getPreferredEditor","preferredEditor","options","storage","bindEditLinksSorryToast","msg","on","notify","hook","add","$content","find","addRoute","checkRoute","module","exports","currentPage","currentPageHTMLParser","skin","__non_webpack_require__","inNamespace","editRestrictions","isReadOnly","page","overlayManager","getSingleton","isNewPage","this","off","sectionId","abortableDataPromise","overlayPromise","scrollTop","window","pageYOffset","$contentText","url","URL","location","editorOptions","fakeScroll","api","Api","licenseMsg","getLicenseMsg","title","titleObj","isAnon","oldId","contentLang","attr","contentDir","preload","searchParams","preloadparams","getArrayParam","editintro","visualAbortPromise","Deferred","animationDelayDeferred","initMechanism","logInit","editor","track","action","type","mechanism","integration","editor_interface","shouldLoadVisualEditor","isVESourceAvailable","isVEVisualAvailable","loadSourceEditor","fire","loader","using","then","isWikiText","undefined","loadingOverlay","$sectionTop","enableVisualSectionEditing","document","body","addClass","$page","closest","prop","getBoundingClientRect","top","css","transform","setTimeout","resolve","abort","removeClass","reject","mode","dataPromise","libs","ve","targetLoader","requestPageData","getPrefixedDb","sessionStore","targetName","visualLoadingPromise","addPlugin","loadModules","visualPromise","VisualEditorOverlay","SourceEditorOverlay","loadVisualEditorMaybe","Promise","all","overlay","getLoadingPromise","catch","error","state","sourceOverlay","promise","overlayData","stack","replaceCurrent","apiResponse","back","show","appendChild","$el","getErrorMessage","i","editUrl","set","toString","getPath","fragment","history","pushState","delete","replaceState","docReady","setupEditor","hide","hideSectionEditIcons","Array","isArray","drawer","showLoginDrawer","content","signupQueryParams","warning","bindEditLinksLoginDrawer","$link","getUrl","message","parseDom","init","fakeToolbar","IconButton","Overlay","afterShow","afterHide","loadBasicEditor","timeout","$fakeToolbar","$loadBasicWrapper","loadBasicButton","label","weight","size","isIconOnly","icon","className","noHeader","isBorderBox","onBeforeExit","exit","clearTimeout","logFeatureUse","feature","prototype","call","append","text","lazyImageLoader","$container","HTMLElement","imagePlaceholders","queryPlaceholders","addEventListener","loadImages","observer","IntersectionObserver","entries","forEach","entry","placeholder","target","isIntersecting","loadImage","unobserve","rootMargin","threshold","observe","toggling","FONT_SIZE_KEY","SECTION_COLLAPSING_TOGGLE","lazyLoadedImages","$window","getWindow","Skin","eventBus","apply2","fn1","fn2","apply","arguments","debounce","emit","throttle","has","console","log","documentElement","classList","contains","clientPrefs","saveOption","remove","Toggler","sectionCollapsing","$contentContainer","prefix","querySelector","removeAttr","mfTempOpenSection","escapeSelector","arrowOptions","isSmall","additionalClassNames","Icon","isCollapsedByDefault","_enable","getExpandedSections","expandedSections","session","getObject","expandStoredSections","toggler","each","$headline","$sectionHeading","parents","hasClass","toggle","_isCollapsedByDefault","$override","$heading","fromSaved","self","wasExpanded","is","toggleClass","rotation","newIndicator","$indicatorElement","data","replaceWith","next","setAttribute","requestIdleCallback","expanded","headline","setObject","saveExpandedSections","storeSectionToggleState","reveal","$target","e","prev","scrollTo","offset","internalRedirect","internalRedirectHash","checkHash","hash","indexOf","slice","decodedHash","percentDecodeFragment","children","$headingLabel","$indicator","clickedLink","tabindex","role","indicator","prependTo","eq","which","stopPropagation","enableKeyboardActions","split","_getExpandedSections","_expandStoredSections","browser","isWideScreen","setCollapsedState","headingText","isCollapsed","hidden","container","from","querySelectorAll","wrapper","heading","firstElementChild","nextElementSibling","createElement","textContent","innerHTML"],"sourceRoot":""}