const ZN="0.8.11",_1=typeof window!="undefined",QN=typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Function("return this")();function qN(e){return e===void 0}function ss(e){return typeof e=="string"}function y1(e){return typeof e=="boolean"}function Er(e){return typeof e=="function"}const wc=Array.isArray;function Xi(e){return toString.call(e)==="[object Object]"}function R0(e){return toString.call(e)==="[object Promise]"}function L0(e){return Er(e)&&e.name.indexOf("bound ")===0&&!e.hasOwnProperty("prototype")}function eF(e){return typeof ShadowRoot!="undefined"&&e instanceof ShadowRoot}const hc=Object.defineProperty,tF=Object.defineProperties,$l=Object.prototype.hasOwnProperty;function Zn(e,t=null,...n){const r=t&&ss(t)?` app ${t}:`:"";ss(e)?console.error(`[micro-app]${r} ${e}`,...n):console.error(`[micro-app]${r}`,e,...n)}function Gf(e,t=null,...n){const r=t&&ss(t)?` app ${t}:`:"";ss(e)?console.warn(`[micro-app]${r} ${e}`,...n):console.warn(`[micro-app]${r}`,e,...n)}function vo(e,...t){Promise.resolve().then(e.bind(null,...t))}function b1(e){return e.startsWith("//")?`${location.protocol}${e}`:e}function N0(e,t=null){if(!ss(e)||!e)return"";try{const{origin:n,pathname:r,search:i}=new URL(b1(e));if(/\.(\w+)$/.test(r))return`${n}${r}${i}`;const a=`${n}${r}/`.replace(/\/\/$/,"/");return/^https?:\/\//.test(a)?`${a}${i}`:""}catch(n){return Zn(n,t),""}}function Qa(e){return!ss(e)||!e?"":e.replace(/(^\d+)|([^\w\d-_])/gi,"")}function R6(e){const{origin:t,pathname:n}=new URL(e);if(/\.(\w+)$/.test(n)){const i=`${t}${n}`.split("/");return i.pop(),i.join("/")+"/"}return`${t}${n}/`.replace(/\/\/$/,"/")}function Co(e,t){return!e||/^((((ht|f)tps?)|file):)?\/\//.test(e)||/^(data|blob):/.test(e)?e:new URL(e,R6(b1(t))).toString()}function nF(e){const t=e.split("/");return t.pop(),b1(t.join("/")+"/")}function Mg(e,t,n,r){let i=0;function a(){++i===e.length&&r&&r()}e.forEach((l,c)=>{R0(l)?l.then(h=>{t({data:h,index:c}),a()}).catch(h=>{n({error:h,index:c}),a()}):(t({data:l,index:c}),a())})}function rF(){const e=document.createElement("script");return"noModule"in e}function iF(){return"inline-"+Math.random().toString(36).substr(2,15)}function aF(e){return e.filter(function(t){return t in this?!1:this[t]=!0},Object.create(null))}const w1=QN.requestIdleCallback||function(e){const t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining(){return Math.max(0,50-(Date.now()-t))}})},50)};let C1=null;function Pc(e){C1=e}function cv(e){C1!==e&&(Pc(e),vo(()=>{Pc(null)}))}function ga(){return C1}function Ig(){Pc(null)}function Cu(e,t){const n=document.createElement(e,t);return n.__MICRO_APP_NAME__&&delete n.__MICRO_APP_NAME__,n}function dv(e,t,n){if(t.innerHTML="",n){const r=e.cloneNode(!0),i=document.createDocumentFragment();Array.from(r.childNodes).forEach(a=>{i.appendChild(a)}),t.appendChild(i)}else Array.from(e.childNodes).forEach(r=>{t.appendChild(r)})}function fv(e){return!e||/(^\d)|([^\w\d-_\u4e00-\u9fa5])/gi.test(e)}function by(e){return/^body$/i.test(e)||/^head$/i.test(e)||/^html$/i.test(e)}function Yf(e){return eF(e)?e.host:e}function wy(e){return e?e.replace(/^\s+|\s+$/g,""):""}function U5(){return navigator.userAgent.indexOf("Firefox")>-1}var ff;(function(e){e.NAME="name",e.URL="url"})(ff||(ff={}));var Or;(function(e){e.NOT_LOADED="NOT_LOADED",e.LOADING_SOURCE_CODE="LOADING_SOURCE_CODE",e.LOAD_SOURCE_FINISHED="LOAD_SOURCE_FINISHED",e.LOAD_SOURCE_ERROR="LOAD_SOURCE_ERROR",e.MOUNTING="MOUNTING",e.MOUNTED="MOUNTED",e.UNMOUNT="UNMOUNT"})(Or||(Or={}));var ks;(function(e){e.CREATED="created",e.BEFOREMOUNT="beforemount",e.MOUNTED="mounted",e.UNMOUNT="unmount",e.ERROR="error",e.BEFORESHOW="beforeshow",e.AFTERSHOW="aftershow",e.AFTERHIDDEN="afterhidden"})(ks||(ks={}));var Ns;(function(e){e.KEEP_ALIVE_SHOW="KEEP_ALIVE_SHOW",e.KEEP_ALIVE_HIDDEN="KEEP_ALIVE_HIDDEN"})(Ns||(Ns={}));const j5="window,self,globalThis,Array,Object,String,Boolean,Math,Number,Symbol,Date,Promise,Function,Proxy,WeakMap,WeakSet,Set,Map,Reflect,Element,Node,Document,RegExp,Error,TypeError,JSON,isNaN,parseFloat,parseInt,performance,console,decodeURI,encodeURI,decodeURIComponent,encodeURIComponent,location,navigator,undefined";function xu(e,t=null,n={}){return Er(sr.fetch)?sr.fetch(e,n,t):fetch(e,n).then(r=>r.text())}class x1{static getInstance(){return this.instance||(this.instance=new x1),this.instance}run(t,n){const r=t.name,i=t.ssrUrl||t.url;xu(i,r,{cache:"no-cache"}).then(a=>{if(!a){const l="html is empty, please check in detail";return t.onerror(new Error(l)),Zn(l,r)}a=this.formatHTML(i,a,r),n(a,t)}).catch(a=>{Zn(`Failed to fetch data from ${t.url}, micro-app stop rendering`,r,a),t.onLoadError(a)})}formatHTML(t,n,r){return this.processHtml(t,n,r,sr.plugins).replace(/
]*>[\s\S]*?<\/head>/i,i=>i.replace(//i,"")).replace(/]*>[\s\S]*?<\/body>/i,i=>i.replace(//i,""))}processHtml(t,n,r,i){var a;if(!i)return n;const l=[];return i.global&&l.push(...i.global),!((a=i.modules)===null||a===void 0)&&a[r]&&l.push(...i.modules[r]),l.length>0?l.reduce((c,h)=>Xi(h)&&Er(h.processHtml)?h.processHtml(c,t,h.options):c,n):n}}const sF=/(^|\s+)(html|:root)(?=[\s>~[.#:]+|$)/,z5=/(^|\s+)((html[\s>~]+body)|body)(?=[\s>~[.#:]+|$)/;function Wa(e,t){e=t?`${t} ${e}`:e;const n=new Error(e);throw n.reason=e,t&&(n.filename=t),n}class oF{constructor(){this.cssText="",this.prefix="",this.baseURI="",this.linkPath="",this.result="",this.scopecssDisable=!1,this.scopecssDisableSelectors=[],this.scopecssDisableNextLine=!1,this.mediaRule=this.createMatcherForAtRuleWithChildRule(/^@media *([^{]+)/,"media"),this.supportsRule=this.createMatcherForAtRuleWithChildRule(/^@supports *([^{]+)/,"supports"),this.documentRule=this.createMatcherForAtRuleWithChildRule(/^@([-\w]+)?document *([^{]+)/,"document"),this.hostRule=this.createMatcherForAtRuleWithChildRule(/^@host\s*/,"host"),this.importRule=this.createMatcherForNoneBraceAtRule("import"),this.charsetRule=this.createMatcherForNoneBraceAtRule("charset"),this.namespaceRule=this.createMatcherForNoneBraceAtRule("namespace")}exec(t,n,r,i){return this.cssText=t,this.prefix=n,this.baseURI=r,this.linkPath=i||"",this.matchRules(),U5()?decodeURIComponent(this.result):this.result}reset(){this.cssText=this.prefix=this.baseURI=this.linkPath=this.result="",this.scopecssDisable=this.scopecssDisableNextLine=!1,this.scopecssDisableSelectors=[]}matchRules(){for(this.matchLeadingSpaces(),this.matchComments();this.cssText.length&&this.cssText.charAt(0)!=="}"&&(this.matchAtRule()||this.matchStyleRule());)this.matchComments()}matchStyleRule(){const t=this.formatSelector(!0);return this.scopecssDisableNextLine=!1,t?(this.recordResult(t),this.matchComments(),this.styleDeclarations(),this.matchLeadingSpaces(),!0):Wa("selector missing",this.linkPath)}formatSelector(t){const n=this.commonMatch(/^([^{]+)/,t);return n?n[0].replace(/(^|,[\n\s]*)([^,]+)/g,(r,i,a)=>(a=wy(a),this.scopecssDisableNextLine||this.scopecssDisable&&(!this.scopecssDisableSelectors.length||this.scopecssDisableSelectors.includes(a))||sF.test(a)||(z5.test(a)?a=a.replace(z5,this.prefix+" micro-app-body"):a=this.prefix+" "+a),i+a)):!1}styleDeclarations(){return this.matchOpenBrace()?(this.matchAllDeclarations(),this.matchCloseBrace()?!0:Wa("Declaration missing '}'",this.linkPath)):Wa("Declaration missing '{'",this.linkPath)}matchAllDeclarations(){let t=this.commonMatch(/^(?:url\(["']?(?:[^)"'}]+)["']?\)|[^}/])*/,!0)[0];if(t&&(!this.scopecssDisableNextLine&&(!this.scopecssDisable||this.scopecssDisableSelectors.length)&&(t=t.replace(/url\(["']?([^)"']+)["']?\)/gm,(n,r)=>/^((data|blob):|#)/.test(r)||/^(https?:)?\/\//.test(r)?n:(/^((\.\.?\/)|[^/])/.test(r)&&this.linkPath&&(this.baseURI=nF(this.linkPath)),`url("${Co(r,this.baseURI)}")`))),this.recordResult(t)),this.scopecssDisableNextLine=!1,!(!this.cssText||this.cssText.charAt(0)==="}"))return this.cssText.charAt(0)==="/"&&this.cssText.charAt(1)==="*"?this.matchComments():this.commonMatch(/\/+/),this.matchAllDeclarations()}matchAtRule(){return this.cssText[0]!=="@"?!1:(this.scopecssDisableNextLine=!1,this.keyframesRule()||this.mediaRule()||this.customMediaRule()||this.supportsRule()||this.importRule()||this.charsetRule()||this.namespaceRule()||this.documentRule()||this.pageRule()||this.hostRule()||this.fontFaceRule())}keyframesRule(){if(!this.commonMatch(/^@([-\w]+)?keyframes\s*/))return!1;if(!this.commonMatch(/^([-\w]+)\s*/))return Wa("@keyframes missing name",this.linkPath);if(this.matchComments(),!this.matchOpenBrace())return Wa("@keyframes missing '{'",this.linkPath);for(this.matchComments();this.keyframeRule();)this.matchComments();return this.matchCloseBrace()?(this.matchLeadingSpaces(),!0):Wa("@keyframes missing '}'",this.linkPath)}keyframeRule(){let t;const n=[];for(;t=this.commonMatch(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)n.push(t[1]),this.commonMatch(/^,\s*/);return n.length?(this.styleDeclarations(),this.matchLeadingSpaces(),!0):!1}customMediaRule(){return this.commonMatch(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/)?(this.matchLeadingSpaces(),!0):!1}pageRule(){return this.commonMatch(/^@page */)?(this.formatSelector(!1),this.scopecssDisableNextLine=!1,this.commonHandlerForAtRuleWithSelfRule("page")):!1}fontFaceRule(){return this.commonMatch(/^@font-face\s*/)?this.commonHandlerForAtRuleWithSelfRule("font-face"):!1}createMatcherForAtRuleWithChildRule(t,n){return()=>this.commonMatch(t)?this.matchOpenBrace()?(this.matchComments(),this.matchRules(),this.matchCloseBrace()?(this.matchLeadingSpaces(),!0):Wa(`@${n} missing '}'`,this.linkPath)):Wa(`@${n} missing '{'`,this.linkPath):!1}createMatcherForNoneBraceAtRule(t){const n=new RegExp("^@"+t+"\\s*([^;]+);");return()=>this.commonMatch(n)?(this.matchLeadingSpaces(),!0):!1}commonHandlerForAtRuleWithSelfRule(t){return this.matchOpenBrace()?(this.matchAllDeclarations(),this.matchCloseBrace()?(this.matchLeadingSpaces(),!0):Wa(`@${t} missing '}'`,this.linkPath)):Wa(`@${t} missing '{'`,this.linkPath)}matchComments(){for(;this.matchComment(););}matchComment(){if(this.cssText.charAt(0)!=="/"||this.cssText.charAt(1)!=="*")return!1;this.scopecssDisableNextLine=!1;let t=2;for(;this.cssText.charAt(t)!==""&&(this.cssText.charAt(t)!=="*"||this.cssText.charAt(t+1)!=="/");)++t;if(t+=2,this.cssText.charAt(t-1)==="")return Wa("End of comment missing",this.linkPath);let n=this.cssText.slice(2,t-2);return this.recordResult(`/*${n}*/`),n=wy(n.replace(/^\s*!/,"")),n==="scopecss-disable-next-line"?this.scopecssDisableNextLine=!0:/^scopecss-disable/.test(n)?n==="scopecss-disable"?this.scopecssDisable=!0:(this.scopecssDisable=!0,n.replace("scopecss-disable","").split(",").forEach(i=>{this.scopecssDisableSelectors.push(wy(i))})):n==="scopecss-enable"&&(this.scopecssDisable=!1,this.scopecssDisableSelectors=[]),this.cssText=this.cssText.slice(t),this.matchLeadingSpaces(),!0}commonMatch(t,n=!1){const r=t.exec(this.cssText);if(!r)return;const i=r[0];return this.cssText=this.cssText.slice(i.length),n||this.recordResult(i),r}matchOpenBrace(){return this.commonMatch(/^{\s*/)}matchCloseBrace(){return this.commonMatch(/^}/)}matchLeadingSpaces(){this.commonMatch(/^\s*/)}recordResult(t){U5()?this.result+=encodeURIComponent(t):this.result+=t}}function V5(e,t,n,r,i){if(!e.__MICRO_APP_HAS_SCOPED__){e.__MICRO_APP_HAS_SCOPED__=!0;let a=null;try{a=hf.exec(e.textContent,n,r,i),hf.reset()}catch(l){hf.reset(),Zn(`An error occurred while parsing CSS:
`,t,l)}a&&(e.textContent=a)}}let hf;function ru(e,t){if(t.scopecss){const n=`${sr.tagName}[name=${t.name}]`;if(hf||(hf=new oF),e.textContent)V5(e,t.name,n,t.url,e.__MICRO_APP_LINK_PATH__);else{const r=new MutationObserver(function(){r.disconnect(),e.textContent&&!e.hasAttribute("data-styled")&&V5(e,t.name,n,t.url,e.__MICRO_APP_LINK_PATH__)});r.observe(e,{childList:!0})}}return e}function L6(e,t){Object.defineProperties(e,{currentTarget:{get(){return t}},srcElement:{get(){return t}},target:{get(){return t}}})}function pf(e){const t=new CustomEvent("load");L6(t,e),Er(e.onload)?e.onload(t):e.dispatchEvent(t)}function N6(e){const t=new CustomEvent("error");L6(t,e),Er(e.onerror)?e.onerror(t):e.dispatchEvent(t)}const sl=new Map;function F6(e,t,n,r=!1){const i=e.getAttribute("rel");let a=e.getAttribute("href"),l=null;if(i==="stylesheet"&&a)if(a=Co(a,n.url),!r)l=document.createComment(`link element with href=${a} move to micro-app-head as style element`),n.source.links.set(a,{code:"",placeholder:l,isGlobal:e.hasAttribute("global")});else return{url:a,info:{code:"",isGlobal:e.hasAttribute("global")}};else i&&["prefetch","preload","prerender","icon","apple-touch-icon"].includes(i)?r?l=document.createComment(`link element with rel=${i}${a?" & href="+a:""} removed by micro-app`):t.removeChild(e):a&&e.setAttribute("href",Co(a,n.url));if(r)return{replaceComment:l};if(l)return t.replaceChild(l,e)}function lF(e,t,n){const r=Array.from(t.source.links.entries()),i=r.map(([a])=>sl.has(a)?sl.get(a):xu(a,t.name));Mg(i,a=>{uF(r[a.index][0],r[a.index][1],a.data,n,t)},a=>{Zn(a,t.name)},()=>{t.onLoad(e)})}function uF(e,t,n,r,i){t.isGlobal&&!sl.has(e)&&sl.set(e,n);const a=Cu("style");a.textContent=n,a.__MICRO_APP_LINK_PATH__=e,a.setAttribute("data-origin-href",e),t.placeholder.parentNode?t.placeholder.parentNode.replaceChild(ru(a,i),t.placeholder):r.appendChild(ru(a,i)),t.placeholder=null,t.code=n}function cF(e,t,n,r,i){if(n.source.links.has(e)){i.textContent=n.source.links.get(e).code,ru(i,n),vo(()=>pf(r));return}if(sl.has(e)){const a=sl.get(e);t.code=a,n.source.links.set(e,t),i.textContent=a,ru(i,n),vo(()=>pf(r));return}xu(e,n.name).then(a=>{t.code=a,n.source.links.set(e,t),t.isGlobal&&sl.set(e,a),i.textContent=a,ru(i,n),pf(r)}).catch(a=>{Zn(a,n.name),N6(r)})}const jo=new WeakMap;function dF(e,t,n){if(t instanceof HTMLStyleElement){if(t.hasAttribute("exclude")){const r=document.createComment("style element with exclude attribute ignored by micro-app");return jo.set(t,r),r}else if(n.scopecss&&!t.hasAttribute("ignore"))return ru(t,n);return t}else if(t instanceof HTMLLinkElement){if(t.hasAttribute("exclude")||S1(t.getAttribute("href"),n.name)){const l=document.createComment("link element with exclude attribute ignored by micro-app");return jo.set(t,l),l}else if(t.hasAttribute("ignore")||E1(t.getAttribute("href"),n.name)||t.href&&Er(sr.excludeAssetFilter)&&sr.excludeAssetFilter(t.href))return t;const{url:r,info:i,replaceComment:a}=F6(t,e,n,!0);if(r&&i){const l=Cu("style");return l.__MICRO_APP_LINK_PATH__=r,cF(r,i,n,t,l),jo.set(t,l),l}else if(a)return jo.set(t,a),a;return t}else if(t instanceof HTMLScriptElement){if(t.src&&Er(sr.excludeAssetFilter)&&sr.excludeAssetFilter(t.src))return t;const{replaceComment:r,url:i,info:a}=V6(t,e,n,!0)||{};if(i&&a)if(a.isExternal){const l=DF(i,a,n,t);return jo.set(t,l),l}else{const l=Pf(i,n,a,!0);return jo.set(t,l),l}else if(r)return jo.set(t,r),r;return t}return t}function B6(e,t,n,r,i){const a=hF(n,e);return a?i&&!a.contains(i)?Bt.rawAppendChild.call(a,r):t===Bt.rawRemoveChild&&!a.contains(r)?n.contains(r)?t.call(n,r):r:W5(t,a,r,i):W5(t,n,r,i)}function W5(e,t,n,r){return fF(e)?e.call(t,n):e.call(t,n,r)}function fF(e){return e===Bt.rawAppend||e===Bt.rawPrepend}function hF(e,t){var n,r;return e===document.head?(n=t==null?void 0:t.container)===null||n===void 0?void 0:n.querySelector("micro-app-head"):e===document.body?(r=t==null?void 0:t.container)===null||r===void 0?void 0:r.querySelector("micro-app-body"):null}function U6(e){var t;return(t=jo.get(e))!==null&&t!==void 0?t:e}function kd(e,t,n,r){if(t!=null&&t.__MICRO_APP_NAME__){const i=ar.get(t.__MICRO_APP_NAME__);return i!=null&&i.container?B6(i,r,e,dF(e,t,i),n&&U6(n)):r===Bt.rawAppend||r===Bt.rawPrepend?r.call(e,t):r.call(e,t,n)}else if(r===Bt.rawAppend||r===Bt.rawPrepend){const i=ga();if(!(t instanceof Node)&&i){const a=ar.get(i);if(a!=null&&a.container){if(e===document.head)return r.call(a.container.querySelector("micro-app-head"),t);if(e===document.body)return r.call(a.container.querySelector("micro-app-body"),t)}}return r.call(e,t)}return r.call(e,t,n)}function pF(){vF(),Element.prototype.appendChild=function(t){return kd(this,t,null,Bt.rawAppendChild)},Element.prototype.insertBefore=function(t,n){return kd(this,t,n,Bt.rawInsertBefore)},Element.prototype.replaceChild=function(t,n){return kd(this,t,n,Bt.rawReplaceChild)},Element.prototype.append=function(...t){let n=0;const r=t.length;for(;n0;)kd(this,t[n-1],null,Bt.rawPrepend),n--},Element.prototype.removeChild=function(t){if(t!=null&&t.__MICRO_APP_NAME__){const n=ar.get(t.__MICRO_APP_NAME__);return n!=null&&n.container?B6(n,Bt.rawRemoveChild,this,U6(t)):Bt.rawRemoveChild.call(this,t)}return Bt.rawRemoveChild.call(this,t)},Element.prototype.cloneNode=function(t){const n=Bt.rawCloneNode.call(this,t);return this.__MICRO_APP_NAME__&&(n.__MICRO_APP_NAME__=this.__MICRO_APP_NAME__),n}}function Cy(e){const t=ga();return t&&(e.__MICRO_APP_NAME__=t),e}function vF(){const e=Bt.rawDocument;Document.prototype.createElement=function(i,a){const l=Bt.rawCreateElement.call(this,i,a);return Cy(l)},Document.prototype.createElementNS=function(i,a,l){const c=Bt.rawCreateElementNS.call(this,i,a,l);return Cy(c)},Document.prototype.createDocumentFragment=function(){const i=Bt.rawCreateDocumentFragment.call(this);return Cy(i)};function t(r){var i,a,l;const c=ga();return!c||!r||by(r)||e!==this?Bt.rawQuerySelector.call(this,r):(l=(a=(i=ar.get(c))===null||i===void 0?void 0:i.container)===null||a===void 0?void 0:a.querySelector(r))!==null&&l!==void 0?l:null}function n(r){var i,a,l;const c=ga();return!c||!r||by(r)||e!==this?Bt.rawQuerySelectorAll.call(this,r):(l=(a=(i=ar.get(c))===null||i===void 0?void 0:i.container)===null||a===void 0?void 0:a.querySelectorAll(r))!==null&&l!==void 0?l:[]}Document.prototype.querySelector=t,Document.prototype.querySelectorAll=n,Document.prototype.getElementById=function(i){if(!ga()||fv(i))return Bt.rawGetElementById.call(this,i);try{return t.call(this,`#${i}`)}catch{return Bt.rawGetElementById.call(this,i)}},Document.prototype.getElementsByClassName=function(i){if(!ga()||fv(i))return Bt.rawGetElementsByClassName.call(this,i);try{return n.call(this,`.${i}`)}catch{return Bt.rawGetElementsByClassName.call(this,i)}},Document.prototype.getElementsByTagName=function(i){var a;const l=ga();if(!l||by(i)||fv(i)||!(!((a=ar.get(l))===null||a===void 0)&&a.inline)&&/^script$/i.test(i))return Bt.rawGetElementsByTagName.call(this,i);try{return n.call(this,i)}catch{return Bt.rawGetElementsByTagName.call(this,i)}},Document.prototype.getElementsByName=function(i){if(!ga()||fv(i))return Bt.rawGetElementsByName.call(this,i);try{return n.call(this,`[name=${i}]`)}catch{return Bt.rawGetElementsByName.call(this,i)}}}let F0=!1;function mF(){F0||(F0=!0,Element.prototype.setAttribute=function(t,n){if(/^micro-app(-\S+)?/i.test(this.tagName)&&t==="data")if(Xi(n)){const r={};Object.getOwnPropertyNames(n).forEach(i=>{ss(i)&&i.indexOf("__")===0||(r[i]=n[i])}),this.data=r}else n!=="[object Object]"&&Gf("property data must be an object",this.getAttribute("name"));else if(((t==="src"||t==="srcset")&&/^(img|script)$/i.test(this.tagName)||t==="href"&&/^link$/i.test(this.tagName))&&this.__MICRO_APP_NAME__&&ar.has(this.__MICRO_APP_NAME__)){const r=ar.get(this.__MICRO_APP_NAME__);Bt.rawSetAttribute.call(this,t,Co(n,r.url))}else Bt.rawSetAttribute.call(this,t,n)})}function gF(){F0=!1,Element.prototype.setAttribute=Bt.rawSetAttribute}function _F(){Document.prototype.createElement=Bt.rawCreateElement,Document.prototype.createElementNS=Bt.rawCreateElementNS,Document.prototype.createDocumentFragment=Bt.rawCreateDocumentFragment,Document.prototype.querySelector=Bt.rawQuerySelector,Document.prototype.querySelectorAll=Bt.rawQuerySelectorAll,Document.prototype.getElementById=Bt.rawGetElementById,Document.prototype.getElementsByClassName=Bt.rawGetElementsByClassName,Document.prototype.getElementsByTagName=Bt.rawGetElementsByTagName,Document.prototype.getElementsByName=Bt.rawGetElementsByName}function yF(){Pc(null),_F(),Element.prototype.appendChild=Bt.rawAppendChild,Element.prototype.insertBefore=Bt.rawInsertBefore,Element.prototype.replaceChild=Bt.rawReplaceChild,Element.prototype.removeChild=Bt.rawRemoveChild,Element.prototype.append=Bt.rawAppend,Element.prototype.prepend=Bt.rawPrepend,Element.prototype.cloneNode=Bt.rawCloneNode}let H5=!1;function bF(){if(!H5){H5=!0;const e=Cu("style");Bt.rawSetAttribute.call(e,"type","text/css"),e.textContent=`
${sr.tagName}, micro-app-body { display: block; }
micro-app-head { display: none; }`,Bt.rawDocument.head.appendChild(e)}}class Rm{constructor(){this.appInstanceMap=ar}static getInstance(){return this.instance||(this.instance=new Rm),this.instance}get(t){return this.appInstanceMap.get(t)}set(t,n){this.appInstanceMap.set(t,n)}getAll(){return Array.from(this.appInstanceMap.values())}clear(){this.appInstanceMap.clear()}}function j6(){z6(),Rm.getInstance().getAll().forEach(e=>{e.container&&Yf(e.container).disconnectedCallback()}),!window.__MICRO_APP_UMD_MODE__&&Rm.getInstance().clear()}function wF(){window.__MICRO_APP_ENVIRONMENT__&&window.addEventListener("unmount",j6,!1)}function z6(){window.__MICRO_APP_ENVIRONMENT__&&window.removeEventListener("unmount",j6,!1)}const Bt={};function CF(){if(_1){const e=Element.prototype.setAttribute,t=Element.prototype.appendChild,n=Element.prototype.insertBefore,r=Element.prototype.replaceChild,i=Element.prototype.removeChild,a=Element.prototype.append,l=Element.prototype.prepend,c=Element.prototype.cloneNode,h=Document.prototype.createElement,s=Document.prototype.createElementNS,p=Document.prototype.createDocumentFragment,d=Document.prototype.querySelector,v=Document.prototype.querySelectorAll,m=Document.prototype.getElementById,_=Document.prototype.getElementsByClassName,y=Document.prototype.getElementsByTagName,b=Document.prototype.getElementsByName,E=new Proxy(Image,{construct(z,U){const oe=new z(...U);return oe.__MICRO_APP_NAME__=ga(),oe}}),O=Function("return window")(),x=Function("return document")(),C=rF(),D=O.addEventListener,P=O.removeEventListener,w=O.setInterval,M=O.setTimeout,T=O.clearInterval,R=O.clearTimeout,K=x.addEventListener,N=x.removeEventListener;window.__MICRO_APP_BASE_APPLICATION__=!0,Object.assign(Bt,{rawSetAttribute:e,rawAppendChild:t,rawInsertBefore:n,rawReplaceChild:r,rawRemoveChild:i,rawAppend:a,rawPrepend:l,rawCloneNode:c,rawCreateElement:h,rawCreateElementNS:s,rawCreateDocumentFragment:p,rawQuerySelector:d,rawQuerySelectorAll:v,rawGetElementById:m,rawGetElementsByClassName:_,rawGetElementsByTagName:y,rawGetElementsByName:b,ImageProxy:E,rawWindow:O,rawDocument:x,supportModuleScript:C,rawWindowAddEventListener:D,rawWindowRemoveEventListener:P,rawSetInterval:w,rawSetTimeout:M,rawClearInterval:T,rawClearTimeout:R,rawDocumentAddEventListener:K,rawDocumentRemoveEventListener:N}),bF(),z6(),wF()}}const iu=new Map;function V6(e,t,n,r=!1){let i=null,a=e.getAttribute("src");if(a&&(a=Co(a,n.url)),e.hasAttribute("exclude")||S1(a,n.name))i=document.createComment("script element with exclude attribute removed by micro-app");else{if(e.type&&!["text/javascript","text/ecmascript","application/javascript","application/ecmascript","module","systemjs-module","systemjs-importmap"].includes(e.type)||e.hasAttribute("ignore")||E1(a,n.name))return null;if(Bt.supportModuleScript&&e.noModule||!Bt.supportModuleScript&&e.type==="module")i=document.createComment(`${e.noModule?"noModule":"module"} script ignored by micro-app`);else if(a){const l={code:"",isExternal:!0,isDynamic:r,async:e.hasAttribute("async"),defer:e.defer||e.type==="module",module:e.type==="module",isGlobal:e.hasAttribute("global")};if(!r)n.source.scripts.set(a,l),i=document.createComment(`script with src='${a}' extract by micro-app`);else return{url:a,info:l}}else if(e.textContent){const l=iF(),c={code:e.textContent,isExternal:!1,isDynamic:r,async:!1,defer:e.type==="module",module:e.type==="module"};if(!r)n.source.scripts.set(l,c),i=document.createComment("inline script extract by micro-app");else return{url:l,info:c}}else r||(i=document.createComment("script element removed by micro-app"))}return r?{replaceComment:i}:t.replaceChild(i,e)}function W6(e){var t,n,r;const i=((t=sr.plugins)===null||t===void 0?void 0:t.global)||[],a=((r=(n=sr.plugins)===null||n===void 0?void 0:n.modules)===null||r===void 0?void 0:r[e])||[];return[...i,...a]}function S1(e,t){return e?(W6(t)||[]).some(r=>r.excludeChecker?r.excludeChecker(e):!1):!1}function E1(e,t){return e?(W6(t)||[]).some(r=>r.ignoreChecker?r.ignoreChecker(e):!1):!1}function xF(e,t){const n=Array.from(t.source.scripts.entries()),r=[],i=[];for(const[a,l]of n)if(l.isExternal){const c=iu.get(a);c?l.code=c:(!l.defer&&!l.async||t.isPrefetch)&&(r.push(xu(a,t.name)),i.push([a,l]))}r.length?Mg(r,a=>{SF(i[a.index][0],i[a.index][1],a.data)},a=>{Zn(a,t.name)},()=>{t.onLoad(e)}):t.onLoad(e)}function SF(e,t,n){t.isGlobal&&!iu.has(e)&&iu.set(e,n),t.code=n}function EF(e,t,n){const r=Array.from(e.entries()),i=[],a=[];for(const[l,c]of r)c.isDynamic||(c.defer||c.async?(c.isExternal&&!c.code?i.push(xu(l,t.name)):i.push(c.code),a.push([l,c]),c.module&&(n.moduleCount=n.moduleCount?++n.moduleCount:1)):(Pf(l,t,c,!1),n(!1)));i.length?Mg(i,l=>{const c=a[l.index][1];c.code=c.code||l.data},l=>{n.errorCount=n.errorCount?++n.errorCount:1,Zn(l,t.name)},()=>{a.forEach(([l,c])=>{c.code&&(Pf(l,t,c,!1,n),!c.module&&n(!1))}),n(qN(n.moduleCount)||n.errorCount===i.length)}):n(!0)}function Pf(e,t,n,r,i){var a;try{const l=G6(e,t,n.code,n);if(t.inline||n.module){const c=Cu("script");if(H6(e,l,n.module,c,i),r)return c;(a=t.container)===null||a===void 0||a.querySelector("micro-app-body").appendChild(c)}else if(K6(l,n),r)return document.createComment("dynamic script extract by micro-app")}catch(l){console.error(`[micro-app from runScript] app ${t.name}: `,l)}}function DF(e,t,n,r){const i=()=>pf(r);if(n.source.scripts.has(e)){const l=n.source.scripts.get(e);return!l.module&&vo(i),Pf(e,n,l,!0,i)}if(iu.has(e)){const l=iu.get(e);return t.code=l,n.source.scripts.set(e,t),!t.module&&vo(i),Pf(e,n,t,!0,i)}let a;return n.inline||t.module?a=Cu("script"):a=document.createComment(`dynamic script with src='${e}' extract by micro-app`),xu(e,n.name).then(l=>{t.code=l,n.source.scripts.set(e,t),t.isGlobal&&iu.set(e,l);try{l=G6(e,n,l,t),n.inline||t.module?H6(e,l,t.module,a,i):K6(l,t)}catch(c){console.error(`[micro-app from runDynamicScript] app ${n.name}: `,c,e)}!t.module&&pf(r)}).catch(l=>{Zn(l,n.name),N6(r)}),a}function H6(e,t,n,r,i){if(n){const a=new Blob([t],{type:"text/javascript"});r.src=URL.createObjectURL(a),r.setAttribute("type","module"),i&&(i.moduleCount&&i.moduleCount--,r.onload=i.bind(r,i.moduleCount===0))}else r.textContent=t;e.startsWith("inline-")||r.setAttribute("data-origin-src",e)}function K6(e,t){t.code2Function||(t.code2Function=new Function(e)),t.code2Function.call(window)}function G6(e,t,n,r){return Xi(sr.plugins)&&(n=kF(e,n,t.name,sr.plugins,r)),t.sandBox&&!r.module?(Bt.rawWindow.__MICRO_APP_PROXY_WINDOW__=t.sandBox.proxyWindow,`;(function(proxyWindow){with(proxyWindow.__MICRO_APP_WINDOW__){(function(${j5}){;${n}
}).call(proxyWindow,${j5})}})(window.__MICRO_APP_PROXY_WINDOW__);`):n}function kF(e,t,n,r,i){var a;const l=K5(r.global,t,e,i);return K5((a=r.modules)===null||a===void 0?void 0:a[n],l,e,i)}function K5(e,t,n,r){return wc(e)?e.reduce((i,a)=>Xi(a)&&Er(a.loader)?a.loader(i,n,a.options,r):i,t):t}function OF(e){const t=Cu("div");return t.innerHTML=e,t}function Y6(e,t,n){const r=Array.from(e.children);r.length&&r.forEach(i=>{Y6(i,t)});for(const i of r)i instanceof HTMLLinkElement?i.hasAttribute("exclude")||S1(i.getAttribute("href"),t.name)?e.replaceChild(document.createComment("link element with exclude attribute ignored by micro-app"),i):i.hasAttribute("ignore")||E1(i.getAttribute("href"),t.name)?i.hasAttribute("href")&&i.setAttribute("href",Co(i.getAttribute("href"),t.url)):F6(i,e,t):i instanceof HTMLStyleElement?i.hasAttribute("exclude")?e.replaceChild(document.createComment("style element with exclude attribute ignored by micro-app"),i):t.scopecss&&!i.hasAttribute("ignore")&&ru(i,t):i instanceof HTMLScriptElement?V6(i,e,t):i instanceof HTMLMetaElement||i instanceof HTMLTitleElement?e.removeChild(i):i instanceof HTMLImageElement&&i.hasAttribute("src")&&i.setAttribute("src",Co(i.getAttribute("src"),t.url))}function PF(e,t){const n=OF(e),r=n.querySelector("micro-app-head"),i=n.querySelector("micro-app-body");if(!r||!i){const a=`element ${r?"body":"head"} is missing`;return t.onerror(new Error(a)),Zn(a,t.name)}Y6(n,t),t.source.links.size?lF(n,t,r):t.onLoad(n),t.source.scripts.size?xF(n,t):t.onLoad(n)}class TF{constructor(){this.eventList=new Map}isLegalName(t){return t?!0:(Zn("event-center: Invalid name"),!1)}on(t,n,r=!1){if(this.isLegalName(t)){if(!Er(n))return Zn("event-center: Invalid callback function");let i=this.eventList.get(t);i?r&&Object.getOwnPropertyNames(i.data).length&&n(i.data):(i={data:{},callbacks:new Set},this.eventList.set(t,i)),i.callbacks.add(n)}}off(t,n){if(this.isLegalName(t)){const r=this.eventList.get(t);r&&(Er(n)?r.callbacks.delete(n):r.callbacks.clear())}}dispatch(t,n){if(this.isLegalName(t)){if(!Xi(n))return Zn("event-center: data must be object");let r=this.eventList.get(t);if(r){if(r.data!==n){r.data=n;for(const i of r.callbacks)i(n)}}else r={data:n,callbacks:new Set},this.eventList.set(t,r)}}getData(t){var n;const r=this.eventList.get(t);return(n=r==null?void 0:r.data)!==null&&n!==void 0?n:null}}const li=new TF;function qa(e,t){return!ss(e)||!e?"":t?`__from_base_app_${e}__`:`__from_micro_app_${e}__`}class X6{addGlobalDataListener(t,n){const r=this.appName;r&&(t.__APP_NAME__=r,t.__AUTO_TRIGGER__=n),li.on("global",t,n)}removeGlobalDataListener(t){Er(t)&&li.off("global",t)}setGlobalData(t){Ig(),li.dispatch("global",t)}getGlobalData(){return li.getData("global")}clearGlobalDataListener(){const t=this.appName,n=li.eventList.get("global");if(n)for(const r of n.callbacks)(t&&t===r.__APP_NAME__||!(t||r.__APP_NAME__))&&n.callbacks.delete(r)}}class AF extends X6{addDataListener(t,n,r){li.on(qa(Qa(t),!1),n,r)}removeDataListener(t,n){Er(n)&&li.off(qa(Qa(t),!1),n)}getData(t,n=!1){return li.getData(qa(Qa(t),n))}setData(t,n){li.dispatch(qa(Qa(t),!0),n)}clearDataListener(t){li.off(qa(Qa(t),!1))}}class MF extends X6{constructor(t){super(),this.appName=Qa(t),!this.appName&&Zn(`Invalid appName ${t}`)}addDataListener(t,n){t.__AUTO_TRIGGER__=n,li.on(qa(this.appName,!0),t,n)}removeDataListener(t){Er(t)&&li.off(qa(this.appName,!0),t)}getData(){return li.getData(qa(this.appName,!0))}dispatch(t){Ig(),li.dispatch(qa(this.appName,!1),t);const n=ar.get(this.appName);if((n==null?void 0:n.container)&&Xi(t)){const r=new CustomEvent("datachange",{detail:{data:t}});Yf(n.container).dispatchEvent(r)}}clearDataListener(){li.off(qa(this.appName,!0))}}function IF(e){const t=e.appName;e.umdDataListeners={global:new Set,normal:new Set};const n=li.eventList.get("global");if(n)for(const i of n.callbacks)t===i.__APP_NAME__&&e.umdDataListeners.global.add(i);const r=li.eventList.get(qa(t,!0));r&&(e.umdDataListeners.normal=new Set(r.callbacks))}function $F(e){for(const t of e.umdDataListeners.global)e.addGlobalDataListener(t,t.__AUTO_TRIGGER__);for(const t of e.umdDataListeners.normal)e.addDataListener(t,t.__AUTO_TRIGGER__)}function RF(e){return y1(e.__MICRO_APP_IS_BOUND_FUNCTION__)?e.__MICRO_APP_IS_BOUND_FUNCTION__:e.__MICRO_APP_IS_BOUND_FUNCTION__=L0(e)}function LF(e){var t;if(y1(e.__MICRO_APP_IS_CONSTRUCTOR__))return e.__MICRO_APP_IS_CONSTRUCTOR__;const n=e.toString(),r=((t=e.prototype)===null||t===void 0?void 0:t.constructor)===e&&Object.getOwnPropertyNames(e.prototype).length>1||/^function\s+[A-Z]/.test(n)||/^class\s+/.test(n);return e.__MICRO_APP_IS_CONSTRUCTOR__=r}function NF(e,t){if(t.__MICRO_APP_BOUND_WINDOW_FUNCTION__)return t.__MICRO_APP_BOUND_WINDOW_FUNCTION__;if(!LF(t)&&!RF(t)){const n=t.bind(e);for(const r in t)n[r]=t[r];return t.hasOwnProperty("prototype")&&hc(n,"prototype",{value:t.prototype,configurable:!0,enumerable:!1,writable:!0}),t.__MICRO_APP_BOUND_WINDOW_FUNCTION__=n}return t}const Xo=new Map;let J6=!1;function FF(){if(J6=!0,Object.getOwnPropertyDescriptor(document,"onclick"))return Gf("Cannot redefine document property onclick");const e=document.onclick;document.onclick=null;let t=!1;function n(r){Xo.forEach(i=>{Er(i)&&i.call(document,r)})}hc(document,"onclick",{configurable:!0,enumerable:!0,get(){const r=ga();return r?Xo.get(r):Xo.get("base")},set(r){const i=ga();i?Xo.set(i,r):Xo.set("base",r),!t&&Er(r)&&(t=!0,Bt.rawDocumentAddEventListener.call(Bt.rawDocument,"click",n,!1))}}),e&&(document.onclick=e)}const vf=new Map;function BF(){const{rawDocument:e,rawDocumentAddEventListener:t,rawDocumentRemoveEventListener:n}=Bt;!J6&&FF(),document.addEventListener=function(r,i,a){var l;const c=ga();if(c&&!(((l=ar.get(c))===null||l===void 0?void 0:l.umdMode)&&L0(i))){const h=vf.get(c);if(h){const s=h.get(r);s?s.add(i):h.set(r,new Set([i]))}else vf.set(c,new Map([[r,new Set([i])]]));i&&(i.__MICRO_APP_MARK_OPTIONS__=a)}t.call(e,r,i,a)},document.removeEventListener=function(r,i,a){var l;const c=ga();if(c&&!(((l=ar.get(c))===null||l===void 0?void 0:l.umdMode)&&L0(i))){const h=vf.get(c);if(h){const s=h.get(r);(s==null?void 0:s.size)&&s.has(i)&&s.delete(i)}}n.call(e,r,i,a)}}function UF(){document.addEventListener=Bt.rawDocumentAddEventListener,document.removeEventListener=Bt.rawDocumentRemoveEventListener}const jF=["unmount","appstate-change"];function G5(e,t){return jF.includes(e)?`${e}-${t.__MICRO_APP_NAME__}`:e}function zF(e){const t=e.__MICRO_APP_NAME__,n=new Map,r=new Map,i=new Map,{rawWindow:a,rawDocument:l,rawWindowAddEventListener:c,rawWindowRemoveEventListener:h,rawSetInterval:s,rawSetTimeout:p,rawClearInterval:d,rawClearTimeout:v,rawDocumentRemoveEventListener:m}=Bt;e.addEventListener=function(P,w,M){P=G5(P,e);const T=n.get(P);T?T.add(w):n.set(P,new Set([w])),w&&(w.__MICRO_APP_MARK_OPTIONS__=M),c.call(a,P,w,M)},e.removeEventListener=function(P,w,M){P=G5(P,e);const T=n.get(P);(T==null?void 0:T.size)&&T.has(w)&&T.delete(w),h.call(a,P,w,M)},e.setInterval=function(P,w,...M){const T=s.call(a,P,w,...M);return r.set(T,{handler:P,timeout:w,args:M}),T},e.setTimeout=function(P,w,...M){const T=p.call(a,P,w,...M);return i.set(T,{handler:P,timeout:w,args:M}),T},e.clearInterval=function(P){r.delete(P),d.call(a,P)},e.clearTimeout=function(P){i.delete(P),v.call(a,P)};const _=new Map,y=new Map;let b=new Map,E=new Map,O;return{recordUmdEffect:()=>{n.forEach((w,M)=>{w.size&&_.set(M,new Set(w))}),r.size&&(b=new Map(r)),i.size&&(E=new Map(i)),O=Xo.get(t);const P=vf.get(t);P&&P.forEach((w,M)=>{w.size&&y.set(M,new Set(w))})},rebuildUmdEffect:()=>{_.forEach((P,w)=>{for(const M of P)e.addEventListener(w,M,M==null?void 0:M.__MICRO_APP_MARK_OPTIONS__)}),b.forEach(P=>{e.setInterval(P.handler,P.timeout,...P.args)}),E.forEach(P=>{e.setTimeout(P.handler,P.timeout,...P.args)}),O&&Xo.set(t,O),Pc(t),y.forEach((P,w)=>{for(const M of P)document.addEventListener(w,M,M==null?void 0:M.__MICRO_APP_MARK_OPTIONS__)}),Pc(null)},releaseEffect:()=>{n.size&&(n.forEach((w,M)=>{for(const T of w)h.call(a,M,T)}),n.clear()),r.size&&(r.forEach((w,M)=>{d.call(a,M)}),r.clear()),i.size&&(i.forEach((w,M)=>{v.call(a,M)}),i.clear()),Xo.delete(t);const P=vf.get(t);P&&(P.forEach((w,M)=>{for(const T of w)m.call(l,M,T)}),P.clear())}}}const VF=["System","__cjsWrapper"],WF=["location"],HF=["window","self","globalThis"];class Tf{constructor(t,n){this.scopeProperties=["webpackJsonp","Vue"],this.escapeProperties=[],this.injectedKeys=new Set,this.escapeKeys=new Set,this.active=!1,this.microAppWindow={},this.getSpecialProperties(t),this.proxyWindow=this.createProxyWindow(t),this.initMicroAppWindow(this.microAppWindow,t,n),Object.assign(this,zF(this.microAppWindow))}start(t){this.active||(this.active=!0,this.microAppWindow.__MICRO_APP_BASE_ROUTE__=this.microAppWindow.__MICRO_APP_BASE_URL__=t,Bt.rawWindow._babelPolyfill&&(Bt.rawWindow._babelPolyfill=!1),++Tf.activeCount===1&&(BF(),pF()))}stop(t){this.active&&(this.active=!1,this.releaseEffect(),this.microAppWindow.microApp.clearDataListener(),this.microAppWindow.microApp.clearGlobalDataListener(),t||(this.injectedKeys.forEach(n=>{Reflect.deleteProperty(this.microAppWindow,n)}),this.injectedKeys.clear(),this.escapeKeys.forEach(n=>{Reflect.deleteProperty(Bt.rawWindow,n)}),this.escapeKeys.clear()),--Tf.activeCount===0&&(UF(),yF()))}recordUmdSnapshot(){this.microAppWindow.__MICRO_APP_UMD_MODE__=!0,this.recordUmdEffect(),IF(this.microAppWindow.microApp),this.recordUmdInjectedValues=new Map,this.injectedKeys.forEach(t=>{this.recordUmdInjectedValues.set(t,Reflect.get(this.microAppWindow,t))})}rebuildUmdSnapshot(){this.recordUmdInjectedValues.forEach((t,n)=>{Reflect.set(this.proxyWindow,n,t)}),this.rebuildUmdEffect(),$F(this.microAppWindow.microApp)}getSpecialProperties(t){var n;!Xi(sr.plugins)||(this.commonActionForSpecialProperties(sr.plugins.global),this.commonActionForSpecialProperties((n=sr.plugins.modules)===null||n===void 0?void 0:n[t]))}commonActionForSpecialProperties(t){if(wc(t))for(const n of t)Xi(n)&&(wc(n.scopeProperties)&&(this.scopeProperties=this.scopeProperties.concat(n.scopeProperties)),wc(n.escapeProperties)&&(this.escapeProperties=this.escapeProperties.concat(n.escapeProperties)))}createProxyWindow(t){const n=Bt.rawWindow,r=new Map;return new Proxy(this.microAppWindow,{get:(i,a)=>{if(cv(t),Reflect.has(i,a)||ss(a)&&/^__MICRO_APP_/.test(a)||this.scopeProperties.includes(a))return Reflect.get(i,a);const l=Reflect.get(n,a);return Er(l)?NF(n,l):l},set:(i,a,l)=>{if(this.active){if(WF.includes(a))Reflect.set(n,a,l);else if(!$l.call(i,a)&&$l.call(n,a)&&!this.scopeProperties.includes(a)){const c=Object.getOwnPropertyDescriptor(n,a),{configurable:h,enumerable:s,writable:p,set:d}=c;hc(i,a,{value:l,configurable:h,enumerable:s,writable:p!=null?p:!!d}),this.injectedKeys.add(a)}else Reflect.set(i,a,l),this.injectedKeys.add(a);(this.escapeProperties.includes(a)||VF.includes(a)&&!Reflect.has(n,a))&&!this.scopeProperties.includes(a)&&(Reflect.set(n,a,l),this.escapeKeys.add(a))}return!0},has:(i,a)=>this.scopeProperties.includes(a)?a in i:a in i||a in n,getOwnPropertyDescriptor:(i,a)=>{if($l.call(i,a))return r.set(a,"target"),Object.getOwnPropertyDescriptor(i,a);if($l.call(n,a)){r.set(a,"rawWindow");const l=Object.getOwnPropertyDescriptor(n,a);return l&&!l.configurable&&(l.configurable=!0),l}},defineProperty:(i,a,l)=>r.get(a)==="rawWindow"?Reflect.defineProperty(n,a,l):Reflect.defineProperty(i,a,l),ownKeys:i=>aF(Reflect.ownKeys(n).concat(Reflect.ownKeys(i))),deleteProperty:(i,a)=>$l.call(i,a)?(this.injectedKeys.has(a)&&this.injectedKeys.delete(a),this.escapeKeys.has(a)&&Reflect.deleteProperty(n,a),Reflect.deleteProperty(i,a)):!0})}initMicroAppWindow(t,n,r){t.__MICRO_APP_ENVIRONMENT__=!0,t.__MICRO_APP_NAME__=n,t.__MICRO_APP_PUBLIC_PATH__=R6(r),t.__MICRO_APP_WINDOW__=t,t.microApp=Object.assign(new MF(n),{removeDomScope:Ig,pureCreateElement:Cu}),t.rawWindow=Bt.rawWindow,t.rawDocument=Bt.rawDocument,t.hasOwnProperty=i=>$l.call(t,i)||$l.call(Bt.rawWindow,i),this.setMappingPropertiesWithRawDescriptor(t),this.setHijackProperties(t,n)}setMappingPropertiesWithRawDescriptor(t){let n,r;const i=Bt.rawWindow;i===i.parent?n=r=this.proxyWindow:(n=i.top,r=i.parent),hc(t,"top",this.createDescriptorForMicroAppWindow("top",n)),hc(t,"parent",this.createDescriptorForMicroAppWindow("parent",r)),HF.forEach(a=>{hc(t,a,this.createDescriptorForMicroAppWindow(a,this.proxyWindow))})}createDescriptorForMicroAppWindow(t,n){const{configurable:r=!0,enumerable:i=!0,writable:a,set:l}=Object.getOwnPropertyDescriptor(Bt.rawWindow,t)||{writable:!0};return{value:n,configurable:r,enumerable:i,writable:a!=null?a:!!l}}setHijackProperties(t,n){let r,i;tF(t,{document:{get(){return cv(n),Bt.rawDocument},configurable:!1,enumerable:!0},eval:{get(){return cv(n),r||eval},set:a=>{r=a},configurable:!0,enumerable:!1},Image:{get(){return cv(n),i||Bt.ImageProxy},set:a=>{i=a},configurable:!0,enumerable:!1}})}}Tf.activeCount=0;function KF(e,t){Object.defineProperties(e,{currentTarget:{get(){return t}},target:{get(){return t}}})}function zo(e,t,n,r){var i;if(!e)return Zn(`element does not exist in lifecycle ${n}`,t);e=Yf(e),Ig();const a=Object.assign({name:t,container:e},r&&{error:r}),l=new CustomEvent(n,{detail:a});KF(l,e),Er((i=sr.lifeCycles)===null||i===void 0?void 0:i[n])&&sr.lifeCycles[n](l),e.dispatchEvent(l)}function hv(e,t,n={}){const r=new CustomEvent(`${e}-${t}`,{detail:n});window.dispatchEvent(r)}const ar=new Map;class Z6{constructor({name:t,url:n,ssrUrl:r,container:i,inline:a,scopecss:l,useSandbox:c,baseroute:h}){this.state=Or.NOT_LOADED,this.keepAliveState=null,this.keepAliveContainer=null,this.loadSourceLevel=0,this.umdHookMount=null,this.umdHookUnmount=null,this.libraryName=null,this.umdMode=!1,this.isPrefetch=!1,this.prefetchResolve=null,this.container=null,this.baseroute="",this.sandBox=null,this.container=i!=null?i:null,this.inline=a!=null?a:!1,this.baseroute=h!=null?h:"",this.ssrUrl=r!=null?r:"",this.name=t,this.url=n,this.useSandbox=c,this.scopecss=this.useSandbox&&l,this.source={links:new Map,scripts:new Map},this.loadSourceCode(),this.useSandbox&&(this.sandBox=new Tf(t,n))}loadSourceCode(){this.state=Or.LOADING_SOURCE_CODE,x1.getInstance().run(this,PF)}onLoad(t){var n;++this.loadSourceLevel===2&&(this.source.html=t,this.isPrefetch?((n=this.prefetchResolve)===null||n===void 0||n.call(this),this.prefetchResolve=null):Or.UNMOUNT!==this.state&&(this.state=Or.LOAD_SOURCE_FINISHED,this.mount()))}onLoadError(t){this.loadSourceLevel=-1,this.prefetchResolve&&(this.prefetchResolve(),this.prefetchResolve=null),Or.UNMOUNT!==this.state&&(this.onerror(t),this.state=Or.LOAD_SOURCE_ERROR)}mount(t,n,r){var i,a,l;if(y1(n)&&n!==this.inline&&(this.inline=n),this.container=(i=this.container)!==null&&i!==void 0?i:t,this.baseroute=r!=null?r:this.baseroute,this.loadSourceLevel!==2){this.state=Or.LOADING_SOURCE_CODE;return}zo(this.container,this.name,ks.BEFOREMOUNT),this.state=Or.MOUNTING,dv(this.source.html,this.container,!this.umdMode),(a=this.sandBox)===null||a===void 0||a.start(this.baseroute);let c;if(this.umdMode){(l=this.sandBox)===null||l===void 0||l.rebuildUmdSnapshot();try{c=this.umdHookMount()}catch(h){Zn(`an error occurred in the mount function
`,this.name,h)}this.handleMounted(c)}else{let h=!1;EF(this.source.scripts,this,s=>{var p;if(!this.umdMode){const{mount:d,unmount:v}=this.getUmdLibraryHooks();if(Er(d)&&Er(v)){this.umdHookMount=d,this.umdHookUnmount=v,this.umdMode=!0,(p=this.sandBox)===null||p===void 0||p.recordUmdSnapshot();try{c=this.umdHookMount()}catch(m){Zn(`an error occurred in the mount function
`,this.name,m)}}}!h&&(s===!0||this.umdMode)&&(h=!0,this.handleMounted(c))})}}handleMounted(t){R0(t)?t.then(()=>this.dispatchMountedEvent()).catch(n=>this.onerror(n)):this.dispatchMountedEvent()}dispatchMountedEvent(){Or.UNMOUNT!==this.state&&(this.state=Or.MOUNTED,zo(this.container,this.name,ks.MOUNTED))}unmount(t,n){this.state===Or.LOAD_SOURCE_ERROR&&(t=!0),this.state=Or.UNMOUNT,this.keepAliveState=null,this.keepAliveContainer=null;let r;if(this.umdHookUnmount)try{r=this.umdHookUnmount()}catch(i){Zn(`an error occurred in the unmount function
`,this.name,i)}hv("unmount",this.name),this.handleUnmounted(t,r,n)}handleUnmounted(t,n,r){R0(n)?n.then(()=>this.actionsForUnmount(t,r)).catch(()=>this.actionsForUnmount(t,r)):this.actionsForUnmount(t,r)}actionsForUnmount(t,n){var r;t?this.actionsForCompletelyDestroy():this.umdMode&&this.container.childElementCount&&dv(this.container,this.source.html,!1),(r=this.sandBox)===null||r===void 0||r.stop(this.umdMode),JF().length||gF(),zo(this.container,this.name,ks.UNMOUNT),this.container.innerHTML="",this.container=null,n&&n()}actionsForCompletelyDestroy(){!this.useSandbox&&this.umdMode&&delete window[this.libraryName],ar.delete(this.name)}hiddenKeepAliveApp(){const t=this.container;dv(this.container,this.keepAliveContainer?this.keepAliveContainer:this.keepAliveContainer=document.createElement("div"),!1),this.container=this.keepAliveContainer,this.keepAliveState=Ns.KEEP_ALIVE_HIDDEN,hv("appstate-change",this.name,{appState:"afterhidden"}),zo(t,this.name,ks.AFTERHIDDEN)}showKeepAliveApp(t){hv("appstate-change",this.name,{appState:"beforeshow"}),zo(t,this.name,ks.BEFORESHOW),dv(this.container,t,!1),this.container=t,this.keepAliveState=Ns.KEEP_ALIVE_SHOW,hv("appstate-change",this.name,{appState:"aftershow"}),zo(this.container,this.name,ks.AFTERSHOW)}onerror(t){zo(this.container,this.name,ks.ERROR,t)}getAppState(){return this.state}getKeepAliveState(){return this.keepAliveState}getUmdLibraryHooks(){var t,n;if(Or.UNMOUNT!==this.state){const r=(n=(t=this.sandBox)===null||t===void 0?void 0:t.proxyWindow)!==null&&n!==void 0?n:Bt.rawWindow;return this.libraryName=Yf(this.container).getAttribute("library")||`micro-app-${this.name}`,typeof r[this.libraryName]=="object"?r[this.libraryName]:{}}return{}}}function GF(e){class t extends HTMLElement{constructor(){super(),this.isWaiting=!1,this.cacheData=null,this.hasConnected=!1,this.appName="",this.appUrl="",this.ssrUrl="",this.version=ZN,this.handleAttributeUpdate=()=>{this.isWaiting=!1;const r=Qa(this.getAttribute("name")),i=N0(this.getAttribute("url"),this.appName);if(this.legalAttribute("name",r)&&this.legalAttribute("url",i)){const a=ar.get(r);if(r!==this.appName&&a&&Or.UNMOUNT!==a.getAppState()&&Ns.KEEP_ALIVE_HIDDEN!==a.getKeepAliveState()&&!a.isPrefetch)return this.setAttribute("name",this.appName),Zn(`app name conflict, an app named ${r} is running`,this.appName);(r!==this.appName||i!==this.appUrl)&&(r===this.appName?this.handleUnmount(!0,()=>{this.actionsForAttributeChange(r,i,a)}):this.getKeepAliveModeResult()?(this.handleHiddenKeepAliveApp(),this.actionsForAttributeChange(r,i,a)):this.handleUnmount(this.getDestroyCompatibleResult(),()=>{this.actionsForAttributeChange(r,i,a)}))}else r!==this.appName&&this.setAttribute("name",this.appName)},mF()}static get observedAttributes(){return["name","url"]}connectedCallback(){this.hasConnected=!0,vo(()=>zo(this,this.appName,ks.CREATED)),this.initialMount()}disconnectedCallback(){this.hasConnected=!1,this.getKeepAliveModeResult()?this.handleHiddenKeepAliveApp():this.handleUnmount(this.getDestroyCompatibleResult())}attributeChangedCallback(r,i,a){if(this.legalAttribute(r,a)&&this[r===ff.NAME?"appName":"appUrl"]!==a)if(r===ff.URL&&!this.appUrl){if(a=N0(a,this.appName),!a)return Zn(`Invalid attribute url ${a}`,this.appName);this.appUrl=a,this.handleInitialNameAndUrl()}else if(r===ff.NAME&&!this.appName){const l=Qa(a);if(!l)return Zn(`Invalid attribute name ${a}`,this.appName);this.cacheData&&(sr.setData(l,this.cacheData),this.cacheData=null),this.appName=l,l!==a&&this.setAttribute("name",this.appName),this.handleInitialNameAndUrl()}else this.isWaiting||(this.isWaiting=!0,vo(this.handleAttributeUpdate))}handleInitialNameAndUrl(){this.hasConnected&&this.initialMount()}initialMount(){if(!(!this.appName||!this.appUrl))if(this.getDisposeResult("shadowDOM")&&!this.shadowRoot&&Er(this.attachShadow)&&this.attachShadow({mode:"open"}),this.getDisposeResult("ssr")?this.ssrUrl=Co(Bt.rawWindow.location.pathname,this.appUrl):this.ssrUrl&&(this.ssrUrl=""),ar.has(this.appName)){const r=ar.get(this.appName),i=r.ssrUrl||r.url,a=this.ssrUrl||this.appUrl;r.getKeepAliveState()===Ns.KEEP_ALIVE_HIDDEN&&r.url===this.appUrl?this.handleShowKeepAliveApp(r):i===a&&(r.isPrefetch||r.getAppState()===Or.UNMOUNT)?this.handleAppMount(r):r.isPrefetch||r.getAppState()===Or.UNMOUNT?(Gf(`the ${r.isPrefetch?"prefetch":"unmounted"} app with url: ${i} is replaced by a new app`,this.appName),this.handleCreateApp()):Zn(`app name conflict, an app named ${this.appName} is running`,this.appName)}else this.handleCreateApp()}actionsForAttributeChange(r,i,a){var l;this.getDisposeResult("ssr")?this.ssrUrl=Co(Bt.rawWindow.location.pathname,i):this.ssrUrl&&(this.ssrUrl=""),this.appName=r,this.appUrl=i,((l=this.shadowRoot)!==null&&l!==void 0?l:this).innerHTML="",r!==this.getAttribute("name")&&this.setAttribute("name",this.appName),a?a.getKeepAliveState()===Ns.KEEP_ALIVE_HIDDEN?a.url===this.appUrl?this.handleShowKeepAliveApp(a):Zn(`app name conflict, an app named ${this.appName} is running`,this.appName):a.url===this.appUrl&&a.ssrUrl===this.ssrUrl?this.handleAppMount(a):this.handleCreateApp():this.handleCreateApp()}legalAttribute(r,i){return!ss(i)||!i?(Zn(`unexpected attribute ${r}, please check again`,this.appName),!1):!0}handleAppMount(r){r.isPrefetch=!1,vo(()=>{var i;return r.mount((i=this.shadowRoot)!==null&&i!==void 0?i:this,this.getDisposeResult("inline"),this.getBaseRouteCompatible())})}handleCreateApp(){var r;ar.has(this.appName)&&ar.get(this.appName).actionsForCompletelyDestroy();const i=new Z6({name:this.appName,url:this.appUrl,ssrUrl:this.ssrUrl,container:(r=this.shadowRoot)!==null&&r!==void 0?r:this,inline:this.getDisposeResult("inline"),scopecss:!(this.getDisposeResult("disableScopecss")||this.getDisposeResult("shadowDOM")),useSandbox:!this.getDisposeResult("disableSandbox"),baseroute:this.getBaseRouteCompatible()});ar.set(this.appName,i)}handleUnmount(r,i){const a=ar.get(this.appName);a&&a.getAppState()!==Or.UNMOUNT&&a.unmount(r,i)}handleHiddenKeepAliveApp(){const r=ar.get(this.appName);r&&r.getAppState()!==Or.UNMOUNT&&r.getKeepAliveState()!==Ns.KEEP_ALIVE_HIDDEN&&r.hiddenKeepAliveApp()}handleShowKeepAliveApp(r){vo(()=>{var i;return r.showKeepAliveApp((i=this.shadowRoot)!==null&&i!==void 0?i:this)})}getDisposeResult(r){return(this.compatibleSpecialProperties(r)||sr[r])&&this.compatibleDisableSpecialProperties(r)}compatibleSpecialProperties(r){return r==="disableScopecss"?this.hasAttribute("disableScopecss")||this.hasAttribute("disable-scopecss"):r==="disableSandbox"?this.hasAttribute("disableSandbox")||this.hasAttribute("disable-sandbox"):this.hasAttribute(r)}compatibleDisableSpecialProperties(r){return r==="disableScopecss"?this.getAttribute("disableScopecss")!=="false"&&this.getAttribute("disable-scopecss")!=="false":r==="disableSandbox"?this.getAttribute("disableSandbox")!=="false"&&this.getAttribute("disable-sandbox")!=="false":this.getAttribute(r)!=="false"}getBaseRouteCompatible(){var r,i;return(i=(r=this.getAttribute("baseroute"))!==null&&r!==void 0?r:this.getAttribute("baseurl"))!==null&&i!==void 0?i:""}getDestroyCompatibleResult(){return this.getDisposeResult("destroy")||this.getDisposeResult("destory")}getKeepAliveModeResult(){return this.getDisposeResult("keep-alive")&&!this.getDestroyCompatibleResult()}set data(r){this.appName?sr.setData(this.appName,r):this.cacheData=r}get data(){return this.appName?sr.getData(this.appName,!0):this.cacheData?this.cacheData:null}}window.customElements.define(e,t)}function Y5(e){if(!_1)return Zn("preFetch is only supported in browser environment");w1(()=>{Er(e)&&(e=e()),wc(e)&&e.reduce((t,n)=>t.then(()=>YF(n)),Promise.resolve())})}function YF(e){return new Promise(t=>{w1(()=>{var n,r;if(Xi(e)&&navigator.onLine)if(e.name=Qa(e.name),e.url=N0(e.url,e.name),e.name&&e.url&&!ar.has(e.name)){const i=new Z6({name:e.name,url:e.url,scopecss:!((n=e.disableScopecss)!==null&&n!==void 0?n:sr.disableScopecss),useSandbox:!((r=e.disableSandbox)!==null&&r!==void 0?r:sr.disableSandbox)});i.isPrefetch=!0,i.prefetchResolve=t,ar.set(e.name,i)}else t();else t()})})}function XF(e){Xi(e)&&w1(()=>{X5(e.js,"js",iu),X5(e.css,"css",sl)})}function X5(e,t,n){if(wc(e)){const r=e.filter(a=>ss(a)&&a.includes(`.${t}`)&&!n.has(a)),i=r.map(a=>xu(a));Mg(i,a=>{const l=r[a.index];n.has(l)||n.set(l,a.data)},a=>{Zn(a)})}}function JF(e){const t=[];return ar.forEach((n,r)=>{Or.UNMOUNT!==n.getAppState()&&!n.isPrefetch&&(!e||Ns.KEEP_ALIVE_HIDDEN!==n.getKeepAliveState())&&t.push(r)}),t}function ZF(e,t){const n=ar.get(Qa(e));return new Promise(r=>{if(n)if(n.getAppState()===Or.UNMOUNT||n.isPrefetch)t!=null&&t.destroy&&n.actionsForCompletelyDestroy(),r();else if(n.getKeepAliveState()===Ns.KEEP_ALIVE_HIDDEN)t!=null&&t.destroy?n.unmount(!0,r):t!=null&&t.clearAliveState?n.unmount(!1,r):r();else{const i=Yf(n.container),a=()=>{i.removeEventListener("unmount",a),i.removeEventListener("afterhidden",l),r()},l=()=>{i.removeEventListener("unmount",a),i.removeEventListener("afterhidden",l),r()};if(i.addEventListener("unmount",a),i.addEventListener("afterhidden",l),t!=null&&t.destroy){let c,h;i.hasAttribute("destroy")&&(c=i.getAttribute("destroy")),i.hasAttribute("destory")&&(h=i.getAttribute("destory")),i.setAttribute("destroy","true"),i.parentNode.removeChild(i),i.removeAttribute("destroy"),typeof c=="string"&&i.setAttribute("destroy",c),typeof h=="string"&&i.setAttribute("destory",h)}else if((t==null?void 0:t.clearAliveState)&&i.hasAttribute("keep-alive")){const c=i.getAttribute("keep-alive");i.removeAttribute("keep-alive"),i.parentNode.removeChild(i),i.setAttribute("keep-alive",c)}else i.parentNode.removeChild(i)}else Gf(`app ${e} does not exist`),r()})}function Yne(e){return Array.from(ar.keys()).reduce((t,n)=>t.then(()=>ZF(n,e)),Promise.resolve())}class QF extends AF{constructor(){super(...arguments),this.tagName="micro-app",this.preFetch=Y5}start(t){if(!_1||!window.customElements)return Zn("micro-app is not supported in this environment");if(t!=null&&t.tagName)if(/^micro-app(-\S+)?/.test(t.tagName))this.tagName=t.tagName;else return Zn(`${t.tagName} is invalid tagName`);if(window.customElements.get(this.tagName))return Gf(`element ${this.tagName} is already defined`);if(CF(),t&&Xi(t)&&(this.shadowDOM=t.shadowDOM,this.destroy=t.destroy,this.destory=t.destory,this.inline=t.inline,this.disableScopecss=t.disableScopecss,this.disableSandbox=t.disableSandbox,this.ssr=t.ssr,Er(t.fetch)&&(this.fetch=t.fetch),Xi(t.lifeCycles)&&(this.lifeCycles=t.lifeCycles),t.preFetchApps&&Y5(t.preFetchApps),t.globalAssets&&XF(t.globalAssets),Er(t.excludeAssetFilter)&&(this.excludeAssetFilter=t.excludeAssetFilter),Xi(t.plugins))){const n=t.plugins.modules;if(Xi(n))for(const r in n){const i=Qa(r);i&&r!==i&&(n[i]=n[r],delete n[r])}this.plugins=t.plugins}GF(this.tagName)}}var sr=new QF;const qF=e=>({}).VITE_OKR_WEB_URL||$A.apiUrl(e);function eB(){let e={},t={loader(n,r){return n}};e["micro-app"]=[t],e["okr-details"]=[t],sr.start({plugins:{modules:e}}),sr.preFetch([{name:"micro-app",url:qF("../apps/okr"),disableSandbox:!0}])}var tB={languageTypes:{zh:"\u7B80\u4F53\u4E2D\u6587","zh-CHT":"\u7E41\u9AD4\u4E2D\u6587",en:"English",ko:"\uD55C\uAD6D\uC5B4",ja:"\u65E5\u672C\u8A9E",de:"Deutsch",fr:"Fran\xE7ais",id:"Indonesia"},replaceArgumentsLanguage(e,t){let n=1;for(;e.indexOf("(*)")!==-1;)typeof t[n]=="object"?e=e.replace("(*)",""):e=e.replace("(*)",t[n]),n++;return e},replaceEscape(e){return!e||e==""?"":e.replace(/\(\*\)/g,"~%~").replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/~%~/g,"(.*?)")},getLanguage(){let e=window.localStorage.getItem("__language:type__");if(typeof e=="string"&&typeof this.languageTypes[e]!="undefined")return e;e="en";let t=((window.navigator.language||navigator.userLanguage)+"").toLowerCase();switch(t){case"zh":case"cn":case"zh-cn":e="zh";break;case"zh-tw":case"zh-tr":case"zh-hk":case"zh-cnt":case"zh-cht":e="zh-CHT";break;default:typeof this.languageTypes[t]!="undefined"&&(e=t);break}return window.localStorage.setItem("__language:type__",e),e}};const Lm=tB,nB=Lm.languageTypes,au=Lm.getLanguage(),Zu={};function Xne(e){if(!$A.isArray(e))return;const t=Object.assign(Object.keys(nB));e.some(n=>{let r=-1;n.key&&t.some(i=>{const a=n[i]||n.general||null;a&&typeof window.LANGUAGE_DATA[i]!="undefined"&&(r=window.LANGUAGE_DATA[i].push(a)-1)}),r>-1&&(window.LANGUAGE_DATA.key[n.key]=r)})}function Jne(e){e!==void 0&&$A.modalConfirm({content:"\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u540E\u751F\u6548\uFF0C\u662F\u5426\u786E\u5B9A\u5237\u65B0\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",onOk:()=>{window.localStorage.setItem("__language:type__",e),$A.reloadUrl()}})}function D1(e){var n;if(typeof arguments[1]!="undefined")return D1(Lm.replaceArgumentsLanguage(e,arguments));if(typeof e!="string"||!e||typeof window.LANGUAGE_DATA=="undefined"||typeof window.LANGUAGE_DATA.key=="undefined"||typeof window.LANGUAGE_DATA[au]=="undefined")return e;const t=window.LANGUAGE_DATA.key[e]||-1;if(t>-1)return window.LANGUAGE_DATA[au][t]||e;if(typeof Zu[e]=="undefined"){Zu[e]=!1;for(let r in window.LANGUAGE_DATA.key)if(r.indexOf("(*)")>-1){const i=new RegExp("^"+Lm.replaceEscape(r)+"$","g");if(i.test(e)){let a=0;const l=window.LANGUAGE_DATA.key[r],c=(n=window.LANGUAGE_DATA[au][l]||r)==null?void 0:n.replace(/\(\*\)/g,function(){return"$"+ ++a});Zu[e]={rege:i,value:c};break}}}return Zu[e]?e.replace(Zu[e].rege,Zu[e].value):(window.systemInfo.debug==="yes"&&setTimeout(r=>{try{let i="__language:Undefined__",a=JSON.parse(window.localStorage.getItem(i)||"[]");$A.isArray(a)||(a=[]);let l=null;a.find(h=>(l=new RegExp("^"+h.replace(/\(\*\)/g,"(.*?)")+"$","g"),!!e.match(l)))||(a.push(e),window.localStorage.setItem(i,JSON.stringify(a)))}catch{}},10),e)}var Fs=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Q6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $g(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}function pv(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var q6={exports:{}};/*!
* jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-08-28T13:37Z
*/(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return n(r)}})(typeof window!="undefined"?window:Fs,function(t,n){var r=[],i=Object.getPrototypeOf,a=r.slice,l=r.flat?function(k){return r.flat.call(k)}:function(k){return r.concat.apply([],k)},c=r.push,h=r.indexOf,s={},p=s.toString,d=s.hasOwnProperty,v=d.toString,m=v.call(Object),_={},y=function(L){return typeof L=="function"&&typeof L.nodeType!="number"&&typeof L.item!="function"},b=function(L){return L!=null&&L===L.window},E=t.document,O={type:!0,src:!0,nonce:!0,noModule:!0};function x(k,L,G){G=G||E;var ne,_e,we=G.createElement("script");if(we.text=k,L)for(ne in O)_e=L[ne]||L.getAttribute&&L.getAttribute(ne),_e&&we.setAttribute(ne,_e);G.head.appendChild(we).parentNode.removeChild(we)}function C(k){return k==null?k+"":typeof k=="object"||typeof k=="function"?s[p.call(k)]||"object":typeof k}var D="3.7.1",P=/HTML$/i,w=function(k,L){return new w.fn.init(k,L)};w.fn=w.prototype={jquery:D,constructor:w,length:0,toArray:function(){return a.call(this)},get:function(k){return k==null?a.call(this):k<0?this[k+this.length]:this[k]},pushStack:function(k){var L=w.merge(this.constructor(),k);return L.prevObject=this,L},each:function(k){return w.each(this,k)},map:function(k){return this.pushStack(w.map(this,function(L,G){return k.call(L,G,L)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,function(k,L){return(L+1)%2}))},odd:function(){return this.pushStack(w.grep(this,function(k,L){return L%2}))},eq:function(k){var L=this.length,G=+k+(k<0?L:0);return this.pushStack(G>=0&&G0&&L-1 in k}function T(k,L){return k.nodeName&&k.nodeName.toLowerCase()===L.toLowerCase()}var R=r.pop,K=r.sort,N=r.splice,z="[\\x20\\t\\r\\n\\f]",U=new RegExp("^"+z+"+|((?:^|[^\\\\])(?:\\\\.)*)"+z+"+$","g");w.contains=function(k,L){var G=L&&L.parentNode;return k===G||!!(G&&G.nodeType===1&&(k.contains?k.contains(G):k.compareDocumentPosition&&k.compareDocumentPosition(G)&16))};var oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Pe(k,L){return L?k==="\0"?"\uFFFD":k.slice(0,-1)+"\\"+k.charCodeAt(k.length-1).toString(16)+" ":"\\"+k}w.escapeSelector=function(k){return(k+"").replace(oe,Pe)};var he=E,ye=c;(function(){var k,L,G,ne,_e,we=ye,Me,We,Be,Ye,st,ut=w.expando,et=0,St=0,vn=kl(),$n=kl(),Sn=kl(),$r=kl(),pr=function(Ne,He){return Ne===He&&(_e=!0),0},ia="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",aa="(?:\\\\[\\da-fA-F]{1,6}"+z+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Mn="\\["+z+"*("+aa+")(?:"+z+"*([*^$|!~]?=)"+z+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+aa+"))|)"+z+"*\\]",eo=":("+aa+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Mn+")*)|.*)\\)|)",Nn=new RegExp(z+"+","g"),lr=new RegExp("^"+z+"*,"+z+"*"),hs=new RegExp("^"+z+"*([>+~]|"+z+")"+z+"*"),ju=new RegExp(z+"|>"),sa=new RegExp(eo),Dl=new RegExp("^"+aa+"$"),oa={ID:new RegExp("^#("+aa+")"),CLASS:new RegExp("^\\.("+aa+")"),TAG:new RegExp("^("+aa+"|[*])"),ATTR:new RegExp("^"+Mn),PSEUDO:new RegExp("^"+eo),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+z+"*(even|odd|(([+-]|)(\\d*)n|)"+z+"*(?:([+-]|)"+z+"*(\\d+)|))"+z+"*\\)|)","i"),bool:new RegExp("^(?:"+ia+")$","i"),needsContext:new RegExp("^"+z+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+z+"*((?:-\\d)?\\d*)"+z+"*\\)|)(?=[^-]|$)","i")},ps=/^(?:input|select|textarea|button)$/i,vs=/^h\d$/i,Ui=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,zu=/[+~]/,Ba=new RegExp("\\\\[\\da-fA-F]{1,6}"+z+"?|\\\\([^\\r\\n\\f])","g"),Da=function(Ne,He){var qe="0x"+Ne.slice(1)-65536;return He||(qe<0?String.fromCharCode(qe+65536):String.fromCharCode(qe>>10|55296,qe&1023|56320))},W_=function(){ms()},Nh=Ol(function(Ne){return Ne.disabled===!0&&T(Ne,"fieldset")},{dir:"parentNode",next:"legend"});function H_(){try{return Me.activeElement}catch{}}try{we.apply(r=a.call(he.childNodes),he.childNodes),r[he.childNodes.length].nodeType}catch{we={apply:function(He,qe){ye.apply(He,a.call(qe))},call:function(He){ye.apply(He,a.call(arguments,1))}}}function Vn(Ne,He,qe,rt){var ct,At,zt,Jt,Vt,An,cn,mn=He&&He.ownerDocument,En=He?He.nodeType:9;if(qe=qe||[],typeof Ne!="string"||!Ne||En!==1&&En!==9&&En!==11)return qe;if(!rt&&(ms(He),He=He||Me,Be)){if(En!==11&&(Vt=Ui.exec(Ne)))if(ct=Vt[1]){if(En===9)if(zt=He.getElementById(ct)){if(zt.id===ct)return we.call(qe,zt),qe}else return qe;else if(mn&&(zt=mn.getElementById(ct))&&Vn.contains(He,zt)&&zt.id===ct)return we.call(qe,zt),qe}else{if(Vt[2])return we.apply(qe,He.getElementsByTagName(Ne)),qe;if((ct=Vt[3])&&He.getElementsByClassName)return we.apply(qe,He.getElementsByClassName(ct)),qe}if(!$r[Ne+" "]&&(!Ye||!Ye.test(Ne))){if(cn=Ne,mn=He,En===1&&(ju.test(Ne)||hs.test(Ne))){for(mn=zu.test(Ne)&&dd(He.parentNode)||He,(mn!=He||!_.scope)&&((Jt=He.getAttribute("id"))?Jt=w.escapeSelector(Jt):He.setAttribute("id",Jt=ut)),An=Ro(Ne),At=An.length;At--;)An[At]=(Jt?"#"+Jt:":scope")+" "+to(An[At]);cn=An.join(",")}try{return we.apply(qe,mn.querySelectorAll(cn)),qe}catch{$r(Ne,!0)}finally{Jt===ut&&He.removeAttribute("id")}}}return pd(Ne.replace(U,"$1"),He,qe,rt)}function kl(){var Ne=[];function He(qe,rt){return Ne.push(qe+" ")>L.cacheLength&&delete He[Ne.shift()],He[qe+" "]=rt}return He}function qr(Ne){return Ne[ut]=!0,Ne}function $o(Ne){var He=Me.createElement("fieldset");try{return!!Ne(He)}catch{return!1}finally{He.parentNode&&He.parentNode.removeChild(He),He=null}}function Fh(Ne){return function(He){return T(He,"input")&&He.type===Ne}}function ji(Ne){return function(He){return(T(He,"input")||T(He,"button"))&&He.type===Ne}}function Bh(Ne){return function(He){return"form"in He?He.parentNode&&He.disabled===!1?"label"in He?"label"in He.parentNode?He.parentNode.disabled===Ne:He.disabled===Ne:He.isDisabled===Ne||He.isDisabled!==!Ne&&Nh(He)===Ne:He.disabled===Ne:"label"in He?He.disabled===Ne:!1}}function Ua(Ne){return qr(function(He){return He=+He,qr(function(qe,rt){for(var ct,At=Ne([],qe.length,He),zt=At.length;zt--;)qe[ct=At[zt]]&&(qe[ct]=!(rt[ct]=qe[ct]))})})}function dd(Ne){return Ne&&typeof Ne.getElementsByTagName!="undefined"&&Ne}function ms(Ne){var He,qe=Ne?Ne.ownerDocument||Ne:he;return qe==Me||qe.nodeType!==9||!qe.documentElement||(Me=qe,We=Me.documentElement,Be=!w.isXMLDoc(Me),st=We.matches||We.webkitMatchesSelector||We.msMatchesSelector,We.msMatchesSelector&&he!=Me&&(He=Me.defaultView)&&He.top!==He&&He.addEventListener("unload",W_),_.getById=$o(function(rt){return We.appendChild(rt).id=w.expando,!Me.getElementsByName||!Me.getElementsByName(w.expando).length}),_.disconnectedMatch=$o(function(rt){return st.call(rt,"*")}),_.scope=$o(function(){return Me.querySelectorAll(":scope")}),_.cssHas=$o(function(){try{return Me.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),_.getById?(L.filter.ID=function(rt){var ct=rt.replace(Ba,Da);return function(At){return At.getAttribute("id")===ct}},L.find.ID=function(rt,ct){if(typeof ct.getElementById!="undefined"&&Be){var At=ct.getElementById(rt);return At?[At]:[]}}):(L.filter.ID=function(rt){var ct=rt.replace(Ba,Da);return function(At){var zt=typeof At.getAttributeNode!="undefined"&&At.getAttributeNode("id");return zt&&zt.value===ct}},L.find.ID=function(rt,ct){if(typeof ct.getElementById!="undefined"&&Be){var At,zt,Jt,Vt=ct.getElementById(rt);if(Vt){if(At=Vt.getAttributeNode("id"),At&&At.value===rt)return[Vt];for(Jt=ct.getElementsByName(rt),zt=0;Vt=Jt[zt++];)if(At=Vt.getAttributeNode("id"),At&&At.value===rt)return[Vt]}return[]}}),L.find.TAG=function(rt,ct){return typeof ct.getElementsByTagName!="undefined"?ct.getElementsByTagName(rt):ct.querySelectorAll(rt)},L.find.CLASS=function(rt,ct){if(typeof ct.getElementsByClassName!="undefined"&&Be)return ct.getElementsByClassName(rt)},Ye=[],$o(function(rt){var ct;We.appendChild(rt).innerHTML="",rt.querySelectorAll("[selected]").length||Ye.push("\\["+z+"*(?:value|"+ia+")"),rt.querySelectorAll("[id~="+ut+"-]").length||Ye.push("~="),rt.querySelectorAll("a#"+ut+"+*").length||Ye.push(".#.+[+~]"),rt.querySelectorAll(":checked").length||Ye.push(":checked"),ct=Me.createElement("input"),ct.setAttribute("type","hidden"),rt.appendChild(ct).setAttribute("name","D"),We.appendChild(rt).disabled=!0,rt.querySelectorAll(":disabled").length!==2&&Ye.push(":enabled",":disabled"),ct=Me.createElement("input"),ct.setAttribute("name",""),rt.appendChild(ct),rt.querySelectorAll("[name='']").length||Ye.push("\\["+z+"*name"+z+"*="+z+`*(?:''|"")`)}),_.cssHas||Ye.push(":has"),Ye=Ye.length&&new RegExp(Ye.join("|")),pr=function(rt,ct){if(rt===ct)return _e=!0,0;var At=!rt.compareDocumentPosition-!ct.compareDocumentPosition;return At||(At=(rt.ownerDocument||rt)==(ct.ownerDocument||ct)?rt.compareDocumentPosition(ct):1,At&1||!_.sortDetached&&ct.compareDocumentPosition(rt)===At?rt===Me||rt.ownerDocument==he&&Vn.contains(he,rt)?-1:ct===Me||ct.ownerDocument==he&&Vn.contains(he,ct)?1:ne?h.call(ne,rt)-h.call(ne,ct):0:At&4?-1:1)}),Me}Vn.matches=function(Ne,He){return Vn(Ne,null,null,He)},Vn.matchesSelector=function(Ne,He){if(ms(Ne),Be&&!$r[He+" "]&&(!Ye||!Ye.test(He)))try{var qe=st.call(Ne,He);if(qe||_.disconnectedMatch||Ne.document&&Ne.document.nodeType!==11)return qe}catch{$r(He,!0)}return Vn(He,Me,null,[Ne]).length>0},Vn.contains=function(Ne,He){return(Ne.ownerDocument||Ne)!=Me&&ms(Ne),w.contains(Ne,He)},Vn.attr=function(Ne,He){(Ne.ownerDocument||Ne)!=Me&&ms(Ne);var qe=L.attrHandle[He.toLowerCase()],rt=qe&&d.call(L.attrHandle,He.toLowerCase())?qe(Ne,He,!Be):void 0;return rt!==void 0?rt:Ne.getAttribute(He)},Vn.error=function(Ne){throw new Error("Syntax error, unrecognized expression: "+Ne)},w.uniqueSort=function(Ne){var He,qe=[],rt=0,ct=0;if(_e=!_.sortStable,ne=!_.sortStable&&a.call(Ne,0),K.call(Ne,pr),_e){for(;He=Ne[ct++];)He===Ne[ct]&&(rt=qe.push(ct));for(;rt--;)N.call(Ne,qe[rt],1)}return ne=null,Ne},w.fn.uniqueSort=function(){return this.pushStack(w.uniqueSort(a.apply(this)))},L=w.expr={cacheLength:50,createPseudo:qr,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(Ne){return Ne[1]=Ne[1].replace(Ba,Da),Ne[3]=(Ne[3]||Ne[4]||Ne[5]||"").replace(Ba,Da),Ne[2]==="~="&&(Ne[3]=" "+Ne[3]+" "),Ne.slice(0,4)},CHILD:function(Ne){return Ne[1]=Ne[1].toLowerCase(),Ne[1].slice(0,3)==="nth"?(Ne[3]||Vn.error(Ne[0]),Ne[4]=+(Ne[4]?Ne[5]+(Ne[6]||1):2*(Ne[3]==="even"||Ne[3]==="odd")),Ne[5]=+(Ne[7]+Ne[8]||Ne[3]==="odd")):Ne[3]&&Vn.error(Ne[0]),Ne},PSEUDO:function(Ne){var He,qe=!Ne[6]&&Ne[2];return oa.CHILD.test(Ne[0])?null:(Ne[3]?Ne[2]=Ne[4]||Ne[5]||"":qe&&sa.test(qe)&&(He=Ro(qe,!0))&&(He=qe.indexOf(")",qe.length-He)-qe.length)&&(Ne[0]=Ne[0].slice(0,He),Ne[2]=qe.slice(0,He)),Ne.slice(0,3))}},filter:{TAG:function(Ne){var He=Ne.replace(Ba,Da).toLowerCase();return Ne==="*"?function(){return!0}:function(qe){return T(qe,He)}},CLASS:function(Ne){var He=vn[Ne+" "];return He||(He=new RegExp("(^|"+z+")"+Ne+"("+z+"|$)"))&&vn(Ne,function(qe){return He.test(typeof qe.className=="string"&&qe.className||typeof qe.getAttribute!="undefined"&&qe.getAttribute("class")||"")})},ATTR:function(Ne,He,qe){return function(rt){var ct=Vn.attr(rt,Ne);return ct==null?He==="!=":He?(ct+="",He==="="?ct===qe:He==="!="?ct!==qe:He==="^="?qe&&ct.indexOf(qe)===0:He==="*="?qe&&ct.indexOf(qe)>-1:He==="$="?qe&&ct.slice(-qe.length)===qe:He==="~="?(" "+ct.replace(Nn," ")+" ").indexOf(qe)>-1:He==="|="?ct===qe||ct.slice(0,qe.length+1)===qe+"-":!1):!0}},CHILD:function(Ne,He,qe,rt,ct){var At=Ne.slice(0,3)!=="nth",zt=Ne.slice(-4)!=="last",Jt=He==="of-type";return rt===1&&ct===0?function(Vt){return!!Vt.parentNode}:function(Vt,An,cn){var mn,En,sn,Kn,vi,Hr=At!==zt?"nextSibling":"previousSibling",Dr=Vt.parentNode,la=Jt&&Vt.nodeName.toLowerCase(),No=!cn&&!Jt,ei=!1;if(Dr){if(At){for(;Hr;){for(sn=Vt;sn=sn[Hr];)if(Jt?T(sn,la):sn.nodeType===1)return!1;vi=Hr=Ne==="only"&&!vi&&"nextSibling"}return!0}if(vi=[zt?Dr.firstChild:Dr.lastChild],zt&&No){for(En=Dr[ut]||(Dr[ut]={}),mn=En[Ne]||[],Kn=mn[0]===et&&mn[1],ei=Kn&&mn[2],sn=Kn&&Dr.childNodes[Kn];sn=++Kn&&sn&&sn[Hr]||(ei=Kn=0)||vi.pop();)if(sn.nodeType===1&&++ei&&sn===Vt){En[Ne]=[et,Kn,ei];break}}else if(No&&(En=Vt[ut]||(Vt[ut]={}),mn=En[Ne]||[],Kn=mn[0]===et&&mn[1],ei=Kn),ei===!1)for(;(sn=++Kn&&sn&&sn[Hr]||(ei=Kn=0)||vi.pop())&&!((Jt?T(sn,la):sn.nodeType===1)&&++ei&&(No&&(En=sn[ut]||(sn[ut]={}),En[Ne]=[et,ei]),sn===Vt)););return ei-=ct,ei===rt||ei%rt===0&&ei/rt>=0}}},PSEUDO:function(Ne,He){var qe,rt=L.pseudos[Ne]||L.setFilters[Ne.toLowerCase()]||Vn.error("unsupported pseudo: "+Ne);return rt[ut]?rt(He):rt.length>1?(qe=[Ne,Ne,"",He],L.setFilters.hasOwnProperty(Ne.toLowerCase())?qr(function(ct,At){for(var zt,Jt=rt(ct,He),Vt=Jt.length;Vt--;)zt=h.call(ct,Jt[Vt]),ct[zt]=!(At[zt]=Jt[Vt])}):function(ct){return rt(ct,0,qe)}):rt}},pseudos:{not:qr(function(Ne){var He=[],qe=[],rt=Lo(Ne.replace(U,"$1"));return rt[ut]?qr(function(ct,At,zt,Jt){for(var Vt,An=rt(ct,null,Jt,[]),cn=ct.length;cn--;)(Vt=An[cn])&&(ct[cn]=!(At[cn]=Vt))}):function(ct,At,zt){return He[0]=ct,rt(He,null,zt,qe),He[0]=null,!qe.pop()}}),has:qr(function(Ne){return function(He){return Vn(Ne,He).length>0}}),contains:qr(function(Ne){return Ne=Ne.replace(Ba,Da),function(He){return(He.textContent||w.text(He)).indexOf(Ne)>-1}}),lang:qr(function(Ne){return Dl.test(Ne||"")||Vn.error("unsupported lang: "+Ne),Ne=Ne.replace(Ba,Da).toLowerCase(),function(He){var qe;do if(qe=Be?He.lang:He.getAttribute("xml:lang")||He.getAttribute("lang"))return qe=qe.toLowerCase(),qe===Ne||qe.indexOf(Ne+"-")===0;while((He=He.parentNode)&&He.nodeType===1);return!1}}),target:function(Ne){var He=t.location&&t.location.hash;return He&&He.slice(1)===Ne.id},root:function(Ne){return Ne===We},focus:function(Ne){return Ne===H_()&&Me.hasFocus()&&!!(Ne.type||Ne.href||~Ne.tabIndex)},enabled:Bh(!1),disabled:Bh(!0),checked:function(Ne){return T(Ne,"input")&&!!Ne.checked||T(Ne,"option")&&!!Ne.selected},selected:function(Ne){return Ne.parentNode&&Ne.parentNode.selectedIndex,Ne.selected===!0},empty:function(Ne){for(Ne=Ne.firstChild;Ne;Ne=Ne.nextSibling)if(Ne.nodeType<6)return!1;return!0},parent:function(Ne){return!L.pseudos.empty(Ne)},header:function(Ne){return vs.test(Ne.nodeName)},input:function(Ne){return ps.test(Ne.nodeName)},button:function(Ne){return T(Ne,"input")&&Ne.type==="button"||T(Ne,"button")},text:function(Ne){var He;return T(Ne,"input")&&Ne.type==="text"&&((He=Ne.getAttribute("type"))==null||He.toLowerCase()==="text")},first:Ua(function(){return[0]}),last:Ua(function(Ne,He){return[He-1]}),eq:Ua(function(Ne,He,qe){return[qe<0?qe+He:qe]}),even:Ua(function(Ne,He){for(var qe=0;qeHe?rt=He:rt=qe;--rt>=0;)Ne.push(rt);return Ne}),gt:Ua(function(Ne,He,qe){for(var rt=qe<0?qe+He:qe;++rt1?function(He,qe,rt){for(var ct=Ne.length;ct--;)if(!Ne[ct](He,qe,rt))return!1;return!0}:Ne[0]}function jh(Ne,He,qe){for(var rt=0,ct=He.length;rt-1&&(zt[cn]=!(Jt[cn]=En))}}else sn=Wu(sn===Jt?sn.splice(Hr,sn.length):sn),ct?ct(null,Jt,sn,An):we.apply(Jt,sn)})}function hd(Ne){for(var He,qe,rt,ct=Ne.length,At=L.relative[Ne[0].type],zt=At||L.relative[" "],Jt=At?1:0,Vt=Ol(function(mn){return mn===He},zt,!0),An=Ol(function(mn){return h.call(He,mn)>-1},zt,!0),cn=[function(mn,En,sn){var Kn=!At&&(sn||En!=G)||((He=En).nodeType?Vt(mn,En,sn):An(mn,En,sn));return He=null,Kn}];Jt1&&Vu(cn),Jt>1&&to(Ne.slice(0,Jt-1).concat({value:Ne[Jt-2].type===" "?"*":""})).replace(U,"$1"),qe,Jt