mw.loader.impl(function(){return["ext.relatedArticles.readMore@1l03k",{"main":"index.js","files":{"index.js":function(require,module,exports){const RelatedArticles=require('./RelatedArticles.js');const data=require('./data.json');const RelatedPagesGateway=require('./RelatedPagesGateway.js');const relatedPages=new RelatedPagesGateway(new mw.Api({ajax:{url:data.searchUrl}}),mw.config.get('wgPageName'),mw.config.get('wgRelatedArticles'),data.useCirrusSearch,data.onlyUseCirrusSearch,data.descriptionSource);const LIMIT=mw.config.get('wgRelatedArticlesCardLimit',3);function getCards(pages){return pages.map(function(page){const result={id:page.title,label:page.title,url:mw.util.getUrl(page.title),thumbnail:page.thumbnail?{width:page.thumbnail.width,height:page.thumbnail.height,url:page.thumbnail.source}:undefined,description:(page.description||page.extract||(page.pageprops?page.pageprops.description:''))};return result;});}function render(pages,el,heading,isContainerSmall){el.innerHTML=RelatedArticles({isContainerSmall,heading,cards:getCards(pages)});}function init(container){relatedPages.getForCurrentPage(LIMIT).then((pages)=>{if( pages.length){render(pages,container,mw.msg('relatedarticles-read-more-heading'),false);}else if(container.parentNode){container.parentNode.removeChild(container);}});}module.exports={init,render,getCards,test:{relatedPages}}; },"RelatedPagesGateway.js":function(require,module,exports){function RelatedPagesGateway(api,currentPage,editorCuratedPages,useCirrusSearch,onlyUseCirrusSearch,descriptionSource){this.api=api;this.currentPage=currentPage;this.useCirrusSearch=useCirrusSearch;this.descriptionSource=descriptionSource;if(onlyUseCirrusSearch){editorCuratedPages=[];}this.editorCuratedPages=editorCuratedPages||[];}const toPromise=(jQP)=>new Promise((resolve,reject)=>{jQP.then((pages)=>resolve(pages),(e)=>reject(e));});function getPages(result){return result&&result.query&&result.query.pages?result.query.pages:[];}RelatedPagesGateway.prototype.getPagesFromApi=function(params){const parameters=Object.assign({formatversion:2,origin:'*',prop:'pageimages',piprop:'thumbnail',pithumbsize:160},params);switch(this.descriptionSource){case'wikidata':parameters.prop+='|description';break;case'textextracts':parameters.prop+='|extracts';parameters.exsentences='1';parameters.exintro='1';parameters.explaintext='1';break;case'pagedescription':parameters.prop+='|pageprops';parameters. ppprop='description';break;}return toPromise(this.api.get(parameters).then(getPages));};RelatedPagesGateway.prototype.getPages=function(titles){return this.getPagesFromApi({action:'query',pilimit:titles.length,continue:'',titles});};RelatedPagesGateway.prototype.getForCurrentPage=function(limit){const relatedPages=this.editorCuratedPages.slice(0,limit);if(relatedPages.length){return this.getPages(relatedPages);}else if(this.useCirrusSearch){const parameters=({action:'query'});parameters.pilimit=limit;parameters.generator='search';parameters.gsrsearch=`morelike:${this.currentPage}`;parameters.gsrnamespace='0';parameters.gsrlimit=limit;parameters.gsrqiprofile='classic_noboostlinks';parameters.uselang='content';parameters.smaxage=86400;parameters.maxage=86400;return this.getPagesFromApi(parameters).then((pages)=>Promise.resolve(pages));}else{return Promise.resolve([]);}};module.exports=RelatedPagesGateway; },"data.json":{"searchUrl":"/w/api.php","useCirrusSearch":false,"onlyUseCirrusSearch":false,"descriptionSource":"wikidata"},"RelatedArticles.js":function(require,module,exports){const RelatedArticles=(options)=>{return[`
`].join('\n');};module.exports=RelatedArticles; }}},{"css":[".read-more-container-heading{color:var(--color-subtle);border-bottom:0;padding-bottom:0.5em;font-size:0.8em;font-weight:normal;letter-spacing:1px;text-transform:uppercase}.read-more-container-card-list{font-size:1em;list-style:none;display:grid;row-gap:10px}.read-more-container-card-list li{margin-bottom:0}.read-more-container-card-list a,.read-more-container-card-list a:hover{color:inherit;text-decoration:none}.read-more-container-card-list a:hover .cdx-card{box-shadow:0 1px 1px rgba(0,0,0,0.1)}@supports (display:grid){@media all and (min-width:1000px){.read-more-container-card-list{grid-template-columns:repeat(3,1fr);column-gap:10px}.read-more-container-card-list .read-more-container-card{width:100%}.read-more-container-card-list .cdx-card{height:100%;box-sizing:border-box}}}.cdx-icon{color:var(--color-base);display:inline-flex;align-items:center;justify-content:center;vertical-align:text-bottom}.cdx-icon svg{fill:currentcolor;width:100%;height:100%}.cdx-icon--x-small{min-width:12px;min-height:12px;width:.75em;height:.75em}.cdx-icon--small{min-width:16px;min-height:16px;width:1em;height:1em}.cdx-icon--medium{min-width:20px;min-height:20px;width:1.25em;height:1.25em}.cdx-icon--flipped svg{transform:scaleX(-1)}.cdx-thumbnail{display:inline-flex}.cdx-thumbnail__placeholder,.cdx-thumbnail__image{background-position:center;background-repeat:no-repeat;background-size:cover;flex-shrink:0;box-sizing:border-box;min-width:40px;min-height:40px;width:2.5em;height:2.5em;border:var(--border-subtle);border-radius:2px}.cdx-thumbnail__image{display:inline-block}.cdx-thumbnail__image-enter-active{transition-property:opacity;transition-duration:.1s}.cdx-thumbnail__image-enter-from{opacity:0}.cdx-thumbnail__placeholder{background-color:var(--background-color-interactive-subtle);display:inline-flex;align-items:center;justify-content:center}.cdx-thumbnail__placeholder__icon{min-width:20px;min-height:20px;width:1.25em;height:1.25em;display:inline-block;vertical-align:text-bottom}@supports not (((-webkit-mask-image:none) or (mask-image:none))){.cdx-thumbnail__placeholder__icon{background-position:center;background-repeat:no-repeat;background-size:max(1.25em,20px)}}@supports ((-webkit-mask-image:none) or (mask-image:none)){.cdx-thumbnail__placeholder__icon{-webkit-mask-size:max(1.25em,20px);mask-size:max(1.25em,20px);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}}@supports not (((-webkit-mask-image:none) or (mask-image:none))){.cdx-thumbnail__placeholder__icon{background-image:url(\"data:image/svg+xml;utf8,\u003Csvg xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\" fill=\\\"%23000000\\\"\u003E\u003Cpath d=\\\"M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z\\\"/\u003E\u003Cpath d=\\\"M19 5H1V3h18zm0 12H1v-2h18z\\\"/\u003E\u003C/svg\u003E\");filter:invert(var(--filter-invert-icon));opacity:var(--opacity-icon-base)}.cdx-button:not(.cdx-button--weight-quiet):disabled .cdx-thumbnail__placeholder__icon,.cdx-button--weight-primary.cdx-button--action-progressive .cdx-thumbnail__placeholder__icon,.cdx-button--weight-primary.cdx-button--action-destructive .cdx-thumbnail__placeholder__icon{filter:invert(var(--filter-invert-primary-button-icon))}}@supports ((-webkit-mask-image:none) or (mask-image:none)){.cdx-thumbnail__placeholder__icon{-webkit-mask-image:url(\"data:image/svg+xml;utf8,\u003Csvg xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\" fill=\\\"%23000000\\\"\u003E\u003Cpath d=\\\"M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z\\\"/\u003E\u003Cpath d=\\\"M19 5H1V3h18zm0 12H1v-2h18z\\\"/\u003E\u003C/svg\u003E\");mask-image:url(\"data:image/svg+xml;utf8,\u003Csvg xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\" fill=\\\"%23000000\\\"\u003E\u003Cpath d=\\\"M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z\\\"/\u003E\u003Cpath d=\\\"M19 5H1V3h18zm0 12H1v-2h18z\\\"/\u003E\u003C/svg\u003E\");background-color:var(--color-placeholder)}}.cdx-thumbnail__placeholder__icon--vue.cdx-icon{color:var(--color-placeholder)}.cdx-card{background-color:var(--background-color-base);display:flex;align-items:flex-start;position:relative;border:var(--border-base);border-radius:2px;padding:12px}.cdx-card--is-link{transition-property:background-color,color,border-color,box-shadow;transition-duration:.1s}.cdx-card--is-link,.cdx-card--is-link:hover,.cdx-card--is-link:focus{text-decoration:none}.cdx-card--is-link:hover{border-color:var(--border-color-interactive)}.cdx-card--is-link:focus{border-color:var(--border-color-progressive--focus);box-shadow:inset 0 0 0 1px var(--box-shadow-color-progressive--focus),inset 0 0 0 2px var(--box-shadow-color-inverted);outline:1px solid transparent}.cdx-card--title-only{align-items:center}.cdx-card__text{display:flex;flex-direction:column;line-height:1.5714285;word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.cdx-card__text__title{color:var(--color-base);font-weight:700;line-height:1.4285714}.cdx-card__text__description,.cdx-card__text__supporting-text,.cdx-card__text__description .cdx-icon,.cdx-card__text__supporting-text .cdx-icon{color:var(--color-subtle)}.cdx-card__text__description{margin-top:4px}.cdx-card__text__supporting-text{margin-top:8px;font-size:.875em}.cdx-card__thumbnail.cdx-thumbnail{margin-right:12px}.cdx-card__thumbnail.cdx-thumbnail .cdx-thumbnail__placeholder,.cdx-card__thumbnail.cdx-thumbnail .cdx-thumbnail__image{width:3em;height:3em}.cdx-card .cdx-card__icon{color:inherit;margin-right:12px}"]},{"relatedarticles-read-more-heading":"Relaterade sidor"}];}); mw.loader.state({"ext.relatedArticles.cards":"missing","ext.relatedArticles.lib":"missing"});