mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-11 07:16:08 +00:00
671c39ef4a
This adds support for preview popups on reference/footnotes from the Cite extension. For that a new preview type was introduced and integrated into the existing structures. The essential starting points were this code comes into action are added behind the feature flag introduced in the previous patches. Bug: T213415 Change-Id: Ie0ccb03117bd654373d0f458b62cc52018361c67
2 lines
39 KiB
JavaScript
2 lines
39 KiB
JavaScript
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/index.js")}({"./node_modules/redux-thunk/dist/redux-thunk.min.js":function(e,t,n){e.exports=function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t){"use strict";function n(e){return function(t){var n=t.dispatch,i=t.getState;return function(t){return function(r){return"function"==typeof r?r(n,i,e):t(r)}}}}t.__esModule=!0;var i=n();i.withExtraArgument=n,t.default=i}])},"./node_modules/redux/dist/redux.min.js":function(e,t,n){(function(e,n){!function(t){"use strict";var i=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:n),r=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+r(),REPLACE:"@@redux/REPLACE"+r(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+r()}};function a(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+n+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function s(e,t){return function(){return t(e.apply(this,arguments))}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}t.createStore=function e(t,n,r){var a;if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(e)(t,n)}if("function"!=typeof t)throw Error("Expected the reducer to be a function.");var s=t,u=n,c=[],p=c,l=!1;function d(){p===c&&(p=c.slice())}function f(){if(l)throw Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function g(e){if("function"!=typeof e)throw Error("Expected the listener to be a function.");if(l)throw Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return d(),p.push(e),function(){if(t){if(l)throw Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,d();var n=p.indexOf(e);p.splice(n,1)}}}function v(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw Error("Reducers may not dispatch actions.");try{l=!0,u=s(u,e)}finally{l=!1}for(var t=c=p,n=0;t.length>n;n++)(0,t[n])();return e}return v({type:o.INIT}),(a={dispatch:v,subscribe:g,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");s=e,v({type:o.REPLACE})}})[i]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[i]=function(){return this},e},a},t.combineReducers=function(e){for(var t=Object.keys(e),n={},i=0;t.length>i;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var s,u=Object.keys(n);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:o.INIT}))throw Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+o.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var i=!1,r={},o=0;u.length>o;o++){var c=u[o],p=e[c],l=(0,n[c])(p,t);if(void 0===l){var d=a(c,t);throw Error(d)}r[c]=l,i=i||l!==p}return i?r:e}},t.bindActionCreators=function(e,t){if("function"==typeof e)return s(e,t);if("object"!=typeof e||null===e)throw Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),i={},r=0;n.length>r;r++){var o=n[r],a=e[o];"function"==typeof a&&(i[o]=s(a,t))}return i},t.applyMiddleware=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),i=function(){throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=t.map(function(e){return e(r)});return function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){u(e,t,n[t])})}return e}({},n,{dispatch:i=c.apply(void 0,o)(n.dispatch)})}}},t.compose=c,t.__DO_NOT_USE__ActionTypes=o,Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,n("./node_modules/webpack/buildin/global.js"),n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./src/counts.js":function(e,t){t.getEditCountBucket=function(e){var t;return 0===e?t="0":e>=1&&e<=4?t="1-4":e>=5&&e<=99?t="5-99":e>=100&&e<=999?t="100-999":e>=1e3&&(t="1000+"),"".concat(t," edits")},t.getPreviewCountBucket=function(e){var t;return 0===e?t="0":e>=1&&e<=4?t="1-4":e>=5&&e<=20?t="5-20":e>=21&&(t="21+"),void 0!==t?"".concat(t," previews"):"unknown"}},"./src/index.js":function(e,t,n){"use strict";n.r(t);var i={};n.r(i),n.d(i,"boot",function(){return Oe}),n.d(i,"fetch",function(){return Ae}),n.d(i,"linkDwell",function(){return Le}),n.d(i,"abandon",function(){return Ne}),n.d(i,"linkClick",function(){return Ce}),n.d(i,"previewDwell",function(){return De}),n.d(i,"previewShow",function(){return Re}),n.d(i,"pageviewLogged",function(){return Ge}),n.d(i,"showSettings",function(){return je}),n.d(i,"hideSettings",function(){return He}),n.d(i,"saveSettings",function(){return We}),n.d(i,"eventLogged",function(){return Be}),n.d(i,"statsvLogged",function(){return Me});var r=n("./node_modules/redux/dist/redux.min.js"),o=n("./node_modules/redux-thunk/dist/redux-thunk.min.js"),a=n.n(o),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.devicePixelRatio;return e?e>1.5?2:e>1?1.5:1:1}(),u={BRACKETED_DEVICE_PIXEL_RATIO:s,THUMBNAIL_SIZE:320*s,EXTRACT_LENGTH:525},c={TYPE_GENERIC:"generic",TYPE_PAGE:"page",TYPE_DISAMBIGUATION:"disambiguation",TYPE_REFERENCE:"reference"};function p(e,t,n,i,r,o,a,s){var u=function(e){if(null==e||0===e.length)return;return e}(r);return{title:e,url:t,languageCode:n,languageDirection:i,extract:u,type:function(e,t){if(void 0===t)return c.TYPE_GENERIC;switch(e){case c.TYPE_GENERIC:case c.TYPE_DISAMBIGUATION:case c.TYPE_PAGE:case c.TYPE_REFERENCE:return e;default:return c.TYPE_PAGE}}(o,u),thumbnail:a,pageId:s}}function l(e,t){return p(e,t,"","",[],"")}var d=jQuery,f=mediaWiki;function g(e,t){var n=e;return void 0===e?[]:0===n.length?[]:n=function(e,t){var n=[],i="<bi-".concat(Math.random(),">"),r="<snip-".concat(Math.random(),">");t=t.replace(/\s+/g," ").trim();var o=f.RegExp.escape(t),a=new RegExp("(^|\\s)(".concat(o,")(|$)"),"i");return(e=(e=(e=e.replace(/\s+/," ")).replace(a,"$1".concat(r).concat(i,"$2").concat(r,"$3"))).split(r)).forEach(function(e){0===e.indexOf(i)?n.push(d("<b>").text(e.substring(i.length))):n.push(document.createTextNode(e))}),n}(n,t)}var v=300,h=jQuery;function w(e){if(e.query&&e.query.pages&&e.query.pages.length)return e.query.pages[0];throw new Error("API response `query.pages` is empty.")}function m(e){var t=h.extend({},e);return t.extract=g(e.extract,e.title),t}function E(e){return p(e.title,e.canonicalurl,e.pagelanguagehtmlcode,e.pagelanguagedir,e.extract,e.type,e.thumbnail,e.pageid)}var T="https://www.mediawiki.org/wiki/Specs/Summary/1.2.0",b=mediaWiki,y=jQuery;function _(e,t,n){function i(n){var i=t.endpoint;return e({url:i+encodeURIComponent(n),headers:{Accept:'application/json; charset=utf-8; profile="'.concat(T,'"'),"Accept-Language":t.acceptLanguage}})}return{fetch:i,convertPageToModel:I,getPageSummary:function(e){var r=e.getPrefixedDb(),o=i(r);return o.then(function(e){return e&&e.title||(e=y.extend(!0,e||{},{title:r})),void 0===e.extract&&(e.extract=""),I(e,t.THUMBNAIL_SIZE,n)}).catch(function(e,t,n){return y.Deferred().reject("http",{xhr:e,textStatus:t,exception:n})}).promise({abort:function(){o.abort()}})}}}function S(e,t,n){var i=e.source.split("/"),r=i[i.length-1],o=function(e){return new RegExp(/\.(jpg|jpeg|png|gif)$/i).test(e)}(t.source)||void 0,a=r.indexOf("px-");if(-1===a)return o&&t;var s,u,c=r.substr(a+3);return e.width>e.height?(s=n,u=Math.floor(n/e.width*e.height)):(s=Math.floor(n/e.height*e.width),u=n),s>=t.width&&-1===c.indexOf(".svg")?o&&t:(i[i.length-1]="".concat(s,"px-").concat(c),{source:i.join("/"),width:s,height:u})}function I(e,t,n){return p(e.title,new b.Title(e.title).getUrl(),e.lang,e.dir,n(e),e.type,e.thumbnail?S(e.thumbnail,e.originalimage,t):void 0,e.pageid)}function k(e){var t=e.extract_html;return 0===t.length?[]:$.parseHTML(t)}function x(e){return g(e.extract,e.title)}var P=mediaWiki,O=jQuery;function A(e){var t=O.extend({},u,{acceptLanguage:e.get("wgPageContentLanguage")}),n=O.extend({},t,{endpoint:e.get("wgPopupsRestGatewayEndpoint")});switch(e.get("wgPopupsGateway")){case"mwApiPlain":return function(e,t){function n(n){return e.get({action:"query",prop:"info|extracts|pageimages|revisions|info",formatversion:2,redirects:!0,exintro:!0,exchars:t.EXTRACT_LENGTH,explaintext:!0,piprop:"thumbnail",pithumbsize:t.THUMBNAIL_SIZE,pilicense:"any",rvprop:"timestamp",inprop:"url",titles:n,smaxage:v,maxage:v,uselang:"content"},{headers:{"X-Analytics":"preview=1","Accept-Language":t.acceptLanguage}})}return{fetch:n,extractPageFromResponse:w,convertPageToModel:E,getPageSummary:function(e){var t=n(e.getPrefixedDb());return t.then(function(e){return E(m(w(e)))}).promise({abort:function(){t.abort()}})},formatPlainTextExtract:m}}(new P.Api,t);case"restbasePlain":return _(O.ajax,n,x);case"restbaseHTML":return _(O.ajax,n,k);default:throw new Error("Unknown gateway")}}var L=mediaWiki,N=jQuery;var C="mwe-popups-enabled",D="ext.popups.core.previewCount";var R=mediaWiki;var G=mediaWiki;function j(e){return G.html.escape(e)}function H(e){var t=j(e.heading),n=j(e.saveLabel),i=j(e.closeLabel),r=j(e.helpText),o=j(e.okLabel),a=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){var t=e.id,n=e.name,i=e.description,r=e.isChecked;return{id:j(t),name:j(n),description:i?j(i):"",isChecked:r}})}(e.choices);return"\n\t\t<section id='mwe-popups-settings'>\n\t\t\t<header>\n\t\t\t\t<div>\n\t\t\t\t\t<div class='mw-ui-icon mw-ui-icon-element mw-ui-icon-popups-close close'>".concat(i,"</div>\n\t\t\t\t</div>\n\t\t\t\t<h1>").concat(t,"</h1>\n\t\t\t\t<div>\n\t\t\t\t\t<button class='save mw-ui-button mw-ui-progressive'>").concat(n,"</button>\n\t\t\t\t\t<button class='okay mw-ui-button mw-ui-progressive' style='display:none;'>").concat(o,"</button>\n\t\t\t\t</div>\n\t\t\t</header>\n\t\t\t<main id='mwe-popups-settings-form'>\n\t\t\t\t<form>\n\t\t\t\t\t").concat(a.map(function(e){var t=e.id,n=e.name,i=e.description,r=e.isChecked;return"\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tname='mwe-popups-setting'\n\t\t\t\t\t\t\t".concat(r?"checked":"","\n\t\t\t\t\t\t\tvalue='").concat(t,"'\n\t\t\t\t\t\t\ttype='radio'\n\t\t\t\t\t\t\tid='mwe-popups-settings-").concat(t,"'>\n\t\t\t\t\t\t<label for='mwe-popups-settings-").concat(t,"'>\n\t\t\t\t\t\t\t<span>").concat(n,"</span>\n\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</p>")}).join(""),"\n\t\t\t\t</form>\n\t\t\t</main>\n\t\t\t<div class='mwe-popups-settings-help' style='display:none;'>\n\t\t\t\t<div class=\"mw-ui-icon mw-ui-icon-element mw-ui-icon-footer\"></div>\n\t\t\t\t<p>").concat(r,"</p>\n\t\t\t</div>\n\t\t</section>\n\t").trim()}var W=mediaWiki;var B=jQuery;function M(){var e,t;return function(n){var i,r;return e||(i=F(),r=[{id:"simple",name:W.msg("popups-settings-option-simple"),description:W.msg("popups-settings-option-simple-description"),isChecked:!0},{id:"advanced",name:W.msg("popups-settings-option-advanced"),description:W.msg("popups-settings-option-advanced-description")},{id:"off",name:W.msg("popups-settings-option-off")}],i||r.splice(1,1),e=$($.parseHTML(H({heading:W.msg("popups-settings-title"),closeLabel:W.msg("popups-settings-cancel"),saveLabel:W.msg("popups-settings-save"),helpText:W.msg("popups-settings-help"),okLabel:W.msg("popups-settings-help-ok"),choices:r}))),t=B("<div>").addClass("mwe-popups-overlay"),e.find(".save").click(function(){var t="simple"===e.find("input[name=mwe-popups-setting]:checked, #mwe-popups-settings").val();n.saveSettings(t)}),e.find(".close, .okay").click(n.hideSettings)),{appendTo:function(n){t.appendTo(n),e.appendTo(t)},show:function(){t.show()},hide:function(){t.hide()},toggleHelp:function(e){!function(e,t){var n=B("#mwe-popups-settings");t?(n.find("main, .save, .close").hide(),n.find(".mwe-popups-settings-help, .okay").show()):(n.find("main, .save, .close").show(),n.find(".mwe-popups-settings-help, .okay").hide())}(0,e)},setEnabled:function(t){var n="off";t?n="simple":F()&&(n="advanced"),e.find("#mwe-popups-settings-".concat(n)).prop("checked",!0)}}}}function F(){return"undefined"!=typeof pg&&void 0!==pg.fn.disablePopups}function U(e,t){var n;e.subscribe(function(){var i=n;i!==(n=e.getState())&&t(i,n)})}var V=mediaWiki;function Y(e,t){return function(e,t){if(!e)return null;var n=V.Title.newFromText(e);return n&&t.indexOf(n.namespace)>=0?n:null}(function(e,t){var n,i=new RegExp(V.RegExp.escape(t.get("wgArticlePath")).replace("\\$1","(.+)"));try{n=new V.Uri(e)}catch(e){return}if(n.host===location.hostname){var r=Object.keys(n.query).length;if(!r){var o=i.exec(n.path);return o?decodeURIComponent(o[1]):void 0}return 1===r&&n.query.hasOwnProperty("title")?n.query.title:void 0}}(e.href,t),t.get("wgContentNamespaces"))}var K=jQuery;function X(e){var t=K.Deferred(),n=setTimeout(function(){t.resolve()},e);return t.catch(function(){return clearTimeout(n)}),t.promise({abort:function(){t.reject()}})}var Q=n("./src/ui/pointer-mask.svg"),q=n.n(Q),z={portraitImage:{h:250,w:203},landscapeImage:{h:200,w:320}},Z=jQuery;function J(e,t,n,i,r,o,a,s){var u="http://www.w3.org/2000/svg",c=document.createElementNS(u,"polyline"),p=-1===e.indexOf("not-tall")?[0,0,0,s]:[0,s-1,a,s-1];c.setAttribute("stroke","rgba(0,0,0,0.1)"),c.setAttribute("points",p.join(" ")),c.setAttribute("stroke-width",1);var l=Z(document.createElementNS(u,"image"));l[0].setAttributeNS("http://www.w3.org/1999/xlink","href",t),l.addClass(e).attr({x:n,y:i,width:r,height:o});var d=Z(document.createElementNS(u,"svg")).attr({xmlns:u,width:a,height:s}).append(l);return d.append(c),d}function ee(e,t){return"\n\t<div class='mwe-popups mwe-popups-type-".concat(e,"' role='tooltip' aria-hidden>\n\t\t<div class='mwe-popups-container'>").concat(t,"</div>\n\t</div>\n\t").trim()}function te(e,t,n,i){var r=e.title,o=e.url,a=e.type;return r=j(r),n=j(n),i=j(i),ee(a,"\n\t\t\t<div class='mw-ui-icon mw-ui-icon-element mw-ui-icon-preview-".concat(a,"'></div>\n\t\t\t").concat(t?"<strong class='mwe-popups-title'>".concat(r,"</strong>"):"","\n\t\t\t<a href='").concat(o,"' class='mwe-popups-extract'>\n\t\t\t\t<span class='mwe-popups-message'>").concat(n,"</span>\n\t\t\t</a>\n\t\t\t<footer>\n\t\t\t\t<a href='").concat(o,"' class='mwe-popups-read-link'>").concat(i,"</a>\n\t\t\t</footer>\n\t\t"))}var ne=mediaWiki;function ie(e){var t=j(e.title),n=ne.message("popups-refpreview-jump-to-reference").escaped();return ee(e.type,"\n\t\t\t".concat("<strong class='mwe-popups-title'>".concat(t,"</strong>"),"\n\t\t\t<div class='mwe-popups-extract'>\n\t\t\t\t<span class='mwe-popups-message'>").concat(e.extract,"</span>\n\t\t\t</div>\n\t\t\t<footer>\n\t\t\t\t<a href='").concat(e.url,"' class='mwe-popups-read-link'>").concat(n,"</a>\n\t\t\t</footer>\n\t\t"))}var re=mediaWiki,oe=jQuery,ae=215,se=oe(window),ue=450,ce=320,pe=8;function le(){var e;e=document.body,oe("<div>").attr("id","mwe-popups-svg").html(q.a).appendTo(e)}function de(e){var t=function(e){switch(e.type){case c.TYPE_PAGE:return function(e){var t=function(e){var t=u.BRACKETED_DEVICE_PIXEL_RATIO;if(!e)return null;var n,i,r,o,a=e.width<e.height,s=e.width/t,c=e.height/t;if(!a&&s<z.landscapeImage.w||a&&c<z.portraitImage.h||e.source.indexOf("\\")>-1||e.source.indexOf("'")>-1||e.source.indexOf('"')>-1)return null;a?(n=s>z.portraitImage.w?(s-z.portraitImage.w)/-2:z.portraitImage.w-s,i=c>z.portraitImage.h?(c-z.portraitImage.h)/-2:0,r=z.portraitImage.w,o=z.portraitImage.h,s<r&&(n=0,r=s)):(n=0,i=c>z.landscapeImage.h?(c-z.landscapeImage.h)/-2:0,r=z.landscapeImage.w,o=c>z.landscapeImage.h?z.landscapeImage.h:c);var p=a&&s<z.portraitImage.w;return{el:J(a?"mwe-popups-is-tall":"mwe-popups-is-not-tall",e.source,n,i,s,c,r,o),isTall:a,isNarrow:p,offset:p?z.portraitImage.w-s:0,width:s,height:c}}(e.thumbnail),n=null!==t,i=e.extract,r=oe(oe.parseHTML(function(e,t){var n=e.url,i=e.type,r=e.languageCode,o=e.languageDirection;return ee(i,"\n\t\t\t".concat(t?"<a href='".concat(n,"' class='mwe-popups-discreet'></a>"):"","\n\t\t\t<a dir='").concat(o,"' lang='").concat(r,"' class='mwe-popups-extract' href='").concat(n,"'></a>\n\t\t\t<footer>\n\t\t\t\t<a class='mwe-popups-settings-icon'>\n\t\t\t\t\t<span class=\"mw-ui-icon mw-ui-icon-element mw-ui-icon-popups-settings\"></span>\n\t\t\t\t</a>\n\t\t\t</footer>\n\t\t"))}(e,n)));n&&r.find(".mwe-popups-discreet").append(t.el);if(i){var o=function(e){return e&&e.isNarrow?"".concat(ae+e.offset,"px"):""}(t);r.find(".mwe-popups-extract").css("width",o).append(i),r.find("footer").css("width",o)}return{el:r,hasThumbnail:n,thumbnail:t,isTall:n&&t.isTall}}(e);case c.TYPE_DISAMBIGUATION:return function(e){var t=re.msg("popups-preview-disambiguation"),n=re.msg("popups-preview-disambiguation-link");return{el:oe(oe.parseHTML(te(e,!0,t,n))),hasThumbnail:!1,isTall:!1}}(e);case c.TYPE_REFERENCE:return function(e){return{el:oe(oe.parseHTML(ie(e))),hasThumbnail:!1,isTall:!1}}(e);default:return function(e){var t=re.msg("popups-preview-no-preview"),n=re.msg("popups-preview-footer-read");return{el:oe(oe.parseHTML(te(e,!1,t,n))),hasThumbnail:!1,isTall:!1}}(e)}}(e);return{show:function(e,n,i){return function(e,t,n,i,r,o,a){var s=function(e,t,n,i,r,o){var a=!1,s=!1,u=t.pageY?fe(t.pageY-i.scrollTop,n.clientRects,!1)+i.scrollTop+r:n.offset.top+n.height+r,c=t.pageX?t.pageX:n.offset.left,p=t.clientY?t.clientY:u;c>i.width/2&&(c+=t.pageX?0:n.width,c-=e?ue:ce,a=!0);t.pageX&&(c+=a?20:-20);p>i.height/2&&(s=!0,u=n.offset.top,t.pageY&&(u=fe(t.pageY-i.scrollTop,n.clientRects,!0)+i.scrollTop),u-=r);return{offset:{top:u,left:c},flippedX:"rtl"===o?!a:a,flippedY:s,dir:o}}(e.isTall,{pageX:t.pageX,pageY:t.pageY,clientY:t.clientY},{clientRects:n.get(0).getClientRects(),offset:n.offset(),width:n.width(),height:n.height()},{scrollTop:se.scrollTop(),width:se.width(),height:se.height()},pe,a);return e.el.appendTo(o),function(e,t,n,i,r){var o=e.el,a=e.isTall,s=e.hasThumbnail,u=e.thumbnail,c=t.flippedY,p=t.offset.top;!c&&!a&&s&&u.height<i&&o.find(".mwe-popups-extract").css("margin-top",u.height-r),o.addClass(n.join(" ")),c&&(p-=o.outerHeight()),o.css({top:p,left:"".concat(t.offset.left,"px")}),s&&function(e,t){var n=e.el,i=e.isTall,r=t.flippedY,o=t.flippedX,a=t.dir,s=function(e,t,n){return n&&!t?e?"mwe-popups-landscape-mask":"mwe-popups-mask-flip":t&&n&&e?"mwe-popups-landscape-mask-flip":t||e?void 0:"mwe-popups-mask"}(i,r,o);if(s){var u;if("rtl"===a){var c=i?z.portraitImage.w:z.landscapeImage.w;u="-1 0 0 1 ".concat(c," 0")}else u="1 0 0 1 0 0";var p=document.getElementById(s);p.setAttribute("transform","matrix(".concat(u,")")),n.find("image")[0].setAttribute("clip-path","url(#".concat(s,")"))}}(e,t)}(e,s,function(e,t){var n=[];return t.flippedY?n.push("mwe-popups-fade-in-down"):n.push("mwe-popups-fade-in-up"),t.flippedY&&t.flippedX?n.push("flipped-x-y"):t.flippedY?n.push("flipped-y"):t.flippedX&&n.push("flipped-x"),e.hasThumbnail&&(!e.isTall||t.flippedX)||t.flippedY||n.push("mwe-popups-no-image-pointer"),!e.hasThumbnail||e.isTall||t.flippedY||n.push("mwe-popups-image-pointer"),e.isTall?n.push("mwe-popups-is-tall"):n.push("mwe-popups-is-not-tall"),n}(e,s),z.landscapeImage.h,pe),e.el.show(),X(200).then(function(){!function(e,t){e.el.on("mouseenter",t.previewDwell).on("mouseleave",t.previewAbandon),e.el.click(t.click),e.el.find(".mwe-popups-settings-icon").attr("href",t.settingsUrl).click(function(e){e.stopPropagation(),t.showSettings(e)})}(e,i),i.previewShow(r)})}(t,e,oe(e.target),n,i,document.body,document.documentElement.getAttribute("dir"))},hide:function(){return function(e){var t=e.el.hasClass("mwe-popups-fade-in-up")?"mwe-popups-fade-in-up":"mwe-popups-fade-in-down",n="mwe-popups-fade-in-up"===t?"mwe-popups-fade-out-down":"mwe-popups-fade-out-up";return e.el.removeClass(t).addClass(n),X(150).then(function(){e.el.remove()})}(t)}}}function fe(e,t,n){var i,r=null;return Array.prototype.slice.call(t).forEach(function(t){var o=Math.abs(e-t.top+e-t.bottom);(null===r||r>o)&&(r=o,i=n?Math.floor(t.top):Math.ceil(t.bottom))}),i}var ge=mediaWiki,ve=jQuery;var he=jQuery;var we=jQuery;function me(e,t,n){return e[t]&&e[t][n]}function Ee(e,t,n,i,r){var o=me(t,n,i);e&&me(e,n,i)!==o&&r(o)}var Te={footerLink:function(e){var t;return function(n,i){void 0===t&&(t=function(){var e=ve("<li>").append(ve("<a>").attr("href","#").text(ge.message("popups-settings-enable").text()));e.hide();var t=ve("#footer-places, #f-list");return 0===t.length&&(t=ve("#footer li").parent()),t.append(e),e}()).click(function(t){t.preventDefault(),e.showSettings()}),i.settings.shouldShowFooterLink?t.show():t.hide()}},eventLogging:function(e,t,n){return function(i,r){var o=r.eventLogging,a=o.event;a&&(a=he.extend(!0,{},o.baseData,a,{timestamp:n()}),t("event.Popups",a),e.eventLogged(a))}},linkTitle:function(){var e;return function(t,n){var i,r=t&&t.preview.activeLink;n.preview.enabled&&(r&&t.preview.activeLink!==n.preview.activeLink&&(i=t.preview.activeLink,we(i).attr("title",e),e=void 0),n.preview.activeLink&&function(t){var n=we(t);e||(e=n.attr("title"),n.attr("title",""))}(n.preview.activeLink))}},pageviews:function(e,t){return function(n,i){var r;i.pageviews&&i.pageviews.pageview&&i.pageviews.page&&(r=i.pageviews.page,t("event.VirtualPageView",$.extend({},{source_page_id:r.id,source_namespace:r.namespaceId,source_title:r.title,source_url:r.url},i.pageviews.pageview)),e.pageviewLogged())}},render:function(e){var t;return function(n,i){i.preview.shouldShow&&!t?(t=de(i.preview.fetchResponse)).show(i.preview.activeEvent,e,i.preview.activeToken):!i.preview.shouldShow&&t&&(t.hide(),t=void 0)}},settings:function(e,t){var n;return function(i,r){i&&(!1===i.settings.shouldShow&&!0===r.settings.shouldShow?(n||(n=t(e)).appendTo(document.body),n.setEnabled(r.preview.enabled),n.show()):!0===i.settings.shouldShow&&!1===r.settings.shouldShow&&n.hide(),i.settings.showHelp!==r.settings.showHelp&&n.toggleHelp(r.settings.showHelp))}},statsv:function(e,t){return function(n,i){var r=i.statsv;r.action&&(t(r.action,r.data),e.statsvLogged())}},syncUserSettings:function(e){return function(t,n){Ee(t,n,"eventLogging","previewCount",e.setPreviewCount),Ee(t,n,"preview","enabled",e.setIsEnabled)}}},be={BOOT:"BOOT",LINK_DWELL:"LINK_DWELL",ABANDON_START:"ABANDON_START",ABANDON_END:"ABANDON_END",LINK_CLICK:"LINK_CLICK",FETCH_START:"FETCH_START",FETCH_END:"FETCH_END",FETCH_COMPLETE:"FETCH_COMPLETE",FETCH_FAILED:"FETCH_FAILED",FETCH_ABORTED:"FETCH_ABORTED",PAGEVIEW_LOGGED:"PAGEVIEW_LOGGED",PREVIEW_DWELL:"PREVIEW_DWELL",PREVIEW_SHOW:"PREVIEW_SHOW",PREVIEW_CLICK:"PREVIEW_CLICK",PREVIEW_SEEN:"PREVIEW_SEEN",SETTINGS_SHOW:"SETTINGS_SHOW",SETTINGS_HIDE:"SETTINGS_HIDE",SETTINGS_CHANGE:"SETTINGS_CHANGE",EVENT_LOGGED:"EVENT_LOGGED",STATSV_LOGGED:"STATSV_LOGGED"},ye=jQuery,_e=mediaWiki,Se=150,Ie=1e3,ke=350+Se,xe=300;function Pe(e){return e.timestamp=_e.now(),e}function Oe(e,t,n,i,r){var o=i.get("wgUserEditCount"),a=n.getPreviewCount();return{type:be.BOOT,isEnabled:e,isNavPopupsEnabled:i.get("wgPopupsConflictsWithNavPopupGadget"),sessionToken:t.sessionId(),pageToken:t.getPageviewToken(),page:{url:r,title:i.get("wgTitle"),namespaceId:i.get("wgNamespaceNumber"),id:i.get("wgArticleId")},user:{isAnon:t.isAnon(),editCount:o,previewCount:a}}}function Ae(e,t,n,i){var r=t.getPrefixedDb(),o=t.namespace;return function(a){var s=e.getPageSummary(t);a(Pe({type:be.FETCH_START,el:n,title:r,namespaceId:o,promise:s}));var u=s.then(function(e){return a(Pe({type:be.FETCH_END,el:n})),e}).catch(function(e,t){var i=new Error(e),r=t&&t.textStatus&&"abort"===t.textStatus?be.FETCH_ABORTED:be.FETCH_FAILED;throw i.data=t,a({type:r,el:n}),i});return ye.when(u,X(ke-Se)).then(function(e){a({type:be.FETCH_COMPLETE,el:n,result:e,token:i})}).catch(function(e){var o=e.data,s=!0;o&&o.xhr&&0===o.xhr.readyState&&(s=!("error"===o.textStatus&&""===o.exception||"abort"===o.textStatus));s&&a({type:be.FETCH_COMPLETE,el:n,result:l(r,t.getUrl()),token:i})})}}function Le(e,t,n,i,r){var o=r(),a=e.getPrefixedDb(),s=e.namespace;return function(r,u){var c=X(Se),p=Pe({type:be.LINK_DWELL,el:t,event:n,token:o,title:a,namespaceId:s,promise:c});function l(){return u().preview.activeToken===o}return r(p),l()?c.then(function(){if(u().preview.enabled&&l())return r(Ae(i,e,t,o))}):ye.Deferred().resolve().promise()}}function Ne(){return function(e,t){var n=t().preview,i=n.activeToken,r=n.promise;return i?(r.abort(),e(Pe({type:be.ABANDON_START,token:i})),X(xe).then(function(){e({type:be.ABANDON_END,token:i})})):ye.Deferred().resolve().promise()}}function Ce(e){return Pe({type:be.LINK_CLICK,el:e})}function De(){return{type:be.PREVIEW_DWELL}}function Re(e){return function(t,n){return t(Pe({type:be.PREVIEW_SHOW,token:e})),X(Ie).then(function(){var i=n().preview,r=i&&i.fetchResponse,o=i&&i.activeToken,a=r&&[c.TYPE_PAGE,c.TYPE_DISAMBIGUATION].indexOf(r.type)>-1;o&&o===e&&r&&a&&t({type:be.PREVIEW_SEEN,title:r.title,pageId:r.pageId,namespace:0})})}}function Ge(){return{type:be.PAGEVIEW_LOGGED}}function je(){return{type:be.SETTINGS_SHOW}}function He(){return{type:be.SETTINGS_HIDE}}function We(e){return function(t,n){t({type:be.SETTINGS_CHANGE,wasEnabled:n().preview.enabled,enabled:e})}}function Be(e){return{type:be.EVENT_LOGGED,event:e}}function Me(){return{type:be.STATSV_LOGGED}}function Fe(e,t){var n={};for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(n[i]=e[i]);for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}var Ue=n("./src/counts.js");function Ve(e,t){return t.linkInteractionToken=e.token,t.pageTitleHover=e.title,t.namespaceIdHover=e.namespaceId,void 0!==e.timeToPreviewShow&&(t.previewType=e.previewType,t.perceivedWait=e.timeToPreviewShow),t}function Ye(e){var t={totalInteractionTime:Math.round(e.finished-e.started)};if(!e.finalized)return t.action=e.timeToPreviewShow?"dismissed":"dwelledButAbandoned",Ve(e,t)}var Ke={eventLogging:function(e,t){var n,i,r,o;if(void 0===e&&(e={previewCount:void 0,baseData:{},interaction:void 0,event:void 0}),-1!==[be.FETCH_COMPLETE,be.ABANDON_END,be.PREVIEW_SHOW].indexOf(t.type)&&(!e.interaction||t.token!==e.interaction.token))return e;if(!e.interaction&&t.type!==be.BOOT&&t.type!==be.LINK_DWELL&&t.type!==be.EVENT_LOGGED&&t.type!==be.SETTINGS_CHANGE)return e;switch(t.type){case be.BOOT:return Fe(e,{previewCount:t.user.previewCount,baseData:(r=t,o={pageTitleSource:r.page.title,namespaceIdSource:r.page.namespaceId,pageIdSource:r.page.id,isAnon:r.user.isAnon,popupEnabled:r.isEnabled,pageToken:r.pageToken,sessionToken:r.sessionToken,previewCountBucket:Ue.getPreviewCountBucket(r.user.previewCount),hovercardsSuppressedByGadget:r.isNavPopupsEnabled},r.user.isAnon||(o.editCountBucket=Ue.getEditCountBucket(r.user.editCount)),o),event:{action:"pageLoaded"}});case be.EVENT_LOGGED:return i=Fe(e,{event:void 0}),t.event.linkInteractionToken&&e.interaction&&t.event.linkInteractionToken===e.interaction.token&&(i.interaction=void 0),i;case be.FETCH_COMPLETE:return Fe(e,{interaction:Fe(e.interaction,{previewType:t.result.type})});case be.PREVIEW_SHOW:return Fe(e,{previewCount:n=e.previewCount+1,baseData:Fe(e.baseData,{previewCountBucket:Ue.getPreviewCountBucket(n)}),interaction:Fe(e.interaction,{timeToPreviewShow:Math.round(t.timestamp-e.interaction.started)})});case be.LINK_DWELL:return e.interaction&&t.el===e.interaction.link?Fe(e,{interaction:Fe(e.interaction,{isUserDwelling:!0})}):Fe(e,{interaction:{link:t.el,title:t.title,namespaceId:t.namespaceId,token:t.token,started:t.timestamp,isUserDwelling:!0},event:e.interaction?Ye(e.interaction):void 0});case be.PREVIEW_DWELL:return Fe(e,{interaction:Fe(e.interaction,{isUserDwelling:!0})});case be.LINK_CLICK:return Fe(e,{interaction:Fe(e.interaction,{finalized:!0}),event:Ve(e.interaction,{action:"opened",totalInteractionTime:Math.round(t.timestamp-e.interaction.started)})});case be.ABANDON_START:return Fe(e,{interaction:Fe(e.interaction,{finished:t.timestamp,isUserDwelling:!1})});case be.ABANDON_END:return e.interaction.isUserDwelling?e:Fe(e,{interaction:void 0,event:Ye(e.interaction)});case be.SETTINGS_SHOW:return Fe(e,{event:Ve(e.interaction,{action:"tapped settings cog"})});case be.SETTINGS_CHANGE:return t.wasEnabled&&!t.enabled?Fe(e,{event:{action:"disabled",popupEnabled:!1}}):e;default:return e}},pageviews:function(e,t){switch(void 0===e&&(e={pageview:void 0}),t.type){case be.BOOT:return Fe(e,{page:t.page});case be.PAGEVIEW_LOGGED:return Fe(e,{pageview:void 0});case be.PREVIEW_SEEN:return Fe(e,{pageview:{page_title:t.title,page_id:t.pageId,page_namespace:t.namespace}});default:return e}},preview:function(e,t){switch(void 0===e&&(e={enabled:void 0,activeLink:void 0,activeEvent:void 0,activeToken:"",shouldShow:!1,isUserDwelling:!1}),t.type){case be.BOOT:return Fe(e,{enabled:t.isEnabled});case be.SETTINGS_CHANGE:return Fe(e,{enabled:t.enabled});case be.LINK_DWELL:return t.el!==e.activeLink?Fe(e,{activeLink:t.el,activeEvent:t.event,activeToken:t.token,shouldShow:!1,isUserDwelling:!0,promise:t.promise}):Fe(e,{isUserDwelling:!0});case be.ABANDON_END:return t.token!==e.activeToken||e.isUserDwelling?e:Fe(e,{activeLink:void 0,activeToken:void 0,activeEvent:void 0,fetchResponse:void 0,shouldShow:!1});case be.PREVIEW_DWELL:return Fe(e,{isUserDwelling:!0});case be.ABANDON_START:return Fe(e,{isUserDwelling:!1});case be.FETCH_START:return Fe(e,{fetchResponse:void 0,promise:t.promise});case be.FETCH_COMPLETE:if(t.token===e.activeToken)return Fe(e,{fetchResponse:t.result,shouldShow:e.isUserDwelling});default:return e}},settings:function(e,t){switch(void 0===e&&(e={shouldShow:!1,showHelp:!1,shouldShowFooterLink:!1}),t.type){case be.SETTINGS_SHOW:return Fe(e,{shouldShow:!0,showHelp:!1});case be.SETTINGS_HIDE:return Fe(e,{shouldShow:!1,showHelp:!1});case be.SETTINGS_CHANGE:return t.wasEnabled===t.enabled?Fe(e,{shouldShow:!1}):Fe(e,{shouldShow:!t.enabled,showHelp:!t.enabled,shouldShowFooterLink:!t.enabled});case be.BOOT:return Fe(e,{shouldShowFooterLink:t.user.isAnon&&!t.isEnabled});default:return e}},statsv:function(e,t){switch(e=e||{},t.type){case be.FETCH_START:return Fe(e,{fetchStartedAt:t.timestamp});case be.FETCH_END:return Fe(e,{action:"timing.PagePreviewsApiResponse",data:t.timestamp-e.fetchStartedAt});case be.FETCH_FAILED:return Fe(e,{action:"counter.PagePreviewsApiFailure",data:1});case be.LINK_DWELL:return Fe(e,{linkDwellStartedAt:t.timestamp});case be.PREVIEW_SHOW:return Fe(e,{action:"timing.PagePreviewsPreviewShow",data:t.timestamp-e.linkDwellStartedAt});case be.STATSV_LOGGED:return Fe(e,{action:null,data:null});default:return e}}};var Xe=mediaWiki;function Qe(e){var t,n,i,r=e;return r.source_title=Xe.Title.newFromText(e.source_title).getPrefixedDb(),r.page_title=Xe.Title.newFromText(e.page_title).getPrefixedDb(),r.source_url=(t=e.source_url,n=1e3,i="",t.split("").every(function(e){return encodeURIComponent(i+e).length<n&&(i+=e)}),i),r}var $e=function(e,t,n,i){return e.get("wgPopupsVirtualPageViews")?function(e,r){var o,a=(o=e.slice(e.indexOf(".")+1))[0].toUpperCase()+o.slice(1),s=["ext.eventLogging","schema.".concat(a)];return t(s).then(function(){var e=n(),t=e.prepare(a,Qe(r)),o=e.makeBeaconUrl(t);i(o)})}:function(){}},qe=mediaWiki,ze=jQuery,Ze=[".extiw",".image",".new",".internal",".external",".mw-cite-backlink a",".oo-ui-buttonedElement-button",".cancelLink a"];function Je(){return window.performance&&window.performance.now?Math.round(window.performance.now()):null}!function(){var e,t,n,o=r.compose,s=qe.user.generateRandomSessionId,u=A(qe.config),p={getPageSummary:function(e){var t=e.getFragment();return N.Deferred().resolve({title:L.message("popups-refpreview-footnote").text(),url:"#".concat(t),extract:N("#".concat(t," .reference-text")).html(),type:c.TYPE_REFERENCE}).promise({abort:function(){}})}},l=(n=qe.storage,{getIsEnabled:function(){return"0"!==n.get(C)},setIsEnabled:function(e){n.set(C,e?"1":"0")},hasIsEnabled:function(){var e=n.get(C);return!1!==Boolean(e)},getPreviewCount:function(){var e=n.get(D);if(!1===e)return-1;if(null===e)return 0;var t=parseInt(e,10);return isNaN(t)&&(t=0,this.setPreviewCount(t)),t},setPreviewCount:function(e){n.set(D,e.toString())}}),d=M(),f=(t=qe.experiments,{weightedBoolean:function(e,n,i){return"true"===t.getBucket({enabled:!0,name:e,buckets:{true:n,false:1-n}},i)}}),g=function(e,t,n){return function(e,t,n){var i=t.get("wgPopupsStatsvSamplingRate",0);return n.weightedBoolean("ext.Popups.statsv",i,e.sessionId())}(e,t,n)?qe.track:function(){}}(qe.user,qe.config,f),v=$e(qe.config,qe.loader.using,function(){return qe.eventLog},(e=window.navigator).sendBeacon?e.sendBeacon.bind(e):function(e){document.createElement("img").src=e}),h=function(e,t,n){return function(e,t,n){return!0===t.get("debug")||!!t.get("wgPopupsEventLogging")&&!(!n.navigator||!n.navigator.sendBeacon)&&e.isAnon()}(e,t,n)?qe.track:function(){}}(qe.user,qe.config,window),w=function(e,t,n){return!n.get("wgPopupsConflictsWithNavPopupGadget")&&(e.isAnon()?!t.hasIsEnabled()||t.getIsEnabled():n.get("wgPopupsShouldSendModuleToUser"))}(qe.user,l,qe.config);!0===qe.config.get("debug")&&(o=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||o);var m=r.createStore(r.combineReducers(Ke),o(r.applyMiddleware(a.a))),E=r.bindActionCreators(i,m.dispatch),T=function(e,t){var n,i=function(){};e.isAnon()?i=function(e){e.preventDefault(),t.showSettings()}:n=R.Title.newFromText("Special:Preferences#mw-prefsection-rendering").getUrl();return{settingsUrl:n,showSettings:i,previewDwell:t.previewDwell,previewAbandon:t.abandon,previewShow:t.previewShow,click:t.linkClick}}(qe.user,E);!function(e,t,n,i,r,o,a,s,u){U(e,Te.footerLink(t)),U(e,Te.linkTitle()),U(e,Te.render(r)),U(e,Te.statsv(t,o)),U(e,Te.syncUserSettings(n)),U(e,Te.settings(t,i)),U(e,Te.eventLogging(t,a,u)),U(e,Te.pageviews(t,s))}(m,E,l,d,T,g,h,v,Je),E.boot(w,qe.user,l,qe.config,window.location.href),qe.popups=function(e){return{isEnabled:function(){return e.getState().preview.enabled}}}(m);var b=Ze.join(", "),y="#mw-content-text a[href][title]:not(".concat(b,")");qe.config.get("wgPopupsReferencePreviews")&&(y+=", .reference > a[href]"),le(),ze(document).on("mouseover keyup",y,function(e){var t=Y(this,qe.config),n=u;if(qe.config.get("wgPopupsReferencePreviews")&&ze(e.target).parent().hasClass("reference")){try{t.fragment=new qe.Uri(e.target.href).fragment}catch(e){return}n=p}t&&E.linkDwell(t,this,e,n,s)}).on("mouseout blur",y,function(){Y(this,qe.config)&&E.abandon(this)}).on("click",y,function(){Y(this,qe.config)&&E.linkClick(this)})}(),window.Redux=r,window.ReduxThunk=o},"./src/ui/pointer-mask.svg":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0"><defs><clippath id="mwe-popups-mask"><polygon points="0 8, 10 8, 18 0, 26 8, 1000 8, 1000 1000, 0 1000"></polygon></clippath><clippath id="mwe-popups-mask-flip"><polygon points="0 8, 274 8, 282 0, 290 8, 1000 8, 1000 1000, 0 1000"></polygon></clippath><clippath id="mwe-popups-landscape-mask"><polygon points="0 8, 174 8, 182 0, 190 8, 1000 8, 1000 1000, 0 1000"></polygon></clippath><clippath id="mwe-popups-landscape-mask-flip"><polygon points="0 0, 1000 0, 1000 242, 190 242, 182 250, 174 242, 0 242"></polygon></clippath></defs></svg>'}});
|
|
//# sourceMappingURL=index.js.map.json
|