PageSourceSearch

https://www.migrationsverket.se/sitevision/system-resource/fa3103f…08cb6ac8252ed260d1363/js/archive-plugins.js

js migrationsverket.se collected 2026-10-02 02:25:33 UTC 5,340 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_sv_portlet=self.webpackChunk_sv_portlet||[]).push([[1727],{992:function(t,e,n){var i=n(7809),a=n.n(i),r=n(6751),o=n.n(r),c=n(6237);a()(".sv-archive-portlet").on("click",".sv-create-article-entry",(function(){const t=a()(this),e=t.data("archive-id"),n=t.data("template-id"),i=t.parent(),o=a()("<div>").addClass("sv-loading-icon").text(r.i18n.getText("portlet.archive.archive","creatingArticle"));return i.empty().append(o),r.Ajax.doPost({url:(0,c.L9)({objectId:e,contextNodeId:e,modelHandler:"article"}),data:{template:n,portletType:"archive"},success:function(t){window.location.href=`/edit/${t.nodeId}`}}),!1})),a()(".sv-archive-portlet").length&&o().Events.trigger(o().Events.types.updateLikables),a()(".sv-archive-portlet").on("click","[data-fn-comment]",(t=>{const e=a()(t.currentTarget);return Promise.all([n.e(356),n.e(6301),n.e(2527),n.e(1727)]).then(n.bind(n,1337)).then((({initComment:t})=>{t(e)})),!1}))},7787:function(t,e,n){n.r(e);n(992)},1337:function(t,e,n){n.r(e),n.d(e,{initComment:function(){return u}});var i=n(7809),a=n.n(i),r=n(6751),o=n.n(r),c=n(6237),d=n(5143);const s={triggers:{"@":{source:(0,c.xb)(o().PageContext.pageId,"userIdentitySearch",o().PageContext.pageId),searchKey:"term",allowWhiteSpace:!0,maxWhiteSpace:2,parse:t=>t.hits}},minLength:2,replacer:t=>`${t.trigger}{"value":"${t.name}","id":"${t.id}"}`},l=r.KeyUtil.KEY,u=t=>{const e=t.closest("[data-fn-commentlike-container]"),n=`#${t.attr("data-comment-container")}`,i=e.find("[data-fn-comments-input]");if(e.data("sv-fn-initialized")){const t=a()(n);return void(t.is(":hidden")?t.fadeIn("fast",(()=>{i.trigger("focus")})):t.fadeOut("fast"))}e.data("sv-fn-initialized","true");const o=e.find("[data-fn-comments-input-size]").attr("data-initial-size"),c=e.find("[data-fn-comments-submit]"),u=e.find("[data-fn-comments-form]"),f=a()("<img>").attr("src",d).css({"vertical-align":"middle",display:"none"});i.triggeredInput(s).elastic(),i.on("keydown",(function(t){if(r.KeyUtil.getKeyCodeFromEvent(t)===l.RETURN&&t.ctrlKey)return c.trigger("focus"),u.trigger("submit"),!1})),i.on("keyup",(function(t){const e=a()(t.currentTarget),n=e.val(),i=o-n.length,r=e.parent().find("[data-fn-comments-input-size]");i<0?r.addClass("sv-character-limit-exceeded"):r.removeClass("sv-character-limit-exceeded"),r.text(i),""!==e.val().trim()&&i>=0&&!this.activeConnection?c.removeClass("disabled").prop("disabled",!1):c.addClass("disabled").attr("disabled","disabled")})),u.on("submit",(function(n){let d;if(!n.isPropagationStopped()&&!n.isDefaultPrevented()){if(n.preventDefault(),this.activeConnection)return!1;const s=i.val().trim().length,l=i.triggeredInput("getRichContent");if(s>0&&s<=o){c.addClass("disabled").attr("disabled","disabled"),this.activeConnection=!0;const n=u.attr("action");let o="thank";return r.Ajax.doPost({url:n,data:{comment:l}}).then((()=>{const t=e.find("[data-fn-comment-count]"),n=parseInt(t.text(),10)+1;t.text(n)})).catch((()=>{o="error"})).always((()=>{f.hide(),clearTimeout(d);const e=`#${t.attr("data-comment-container")}`;a()(e).hide(),a()(`${e}_${o}`).show(),setTimeout((()=>{a()(`${e}_${o}`).fadeOut("fast")}),5e3),i.val(""),this.activeConnection=!1})),f.appendTo(i.parent()),d=setTimeout((()=>{f.show()}),400),!1}}return!1})),a()(n).fadeIn("fast",(()=>{i.trigger("focus")}))};n(444),n(6301),n(693)},6237:function(t,e,n){n.d(e,{CD:function(){return g},L9:function(){return u},NE:function(){return f},U4:function(){return p},oE:function(){return m},px:function(){return s},t4:function(){return h},xb:function(){return l}});var i=n(6751),a=n.n(i),r=n(7809),o=n.n(r),c=n(1097),d=n.n(c);const s=function(t){var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.href);return e?e[1]:null},l=function(t,e,n){var i="/modelobjectapi/1/"+a().PageContext.pageId+"/"+t+"/"+e;return n&&(i+="/"+n),i},u=function(t){var e=t.modelHandler,n=t.objectId,i=t.operationObjectId,r=t.contextNodeId||a().PageContext.pageId;"string"==typeof t&&(e=t),n||(n=a().PageContext.pageId);var o="/edit-api/1/"+r+"/"+n+"/"+e;return i&&(o+="/"+i),o},f=function(t,e,n){return`/${a().PageContext.pageId}/${t}.${n?"json":"htm"}?state=${e}`},p=function(t,e){var n=s("identity"),i=s("group"),r=s("tag");return"/portletresource/"+a().PageContext.pageId+"/"+t+"?state="+e+(n?"&identity="+n:"")+(i?"&group="+i:"")+(r?"&tag="+r:"")},g=function(t,e){var n=o()(t);o().each(n,(function(){var t=o()(this),n=t.attr("id"),r=i.ObjectUtil.getObjectId(n);m(t,"/"+a().PageContext.pageId+"/"+r+".htm"+(e||""))}))},m=function(t,e,n){let i;i="string"==typeof t?o()(t):t,o().get(e,(function(e){i.fadeOut("fast",(function(){i.html(e),i.fadeIn(),"function"==typeof n&&n.call(this,t)}))}))};var v={};const h=function(t,e){var n,a=t.attr("id");if(a){if(a=a.replace(".","_"),!v[a+e]){if(0===(n=t.find("script.sv-tmpl-"+e)).length)return void i.Log.warn("portletUtil","Could not find template with name "+e+" for portlet "+a);v[a+e]=d().template(n.html())}return v[a+e]}i.Log.warn("portletUtil","Tried to get template from invalid element")};a().PortletUtil={getModelObjectUri:l,getEditApiUri:u,getPortletUri:f,getPortletResourceUri:p,reloadPortletsByType:g,doGetWithFade:m,doGet:function(t,e,n){o().get(e,(function(e){o()(t).html(e),"function"==typeof n&&n.call(this,t)}))},getTemplate:h,parseRequestParameters:s}}}]);
2//# sourceMappingURL=archive-plugins.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.