@next-core/preview 0.1.41 → 0.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_next_core_preview=self.webpackChunk_next_core_preview||[]).push([[321],{3902:(e,t,r)=>{r.r(t);var n=r(3028),a=r(4795),o=r(8714),i=r(5566),s=r(9169);r(5745),i.http.interceptors.request.use((e=>{var t;return null!==(t=e.options)&&void 0!==t&&null!==(t=t.interceptorParams)&&void 0!==t&&t.ignoreLoadingBar||window.dispatchEvent(new Event("request.start")),e})),i.http.interceptors.response.use((function(e){return window.dispatchEvent(new Event("request.end")),e}),(function(e){return window.dispatchEvent(new Event("request.end")),Promise.reject(e)}));var l=document.querySelector("#global-loading-bar");l.classList.add("rendered");var c=!1,u=0;function d(){var e=u>0;e!==c&&(c=e,l.classList[e?"add":"remove"]("loading"))}window.addEventListener("request.start",(()=>{u++,d()})),window.addEventListener("request.end",(()=>{u>0&&(u--,d())}));var p,f=(0,o.createRuntime)(),v=document.querySelector("#preview-root"),h=document.querySelector("#portal-mount-point"),m=(0,o.unstable_createRoot)(v,{portal:h,scope:"page",unknownBricks:"silent"}),g=i.http.get(window.BOOTSTRAP_FILE,{responseType:"json"}).then((e=>{f.initialize(e)})),y=!1;function b(e){return w.apply(this,arguments)}function w(){return w=(0,a.Z)((function*(e){y=!0;try{var{type:t,sources:r,options:n}=e;yield function(e,t){return S.apply(this,arguments)}(t,r,n)}finally{if(y=!1,p){var a=p;p=void 0,b(a)}}})),w.apply(this,arguments)}window._preview_only_render=(e,t,r)=>{y?p={type:e,sources:t,options:r}:b({type:e,sources:t,options:r})};var E=!1;function S(){return S=(0,a.Z)((function*(e,t){var{yaml:r,html:n}=t,{theme:a,context:i,functions:l,templates:c,i18n:u,styleText:d,templatesAreArrayOfYaml:p}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(E||(E=!0,document.body.classList.add("bootstrap-ready"),(0,o.applyTheme)("light"===a?a:"dark-v2")),document.body.classList.remove("bootstrap-error"),"html"===e){(0,o.applyTheme)("light"===a?a:"dark-v2");var y=(new DOMParser).parseFromString(n,"text/html"),b=new Set;for(var w of y.body.querySelectorAll("*"))if(w.tagName.includes("-")){var S=w.tagName.toLowerCase();b.add(S)}else if("SCRIPT"===w.tagName){var A=w.text.matchAll(/\bdocument\.createElement\(\s*"([a-zA-Z0-9.]+-[-a-zA-Z0-9.]+)"\s*\)/g);for(var P of A)b.add(P[1])}yield g,yield f.loadBricks(b),v.replaceChildren(),h.replaceChildren();var x=[],I=y.querySelectorAll("script");for(var C of I){var Z=document.createElement("script");Z.text=C.text,Z.type="module",x.push(Z),C.remove()}v.append(...y.head.querySelectorAll("style"),...y.body.childNodes,...x)}else{var O=r?(0,s.safeLoad)(r,{schema:s.JSON_SCHEMA,json:!0}):null,T=[].concat(null!=O?O:[]);d&&T.push({brick:"style",portal:!0,properties:{textContent:d}});var B=k(i),R=k(l),L=k(c,p),_=k(u);yield g,yield m.render(T,{theme:"light"===a?a:"dark-v2",context:B,functions:R,templates:L,i18n:_})}}catch(e){console.error("Render failed:",e),document.body.classList.add("bootstrap-error"),h.textContent="",v.textContent="Render failed: ".concat(String(e))}})),S.apply(this,arguments)}function k(e,t){return"string"==typeof e?(0,s.safeLoad)(e,{schema:s.JSON_SCHEMA,json:!0}):t?e.map((e=>"string"==typeof e.yaml?(0,n.Z)((0,n.Z)({},(0,s.safeLoad)(e.yaml,{schema:s.JSON_SCHEMA,json:!0})),{},{name:e.name}):e)):e}},6919:(e,t,r)=>{r.r(t),r.d(t,{cook:()=>F,isEvaluable:()=>q,isTrackAll:()=>G,precook:()=>V,precookFunction:()=>H,preevaluate:()=>K,shouldAllowRecursiveEvaluations:()=>z});var n=r(6666);class a{constructor(){(0,n.Z)(this,"VariableEnvironment",void 0),(0,n.Z)(this,"LexicalEnvironment",void 0),(0,n.Z)(this,"Function",void 0)}}class o{constructor(e){(0,n.Z)(this,"OuterEnv",void 0),(0,n.Z)(this,"bindingMap",new Map),this.OuterEnv=e}HasBinding(e){return this.bindingMap.has(e)}CreateMutableBinding(e,t){return this.bindingMap.set(e,{mutable:!0,deletable:t}),h(void 0)}CreateImmutableBinding(e,t){return this.bindingMap.set(e,{strict:t}),h(void 0)}InitializeBinding(e,t){var r=this.bindingMap.get(e);return Object.assign(r,{initialized:!0,value:t}),h(void 0)}SetMutableBinding(e,t,r){var n=this.bindingMap.get(e);if(!n.initialized)throw new ReferenceError("".concat(e," is not initialized"));if(!n.mutable)throw new TypeError("Assignment to constant variable");return n.value=t,h(void 0)}GetBindingValue(e,t){var r=this.bindingMap.get(e);if(!r.initialized)throw new ReferenceError("".concat(e," is not initialized"));return r.value}}class i extends o{}class s extends o{}var l=Symbol.for("SourceNode"),c=Symbol.for("FormalParameters"),u=Symbol.for("ECMAScriptCode"),d=Symbol.for("Environment"),p=Symbol.for("IsConstructor");class f{constructor(e,t,r){(0,n.Z)(this,"Base",void 0),(0,n.Z)(this,"ReferenceName",void 0),(0,n.Z)(this,"Strict",void 0),this.Base=e,this.ReferenceName=t,this.Strict=r}}class v{constructor(e,t){(0,n.Z)(this,"Type",void 0),(0,n.Z)(this,"Value",void 0),this.Type=e,this.Value=t}}function h(e){return new v("normal",e)}var m=Symbol("empty completion");function g(e){var t=new Set,r=e=>{if(Array.isArray(e))for(var n of e)r(n);else if(e)switch(e.type){case"Identifier":return void t.add(e.name);case"VariableDeclaration":return r(e.declarations);case"VariableDeclarator":case"FunctionDeclaration":return r(e.id);case"ArrayPattern":return r(e.elements);case"AssignmentPattern":return r(e.left);case"ObjectPattern":return r(e.properties);case"Property":return r(e.value);case"RestElement":return r(e.argument)}};return r(e),Array.from(t)}function y(e){var t=e=>{if(Array.isArray(e))return e.some(t);if(e)switch(e.type){case"ArrayPattern":return t(e.elements);case"AssignmentPattern":return!0;case"ObjectPattern":return t(e.properties);case"Property":return e.computed||t(e.value);case"RestElement":return t(e.argument)}};return t(e)}function b(e,t){var r=[],n={var:t.var},a=(e,t)=>{if(Array.isArray(e))for(var o of e)a(o,t);else if(e){switch(e.type){case"FunctionDeclaration":return void(Number(!t.var)^Number(t.topLevel)&&r.push(e));case"VariableDeclaration":return void(Number(!t.var)^Number("var"===e.kind)&&r.push(e));case"SwitchCase":return void a(e.consequent,n);case"CatchClause":return void a(e.body,n)}if(t.var)switch(e.type){case"BlockStatement":case"DoWhileStatement":case"WhileStatement":return void a(e.body,n);case"IfStatement":return a(e.consequent,n),void a(e.alternate,n);case"ForStatement":return a(e.init,n),void a(e.body,n);case"ForInStatement":case"ForOfStatement":return a(e.left,n),void a(e.body,n);case"SwitchStatement":return void a(e.cases,n);case"TryStatement":return a(e.block,n),a(e.handler,n),void a(e.finalizer,n)}}};return a(e,t),r}function w(e){return"unresolvable"!==e.Base&&!(e.Base instanceof o)}function E(e,t){return e.Base.InitializeBinding(e.ReferenceName,t)}function S(e,t,r){if(null==t)return e;var n=Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));for(var a of n)if(!r.has(a)){var o=Object.getOwnPropertyDescriptor(t,a);null!=o&&o.enumerable&&(e[a]=t[a])}return e}function k(e,t){var r="const"===e.kind;for(var n of g(e))r?t.CreateImmutableBinding(n,!0):t.CreateMutableBinding(n,!1)}function A(e){return"normal"===e.Type||"continue"==e.Type}function P(e,t){return e.Value!==m?e:new v(e.Type,t)}function x(e){if(e instanceof v&&(e=e.Value),!(e instanceof f))return e;if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof o?e.Base.GetBindingValue(e.ReferenceName,e.Strict):e.Base[e.ReferenceName]}function I(e){return"symbol"==typeof e?e:String(e)}function C(e,t){return e[t]}function Z(e,t){if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof o?e.Base.SetMutableBinding(e.ReferenceName,t,e.Strict):(e.Base[e.ReferenceName]=t,h(void 0))}function O(e){if(t=e,!(Array.isArray(t)||null!=t&&"function"==typeof t[Symbol.iterator]))throw new TypeError("".concat(typeof e," is not iterable"));var t;return e[Symbol.iterator]()}function T(e){if(null==e)throw new TypeError("Cannot destructure properties of undefined or null")}function B(e,t,r){return e?e.HasBinding(t)?new f(e,t,r):B(e.OuterEnv,t,r):new f("unresolvable",t,r)}function R(e,t,r){switch(t){case"+":return e+r;case"-":return e-r;case"/":return e/r;case"%":return e%r;case"*":return e*r;case"**":return e**r;case"==":return e==r;case"===":return e===r;case"!=":return e!=r;case"!==":return e!==r;case">":return e>r;case"<":return e<r;case">=":return e>=r;case"<=":return e<=r}throw new SyntaxError("Unsupported binary operator `".concat(t,"`"))}var L=new WeakSet([Function,Object,Function.prototype,Object.prototype,function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}()]);function _(e){if(L.has(e))throw new TypeError("Cannot access reserved objects such as `Function`.")}var M=new WeakSet([Array,Map,Set,URLSearchParams,WeakMap,WeakSet,RegExp]);function F(e,t){var r,{rules:n,globalVariables:o={},hooks:L={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},F="FunctionDeclaration"!==e.type,U=new i(null),N=new a;N.VariableEnvironment=U,N.LexicalEnvironment=U;var j=[N];for(var[V,D]of Object.entries(o))U.CreateImmutableBinding(V,!0),U.InitializeBinding(V,D);var $=new WeakMap;function W(e,r){var n,a,o;switch(null===(n=L.beforeEvaluate)||void 0===n||n.call(L,e),e.type){case"ArrayExpression":var s=[];for(var l of e.elements)if(l)if("SpreadElement"===l.type){var c=x(W(l.argument));s.push(...c)}else s.push(x(W(l)));else s.length+=1;return h(s);case"ArrowFunctionExpression":return de(e),h(oe(e,H().LexicalEnvironment,!1));case"BinaryExpression":var u=x(W(e.left)),d=W(e.right).Value,y=x(d);if(F&&"|>"===e.operator){if("function"!=typeof y){var b=t.substring(e.right.start,e.right.end);throw new TypeError("".concat(b," is not a function"))}var C;return d instanceof f&&w(d)&&(C=d.Base),h(y.call(C,u))}return h(R(u,e.operator,y));case"CallExpression":var T=W(e.callee,r).Value,B=x(T);return null==B&&(e.optional||null!=r&&r.skipped)?(r.skipped=!0,h(void 0)):(_(B),te(B,T,e.arguments,e.callee));case"ChainExpression":return W(e.expression,{});case"ConditionalExpression":return h(x(W(x(W(e.test))?e.consequent:e.alternate)));case"Identifier":return h(K(e.name));case"Literal":if(e.regex){if(null===e.value)throw new SyntaxError("Invalid regular expression: ".concat(e.raw));if(e.regex.flags.includes("u"))throw new SyntaxError("Unsupported unicode flag in regular expression: ".concat(e.raw))}return h(e.value);case"LogicalExpression":var U=x(W(e.left));switch(e.operator){case"&&":return h(U&&x(W(e.right)));case"||":return h(U||x(W(e.right)));case"??":return h(null!=U?U:x(W(e.right)));default:throw new SyntaxError("Unsupported logical operator '".concat(e.operator,"'"))}case"MemberExpression":var N=x(W(e.object,r).Value);if(null==N&&(e.optional||null!=r&&r.skipped))return r.skipped=!0,h(void 0);_(N);var j=e.computed?function(e,t,r){var n=I(x(W(t)));return new f(e,n,!0)}(N,e.property):function(e,t,r){var n=t.name;return new f(e,n,!0)}(N,e.property);return _(j),h(j);case"NewExpression":return function(e,r){var n=x(W(e)),a=re(r);if("function"!=typeof n||!1===n[p]){var o=t.substring(e.start,e.end);throw new TypeError("".concat(o," is not a constructor"))}if(!function(e){return M.has(e)||e===Date}(n)){var i=t.substring(e.start,e.end);throw new TypeError("".concat(i," is not an allowed constructor"))}return h(new n(...a))}(e.callee,e.arguments);case"ObjectExpression":var V={};for(var D of e.properties)if("SpreadElement"===D.type)S(V,x(W(D.argument)),new Set);else{if("init"!==D.kind)throw new SyntaxError("Unsupported object getter/setter");var $=D.computed||"Identifier"!==D.key.type?se(D.key):D.key.name;if("__proto__"===$)throw new TypeError("Setting '__proto__' property is not allowed");V[$]=x(W(D.value))}return h(V);case"SequenceExpression":var J;for(var Q of e.expressions)J=h(x(W(Q)));return J;case"TemplateLiteral":var X=[e.quasis[0].value.cooked],ae=0;for(var le of e.expressions){var ce=x(W(le));X.push(String(ce)),X.push(e.quasis[ae+=1].value.cooked)}return h(X.join(""));case"TaggedTemplateExpression":var ue=W(e.tag).Value,pe=x(ue);return _(pe),te(pe,ue,e.quasi,e.tag);case"UnaryExpression":var fe=W(e.argument).Value;if(!F&&"delete"===e.operator){if(!(fe instanceof f))return h(!0);if(w(fe))return h(delete fe.Base[fe.ReferenceName])}return"typeof"===e.operator?fe instanceof f&&"unresolvable"===fe.Base?h("undefined"):h(typeof x(fe)):h(function(e,t){switch(t){case"!":return!e;case"+":return+e;case"-":return-e;case"void":return}throw new SyntaxError("Unsupported unary operator `".concat(t,"`"))}(x(fe),e.operator))}if(!F)switch(e.type){case"AssignmentExpression":if("="===e.operator){if("ArrayPattern"!==e.left.type&&"ObjectPattern"!==e.left.type){var ve=W(e.left).Value,he=x(W(e.right));return Z(ve,he),h(he)}var me=x(W(e.right));return Y(e.left,me),h(me)}var ge=W(e.left).Value,ye=x(ge),be=x(W(e.right)),we=function(e,t,r){switch(t){case"+=":case"-=":case"*=":case"/=":case"%=":case"**=":return R(e,t.substr(0,t.length-1),r)}throw new SyntaxError("Unsupported assignment operator `".concat(t,"`"))}(ye,e.operator,be);return Z(ge,we),h(we);case"BlockStatement":if(!e.body.length)return h(m);var Ee=H().LexicalEnvironment,Se=new i(Ee);ee(e.body,Se),H().LexicalEnvironment=Se;var ke=ne(e.body);return H().LexicalEnvironment=Ee,ke;case"BreakStatement":return new v("break",m);case"ContinueStatement":return new v("continue",m);case"EmptyStatement":case"FunctionDeclaration":return h(m);case"DoWhileStatement":return q(function(e){for(var t;;){var r=W(e.body);if(!A(r))return P(r,t);if(r.Value!==m&&(t=r.Value),!x(W(e.test)))return h(t)}}(e));case"ExpressionStatement":case"TSAsExpression":return W(e.expression);case"ForInStatement":case"ForOfStatement":return q(function(e){var t=e.left,r="VariableDeclaration"===t.type?"var"===t.kind?"varBinding":"lexicalBinding":"assignment",n="lexicalBinding"===r?g(t):[],a="ForInStatement"===e.type?"enumerate":"iterate",o=function(e,t,r){var n=H(),a=n.LexicalEnvironment;if(e.length>0){var o=new i(a);for(var s of e)o.CreateMutableBinding(s,!1);n.LexicalEnvironment=o}var l=W(t);n.LexicalEnvironment=a;var c=x(l);if("enumerate"===r){if(null==c)return new v("break",m);var u=function*(e){for(var t in e)yield t}(c);return h(u)}return h(O(c))}(n,e.right,a);return"normal"!==o.Type?o:function(e,t,r,n,a){for(var o,s="assignment"===a?e:e.declarations[0].id,l=H().LexicalEnvironment,c="ObjectPattern"===s.type||"ArrayPattern"===s.type;;){var{done:u,value:d}=r.next();if(u)return h(o);var p=void 0,f=void 0;if("lexicalBinding"===a){if(k(e,f=new i(l)),H().LexicalEnvironment=f,!c){var[v]=g(s);p=K(v)}}else c||(p=W(s).Value);c?"assignment"===a?Y(s,d):ie(s,d,"varBinding"===a?void 0:f):"lexicalBinding"===a?E(p,d):Z(p,d);var y=W(t);if(H().LexicalEnvironment=l,!A(y)){var b=P(y,o);if("enumerate"!==n&&void 0!==r.return){var w=r.return();if(!w||!["object","function"].includes(typeof w))throw new TypeError("Iterator result is not an object")}return b}y.Value!==m&&(o=y.Value)}}(t,e.body,o.Value,a,r)}(e));case"ForStatement":return q(function(e){var t;if("VariableDeclaration"===(null===(t=e.init)||void 0===t?void 0:t.type)){if("var"===e.init.kind)return W(e.init),G(e.test,e.update,e.body,[]);var r=H().LexicalEnvironment,n=new i(r),a="const"===e.init.kind,o=g(e.init);for(var s of o)a?n.CreateImmutableBinding(s,!0):n.CreateMutableBinding(s,!1);H().LexicalEnvironment=n,W(e.init);var l=a?[]:Array.from(o),c=G(e.test,e.update,e.body,l);return H().LexicalEnvironment=r,c}return e.init&&x(W(e.init)),G(e.test,e.update,e.body,[])}(e));case"FunctionExpression":return de(e),h(function(e){var t=H().LexicalEnvironment;if(e.id){var r=e.id.name,n=new i(t);n.CreateImmutableBinding(r,!1);var a=oe(e,n,!0);return n.InitializeBinding(r,a),a}return oe(e,t,!0)}(e));case"IfStatement":return x(W(e.test))?(null!==(a=L.beforeBranch)&&void 0!==a&&a.call(L,e,"if"),P(W(e.consequent),void 0)):(null!==(o=L.beforeBranch)&&void 0!==o&&o.call(L,e,"else"),e.alternate?P(W(e.alternate),void 0):h(void 0));case"ReturnStatement":var Ae;return e.argument&&(Ae=x(W(e.argument))),new v("return",Ae);case"ThrowStatement":throw x(W(e.argument));case"UpdateExpression":var Pe=W(e.argument).Value,xe=Number(x(Pe)),Ie="++"===e.operator?xe+1:xe-1;return Z(Pe,Ie),h(e.prefix?Ie:xe);case"SwitchCase":return ne(e.consequent);case"SwitchStatement":var Ce=x(W(e.discriminant)),Ze=H().LexicalEnvironment,Oe=new i(Ze);ee(e.cases,Oe),H().LexicalEnvironment=Oe;var Te=function(e,t){var r,n=e.findIndex((e=>!e.test)),a=n>=0,o=a?e.slice(0,n):e,i=!1;for(var s of o)if(i||(i=z(s,t)),i){var l=W(s);if(l.Value!==m&&(r=l.Value),"normal"!==l.Type)return P(l,r)}if(!a)return h(r);var c=!1,u=e.slice(n+1);if(!i)for(var d of u)if(c||(c=z(d,t)),c){var p=W(d);if(p.Value!==m&&(r=p.Value),"normal"!==p.Type)return P(p,r)}if(c)return h(r);var f=W(e[n]);if(f.Value!==m&&(r=f.Value),"normal"!==f.Type)return P(f,r);for(var v of u){var g=W(v);if(g.Value!==m&&(r=g.Value),"normal"!==g.Type)return P(g,r)}return h(r)}(e.cases,Ce);return H().LexicalEnvironment=Ze,q(Te);case"TryStatement":var Be;try{Be=W(e.block)}catch(t){if(!e.handler)throw t;var Re;null===(Re=L.beforeEvaluate)||void 0===Re||Re.call(L,e.handler),Be=function(e,t){if(!e.param)return W(e.body);var r=H().LexicalEnvironment,n=new i(r);for(var a of g(e.param))n.CreateMutableBinding(a,!1);H().LexicalEnvironment=n,ie(e.param,t,n);var o=W(e.body);return H().LexicalEnvironment=r,o}(e.handler,t)}finally{if(e.finalizer){var Le=W(e.finalizer);"normal"!==Le.Type&&(Be=Le)}}return Be;case"VariableDeclaration":var _e;for(var Me of e.declarations)if(Me.init)if("Identifier"===Me.id.type){var Fe=K(Me.id.name),Ue=x(W(Me.init));_e="var"===e.kind?Z(Fe,Ue):E(Fe,Ue)}else{var Ne=x(W(Me.init));_e=ie(Me.id,Ne,"var"===e.kind?void 0:H().LexicalEnvironment)}else _e="var"===e.kind?h(m):E(K(Me.id.name),void 0);return _e;case"WhileStatement":return q(function(e){for(var t;;){if(!x(W(e.test)))return h(t);var r=W(e.body);if(!A(r))return P(r,t);r.Value!==m&&(t=r.Value)}}(e))}throw new SyntaxError("Unsupported node type `".concat(e.type,"`"))}function H(){return j[j.length-1]}function K(e,t){return t||(t=H().LexicalEnvironment),B(t,e,!0)}function q(e){return"break"===e.Type?e.Value===m?h(void 0):h(e.Value):e}function z(e,t){return t===x(W(e.test))}function G(e,t,r,n){var a;for(J(n);;){if(e&&!x(W(e)))return h(a);var o=W(r);if(!A(o))return P(o,a);o.Value&&(a=o.Value),J(n),t&&x(W(t))}}function J(e){if(0!==e.length){var t=H().LexicalEnvironment,r=t.OuterEnv,n=new i(r);for(var a of e){n.CreateMutableBinding(a,!1);var o=t.GetBindingValue(a,!1);n.InitializeBinding(a,o)}H().LexicalEnvironment=n}}function Y(e,t){if("ObjectPattern"===e.type)return T(t),e.properties.length>0&&function(e,t){var r=new Set;for(var n of e)if("Property"===n.type){var a=n.computed||"Identifier"!==n.key.type?se(n.key):n.key.name,o="AssignmentPattern"===n.value.type?n.value.left:n.value;if("Identifier"===o.type){var i=K(o.name),s=C(t,a);"AssignmentPattern"===n.value.type&&void 0===s&&(s=x(W(n.value.right))),Z(i,s),r.add(a)}else Q(n.value,t,a),r.add(a)}else X(n,t,r)}(e.properties,t),h(m);var r=O(t);return function(e,t){var r=h(m);for(var n of e)if(n){var a="RestElement"===n.type?n.argument:"AssignmentPattern"===n.type?n.left:n,o="ArrayPattern"===a.type||"ObjectPattern"===a.type,i=void 0;o||(i=W(a).Value);var s=void 0;if("RestElement"!==n.type){var{done:l,value:c}=t.next(),u=l?void 0:c;s="AssignmentPattern"===n.type&&void 0===u?x(W(n.right)):u}else{s=[];for(var d=0;;){var{done:p,value:f}=t.next();if(p)break;s[d]=f,d++}}r=o?Y(a,s):Z(i,s)}else t.next(),r=h(m);return r}(e.elements,r)}function Q(e,t,r){var n,a="AssignmentPattern"===e.type?e.left:e,o="ArrayPattern"===a.type||"ObjectPattern"===a.type;o||(n=W(a).Value);var i,s=C(t,r);return i="AssignmentPattern"===e.type&&void 0===s?x(W(e.right)):s,o?Y(a,i):Z(n,i)}function X(e,t,r){return Z(W(e.argument).Value,S({},t,r))}function ee(e,t){var r=b(e,{var:!1,topLevel:!1});for(var n of r){var a="VariableDeclaration"===n.type&&"const"===n.kind;for(var o of g(n))a?t.CreateImmutableBinding(o,!0):t.CreateMutableBinding(o,!1);if("FunctionDeclaration"===n.type){var[i]=g(n),s=ae(n,t);t.InitializeBinding(i,s)}}}function te(e,r,n,a){var o;r instanceof f&&w(r)&&(o=r.Base);var i=re(n);if("function"!=typeof e){var s=t.substring(a.start,a.end);throw new TypeError("".concat(s," is not a function"))}var l=e.apply(o,i);return _(l),h(l)}function re(e){var t=[];if(Array.isArray(e))for(var r of e)if("SpreadElement"===r.type){var n=x(W(r.argument));t.push(...n)}else t.push(x(W(r)));else for(var a of(t.push(function(e){var t=$.get(e);if(t)return t;var r=e.quasis.map((e=>e.value.raw)),n=e.quasis.map((e=>e.value.cooked));return Object.freeze(r),Object.defineProperty(n,"raw",{value:r,writable:!1,enumerable:!1,configurable:!1}),Object.freeze(n),$.set(e,n),n}(e)),e.expressions))t.push(x(W(a)));return t}function ne(e){var t=h(m);for(var r of e){var n=W(r);if("normal"!==n.Type)return n;t=P(t,n.Value)}return t}function ae(e,t){return oe(e,t,!0)}function oe(e,t,r){var o=function(){return function(e,t){var r;null===(r=L.beforeCall)||void 0===r||r.call(L,e[l]),function(e){var t=new a;t.Function=e;var r=new s(e[d]);t.VariableEnvironment=r,t.LexicalEnvironment=r,j.push(t)}(e);var o=function(e,t){return function(e,t,r){return function(e,t){for(var r=H(),a=e[u],o=e[c],s=g(o),l=y(o),d=b(a,{var:!0,topLevel:!0}),p=g(d),f=[],v=[],h=d.length-1;h>=0;h--){var m=d[h];if("FunctionDeclaration"===m.type){de(m);var[w]=g(m);f.includes(w)||(f.unshift(w),v.unshift(m))}else if(null!=n&&n.noVar)throw new SyntaxError("Var declaration is not recommended, use `let` or `const` instead")}var E,S=r.LexicalEnvironment;for(var k of s)S.CreateMutableBinding(k,!1);if(ce(o,O(t),S),l)for(var A of(E=new i(S),r.VariableEnvironment=E,p)){E.CreateMutableBinding(A,!1);var P=void 0;s.includes(A)&&!f.includes(A)&&(P=S.GetBindingValue(A,!1)),E.InitializeBinding(A,P)}else{for(var x of p)s.includes(x)||(S.CreateMutableBinding(x,!1),S.InitializeBinding(x,void 0));E=S}var I=E;r.LexicalEnvironment=I;var C=b(a,{var:!1,topLevel:!0});for(var Z of C)for(var T of g(Z))"const"===Z.kind?I.CreateImmutableBinding(T,!0):I.CreateMutableBinding(T,!1);for(var B of v){var[R]=g(B),L=ae(B,I);E.SetMutableBinding(R,L,!1)}}(t,r),Array.isArray(e)?ne(e):new v("return",x(W(e)))}(e[u],e,t)}(e,t);if(j.pop(),"return"===o.Type)return o.Value}(o,arguments)};return Object.defineProperties(o,{[l]:{value:e},[c]:{value:e.params},[u]:{value:"BlockStatement"===e.body.type?e.body.body:e.body},[d]:{value:t},[p]:{value:r}}),o}function ie(e,t,r){switch(e.type){case"Identifier":return function(e,t,r){return r.InitializeBinding(e,t),h(m)}(e.name,t,r);case"ObjectPattern":return T(t),function(e,t,r){var n=new Set;for(var a of e){if("RestElement"===a.type)return le(a,t,r,n);if(a.computed||"Identifier"!==a.key.type){var o=se(a.key);ue(a.value,t,r,o),n.add(o)}else ue(a.value,t,r,a.key.name),n.add(a.key.name)}return h(m)}(e.properties,t,r);case"ArrayPattern":var n=O(t);return ce(e.elements,n,r)}}function se(e){return I(x(W(e)))}function le(e,t,r,n){var a=K(e.argument.name,r),o=S({},t,n);return r?E(a,o):Z(a,o)}function ce(e,t,r){if(0===e.length)return h(m);var n;for(var a of e)if(a)if("RestElement"===a.type)if("Identifier"===a.argument.type)for(var o=K(a.argument.name,r),i=[],s=0;;){var{done:l,value:c}=t.next();if(l){n=r?E(o,i):Z(o,i);break}i[s]=c,s++}else for(var u=[],d=0;;){var{done:p,value:f}=t.next();if(p){n=ie(a.argument,u,r);break}u[d]=f,d++}else{var v="AssignmentPattern"===a.type?a.left:a;switch(v.type){case"ObjectPattern":case"ArrayPattern":var g=void 0,{done:y,value:b}=t.next();y||(g=b),"AssignmentPattern"===a.type&&void 0===g&&(g=x(W(a.right))),n=ie(v,g,r);break;case"Identifier":var w=K(v.name,r),S=void 0,{done:k,value:A}=t.next();k||(S=A),"AssignmentPattern"===a.type&&void 0===S&&(S=x(W(a.right))),n=r?E(w,S):Z(w,S)}}else t.next(),n=h(m);return n}function ue(e,t,r,n){if("Identifier"===e.type||"AssignmentPattern"===e.type&&"Identifier"===e.left.type){var a=K("Identifier"===e.type?e.name:e.left.name,r),o=C(t,n);return"AssignmentPattern"===e.type&&void 0===o&&(o=x(W(e.right))),r?E(a,o):Z(a,o)}var i=C(t,n);return"AssignmentPattern"===e.type&&void 0===i&&(i=x(W(e.right))),ie("AssignmentPattern"===e.type?e.left:e,i,r)}function de(e){if(e.async||e.generator)throw new SyntaxError("".concat(e.async?"Async":"Generator"," function is not allowed"));if(F&&!e.expression)throw new SyntaxError("Only an `Expression` is allowed in `ArrowFunctionExpression`'s body")}if(F)return x(W(e));null===(r=L.beforeEvaluate)||void 0===r||r.call(L,e),de(e);var[pe]=g(e);U.CreateImmutableBinding(pe,!0);var fe=ae(e,U);return U.InitializeBinding(pe,fe),fe}var U=r(3028);class N{constructor(){(0,n.Z)(this,"VariableEnvironment",void 0),(0,n.Z)(this,"LexicalEnvironment",void 0)}}class j{constructor(e){(0,n.Z)(this,"OuterEnv",void 0),(0,n.Z)(this,"bindingSet",new Set),this.OuterEnv=e}HasBinding(e){return this.bindingSet.has(e)}CreateBinding(e){this.bindingSet.add(e)}}function V(e){var{expressionOnly:t,visitors:r,withParent:n,hooks:a={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new Set,i=[],s=new j(null),l=new N;function c(){return i[i.length-1]}function u(e,t,r){for(var n of t)d(e[n],null==r?void 0:r.concat({node:e,key:n}))}function d(e,n){if(Array.isArray(e))e.forEach(((e,t)=>{d(e,n?n.slice(0,-1).concat((0,U.Z)((0,U.Z)({},n[n.length-1]),{},{index:t})):n)}));else if(e){var i,s;switch(null===(i=a.beforeVisit)||void 0===i||i.call(a,e,n),function(e){var t,n;r&&(t=r,n=e.type,Object.prototype.hasOwnProperty.call(t,n))&&r[e.type](e)}(e),e.type){case"Identifier":var l;return D=e.name,void(f(c().LexicalEnvironment,D)||(null===(l=a.beforeVisitGlobal)||void 0===l||l.call(a,e,n),o.add(e.name)));case"ArrayExpression":case"ArrayPattern":return void u(e,["elements"],n);case"ArrowFunctionExpression":return void h(m(e,c().LexicalEnvironment),n);case"AssignmentPattern":case"BinaryExpression":case"LogicalExpression":return void u(e,["left","right"],n);case"CallExpression":case"NewExpression":return void u(e,["callee","arguments"],n);case"ChainExpression":return void u(e,["expression"],n);case"ConditionalExpression":return void u(e,["test","consequent","alternate"],n);case"MemberExpression":return u(e,["object"],n),void(e.computed&&u(e,["property"],n));case"ObjectExpression":case"ObjectPattern":return void u(e,["properties"],n);case"Property":return e.computed&&u(e,["key"],n),void u(e,["value"],n);case"RestElement":case"SpreadElement":case"UnaryExpression":return void u(e,["argument"],n);case"SequenceExpression":case"TemplateLiteral":return void u(e,["expressions"],n);case"TaggedTemplateExpression":return void u(e,["tag","quasi"],n);case"Literal":return}if(!t)switch(e.type){case"AssignmentExpression":return void u(e,["right","left"],n);case"BlockStatement":if(!e.body.length)return;var y=c(),b=y.LexicalEnvironment,w=new j(b);return v(e.body,w),y.LexicalEnvironment=w,u(e,["body"],n),void(y.LexicalEnvironment=b);case"BreakStatement":case"ContinueStatement":case"EmptyStatement":return;case"CatchClause":var E=c(),S=E.LexicalEnvironment,k=new j(S);return p(e.param,k),E.LexicalEnvironment=k,u(e,["param","body"],n),void(E.LexicalEnvironment=S);case"DoWhileStatement":return void u(e,["body","test"],n);case"ExpressionStatement":case"TSAsExpression":return void u(e,["expression"],n);case"ForInStatement":case"ForOfStatement":var A="VariableDeclaration"===e.left.type&&"var"!==e.left.kind,P=c(),x=P.LexicalEnvironment;if(A){var I=new j(x);p(e.left,I),P.LexicalEnvironment=I}if(u(e,["right"],n),P.LexicalEnvironment=x,A){var C=new j(x);p(e.left,C),P.LexicalEnvironment=C}return u(e,["left","body"],n),void(P.LexicalEnvironment=x);case"ForStatement":var Z,O="VariableDeclaration"===(null===(Z=e.init)||void 0===Z?void 0:Z.type)&&"var"!==e.init.kind,T=c(),B=T.LexicalEnvironment;if(O){var R=new j(B);p(e.init,R),T.LexicalEnvironment=R}return u(e,["init","test","body","update"],n),void(T.LexicalEnvironment=B);case"FunctionDeclaration":var[L]=g(e),_=c().LexicalEnvironment,M=m(e,_);return _.CreateBinding(L),void h(M,n);case"FunctionExpression":return void h(function(e){var t=c().LexicalEnvironment;if(!e.id)return m(e,t);var r=e.id.name,n=new j(t);return n.CreateBinding(r),m(e,n)}(e),n);case"IfStatement":return void u(e,["test","consequent","alternate"],n);case"ReturnStatement":case"ThrowStatement":case"UpdateExpression":return void u(e,["argument"],n);case"SwitchCase":return void u(e,["test","consequent"],n);case"SwitchStatement":u(e,["discriminant"],n);var F=c(),N=F.LexicalEnvironment,V=new j(N);return v(e.cases,V),F.LexicalEnvironment=V,u(e,["cases"],n),void(F.LexicalEnvironment=N);case"TryStatement":return void u(e,["block","handler","finalizer"],n);case"VariableDeclaration":return void u(e,["declarations"],n);case"VariableDeclarator":return void u(e,["id","init"],n);case"WhileStatement":return void u(e,["test","body"],n)}(null===(s=a.beforeVisitUnknown)||void 0===s?void 0:s.call(a,e,n))||console.warn("Unsupported node type `".concat(e.type,"`"))}var D}function p(e,t){for(var r of g(e))t.CreateBinding(r)}function f(e,t){return!!e&&(e.HasBinding(t)||f(e.OuterEnv,t))}function v(e,t){p(b(e,{var:!1,topLevel:!1}),t)}function h(e,t){var r,n,a;r=e,n=new N,a=new j(r.Environment),n.VariableEnvironment=a,n.LexicalEnvironment=a,i.push(n),function(e,t){var r,n=c(),a=e.ECMAScriptCode,o=e.FormalParameters,i=y(o),s=g(b(a,{var:!0,topLevel:!0})),l=n.LexicalEnvironment;if(p(o,l),d(o,null==t?void 0:t.concat({node:e.Function,key:"params"})),i)for(var u of(r=new j(l),n.VariableEnvironment=r,s))r.CreateBinding(u);else{for(var f of s)l.CreateBinding(f);r=l}var v=r;n.LexicalEnvironment=v,p(b(a,{var:!1,topLevel:!0}),v)}(e,t),d(e.ECMAScriptCode,null==t?void 0:t.concat({node:e.Function,key:"body"}).concat("BlockStatement"===e.Function.body.type?{node:e.Function.body,key:"body"}:[])),i.pop()}function m(e,t){return{Function:e,FormalParameters:e.params,ECMAScriptCode:"BlockStatement"===e.body.type?e.body.body:e.body,Environment:t}}return l.VariableEnvironment=s,l.LexicalEnvironment=s,i.push(l),d(e,n?[]:void 0),o}var D=r(2159),$=r(1874),W=["typescript"];function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{typescript:r}=t,n=(0,D.Z)(t,W),a=function(e){var{typescript:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,$.Qc)(e,{plugins:["estree",t&&"typescript"].filter(Boolean),strictMode:!0,attachComment:!1}).program.body,n=t?[]:r;if(t)for(var a of r)if(a.type.startsWith("TS")){if(/Enum|Import|Export/.test(a.type))throw new SyntaxError("Unsupported TypeScript syntax: ".concat(a.type))}else n.push(a);if(0===n.length)throw new SyntaxError("Function declaration not found");if(n.length>1||"FunctionDeclaration"!==n[0].type)throw new SyntaxError("Expect a single function declaration at top level, but received: ".concat(n.map((e=>'"'.concat(e.type,'"'))).join(", ")));return n[0]}(e,{typescript:r});return{function:a,attemptToVisitGlobals:V(a,n)}}function K(e,t){var r=[],n=e.replace(/^\s*<%[~=]?\s|\s%>\s*$/g,(e=>(r.push(e),""))),a=function(e){return(0,$.BJ)(e,{plugins:["estree",["pipelineOperator",{proposal:"minimal"}]],attachComment:!1})}(n);return{expression:a,attemptToVisitGlobals:V(a,(0,U.Z)((0,U.Z)({},t),{},{expressionOnly:!0})),source:n,prefix:r[0],suffix:r[1]}}function q(e){return/^\s*<%[~=]?\s/.test(e)&&/\s%>\s*$/.test(e)}function z(e){return/^\s*<%~\s/.test(e)}function G(e){return/^\s*<%=\s/.test(e)&&/\s%>\s*$/.test(e)}},2424:(e,t,r)=>{r.r(t),r.d(t,{HttpAbortError:()=>m,HttpFetchError:()=>f,HttpParseError:()=>h,HttpResponseError:()=>v,createHttpInstance:()=>_,defaultAdapter:()=>Z,fetch:()=>n,getUrlWithParams:()=>I,http:()=>L,isHttpAbortError:()=>A});var n=(e,t)=>{var r=new Request(e,Object.assign({credentials:"same-origin"},t));return self.fetch(r)},a=r(5866),o=r(3395),i=r(6666),s=r(687),l=r(6171),c=r(381),u=r(3028),d=r(2159),p=r(4795);class f extends Error{constructor(e){super(e),this.name="HttpFetchError",Error.captureStackTrace&&Error.captureStackTrace(this,f)}}class v extends Error{constructor(e,t){super(e.statusText),(0,i.Z)(this,"response",void 0),(0,i.Z)(this,"responseJson",void 0),this.name="HttpResponseError",Error.captureStackTrace&&Error.captureStackTrace(this,v),this.response=e,this.responseJson=t}}class h extends Error{constructor(e){super(e.statusText),(0,i.Z)(this,"response",void 0),this.name="HttpParseError",Error.captureStackTrace&&Error.captureStackTrace(this,h),this.response=e}}class m extends Error{constructor(e){super(e),this.name="HttpAbortError"}}class g{constructor(){(0,i.Z)(this,"handlers",[])}use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){this.handlers.forEach((t=>{null!==t&&e(t)}))}}var y=["params","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache"],b=["params","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache","headers"],w=["body","method"];function E(e){return null==e}var S=document.querySelector("base"),k=S?S.href:location.origin+"/",A=e=>e instanceof DOMException&&20===e.code,P=(e,t)=>({error:e,config:t}),x=function(){var e=(0,p.Z)((function*(e,t,r){return new Promise(function(){var a=(0,p.Z)((function*(a,o){var i;r.url=e;var{responseType:s}=r.options||{};s||(s="json");try{i=yield n(e,t)}catch(e){return void o(P(A(e)?new m(e.toString()):new f(e.toString()),r))}if(i.ok){var l;try{l=yield i[s]()}catch(e){return void o(P(A(e)?new m(e.toString()):new h(i),r))}a({config:r,status:i.status,statusText:i.statusText,headers:i.headers,data:l})}else{var c;try{c=yield i.json()}catch(e){}o(P(new v(i,c),r))}}));return function(e,t){return a.apply(this,arguments)}}())}));return function(t,r,n){return e.apply(this,arguments)}}(),I=(e,t)=>{if(t){var r=new URL(e,k);t instanceof URLSearchParams?t.forEach((function(e,t){r.searchParams.append(t,e)})):Object.entries(t).forEach((e=>{var[t,n]=e;Array.isArray(n)?n.forEach((e=>{r.searchParams.append(t,E(e)?"":e)})):r.searchParams.append(t,E(n)?"":n)}));var{href:n}=r;return n.startsWith(k)?n.substr(k.length):n}return e},C=(e,t)=>{if(void 0!==e){var r=new Headers(t||{}),n="Content-Type",a=e;return r.has(n)||("string"==typeof e?r.set(n,"application/x-www-form-urlencoded"):e instanceof FormData||(r.set(n,"application/json"),a=JSON.stringify(e))),{body:a,headers:r}}return{headers:t}},Z=e=>{var{url:t,method:r,data:n}=e;return["DELETE","GET","HEAD"].includes(e.method)?((e,t,r)=>{var n=r.options||{},{params:a,responseType:o,interceptorParams:i,observe:s,noAbortOnRouteChange:l,useCache:c}=n,p=(0,d.Z)(n,y);return x(I(t,a),(0,u.Z)((0,u.Z)({},p),{},{method:e}),r)})(r,t,e):((e,t,r,n)=>{var a=n.options||{},{params:o,responseType:i,interceptorParams:s,observe:l,noAbortOnRouteChange:c,useCache:p,headers:f}=a,v=(0,d.Z)(a,b);return x(I(t,o),(0,u.Z)((0,u.Z)({},v),{},{method:e},C(r,f)),n)})(r,t,n,e)},O=new WeakMap,T=new WeakSet;class B{constructor(e){var t=this;(0,a.Z)(this,T),(0,i.Z)(this,"interceptors",void 0),(0,o.Z)(this,O,{writable:!0,value:Z}),(0,i.Z)(this,"request",function(){var e=(0,p.Z)((function*(e,r,n){var a=r||{},{body:o,method:i}=a,s=(0,d.Z)(a,w);return(0,l.Z)(t,T,R).call(t,{url:e,data:o,method:i||"GET",options:(0,u.Z)((0,u.Z)({},n||{}),s)})}));return function(t,r,n){return e.apply(this,arguments)}}()),(0,i.Z)(this,"simpleRequest",(function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.Z)(t,T,R).call(t,{url:r,method:e,options:n})})),(0,i.Z)(this,"requestWithBody",(function(e,r,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,l.Z)(t,T,R).call(t,{url:r,method:e,data:n,options:a})})),this.interceptors={request:new g,response:new g},null!=e&&e.adapter&&(0,c.Z)(this,O,e.adapter)}getUrlWithParams(e,t){return I(e,t)}getBodyAndHeaders(e,t){return C(e,t)}get(e,t){return(0,l.Z)(this,T,R).call(this,{url:e,method:"GET",options:t})}delete(e,t){return(0,l.Z)(this,T,R).call(this,{url:e,method:"DELETE",options:t})}head(e,t){return(0,l.Z)(this,T,R).call(this,{url:e,method:"HEAD",options:t})}post(e,t,r){return(0,l.Z)(this,T,R).call(this,{url:e,method:"POST",data:t,options:r})}put(e,t,r){return(0,l.Z)(this,T,R).call(this,{url:e,method:"PUT",data:t,options:r})}patch(e,t,r){return(0,l.Z)(this,T,R).call(this,{url:e,method:"PATCH",data:t,options:r})}}function R(e){var t=[],r=Promise.resolve(e);for(this.interceptors.request.forEach((e=>{t.push(e.fulfilled,e.rejected)})),t.push((e=>(0,s.Z)(this,O).call(this,e)),void 0),this.interceptors.response.forEach((e=>{t.push(e.fulfilled,e.rejected)})),t.push((e=>{var t;return"response"===(null===(t=e.config.options)||void 0===t?void 0:t.observe)?e:e.data}),(e=>Promise.reject(e.error)));t.length;)r=r.then(t.shift(),t.shift());return r}var L=new B;function _(e){L=new B(e)}},4034:(e,t,r)=>{r.r(t),r.d(t,{i18n:()=>d,i18nText:()=>u,initializeI18n:()=>l});var n=r(3239),a=r(206),o=r(6473),i=!1,s=new Set;function l(e,t){if(i||(i=!0,a.i18n.use(o.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&t&&!s.has(e))for(var[r,n]of(s.add(e),Object.entries(t)))a.i18n.addResourceBundle(r,e,n)}var c=r(2151);function u(e){var t;if(e){var r=null!==(t=a.i18n.language)&&void 0!==t?t:"zh-CN";if((0,c.hasOwnProperty)(e,r))return e[r];var n=r.split("-")[0];if(n!==r)return(0,c.hasOwnProperty)(e,n)?e[n]:void 0;var o="".concat(n,"-");for(var i of Object.keys(e))if(i.startsWith(o))return e[i]}}var d=n.default},7920:(e,t,r)=>{r.r(t),r.d(t,{inject:()=>k,transform:()=>S,transformAndInject:()=>A});var n=r(5178),a=r(8183),o=function(e){return e[e.Initial=0]="Initial",e[e.ExpectField=1]="ExpectField",e[e.ExpectOptionalBeginDefault=2]="ExpectOptionalBeginDefault",e[e.ExpectDefaultValue=3]="ExpectDefaultValue",e[e.ExpectOptionalBeginPipe=4]="ExpectOptionalBeginPipe",e[e.ExpectPipeIdentifier=5]="ExpectPipeIdentifier",e[e.ExpectOptionalBeginPipeParameter=6]="ExpectOptionalBeginPipeParameter",e[e.ExpectPipeParameter=7]="ExpectPipeParameter",e[e.ExpectPlaceholderEnd=8]="ExpectPlaceholderEnd",e}({}),i=function(e){return e.Raw="Raw",e.BeginPlaceHolder="BeginPlaceHolder",e.Field="Field",e.BeginDefault="BeginDefault",e.LiteralString="LiteralString",e.BeginPipe="BeginPipe",e.PipeIdentifier="PipeIdentifier",e.BeginPipeParameter="BeginPipeParameter",e.EndPlaceHolder="EndPlaceHolder",e.JsonValue="JsonValue",e}({}),s=function(e){return e[e.Array=0]="Array",e[e.Object=1]="Object",e[e.String=2]="String",e[e.Others=3]="Others",e}({});function l(e){return new RegExp("(".concat([].concat(e).map((e=>(0,n.escapeRegExp)(e))).join("|"),")\\{"))}function c(e){var t,r=E(e),n=null===(t=r.match(e.beginPlaceholder))||void 0===t?void 0:t[0],a=n?r.indexOf(n):-1;if(a>=0&&n&&"{"!==r.charAt(a+n.length)){var s=e.cursor+a;a>0&&e.tokens.push({type:i.Raw,value:r.substring(0,a)}),e.tokens.push({type:i.BeginPlaceHolder,loc:{start:s,end:s+n.length},value:n.substring(0,n.length-1)}),e.cursor+=a+n.length,e.status=o.ExpectField}else e.tokens.push({type:i.Raw,value:r}),e.cursor=e.raw.length}function u(e){e.cursor+=E(e).match(/^[ \r\n\t]*/)[0].length}function d(e){var[t]=E(e).match(/^(?:[\*\x2D\.0-9A-\[\]_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);e.tokens.push({type:i.Field,value:t}),e.cursor+=t.length,e.status=o.ExpectOptionalBeginDefault}function p(e){"="===E(e).charAt(0)?(e.tokens.push({type:i.BeginDefault}),e.cursor+=1,e.status=o.ExpectDefaultValue):e.status=o.ExpectOptionalBeginPipe}function f(e){w(e,o.ExpectOptionalBeginPipe)}function v(e){"|"===E(e).charAt(0)?(e.tokens.push({type:i.BeginPipe}),e.cursor+=1,e.status=o.ExpectPipeIdentifier):e.status=o.ExpectPlaceholderEnd}function h(e){var t=E(e).match(/^[a-zA-Z]\w*/);if(!t)throw new Error("Expected a pipe identifier at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));var r=t[0];e.tokens.push({type:i.PipeIdentifier,value:r}),e.cursor+=r.length,e.status=o.ExpectOptionalBeginPipeParameter}function m(e){":"===E(e).charAt(0)?(e.tokens.push({type:i.BeginPipeParameter}),e.cursor+=1,e.status=o.ExpectPipeParameter):e.status=o.ExpectOptionalBeginPipe}function g(e){w(e,o.ExpectOptionalBeginPipeParameter)}function y(e){if("}"!==E(e).charAt(0))throw new Error("Expected a placeholder end '}' at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));e.tokens.push({type:i.EndPlaceHolder,loc:{start:e.cursor,end:e.cursor+1}}),e.cursor+=1,e.status=o.Initial}var b=new Map([["false",!1],["null",null],["true",!0]]);function w(e,t){var r=E(e);if(/[0-9[{"]/.test(r.charAt(0))||/-[0-9]/.test(r.substring(0,2)))!function(e,t){for(var r=E(e),n=r.charAt(0),a="["===n?s.Array:"{"===n?s.Object:'"'===n?s.String:s.Others,o=0,l=0,c=0,u=!1,d=!1,p=!1;o<r.length;){var f=r.charAt(o);if(d)d=!1;else if(u)'"'===f?u=!1:"\\"===f&&(d=!0);else switch(f){case"[":c+=1;break;case"{":l+=1;break;case"]":c-=1;break;case"}":l-=1;break;case'"':u=!0}switch(o+=1,a){case s.Array:p=!c;break;case s.Object:p=!l;break;case s.String:p=!u;break;default:p=o<r.length&&/[^a-z0-9E.+-]/.test(r.charAt(o))}if(p)break}if(!p)throw new Error("Failed to match a JSON value at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));e.tokens.push({type:i.JsonValue,value:JSON.parse(r.substring(0,o))}),e.cursor+=o,e.status=t}(e,t);else{var[n]=E(e).match(/^(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);b.has(n)?e.tokens.push({type:i.JsonValue,value:b.get(n)}):e.tokens.push({type:i.LiteralString,value:n}),e.cursor+=n.length,e.status=t}}function E(e){return e.raw.substring(e.cursor)}function S(e,t){return P(e,"@",t)}function k(e,t){return P(e,"$",t)}function A(e,t){return P(e,["@","$"],t)}function P(e,t,r){if(!function(e,t){return l(t).test(e)}(e,t))return e;var s,b,w=(s=r.data,function(e){var t=e.field?(0,n.get)(s,e.field):s;return void 0===t&&(t=e.defaultValue),(0,a.processPipes)(t,e.pipes)}),E=function(e,t){return function(r){var o,i,s=r.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\.)?(.+)$/);if(!s)return t.substring(r.loc.start,r.loc.end);var l,[,c,u]=s;!c&&/^[A-Z_]+$/.test(u)&&(c=u,u="*");var d={SYS:"sys",FLAGS:"flags"};switch(c){case"QUERY":case"query":l="*"===u?e.query:e.query.has(u)?e.query.get(u):void 0;break;case"QUERY_ARRAY":l=e.query.has(u)?e.query.getAll(u):void 0;break;case"EVENT":case"event":if(void 0===e.event)return t.substring(r.loc.start,r.loc.end);l="*"===u?e.event:(0,n.get)(e.event,u);break;case"APP":l="*"===u?null!==(o=e.overrideApp)&&void 0!==o?o:e.app:(0,n.get)(null!==(i=e.overrideApp)&&void 0!==i?i:e.app,u);break;case"HASH":l=e.location.hash;break;case"SYS":case"FLAGS":l="*"===u?e[d[c]]:(0,n.get)(e[d[c]],u);break;case"ANCHOR":var p=e.location.hash?e.location.hash.substr(1):null;l="*"===u?p:(0,n.get)(p,u);break;case"CTX":var f=t.substring(r.loc.start,r.loc.end);return console.error('CTX is not supported in placeholder any more: "'.concat(f,'"')),f;default:if(!e.match)return t.substring(r.loc.start,r.loc.end);l=e.match.params[u]}return void 0===l&&(l=r.defaultValue),(0,a.processPipes)(l,r.pipes)}}(r,e);return b=function(e,t){return function(e){var t,r={type:"InjectableString",elements:[]};function n(r){return r===e[0].type&&(t=e.shift(),!0)}function a(r){if(t=e.shift(),Array.isArray(r)?!r.includes(t.type):r!==t.type)throw new Error("Expected token: ".concat(r,", received token: ").concat(t.type))}for(;e.length>0;)if(n(i.Raw))r.elements.push({type:"RawString",value:t.value});else{a(i.BeginPlaceHolder);var o=t.loc.start,s=t.value;a(i.Field);var l={type:"Placeholder",symbol:s,field:t.value,defaultValue:void 0,pipes:[],loc:{start:o,end:o}};for(r.elements.push(l),n(i.BeginDefault)&&(a([i.JsonValue,i.LiteralString]),l.defaultValue=t.value);n(i.BeginPipe);){a(i.PipeIdentifier);var c={type:"PipeCall",identifier:t.value,parameters:[]};for(l.pipes.push(c);n(i.BeginPipeParameter);)a([i.JsonValue,i.LiteralString]),c.parameters.push(t.value)}a(i.EndPlaceHolder),l.loc.end=t.loc.end}return r}(function(e,t){for(var r={beginPlaceholder:l(t),raw:e,cursor:0,status:o.Initial,tokens:[]};r.cursor<e.length;)switch(r.status){case o.Initial:c(r);break;case o.ExpectField:u(r),d(r);break;case o.ExpectOptionalBeginDefault:u(r),p(r);break;case o.ExpectDefaultValue:u(r),f(r);break;case o.ExpectOptionalBeginPipe:u(r),v(r);break;case o.ExpectPipeIdentifier:u(r),h(r);break;case o.ExpectOptionalBeginPipeParameter:u(r),m(r);break;case o.ExpectPipeParameter:u(r),g(r);break;case o.ExpectPlaceholderEnd:u(r),y(r)}if(r.status!==o.Initial)throw new Error("Expected a placeholder end '}' at the end");return r.tokens}(e,t))}(e,t).elements.map((e=>"RawString"===e.type?e.value:"$"===e.symbol?E(e):w(e))),1===b.length?b[0]:b.join("")}},8524:(e,t,r)=>{r.r(t),r.d(t,{enqueueStableLoadBricks:()=>m,enqueueStableLoadProcessors:()=>g,flushStableLoadBricks:()=>h,loadBricksImperatively:()=>y,loadProcessorsImperatively:()=>w,loadScript:()=>i,loadSharedModule:()=>u,loadStyle:()=>s});var n=r(3028),a=new Map;function o(e,t,r,i){if(Array.isArray(t))return Promise.all(t.map((t=>o(e,t,r))));var s=r&&!/^https?:/.test(t)?"".concat(r).concat(t):t,l=a.get(s);if(l)return l;var c=new Promise(((t,r)=>{var a=()=>{window.dispatchEvent(new Event("request.end"))},o=document.createElement("style"===e?"link":"script");"script"===e?Object.assign(o,(0,n.Z)((0,n.Z)({type:"text/javascript",async:!0},i),{},{src:s})):Object.assign(o,(0,n.Z)((0,n.Z)({rel:"stylesheet"},i),{},{href:s})),o.onload=()=>{t(s),a()},o.onerror=e=>{r(e),a()};var l=document.currentScript||document.getElementsByTagName("script")[0];l.parentNode.insertBefore(o,l),window.dispatchEvent(new Event("request.start"))}));return a.set(s,c),c}function i(e,t,r){return o("script",e,t,r)}function s(e,t,r){return o("style",e,t,r)}var l,c=r(4795);function u(e,t){return d.apply(this,arguments)}function d(){return(d=(0,c.Z)((function*(e,t){yield r.I("default");var n=window[e];return yield n.init(r.S.default),(yield n.get(t))()}))).apply(this,arguments)}var p,f=!1,v=new Promise((e=>{l=e}));function h(){f||l()}function m(e,t){return C(x("bricks",e,t))}function g(e,t){return C(x("processors",e,t))}function y(e,t){return b.apply(this,arguments)}function b(){return(b=(0,c.Z)((function*(e,t){var r=x("bricks",e,t);return h(),C(r)}))).apply(this,arguments)}function w(e,t){var r=x("processors",e,t);return h(),C(r)}var E="v2-adapter.load-bricks";function S(e,t,r){var n=new Map,a=new Set,o=t=>{var i;if(!a.has(t)){var s,l,c;if(a.add(t),"processors"===e||t.includes(".")){[l,c]=t.split(".");var u="bricks/".concat("processors"===e?l.replace(/[A-Z]/g,(e=>"-".concat(e[0].toLocaleLowerCase()))).replace(/_[0-9]/g,(e=>"-".concat(e[1]))):l);s=r.get(u)}else for(var d of(c=t,r.values())){var p;if(null!==(p=d.elements)&&void 0!==p&&p.some((e=>e===c))){s=d;break}}if(s){var f=n.get(s);f||(f=[],n.set(s,f)),f.push(c);var v=null===(i=s.dependencies)||void 0===i?void 0:i[t];if(v)for(var h of v)o(h)}else console.error("Package for ".concat(t," not found."))}};for(var i of t)o(i);return n}function k(e,t,r){return A.apply(this,arguments)}function A(){return(A=(0,c.Z)((function*(e,t,r){var n="".concat("processors"===e?"./processors/":"./").concat(r);try{yield u(t,n)}catch(r){throw console.error(r),new Error("Load ".concat(e,' of "').concat(t.split("/").pop(),".").concat(n.split("/").pop(),'" failed'))}}))).apply(this,arguments)}function P(e,t,r){return t.map(function(){var t=(0,c.Z)((function*(t){var n;return yield i(t.filePath,null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:""),yield v,Promise.all(r.get(t).map((r=>k(e,t.id,r))))}));return function(e){return t.apply(this,arguments)}}())}function x(e,t,r){return I.apply(this,arguments)}function I(){return I=(0,c.Z)((function*(e,t,r){var n=new Map;for(var a of r){var o,s=null!==(o=a.id)&&void 0!==o?o:O(a.filePath);n.set(s,a)}var u,d,v=S(e,t,n),h=[],m=[];for(var g of v.keys())g.id?"bricks/basic"===g.id?u=g:m.push(g):(h.push(g),(d=n.get("bricks/v2-adapter"))||console.error("Using v2 bricks, but v2-adapter not found"));var y,b=d,w=u;if(w){var A,x=i(w.filePath,null!==(A=window.PUBLIC_ROOT)&&void 0!==A?A:"");f||(f=!0,x.then((()=>Promise.resolve())).then(l)),y=x.then((()=>Promise.all(v.get(w).map((t=>k(e,w.id,t))))))}var I=[y].concat(P(e,m,v));if(b&&h.length>0){if(!p){var C=S("bricks",[E],n),Z=[...C.keys()],T=function(){var e=(0,c.Z)((function*(){return yield Promise.all(P("bricks",Z,C)),document.createElement(E)}));return function(){return e.apply(this,arguments)}}();p=T()}I.push(p.then((t=>Promise.all(h.map((n=>{var a=O(n.filePath).split("/")[1];return t.resolve(b.filePath,n.filePath,"bricks"===e?v.get(n).map((e=>"".concat(a,".").concat(e))):[],n.dll,r)}))))))}yield Promise.all(I)})),I.apply(this,arguments)}function C(e){return Z.apply(this,arguments)}function Z(){return(Z=(0,c.Z)((function*(e){window.dispatchEvent(new Event("request.start"));try{yield e}finally{window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function O(e){return e.split("/").slice(0,2).join("/")}},5152:(e,t,r)=>{r.r(t),r.d(t,{pipes:()=>n.pipes,processPipes:()=>o,utils:()=>n.utils});var n=r(665),a=new Map(Array.from(Object.entries(n.pipes)));function o(e,t){if(0===t.length)return e;var r=e;for(var n of t){var o=a.get(n.identifier);if(!o)return void console.warn("Unknown pipe: ".concat(n.identifier));r=o(r,...n.parameters)}return r}},2263:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>Dt,Notification:()=>Gt,StoryboardFunctionRegistryFactory:()=>pe,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>ee,authenticate:()=>ha,batchSetAppsLocalTheme:()=>te,checkIfByTransform:()=>gt,checkIfOfComputed:()=>ht,createHistory:()=>k,createRuntime:()=>oa,customProcessors:()=>R,customTemplates:()=>Ze,fetchByProvider:()=>ba,getAuth:()=>ma,getBasePath:()=>v,getCssPropertyValue:()=>se,getCurrentMode:()=>oe,getCurrentTheme:()=>X,getHistory:()=>A,getPageInfo:()=>In,getRuntime:()=>ia,handleHttpError:()=>zt,httpErrorToString:()=>$t,isLoggedIn:()=>ya,isUnauthenticatedError:()=>Wt,logout:()=>ga,matchPath:()=>Zt,registerWidgetFunctions:()=>Le,registerWidgetI18n:()=>M,unstable_createRoot:()=>Ea});var n={};r.r(n),r.d(n,{getAddedContracts:()=>Na,getAllContextValues:()=>Ma,getBrickPackagesById:()=>Fa,getContextValue:()=>_a,getRenderId:()=>Ua,legacyDoTransform:()=>xa,mountUseBrick:()=>Aa,renderUseBrick:()=>Sa,unmountUseBrick:()=>Pa,updateSnippetPreviewSettings:()=>Ra,updateStoryboard:()=>Ia,updateStoryboardByRoute:()=>Ca,updateStoryboardBySnippet:()=>Ba,updateStoryboardByTemplate:()=>Za,updateTemplatePreviewSettings:()=>Oa});var a=r(3028),o=r(4795),i=r(3395),s=r(381),l=r(687),c=r(6236),u=r(2923),d=r(2151),p=r(8874),f=(r(8525),r(7857));function v(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var h=r(2159),m=r(5178);function g(e,t){var r=(0,m.orderBy)(e,(e=>{var t,r;return null!==(t=null===(r=e.app)||void 0===r||null===(r=r.homepage)||void 0===r?void 0:r.length)&&void 0!==t?t:0}),"desc");for(var n of r){var a=n.app.homepage;if("string"==typeof a&&"/"===a[0]&&("/"===a?t===a:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(a.replace(/\/+$/,""),"/"))))return n}}function y(e){var t;return!e||(null===(t=ia().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var b,w=["extraQuery","clear","keepHash"],E=!1;function S(e,t){t(!(E=!confirm(e)))}function k(){if(!b){var e=(0,f.createBrowserHistory)({basename:v().replace(/\/$/,""),getUserConfirmation:S});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function o(e,t,n){E=!1,r(e,t),null==n||n(E)}function i(e,t,r){E=!1,n(e,t),null==r||r(E)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:l,keepHash:c}=n,u=(0,h.Z)(n,w),d=new URLSearchParams(l?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var m of(d.delete(f),v))d.append(f,m);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?o:i)("?".concat(d.toString()).concat(c?e.location.hash:""),u,a)}}return(0,a.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){o((0,a.Z)((0,a.Z)({},e.location),{},{key:void 0,hash:t,state:(0,a.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,a.Z)((0,a.Z)({},e.location),{},{state:(0,a.Z)((0,a.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(a,o,i){var s,l="string"==typeof a;return"string"==typeof(s=l?(0,f.parsePath)(a).pathname:a.pathname)&&s.startsWith("/")&&y(function(e){var t,r;return g(null!==(t=null===(r=ta)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](l?v()+a.substring(1):e.createHref(a)):("push"===n?t:r)(a,o,i)}}return{push:n("push"),replace:n("replace")}}((0,a.Z)((0,a.Z)({},e),{},{push:o,replace:i})))}(e)),b=e}return b}function A(){var e;return null!==(e=b)&&void 0!==e?e:function(){var{dll:e}=window;if("function"==typeof e)return e("tYg3").getHistory()}()}var P=r(5866),x=r(6171),I=r(5566),C=r(9044),Z=r(3393),O=r(5603),T=r(2710),B=new WeakMap,R=new class{constructor(){(0,i.Z)(this,B,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),a=(0,l.Z)(this,B).get(r);if(a||(a=new Map,(0,l.Z)(this,B).set(r,a)),a.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));a.set(n,t)}get(e){return(0,l.Z)(this,B).get(e)}};function L(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=_("app",t.id),a=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;c.i18n.addResourceBundle(t,n,r),a.push(t)})),()=>{for(var e of a)c.i18n.removeResourceBundle(e,n)}}}function _(e,t){return"".concat(e,"/").concat(t)}function M(e,t){var r=_("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;c.i18n.addResourceBundle(t,r,n)}))}function F(e){return c.i18n.getFixedT(null,_("widget",e))}var U,N="brick-next-devtools-panel",j="devtools-frame-active-change",V="devtools-panel-change",D=!0;function $(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var W=()=>{throw new Error("Can't modify read-only proxy object")},H={set:W,defineProperty:W,deleteProperty:W,setPrototypeOf:W};function K(e){return new Proxy(e,H)}function q(e){var{get:t,ownKeys:r}=e;return $()?K(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var z="light",G=new d.JsonStorage(localStorage),J="apps-theme";function Y(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));z=e}function Q(){return z}function X(){return document.documentElement.dataset.theme}function ee(e){e?Y(e):e=Q(),e!==X()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function te(e){G.setItem(J,(0,a.Z)((0,a.Z)({},re()),e))}function re(){var e,t;try{t=G.getItem(J)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var ne="default";function ae(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));ne=e}function oe(){return document.documentElement.dataset.mode}function ie(e){e?ae(e):e=ne,e!==oe()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function se(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function le(e,t){var r={};for(var n of e){var a=ce(n,t);void 0!==a&&(r[n]=a)}return r}function ce(e,t){var r,n,a,{collectCoverage:o,widgetId:i,widgetVersion:s,app:l,appendI18nNamespace:u,storyboardFunctions:d,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return o?"/next":v().replace(/\/$/,"");case"FN":return d;case"IMG":return o?{get:e=>"mock/images/".concat(e)}:i?null==na||null===(r=na.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==na||null===(n=na.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return o?m.identity:i?F(i):c.i18n.getFixedT(null,[u,_("app",l.id)].filter(Boolean));case"I18N_TEXT":return o?ue:c.i18nText;case"PERMISSIONS":return K({check:o?de:null==na||null===(a=na.checkPermissions)||void 0===a?void 0:a.checkPermissions});case"THEME":return K({getTheme:o?()=>"light":Q});case"console":return p?K(console):void 0;case"location":return o?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function ue(e){return null==e?void 0:e.en}function de(){return!0}function pe(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new Map,i=new Proxy(Object.freeze({}),{get:(a,s)=>function(a){var s,l=o.get(a);if(l){if(l.processed)return l.cooked;n&&(s=n.createCollector(a));var c=(0,C.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,C.cook)(c.function,l.source,{rules:{noVar:!0},globalVariables:(0,O.supply)(c.attemptToVisitGlobals,le(c.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),l.processed=!0,l.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),o.clear(),Array.isArray(t))for(var n of t){var a=(0,T.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,T.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");o.set(n.name,{source:n.source,typescript:n.typescript,deps:a,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,a.Z)((0,a.Z)({},t),{},{name:e}),n=(0,T.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,T.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=o.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:fe,registerStoryboardFunctions:ve,checkPermissionsUsage:he}=pe(),me=r(761),ge=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),ye=new Map([[ge.xLarge,"1920px"],[ge.large,"1600px"],[ge.medium,"1280px"],[ge.small,"1024px"],[ge.xSmall,0]]),be=new me.Z,we={},Ee={};function Se(e,t){var r=!1;for(var[n]of(we[t]=e.matches,ye))if(we[n]&&Ee.breakpoint!==n){Ee.breakpoint=n,r=!0;break}r&&be.dispatchEvent(new CustomEvent("change",{detail:Ee}))}ye.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));Se(r,t),r.addEventListener?r.addEventListener("change",(e=>{Se(e,t)})):r.addListener((e=>{Se(e,t)}))}));var ke=()=>Ee;function Ae(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Pe(e){var t,r;return!(null===(t=e?e.flags:null===(r=ia())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function xe(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];var o=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(o),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(o),...n)}var Ie=new Set(["prefix"]),Ce=new WeakMap,Ze=new class{constructor(){(0,i.Z)(this,Ce,{writable:!0,value:new Map})}define(e,t){var r,n,o,i,s=(0,l.Z)(this,Ce).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var c=Pe(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},d=[],p=[];for(var[f,v]of Object.entries(u))v.asVariable?(xe(c,"Template `asVariable`",e,f),c||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&d.push([f,v]);var h=(0,a.Z)((0,a.Z)({},t),{},{proxy:(0,a.Z)((0,a.Z)({},t.proxy),{},{properties:Object.fromEntries(d)}),state:(t.state?c?t.state:t.state.map((e=>(0,a.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,l.Z)(this,Ce).set(e,(0,a.Z)((0,a.Z)({},h),{},{name:e}));var g,y,b=(g=h.state,(0,m.uniq)(null!==(y=null==g?void 0:g.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),w=Object.entries(null!==(o=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==o?o:{}),E=b.concat(d.map((e=>e[0]))),S=w.map((e=>e[0])),k=E.concat(S).filter((e=>e in HTMLElement.prototype&&!Ie.has(e)));if(k.length>0&&(xe(c,"Using native HTMLElement properties as template properties or methods",e,...k),c))throw new Error('In custom template "'.concat(e,'", ').concat(k.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return E}static get _dev_only_definedMethods(){return S}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var A=function(r){if(d.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),"continue";Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var P of b)A(P);var x=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,a,o=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);o&&(o[null!==(a=r.refProperty)&&void 0!==a?a:e]=t)},enumerable:!0})};for(var[I,C]of d)x(I,C);var Z=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[O,T]of w)Z(O,T);customElements.define(e,t)}}get(e){return(0,l.Z)(this,Ce).get(e)}};function Oe(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}function Te(e,t,r){var n=Oe(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}var Be=new Map,Re=new Proxy(Object.freeze({}),{get:(e,t)=>Be.get(t)});function Le(e,t,r){if(Be.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:a}=pe({widgetId:e,widgetVersion:r});Be.set(e,n),a(t)}var _e=r(953);function Me(e,t){var r=va(e);if(!r&&null!=na&&na.checkInstalledApps&&(r=na.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return(0,_e.q)(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function Fe(e,t,r){var{formStateStoreId:n,formStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Form state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}var Ue=new Map;function Ne(e){return je.apply(this,arguments)}function je(){return je=(0,o.Z)((function*(e){var t,r=null==na||null===(t=na.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=na.flowApi.FLOW_API_PROVIDER);var n=Ue.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)na.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],ua()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),Ue.set(e,n),n})),je.apply(this,arguments)}var Ve=new WeakSet;function De(e){if((0,d.isObject)(e)&&!$e(e))if(Ve.add(e),Array.isArray(e))e.forEach(De);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(De)}}function $e(e){return Ve.has(e)}var We=new Map;function He(e,t,r){return Ke.apply(this,arguments)}function Ke(){return(Ke=(0,o.Z)((function*(e,t,r){var{useProvider:n,method:o="resolve",args:i=[],onReject:s}=e,{provider:l,field:c}=e;if(l&&!n)throw new Error("You're using \"provider: ".concat(l,'" which is dropped in v3, please use "useProvider" instead'));var u=null!=c;if(u){var d=Pe();if(xe(d,"`resolve.field`"),d)throw new Error("Using deprecated `resolve.field`")}var p,[f,v]=yield Promise.all([Ne(n),st(i,t)]),h=qe(f,n,o,v,r,i),{transform:g}=e;try{var y=yield h;De(p=u?(0,m.get)(y,c):y)}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;g=s.transform,p=e}return g?"string"==typeof g?{[g]:p}:st(g,(0,a.Z)((0,a.Z)({},t),{},{data:p})):p}))).apply(this,arguments)}function qe(e,t,r,n,a,o){return ze.apply(this,arguments)}function ze(){return ze=(0,o.Z)((function*(e,t,r,n,a,i){var s,l;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==a?void 0:a.cache)&&(l=We.get(s)),l||(l=(0,o.Z)((function*(){var a,o=null!=na&&null!==(a=na.flowApi)&&void 0!==a&&a.isFlowApiProvider(t)?yield na.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...o)}))(),We.set(s,l)),l})),ze.apply(this,arguments)}var Ge=Symbol.for("pre.evaluated.raw"),Je=Symbol.for("pre.evaluated.context");function Ye(e){return!(null==e||!e[Ge])}function Qe(e){return e[Ge]}function Xe(e){return"string"==typeof e?(0,C.shouldAllowRecursiveEvaluations)(e):(0,C.shouldAllowRecursiveEvaluations)(e[Ge])}var et=new WeakSet([SyntaxError,TypeError,ReferenceError]);function tt(e){return et.has(e.constructor)?e.constructor:TypeError}function rt(){return(rt=(0,o.Z)((function*(e,t,r){var{blockingList:n,run:a}=nt(e,t,r,!0);return yield Promise.all(n),a()}))).apply(this,arguments)}function nt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=[];if("string"!=typeof e){var i=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,a.Z)((0,a.Z)({},e[Je]),i),e=e[Ge]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,C.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,T.collectAppGetMenuUsage)(l,e,t),(0,T.collectInstalledAppsHasUsage)(c,e,t)}}})}catch(t){var p="".concat(t.message,', in "').concat(e,'"');throw new(tt(t))(p)}if(l.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(c.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var f,v,h,g,y={},{attemptToVisitGlobals:b}=s;if(r.lazy||b.has("EVENT")&&!(0,d.hasOwnProperty)(t,"event")||b.has("DATA")&&!(0,d.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[Ge]:e,[Je]:t}:e};var w,E,S=Pe(t);(b.has("STATE")||!S&&b.has("TPL"))&&(g=Oe(t,"STATE",': "'.concat(e,'"'))),b.has("FORM_STATE")&&(E=Fe(t,"FORM_STATE",': "'.concat(e,'"')));var k=$();if(n||k){if(b.has("CTX")&&(f=(0,T.strictCollectMemberUsage)(e,"CTX"),n&&o.push(t.ctxStore.waitFor(f))),g){if(h=(0,T.strictCollectMemberUsage)(e,"STATE"),!S){var A=(0,T.strictCollectMemberUsage)(e,"TPL");for(var P of A)h.add(P)}n&&o.push(g.waitFor(h))}E&&(w=(0,T.strictCollectMemberUsage)(e,"FORM_STATE"),n&&o.push(E.waitFor(w))),b.has("PROCESSORS")&&(v=(0,T.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&o.push((0,u.loadProcessorsImperatively)(v,ua())))}if(n){var x,I=b.has("PERMISSIONS");if(!I&&b.has("FN")){var Z=[...(0,T.strictCollectMemberUsage)(e,"FN")];I=he(Z)}if(I&&o.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=na&&na.menu){var B=[...l.usedArgs];o.push(Promise.all(B.map((e=>na.menu.fetchMenuById(e,t,{getStoryboardByAppId:fa,resolveData:He,asyncComputeRealValue:st})))))}c.usedArgs.size>0&&o.push(null==na||null===(x=na.checkInstalledApps)||void 0===x?void 0:x.waitForCheckingApps([...c.usedArgs]))}return{blockingList:o,run(){var r,n,o,i,{app:l,location:c,query:u,match:p,flags:k,sys:A,ctxStore:P,data:x,event:I}=t,Z=null!==(r=t.overrideApp)&&void 0!==r?r:l;for(var T of b)switch(T){case"ANCHOR":y[T]=c.hash?c.hash.substring(1):null;break;case"APP":y[T]=(0,a.Z)((0,a.Z)({},(0,m.cloneDeep)(Z)),{},{getMenu:null==na||null===(n=na.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[T]=q({get:(e,t)=>P.getValue(t),ownKeys:()=>Array.from(f)});break;case"DATA":y[T]=x;break;case"EVENT":y[T]=I;break;case"FLAGS":y[T]=K(k);break;case"FORM_STATE":y[T]=q({get:(e,t)=>E.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[T]=c.hash;break;case"INSTALLED_APPS":y[T]=K({has:Me});break;case"ITEM":(0,d.hasOwnProperty)(t,"forEachItem")?y[T]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":y[T]=K({getItem:Ae("local")});break;case"MEDIA":y[T]=K(ke());break;case"MISC":y[T]=ia().getMiscSettings();break;case"PARAMS":y[T]=new URLSearchParams(u);break;case"PATH":y[T]=K(null!==(o=null==p?void 0:p.params)&&void 0!==o?o:{});break;case"PATH_NAME":y[T]=c.pathname;break;case"PROCESSORS":y[T]=q({get(e,t){var r=R.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return q({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys(){var e=new Set;for(var t of v){var r=t.split(".")[0];e.add(r)}return Array.from(e)}});break;case"QUERY":y[T]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.get(e)])));break;case"QUERY_ARRAY":y[T]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.getAll(e)])));break;case"SESSION_STORAGE":y[T]=K({getItem:Ae("session")});break;case"TPL":if(xe(S,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),S)break;case"STATE":y[T]=q({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[T]=K(null!=A?A:{});break;case"__WIDGET_FN__":y[T]=Re;break;case"__WIDGET_IMG__":y[T]=null==na||null===(i=na.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":y[T]=F}Object.assign(y,le(s.attemptToVisitGlobals,{storyboardFunctions:fe,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{var B=(0,C.cook)(s.expression,s.source,{globalVariables:(0,O.supply)(s.attemptToVisitGlobals,y)});return function(e,t){var r=$();if(r&&D&&(!U||"Evaluations"===U)){var n=()=>{var n;null===(n=r.emit)||void 0===n||n.call(r,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,0)}}("evaluation",{raw:e,context:y,result:B}),B}catch(t){var L="".concat(t.message,', in "').concat(e,'"');throw new(tt(t))(L)}}}}var at=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function ot(e){switch(e){case at.USE_BRICK_PROPERTIES:case at.USE_BRICK_TRANSFORM:case at.USE_BRICK_EVENTS:case at.USE_BRICK_IF:case at.USE_BRICK_LIFECYCLE:case at.USE_BRICK_DATA_SOURCE:return!0}return!1}function it(e,t,r){if(ot(e))return e;if(t)switch(e){case at.USE_BRICK:return at.USE_BRICK_ITEM;case at.USE_BRICK_SLOTS_ITEM_BRICKS:return at.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case at.INITIAL:if("useBrick"===r)return at.USE_BRICK;break;case at.USE_BRICK:case at.USE_BRICK_ITEM:case at.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return at.USE_BRICK_PROPERTIES;case"transform":return at.USE_BRICK_TRANSFORM;case"dataSource":return at.USE_BRICK_DATA_SOURCE;case"events":return at.USE_BRICK_EVENTS;case"slots":return at.USE_BRICK_SLOTS;case"children":return at.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return at.USE_BRICK_IF;case"lifeCycle":return at.USE_BRICK_LIFECYCLE}break;case at.USE_BRICK_SLOTS:return at.USE_BRICK_SLOTS_ITEM;case at.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return at.USE_BRICK_SLOTS_ITEM_BRICKS}return at.INITIAL}function st(e,t){return lt.apply(this,arguments)}function lt(){return lt=(0,o.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ye(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&ot(r.$$stateOfUseBrick),i=o;return n||(0,C.isEvaluable)(e)?(a=yield function(e,t,r){return rt.apply(this,arguments)}(e,t,{lazy:o}),i=Xe(e)):a=o?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?Z.transform:Z.transformAndInject:r.noInject?dt:Z.inject)(e,t),i||De(a),a}if(!(0,d.isObject)(e)||$e(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=ut(r,!0);return Promise.all(e.map((e=>st(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,a]=e;return Promise.all([st(n,t),st(a,t,ut(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),lt.apply(this,arguments)}function ct(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ye(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&ot(r.$$stateOfUseBrick),i=o;return n||(0,C.isEvaluable)(e)?(a=function(e,t,r){var{run:n}=nt(e,t,void 0,!1);return n()}(e,t),i=Xe(e)):a=o?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?Z.transform:Z.transformAndInject:r.noInject?dt:Z.inject)(e,t),i||De(a),a}if(!(0,d.isObject)(e)||$e(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=ut(r,!0);return e.map((e=>ct(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;return[ct(n,t),ct(a,t,ut(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function ut(e,t,r){return e.$$lazyForUseBrick?(0,a.Z)((0,a.Z)({},e),{},{$$stateOfUseBrick:it(e.$$stateOfUseBrick,t,r)}):e}function dt(e){return e}function pt(e,t){return ft.apply(this,arguments)}function ft(){return(ft=(0,o.Z)((function*(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Ye(e.if)?yield st(e.if,t):e.if)}))).apply(this,arguments)}function vt(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Ye(e.if)?ct(e.if,t):e.if)}function ht(e){return!(0,d.hasOwnProperty)(e,"if")||!!e.if}function mt(){return(mt=(0,o.Z)((function*(e,t){return(0,d.isObject)(e.if)&&!Ye(e.if)?ht(yield He(e.if,t)):pt(e,t)}))).apply(this,arguments)}function gt(e,t){return vt(e,{data:t})}function yt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,C.isEvaluable)(e):Ye(e)){var a="string"==typeof e?e:Qe(e);if((0,C.isTrackAll)(a)){var o=(0,T.trackAll)(a);o&&(t=o.context,r=o.state,n=o.formState)}else t=(0,T.track)(a,"track context","CTX"),r=(0,T.track)(a,"track state","STATE"),n=(0,T.track)(a,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function bt(e,t){return wt.apply(this,arguments)}function wt(){return(wt=(0,o.Z)((function*(e,t){for(var[r,n,a]of e)if(r===t){var o=yield n;if(void 0!==o||!a)return o}}))).apply(this,arguments)}function Et(e){return St.apply(this,arguments)}function St(){return(St=(0,o.Z)((function*(e){var t={};for(var[r,n,a]of e){var o=yield n;void 0===o&&a||!("style"!==r&&"dataset"!==r||(0,d.isObject)(o))||(t[r]=o)}return t}))).apply(this,arguments)}function kt(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[a,o]of Object.entries(n))e[r][a]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function At(e,t,r){var n=function(e,t){return(0,d.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[r,n]=e,a=ct(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?at.USE_BRICK:at.INITIAL});if("style"!==r&&"dataset"!==r||(0,d.isObject)(a))return[r,a]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{kt(e,n)}))}var Pt=r(6903),xt=new Map,It=1e4,Ct=0;function Zt(e,t){var{path:r,exact:n=!1,strict:a=!1,sensitive:o=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=xt.get(r);n||xt.set(r,n=new Map);var a=n.get(e);if(a)return a;var o=[],i={regexp:(0,Pt.Bo)(e,o,t),keys:o};return Ct<It&&(n.set(e,i),Ct++),i}(r,{end:n,strict:a,sensitive:o}),l=i.exec(e);if(!l)return null;var[c,...u]=l,d=e===c;return n&&!d?null:{path:r,url:"/"===r&&""===c?"/":c,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Ot(){return(Ot=(0,o.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),a=Zt(t.location.pathname,{path:n,exact:r.exact});if(a&&(yield pt(r,t)))return t.app.noAuthGuard||r.public||null==na||!na.auth||na.auth.isLoggedIn()?{match:a,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var Tt,Bt=Symbol.for("tpl.asyncComputedPropsFromHost"),Rt=Symbol.for("tpl.stateStoreId"),Lt=Symbol.for("tpl.externalForEachItem"),_t=r(6666),Mt=new Set,Ft=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({}),Ut={[Ft.REQUEST_FAILED]:"Request Failed",[Ft.SOMETHING_WENT_WRONG]:"Something went wrong!",[Ft.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Ft.NETWORK_ERROR]:"Network error, please check your network."},Nt={[Ft.REQUEST_FAILED]:"请求失败",[Ft.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Ft.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Ft.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},jt="core/runtime",Vt={en:Ut,zh:Nt},Dt=Object.freeze({show:function(e){return Tt?Tt.resolve(e):"confirm"===e.type?confirm(e.content)?new Promise((e=>setTimeout((()=>{e()}),1))):new Promise(((e,t)=>setTimeout((()=>{t()}),1))):(alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1e3))))}});function $t(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof I.HttpFetchError)return c.i18n.t("".concat(jt,":").concat(Ft.NETWORK_ERROR));if(e instanceof I.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function Wt(e){return e instanceof I.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var Ht,Kt,qt=!1;function zt(e){if(!(e instanceof I.HttpAbortError)){if(Wt(e)&&!window.NO_AUTH_GUARD){if(qt)return;return qt=!0,void Dt.show({type:"confirm",content:c.i18n.t("".concat(jt,":").concat(Ft.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=ia().getFeatureFlags()["sso-enabled"],(t=A()).push(e?"/sso-auth/login":"/auth/login",{from:(0,a.Z)((0,a.Z)({},t.location),{},{state:void 0})}),qt=!1}),(()=>{qt=!1}))}console.error(e);var t=$t(e);t!==Ht&&(Ht=t,Dt.show({type:"error",title:c.i18n.t("".concat(jt,":").concat(Ft.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{Ht=void 0})))}}var Gt=Object.freeze({show:function(e){Kt?Kt.resolve(e):alert(e.message)}});function Jt(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,a]=t,o=tr(a,r,{element:e});for(var i of(e.addEventListener(n,o),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,o]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(a)))e.$$eventListeners.push([n,null,i])}))}function Yt(e){return"string"==typeof e.action}function Qt(e){return"string"==typeof e.useProvider}function Xt(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function er(e){return!!e.then}function tr(e,t,r){return function(n){var o,i;for(var s of[].concat(e))if(vt(s,(0,a.Z)((0,a.Z)({},t),{},{event:n})))if(er(s))tr(s.then,t,r)(n);else if(Yt(s)){var[l,c]=s.action.split(".");switch(s.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":sr(n,c,s.args,s.callback,t);break;case"window.open":lr(n,s.args,t);break;case"location.reload":case"location.assign":fr(n,c,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":vr(n,l,c,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":hr(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":mr(n,c,s.args,t);break;case"handleHttpError":zt(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":ur(n,c,s.args,null===(o=s.batch)||void 0===o||o,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":dr(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=wr(s.args,t,n);Te(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":pr(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":gr(n,c,s.args,t,r,s.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":ee("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=wr(s.args,t,n);ee(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":ie("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else Qt(s)?rr(n,s,t,r):Xt(s)?ar(n,s,t,r):console.error("unknown event handler:",s);else s.else&&tr(s.else,t,r)(n)}}function rr(e,t,r,n){return nr.apply(this,arguments)}function nr(){return(nr=(0,o.Z)((function*(e,t,r,n){try{or(e,yield Ne(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error($t(e))}}))).apply(this,arguments)}function ar(e,t,r,n){var o=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,C.isEvaluable)(i):Ye(i))&&(l=ct(i,(0,a.Z)((0,a.Z)({},r),{},{event:e}))),"string"==typeof l)if("_self"===l)o.push(n.element);else if(t.multiple)o=Array.from(document.querySelectorAll(l));else{var c=document.querySelector(l);null!==c&&o.push(c)}else if(l)l instanceof HTMLElement?o.push(l):console.error("unexpected target:",l);else if(s){var u=s;("string"==typeof s?(0,C.isEvaluable)(s):Ye(s))&&(u=ct(s,(0,a.Z)((0,a.Z)({},r),{},{event:e})));var d=[].concat(u),p=Te(r,"targetRef",": ".concat(d.join(", ")));o.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((a=>{or(e,a,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&At(o,t.properties,(0,a.Z)((0,a.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function or(e,t,r,n,a,o,i){return ir.apply(this,arguments)}function ir(){return ir=(0,o.Z)((function*(e,t,r,n,i,s,l){var c;if("function"==typeof t[n]){var u=function(){var a=(0,o.Z)((function*(){var a,o=wr(r.args,i,e,l);return Qt(r)&&null!=na&&null!==(a=na.flowApi)&&void 0!==a&&a.isFlowApiProvider(r.useProvider)&&(o=yield na.flowApi.getArgsOfFlowApi(r.useProvider,o,n)),t[n](...o)}));return function(){return a.apply(this,arguments)}}();if(r.callback){var d,p=br(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(Qt(r)&&(d=ct(r.poll,(0,a.Z)((0,a.Z)({},i),{},{event:e}))),null!==(c=d)&&void 0!==c&&c.enabled)!function(e,t,r){var n,{progress:a,success:i,error:s,finally:l}=t,{interval:c,leadingRequestDelay:u,continueOnError:d,delegateLoadingBar:p,expectPollEnd:f,expectPollStopImmediately:v}=r,h=da();function m(){return g.apply(this,arguments)}function g(){return(g=(0,o.Z)((function*(){var t;Mt.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==da())||(null==a||a(r),null!=f&&f(r)?(p&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==l||l()):y(null!=c?c:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==da())||(null==s||s(e),d?y(null!=c?c:3e3):null==l||l())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),Mt.add(n)}y(null!=u?u:0),p&&window.dispatchEvent(new Event("request.start"))}(u,f,d);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),ir.apply(this,arguments)}function sr(e,t,r,n,a){var o=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":o=2,i=!0;break;case"reload":i=!0;break;case"block":o=1,s="setBlockMessage"}var l=[];if(o>0&&((l=wr(r,a,e,{useEventDetailAsDefault:!0})).length=o),i&&n){var c=br(n,a,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}A()[s](...l)}function lr(e,t,r){var[n,a,o]=wr(t,r,e);window.open(n,a||"_self",o)}function cr(e,t,r,n,a,o){t?n.updateValues(e,r,(e=>wr(e,a,o)[0])):e.forEach((e=>{var{name:t,value:i}=wr([e],a,o)[0];n.updateValue(t,i,r)}))}function ur(e,t,r,n,a,o){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=wr(r,o,e);o.ctxStore.updateValue(i,s,t,a,o)}else cr(r,n,t,o.ctxStore,o,e)}function dr(e,t,r,n,a,o){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)cr(r,n,"replace",Oe(o,"state.".concat(t),": ".concat(JSON.stringify(r))),o,e);else{var[i,s]=wr(r,o,e);Oe(o,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,a,o)}}function pr(e,t,r,n){var[a,o]=wr(t,n,e);Fe(n,"formstate.update",": ".concat(a)).updateValue(a,o,"replace",r,n)}function fr(e,t,r,n){if("assign"===t){var[a]=wr(r,n,e);location.assign(a)}else location[t]()}function vr(e,t,r,n,a){var o="localStorage"===t?localStorage:sessionStorage,[i,s]=wr(n,a,e);"setItem"===r?void 0!==s&&o.setItem(i,JSON.stringify(s)):o.removeItem(i)}function hr(e,t,r,n){console[t](...wr(r,n,e,{useEventAsDefault:!0}))}function mr(e,t,r,n){var a=wr(r,n,e,{useEventAsDefault:!0});Gt.show({type:t,message:a[0]})}function gr(e,t,r,n,a,o){return yr.apply(this,arguments)}function yr(){return(yr=(0,o.Z)((function*(e,t,r,n,a,o){var i=()=>{var a,o=wr(r,n,e);return null==na||null===(a=na.messageDispatcher)||void 0===a?void 0:a[t](...o)};if(o){var s=br(o,n,a);try{var l=yield i();s("success")(l)}catch(e){s("error")(e)}finally{s("finally")()}}else i()}))).apply(this,arguments)}function br(e,t,r){return function(n){return function(a){var o=null==e?void 0:e[n];if(o)try{var i=new CustomEvent("callback.".concat(n),{detail:a});tr(o,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",a)}}}function wr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?ct(e,(0,a.Z)((0,a.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}var Er=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Sr{constructor(e,t,r){(0,_t.Z)(this,"type",void 0),(0,_t.Z)(this,"data",new Map),(0,_t.Z)(this,"changeEventType",void 0),(0,_t.Z)(this,"pendingStack",[]),(0,_t.Z)(this,"hostBrick",void 0),(0,_t.Z)(this,"batchUpdate",!1),(0,_t.Z)(this,"batchUpdateContextsNames",[]),(0,_t.Z)(this,"rendererContext",void 0),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=r}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{var[t,{value:r}]=e;return[t,r]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");var n={},a={},o=[];e.forEach((e=>{var{name:a,value:i}=r([e]),s=this.data.get(a);o.push(...this.getAffectListByContext(a)),s&&(n[a]=s),this.updateValue(a,i,t)})),o.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(a[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(a),this.batchUpdate=!1}updateValue(e,t,r,n,o){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,d.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,a.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||zt(e)})),n){var l=br(n,o);s.then((e=>{l("success")({value:e}),l("finally")()}),(e=>{l("error")(e),l("finally")()}))}}}define(e,t,r){if(Array.isArray(e)&&e.length>0){var n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=new Map;for(var n of e){var a=(0,T.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,a)}return r}(e,r),a=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;a.set(i,(null!==(s=a.get(i))&&void 0!==s?s:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),c=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,o.Z)((function*(e){var r;c.add(e);var o=yield t(e);n.delete(e);var i=null!==(r=a.get(e.name))&&void 0!==r?r:0;if(o){if(u.get(e.name).resolve(),a.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),a.delete(e.name)):a.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=l;function v(){return h.apply(this,arguments)}function h(){return h=(0,o.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(a,f)).map((e=>e[0])).filter((e=>!c.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,o.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),a=()=>{var e=!1;for(var[t,o]of r.entries())[...o.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&a()};if(a(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r)),this.type);this.pendingStack.push(n)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,o.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,o.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}handleAsyncAfterMount(){this.data.forEach((e=>{e.async&&e.loading.then((t=>{e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t}))}))}))}resolve(e,t,r){var n=this;return(0,o.Z)((function*(){if(!(yield pt(e,t)))return!1;var i,s,l;r&&("STATE"===n.type?e.expose:"FORM_STATE"===n.type)&&(i=yield bt(r,e.name));var c="eager";if(void 0===i){if(e.resolve){var u=(0,a.Z)({transform:"value"},e.resolve);if(yield pt(e.resolve,t))s=function(){var e=(0,o.Z)((function*(e){return(yield He(u,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),"eager"==(c=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager")?i=yield s():"async"===c&&(l=s());else if(!(0,d.hasOwnProperty)(e,"value"))return!1}s&&"eager"===c||void 0===e.value||(i=yield st(e.value,t))}var p={value:i,eventTarget:new EventTarget,load:s,loaded:"eager"===c,loading:l,async:"async"===c,deps:[]};if("lazy"===c){var f,{trigger:v}=e.resolve;v&&Er.includes(v)&&(null===(f=n.rendererContext)||void 0===f||f.registerArbitraryLifeCycle(v,(()=>{n.updateValue(e.name,void 0,"load")})))}if(e.onChange&&p.eventTarget.addEventListener(n.changeEventType,tr(e.onChange,t)),e.track){var h=(0,T.strictCollectMemberUsage)(s?e.resolve:e.value,n.type);for(var m of(!s&&(p.deps=[...h]),h))n.onChange(m,n.batchAddListener((()=>{s?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,ct(e.value,t),"replace")}),e))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,p),!0}))()}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function kr(e,t,r){var n,a,{reversedProxies:o,asyncHostPropertyEntries:i,externalSlots:s,tplStateStoreId:l,hostBrick:c}=e;if(t&&o){var u=o.properties.get(t);u&&(a=i,n=u.map((e=>{var{from:t,to:r}=e,n=a.filter((e=>e[0]===t));if(n.length>0&&r.refProperty)return[r.refProperty,bt(n,t),!0]})).filter(Boolean));var p=o.slots.get(t);if(p&&s){var f=new Map;for(var{from:v,to:h}of p){var g,y,b,w,E=null!==(g=null===(y=s[v])||void 0===y?void 0:y.bricks)&&void 0!==g?g:[];if(E.length){var S=null!==(b=h.refSlot)&&void 0!==b?b:v,k=f.get(S);if(!k){k=[];for(var A=(0,d.hasOwnProperty)(r,S)?r[S].bricks.length+1:1,P=0;P<A;P+=1)k.push([]);f.set(S,k)}var x=null!==(w=h.refPosition)&&void 0!==w?w:-1;k[(0,m.clamp)(x<0?k.length+x:x,0,k.length-1)].push(...(0,d.hasOwnProperty)(c.runtimeContext,"forEachItem")?Ar(E,c.runtimeContext.forEachItem):E)}}var I=function(){(0,d.hasOwnProperty)(r,C)||(r[C]={type:"bricks",bricks:[]});var e=r[C];e.bricks=Z.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[C]};for(var[C,Z]of f.entries())I()}}return{[Bt]:n,[Rt]:l}}function Ar(e,t){return e.map((e=>{var r;return(0,a.Z)((0,a.Z)({},e),{},{[Lt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,a]=e;return[n,"routes"===a.type?{type:"routes",routes:Pr(a.routes,t)}:{type:"bricks",bricks:Ar(null!==(r=a.bricks)&&void 0!==r?r:[],t)}]})))})}))}function Pr(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,a.Z)((0,a.Z)({},e),{},{bricks:Ar(e.bricks,t)})))}var xr=["properties","slots","children"];function Ir(e,t){function r(e){return(0,d.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,a]=e;return(0,d.isObject)(a)&&"useBrick"===t?Array.isArray(a)?[t,a.map(n)]:[t,n(a)]:[t,r(a)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:o,slots:i,children:s}=e,l=(0,h.Z)(e,xr),c=Qr(s,i),u=Object.fromEntries(Object.entries(null!=c?c:{}).map((e=>{var t,[r,a]=e;return[r,{type:"bricks",bricks:(null!==(t=a.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,a.Z)((0,a.Z)({},l),{},{properties:r(o),slots:u},kr(t,l.ref,u))}return r(e)}var Cr=["slots","children"],Zr=["properties","slots","children"];function Or(e,t,r,n,o){var i,s=(0,m.uniqueId)("tpl-state-"),l=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{tplStateStoreId:s});delete l.forEachItem,delete l.formStateStoreId;var c=new Sr("STATE",r,o);l.tplStateStoreMap.set(s,c),l.tplStateStoreScope&&l.tplStateStoreScope.push(c);var{bricks:u,proxy:d,state:p,contracts:f}=Ze.get(e);null==na||null===(i=na.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:g}=t,y=(0,h.Z)(t,Cr),b=(0,a.Z)((0,a.Z)({},y),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:s,proxy:d};var w={properties:new Map,slots:new Map};if(null!=d&&d.properties)for(var[E,S]of Object.entries(d.properties)){var k=w.properties.get(S.ref);k||(k=[],w.properties.set(S.ref,k)),k.push({from:E,to:S})}if(null!=d&&d.slots)for(var[A,P]of Object.entries(d.slots)){var x=w.slots.get(P.ref);x||(x=[],w.slots.set(P.ref,x)),x.push({from:A,to:P})}var I={reversedProxies:w,asyncHostPropertyEntries:n,externalSlots:Qr(g,v),tplStateStoreId:s,hostBrick:r};return b.slots={"":{type:"bricks",bricks:u.map((e=>Tr(e,I)))}},b}function Tr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:o}=e,i=(0,h.Z)(e,Zr),s=Qr(o,n),l=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,a]=e;return[n,{type:"bricks",bricks:(null!==(r=a.bricks)&&void 0!==r?r:[]).map((e=>Tr(e,t)))}]})));return(0,a.Z)((0,a.Z)({},i),{},{properties:Ir(r,t),slots:l},kr(t,i.ref,l))}var Br=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),Rr="form-renderer.form-renderer",Lr=Symbol.for("form.stateStoreId"),_r=["forms.general-form","form.general-form","eo-form"];function Mr(e,t,r){var{id:n,bricks:o,events:i,context:s,mountPoint:l,instanceId:c}=e,{brick:u,properties:p}=e,f=t.find((e=>e.fieldId===n));if(f){var v=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,a.Z)((0,a.Z)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}})};break;case"JSON":t={brick:"forms.general-textarea",properties:(0,a.Z)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,a.Z)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,a.Z)((0,a.Z)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description})}}return t}(f);u||(u=v.brick),p=(0,a.Z)((0,a.Z)({},v.properties),p)}var h={brick:u,properties:p,iid:c,slot:l,events:i,context:s,children:Fr(o,t,r),[Lr]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Fr(e,t,r){if(Array.isArray(e))return e.map((e=>Mr(e,t,r)))}var Ur=["blockingList","node","menuRequests","hasTrackingControls"],Nr=["if","permissionsPreCheck"],jr=["formData"],Vr=["src"],Dr=["href"];function $r(e,t,r,n,a){return Wr.apply(this,arguments)}function Wr(){return Wr=(0,o.Z)((function*(e,t,r,n,o){var i=yield function(e,t){return Ot.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var l,c=s.route=i.route,d=(0,a.Z)((0,a.Z)({},r),{},{match:i.match});d.ctxStore.define(c.context,d),d.pendingPermissionsPreCheck.push(null==na||null===(l=na.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(c,(e=>st(e,d))));var{preLoadBricks:p}=c;switch(Array.isArray(p)&&s.blockingList.push((0,u.loadBricksImperatively)(p,ua())),c.type){case"redirect":var f;if("string"!=typeof(f="string"==typeof c.redirect?yield st(c.redirect,d):(yield He((0,a.Z)({transform:"redirect"},c.redirect),d)).redirect))throw console.error("Unexpected redirect result:",f),new Error("Unexpected type of redirect result: ".concat(typeof f));s.redirect={path:f};break;case"routes":s.menuRequests.push(Jr(c.menu,d)),Yr(s,yield $r(e,c.routes,d,n,o));break;default:s.menuRequests.push(Jr(c.menu,d)),Yr(s,yield Hr(e,c.bricks,d,n,o))}}return s})),Wr.apply(this,arguments)}function Hr(e,t,r,n,a,o,i){return Kr.apply(this,arguments)}function Kr(){return(Kr=(0,o.Z)((function*(e,t,r,n,a,o,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>qr(e,t,r,n,a,i,o&&new Map(o)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(a,r,t.node,e),Yr(s,t)})),s}))).apply(this,arguments)}function qr(e,t,r,n,a,o){return zr.apply(this,arguments)}function zr(){return zr=(0,o.Z)((function*(e,t,r,n,i,s){var l,c,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,f={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;var{if:v,permissionsPreCheck:g}=t,y=(0,h.Z)(t,Nr);if(function(e){return"string"==typeof e?(0,C.isTrackAll)(e):Ye(e)&&(0,C.isTrackAll)(Qe(e))}(v))return qr(e,(0,a.Z)({brick:":if",dataSource:v,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[y]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,a.Z)((0,a.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p);var b=t[Rt],w=t[Lr],E=(0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:b,formStateStoreId:w});(0,d.hasOwnProperty)(t,Lt)&&(E.forEachItem=t[Lt]);var{context:S}=t;if(Array.isArray(S)&&S.length>0){var k=Pe(E);xe(k,"Defining context on bricks","check your brick:",t),k||E.ctxStore.define(S,E)}if(E.pendingPermissionsPreCheck.push(null==na||null===(l=na.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>st(e,E)))),!(yield function(e,t){return mt.apply(this,arguments)}(t,E)))return f;var A=t.brick;if(A.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(A);var{dataSource:P}=t,x=function(){var r=(0,o.Z)((function*(){var r,a=yield st(P,E),o=":forEach"===A?"":":switch"===A?String(a):a?"":"else",s=Qr(t.children,t.slots),l=s&&(0,d.hasOwnProperty)(s,o)&&(null===(r=s[o])||void 0===r?void 0:r.bricks);if(!Array.isArray(l))return f;switch(A){case":forEach":return Array.isArray(a)?function(e,t,r,n,a,o,i){return Gr.apply(this,arguments)}(e,a,l,E,n,i,p):f;case":if":case":switch":return Hr(e,l,E,n,i,p,!0)}}));return function(){return r.apply(this,arguments)}}(),I=yield x(),{contextNames:Z,stateNames:O}=yt(P);if(Z||O){I.hasTrackingControls=!0;var T=0,B=function(){var t=(0,o.Z)((function*(){var t=++T,r=yield x();r.blockingList.push(...[...E.tplStateStoreMap.values(),...E.formStateStoreMap.values()].map((e=>e.waitForAll())),...E.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),T===t&&n.rerenderControlNode(i,s,r.node,e)}));return function(){return t.apply(this,arguments)}}(),R=(0,m.debounce)(B);if(Z)for(var L of Z)E.ctxStore.onChange(L,R);if(O)for(var _ of O)Oe(E,"STATE",': "'.concat(P,'"')).onChange(_,R)}return I}/\.tpl-/.test(A)&&!Ze.get(A)&&(yield Xr((0,u.loadBricksImperatively)([A],ua()),A,n.unknownBricks));var M,F,U=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Ze.get(r))return r}return!!Ze.get(e)&&e}(A,null===(c=E.app)||void 0===c?void 0:c.id);if(U){var N,j=null!==(N=p.get(U))&&void 0!==N?N:0;if(j>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(U,'"'));p.set(U,j+1)}else A.includes("-")&&!customElements.get(A)&&(A===Rr?customElements.define(Rr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):f.blockingList.push(Xr((0,u.enqueueStableLoadBricks)([A],ua()),A,n.unknownBricks)));if(A===Rr){var V,D=null!==(V=t.properties)&&void 0!==V?V:{};({formData:M}=D),F=(0,h.Z)(D,jr)}else F=t.properties;var $=[],W=function(e,t,r){return(0,d.isObject)(e)?Object.entries(e).map((e=>{var[n,a]=e,{contextNames:o,stateNames:i,formStateNames:s}=yt(a);return(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a}),[n,st(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?at.USE_BRICK:at.INITIAL})]})):[]}(F,E,$),H=t[Bt];H&&W.push(...H);var K="script"===A;if(K||"link"===A){var q=yield Et(W);if(K?q.src:"stylesheet"===q.rel&&q.href){var z,G=null!==(z=window.PUBLIC_ROOT)&&void 0!==z?z:"";if(K){var{src:J}=q,Y=(0,h.Z)(q,Vr);yield(0,u.loadScript)(J,G,Y)}else{var{href:Q}=q;Y=(0,h.Z)(q,Dr),yield(0,u.loadStyle)(Q,G,Y)}return f}}var X={tag:Br.BRICK,type:U||A,return:e,slotId:i,events:t.events,runtimeContext:E,portal:t.portal,iid:t.iid,ref:t.ref};f.node=X;var ee=[],te=function(){var e=(0,o.Z)((function*(){X.properties=yield Et(W),function(e,t){var r=function(t){var r=()=>{e.element&&At(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var a=Oe(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var o of t.stateNames)a.onChange(o,r)}if(t.formStateNames){var i=Fe(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}(X,$)}));return function(){return e.apply(this,arguments)}}();ee.push(te()),n.registerBrickLifeCycle(X,t.lifeCycle);var re,ne=t;U?ne=Or(U,t,X,W,n):A===Rr&&(ne=function(e,t,r,n,o){var i,s,l="string"==typeof e?JSON.parse(e):e,c=(0,m.uniqueId)("form-state-"),u=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{formStateStoreId:c});delete u.forEachItem,delete u.tplStateStoreId;var p=new Sr("FORM_STATE",void 0,o);u.formStateStoreMap.set(c,p),u.formStateStoreScope&&u.formStateStoreScope.push(p);var f=null!==(i=l.context)&&void 0!==i?i:[];f.some((e=>"params"===e.name))||f.push({name:"params"}),p.define(f,u,n);var v=Mr(l.formSchema,l.fields,c);return _r.includes(v.brick)&&t.events&&(v.events=function(e,t){var r=null!=e?e:{};for(var[n,a]of Object.entries(t))r[n]=(0,d.hasOwnProperty)(r,n)?[r[n],a].flat():a;return r}(v.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?(0,a.Z)((0,a.Z)({},t),{},{slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[v]}]}):(0,a.Z)((0,a.Z)({},t),{},{slots:void 0,children:[v]})}(M,t,X,W,n)),ne.portal&&(X.slotId=void 0),U?delete(re=(0,a.Z)({},E)).forEachItem:re=E;var ae=function(){var e=(0,o.Z)((function*(){var e=Qr(ne.children,ne.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?Hr(X,r.bricks,re,n,t,p):$r(X,r.routes,re,n,t)}))),r=(0,a.Z)((0,a.Z)({},f),{},{node:void 0,blockingList:[]});for(var o of t)Yr(r,o);r.node&&(X.child=r.node),Yr(f,(0,a.Z)((0,a.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return ee.push(ae()),yield Promise.all(ee),f})),zr.apply(this,arguments)}function Gr(){return(Gr=(0,o.Z)((function*(e,t,r,n,o,i,s){var l={blockingList:[],menuRequests:[]},c=yield Promise.all(t.map(((t,l)=>Promise.all(r.map(((r,c)=>qr(e,r,(0,a.Z)((0,a.Z)({},n),{},{forEachItem:t}),o,i,l*c,s&&new Map(s))))))));for(var u of c.flat())Yr(l,u);return l}))).apply(this,arguments)}function Jr(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return st(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function Yr(e,t){var{blockingList:r,node:n,menuRequests:a,hasTrackingControls:o}=t,i=(0,h.Z)(t,Ur);if(e.blockingList.push(...r),e.menuRequests.push(...a),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function Qr(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var a,o=null!==(a=n.slot)&&void 0!==a?a:"";(0,d.hasOwnProperty)(r,o)||(r[o]={type:"bricks",bricks:[]}),r[o].bricks.push(n)}return r}function Xr(e,t,r){return"silent"===r?e.catch((e=>{console.error('Load brick "'.concat(t,'" failed:'),e)})):e}function en(e){var t,{ref:r,runtimeContext:n,element:a}=e;if(r&&n.tplStateStoreId){var{hostBrick:o}=Oe(n,"bindTemplateProxy"),i=o.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var l=function(e){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),o.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},l=null!==(t=u.refEvent)&&void 0!==t?t:e;a.addEventListener(l,s),null!==(i=(n=a).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),a.$$proxyListeners.push([l,s])}};for(var[c,u]of Object.entries(s))l(c)}}}function tn(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:a}=Oe(r,"unbindTemplateProxy"),o=a.tplHostMetadata;for(var[i,s]of(o.internalBricksByRef.delete(t),null!==(l=n.$$proxyListeners)&&void 0!==l?l:[])){var l;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function rn(e){e.replaceChildren()}function nn(e,t){for(var r=e.child,n=[];r;){var a,o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var i=t&&r===e.child?t:document.createElement(o);if(r.element=i,r.slotId&&i.setAttribute("slot",r.slotId),r.iid&&(i.dataset.iid=r.iid),null!==(a=r.tplHostMetadata)&&void 0!==a&&a.tplStateStoreId&&(i.dataset.tplStateStoreId=r.tplHostMetadata.tplStateStoreId),kt(i,r.properties),Jt(i,r.events,r.runtimeContext),r.tplHostMetadata&&(i.$$tplStateStore=Oe({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),en(r),r.portal?n.push(i):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(i)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var s,l=r.return;l;){var c;if(l.childElements)l.tag===Br.ROOT?null===(c=l.container)||void 0===c||c.append(...l.childElements):l.element.append(...l.childElements),l.childElements=void 0;if(l.tag===Br.ROOT&&n.length>0&&("function"==typeof l.createPortal?l.createPortal():l.createPortal).append(...n),l.sibling)break;l=l.return}r=null===(s=l)||void 0===s?void 0:s.sibling}}}var an,on,sn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],ln=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],cn=new WeakMap,un=new WeakMap,dn=new WeakMap,pn=new WeakMap,fn=new WeakMap,vn=new WeakSet,hn=new WeakSet,mn=new WeakSet,gn=new WeakSet;class yn{constructor(e,t){var r;(0,P.Z)(this,gn),(0,P.Z)(this,mn),(0,P.Z)(this,hn),(0,P.Z)(this,vn),(0,_t.Z)(this,"scope",void 0),(0,_t.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,cn,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}}),(0,i.Z)(this,un,{writable:!0,value:new Map}),(0,i.Z)(this,dn,{writable:!0,value:void 0}),(0,i.Z)(this,pn,{writable:!0,value:new Map}),(0,i.Z)(this,fn,{writable:!0,value:void 0}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw"}registerBrickLifeCycle(e,t){if(t){var r=[...sn,..."page"===this.scope?ln:[]];for(var n of r){var a=t[n];a&&(0,l.Z)(this,cn)[n].push({brick:e,handlers:a})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}registerArbitraryLifeCycle(e,t){var r=(0,l.Z)(this,pn).get(e);r?r.add(t):(0,l.Z)(this,pn).set(e,new Set([t]))}memoizeControlNode(e,t,r,n){(0,l.Z)(this,fn)||(0,s.Z)(this,fn,new WeakMap);var a="".concat(null!=e?e:"",".").concat(t),o=(0,l.Z)(this,fn).get(n);o||(o=new Map,(0,l.Z)(this,fn).set(n,o)),o.set(a,{node:r,last:kn(r),lastNormal:An(r),lastPortal:Pn(r)})}rerenderControlNode(e,t,r,n){var a,o,i,s,c,u="".concat(null!=e?e:"",".").concat(t),d=(0,l.Z)(this,fn).get(n).get(u),{node:p,last:f,lastNormal:v,lastPortal:h}=d,m=null!==(a=null==v||null===(o=v.element)||void 0===o?void 0:o.nextSibling)&&void 0!==a?a:null,g=null!==(i=null==h||null===(s=h.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=kn(r);d.node=r,d.last=y,d.lastNormal=An(r),d.lastPortal=Pn(r);for(var b=n.child;b&&b!==f;){if(b.sibling===p){c=b;break}b=b.sibling}var w=document.createDocumentFragment(),E=document.createDocumentFragment(),S={tag:Br.ROOT,container:w,createPortal:E,child:r};for(b=r;b;)b.return=S,b=b.sibling;var k,A,P=xn(p,f);for((0,x.Z)(this,vn,bn).call(this,P),nn(S),c?c.sibling=r:n.child=r,y&&(y.sibling=null==f?void 0:f.sibling),b=r;b;)b.return=n,b=b.sibling;if(n.tag===Br.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(w,m):null===(A=n.element)||void 0===A||A.insertBefore(w,m),E.childNodes.length>0){for(var I,C=r;C&&C.return;)C=C.return;if((null===(I=C)||void 0===I?void 0:I.tag)!==Br.ROOT)throw new Error("Cannot find render root node");("function"==typeof C.createPortal?C.createPortal():C.createPortal).insertBefore(E,g)}var Z=xn(r,y);(0,x.Z)(this,hn,wn).call(this,Z)}dispose(){for(var e of Object.values((0,l.Z)(this,cn)))e.length=0;for(var t of(0,l.Z)(this,un).values()){for(var r of t)r.disconnect();t.length=0}(0,l.Z)(this,un).clear(),(0,l.Z)(this,dn)&&(be.removeEventListener("change",(0,l.Z)(this,dn)),(0,s.Z)(this,dn,void 0)),(0,s.Z)(this,fn,void 0),(0,l.Z)(this,pn).clear()}dispatchBeforePageLoad(){(0,x.Z)(this,mn,En).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,x.Z)(this,mn,En).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,x.Z)(this,mn,En).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,x.Z)(this,mn,En).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=A().location;e&&"#"!==e?(0,x.Z)(this,mn,En).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,x.Z)(this,mn,En).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,l.Z)(this,cn).onScrollIntoView)(0,x.Z)(this,gn,Sn).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,dn,(e=>{(0,x.Z)(this,mn,En).call(this,"onMediaChange",new CustomEvent("media.change",{detail:K(e.detail)}))})),be.addEventListener("change",(0,l.Z)(this,dn))}initializeMessageDispatcher(){var e,t=function(e){var t=function(t){var r;null==na||null===(r=na.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{tr(t.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:r}))}))};for(var r of[].concat(n))t(r)};for(var{brick:r,handlers:n}of(0,l.Z)(this,cn).onMessage)t(r);null==na||null===(e=na.messageDispatcher)||void 0===e||e.onClose((()=>{(0,x.Z)(this,mn,En).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,x.Z)(this,mn,En).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,x.Z)(this,mn,En).call(this,"onUnmount",new CustomEvent("unmount"))}}function bn(e){var t=[...sn,..."page"===this.scope?ln:[]],r=[];for(var n of t){var a=(0,m.remove)((0,l.Z)(this,cn)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...a)}for(var o of e){var i,s,c=(0,l.Z)(this,un).get(o);if(null!=c&&c.length){for(var u of c)u.disconnect();c.length=0,(0,l.Z)(this,un).delete(o)}tn(o),null===(i=o.element)||void 0===i||delete i.$$tplStateStore,null===(s=o.element)||void 0===s||s.remove()}var d=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)tr(f,p.runtimeContext,p)(d)}function wn(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,l.Z)(this,cn).onMount)e.has(r)&&tr(n,r.runtimeContext,r)(t);for(var{brick:a,handlers:o}of(0,l.Z)(this,cn).onScrollIntoView)e.has(a)&&(0,x.Z)(this,gn,Sn).call(this,a,o)}function En(e,t){for(var{brick:r,handlers:n}of(0,l.Z)(this,cn)[e])tr(n,r.runtimeContext,r)(t);var a=(0,l.Z)(this,pn).get(e);if(a)for(var o of a)o()}function Sn(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,a=new IntersectionObserver(((r,a)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(tr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),a.disconnect())}))}),{threshold:n});a.observe(e.element);var o=(0,l.Z)(this,un).get(e);o||(o=[],(0,l.Z)(this,un).set(e,o)),o.push(a)}function kn(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function An(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Pn(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,a=r.return;a&&!a.sibling;)a=a.return;r=null===(n=a)||void 0===n?void 0:n.sibling}return t}function xn(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var a,o=n.return;o&&o!==t&&!o.sibling;)o=o.return;if(o===t)break;n=null===(a=o)||void 0===a?void 0:a.sibling}}return r}function In(){if(!an){if(an={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){an.isInIframe=!0;try{if(window.origin===window.parent.origin){an.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");an.isInIframeOfNext=0==(Number(e)^Number(r)),an.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),an.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(an)}return an}function Cn(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var a=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Ze.define(a,n)}}}function Zn(){return Zn=(0,o.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return On.apply(this,arguments)}(e)),e.$$fulfilling})),Zn.apply(this,arguments)}function On(){return(On=(0,o.Z)((function*(e){var t;yield null==na||null===(t=na.fulfilStoryboard)||void 0===t?void 0:t.call(na,e),L(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var Tn=new WeakMap,Bn=new WeakMap,Rn=new WeakMap,Ln=new WeakMap,_n=new WeakMap,Mn=new WeakMap,Fn=new WeakMap,Un=new WeakMap,Nn=new WeakMap,jn=new WeakMap,Vn=new WeakMap,Dn=new WeakMap,$n=new WeakSet,Wn=new WeakSet,Hn=new WeakSet,Kn=new WeakSet;class qn{constructor(e){(0,P.Z)(this,Kn),(0,P.Z)(this,Hn),(0,P.Z)(this,Wn),(0,P.Z)(this,$n),(0,i.Z)(this,Tn,{writable:!0,value:void 0}),(0,i.Z)(this,Bn,{writable:!0,value:!1}),(0,i.Z)(this,Rn,{writable:!0,value:void 0}),(0,i.Z)(this,Ln,{writable:!0,value:void 0}),(0,i.Z)(this,_n,{writable:!0,value:void 0}),(0,i.Z)(this,Mn,{writable:!0,value:void 0}),(0,i.Z)(this,Fn,{writable:!0,value:new Set}),(0,i.Z)(this,Un,{writable:!0,value:0}),(0,i.Z)(this,Nn,{writable:!0,value:void 0}),(0,i.Z)(this,jn,{writable:!0,value:void 0}),(0,i.Z)(this,Vn,{writable:!0,value:void 0}),(0,i.Z)(this,Dn,{writable:!0,value:void 0}),(0,s.Z)(this,Tn,e);var t=A();window.addEventListener("beforeunload",(e=>{(0,x.Z)(this,$n,zn).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,x.Z)(this,$n,zn).call(this,{location:e,action:t})))}getRenderId(){return(0,l.Z)(this,Nn)}getRuntimeContext(){return(0,l.Z)(this,_n)}getRecentApps(){return{currentApp:(0,l.Z)(this,jn),previousApp:(0,l.Z)(this,Vn)}}getNavConfig(){return(0,l.Z)(this,Dn)}bootstrap(){window.AbortController&&(on=new AbortController,I.http.interceptors.request.use((e=>{var t;return(0,a.Z)((0,a.Z)({},e),{},{options:(0,a.Z)((0,a.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:on.signal})})})));var e=A();return(0,s.Z)(this,Rn,e.location),e.listen(((e,t)=>{var r,n,o,i=!1,c={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,l.Z)(this,Rn).key&&!1!==(null===(r=(0,l.Z)(this,Rn).state)||void 0===r?void 0:r.notify))||(c.key=void 0),((0,f.locationsAreEqual)((0,a.Z)((0,a.Z)({},(0,l.Z)(this,Rn)),c),(0,a.Z)((0,a.Z)({},e),c))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,s.Z)(this,Rn,e);else{if(on&&(on.abort(),on=new AbortController),(0,s.Z)(this,Rn,e),null===(o=(0,l.Z)(this,Mn))||void 0===o||o.dispatchPageLeave(),"POP"===t&&y(g((0,l.Z)(this,Tn),e.pathname)))return void window.location.reload();(0,l.Z)(this,Bn)?(0,s.Z)(this,Ln,e):(0,x.Z)(this,Hn,Jn).call(this,e).catch(zt)}})),(0,x.Z)(this,Hn,Jn).call(this,e.location)}}function zn(e){var t,r=A(),n=r.getBlockMessage();null===(t=(0,l.Z)(this,Mn))||void 0===t||t.dispatchBeforePageLeave(e);var a=r.getBlockMessage();return!n&&a&&r.unblock(),a}function Gn(e,t,r){var n,a;if((0,s.Z)(this,Un,(n=(0,l.Z)(this,Un),a=n++,n)),a>10){var o='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(o)}A().replace(e,t)}function Jn(e){return Yn.apply(this,arguments)}function Yn(){return(Yn=(0,o.Z)((function*(e){(0,s.Z)(this,Bn,!0);try{yield(0,x.Z)(this,Kn,Qn).call(this,e)}finally{if((0,s.Z)(this,Bn,!1),(0,l.Z)(this,Ln)){var t=(0,l.Z)(this,Ln);(0,s.Z)(this,Ln,void 0),yield(0,x.Z)(this,Hn,Jn).call(this,t)}}}))).apply(this,arguments)}function Qn(e){return Xn.apply(this,arguments)}function Xn(){return Xn=(0,o.Z)((function*(e){var t,r;(0,s.Z)(this,Nn,(0,m.uniqueId)("render-id-1")),Ve=new WeakSet,We.clear(),null==na||null===(t=na.flowApi)||void 0===t||t.clearCollectWidgetContract(),A().unblock();var n=g((0,l.Z)(this,Tn),e.pathname),o=null===(r=(0,l.Z)(this,_n))||void 0===r?void 0:r.app;null!=n&&n.app&&(yield function(e){return Zn.apply(this,arguments)}(n));var i=(0,s.Z)(this,jn,null==n?void 0:n.app),c=o&&i?o.id!==i.id:o!==i,d=ia().getFeatureFlags(),p=(0,l.Z)(this,Mn),f=(t,r)=>{(0,l.Z)(this,Fn).add(p),(0,x.Z)(this,Wn,Gn).call(this,t,r,e)},v=()=>{var t=d["sso-enabled"]?"/sso-auth/login":"/auth/login";f(t,{from:e})},h=document.querySelector("#main-mount-point"),y=document.querySelector("#portal-mount-point"),b={tag:Br.ROOT,container:h,createPortal:y},w=()=>{var e;for(var t of(rn(h),rn(y),(0,l.Z)(this,Fn).add(p),(0,l.Z)(this,Fn)))t&&(t.dispatchOnUnmount(),t.dispose());(0,l.Z)(this,Fn).clear(),null==na||null===(e=na.messageDispatcher)||void 0===e||e.reset(),c&&((0,s.Z)(this,Vn,o),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:o,currentApp:i}})))};if(Y(i&&(re()[i.id]||i.theme)||"light"),ae("default"),i){var E,S,k,P,C,Z;null==na||null===(E=na.checkInstalledApps)||void 0===E||E.preCheckInstalledApps(n,(e=>!!va(e)));var O=(0,s.Z)(this,Mn,new yn("page")),T=(0,s.Z)(this,_n,{app:i,location:e,query:new URLSearchParams(e.search),flags:d,sys:(0,a.Z)((0,a.Z)((0,a.Z)({},null==na||null===(S=na.auth)||void 0===S?void 0:S.getAuth()),In()),{},{settings:{brand:ia().getBrandSettings()}}),ctxStore:new Sr("CTX",void 0,O),pendingPermissionsPreCheck:[null==na||null===(k=na.checkPermissions)||void 0===k?void 0:k.preCheckPermissions(n)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,s.Z)(this,Dn,void 0),Cn(n),ve(null===(P=n.meta)||void 0===P?void 0:P.functions,i),null==na||null===(C=na.flowApi)||void 0===C||C.collectContract(null===(Z=n.meta)||void 0===Z?void 0:Z.contracts);var B,R=!1,L=[];try{if((B=yield $r(b,function(e){if(window.parent===window)return e;var t=e,r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(n.routes),T,O)).unauthenticated)return void v();if(B.redirect)return void f(B.redirect.path,B.redirect.state);(0,s.Z)(this,Un,0),(0,u.flushStableLoadBricks)(),L=[T.ctxStore,...T.tplStateStoreMap.values(),...T.formStateStoreMap.values()],yield Promise.all([...B.blockingList,...L.map((e=>e.waitForAll())),...T.pendingPermissionsPreCheck]);var _=yield Promise.all(B.menuRequests);(0,s.Z)(this,Dn,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(_))}catch(e){if(console.error("Router failed:",e),Wt(e)&&!window.NO_AUTH_GUARD)return void v();if(e instanceof I.HttpAbortError)return void(0,l.Z)(this,Fn).add(p);R=!0,B={node:{tag:Br.BRICK,type:"div",properties:{textContent:$t(e)},runtimeContext:null,return:b},blockingList:[],menuRequests:[]}}if(b.child=B.node,w(),B.route&&"routes"!==B.route.type||R){if(R||O.dispatchBeforePageLoad(),ee(),ie(),nn(b),window.scrollTo(0,0),!R){for(var M of L)M.handleAsyncAfterMount();O.dispatchPageLoad(),O.dispatchAnchorLoad(),O.dispatchOnMount(),O.initializeScrollIntoView(),O.initializeMediaChange(),O.initializeMessageDispatcher()}return}}else{if(!window.NO_AUTH_GUARD&&null!=na&&na.auth&&!na.auth.isLoggedIn())return void v();w()}ee(),ie();var F={tag:Br.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:b};b.child=F,nn(b),window.scrollTo(0,0)})),Xn.apply(this,arguments)}var ea,ta,ra,na,aa="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function oa(e){if(ea)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===N){var r=t.payload;switch(null==r?void 0:r.type){case j:D=r.active;break;case V:U=r.panel}}})),na=null==e?void 0:e.hooks,(0,c.initializeI18n)(jt,Vt),p.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{p.locale(c.i18n.language)})),k(),ea=new ca}function ia(){return ea}var sa=new WeakMap,la=new WeakMap;class ca{constructor(){(0,i.Z)(this,sa,{writable:!0,value:!1}),(0,i.Z)(this,la,{writable:!0,value:!1})}initialize(e){var t,r;if((0,l.Z)(this,sa))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,sa,!0),function(e){if(Array.isArray(e.storyboards)){var t=function(){if(r.locales){var e="tmp/".concat(r.id);Object.entries(r.locales).forEach((t=>{var[r,n]=t;c.i18n.addResourceBundle(r,e,n)})),r.localeName=c.i18n.getFixedT(null,e)("name",r.name),Object.keys(r.locales).forEach((t=>{c.i18n.removeResourceBundle(t,e)}))}else r.localeName=r.name};for(var{app:r}of e.storyboards)t()}(0,d.isObject)(e.settings)&&(0,d.deepFreeze)(e.settings),e.brickPackages&&(0,d.deepFreeze)(e.brickPackages)}(e),ta=e;var n,{notification:a,dialog:o}=null!==(t=null===(r=e.settings)||void 0===r?void 0:r.presetBricks)&&void 0!==t?t:{};!1!==a&&(n=null!=a?a:"basic.show-notification",(0,this.loadBricks)([n]).then((()=>{Kt=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==o&&function(e,t){t([e]).then((()=>{Tt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=o?o:"basic.show-dialog",this.loadBricks)}bootstrap(e){var t=this;return(0,o.Z)((function*(){if(e&&t.initialize(e),(0,l.Z)(t,la))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,la,!0),ra=new qn(ta.storyboards),yield ra.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=ra)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=ra)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return Me(e,t)}getFeatureFlags(){var e,t;return(0,a.Z)((0,a.Z)((0,a.Z)({},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags),null===(t=ra)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t;return(0,a.Z)((0,a.Z)({},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc),null===(t=ra)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc)}getBrandSettings(){var e;return(0,a.Z)({base_title:"DevOps 管理专家"},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand)}getLaunchpadSettings(){var e;return(0,a.Z)({columns:7,rows:4},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=ta)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=ta)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=ra)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,ua())}}function ua(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=null===(n=ta)||void 0===n?void 0:n.brickPackages)&&void 0!==r?r:aa)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[]}function da(){var e;return null===(e=ra)||void 0===e?void 0:e.getRenderId()}function pa(){var e;return null===(e=ra)||void 0===e?void 0:e.getRuntimeContext()}function fa(e){var t;return null===(t=ta)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function va(e){var t;return null===(t=fa(e))||void 0===t?void 0:t.app}function ha(){for(var e,t,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];null==na||null===(e=na.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function ma(){var e;return null==na||null===(e=na.auth)||void 0===e?void 0:e.getAuth()}function ga(){var e,t;return null==na||null===(e=na.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function ya(){var e;return null==na||null===(e=na.auth)||void 0===e?void 0:e.isLoggedIn()}function ba(e,t,r){return wa.apply(this,arguments)}function wa(){return(wa=(0,o.Z)((function*(e,t,r){return qe(yield Ne(e),e,"resolve",t,r)}))).apply(this,arguments)}function Ea(e){var t,{portal:r,scope:n="fragment",unknownBricks:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,l,c=!1;return{render(r){var d=arguments;return(0,o.Z)((function*(){var{theme:o,context:p,functions:f,templates:v,i18n:h}=d.length>1&&void 0!==d[1]?d[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");var m=[].concat(r),g=s;s=new yn(n,{unknownBricks:a});var y={ctxStore:new Sr("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},b={tag:Br.ROOT,container:e,createPortal:t};if("page"===n){var w;Y(null!=o?o:"light"),ae("default");var E={id:"demo",homepage:"/demo"};y.app=E;var S={app:E,meta:{i18n:h,customTemplates:v}};null===(w=l)||void 0===w||w(),l=L(S),Cn(S),ve(f,E)}y.ctxStore.define(p,y);var k,A=!1,P=[];try{k=yield Hr(b,m,y,s),(0,u.flushStableLoadBricks)(),P=[y.ctxStore,...y.tplStateStoreMap.values(),...y.formStateStoreMap.values()],yield Promise.all([...k.blockingList,...P.map((e=>e.waitForAll())),...y.pendingPermissionsPreCheck])}catch(e){A=!0,k={node:{tag:Br.BRICK,type:"div",properties:{textContent:$t(e)},return:b,runtimeContext:null},blockingList:[],menuRequests:[]}}if(b.child=k.node,null==g||g.dispatchOnUnmount(),null==g||g.dispose(),rn(e),i&&rn(i),"page"===n&&(A||s.dispatchBeforePageLoad(),ee(),ie()),nn(b),"page"===n&&window.scrollTo(0,0),!A){for(var x of P)x.handleAsyncAfterMount();"page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}}))()},unmount(){c||(c=!0,rn(e),i&&(rn(i),r||i.remove()))}}}function Sa(e,t){return ka.apply(this,arguments)}function ka(){return(ka=(0,o.Z)((function*(e,t){var r,n,o,i=[],s=[],l=(0,a.Z)((0,a.Z)({},pa()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:i,formStateStoreScope:s});null!==(r=l.tplStateStoreMap)&&void 0!==r||(l.tplStateStoreMap=new Map),null!==(n=l.formStateStoreMap)&&void 0!==n||(l.formStateStoreMap=new Map);var c=new yn("fragment"),d={tag:Br.ROOT,createPortal:null},p=e.transform,f=Pe();p&&xe(f,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var v=yield qr(d,f?e:(0,a.Z)((0,a.Z)({},e),{},{properties:(0,a.Z)((0,a.Z)({},e.properties),p)}),l,c);(0,u.flushStableLoadBricks)();var h=[...i,...s];if(yield Promise.all([...v.blockingList,...h.map((e=>e.waitForAll())),...l.pendingPermissionsPreCheck]),null!==(o=v.node)&&void 0!==o&&o.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return d.child=v.node,{tagName:v.node?v.node.type:null,renderRoot:d,rendererContext:c,scopedStores:h}}))).apply(this,arguments)}function Aa(e,t){var r,{renderRoot:n,rendererContext:a,scopedStores:o}=e;for(var i of(n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},nn(n,t),o))i.handleAsyncAfterMount();return a.dispatchOnMount(),a.initializeScrollIntoView(),a.initializeMediaChange(),a.initializeMessageDispatcher(),{portal:r}}function Pa(e,t){var{rendererContext:r}=e;t.portal&&(rn(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function xa(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return ct(t,(0,a.Z)((0,a.Z)({},pa()),{},{data:e}),{noInject:!0})}function Ia(e,t){var r=fa(e);Object.assign(r,(0,a.Z)((0,a.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),L(r)}function Ca(e,t){var r=fa(e),n=!1,a=e=>"".concat(e.path,".").concat(e.exact),o=(e,r)=>e.map((e=>{var i=a(e);return"routes"===e.type?(e.routes=o(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=o(r.routes,a(t)),n||r.routes.unshift(t)}function Za(e,t,r){var n="".concat(e,".").concat(t.name);Ze.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Oa(e,t.name,r)}function Oa(e,t,r){La(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,a.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Ta(e){return"${APP.homepage}/_dev_only_/snippet-preview/".concat(e)}function Ba(e,t){var r;La(e,Ta(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var Ra=Ba;function La(e,t,r){var{routes:n}=fa(e),a=n.findIndex((e=>e.path===t)),o={path:t,bricks:r,menu:!1,exact:!0};-1===a?n.unshift(o):n.splice(a,1,o)}function _a(e,t){var{tplStateStoreId:r}=t,n=pa();return r?Oe((0,a.Z)((0,a.Z)({},n),{},{tplStateStoreId:r}),"STATE").getValue(e):n.ctxStore.getValue(e)}function Ma(e){var{tplStateStoreId:t}=e,r=pa();return t?Oe((0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:t}),"STATE").getAllValues():r.ctxStore.getAllValues()}function Fa(e){return ua().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function Ua(){return da()}function Na(e,t){return ja.apply(this,arguments)}function ja(){return(ja=(0,o.Z)((function*(e,t){var r,{appId:n,updateStoryboardType:a,provider:o}=t,i=fa(n);if("route"===a)r={routes:[e]};else if("template"===a)r={meta:{customTemplates:[e]}};else if("snippet"===a){var s,l=Ta(e.snippetId);r={routes:[null==i||null===(s=i.routes)||void 0===s?void 0:s.find((e=>e.path===l))]}}var c=[];if(r&&o){yield(0,u.loadBricksImperatively)([o],ua());var d=document.createElement(o);(yield d.resolve(r)).forEach((e=>{var t,[r,n,a]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===n&&e.name===a))||c.push(e)}))}return c}))).apply(this,arguments)}},7929:(e,t,r)=>{r.r(t),r.d(t,{supply:()=>s});var n=r(3028),a=r(5178),o=r(8874),i=r(8183);function s(e,t,r){var a=(0,n.Z)({},t);for(var o of(a[void 0]=void 0,e))if(!Object.prototype.hasOwnProperty.call(a,o)){var i=d(o,r);void 0!==i&&(a[o]=i)}return a}var l=new Set(["fill","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","assign","assignIn","assignInWith","assignWith","defaults","defaultsDeep","merge","mergeWith","set","setWith","unset","update","updateWith","after","ary","before","bind","bindKey","curry","curryRight","debounce","defer","delay","flip","memoize","negate","once","overArgs","partial","partialRight","rearg","rest","spread","throttle","unary","wrap"]),c=new Set(["lang","langData","locale","localeData","defineLocale","updateLocale","updateOffset"]),u=new Set(["Array","Boolean","Date","Infinity","JSON","Math","NaN","Number","String","RegExp","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","isFinite","isNaN","parseFloat","parseInt","Map","Set","URLSearchParams","WeakMap","WeakSet","atob","btoa"]);function d(e,t){switch(e){case"Object":return r=Object,n=["entries","fromEntries","keys","values"],Object.fromEntries(n.map((e=>[e,function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r[e].apply(r,n)}])));case"_":return Object.fromEntries(Object.entries(a).filter((e=>!l.has(e[0]))).concat(t?[["uniqueId",e=>"".concat(null!=e?e:"","42")]]:[]));case"moment":return Object.assign((function(){return o(...arguments)}),Object.fromEntries(Object.entries(o).filter((e=>!c.has(e[0])))));case"PIPES":return i.pipes;case"TAG_URL":return p(!0);case"SAFE_TAG_URL":return p();default:if(u.has(e))return window[e]}var r,n}function p(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var o=[];return t.forEach(((t,r)=>{o.push(t),r<n.length&&o.push(e?String(n[r]).replace(/[^/]+/g,(e=>encodeURIComponent(e))):encodeURIComponent(String(n[r])))})),o.join("")}}},8486:(e,t,r)=>{function n(e){return class extends HTMLElement{get $$typeof(){return"provider"}resolve(){return e(...arguments)}}}function a(e){var t=Object.getOwnPropertyNames(e);for(var r of t){var n=e[r];n&&"object"==typeof n&&a(n)}return Object.freeze(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}r.r(t),r.d(t,{JsonStorage:()=>s,createProviderClass:()=>n,deepFreeze:()=>a,hasOwnProperty:()=>o,isObject:()=>i,unwrapProvider:()=>c});class s{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"brick-next-";this.storage=e,this.prefix=t}setItem(e,t){this.storage.setItem(this.prefix+e,JSON.stringify(t))}getItem(e){var t;return JSON.parse(null!==(t=this.storage.getItem(this.prefix+e))&&void 0!==t?t:"null")}removeItem(e){return this.storage.removeItem(this.prefix+e)}clear(){return this.storage.clear()}}var l=new Map;function c(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=function(e){var t=l.get(e);return t||(t=document.createElement(e),l.set(e,t),t)}(e);return a.resolve(...r)}}},1259:(e,t,r)=>{function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(a,o){if("string"==typeof t?a.name===t:t.includes(a.name)){for(var i=[],s=1;s<=r;s++){var l=o[o.length-s];if("MemberExpression"===(null==l?void 0:l.node.type)&&"object"===l.key){var c=l.node;c.computed||"Identifier"!==c.property.type?c.computed&&"Literal"===c.property.type&&"string"==typeof c.property.value?i.push(n?"".concat(a.name,".").concat(c.property.value):c.property.value):e.hasNonStaticUsage=!0:i.push(n?"".concat(a.name,".").concat(c.property.name):c.property.name)}else e.hasNonStaticUsage=!0}i.length===r&&e.usedProperties.add(i.join("."))}}}function a(e,t){return function(r,n,a){if(n.name===e){var o=a[a.length-1],i=a[a.length-2];if("CallExpression"===(null==i?void 0:i.node.type)&&"callee"===(null==i?void 0:i.key)&&"MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key&&(o.node.computed?"Literal"===o.node.property.type&&o.node.property.value===t:"Identifier"===o.node.property.type&&o.node.property.name===t)){var s=i.node.arguments;if(s.length>0){var l=s[0];"Literal"===l.type&&"string"==typeof l.value?r.usedArgs.add(l.value):r.hasNonStaticUsage=!0}}}}}r.r(t),r.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>o,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>d,collectMemberUsageInFunction:()=>g,createProviderClass:()=>l.createProviderClass,scanPermissionActionsInAny:()=>E,scanPermissionActionsInStoryboard:()=>w,strictCollectMemberUsage:()=>u,strictCollectMemberUsageInFunction:()=>m,track:()=>p,trackAll:()=>f,traverseStoryboardExpressions:()=>c,traverseStoryboardFunction:()=>h,traverseStoryboardFunctions:()=>v,unwrapProvider:()=>l.unwrapProvider});var o=a("APP","getMenu"),i=a("INSTALLED_APPS","has"),s=r(9044),l=r(5927);function c(e,t,r){var n=new WeakSet,{matchExpressionString:a,visitNotMatchedExpressionString:o,visitNonExpressionString:i,visitObject:c}="string"==typeof r?{matchExpressionString:e=>e.includes(r)}:r;!function e(r){if("string"==typeof r)if((0,s.isEvaluable)(r))if(a(r))try{(0,s.preevaluate)(r,{withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,r)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==o||o(r);else null==i||i(r);else if((0,l.isObject)(r)){if(n.has(r))return;for(var u of(n.add(r),null==c||c(r),Array.isArray(r)?r:Object.values(r)))e(u)}}(e)}function u(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{hasNonStaticUsage:n,nonStaticUsage:a,usedProperties:o}=d(e,t,r);if(n)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your expression: "').concat(a,'"'));return o}function d(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a={usedProperties:new Set,hasNonStaticUsage:!1},o=n(a,t,r);return c(e,((e,t,r)=>{o(e,t),a.hasNonStaticUsage&&(a.nonStaticUsage=r)}),t),a}function p(e,t,r){if(e.includes(t)){var a,o={usedProperties:new Set,hasNonStaticUsage:!1},{expression:i}=(0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(o,r)}});if("SequenceExpression"===i.type&&(a=i.expressions[0])&&"Literal"===a.type&&a.value===t){if(o.usedProperties.size>0)return o.usedProperties;console.warn('You are using "'.concat(t,'" but no `').concat(r,"` usage found in your expression: ").concat(JSON.stringify(e)))}}return!1}function f(e){if(e){var t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(t,["CTX","STATE","FORM_STATE"],1,!0)}}),t.usedProperties.size>0){var r=[...t.usedProperties],a={context:!1,state:!1,formState:!1},o={CTX:"context",STATE:"state",FORM_STATE:"formState"};return r.forEach((e=>{var[t,r]=e.split(".");a[o[t]]||(a[o[t]]=[]),a[o[t]].push(r)})),a}console.warn('You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: '.concat(JSON.stringify(e)))}return!1}function v(e,t){if(Array.isArray(e))for(var r of e)h(r,t)}function h(e,t){try{(0,s.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t}})}catch(t){console.error('Parse storyboard function "'.concat(e.name,'" failed:'),t)}}function m(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{hasNonStaticUsage:n,usedProperties:a}=g(e,t,r);if(n)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your function: "').concat(e.name,'"'));return a}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a={usedProperties:new Set,hasNonStaticUsage:!1};return h(e,n(a,t,r)),a.usedProperties.delete(e.name),a}var y="PERMISSIONS",b="check";function w(e){var t,r=new Set,n=S(r),{customTemplates:a,functions:o}=null!==(t=e.meta)&&void 0!==t?t:{};return c([e.routes,a],n,y),v(o,n),Array.from(r)}function E(e){var t=new Set;return c(e,S(t),y),Array.from(t)}function S(e){return function(t,r){if(t.name===y){var n=r[r.length-1],a=r[r.length-2];if("CallExpression"===(null==a?void 0:a.node.type)&&"callee"===(null==a?void 0:a.key)&&"MemberExpression"===(null==n?void 0:n.node.type)&&"object"===n.key&&(n.node.computed?"Literal"===n.node.property.type&&n.node.property.value===b:"Identifier"===n.node.property.type&&n.node.property.name===b))for(var o of a.node.arguments)"Literal"===o.type&&"string"==typeof o.value&&e.add(o.value)}}}}}]);
2
- //# sourceMappingURL=core.0dc92e20.js.map
1
+ "use strict";(self.webpackChunk_next_core_preview=self.webpackChunk_next_core_preview||[]).push([[321],{3902:(e,t,r)=>{r.r(t);var n=r(3028),a=r(4795),o=r(6801),i=r(5566),s=r(9169);r(5745),i.http.interceptors.request.use((e=>{var t;return null!==(t=e.options)&&void 0!==t&&null!==(t=t.interceptorParams)&&void 0!==t&&t.ignoreLoadingBar||window.dispatchEvent(new Event("request.start")),e})),i.http.interceptors.response.use((function(e){return window.dispatchEvent(new Event("request.end")),e}),(function(e){return window.dispatchEvent(new Event("request.end")),Promise.reject(e)}));var l=document.querySelector("#global-loading-bar");l.classList.add("rendered");var c=!1,u=0;function d(){var e=u>0;e!==c&&(c=e,l.classList[e?"add":"remove"]("loading"))}window.addEventListener("request.start",(()=>{u++,d()})),window.addEventListener("request.end",(()=>{u>0&&(u--,d())}));var p,f=(0,o.createRuntime)(),v=document.querySelector("#preview-root"),h=document.querySelector("#portal-mount-point"),m=(0,o.unstable_createRoot)(v,{portal:h,scope:"page",unknownBricks:"silent"}),g=i.http.get(window.BOOTSTRAP_FILE,{responseType:"json"}).then((e=>{f.initialize(e)})),y=!1;function b(e){return w.apply(this,arguments)}function w(){return w=(0,a.Z)((function*(e){y=!0;try{var{type:t,sources:r,options:n}=e;yield function(e,t){return S.apply(this,arguments)}(t,r,n)}finally{if(y=!1,p){var a=p;p=void 0,b(a)}}})),w.apply(this,arguments)}window._preview_only_render=(e,t,r)=>{y?p={type:e,sources:t,options:r}:b({type:e,sources:t,options:r})};var E=!1;function S(){return S=(0,a.Z)((function*(e,t){var{yaml:r,html:n}=t,{theme:a,context:i,functions:l,templates:c,i18n:u,styleText:d,templatesAreArrayOfYaml:p}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(E||(E=!0,document.body.classList.add("bootstrap-ready"),(0,o.applyTheme)("light"===a?a:"dark-v2")),document.body.classList.remove("bootstrap-error"),"html"===e){(0,o.applyTheme)("light"===a?a:"dark-v2");var y=(new DOMParser).parseFromString(n,"text/html"),b=new Set;for(var w of y.body.querySelectorAll("*"))if(w.tagName.includes("-")){var S=w.tagName.toLowerCase();b.add(S)}else if("SCRIPT"===w.tagName){var A=w.text.matchAll(/\bdocument\.createElement\(\s*"([a-zA-Z0-9.]+-[-a-zA-Z0-9.]+)"\s*\)/g);for(var P of A)b.add(P[1])}yield g,yield f.loadBricks(b),v.replaceChildren(),h.replaceChildren();var x=[],I=y.querySelectorAll("script");for(var C of I){var Z=document.createElement("script");Z.text=C.text,Z.type="module",x.push(Z),C.remove()}v.append(...y.head.querySelectorAll("style"),...y.body.childNodes,...x)}else{var O=r?(0,s.safeLoad)(r,{schema:s.JSON_SCHEMA,json:!0}):null,T=[].concat(null!=O?O:[]);d&&T.push({brick:"style",portal:!0,properties:{textContent:d}});var B=k(i),R=k(l),L=k(c,p),M=k(u);yield g,yield m.render(T,{theme:"light"===a?a:"dark-v2",context:B,functions:R,templates:L,i18n:M})}}catch(e){console.error("Render failed:",e),document.body.classList.add("bootstrap-error"),h.textContent="",v.textContent="Render failed: ".concat(String(e))}})),S.apply(this,arguments)}function k(e,t){return"string"==typeof e?(0,s.safeLoad)(e,{schema:s.JSON_SCHEMA,json:!0}):t?e.map((e=>"string"==typeof e.yaml?(0,n.Z)((0,n.Z)({},(0,s.safeLoad)(e.yaml,{schema:s.JSON_SCHEMA,json:!0})),{},{name:e.name}):e)):e}},6919:(e,t,r)=>{r.r(t),r.d(t,{cook:()=>F,isEvaluable:()=>q,isTrackAll:()=>G,precook:()=>V,precookFunction:()=>H,preevaluate:()=>K,shouldAllowRecursiveEvaluations:()=>z});var n=r(6666);class a{constructor(){(0,n.Z)(this,"VariableEnvironment",void 0),(0,n.Z)(this,"LexicalEnvironment",void 0),(0,n.Z)(this,"Function",void 0)}}class o{constructor(e){(0,n.Z)(this,"OuterEnv",void 0),(0,n.Z)(this,"bindingMap",new Map),this.OuterEnv=e}HasBinding(e){return this.bindingMap.has(e)}CreateMutableBinding(e,t){return this.bindingMap.set(e,{mutable:!0,deletable:t}),h(void 0)}CreateImmutableBinding(e,t){return this.bindingMap.set(e,{strict:t}),h(void 0)}InitializeBinding(e,t){var r=this.bindingMap.get(e);return Object.assign(r,{initialized:!0,value:t}),h(void 0)}SetMutableBinding(e,t,r){var n=this.bindingMap.get(e);if(!n.initialized)throw new ReferenceError("".concat(e," is not initialized"));if(!n.mutable)throw new TypeError("Assignment to constant variable");return n.value=t,h(void 0)}GetBindingValue(e,t){var r=this.bindingMap.get(e);if(!r.initialized)throw new ReferenceError("".concat(e," is not initialized"));return r.value}}class i extends o{}class s extends o{}var l=Symbol.for("SourceNode"),c=Symbol.for("FormalParameters"),u=Symbol.for("ECMAScriptCode"),d=Symbol.for("Environment"),p=Symbol.for("IsConstructor");class f{constructor(e,t,r){(0,n.Z)(this,"Base",void 0),(0,n.Z)(this,"ReferenceName",void 0),(0,n.Z)(this,"Strict",void 0),this.Base=e,this.ReferenceName=t,this.Strict=r}}class v{constructor(e,t){(0,n.Z)(this,"Type",void 0),(0,n.Z)(this,"Value",void 0),this.Type=e,this.Value=t}}function h(e){return new v("normal",e)}var m=Symbol("empty completion");function g(e){var t=new Set,r=e=>{if(Array.isArray(e))for(var n of e)r(n);else if(e)switch(e.type){case"Identifier":return void t.add(e.name);case"VariableDeclaration":return r(e.declarations);case"VariableDeclarator":case"FunctionDeclaration":return r(e.id);case"ArrayPattern":return r(e.elements);case"AssignmentPattern":return r(e.left);case"ObjectPattern":return r(e.properties);case"Property":return r(e.value);case"RestElement":return r(e.argument)}};return r(e),Array.from(t)}function y(e){var t=e=>{if(Array.isArray(e))return e.some(t);if(e)switch(e.type){case"ArrayPattern":return t(e.elements);case"AssignmentPattern":return!0;case"ObjectPattern":return t(e.properties);case"Property":return e.computed||t(e.value);case"RestElement":return t(e.argument)}};return t(e)}function b(e,t){var r=[],n={var:t.var},a=(e,t)=>{if(Array.isArray(e))for(var o of e)a(o,t);else if(e){switch(e.type){case"FunctionDeclaration":return void(Number(!t.var)^Number(t.topLevel)&&r.push(e));case"VariableDeclaration":return void(Number(!t.var)^Number("var"===e.kind)&&r.push(e));case"SwitchCase":return void a(e.consequent,n);case"CatchClause":return void a(e.body,n)}if(t.var)switch(e.type){case"BlockStatement":case"DoWhileStatement":case"WhileStatement":return void a(e.body,n);case"IfStatement":return a(e.consequent,n),void a(e.alternate,n);case"ForStatement":return a(e.init,n),void a(e.body,n);case"ForInStatement":case"ForOfStatement":return a(e.left,n),void a(e.body,n);case"SwitchStatement":return void a(e.cases,n);case"TryStatement":return a(e.block,n),a(e.handler,n),void a(e.finalizer,n)}}};return a(e,t),r}function w(e){return"unresolvable"!==e.Base&&!(e.Base instanceof o)}function E(e,t){return e.Base.InitializeBinding(e.ReferenceName,t)}function S(e,t,r){if(null==t)return e;var n=Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));for(var a of n)if(!r.has(a)){var o=Object.getOwnPropertyDescriptor(t,a);null!=o&&o.enumerable&&(e[a]=t[a])}return e}function k(e,t){var r="const"===e.kind;for(var n of g(e))r?t.CreateImmutableBinding(n,!0):t.CreateMutableBinding(n,!1)}function A(e){return"normal"===e.Type||"continue"==e.Type}function P(e,t){return e.Value!==m?e:new v(e.Type,t)}function x(e){if(e instanceof v&&(e=e.Value),!(e instanceof f))return e;if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof o?e.Base.GetBindingValue(e.ReferenceName,e.Strict):e.Base[e.ReferenceName]}function I(e){return"symbol"==typeof e?e:String(e)}function C(e,t){return e[t]}function Z(e,t){if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof o?e.Base.SetMutableBinding(e.ReferenceName,t,e.Strict):(e.Base[e.ReferenceName]=t,h(void 0))}function O(e){if(t=e,!(Array.isArray(t)||null!=t&&"function"==typeof t[Symbol.iterator]))throw new TypeError("".concat(typeof e," is not iterable"));var t;return e[Symbol.iterator]()}function T(e){if(null==e)throw new TypeError("Cannot destructure properties of undefined or null")}function B(e,t,r){return e?e.HasBinding(t)?new f(e,t,r):B(e.OuterEnv,t,r):new f("unresolvable",t,r)}function R(e,t,r){switch(t){case"+":return e+r;case"-":return e-r;case"/":return e/r;case"%":return e%r;case"*":return e*r;case"**":return e**r;case"==":return e==r;case"===":return e===r;case"!=":return e!=r;case"!==":return e!==r;case">":return e>r;case"<":return e<r;case">=":return e>=r;case"<=":return e<=r}throw new SyntaxError("Unsupported binary operator `".concat(t,"`"))}var L=new WeakSet([Function,Object,Function.prototype,Object.prototype,function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}()]);function M(e){if(L.has(e))throw new TypeError("Cannot access reserved objects such as `Function`.")}var _=new WeakSet([Array,Map,Set,URLSearchParams,WeakMap,WeakSet,RegExp]);function F(e,t){var r,{rules:n,globalVariables:o={},hooks:L={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},F="FunctionDeclaration"!==e.type,U=new i(null),N=new a;N.VariableEnvironment=U,N.LexicalEnvironment=U;var j=[N];for(var[V,D]of Object.entries(o))U.CreateImmutableBinding(V,!0),U.InitializeBinding(V,D);var $=new WeakMap;function W(e,r){var n,a,o;switch(null===(n=L.beforeEvaluate)||void 0===n||n.call(L,e),e.type){case"ArrayExpression":var s=[];for(var l of e.elements)if(l)if("SpreadElement"===l.type){var c=x(W(l.argument));s.push(...c)}else s.push(x(W(l)));else s.length+=1;return h(s);case"ArrowFunctionExpression":return de(e),h(oe(e,H().LexicalEnvironment,!1));case"BinaryExpression":var u=x(W(e.left)),d=W(e.right).Value,y=x(d);if(F&&"|>"===e.operator){if("function"!=typeof y){var b=t.substring(e.right.start,e.right.end);throw new TypeError("".concat(b," is not a function"))}var C;return d instanceof f&&w(d)&&(C=d.Base),h(y.call(C,u))}return h(R(u,e.operator,y));case"CallExpression":var T=W(e.callee,r).Value,B=x(T);return null==B&&(e.optional||null!=r&&r.skipped)?(r.skipped=!0,h(void 0)):(M(B),te(B,T,e.arguments,e.callee));case"ChainExpression":return W(e.expression,{});case"ConditionalExpression":return h(x(W(x(W(e.test))?e.consequent:e.alternate)));case"Identifier":return h(K(e.name));case"Literal":if(e.regex){if(null===e.value)throw new SyntaxError("Invalid regular expression: ".concat(e.raw));if(e.regex.flags.includes("u"))throw new SyntaxError("Unsupported unicode flag in regular expression: ".concat(e.raw))}return h(e.value);case"LogicalExpression":var U=x(W(e.left));switch(e.operator){case"&&":return h(U&&x(W(e.right)));case"||":return h(U||x(W(e.right)));case"??":return h(null!=U?U:x(W(e.right)));default:throw new SyntaxError("Unsupported logical operator '".concat(e.operator,"'"))}case"MemberExpression":var N=x(W(e.object,r).Value);if(null==N&&(e.optional||null!=r&&r.skipped))return r.skipped=!0,h(void 0);M(N);var j=e.computed?function(e,t,r){var n=I(x(W(t)));return new f(e,n,!0)}(N,e.property):function(e,t,r){var n=t.name;return new f(e,n,!0)}(N,e.property);return M(j),h(j);case"NewExpression":return function(e,r){var n=x(W(e)),a=re(r);if("function"!=typeof n||!1===n[p]){var o=t.substring(e.start,e.end);throw new TypeError("".concat(o," is not a constructor"))}if(!function(e){return _.has(e)||e===Date}(n)){var i=t.substring(e.start,e.end);throw new TypeError("".concat(i," is not an allowed constructor"))}return h(new n(...a))}(e.callee,e.arguments);case"ObjectExpression":var V={};for(var D of e.properties)if("SpreadElement"===D.type)S(V,x(W(D.argument)),new Set);else{if("init"!==D.kind)throw new SyntaxError("Unsupported object getter/setter");var $=D.computed||"Identifier"!==D.key.type?se(D.key):D.key.name;if("__proto__"===$)throw new TypeError("Setting '__proto__' property is not allowed");V[$]=x(W(D.value))}return h(V);case"SequenceExpression":var J;for(var Q of e.expressions)J=h(x(W(Q)));return J;case"TemplateLiteral":var X=[e.quasis[0].value.cooked],ae=0;for(var le of e.expressions){var ce=x(W(le));X.push(String(ce)),X.push(e.quasis[ae+=1].value.cooked)}return h(X.join(""));case"TaggedTemplateExpression":var ue=W(e.tag).Value,pe=x(ue);return M(pe),te(pe,ue,e.quasi,e.tag);case"UnaryExpression":var fe=W(e.argument).Value;if(!F&&"delete"===e.operator){if(!(fe instanceof f))return h(!0);if(w(fe))return h(delete fe.Base[fe.ReferenceName])}return"typeof"===e.operator?fe instanceof f&&"unresolvable"===fe.Base?h("undefined"):h(typeof x(fe)):h(function(e,t){switch(t){case"!":return!e;case"+":return+e;case"-":return-e;case"void":return}throw new SyntaxError("Unsupported unary operator `".concat(t,"`"))}(x(fe),e.operator))}if(!F)switch(e.type){case"AssignmentExpression":if("="===e.operator){if("ArrayPattern"!==e.left.type&&"ObjectPattern"!==e.left.type){var ve=W(e.left).Value,he=x(W(e.right));return Z(ve,he),h(he)}var me=x(W(e.right));return Y(e.left,me),h(me)}var ge=W(e.left).Value,ye=x(ge),be=x(W(e.right)),we=function(e,t,r){switch(t){case"+=":case"-=":case"*=":case"/=":case"%=":case"**=":return R(e,t.substr(0,t.length-1),r)}throw new SyntaxError("Unsupported assignment operator `".concat(t,"`"))}(ye,e.operator,be);return Z(ge,we),h(we);case"BlockStatement":if(!e.body.length)return h(m);var Ee=H().LexicalEnvironment,Se=new i(Ee);ee(e.body,Se),H().LexicalEnvironment=Se;var ke=ne(e.body);return H().LexicalEnvironment=Ee,ke;case"BreakStatement":return new v("break",m);case"ContinueStatement":return new v("continue",m);case"EmptyStatement":case"FunctionDeclaration":return h(m);case"DoWhileStatement":return q(function(e){for(var t;;){var r=W(e.body);if(!A(r))return P(r,t);if(r.Value!==m&&(t=r.Value),!x(W(e.test)))return h(t)}}(e));case"ExpressionStatement":case"TSAsExpression":return W(e.expression);case"ForInStatement":case"ForOfStatement":return q(function(e){var t=e.left,r="VariableDeclaration"===t.type?"var"===t.kind?"varBinding":"lexicalBinding":"assignment",n="lexicalBinding"===r?g(t):[],a="ForInStatement"===e.type?"enumerate":"iterate",o=function(e,t,r){var n=H(),a=n.LexicalEnvironment;if(e.length>0){var o=new i(a);for(var s of e)o.CreateMutableBinding(s,!1);n.LexicalEnvironment=o}var l=W(t);n.LexicalEnvironment=a;var c=x(l);if("enumerate"===r){if(null==c)return new v("break",m);var u=function*(e){for(var t in e)yield t}(c);return h(u)}return h(O(c))}(n,e.right,a);return"normal"!==o.Type?o:function(e,t,r,n,a){for(var o,s="assignment"===a?e:e.declarations[0].id,l=H().LexicalEnvironment,c="ObjectPattern"===s.type||"ArrayPattern"===s.type;;){var{done:u,value:d}=r.next();if(u)return h(o);var p=void 0,f=void 0;if("lexicalBinding"===a){if(k(e,f=new i(l)),H().LexicalEnvironment=f,!c){var[v]=g(s);p=K(v)}}else c||(p=W(s).Value);c?"assignment"===a?Y(s,d):ie(s,d,"varBinding"===a?void 0:f):"lexicalBinding"===a?E(p,d):Z(p,d);var y=W(t);if(H().LexicalEnvironment=l,!A(y)){var b=P(y,o);if("enumerate"!==n&&void 0!==r.return){var w=r.return();if(!w||!["object","function"].includes(typeof w))throw new TypeError("Iterator result is not an object")}return b}y.Value!==m&&(o=y.Value)}}(t,e.body,o.Value,a,r)}(e));case"ForStatement":return q(function(e){var t;if("VariableDeclaration"===(null===(t=e.init)||void 0===t?void 0:t.type)){if("var"===e.init.kind)return W(e.init),G(e.test,e.update,e.body,[]);var r=H().LexicalEnvironment,n=new i(r),a="const"===e.init.kind,o=g(e.init);for(var s of o)a?n.CreateImmutableBinding(s,!0):n.CreateMutableBinding(s,!1);H().LexicalEnvironment=n,W(e.init);var l=a?[]:Array.from(o),c=G(e.test,e.update,e.body,l);return H().LexicalEnvironment=r,c}return e.init&&x(W(e.init)),G(e.test,e.update,e.body,[])}(e));case"FunctionExpression":return de(e),h(function(e){var t=H().LexicalEnvironment;if(e.id){var r=e.id.name,n=new i(t);n.CreateImmutableBinding(r,!1);var a=oe(e,n,!0);return n.InitializeBinding(r,a),a}return oe(e,t,!0)}(e));case"IfStatement":return x(W(e.test))?(null!==(a=L.beforeBranch)&&void 0!==a&&a.call(L,e,"if"),P(W(e.consequent),void 0)):(null!==(o=L.beforeBranch)&&void 0!==o&&o.call(L,e,"else"),e.alternate?P(W(e.alternate),void 0):h(void 0));case"ReturnStatement":var Ae;return e.argument&&(Ae=x(W(e.argument))),new v("return",Ae);case"ThrowStatement":throw x(W(e.argument));case"UpdateExpression":var Pe=W(e.argument).Value,xe=Number(x(Pe)),Ie="++"===e.operator?xe+1:xe-1;return Z(Pe,Ie),h(e.prefix?Ie:xe);case"SwitchCase":return ne(e.consequent);case"SwitchStatement":var Ce=x(W(e.discriminant)),Ze=H().LexicalEnvironment,Oe=new i(Ze);ee(e.cases,Oe),H().LexicalEnvironment=Oe;var Te=function(e,t){var r,n=e.findIndex((e=>!e.test)),a=n>=0,o=a?e.slice(0,n):e,i=!1;for(var s of o)if(i||(i=z(s,t)),i){var l=W(s);if(l.Value!==m&&(r=l.Value),"normal"!==l.Type)return P(l,r)}if(!a)return h(r);var c=!1,u=e.slice(n+1);if(!i)for(var d of u)if(c||(c=z(d,t)),c){var p=W(d);if(p.Value!==m&&(r=p.Value),"normal"!==p.Type)return P(p,r)}if(c)return h(r);var f=W(e[n]);if(f.Value!==m&&(r=f.Value),"normal"!==f.Type)return P(f,r);for(var v of u){var g=W(v);if(g.Value!==m&&(r=g.Value),"normal"!==g.Type)return P(g,r)}return h(r)}(e.cases,Ce);return H().LexicalEnvironment=Ze,q(Te);case"TryStatement":var Be;try{Be=W(e.block)}catch(t){if(!e.handler)throw t;var Re;null===(Re=L.beforeEvaluate)||void 0===Re||Re.call(L,e.handler),Be=function(e,t){if(!e.param)return W(e.body);var r=H().LexicalEnvironment,n=new i(r);for(var a of g(e.param))n.CreateMutableBinding(a,!1);H().LexicalEnvironment=n,ie(e.param,t,n);var o=W(e.body);return H().LexicalEnvironment=r,o}(e.handler,t)}finally{if(e.finalizer){var Le=W(e.finalizer);"normal"!==Le.Type&&(Be=Le)}}return Be;case"VariableDeclaration":var Me;for(var _e of e.declarations)if(_e.init)if("Identifier"===_e.id.type){var Fe=K(_e.id.name),Ue=x(W(_e.init));Me="var"===e.kind?Z(Fe,Ue):E(Fe,Ue)}else{var Ne=x(W(_e.init));Me=ie(_e.id,Ne,"var"===e.kind?void 0:H().LexicalEnvironment)}else Me="var"===e.kind?h(m):E(K(_e.id.name),void 0);return Me;case"WhileStatement":return q(function(e){for(var t;;){if(!x(W(e.test)))return h(t);var r=W(e.body);if(!A(r))return P(r,t);r.Value!==m&&(t=r.Value)}}(e))}throw new SyntaxError("Unsupported node type `".concat(e.type,"`"))}function H(){return j[j.length-1]}function K(e,t){return t||(t=H().LexicalEnvironment),B(t,e,!0)}function q(e){return"break"===e.Type?e.Value===m?h(void 0):h(e.Value):e}function z(e,t){return t===x(W(e.test))}function G(e,t,r,n){var a;for(J(n);;){if(e&&!x(W(e)))return h(a);var o=W(r);if(!A(o))return P(o,a);o.Value&&(a=o.Value),J(n),t&&x(W(t))}}function J(e){if(0!==e.length){var t=H().LexicalEnvironment,r=t.OuterEnv,n=new i(r);for(var a of e){n.CreateMutableBinding(a,!1);var o=t.GetBindingValue(a,!1);n.InitializeBinding(a,o)}H().LexicalEnvironment=n}}function Y(e,t){if("ObjectPattern"===e.type)return T(t),e.properties.length>0&&function(e,t){var r=new Set;for(var n of e)if("Property"===n.type){var a=n.computed||"Identifier"!==n.key.type?se(n.key):n.key.name,o="AssignmentPattern"===n.value.type?n.value.left:n.value;if("Identifier"===o.type){var i=K(o.name),s=C(t,a);"AssignmentPattern"===n.value.type&&void 0===s&&(s=x(W(n.value.right))),Z(i,s),r.add(a)}else Q(n.value,t,a),r.add(a)}else X(n,t,r)}(e.properties,t),h(m);var r=O(t);return function(e,t){var r=h(m);for(var n of e)if(n){var a="RestElement"===n.type?n.argument:"AssignmentPattern"===n.type?n.left:n,o="ArrayPattern"===a.type||"ObjectPattern"===a.type,i=void 0;o||(i=W(a).Value);var s=void 0;if("RestElement"!==n.type){var{done:l,value:c}=t.next(),u=l?void 0:c;s="AssignmentPattern"===n.type&&void 0===u?x(W(n.right)):u}else{s=[];for(var d=0;;){var{done:p,value:f}=t.next();if(p)break;s[d]=f,d++}}r=o?Y(a,s):Z(i,s)}else t.next(),r=h(m);return r}(e.elements,r)}function Q(e,t,r){var n,a="AssignmentPattern"===e.type?e.left:e,o="ArrayPattern"===a.type||"ObjectPattern"===a.type;o||(n=W(a).Value);var i,s=C(t,r);return i="AssignmentPattern"===e.type&&void 0===s?x(W(e.right)):s,o?Y(a,i):Z(n,i)}function X(e,t,r){return Z(W(e.argument).Value,S({},t,r))}function ee(e,t){var r=b(e,{var:!1,topLevel:!1});for(var n of r){var a="VariableDeclaration"===n.type&&"const"===n.kind;for(var o of g(n))a?t.CreateImmutableBinding(o,!0):t.CreateMutableBinding(o,!1);if("FunctionDeclaration"===n.type){var[i]=g(n),s=ae(n,t);t.InitializeBinding(i,s)}}}function te(e,r,n,a){var o;r instanceof f&&w(r)&&(o=r.Base);var i=re(n);if("function"!=typeof e){var s=t.substring(a.start,a.end);throw new TypeError("".concat(s," is not a function"))}var l=e.apply(o,i);return M(l),h(l)}function re(e){var t=[];if(Array.isArray(e))for(var r of e)if("SpreadElement"===r.type){var n=x(W(r.argument));t.push(...n)}else t.push(x(W(r)));else for(var a of(t.push(function(e){var t=$.get(e);if(t)return t;var r=e.quasis.map((e=>e.value.raw)),n=e.quasis.map((e=>e.value.cooked));return Object.freeze(r),Object.defineProperty(n,"raw",{value:r,writable:!1,enumerable:!1,configurable:!1}),Object.freeze(n),$.set(e,n),n}(e)),e.expressions))t.push(x(W(a)));return t}function ne(e){var t=h(m);for(var r of e){var n=W(r);if("normal"!==n.Type)return n;t=P(t,n.Value)}return t}function ae(e,t){return oe(e,t,!0)}function oe(e,t,r){var o=function(){return function(e,t){var r;null===(r=L.beforeCall)||void 0===r||r.call(L,e[l]),function(e){var t=new a;t.Function=e;var r=new s(e[d]);t.VariableEnvironment=r,t.LexicalEnvironment=r,j.push(t)}(e);var o=function(e,t){return function(e,t,r){return function(e,t){for(var r=H(),a=e[u],o=e[c],s=g(o),l=y(o),d=b(a,{var:!0,topLevel:!0}),p=g(d),f=[],v=[],h=d.length-1;h>=0;h--){var m=d[h];if("FunctionDeclaration"===m.type){de(m);var[w]=g(m);f.includes(w)||(f.unshift(w),v.unshift(m))}else if(null!=n&&n.noVar)throw new SyntaxError("Var declaration is not recommended, use `let` or `const` instead")}var E,S=r.LexicalEnvironment;for(var k of s)S.CreateMutableBinding(k,!1);if(ce(o,O(t),S),l)for(var A of(E=new i(S),r.VariableEnvironment=E,p)){E.CreateMutableBinding(A,!1);var P=void 0;s.includes(A)&&!f.includes(A)&&(P=S.GetBindingValue(A,!1)),E.InitializeBinding(A,P)}else{for(var x of p)s.includes(x)||(S.CreateMutableBinding(x,!1),S.InitializeBinding(x,void 0));E=S}var I=E;r.LexicalEnvironment=I;var C=b(a,{var:!1,topLevel:!0});for(var Z of C)for(var T of g(Z))"const"===Z.kind?I.CreateImmutableBinding(T,!0):I.CreateMutableBinding(T,!1);for(var B of v){var[R]=g(B),L=ae(B,I);E.SetMutableBinding(R,L,!1)}}(t,r),Array.isArray(e)?ne(e):new v("return",x(W(e)))}(e[u],e,t)}(e,t);if(j.pop(),"return"===o.Type)return o.Value}(o,arguments)};return Object.defineProperties(o,{[l]:{value:e},[c]:{value:e.params},[u]:{value:"BlockStatement"===e.body.type?e.body.body:e.body},[d]:{value:t},[p]:{value:r}}),o}function ie(e,t,r){switch(e.type){case"Identifier":return function(e,t,r){return r.InitializeBinding(e,t),h(m)}(e.name,t,r);case"ObjectPattern":return T(t),function(e,t,r){var n=new Set;for(var a of e){if("RestElement"===a.type)return le(a,t,r,n);if(a.computed||"Identifier"!==a.key.type){var o=se(a.key);ue(a.value,t,r,o),n.add(o)}else ue(a.value,t,r,a.key.name),n.add(a.key.name)}return h(m)}(e.properties,t,r);case"ArrayPattern":var n=O(t);return ce(e.elements,n,r)}}function se(e){return I(x(W(e)))}function le(e,t,r,n){var a=K(e.argument.name,r),o=S({},t,n);return r?E(a,o):Z(a,o)}function ce(e,t,r){if(0===e.length)return h(m);var n;for(var a of e)if(a)if("RestElement"===a.type)if("Identifier"===a.argument.type)for(var o=K(a.argument.name,r),i=[],s=0;;){var{done:l,value:c}=t.next();if(l){n=r?E(o,i):Z(o,i);break}i[s]=c,s++}else for(var u=[],d=0;;){var{done:p,value:f}=t.next();if(p){n=ie(a.argument,u,r);break}u[d]=f,d++}else{var v="AssignmentPattern"===a.type?a.left:a;switch(v.type){case"ObjectPattern":case"ArrayPattern":var g=void 0,{done:y,value:b}=t.next();y||(g=b),"AssignmentPattern"===a.type&&void 0===g&&(g=x(W(a.right))),n=ie(v,g,r);break;case"Identifier":var w=K(v.name,r),S=void 0,{done:k,value:A}=t.next();k||(S=A),"AssignmentPattern"===a.type&&void 0===S&&(S=x(W(a.right))),n=r?E(w,S):Z(w,S)}}else t.next(),n=h(m);return n}function ue(e,t,r,n){if("Identifier"===e.type||"AssignmentPattern"===e.type&&"Identifier"===e.left.type){var a=K("Identifier"===e.type?e.name:e.left.name,r),o=C(t,n);return"AssignmentPattern"===e.type&&void 0===o&&(o=x(W(e.right))),r?E(a,o):Z(a,o)}var i=C(t,n);return"AssignmentPattern"===e.type&&void 0===i&&(i=x(W(e.right))),ie("AssignmentPattern"===e.type?e.left:e,i,r)}function de(e){if(e.async||e.generator)throw new SyntaxError("".concat(e.async?"Async":"Generator"," function is not allowed"));if(F&&!e.expression)throw new SyntaxError("Only an `Expression` is allowed in `ArrowFunctionExpression`'s body")}if(F)return x(W(e));null===(r=L.beforeEvaluate)||void 0===r||r.call(L,e),de(e);var[pe]=g(e);U.CreateImmutableBinding(pe,!0);var fe=ae(e,U);return U.InitializeBinding(pe,fe),fe}var U=r(3028);class N{constructor(){(0,n.Z)(this,"VariableEnvironment",void 0),(0,n.Z)(this,"LexicalEnvironment",void 0)}}class j{constructor(e){(0,n.Z)(this,"OuterEnv",void 0),(0,n.Z)(this,"bindingSet",new Set),this.OuterEnv=e}HasBinding(e){return this.bindingSet.has(e)}CreateBinding(e){this.bindingSet.add(e)}}function V(e){var{expressionOnly:t,visitors:r,withParent:n,hooks:a={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new Set,i=[],s=new j(null),l=new N;function c(){return i[i.length-1]}function u(e,t,r){for(var n of t)d(e[n],null==r?void 0:r.concat({node:e,key:n}))}function d(e,n){if(Array.isArray(e))e.forEach(((e,t)=>{d(e,n?n.slice(0,-1).concat((0,U.Z)((0,U.Z)({},n[n.length-1]),{},{index:t})):n)}));else if(e){var i,s;switch(null===(i=a.beforeVisit)||void 0===i||i.call(a,e,n),function(e){var t,n;r&&(t=r,n=e.type,Object.prototype.hasOwnProperty.call(t,n))&&r[e.type](e)}(e),e.type){case"Identifier":var l;return D=e.name,void(f(c().LexicalEnvironment,D)||(null===(l=a.beforeVisitGlobal)||void 0===l||l.call(a,e,n),o.add(e.name)));case"ArrayExpression":case"ArrayPattern":return void u(e,["elements"],n);case"ArrowFunctionExpression":return void h(m(e,c().LexicalEnvironment),n);case"AssignmentPattern":case"BinaryExpression":case"LogicalExpression":return void u(e,["left","right"],n);case"CallExpression":case"NewExpression":return void u(e,["callee","arguments"],n);case"ChainExpression":return void u(e,["expression"],n);case"ConditionalExpression":return void u(e,["test","consequent","alternate"],n);case"MemberExpression":return u(e,["object"],n),void(e.computed&&u(e,["property"],n));case"ObjectExpression":case"ObjectPattern":return void u(e,["properties"],n);case"Property":return e.computed&&u(e,["key"],n),void u(e,["value"],n);case"RestElement":case"SpreadElement":case"UnaryExpression":return void u(e,["argument"],n);case"SequenceExpression":case"TemplateLiteral":return void u(e,["expressions"],n);case"TaggedTemplateExpression":return void u(e,["tag","quasi"],n);case"Literal":return}if(!t)switch(e.type){case"AssignmentExpression":return void u(e,["right","left"],n);case"BlockStatement":if(!e.body.length)return;var y=c(),b=y.LexicalEnvironment,w=new j(b);return v(e.body,w),y.LexicalEnvironment=w,u(e,["body"],n),void(y.LexicalEnvironment=b);case"BreakStatement":case"ContinueStatement":case"EmptyStatement":return;case"CatchClause":var E=c(),S=E.LexicalEnvironment,k=new j(S);return p(e.param,k),E.LexicalEnvironment=k,u(e,["param","body"],n),void(E.LexicalEnvironment=S);case"DoWhileStatement":return void u(e,["body","test"],n);case"ExpressionStatement":case"TSAsExpression":return void u(e,["expression"],n);case"ForInStatement":case"ForOfStatement":var A="VariableDeclaration"===e.left.type&&"var"!==e.left.kind,P=c(),x=P.LexicalEnvironment;if(A){var I=new j(x);p(e.left,I),P.LexicalEnvironment=I}if(u(e,["right"],n),P.LexicalEnvironment=x,A){var C=new j(x);p(e.left,C),P.LexicalEnvironment=C}return u(e,["left","body"],n),void(P.LexicalEnvironment=x);case"ForStatement":var Z,O="VariableDeclaration"===(null===(Z=e.init)||void 0===Z?void 0:Z.type)&&"var"!==e.init.kind,T=c(),B=T.LexicalEnvironment;if(O){var R=new j(B);p(e.init,R),T.LexicalEnvironment=R}return u(e,["init","test","body","update"],n),void(T.LexicalEnvironment=B);case"FunctionDeclaration":var[L]=g(e),M=c().LexicalEnvironment,_=m(e,M);return M.CreateBinding(L),void h(_,n);case"FunctionExpression":return void h(function(e){var t=c().LexicalEnvironment;if(!e.id)return m(e,t);var r=e.id.name,n=new j(t);return n.CreateBinding(r),m(e,n)}(e),n);case"IfStatement":return void u(e,["test","consequent","alternate"],n);case"ReturnStatement":case"ThrowStatement":case"UpdateExpression":return void u(e,["argument"],n);case"SwitchCase":return void u(e,["test","consequent"],n);case"SwitchStatement":u(e,["discriminant"],n);var F=c(),N=F.LexicalEnvironment,V=new j(N);return v(e.cases,V),F.LexicalEnvironment=V,u(e,["cases"],n),void(F.LexicalEnvironment=N);case"TryStatement":return void u(e,["block","handler","finalizer"],n);case"VariableDeclaration":return void u(e,["declarations"],n);case"VariableDeclarator":return void u(e,["id","init"],n);case"WhileStatement":return void u(e,["test","body"],n)}(null===(s=a.beforeVisitUnknown)||void 0===s?void 0:s.call(a,e,n))||console.warn("Unsupported node type `".concat(e.type,"`"))}var D}function p(e,t){for(var r of g(e))t.CreateBinding(r)}function f(e,t){return!!e&&(e.HasBinding(t)||f(e.OuterEnv,t))}function v(e,t){p(b(e,{var:!1,topLevel:!1}),t)}function h(e,t){var r,n,a;r=e,n=new N,a=new j(r.Environment),n.VariableEnvironment=a,n.LexicalEnvironment=a,i.push(n),function(e,t){var r,n=c(),a=e.ECMAScriptCode,o=e.FormalParameters,i=y(o),s=g(b(a,{var:!0,topLevel:!0})),l=n.LexicalEnvironment;if(p(o,l),d(o,null==t?void 0:t.concat({node:e.Function,key:"params"})),i)for(var u of(r=new j(l),n.VariableEnvironment=r,s))r.CreateBinding(u);else{for(var f of s)l.CreateBinding(f);r=l}var v=r;n.LexicalEnvironment=v,p(b(a,{var:!1,topLevel:!0}),v)}(e,t),d(e.ECMAScriptCode,null==t?void 0:t.concat({node:e.Function,key:"body"}).concat("BlockStatement"===e.Function.body.type?{node:e.Function.body,key:"body"}:[])),i.pop()}function m(e,t){return{Function:e,FormalParameters:e.params,ECMAScriptCode:"BlockStatement"===e.body.type?e.body.body:e.body,Environment:t}}return l.VariableEnvironment=s,l.LexicalEnvironment=s,i.push(l),d(e,n?[]:void 0),o}var D=r(2159),$=r(1874),W=["typescript"];function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{typescript:r}=t,n=(0,D.Z)(t,W),a=function(e){var{typescript:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,$.Qc)(e,{plugins:["estree",t&&"typescript"].filter(Boolean),strictMode:!0,attachComment:!1}).program.body,n=t?[]:r;if(t)for(var a of r)if(a.type.startsWith("TS")){if(/Enum|Import|Export/.test(a.type))throw new SyntaxError("Unsupported TypeScript syntax: ".concat(a.type))}else n.push(a);if(0===n.length)throw new SyntaxError("Function declaration not found");if(n.length>1||"FunctionDeclaration"!==n[0].type)throw new SyntaxError("Expect a single function declaration at top level, but received: ".concat(n.map((e=>'"'.concat(e.type,'"'))).join(", ")));return n[0]}(e,{typescript:r});return{function:a,attemptToVisitGlobals:V(a,n)}}function K(e,t){var r=[],n=e.replace(/^\s*<%[~=]?\s|\s%>\s*$/g,(e=>(r.push(e),""))),a=function(e){return(0,$.BJ)(e,{plugins:["estree",["pipelineOperator",{proposal:"minimal"}]],attachComment:!1})}(n);return{expression:a,attemptToVisitGlobals:V(a,(0,U.Z)((0,U.Z)({},t),{},{expressionOnly:!0})),source:n,prefix:r[0],suffix:r[1]}}function q(e){return/^\s*<%[~=]?\s/.test(e)&&/\s%>\s*$/.test(e)}function z(e){return/^\s*<%~\s/.test(e)}function G(e){return/^\s*<%=\s/.test(e)&&/\s%>\s*$/.test(e)}},2424:(e,t,r)=>{r.r(t),r.d(t,{HttpAbortError:()=>m,HttpFetchError:()=>f,HttpParseError:()=>h,HttpResponseError:()=>v,createHttpInstance:()=>M,defaultAdapter:()=>Z,fetch:()=>n,getUrlWithParams:()=>I,http:()=>L,isHttpAbortError:()=>A});var n=(e,t)=>{var r=new Request(e,Object.assign({credentials:"same-origin"},t));return self.fetch(r)},a=r(5866),o=r(3395),i=r(6666),s=r(687),l=r(6171),c=r(381),u=r(3028),d=r(2159),p=r(4795);class f extends Error{constructor(e){super(e),this.name="HttpFetchError",Error.captureStackTrace&&Error.captureStackTrace(this,f)}}class v extends Error{constructor(e,t){super(e.statusText),(0,i.Z)(this,"response",void 0),(0,i.Z)(this,"responseJson",void 0),this.name="HttpResponseError",Error.captureStackTrace&&Error.captureStackTrace(this,v),this.response=e,this.responseJson=t}}class h extends Error{constructor(e){super(e.statusText),(0,i.Z)(this,"response",void 0),this.name="HttpParseError",Error.captureStackTrace&&Error.captureStackTrace(this,h),this.response=e}}class m extends Error{constructor(e){super(e),this.name="HttpAbortError"}}class g{constructor(){(0,i.Z)(this,"handlers",[])}use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){this.handlers.forEach((t=>{null!==t&&e(t)}))}}var y=["params","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache"],b=["params","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache","headers"],w=["body","method"];function E(e){return null==e}var S=document.querySelector("base"),k=S?S.href:location.origin+"/",A=e=>e instanceof DOMException&&20===e.code,P=(e,t)=>({error:e,config:t}),x=function(){var e=(0,p.Z)((function*(e,t,r){return new Promise(function(){var a=(0,p.Z)((function*(a,o){var i;r.url=e;var{responseType:s}=r.options||{};s||(s="json");try{i=yield n(e,t)}catch(e){return void o(P(A(e)?new m(e.toString()):new f(e.toString()),r))}if(i.ok){var l;try{l=yield i[s]()}catch(e){return void o(P(A(e)?new m(e.toString()):new h(i),r))}a({config:r,status:i.status,statusText:i.statusText,headers:i.headers,data:l})}else{var c;try{c=yield i.json()}catch(e){}o(P(new v(i,c),r))}}));return function(e,t){return a.apply(this,arguments)}}())}));return function(t,r,n){return e.apply(this,arguments)}}(),I=(e,t)=>{if(t){var r=new URL(e,k);t instanceof URLSearchParams?t.forEach((function(e,t){r.searchParams.append(t,e)})):Object.entries(t).forEach((e=>{var[t,n]=e;Array.isArray(n)?n.forEach((e=>{r.searchParams.append(t,E(e)?"":e)})):r.searchParams.append(t,E(n)?"":n)}));var{href:n}=r;return n.startsWith(k)?n.substr(k.length):n}return e},C=(e,t)=>{if(void 0!==e){var r=new Headers(t||{}),n="Content-Type",a=e;return r.has(n)||("string"==typeof e?r.set(n,"application/x-www-form-urlencoded"):e instanceof FormData||(r.set(n,"application/json"),a=JSON.stringify(e))),{body:a,headers:r}}return{headers:t}},Z=e=>{var{url:t,method:r,data:n}=e;return["DELETE","GET","HEAD"].includes(e.method)?((e,t,r)=>{var n=r.options||{},{params:a,responseType:o,interceptorParams:i,observe:s,noAbortOnRouteChange:l,useCache:c}=n,p=(0,d.Z)(n,y);return x(I(t,a),(0,u.Z)((0,u.Z)({},p),{},{method:e}),r)})(r,t,e):((e,t,r,n)=>{var a=n.options||{},{params:o,responseType:i,interceptorParams:s,observe:l,noAbortOnRouteChange:c,useCache:p,headers:f}=a,v=(0,d.Z)(a,b);return x(I(t,o),(0,u.Z)((0,u.Z)({},v),{},{method:e},C(r,f)),n)})(r,t,n,e)},O=new WeakMap,T=new WeakSet;class B{constructor(e){var t=this;(0,a.Z)(this,T),(0,i.Z)(this,"interceptors",void 0),(0,o.Z)(this,O,{writable:!0,value:Z}),(0,i.Z)(this,"request",function(){var e=(0,p.Z)((function*(e,r,n){var a=r||{},{body:o,method:i}=a,s=(0,d.Z)(a,w);return(0,l.Z)(t,T,R).call(t,{url:e,data:o,method:i||"GET",options:(0,u.Z)((0,u.Z)({},n||{}),s)})}));return function(t,r,n){return e.apply(this,arguments)}}()),(0,i.Z)(this,"simpleRequest",(function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.Z)(t,T,R).call(t,{url:r,method:e,options:n})})),(0,i.Z)(this,"requestWithBody",(function(e,r,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,l.Z)(t,T,R).call(t,{url:r,method:e,data:n,options:a})})),this.interceptors={request:new g,response:new g},null!=e&&e.adapter&&(0,c.Z)(this,O,e.adapter)}getUrlWithParams(e,t){return I(e,t)}getBodyAndHeaders(e,t){return C(e,t)}get(e,t){return(0,l.Z)(this,T,R).call(this,{url:e,method:"GET",options:t})}delete(e,t){return(0,l.Z)(this,T,R).call(this,{url:e,method:"DELETE",options:t})}head(e,t){return(0,l.Z)(this,T,R).call(this,{url:e,method:"HEAD",options:t})}post(e,t,r){return(0,l.Z)(this,T,R).call(this,{url:e,method:"POST",data:t,options:r})}put(e,t,r){return(0,l.Z)(this,T,R).call(this,{url:e,method:"PUT",data:t,options:r})}patch(e,t,r){return(0,l.Z)(this,T,R).call(this,{url:e,method:"PATCH",data:t,options:r})}}function R(e){var t=[],r=Promise.resolve(e);for(this.interceptors.request.forEach((e=>{t.push(e.fulfilled,e.rejected)})),t.push((e=>(0,s.Z)(this,O).call(this,e)),void 0),this.interceptors.response.forEach((e=>{t.push(e.fulfilled,e.rejected)})),t.push((e=>{var t;return"response"===(null===(t=e.config.options)||void 0===t?void 0:t.observe)?e:e.data}),(e=>Promise.reject(e.error)));t.length;)r=r.then(t.shift(),t.shift());return r}var L=new B;function M(e){L=new B(e)}},4034:(e,t,r)=>{r.r(t),r.d(t,{i18n:()=>d,i18nText:()=>u,initializeI18n:()=>l});var n=r(3239),a=r(206),o=r(6473),i=!1,s=new Set;function l(e,t){if(i||(i=!0,a.i18n.use(o.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&t&&!s.has(e))for(var[r,n]of(s.add(e),Object.entries(t)))a.i18n.addResourceBundle(r,e,n)}var c=r(2151);function u(e){var t;if(e){var r=null!==(t=a.i18n.language)&&void 0!==t?t:"zh-CN";if((0,c.hasOwnProperty)(e,r))return e[r];var n=r.split("-")[0];if(n!==r)return(0,c.hasOwnProperty)(e,n)?e[n]:void 0;var o="".concat(n,"-");for(var i of Object.keys(e))if(i.startsWith(o))return e[i]}}var d=n.default},7920:(e,t,r)=>{r.r(t),r.d(t,{inject:()=>k,transform:()=>S,transformAndInject:()=>A});var n=r(5178),a=r(8183),o=function(e){return e[e.Initial=0]="Initial",e[e.ExpectField=1]="ExpectField",e[e.ExpectOptionalBeginDefault=2]="ExpectOptionalBeginDefault",e[e.ExpectDefaultValue=3]="ExpectDefaultValue",e[e.ExpectOptionalBeginPipe=4]="ExpectOptionalBeginPipe",e[e.ExpectPipeIdentifier=5]="ExpectPipeIdentifier",e[e.ExpectOptionalBeginPipeParameter=6]="ExpectOptionalBeginPipeParameter",e[e.ExpectPipeParameter=7]="ExpectPipeParameter",e[e.ExpectPlaceholderEnd=8]="ExpectPlaceholderEnd",e}({}),i=function(e){return e.Raw="Raw",e.BeginPlaceHolder="BeginPlaceHolder",e.Field="Field",e.BeginDefault="BeginDefault",e.LiteralString="LiteralString",e.BeginPipe="BeginPipe",e.PipeIdentifier="PipeIdentifier",e.BeginPipeParameter="BeginPipeParameter",e.EndPlaceHolder="EndPlaceHolder",e.JsonValue="JsonValue",e}({}),s=function(e){return e[e.Array=0]="Array",e[e.Object=1]="Object",e[e.String=2]="String",e[e.Others=3]="Others",e}({});function l(e){return new RegExp("(".concat([].concat(e).map((e=>(0,n.escapeRegExp)(e))).join("|"),")\\{"))}function c(e){var t,r=E(e),n=null===(t=r.match(e.beginPlaceholder))||void 0===t?void 0:t[0],a=n?r.indexOf(n):-1;if(a>=0&&n&&"{"!==r.charAt(a+n.length)){var s=e.cursor+a;a>0&&e.tokens.push({type:i.Raw,value:r.substring(0,a)}),e.tokens.push({type:i.BeginPlaceHolder,loc:{start:s,end:s+n.length},value:n.substring(0,n.length-1)}),e.cursor+=a+n.length,e.status=o.ExpectField}else e.tokens.push({type:i.Raw,value:r}),e.cursor=e.raw.length}function u(e){e.cursor+=E(e).match(/^[ \r\n\t]*/)[0].length}function d(e){var[t]=E(e).match(/^(?:[\*\x2D\.0-9A-\[\]_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);e.tokens.push({type:i.Field,value:t}),e.cursor+=t.length,e.status=o.ExpectOptionalBeginDefault}function p(e){"="===E(e).charAt(0)?(e.tokens.push({type:i.BeginDefault}),e.cursor+=1,e.status=o.ExpectDefaultValue):e.status=o.ExpectOptionalBeginPipe}function f(e){w(e,o.ExpectOptionalBeginPipe)}function v(e){"|"===E(e).charAt(0)?(e.tokens.push({type:i.BeginPipe}),e.cursor+=1,e.status=o.ExpectPipeIdentifier):e.status=o.ExpectPlaceholderEnd}function h(e){var t=E(e).match(/^[a-zA-Z]\w*/);if(!t)throw new Error("Expected a pipe identifier at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));var r=t[0];e.tokens.push({type:i.PipeIdentifier,value:r}),e.cursor+=r.length,e.status=o.ExpectOptionalBeginPipeParameter}function m(e){":"===E(e).charAt(0)?(e.tokens.push({type:i.BeginPipeParameter}),e.cursor+=1,e.status=o.ExpectPipeParameter):e.status=o.ExpectOptionalBeginPipe}function g(e){w(e,o.ExpectOptionalBeginPipeParameter)}function y(e){if("}"!==E(e).charAt(0))throw new Error("Expected a placeholder end '}' at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));e.tokens.push({type:i.EndPlaceHolder,loc:{start:e.cursor,end:e.cursor+1}}),e.cursor+=1,e.status=o.Initial}var b=new Map([["false",!1],["null",null],["true",!0]]);function w(e,t){var r=E(e);if(/[0-9[{"]/.test(r.charAt(0))||/-[0-9]/.test(r.substring(0,2)))!function(e,t){for(var r=E(e),n=r.charAt(0),a="["===n?s.Array:"{"===n?s.Object:'"'===n?s.String:s.Others,o=0,l=0,c=0,u=!1,d=!1,p=!1;o<r.length;){var f=r.charAt(o);if(d)d=!1;else if(u)'"'===f?u=!1:"\\"===f&&(d=!0);else switch(f){case"[":c+=1;break;case"{":l+=1;break;case"]":c-=1;break;case"}":l-=1;break;case'"':u=!0}switch(o+=1,a){case s.Array:p=!c;break;case s.Object:p=!l;break;case s.String:p=!u;break;default:p=o<r.length&&/[^a-z0-9E.+-]/.test(r.charAt(o))}if(p)break}if(!p)throw new Error("Failed to match a JSON value at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));e.tokens.push({type:i.JsonValue,value:JSON.parse(r.substring(0,o))}),e.cursor+=o,e.status=t}(e,t);else{var[n]=E(e).match(/^(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);b.has(n)?e.tokens.push({type:i.JsonValue,value:b.get(n)}):e.tokens.push({type:i.LiteralString,value:n}),e.cursor+=n.length,e.status=t}}function E(e){return e.raw.substring(e.cursor)}function S(e,t){return P(e,"@",t)}function k(e,t){return P(e,"$",t)}function A(e,t){return P(e,["@","$"],t)}function P(e,t,r){if(!function(e,t){return l(t).test(e)}(e,t))return e;var s,b,w=(s=r.data,function(e){var t=e.field?(0,n.get)(s,e.field):s;return void 0===t&&(t=e.defaultValue),(0,a.processPipes)(t,e.pipes)}),E=function(e,t){return function(r){var o,i,s=r.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\.)?(.+)$/);if(!s)return t.substring(r.loc.start,r.loc.end);var l,[,c,u]=s;!c&&/^[A-Z_]+$/.test(u)&&(c=u,u="*");var d={SYS:"sys",FLAGS:"flags"};switch(c){case"QUERY":case"query":l="*"===u?e.query:e.query.has(u)?e.query.get(u):void 0;break;case"QUERY_ARRAY":l=e.query.has(u)?e.query.getAll(u):void 0;break;case"EVENT":case"event":if(void 0===e.event)return t.substring(r.loc.start,r.loc.end);l="*"===u?e.event:(0,n.get)(e.event,u);break;case"APP":l="*"===u?null!==(o=e.overrideApp)&&void 0!==o?o:e.app:(0,n.get)(null!==(i=e.overrideApp)&&void 0!==i?i:e.app,u);break;case"HASH":l=e.location.hash;break;case"SYS":case"FLAGS":l="*"===u?e[d[c]]:(0,n.get)(e[d[c]],u);break;case"ANCHOR":var p=e.location.hash?e.location.hash.substr(1):null;l="*"===u?p:(0,n.get)(p,u);break;case"CTX":var f=t.substring(r.loc.start,r.loc.end);return console.error('CTX is not supported in placeholder any more: "'.concat(f,'"')),f;default:if(!e.match)return t.substring(r.loc.start,r.loc.end);l=e.match.params[u]}return void 0===l&&(l=r.defaultValue),(0,a.processPipes)(l,r.pipes)}}(r,e);return b=function(e,t){return function(e){var t,r={type:"InjectableString",elements:[]};function n(r){return r===e[0].type&&(t=e.shift(),!0)}function a(r){if(t=e.shift(),Array.isArray(r)?!r.includes(t.type):r!==t.type)throw new Error("Expected token: ".concat(r,", received token: ").concat(t.type))}for(;e.length>0;)if(n(i.Raw))r.elements.push({type:"RawString",value:t.value});else{a(i.BeginPlaceHolder);var o=t.loc.start,s=t.value;a(i.Field);var l={type:"Placeholder",symbol:s,field:t.value,defaultValue:void 0,pipes:[],loc:{start:o,end:o}};for(r.elements.push(l),n(i.BeginDefault)&&(a([i.JsonValue,i.LiteralString]),l.defaultValue=t.value);n(i.BeginPipe);){a(i.PipeIdentifier);var c={type:"PipeCall",identifier:t.value,parameters:[]};for(l.pipes.push(c);n(i.BeginPipeParameter);)a([i.JsonValue,i.LiteralString]),c.parameters.push(t.value)}a(i.EndPlaceHolder),l.loc.end=t.loc.end}return r}(function(e,t){for(var r={beginPlaceholder:l(t),raw:e,cursor:0,status:o.Initial,tokens:[]};r.cursor<e.length;)switch(r.status){case o.Initial:c(r);break;case o.ExpectField:u(r),d(r);break;case o.ExpectOptionalBeginDefault:u(r),p(r);break;case o.ExpectDefaultValue:u(r),f(r);break;case o.ExpectOptionalBeginPipe:u(r),v(r);break;case o.ExpectPipeIdentifier:u(r),h(r);break;case o.ExpectOptionalBeginPipeParameter:u(r),m(r);break;case o.ExpectPipeParameter:u(r),g(r);break;case o.ExpectPlaceholderEnd:u(r),y(r)}if(r.status!==o.Initial)throw new Error("Expected a placeholder end '}' at the end");return r.tokens}(e,t))}(e,t).elements.map((e=>"RawString"===e.type?e.value:"$"===e.symbol?E(e):w(e))),1===b.length?b[0]:b.join("")}},8524:(e,t,r)=>{r.r(t),r.d(t,{enqueueStableLoadBricks:()=>m,enqueueStableLoadProcessors:()=>g,flushStableLoadBricks:()=>h,loadBricksImperatively:()=>y,loadProcessorsImperatively:()=>w,loadScript:()=>i,loadSharedModule:()=>u,loadStyle:()=>s});var n=r(3028),a=new Map;function o(e,t,r,i){if(Array.isArray(t))return Promise.all(t.map((t=>o(e,t,r))));var s=r&&!/^https?:/.test(t)?"".concat(r).concat(t):t,l=a.get(s);if(l)return l;var c=new Promise(((t,r)=>{var a=()=>{window.dispatchEvent(new Event("request.end"))},o=document.createElement("style"===e?"link":"script");"script"===e?Object.assign(o,(0,n.Z)((0,n.Z)({type:"text/javascript",async:!0},i),{},{src:s})):Object.assign(o,(0,n.Z)((0,n.Z)({rel:"stylesheet"},i),{},{href:s})),o.onload=()=>{t(s),a()},o.onerror=e=>{r(e),a()};var l=document.currentScript||document.getElementsByTagName("script")[0];l.parentNode.insertBefore(o,l),window.dispatchEvent(new Event("request.start"))}));return a.set(s,c),c}function i(e,t,r){return o("script",e,t,r)}function s(e,t,r){return o("style",e,t,r)}var l,c=r(4795);function u(e,t){return d.apply(this,arguments)}function d(){return(d=(0,c.Z)((function*(e,t){yield r.I("default");var n=window[e];return yield n.init(r.S.default),(yield n.get(t))()}))).apply(this,arguments)}var p,f=!1,v=new Promise((e=>{l=e}));function h(){f||l()}function m(e,t){return C(x("bricks",e,t))}function g(e,t){return C(x("processors",e,t))}function y(e,t){return b.apply(this,arguments)}function b(){return(b=(0,c.Z)((function*(e,t){var r=x("bricks",e,t);return h(),C(r)}))).apply(this,arguments)}function w(e,t){var r=x("processors",e,t);return h(),C(r)}var E="v2-adapter.load-bricks";function S(e,t,r){var n=new Map,a=new Set,o=t=>{var i;if(!a.has(t)){var s,l,c;if(a.add(t),"processors"===e||t.includes(".")){[l,c]=t.split(".");var u="bricks/".concat("processors"===e?l.replace(/[A-Z]/g,(e=>"-".concat(e[0].toLocaleLowerCase()))).replace(/_[0-9]/g,(e=>"-".concat(e[1]))):l);s=r.get(u)}else for(var d of(c=t,r.values())){var p;if(null!==(p=d.elements)&&void 0!==p&&p.some((e=>e===c))){s=d;break}}if(s){var f=n.get(s);f||(f=[],n.set(s,f)),f.push(c);var v=null===(i=s.dependencies)||void 0===i?void 0:i[t];if(v)for(var h of v)o(h)}else console.error("Package for ".concat(t," not found."))}};for(var i of t)o(i);return n}function k(e,t,r){return A.apply(this,arguments)}function A(){return(A=(0,c.Z)((function*(e,t,r){var n="".concat("processors"===e?"./processors/":"./").concat(r);try{yield u(t,n)}catch(r){throw console.error(r),new Error("Load ".concat(e,' of "').concat(t.split("/").pop(),".").concat(n.split("/").pop(),'" failed'))}}))).apply(this,arguments)}function P(e,t,r){return t.map(function(){var t=(0,c.Z)((function*(t){var n;return yield i(t.filePath,null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:""),yield v,Promise.all(r.get(t).map((r=>k(e,t.id,r))))}));return function(e){return t.apply(this,arguments)}}())}function x(e,t,r){return I.apply(this,arguments)}function I(){return I=(0,c.Z)((function*(e,t,r){var n=new Map;for(var a of r){var o,s=null!==(o=a.id)&&void 0!==o?o:O(a.filePath);n.set(s,a)}var u,d,v=S(e,t,n),h=[],m=[];for(var g of v.keys())g.id?"bricks/basic"===g.id?u=g:m.push(g):(h.push(g),(d=n.get("bricks/v2-adapter"))||console.error("Using v2 bricks, but v2-adapter not found"));var y,b=d,w=u;if(w){var A,x=i(w.filePath,null!==(A=window.PUBLIC_ROOT)&&void 0!==A?A:"");f||(f=!0,x.then((()=>Promise.resolve())).then(l)),y=x.then((()=>Promise.all(v.get(w).map((t=>k(e,w.id,t))))))}var I=[y].concat(P(e,m,v));if(b&&h.length>0){if(!p){var C=S("bricks",[E],n),Z=[...C.keys()],T=function(){var e=(0,c.Z)((function*(){return yield Promise.all(P("bricks",Z,C)),document.createElement(E)}));return function(){return e.apply(this,arguments)}}();p=T()}I.push(p.then((t=>Promise.all(h.map((n=>{var a=O(n.filePath).split("/")[1];return t.resolve(b.filePath,n.filePath,"bricks"===e?v.get(n).map((e=>"".concat(a,".").concat(e))):[],n.dll,r)}))))))}yield Promise.all(I)})),I.apply(this,arguments)}function C(e){return Z.apply(this,arguments)}function Z(){return(Z=(0,c.Z)((function*(e){window.dispatchEvent(new Event("request.start"));try{yield e}finally{window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function O(e){return e.split("/").slice(0,2).join("/")}},5152:(e,t,r)=>{r.r(t),r.d(t,{pipes:()=>n.pipes,processPipes:()=>o,utils:()=>n.utils});var n=r(665),a=new Map(Array.from(Object.entries(n.pipes)));function o(e,t){if(0===t.length)return e;var r=e;for(var n of t){var o=a.get(n.identifier);if(!o)return void console.warn("Unknown pipe: ".concat(n.identifier));r=o(r,...n.parameters)}return r}},2263:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>Dt,Notification:()=>Gt,StoryboardFunctionRegistryFactory:()=>pe,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>ee,authenticate:()=>ha,batchSetAppsLocalTheme:()=>te,checkIfByTransform:()=>gt,checkIfOfComputed:()=>ht,createHistory:()=>k,createRuntime:()=>oa,customProcessors:()=>R,customTemplates:()=>Ze,fetchByProvider:()=>ba,getAuth:()=>ma,getBasePath:()=>v,getCssPropertyValue:()=>se,getCurrentMode:()=>oe,getCurrentTheme:()=>X,getHistory:()=>A,getPageInfo:()=>In,getRuntime:()=>ia,handleHttpError:()=>zt,httpErrorToString:()=>$t,isLoggedIn:()=>ya,isUnauthenticatedError:()=>Wt,logout:()=>ga,matchPath:()=>Zt,registerWidgetFunctions:()=>Le,registerWidgetI18n:()=>_,unstable_createRoot:()=>Ea});var n={};r.r(n),r.d(n,{getAddedContracts:()=>Na,getAllContextValues:()=>_a,getBrickPackagesById:()=>Fa,getContextValue:()=>Ma,getRenderId:()=>Ua,legacyDoTransform:()=>xa,mountUseBrick:()=>Aa,renderUseBrick:()=>Sa,unmountUseBrick:()=>Pa,updateSnippetPreviewSettings:()=>Ra,updateStoryboard:()=>Ia,updateStoryboardByRoute:()=>Ca,updateStoryboardBySnippet:()=>Ba,updateStoryboardByTemplate:()=>Za,updateTemplatePreviewSettings:()=>Oa});var a=r(3028),o=r(4795),i=r(3395),s=r(381),l=r(687),c=r(6236),u=r(2923),d=r(2151),p=r(8874),f=(r(8525),r(7857));function v(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var h=r(2159),m=r(5178);function g(e,t){var r=(0,m.orderBy)(e,(e=>{var t,r;return null!==(t=null===(r=e.app)||void 0===r||null===(r=r.homepage)||void 0===r?void 0:r.length)&&void 0!==t?t:0}),"desc");for(var n of r){var a=n.app.homepage;if("string"==typeof a&&"/"===a[0]&&("/"===a?t===a:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(a.replace(/\/+$/,""),"/"))))return n}}function y(e){var t;return!e||(null===(t=ia().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var b,w=["extraQuery","clear","keepHash"],E=!1;function S(e,t){t(!(E=!confirm(e)))}function k(){if(!b){var e=(0,f.createBrowserHistory)({basename:v().replace(/\/$/,""),getUserConfirmation:S});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function o(e,t,n){E=!1,r(e,t),null==n||n(E)}function i(e,t,r){E=!1,n(e,t),null==r||r(E)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:l,keepHash:c}=n,u=(0,h.Z)(n,w),d=new URLSearchParams(l?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var m of(d.delete(f),v))d.append(f,m);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?o:i)("?".concat(d.toString()).concat(c?e.location.hash:""),u,a)}}return(0,a.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){o((0,a.Z)((0,a.Z)({},e.location),{},{key:void 0,hash:t,state:(0,a.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,a.Z)((0,a.Z)({},e.location),{},{state:(0,a.Z)((0,a.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(a,o,i){var s,l="string"==typeof a;return"string"==typeof(s=l?(0,f.parsePath)(a).pathname:a.pathname)&&s.startsWith("/")&&y(function(e){var t,r;return g(null!==(t=null===(r=ta)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](l?v()+a.substring(1):e.createHref(a)):("push"===n?t:r)(a,o,i)}}return{push:n("push"),replace:n("replace")}}((0,a.Z)((0,a.Z)({},e),{},{push:o,replace:i})))}(e)),b=e}return b}function A(){var e;return null!==(e=b)&&void 0!==e?e:function(){var{dll:e}=window;if("function"==typeof e)return e("tYg3").getHistory()}()}var P=r(5866),x=r(6171),I=r(5566),C=r(9044),Z=r(3393),O=r(5603),T=r(2710),B=new WeakMap,R=new class{constructor(){(0,i.Z)(this,B,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),a=(0,l.Z)(this,B).get(r);if(a||(a=new Map,(0,l.Z)(this,B).set(r,a)),a.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));a.set(n,t)}get(e){return(0,l.Z)(this,B).get(e)}};function L(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=M("app",t.id),a=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;c.i18n.addResourceBundle(t,n,r),a.push(t)})),()=>{for(var e of a)c.i18n.removeResourceBundle(e,n)}}}function M(e,t){return"".concat(e,"/").concat(t)}function _(e,t){var r=M("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;c.i18n.addResourceBundle(t,r,n)}))}function F(e){return c.i18n.getFixedT(null,M("widget",e))}var U,N="brick-next-devtools-panel",j="devtools-frame-active-change",V="devtools-panel-change",D=!0;function $(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var W=()=>{throw new Error("Can't modify read-only proxy object")},H={set:W,defineProperty:W,deleteProperty:W,setPrototypeOf:W};function K(e){return new Proxy(e,H)}function q(e){var{get:t,ownKeys:r}=e;return $()?K(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var z="light",G=new d.JsonStorage(localStorage),J="apps-theme";function Y(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));z=e}function Q(){return z}function X(){return document.documentElement.dataset.theme}function ee(e){e?Y(e):e=Q(),e!==X()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function te(e){G.setItem(J,(0,a.Z)((0,a.Z)({},re()),e))}function re(){var e,t;try{t=G.getItem(J)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var ne="default";function ae(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));ne=e}function oe(){return document.documentElement.dataset.mode}function ie(e){e?ae(e):e=ne,e!==oe()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function se(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function le(e,t){var r={};for(var n of e){var a=ce(n,t);void 0!==a&&(r[n]=a)}return r}function ce(e,t){var r,n,a,{collectCoverage:o,widgetId:i,widgetVersion:s,app:l,appendI18nNamespace:u,storyboardFunctions:d,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return o?"/next":v().replace(/\/$/,"");case"FN":return d;case"IMG":return o?{get:e=>"mock/images/".concat(e)}:i?null==na||null===(r=na.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==na||null===(n=na.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return o?m.identity:i?F(i):c.i18n.getFixedT(null,[u,M("app",l.id)].filter(Boolean));case"I18N_TEXT":return o?ue:c.i18nText;case"PERMISSIONS":return K({check:o?de:null==na||null===(a=na.checkPermissions)||void 0===a?void 0:a.checkPermissions});case"THEME":return K({getTheme:o?()=>"light":Q});case"console":return p?K(console):void 0;case"location":return o?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function ue(e){return null==e?void 0:e.en}function de(){return!0}function pe(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new Map,i=new Proxy(Object.freeze({}),{get:(a,s)=>function(a){var s,l=o.get(a);if(l){if(l.processed)return l.cooked;n&&(s=n.createCollector(a));var c=(0,C.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,C.cook)(c.function,l.source,{rules:{noVar:!0},globalVariables:(0,O.supply)(c.attemptToVisitGlobals,le(c.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),l.processed=!0,l.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),o.clear(),Array.isArray(t))for(var n of t){var a=(0,T.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,T.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");o.set(n.name,{source:n.source,typescript:n.typescript,deps:a,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,a.Z)((0,a.Z)({},t),{},{name:e}),n=(0,T.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,T.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=o.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:fe,registerStoryboardFunctions:ve,checkPermissionsUsage:he}=pe(),me=r(761),ge=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),ye=new Map([[ge.xLarge,"1920px"],[ge.large,"1600px"],[ge.medium,"1280px"],[ge.small,"1024px"],[ge.xSmall,0]]),be=new me.Z,we={},Ee={};function Se(e,t){var r=!1;for(var[n]of(we[t]=e.matches,ye))if(we[n]&&Ee.breakpoint!==n){Ee.breakpoint=n,r=!0;break}r&&be.dispatchEvent(new CustomEvent("change",{detail:Ee}))}ye.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));Se(r,t),r.addEventListener?r.addEventListener("change",(e=>{Se(e,t)})):r.addListener((e=>{Se(e,t)}))}));var ke=()=>Ee;function Ae(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Pe(e){var t,r;return!(null===(t=e?e.flags:null===(r=ia())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function xe(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];var o=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(o),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(o),...n)}var Ie=new Set(["prefix"]),Ce=new WeakMap,Ze=new class{constructor(){(0,i.Z)(this,Ce,{writable:!0,value:new Map})}define(e,t){var r,n,o,i,s=(0,l.Z)(this,Ce).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var c=Pe(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},d=[],p=[];for(var[f,v]of Object.entries(u))v.asVariable?(xe(c,"Template `asVariable`",e,f),c||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&d.push([f,v]);var h=(0,a.Z)((0,a.Z)({},t),{},{proxy:(0,a.Z)((0,a.Z)({},t.proxy),{},{properties:Object.fromEntries(d)}),state:(t.state?c?t.state:t.state.map((e=>(0,a.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,l.Z)(this,Ce).set(e,(0,a.Z)((0,a.Z)({},h),{},{name:e}));var g,y,b=(g=h.state,(0,m.uniq)(null!==(y=null==g?void 0:g.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),w=Object.entries(null!==(o=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==o?o:{}),E=b.concat(d.map((e=>e[0]))),S=w.map((e=>e[0])),k=E.concat(S).filter((e=>e in HTMLElement.prototype&&!Ie.has(e)));if(k.length>0&&(xe(c,"Using native HTMLElement properties as template properties or methods",e,...k),c))throw new Error('In custom template "'.concat(e,'", ').concat(k.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return E}static get _dev_only_definedMethods(){return S}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var A=function(r){if(d.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),"continue";Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var P of b)A(P);var x=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,a,o=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);o&&(o[null!==(a=r.refProperty)&&void 0!==a?a:e]=t)},enumerable:!0})};for(var[I,C]of d)x(I,C);var Z=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[O,T]of w)Z(O,T);customElements.define(e,t)}}get(e){return(0,l.Z)(this,Ce).get(e)}};function Oe(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}function Te(e,t,r){var n=Oe(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}var Be=new Map,Re=new Proxy(Object.freeze({}),{get:(e,t)=>Be.get(t)});function Le(e,t,r){if(Be.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:a}=pe({widgetId:e,widgetVersion:r});Be.set(e,n),a(t)}var Me=r(953);function _e(e,t){var r=va(e);if(!r&&null!=na&&na.checkInstalledApps&&(r=na.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return(0,Me.q)(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function Fe(e,t,r){var{formStateStoreId:n,formStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Form state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}var Ue=new Map;function Ne(e){return je.apply(this,arguments)}function je(){return je=(0,o.Z)((function*(e){var t,r=null==na||null===(t=na.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=na.flowApi.FLOW_API_PROVIDER);var n=Ue.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)na.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],ua()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),Ue.set(e,n),n})),je.apply(this,arguments)}var Ve=new WeakSet;function De(e){if((0,d.isObject)(e)&&!$e(e))if(Ve.add(e),Array.isArray(e))e.forEach(De);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(De)}}function $e(e){return Ve.has(e)}var We=new Map;function He(e,t,r){return Ke.apply(this,arguments)}function Ke(){return(Ke=(0,o.Z)((function*(e,t,r){var{useProvider:n,method:o="resolve",args:i=[],onReject:s}=e,{provider:l,field:c}=e;if(l&&!n)throw new Error("You're using \"provider: ".concat(l,'" which is dropped in v3, please use "useProvider" instead'));var u=null!=c;if(u){var d=Pe();if(xe(d,"`resolve.field`"),d)throw new Error("Using deprecated `resolve.field`")}var p,[f,v]=yield Promise.all([Ne(n),st(i,t)]),h=qe(f,n,o,v,r,i),{transform:g}=e;try{var y=yield h;De(p=u?(0,m.get)(y,c):y)}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;g=s.transform,p=e}return g?"string"==typeof g?{[g]:p}:st(g,(0,a.Z)((0,a.Z)({},t),{},{data:p})):p}))).apply(this,arguments)}function qe(e,t,r,n,a,o){return ze.apply(this,arguments)}function ze(){return ze=(0,o.Z)((function*(e,t,r,n,a,i){var s,l;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==a?void 0:a.cache)&&(l=We.get(s)),l||(l=(0,o.Z)((function*(){var a,o=null!=na&&null!==(a=na.flowApi)&&void 0!==a&&a.isFlowApiProvider(t)?yield na.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...o)}))(),We.set(s,l)),l})),ze.apply(this,arguments)}var Ge=Symbol.for("pre.evaluated.raw"),Je=Symbol.for("pre.evaluated.context");function Ye(e){return!(null==e||!e[Ge])}function Qe(e){return e[Ge]}function Xe(e){return"string"==typeof e?(0,C.shouldAllowRecursiveEvaluations)(e):(0,C.shouldAllowRecursiveEvaluations)(e[Ge])}var et=new WeakSet([SyntaxError,TypeError,ReferenceError]);function tt(e){return et.has(e.constructor)?e.constructor:TypeError}function rt(){return(rt=(0,o.Z)((function*(e,t,r){var{blockingList:n,run:a}=nt(e,t,r,!0);return yield Promise.all(n),a()}))).apply(this,arguments)}function nt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=[];if("string"!=typeof e){var i=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,a.Z)((0,a.Z)({},e[Je]),i),e=e[Ge]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,C.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,T.collectAppGetMenuUsage)(l,e,t),(0,T.collectInstalledAppsHasUsage)(c,e,t)}}})}catch(t){var p="".concat(t.message,', in "').concat(e,'"');throw new(tt(t))(p)}if(l.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(c.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var f,v,h,g,y={},{attemptToVisitGlobals:b}=s;if(r.lazy||b.has("EVENT")&&!(0,d.hasOwnProperty)(t,"event")||b.has("DATA")&&!(0,d.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[Ge]:e,[Je]:t}:e};var w,E,S=Pe(t);(b.has("STATE")||!S&&b.has("TPL"))&&(g=Oe(t,"STATE",': "'.concat(e,'"'))),b.has("FORM_STATE")&&(E=Fe(t,"FORM_STATE",': "'.concat(e,'"')));var k=$();if(n||k){if(b.has("CTX")&&(f=(0,T.strictCollectMemberUsage)(e,"CTX"),n&&o.push(t.ctxStore.waitFor(f))),g){if(h=(0,T.strictCollectMemberUsage)(e,"STATE"),!S){var A=(0,T.strictCollectMemberUsage)(e,"TPL");for(var P of A)h.add(P)}n&&o.push(g.waitFor(h))}E&&(w=(0,T.strictCollectMemberUsage)(e,"FORM_STATE"),n&&o.push(E.waitFor(w))),b.has("PROCESSORS")&&(v=(0,T.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&o.push((0,u.loadProcessorsImperatively)(v,ua())))}if(n){var x,I=b.has("PERMISSIONS");if(!I&&b.has("FN")){var Z=[...(0,T.strictCollectMemberUsage)(e,"FN")];I=he(Z)}if(I&&o.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=na&&na.menu){var B=[...l.usedArgs];o.push(Promise.all(B.map((e=>na.menu.fetchMenuById(e,t,{getStoryboardByAppId:fa,resolveData:He,asyncComputeRealValue:st})))))}c.usedArgs.size>0&&o.push(null==na||null===(x=na.checkInstalledApps)||void 0===x?void 0:x.waitForCheckingApps([...c.usedArgs]))}return{blockingList:o,run(){var r,n,o,i,{app:l,location:c,query:u,match:p,flags:k,sys:A,ctxStore:P,data:x,event:I}=t,Z=null!==(r=t.overrideApp)&&void 0!==r?r:l;for(var T of b)switch(T){case"ANCHOR":y[T]=c.hash?c.hash.substring(1):null;break;case"APP":y[T]=(0,a.Z)((0,a.Z)({},(0,m.cloneDeep)(Z)),{},{getMenu:null==na||null===(n=na.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[T]=q({get:(e,t)=>P.getValue(t),ownKeys:()=>Array.from(f)});break;case"DATA":y[T]=x;break;case"EVENT":y[T]=I;break;case"FLAGS":y[T]=K(k);break;case"FORM_STATE":y[T]=q({get:(e,t)=>E.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[T]=c.hash;break;case"INSTALLED_APPS":y[T]=K({has:_e});break;case"ITEM":(0,d.hasOwnProperty)(t,"forEachItem")?y[T]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":y[T]=K({getItem:Ae("local")});break;case"MEDIA":y[T]=K(ke());break;case"MISC":y[T]=ia().getMiscSettings();break;case"PARAMS":y[T]=new URLSearchParams(u);break;case"PATH":y[T]=K(null!==(o=null==p?void 0:p.params)&&void 0!==o?o:{});break;case"PATH_NAME":y[T]=c.pathname;break;case"PROCESSORS":y[T]=q({get(e,t){var r=R.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return q({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys(){var e=new Set;for(var t of v){var r=t.split(".")[0];e.add(r)}return Array.from(e)}});break;case"QUERY":y[T]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.get(e)])));break;case"QUERY_ARRAY":y[T]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.getAll(e)])));break;case"SESSION_STORAGE":y[T]=K({getItem:Ae("session")});break;case"TPL":if(xe(S,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),S)break;case"STATE":y[T]=q({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[T]=K(null!=A?A:{});break;case"__WIDGET_FN__":y[T]=Re;break;case"__WIDGET_IMG__":y[T]=null==na||null===(i=na.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":y[T]=F}Object.assign(y,le(s.attemptToVisitGlobals,{storyboardFunctions:fe,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{var B=(0,C.cook)(s.expression,s.source,{globalVariables:(0,O.supply)(s.attemptToVisitGlobals,y)});return function(e,t){var r=$();if(r&&D&&(!U||"Evaluations"===U)){var n=()=>{var n;null===(n=r.emit)||void 0===n||n.call(r,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,0)}}("evaluation",{raw:e,context:y,result:B}),B}catch(t){var L="".concat(t.message,', in "').concat(e,'"');throw new(tt(t))(L)}}}}var at=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function ot(e){switch(e){case at.USE_BRICK_PROPERTIES:case at.USE_BRICK_TRANSFORM:case at.USE_BRICK_EVENTS:case at.USE_BRICK_IF:case at.USE_BRICK_LIFECYCLE:case at.USE_BRICK_DATA_SOURCE:return!0}return!1}function it(e,t,r){if(ot(e))return e;if(t)switch(e){case at.USE_BRICK:return at.USE_BRICK_ITEM;case at.USE_BRICK_SLOTS_ITEM_BRICKS:return at.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case at.INITIAL:if("useBrick"===r)return at.USE_BRICK;break;case at.USE_BRICK:case at.USE_BRICK_ITEM:case at.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return at.USE_BRICK_PROPERTIES;case"transform":return at.USE_BRICK_TRANSFORM;case"dataSource":return at.USE_BRICK_DATA_SOURCE;case"events":return at.USE_BRICK_EVENTS;case"slots":return at.USE_BRICK_SLOTS;case"children":return at.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return at.USE_BRICK_IF;case"lifeCycle":return at.USE_BRICK_LIFECYCLE}break;case at.USE_BRICK_SLOTS:return at.USE_BRICK_SLOTS_ITEM;case at.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return at.USE_BRICK_SLOTS_ITEM_BRICKS}return at.INITIAL}function st(e,t){return lt.apply(this,arguments)}function lt(){return lt=(0,o.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ye(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&ot(r.$$stateOfUseBrick),i=o;return n||(0,C.isEvaluable)(e)?(a=yield function(e,t,r){return rt.apply(this,arguments)}(e,t,{lazy:o}),i=Xe(e)):a=o?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?Z.transform:Z.transformAndInject:r.noInject?dt:Z.inject)(e,t),i||De(a),a}if(!(0,d.isObject)(e)||$e(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=ut(r,!0);return Promise.all(e.map((e=>st(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,a]=e;return Promise.all([st(n,t),st(a,t,ut(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),lt.apply(this,arguments)}function ct(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ye(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&ot(r.$$stateOfUseBrick),i=o;return n||(0,C.isEvaluable)(e)?(a=function(e,t,r){var{run:n}=nt(e,t,void 0,!1);return n()}(e,t),i=Xe(e)):a=o?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?Z.transform:Z.transformAndInject:r.noInject?dt:Z.inject)(e,t),i||De(a),a}if(!(0,d.isObject)(e)||$e(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=ut(r,!0);return e.map((e=>ct(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;return[ct(n,t),ct(a,t,ut(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function ut(e,t,r){return e.$$lazyForUseBrick?(0,a.Z)((0,a.Z)({},e),{},{$$stateOfUseBrick:it(e.$$stateOfUseBrick,t,r)}):e}function dt(e){return e}function pt(e,t){return ft.apply(this,arguments)}function ft(){return(ft=(0,o.Z)((function*(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Ye(e.if)?yield st(e.if,t):e.if)}))).apply(this,arguments)}function vt(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Ye(e.if)?ct(e.if,t):e.if)}function ht(e){return!(0,d.hasOwnProperty)(e,"if")||!!e.if}function mt(){return(mt=(0,o.Z)((function*(e,t){return(0,d.isObject)(e.if)&&!Ye(e.if)?ht(yield He(e.if,t)):pt(e,t)}))).apply(this,arguments)}function gt(e,t){return vt(e,{data:t})}function yt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,C.isEvaluable)(e):Ye(e)){var a="string"==typeof e?e:Qe(e);if((0,C.isTrackAll)(a)){var o=(0,T.trackAll)(a);o&&(t=o.context,r=o.state,n=o.formState)}else t=(0,T.track)(a,"track context","CTX"),r=(0,T.track)(a,"track state","STATE"),n=(0,T.track)(a,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function bt(e,t){return wt.apply(this,arguments)}function wt(){return(wt=(0,o.Z)((function*(e,t){for(var[r,n,a]of e)if(r===t){var o=yield n;if(void 0!==o||!a)return o}}))).apply(this,arguments)}function Et(e){return St.apply(this,arguments)}function St(){return(St=(0,o.Z)((function*(e){var t={};for(var[r,n,a]of e){var o=yield n;void 0===o&&a||!("style"!==r&&"dataset"!==r||(0,d.isObject)(o))||(t[r]=o)}return t}))).apply(this,arguments)}function kt(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[a,o]of Object.entries(n))e[r][a]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function At(e,t,r){var n=function(e,t){return(0,d.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[r,n]=e,a=ct(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?at.USE_BRICK:at.INITIAL});if("style"!==r&&"dataset"!==r||(0,d.isObject)(a))return[r,a]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{kt(e,n)}))}var Pt=r(6903),xt=new Map,It=1e4,Ct=0;function Zt(e,t){var{path:r,exact:n=!1,strict:a=!1,sensitive:o=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=xt.get(r);n||xt.set(r,n=new Map);var a=n.get(e);if(a)return a;var o=[],i={regexp:(0,Pt.Bo)(e,o,t),keys:o};return Ct<It&&(n.set(e,i),Ct++),i}(r,{end:n,strict:a,sensitive:o}),l=i.exec(e);if(!l)return null;var[c,...u]=l,d=e===c;return n&&!d?null:{path:r,url:"/"===r&&""===c?"/":c,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Ot(){return(Ot=(0,o.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),a=Zt(t.location.pathname,{path:n,exact:r.exact});if(a&&(yield pt(r,t)))return t.app.noAuthGuard||r.public||null==na||!na.auth||na.auth.isLoggedIn()?{match:a,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var Tt,Bt=Symbol.for("tpl.asyncComputedPropsFromHost"),Rt=Symbol.for("tpl.stateStoreId"),Lt=Symbol.for("tpl.externalForEachItem"),Mt=r(6666),_t=new Set,Ft=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({}),Ut={[Ft.REQUEST_FAILED]:"Request Failed",[Ft.SOMETHING_WENT_WRONG]:"Something went wrong!",[Ft.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Ft.NETWORK_ERROR]:"Network error, please check your network."},Nt={[Ft.REQUEST_FAILED]:"请求失败",[Ft.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Ft.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Ft.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},jt="core/runtime",Vt={en:Ut,zh:Nt},Dt=Object.freeze({show:function(e){return Tt?Tt.resolve(e):"confirm"===e.type?confirm(e.content)?new Promise((e=>setTimeout((()=>{e()}),1))):new Promise(((e,t)=>setTimeout((()=>{t()}),1))):(alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1e3))))}});function $t(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof I.HttpFetchError)return c.i18n.t("".concat(jt,":").concat(Ft.NETWORK_ERROR));if(e instanceof I.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function Wt(e){return e instanceof I.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var Ht,Kt,qt=!1;function zt(e){if(!(e instanceof I.HttpAbortError)){if(Wt(e)&&!window.NO_AUTH_GUARD){if(qt)return;return qt=!0,void Dt.show({type:"confirm",content:c.i18n.t("".concat(jt,":").concat(Ft.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=ia().getFeatureFlags()["sso-enabled"],(t=A()).push(e?"/sso-auth/login":"/auth/login",{from:(0,a.Z)((0,a.Z)({},t.location),{},{state:void 0})}),qt=!1}),(()=>{qt=!1}))}console.error(e);var t=$t(e);t!==Ht&&(Ht=t,Dt.show({type:"error",title:c.i18n.t("".concat(jt,":").concat(Ft.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{Ht=void 0})))}}var Gt=Object.freeze({show:function(e){Kt?Kt.resolve(e):alert(e.message)}});function Jt(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,a]=t,o=tr(a,r,{element:e});for(var i of(e.addEventListener(n,o),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,o]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(a)))e.$$eventListeners.push([n,null,i])}))}function Yt(e){return"string"==typeof e.action}function Qt(e){return"string"==typeof e.useProvider}function Xt(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function er(e){return!!e.then}function tr(e,t,r){return function(n){var o,i;for(var s of[].concat(e))if(vt(s,(0,a.Z)((0,a.Z)({},t),{},{event:n})))if(er(s))tr(s.then,t,r)(n);else if(Yt(s)){var[l,c]=s.action.split(".");switch(s.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":sr(n,c,s.args,s.callback,t);break;case"window.open":lr(n,s.args,t);break;case"location.reload":case"location.assign":fr(n,c,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":vr(n,l,c,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":hr(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":mr(n,c,s.args,t);break;case"handleHttpError":zt(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":ur(n,c,s.args,null===(o=s.batch)||void 0===o||o,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":dr(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=wr(s.args,t,n);Te(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":pr(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":gr(n,c,s.args,t,r,s.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":ee("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=wr(s.args,t,n);ee(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":ie("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else Qt(s)?rr(n,s,t,r):Xt(s)?ar(n,s,t,r):console.error("unknown event handler:",s);else s.else&&tr(s.else,t,r)(n)}}function rr(e,t,r,n){return nr.apply(this,arguments)}function nr(){return(nr=(0,o.Z)((function*(e,t,r,n){try{or(e,yield Ne(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error($t(e))}}))).apply(this,arguments)}function ar(e,t,r,n){var o=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,C.isEvaluable)(i):Ye(i))&&(l=ct(i,(0,a.Z)((0,a.Z)({},r),{},{event:e}))),"string"==typeof l)if("_self"===l)o.push(n.element);else if(t.multiple)o=Array.from(document.querySelectorAll(l));else{var c=document.querySelector(l);null!==c&&o.push(c)}else if(l)l instanceof HTMLElement?o.push(l):console.error("unexpected target:",l);else if(s){var u=s;("string"==typeof s?(0,C.isEvaluable)(s):Ye(s))&&(u=ct(s,(0,a.Z)((0,a.Z)({},r),{},{event:e})));var d=[].concat(u),p=Te(r,"targetRef",": ".concat(d.join(", ")));o.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((a=>{or(e,a,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&At(o,t.properties,(0,a.Z)((0,a.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function or(e,t,r,n,a,o,i){return ir.apply(this,arguments)}function ir(){return ir=(0,o.Z)((function*(e,t,r,n,i,s,l){var c;if("function"==typeof t[n]){var u=function(){var a=(0,o.Z)((function*(){var a,o=wr(r.args,i,e,l);return Qt(r)&&null!=na&&null!==(a=na.flowApi)&&void 0!==a&&a.isFlowApiProvider(r.useProvider)&&(o=yield na.flowApi.getArgsOfFlowApi(r.useProvider,o,n)),t[n](...o)}));return function(){return a.apply(this,arguments)}}();if(r.callback){var d,p=br(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(Qt(r)&&(d=ct(r.poll,(0,a.Z)((0,a.Z)({},i),{},{event:e}))),null!==(c=d)&&void 0!==c&&c.enabled)!function(e,t,r){var n,{progress:a,success:i,error:s,finally:l}=t,{interval:c,leadingRequestDelay:u,continueOnError:d,delegateLoadingBar:p,expectPollEnd:f,expectPollStopImmediately:v}=r,h=da();function m(){return g.apply(this,arguments)}function g(){return(g=(0,o.Z)((function*(){var t;_t.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==da())||(null==a||a(r),null!=f&&f(r)?(p&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==l||l()):y(null!=c?c:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==da())||(null==s||s(e),d?y(null!=c?c:3e3):null==l||l())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),_t.add(n)}y(null!=u?u:0),p&&window.dispatchEvent(new Event("request.start"))}(u,f,d);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),ir.apply(this,arguments)}function sr(e,t,r,n,a){var o=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":o=2,i=!0;break;case"reload":i=!0;break;case"block":o=1,s="setBlockMessage"}var l=[];if(o>0&&((l=wr(r,a,e,{useEventDetailAsDefault:!0})).length=o),i&&n){var c=br(n,a,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}A()[s](...l)}function lr(e,t,r){var[n,a,o]=wr(t,r,e);window.open(n,a||"_self",o)}function cr(e,t,r,n,a,o){t?n.updateValues(e,r,(e=>wr(e,a,o)[0])):e.forEach((e=>{var{name:t,value:i}=wr([e],a,o)[0];n.updateValue(t,i,r)}))}function ur(e,t,r,n,a,o){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=wr(r,o,e);o.ctxStore.updateValue(i,s,t,a,o)}else cr(r,n,t,o.ctxStore,o,e)}function dr(e,t,r,n,a,o){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)cr(r,n,"replace",Oe(o,"state.".concat(t),": ".concat(JSON.stringify(r))),o,e);else{var[i,s]=wr(r,o,e);Oe(o,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,a,o)}}function pr(e,t,r,n){var[a,o]=wr(t,n,e);Fe(n,"formstate.update",": ".concat(a)).updateValue(a,o,"replace",r,n)}function fr(e,t,r,n){if("assign"===t){var[a]=wr(r,n,e);location.assign(a)}else location[t]()}function vr(e,t,r,n,a){var o="localStorage"===t?localStorage:sessionStorage,[i,s]=wr(n,a,e);"setItem"===r?void 0!==s&&o.setItem(i,JSON.stringify(s)):o.removeItem(i)}function hr(e,t,r,n){console[t](...wr(r,n,e,{useEventAsDefault:!0}))}function mr(e,t,r,n){var a=wr(r,n,e,{useEventAsDefault:!0});Gt.show({type:t,message:a[0]})}function gr(e,t,r,n,a,o){return yr.apply(this,arguments)}function yr(){return(yr=(0,o.Z)((function*(e,t,r,n,a,o){var i=()=>{var a,o=wr(r,n,e);return null==na||null===(a=na.messageDispatcher)||void 0===a?void 0:a[t](...o)};if(o){var s=br(o,n,a);try{var l=yield i();s("success")(l)}catch(e){s("error")(e)}finally{s("finally")()}}else i()}))).apply(this,arguments)}function br(e,t,r){return function(n){return function(a){var o=null==e?void 0:e[n];if(o)try{var i=new CustomEvent("callback.".concat(n),{detail:a});tr(o,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",a)}}}function wr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?ct(e,(0,a.Z)((0,a.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}var Er=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Sr{constructor(e,t,r){(0,Mt.Z)(this,"type",void 0),(0,Mt.Z)(this,"data",new Map),(0,Mt.Z)(this,"changeEventType",void 0),(0,Mt.Z)(this,"pendingStack",[]),(0,Mt.Z)(this,"hostBrick",void 0),(0,Mt.Z)(this,"batchUpdate",!1),(0,Mt.Z)(this,"batchUpdateContextsNames",[]),(0,Mt.Z)(this,"rendererContext",void 0),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=r}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{var[t,{value:r}]=e;return[t,r]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");var n={},a={},o=[];e.forEach((e=>{var{name:a,value:i}=r([e]),s=this.data.get(a);o.push(...this.getAffectListByContext(a)),s&&(n[a]=s),this.updateValue(a,i,t)})),o.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(a[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(a),this.batchUpdate=!1}updateValue(e,t,r,n,o){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,d.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,a.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||zt(e)})),n){var l=br(n,o);s.then((e=>{l("success")({value:e}),l("finally")()}),(e=>{l("error")(e),l("finally")()}))}}}define(e,t,r){if(Array.isArray(e)&&e.length>0){var n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=new Map;for(var n of e){var a=(0,T.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,a)}return r}(e,r),a=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;a.set(i,(null!==(s=a.get(i))&&void 0!==s?s:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),c=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,o.Z)((function*(e){var r;c.add(e);var o=yield t(e);n.delete(e);var i=null!==(r=a.get(e.name))&&void 0!==r?r:0;if(o){if(u.get(e.name).resolve(),a.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),a.delete(e.name)):a.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=l;function v(){return h.apply(this,arguments)}function h(){return h=(0,o.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(a,f)).map((e=>e[0])).filter((e=>!c.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,o.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),a=()=>{var e=!1;for(var[t,o]of r.entries())[...o.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&a()};if(a(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r)),this.type);this.pendingStack.push(n)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,o.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,o.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}handleAsyncAfterMount(){this.data.forEach((e=>{e.async&&e.loading.then((t=>{e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t}))}))}))}resolve(e,t,r){var n=this;return(0,o.Z)((function*(){if(!(yield pt(e,t)))return!1;var i,s,l;r&&("STATE"===n.type?e.expose:"FORM_STATE"===n.type)&&(i=yield bt(r,e.name));var c="eager";if(void 0===i){if(e.resolve){var u=(0,a.Z)({transform:"value"},e.resolve);if(yield pt(e.resolve,t))s=function(){var e=(0,o.Z)((function*(e){return(yield He(u,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),"eager"==(c=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager")?i=yield s():"async"===c&&(l=s());else if(!(0,d.hasOwnProperty)(e,"value"))return!1}s&&"eager"===c||void 0===e.value||(i=yield st(e.value,t))}var p={value:i,eventTarget:new EventTarget,load:s,loaded:"eager"===c,loading:l,async:"async"===c,deps:[]};if("lazy"===c){var f,{trigger:v}=e.resolve;v&&Er.includes(v)&&(null===(f=n.rendererContext)||void 0===f||f.registerArbitraryLifeCycle(v,(()=>{n.updateValue(e.name,void 0,"load")})))}if(e.onChange&&p.eventTarget.addEventListener(n.changeEventType,tr(e.onChange,t)),e.track){var h=(0,T.strictCollectMemberUsage)(s?e.resolve:e.value,n.type);for(var m of(!s&&(p.deps=[...h]),h))n.onChange(m,n.batchAddListener((()=>{s?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,ct(e.value,t),"replace")}),e))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,p),!0}))()}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function kr(e,t,r){var n,a,{reversedProxies:o,asyncHostPropertyEntries:i,externalSlots:s,tplStateStoreId:l,hostBrick:c}=e;if(t&&o){var u=o.properties.get(t);u&&(a=i,n=u.map((e=>{var{from:t,to:r}=e,n=a.filter((e=>e[0]===t));if(n.length>0&&r.refProperty)return[r.refProperty,bt(n,t),!0]})).filter(Boolean));var p=o.slots.get(t);if(p&&s){var f=new Map;for(var{from:v,to:h}of p){var g,y,b,w,E=null!==(g=null===(y=s[v])||void 0===y?void 0:y.bricks)&&void 0!==g?g:[];if(E.length){var S=null!==(b=h.refSlot)&&void 0!==b?b:v,k=f.get(S);if(!k){k=[];for(var A=(0,d.hasOwnProperty)(r,S)?r[S].bricks.length+1:1,P=0;P<A;P+=1)k.push([]);f.set(S,k)}var x=null!==(w=h.refPosition)&&void 0!==w?w:-1;k[(0,m.clamp)(x<0?k.length+x:x,0,k.length-1)].push(...(0,d.hasOwnProperty)(c.runtimeContext,"forEachItem")?Ar(E,c.runtimeContext.forEachItem):E)}}var I=function(){(0,d.hasOwnProperty)(r,C)||(r[C]={type:"bricks",bricks:[]});var e=r[C];e.bricks=Z.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[C]};for(var[C,Z]of f.entries())I()}}return{[Bt]:n,[Rt]:l}}function Ar(e,t){return e.map((e=>{var r;return(0,a.Z)((0,a.Z)({},e),{},{[Lt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,a]=e;return[n,"routes"===a.type?{type:"routes",routes:Pr(a.routes,t)}:{type:"bricks",bricks:Ar(null!==(r=a.bricks)&&void 0!==r?r:[],t)}]})))})}))}function Pr(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,a.Z)((0,a.Z)({},e),{},{bricks:Ar(e.bricks,t)})))}var xr=["properties","slots","children"];function Ir(e,t){function r(e){return(0,d.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,a]=e;return(0,d.isObject)(a)&&"useBrick"===t?Array.isArray(a)?[t,a.map(n)]:[t,n(a)]:[t,r(a)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:o,slots:i,children:s}=e,l=(0,h.Z)(e,xr),c=Qr(s,i),u=Object.fromEntries(Object.entries(null!=c?c:{}).map((e=>{var t,[r,a]=e;return[r,{type:"bricks",bricks:(null!==(t=a.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,a.Z)((0,a.Z)({},l),{},{properties:r(o),slots:u},kr(t,l.ref,u))}return r(e)}var Cr=["slots","children"],Zr=["properties","slots","children"];function Or(e,t,r,n,o){var i,s=(0,m.uniqueId)("tpl-state-"),l=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{tplStateStoreId:s});delete l.forEachItem,delete l.formStateStoreId;var c=new Sr("STATE",r,o);l.tplStateStoreMap.set(s,c),l.tplStateStoreScope&&l.tplStateStoreScope.push(c);var{bricks:u,proxy:d,state:p,contracts:f}=Ze.get(e);null==na||null===(i=na.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:g}=t,y=(0,h.Z)(t,Cr),b=(0,a.Z)((0,a.Z)({},y),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:s,proxy:d};var w={properties:new Map,slots:new Map};if(null!=d&&d.properties)for(var[E,S]of Object.entries(d.properties)){var k=w.properties.get(S.ref);k||(k=[],w.properties.set(S.ref,k)),k.push({from:E,to:S})}if(null!=d&&d.slots)for(var[A,P]of Object.entries(d.slots)){var x=w.slots.get(P.ref);x||(x=[],w.slots.set(P.ref,x)),x.push({from:A,to:P})}var I={reversedProxies:w,asyncHostPropertyEntries:n,externalSlots:Qr(g,v),tplStateStoreId:s,hostBrick:r};return b.slots={"":{type:"bricks",bricks:u.map((e=>Tr(e,I)))}},b}function Tr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:o}=e,i=(0,h.Z)(e,Zr),s=Qr(o,n),l=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,a]=e;return[n,{type:"bricks",bricks:(null!==(r=a.bricks)&&void 0!==r?r:[]).map((e=>Tr(e,t)))}]})));return(0,a.Z)((0,a.Z)({},i),{},{properties:Ir(r,t),slots:l},kr(t,i.ref,l))}var Br=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),Rr="form-renderer.form-renderer",Lr=Symbol.for("form.stateStoreId"),Mr=["forms.general-form","form.general-form","eo-form"];function _r(e,t,r){var{id:n,bricks:o,events:i,context:s,mountPoint:l,instanceId:c}=e,{brick:u,properties:p}=e,f=t.find((e=>e.fieldId===n));if(f){var v=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,a.Z)((0,a.Z)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}})};break;case"JSON":t={brick:"forms.general-textarea",properties:(0,a.Z)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,a.Z)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,a.Z)((0,a.Z)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description})}}return t}(f);u||(u=v.brick),p=(0,a.Z)((0,a.Z)({},v.properties),p)}var h={brick:u,properties:p,iid:c,slot:l,events:i,context:s,children:Fr(o,t,r),[Lr]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Fr(e,t,r){if(Array.isArray(e))return e.map((e=>_r(e,t,r)))}var Ur=["blockingList","node","menuRequests","hasTrackingControls"],Nr=["if","permissionsPreCheck"],jr=["formData"],Vr=["src"],Dr=["href"];function $r(e,t,r,n,a){return Wr.apply(this,arguments)}function Wr(){return Wr=(0,o.Z)((function*(e,t,r,n,o){var i=yield function(e,t){return Ot.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var l,c=s.route=i.route,d=(0,a.Z)((0,a.Z)({},r),{},{match:i.match});d.ctxStore.define(c.context,d),d.pendingPermissionsPreCheck.push(null==na||null===(l=na.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(c,(e=>st(e,d))));var{preLoadBricks:p}=c;switch(Array.isArray(p)&&s.blockingList.push((0,u.loadBricksImperatively)(p,ua())),c.type){case"redirect":var f;if("string"!=typeof(f="string"==typeof c.redirect?yield st(c.redirect,d):(yield He((0,a.Z)({transform:"redirect"},c.redirect),d)).redirect))throw console.error("Unexpected redirect result:",f),new Error("Unexpected type of redirect result: ".concat(typeof f));s.redirect={path:f};break;case"routes":s.menuRequests.push(Jr(c.menu,d)),Yr(s,yield $r(e,c.routes,d,n,o));break;default:s.menuRequests.push(Jr(c.menu,d)),Yr(s,yield Hr(e,c.bricks,d,n,o))}}return s})),Wr.apply(this,arguments)}function Hr(e,t,r,n,a,o,i){return Kr.apply(this,arguments)}function Kr(){return(Kr=(0,o.Z)((function*(e,t,r,n,a,o,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>qr(e,t,r,n,a,i,o&&new Map(o)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(a,r,t.node,e),Yr(s,t)})),s}))).apply(this,arguments)}function qr(e,t,r,n,a,o){return zr.apply(this,arguments)}function zr(){return zr=(0,o.Z)((function*(e,t,r,n,i,s){var l,c,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,f={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;var{if:v,permissionsPreCheck:g}=t,y=(0,h.Z)(t,Nr);if(function(e){return"string"==typeof e?(0,C.isTrackAll)(e):Ye(e)&&(0,C.isTrackAll)(Qe(e))}(v))return qr(e,(0,a.Z)({brick:":if",dataSource:v,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[y]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,a.Z)((0,a.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p);var b=t[Rt],w=t[Lr],E=(0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:b,formStateStoreId:w});(0,d.hasOwnProperty)(t,Lt)&&(E.forEachItem=t[Lt]);var{context:S}=t;if(Array.isArray(S)&&S.length>0){var k=Pe(E);xe(k,"Defining context on bricks","check your brick:",t),k||E.ctxStore.define(S,E)}if(E.pendingPermissionsPreCheck.push(null==na||null===(l=na.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>st(e,E)))),!(yield function(e,t){return mt.apply(this,arguments)}(t,E)))return f;var A=t.brick;if(A.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(A);var{dataSource:P}=t,x=function(){var r=(0,o.Z)((function*(){var r,a=yield st(P,E),o=":forEach"===A?"":":switch"===A?String(a):a?"":"else",s=Qr(t.children,t.slots),l=s&&(0,d.hasOwnProperty)(s,o)&&(null===(r=s[o])||void 0===r?void 0:r.bricks);if(!Array.isArray(l))return f;switch(A){case":forEach":return Array.isArray(a)?function(e,t,r,n,a,o,i){return Gr.apply(this,arguments)}(e,a,l,E,n,i,p):f;case":if":case":switch":return Hr(e,l,E,n,i,p,!0)}}));return function(){return r.apply(this,arguments)}}(),I=yield x(),{contextNames:Z,stateNames:O}=yt(P);if(Z||O){I.hasTrackingControls=!0;var B=0,R=function(){var t=(0,o.Z)((function*(){var t=++B,r=yield x();r.blockingList.push(...[...E.tplStateStoreMap.values(),...E.formStateStoreMap.values()].map((e=>e.waitForAll())),...E.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),B===t&&n.rerenderControlNode(i,s,r.node,e)}));return function(){return t.apply(this,arguments)}}(),L=(0,m.debounce)(R);if(Z)for(var M of Z)E.ctxStore.onChange(M,L);if(O)for(var _ of O)Oe(E,"STATE",': "'.concat(P,'"')).onChange(_,L)}return I}/\.tpl-/.test(A)&&!Ze.get(A)&&(yield Xr((0,u.loadBricksImperatively)([A],ua()),A,n.unknownBricks));var F,U,N=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Ze.get(r))return r}return!!Ze.get(e)&&e}(A,null===(c=E.app)||void 0===c?void 0:c.id);if(N){var j,V=null!==(j=p.get(N))&&void 0!==j?j:0;if(V>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(N,'"'));p.set(N,V+1)}else A.includes("-")&&!customElements.get(A)&&(A===Rr?customElements.define(Rr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):f.blockingList.push(Xr((0,u.enqueueStableLoadBricks)([A],ua()),A,n.unknownBricks)));if(A===Rr){var D,$=null!==(D=t.properties)&&void 0!==D?D:{};({formData:F}=$),U=(0,h.Z)($,jr)}else U=t.properties;var W=[],H=function(e,t,r){return(0,d.isObject)(e)?Object.entries(e).map((e=>{var[n,a]=e,{contextNames:o,stateNames:i,formStateNames:s}=yt(a);return(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a}),[n,st(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?at.USE_BRICK:at.INITIAL})]})):[]}(U,E,W),K=t[Bt];K&&H.push(...K);var q="script"===A;if(q||"link"===A){var z=yield Et(H);if(q?z.src:"stylesheet"===z.rel&&z.href){var G,J=null!==(G=window.PUBLIC_ROOT)&&void 0!==G?G:"";if(q){var{src:Y}=z,Q=(0,h.Z)(z,Vr);yield(0,u.loadScript)(Y,J,Q)}else{var{href:X}=z;Q=(0,h.Z)(z,Dr),yield(0,u.loadStyle)(X,J,Q)}return f}}var ee={tag:Br.BRICK,type:N||A,return:e,slotId:i,events:t.events,runtimeContext:E,portal:t.portal,iid:t.iid,ref:t.ref};f.node=ee;var te=(0,T.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);te.size>0&&f.blockingList.push((0,u.loadProcessorsImperatively)(te,ua()));var re=[],ne=function(){var e=(0,o.Z)((function*(){ee.properties=yield Et(H),function(e,t){var r=function(t){var r=()=>{e.element&&At(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var a=Oe(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var o of t.stateNames)a.onChange(o,r)}if(t.formStateNames){var i=Fe(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}(ee,W)}));return function(){return e.apply(this,arguments)}}();re.push(ne()),n.registerBrickLifeCycle(ee,t.lifeCycle);var ae,oe=t;N?oe=Or(N,t,ee,H,n):A===Rr&&(oe=function(e,t,r,n,o){var i,s,l="string"==typeof e?JSON.parse(e):e,c=(0,m.uniqueId)("form-state-"),u=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{formStateStoreId:c});delete u.forEachItem,delete u.tplStateStoreId;var p=new Sr("FORM_STATE",void 0,o);u.formStateStoreMap.set(c,p),u.formStateStoreScope&&u.formStateStoreScope.push(p);var f=null!==(i=l.context)&&void 0!==i?i:[];f.some((e=>"params"===e.name))||f.push({name:"params"}),p.define(f,u,n);var v=_r(l.formSchema,l.fields,c);return Mr.includes(v.brick)&&t.events&&(v.events=function(e,t){var r=null!=e?e:{};for(var[n,a]of Object.entries(t))r[n]=(0,d.hasOwnProperty)(r,n)?[r[n],a].flat():a;return r}(v.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?(0,a.Z)((0,a.Z)({},t),{},{slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[v]}]}):(0,a.Z)((0,a.Z)({},t),{},{slots:void 0,children:[v]})}(F,t,ee,H,n)),oe.portal&&(ee.slotId=void 0),N?delete(ae=(0,a.Z)({},E)).forEachItem:ae=E;var ie=function(){var e=(0,o.Z)((function*(){var e=Qr(oe.children,oe.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?Hr(ee,r.bricks,ae,n,t,p):$r(ee,r.routes,ae,n,t)}))),r=(0,a.Z)((0,a.Z)({},f),{},{node:void 0,blockingList:[]});for(var o of t)Yr(r,o);r.node&&(ee.child=r.node),Yr(f,(0,a.Z)((0,a.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return re.push(ie()),yield Promise.all(re),f})),zr.apply(this,arguments)}function Gr(){return(Gr=(0,o.Z)((function*(e,t,r,n,o,i,s){var l={blockingList:[],menuRequests:[]},c=yield Promise.all(t.map(((t,l)=>Promise.all(r.map(((r,c)=>qr(e,r,(0,a.Z)((0,a.Z)({},n),{},{forEachItem:t}),o,i,l*c,s&&new Map(s))))))));for(var u of c.flat())Yr(l,u);return l}))).apply(this,arguments)}function Jr(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return st(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function Yr(e,t){var{blockingList:r,node:n,menuRequests:a,hasTrackingControls:o}=t,i=(0,h.Z)(t,Ur);if(e.blockingList.push(...r),e.menuRequests.push(...a),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function Qr(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var a,o=null!==(a=n.slot)&&void 0!==a?a:"";(0,d.hasOwnProperty)(r,o)||(r[o]={type:"bricks",bricks:[]}),r[o].bricks.push(n)}return r}function Xr(e,t,r){return"silent"===r?e.catch((e=>{console.error('Load brick "'.concat(t,'" failed:'),e)})):e}function en(e){var t,{ref:r,runtimeContext:n,element:a}=e;if(r&&n.tplStateStoreId){var{hostBrick:o}=Oe(n,"bindTemplateProxy"),i=o.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var l=function(e){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),o.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},l=null!==(t=u.refEvent)&&void 0!==t?t:e;a.addEventListener(l,s),null!==(i=(n=a).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),a.$$proxyListeners.push([l,s])}};for(var[c,u]of Object.entries(s))l(c)}}}function tn(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:a}=Oe(r,"unbindTemplateProxy"),o=a.tplHostMetadata;for(var[i,s]of(o.internalBricksByRef.delete(t),null!==(l=n.$$proxyListeners)&&void 0!==l?l:[])){var l;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function rn(e){e.replaceChildren()}function nn(e,t){for(var r=e.child,n=[];r;){var a,o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var i=t&&r===e.child?t:document.createElement(o);if(r.element=i,r.slotId&&i.setAttribute("slot",r.slotId),r.iid&&(i.dataset.iid=r.iid),null!==(a=r.tplHostMetadata)&&void 0!==a&&a.tplStateStoreId&&(i.dataset.tplStateStoreId=r.tplHostMetadata.tplStateStoreId),kt(i,r.properties),Jt(i,r.events,r.runtimeContext),r.tplHostMetadata&&(i.$$tplStateStore=Oe({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),en(r),r.portal?n.push(i):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(i)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var s,l=r.return;l;){var c;if(l.childElements)l.tag===Br.ROOT?null===(c=l.container)||void 0===c||c.append(...l.childElements):l.element.append(...l.childElements),l.childElements=void 0;if(l.tag===Br.ROOT&&n.length>0&&("function"==typeof l.createPortal?l.createPortal():l.createPortal).append(...n),l.sibling)break;l=l.return}r=null===(s=l)||void 0===s?void 0:s.sibling}}}var an,on,sn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],ln=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],cn=new WeakMap,un=new WeakMap,dn=new WeakMap,pn=new WeakMap,fn=new WeakMap,vn=new WeakSet,hn=new WeakSet,mn=new WeakSet,gn=new WeakSet;class yn{constructor(e,t){var r;(0,P.Z)(this,gn),(0,P.Z)(this,mn),(0,P.Z)(this,hn),(0,P.Z)(this,vn),(0,Mt.Z)(this,"scope",void 0),(0,Mt.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,cn,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}}),(0,i.Z)(this,un,{writable:!0,value:new Map}),(0,i.Z)(this,dn,{writable:!0,value:void 0}),(0,i.Z)(this,pn,{writable:!0,value:new Map}),(0,i.Z)(this,fn,{writable:!0,value:void 0}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw"}registerBrickLifeCycle(e,t){if(t){var r=[...sn,..."page"===this.scope?ln:[]];for(var n of r){var a=t[n];a&&(0,l.Z)(this,cn)[n].push({brick:e,handlers:a})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}registerArbitraryLifeCycle(e,t){var r=(0,l.Z)(this,pn).get(e);r?r.add(t):(0,l.Z)(this,pn).set(e,new Set([t]))}memoizeControlNode(e,t,r,n){(0,l.Z)(this,fn)||(0,s.Z)(this,fn,new WeakMap);var a="".concat(null!=e?e:"",".").concat(t),o=(0,l.Z)(this,fn).get(n);o||(o=new Map,(0,l.Z)(this,fn).set(n,o)),o.set(a,{node:r,last:kn(r),lastNormal:An(r),lastPortal:Pn(r)})}rerenderControlNode(e,t,r,n){var a,o,i,s,c,u="".concat(null!=e?e:"",".").concat(t),d=(0,l.Z)(this,fn).get(n).get(u),{node:p,last:f,lastNormal:v,lastPortal:h}=d,m=null!==(a=null==v||null===(o=v.element)||void 0===o?void 0:o.nextSibling)&&void 0!==a?a:null,g=null!==(i=null==h||null===(s=h.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=kn(r);d.node=r,d.last=y,d.lastNormal=An(r),d.lastPortal=Pn(r);for(var b=n.child;b&&b!==f;){if(b.sibling===p){c=b;break}b=b.sibling}var w=document.createDocumentFragment(),E=document.createDocumentFragment(),S={tag:Br.ROOT,container:w,createPortal:E,child:r};for(b=r;b;)b.return=S,b=b.sibling;var k,A,P=xn(p,f);for((0,x.Z)(this,vn,bn).call(this,P),nn(S),c?c.sibling=r:n.child=r,y&&(y.sibling=null==f?void 0:f.sibling),b=r;b;)b.return=n,b=b.sibling;if(n.tag===Br.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(w,m):null===(A=n.element)||void 0===A||A.insertBefore(w,m),E.childNodes.length>0){for(var I,C=r;C&&C.return;)C=C.return;if((null===(I=C)||void 0===I?void 0:I.tag)!==Br.ROOT)throw new Error("Cannot find render root node");("function"==typeof C.createPortal?C.createPortal():C.createPortal).insertBefore(E,g)}var Z=xn(r,y);(0,x.Z)(this,hn,wn).call(this,Z)}dispose(){for(var e of Object.values((0,l.Z)(this,cn)))e.length=0;for(var t of(0,l.Z)(this,un).values()){for(var r of t)r.disconnect();t.length=0}(0,l.Z)(this,un).clear(),(0,l.Z)(this,dn)&&(be.removeEventListener("change",(0,l.Z)(this,dn)),(0,s.Z)(this,dn,void 0)),(0,s.Z)(this,fn,void 0),(0,l.Z)(this,pn).clear()}dispatchBeforePageLoad(){(0,x.Z)(this,mn,En).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,x.Z)(this,mn,En).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,x.Z)(this,mn,En).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,x.Z)(this,mn,En).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=A().location;e&&"#"!==e?(0,x.Z)(this,mn,En).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,x.Z)(this,mn,En).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,l.Z)(this,cn).onScrollIntoView)(0,x.Z)(this,gn,Sn).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,dn,(e=>{(0,x.Z)(this,mn,En).call(this,"onMediaChange",new CustomEvent("media.change",{detail:K(e.detail)}))})),be.addEventListener("change",(0,l.Z)(this,dn))}initializeMessageDispatcher(){var e,t=function(e){var t=function(t){var r;null==na||null===(r=na.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{tr(t.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:r}))}))};for(var r of[].concat(n))t(r)};for(var{brick:r,handlers:n}of(0,l.Z)(this,cn).onMessage)t(r);null==na||null===(e=na.messageDispatcher)||void 0===e||e.onClose((()=>{(0,x.Z)(this,mn,En).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,x.Z)(this,mn,En).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,x.Z)(this,mn,En).call(this,"onUnmount",new CustomEvent("unmount"))}}function bn(e){var t=[...sn,..."page"===this.scope?ln:[]],r=[];for(var n of t){var a=(0,m.remove)((0,l.Z)(this,cn)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...a)}for(var o of e){var i,s,c=(0,l.Z)(this,un).get(o);if(null!=c&&c.length){for(var u of c)u.disconnect();c.length=0,(0,l.Z)(this,un).delete(o)}tn(o),null===(i=o.element)||void 0===i||delete i.$$tplStateStore,null===(s=o.element)||void 0===s||s.remove()}var d=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)tr(f,p.runtimeContext,p)(d)}function wn(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,l.Z)(this,cn).onMount)e.has(r)&&tr(n,r.runtimeContext,r)(t);for(var{brick:a,handlers:o}of(0,l.Z)(this,cn).onScrollIntoView)e.has(a)&&(0,x.Z)(this,gn,Sn).call(this,a,o)}function En(e,t){for(var{brick:r,handlers:n}of(0,l.Z)(this,cn)[e])tr(n,r.runtimeContext,r)(t);var a=(0,l.Z)(this,pn).get(e);if(a)for(var o of a)o()}function Sn(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,a=new IntersectionObserver(((r,a)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(tr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),a.disconnect())}))}),{threshold:n});a.observe(e.element);var o=(0,l.Z)(this,un).get(e);o||(o=[],(0,l.Z)(this,un).set(e,o)),o.push(a)}function kn(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function An(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Pn(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,a=r.return;a&&!a.sibling;)a=a.return;r=null===(n=a)||void 0===n?void 0:n.sibling}return t}function xn(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var a,o=n.return;o&&o!==t&&!o.sibling;)o=o.return;if(o===t)break;n=null===(a=o)||void 0===a?void 0:a.sibling}}return r}function In(){if(!an){if(an={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){an.isInIframe=!0;try{if(window.origin===window.parent.origin){an.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");an.isInIframeOfNext=0==(Number(e)^Number(r)),an.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),an.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(an)}return an}function Cn(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var a=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Ze.define(a,n)}}}function Zn(){return Zn=(0,o.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return On.apply(this,arguments)}(e)),e.$$fulfilling})),Zn.apply(this,arguments)}function On(){return(On=(0,o.Z)((function*(e){var t;yield null==na||null===(t=na.fulfilStoryboard)||void 0===t?void 0:t.call(na,e),L(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var Tn=new WeakMap,Bn=new WeakMap,Rn=new WeakMap,Ln=new WeakMap,Mn=new WeakMap,_n=new WeakMap,Fn=new WeakMap,Un=new WeakMap,Nn=new WeakMap,jn=new WeakMap,Vn=new WeakMap,Dn=new WeakMap,$n=new WeakSet,Wn=new WeakSet,Hn=new WeakSet,Kn=new WeakSet;class qn{constructor(e){(0,P.Z)(this,Kn),(0,P.Z)(this,Hn),(0,P.Z)(this,Wn),(0,P.Z)(this,$n),(0,i.Z)(this,Tn,{writable:!0,value:void 0}),(0,i.Z)(this,Bn,{writable:!0,value:!1}),(0,i.Z)(this,Rn,{writable:!0,value:void 0}),(0,i.Z)(this,Ln,{writable:!0,value:void 0}),(0,i.Z)(this,Mn,{writable:!0,value:void 0}),(0,i.Z)(this,_n,{writable:!0,value:void 0}),(0,i.Z)(this,Fn,{writable:!0,value:new Set}),(0,i.Z)(this,Un,{writable:!0,value:0}),(0,i.Z)(this,Nn,{writable:!0,value:void 0}),(0,i.Z)(this,jn,{writable:!0,value:void 0}),(0,i.Z)(this,Vn,{writable:!0,value:void 0}),(0,i.Z)(this,Dn,{writable:!0,value:void 0}),(0,s.Z)(this,Tn,e);var t=A();window.addEventListener("beforeunload",(e=>{(0,x.Z)(this,$n,zn).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,x.Z)(this,$n,zn).call(this,{location:e,action:t})))}getRenderId(){return(0,l.Z)(this,Nn)}getRuntimeContext(){return(0,l.Z)(this,Mn)}getRecentApps(){return{currentApp:(0,l.Z)(this,jn),previousApp:(0,l.Z)(this,Vn)}}getNavConfig(){return(0,l.Z)(this,Dn)}bootstrap(){window.AbortController&&(on=new AbortController,I.http.interceptors.request.use((e=>{var t;return(0,a.Z)((0,a.Z)({},e),{},{options:(0,a.Z)((0,a.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:on.signal})})})));var e=A();return(0,s.Z)(this,Rn,e.location),e.listen(((e,t)=>{var r,n,o,i=!1,c={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,l.Z)(this,Rn).key&&!1!==(null===(r=(0,l.Z)(this,Rn).state)||void 0===r?void 0:r.notify))||(c.key=void 0),((0,f.locationsAreEqual)((0,a.Z)((0,a.Z)({},(0,l.Z)(this,Rn)),c),(0,a.Z)((0,a.Z)({},e),c))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,s.Z)(this,Rn,e);else{if(on&&(on.abort(),on=new AbortController),(0,s.Z)(this,Rn,e),null===(o=(0,l.Z)(this,_n))||void 0===o||o.dispatchPageLeave(),"POP"===t&&y(g((0,l.Z)(this,Tn),e.pathname)))return void window.location.reload();(0,l.Z)(this,Bn)?(0,s.Z)(this,Ln,e):(0,x.Z)(this,Hn,Jn).call(this,e).catch(zt)}})),(0,x.Z)(this,Hn,Jn).call(this,e.location)}}function zn(e){var t,r=A(),n=r.getBlockMessage();null===(t=(0,l.Z)(this,_n))||void 0===t||t.dispatchBeforePageLeave(e);var a=r.getBlockMessage();return!n&&a&&r.unblock(),a}function Gn(e,t,r){var n,a;if((0,s.Z)(this,Un,(n=(0,l.Z)(this,Un),a=n++,n)),a>10){var o='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(o)}A().replace(e,t)}function Jn(e){return Yn.apply(this,arguments)}function Yn(){return(Yn=(0,o.Z)((function*(e){(0,s.Z)(this,Bn,!0);try{yield(0,x.Z)(this,Kn,Qn).call(this,e)}finally{if((0,s.Z)(this,Bn,!1),(0,l.Z)(this,Ln)){var t=(0,l.Z)(this,Ln);(0,s.Z)(this,Ln,void 0),yield(0,x.Z)(this,Hn,Jn).call(this,t)}}}))).apply(this,arguments)}function Qn(e){return Xn.apply(this,arguments)}function Xn(){return Xn=(0,o.Z)((function*(e){var t,r;(0,s.Z)(this,Nn,(0,m.uniqueId)("render-id-1")),Ve=new WeakSet,We.clear(),null==na||null===(t=na.flowApi)||void 0===t||t.clearCollectWidgetContract(),A().unblock();var n=g((0,l.Z)(this,Tn),e.pathname),o=null===(r=(0,l.Z)(this,Mn))||void 0===r?void 0:r.app;null!=n&&n.app&&(yield function(e){return Zn.apply(this,arguments)}(n));var i=(0,s.Z)(this,jn,null==n?void 0:n.app),c=o&&i?o.id!==i.id:o!==i,d=ia().getFeatureFlags(),p=(0,l.Z)(this,_n),f=(t,r)=>{(0,l.Z)(this,Fn).add(p),(0,x.Z)(this,Wn,Gn).call(this,t,r,e)},v=()=>{var t=d["sso-enabled"]?"/sso-auth/login":"/auth/login";f(t,{from:e})},h=document.querySelector("#main-mount-point"),y=document.querySelector("#portal-mount-point"),b={tag:Br.ROOT,container:h,createPortal:y},w=()=>{var e;for(var t of(rn(h),rn(y),(0,l.Z)(this,Fn).add(p),(0,l.Z)(this,Fn)))t&&(t.dispatchOnUnmount(),t.dispose());(0,l.Z)(this,Fn).clear(),null==na||null===(e=na.messageDispatcher)||void 0===e||e.reset(),c&&((0,s.Z)(this,Vn,o),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:o,currentApp:i}})))};if(Y(i&&(re()[i.id]||i.theme)||"light"),ae("default"),i){var E,S,k,P,C,Z;null==na||null===(E=na.checkInstalledApps)||void 0===E||E.preCheckInstalledApps(n,(e=>!!va(e)));var O=(0,s.Z)(this,_n,new yn("page")),T=(0,s.Z)(this,Mn,{app:i,location:e,query:new URLSearchParams(e.search),flags:d,sys:(0,a.Z)((0,a.Z)((0,a.Z)({},null==na||null===(S=na.auth)||void 0===S?void 0:S.getAuth()),In()),{},{settings:{brand:ia().getBrandSettings()}}),ctxStore:new Sr("CTX",void 0,O),pendingPermissionsPreCheck:[null==na||null===(k=na.checkPermissions)||void 0===k?void 0:k.preCheckPermissions(n)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,s.Z)(this,Dn,void 0),Cn(n),ve(null===(P=n.meta)||void 0===P?void 0:P.functions,i),null==na||null===(C=na.flowApi)||void 0===C||C.collectContract(null===(Z=n.meta)||void 0===Z?void 0:Z.contracts);var B,R=!1,L=[];try{if((B=yield $r(b,function(e){if(window.parent===window)return e;var t=e,r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(n.routes),T,O)).unauthenticated)return void v();if(B.redirect)return void f(B.redirect.path,B.redirect.state);(0,s.Z)(this,Un,0),(0,u.flushStableLoadBricks)(),L=[T.ctxStore,...T.tplStateStoreMap.values(),...T.formStateStoreMap.values()],yield Promise.all([...B.blockingList,...L.map((e=>e.waitForAll())),...T.pendingPermissionsPreCheck]);var M=yield Promise.all(B.menuRequests);(0,s.Z)(this,Dn,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(M))}catch(e){if(console.error("Router failed:",e),Wt(e)&&!window.NO_AUTH_GUARD)return void v();if(e instanceof I.HttpAbortError)return void(0,l.Z)(this,Fn).add(p);R=!0,B={node:{tag:Br.BRICK,type:"div",properties:{textContent:$t(e)},runtimeContext:null,return:b},blockingList:[],menuRequests:[]}}if(b.child=B.node,w(),B.route&&"routes"!==B.route.type||R){if(R||O.dispatchBeforePageLoad(),ee(),ie(),nn(b),window.scrollTo(0,0),!R){for(var _ of L)_.handleAsyncAfterMount();O.dispatchPageLoad(),O.dispatchAnchorLoad(),O.dispatchOnMount(),O.initializeScrollIntoView(),O.initializeMediaChange(),O.initializeMessageDispatcher()}return}}else{if(!window.NO_AUTH_GUARD&&null!=na&&na.auth&&!na.auth.isLoggedIn())return void v();w()}ee(),ie();var F={tag:Br.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:b};b.child=F,nn(b),window.scrollTo(0,0)})),Xn.apply(this,arguments)}var ea,ta,ra,na,aa="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function oa(e){if(ea)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===N){var r=t.payload;switch(null==r?void 0:r.type){case j:D=r.active;break;case V:U=r.panel}}})),na=null==e?void 0:e.hooks,(0,c.initializeI18n)(jt,Vt),p.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{p.locale(c.i18n.language)})),k(),ea=new ca}function ia(){return ea}var sa=new WeakMap,la=new WeakMap;class ca{constructor(){(0,i.Z)(this,sa,{writable:!0,value:!1}),(0,i.Z)(this,la,{writable:!0,value:!1})}initialize(e){var t,r;if((0,l.Z)(this,sa))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,sa,!0),function(e){if(Array.isArray(e.storyboards)){var t=function(){if(r.locales){var e="tmp/".concat(r.id);Object.entries(r.locales).forEach((t=>{var[r,n]=t;c.i18n.addResourceBundle(r,e,n)})),r.localeName=c.i18n.getFixedT(null,e)("name",r.name),Object.keys(r.locales).forEach((t=>{c.i18n.removeResourceBundle(t,e)}))}else r.localeName=r.name};for(var{app:r}of e.storyboards)t()}(0,d.isObject)(e.settings)&&(0,d.deepFreeze)(e.settings),e.brickPackages&&(0,d.deepFreeze)(e.brickPackages)}(e),ta=e;var n,{notification:a,dialog:o}=null!==(t=null===(r=e.settings)||void 0===r?void 0:r.presetBricks)&&void 0!==t?t:{};!1!==a&&(n=null!=a?a:"basic.show-notification",(0,this.loadBricks)([n]).then((()=>{Kt=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==o&&function(e,t){t([e]).then((()=>{Tt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=o?o:"basic.show-dialog",this.loadBricks)}bootstrap(e){var t=this;return(0,o.Z)((function*(){if(e&&t.initialize(e),(0,l.Z)(t,la))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,la,!0),ra=new qn(ta.storyboards),yield ra.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=ra)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=ra)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return _e(e,t)}getFeatureFlags(){var e,t;return(0,a.Z)((0,a.Z)((0,a.Z)({},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags),null===(t=ra)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t;return(0,a.Z)((0,a.Z)({},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc),null===(t=ra)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc)}getBrandSettings(){var e;return(0,a.Z)({base_title:"DevOps 管理专家"},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand)}getLaunchpadSettings(){var e;return(0,a.Z)({columns:7,rows:4},null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=ta)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=ta)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=ra)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,ua())}}function ua(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=null===(n=ta)||void 0===n?void 0:n.brickPackages)&&void 0!==r?r:aa)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[]}function da(){var e;return null===(e=ra)||void 0===e?void 0:e.getRenderId()}function pa(){var e;return null===(e=ra)||void 0===e?void 0:e.getRuntimeContext()}function fa(e){var t;return null===(t=ta)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function va(e){var t;return null===(t=fa(e))||void 0===t?void 0:t.app}function ha(){for(var e,t,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];null==na||null===(e=na.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function ma(){var e;return null==na||null===(e=na.auth)||void 0===e?void 0:e.getAuth()}function ga(){var e,t;return null==na||null===(e=na.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function ya(){var e;return null==na||null===(e=na.auth)||void 0===e?void 0:e.isLoggedIn()}function ba(e,t,r){return wa.apply(this,arguments)}function wa(){return(wa=(0,o.Z)((function*(e,t,r){return qe(yield Ne(e),e,"resolve",t,r)}))).apply(this,arguments)}function Ea(e){var t,{portal:r,scope:n="fragment",unknownBricks:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,l,c=!1;return{render(r){var d=arguments;return(0,o.Z)((function*(){var{theme:o,context:p,functions:f,templates:v,i18n:h}=d.length>1&&void 0!==d[1]?d[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");var m=[].concat(r),g=s;s=new yn(n,{unknownBricks:a});var y={ctxStore:new Sr("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},b={tag:Br.ROOT,container:e,createPortal:t};if("page"===n){var w;Y(null!=o?o:"light"),ae("default");var E={id:"demo",homepage:"/demo"};y.app=E;var S={app:E,meta:{i18n:h,customTemplates:v}};null===(w=l)||void 0===w||w(),l=L(S),Cn(S),ve(f,E)}y.ctxStore.define(p,y);var k,A=!1,P=[];try{k=yield Hr(b,m,y,s),(0,u.flushStableLoadBricks)(),P=[y.ctxStore,...y.tplStateStoreMap.values(),...y.formStateStoreMap.values()],yield Promise.all([...k.blockingList,...P.map((e=>e.waitForAll())),...y.pendingPermissionsPreCheck])}catch(e){A=!0,k={node:{tag:Br.BRICK,type:"div",properties:{textContent:$t(e)},return:b,runtimeContext:null},blockingList:[],menuRequests:[]}}if(b.child=k.node,null==g||g.dispatchOnUnmount(),null==g||g.dispose(),rn(e),i&&rn(i),"page"===n&&(A||s.dispatchBeforePageLoad(),ee(),ie()),nn(b),"page"===n&&window.scrollTo(0,0),!A){for(var x of P)x.handleAsyncAfterMount();"page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}}))()},unmount(){c||(c=!0,rn(e),i&&(rn(i),r||i.remove()))}}}function Sa(e,t){return ka.apply(this,arguments)}function ka(){return(ka=(0,o.Z)((function*(e,t){var r,n,o,i=[],s=[],l=(0,a.Z)((0,a.Z)({},pa()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:i,formStateStoreScope:s});null!==(r=l.tplStateStoreMap)&&void 0!==r||(l.tplStateStoreMap=new Map),null!==(n=l.formStateStoreMap)&&void 0!==n||(l.formStateStoreMap=new Map);var c=new yn("fragment"),d={tag:Br.ROOT,createPortal:null},p=e.transform,f=Pe();p&&xe(f,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var v=yield qr(d,f?e:(0,a.Z)((0,a.Z)({},e),{},{properties:(0,a.Z)((0,a.Z)({},e.properties),p)}),l,c);(0,u.flushStableLoadBricks)();var h=[...i,...s];if(yield Promise.all([...v.blockingList,...h.map((e=>e.waitForAll())),...l.pendingPermissionsPreCheck]),null!==(o=v.node)&&void 0!==o&&o.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return d.child=v.node,{tagName:v.node?v.node.type:null,renderRoot:d,rendererContext:c,scopedStores:h}}))).apply(this,arguments)}function Aa(e,t){var r,{renderRoot:n,rendererContext:a,scopedStores:o}=e;for(var i of(n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},nn(n,t),o))i.handleAsyncAfterMount();return a.dispatchOnMount(),a.initializeScrollIntoView(),a.initializeMediaChange(),a.initializeMessageDispatcher(),{portal:r}}function Pa(e,t){var{rendererContext:r}=e;t.portal&&(rn(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function xa(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return ct(t,(0,a.Z)((0,a.Z)({},pa()),{},{data:e}),{noInject:!0})}function Ia(e,t){var r=fa(e);Object.assign(r,(0,a.Z)((0,a.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),L(r)}function Ca(e,t){var r=fa(e),n=!1,a=e=>"".concat(e.path,".").concat(e.exact),o=(e,r)=>e.map((e=>{var i=a(e);return"routes"===e.type?(e.routes=o(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=o(r.routes,a(t)),n||r.routes.unshift(t)}function Za(e,t,r){var n="".concat(e,".").concat(t.name);Ze.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Oa(e,t.name,r)}function Oa(e,t,r){La(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,a.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Ta(e){return"${APP.homepage}/_dev_only_/snippet-preview/".concat(e)}function Ba(e,t){var r;La(e,Ta(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var Ra=Ba;function La(e,t,r){var{routes:n}=fa(e),a=n.findIndex((e=>e.path===t)),o={path:t,bricks:r,menu:!1,exact:!0};-1===a?n.unshift(o):n.splice(a,1,o)}function Ma(e,t){var{tplStateStoreId:r}=t,n=pa();return r?Oe((0,a.Z)((0,a.Z)({},n),{},{tplStateStoreId:r}),"STATE").getValue(e):n.ctxStore.getValue(e)}function _a(e){var{tplStateStoreId:t}=e,r=pa();return t?Oe((0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:t}),"STATE").getAllValues():r.ctxStore.getAllValues()}function Fa(e){return ua().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function Ua(){return da()}function Na(e,t){return ja.apply(this,arguments)}function ja(){return(ja=(0,o.Z)((function*(e,t){var r,{appId:n,updateStoryboardType:a,provider:o}=t,i=fa(n);if("route"===a)r={routes:[e]};else if("template"===a)r={meta:{customTemplates:[e]}};else if("snippet"===a){var s,l=Ta(e.snippetId);r={routes:[null==i||null===(s=i.routes)||void 0===s?void 0:s.find((e=>e.path===l))]}}var c=[];if(r&&o){yield(0,u.loadBricksImperatively)([o],ua());var d=document.createElement(o);(yield d.resolve(r)).forEach((e=>{var t,[r,n,a]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===n&&e.name===a))||c.push(e)}))}return c}))).apply(this,arguments)}},7929:(e,t,r)=>{r.r(t),r.d(t,{supply:()=>s});var n=r(3028),a=r(5178),o=r(8874),i=r(8183);function s(e,t,r){var a=(0,n.Z)({},t);for(var o of(a[void 0]=void 0,e))if(!Object.prototype.hasOwnProperty.call(a,o)){var i=d(o,r);void 0!==i&&(a[o]=i)}return a}var l=new Set(["fill","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","assign","assignIn","assignInWith","assignWith","defaults","defaultsDeep","merge","mergeWith","set","setWith","unset","update","updateWith","after","ary","before","bind","bindKey","curry","curryRight","debounce","defer","delay","flip","memoize","negate","once","overArgs","partial","partialRight","rearg","rest","spread","throttle","unary","wrap"]),c=new Set(["lang","langData","locale","localeData","defineLocale","updateLocale","updateOffset"]),u=new Set(["Array","Boolean","Date","Infinity","JSON","Math","NaN","Number","String","RegExp","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","isFinite","isNaN","parseFloat","parseInt","Map","Set","URLSearchParams","WeakMap","WeakSet","atob","btoa"]);function d(e,t){switch(e){case"Object":return r=Object,n=["entries","fromEntries","keys","values"],Object.fromEntries(n.map((e=>[e,function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r[e].apply(r,n)}])));case"_":return Object.fromEntries(Object.entries(a).filter((e=>!l.has(e[0]))).concat(t?[["uniqueId",e=>"".concat(null!=e?e:"","42")]]:[]));case"moment":return Object.assign((function(){return o(...arguments)}),Object.fromEntries(Object.entries(o).filter((e=>!c.has(e[0])))));case"PIPES":return i.pipes;case"TAG_URL":return p(!0);case"SAFE_TAG_URL":return p();default:if(u.has(e))return window[e]}var r,n}function p(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var o=[];return t.forEach(((t,r)=>{o.push(t),r<n.length&&o.push(e?String(n[r]).replace(/[^/]+/g,(e=>encodeURIComponent(e))):encodeURIComponent(String(n[r])))})),o.join("")}}},8486:(e,t,r)=>{function n(e){return class extends HTMLElement{get $$typeof(){return"provider"}resolve(){return e(...arguments)}}}function a(e){var t=Object.getOwnPropertyNames(e);for(var r of t){var n=e[r];n&&"object"==typeof n&&a(n)}return Object.freeze(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}r.r(t),r.d(t,{JsonStorage:()=>s,createProviderClass:()=>n,deepFreeze:()=>a,hasOwnProperty:()=>o,isObject:()=>i,unwrapProvider:()=>c});class s{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"brick-next-";this.storage=e,this.prefix=t}setItem(e,t){this.storage.setItem(this.prefix+e,JSON.stringify(t))}getItem(e){var t;return JSON.parse(null!==(t=this.storage.getItem(this.prefix+e))&&void 0!==t?t:"null")}removeItem(e){return this.storage.removeItem(this.prefix+e)}clear(){return this.storage.clear()}}var l=new Map;function c(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=function(e){var t=l.get(e);return t||(t=document.createElement(e),l.set(e,t),t)}(e);return a.resolve(...r)}}},1259:(e,t,r)=>{function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(a,o){if("string"==typeof t?a.name===t:t.includes(a.name)){for(var i=[],s=1;s<=r;s++){var l=o[o.length-s];if("MemberExpression"===(null==l?void 0:l.node.type)&&"object"===l.key){var c=l.node;c.computed||"Identifier"!==c.property.type?c.computed&&"Literal"===c.property.type&&"string"==typeof c.property.value?i.push(n?"".concat(a.name,".").concat(c.property.value):c.property.value):e.hasNonStaticUsage=!0:i.push(n?"".concat(a.name,".").concat(c.property.name):c.property.name)}else e.hasNonStaticUsage=!0}i.length===r&&e.usedProperties.add(i.join("."))}}}function a(e,t){return function(r,n,a){if(n.name===e){var o=a[a.length-1],i=a[a.length-2];if("CallExpression"===(null==i?void 0:i.node.type)&&"callee"===(null==i?void 0:i.key)&&"MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key&&(o.node.computed?"Literal"===o.node.property.type&&o.node.property.value===t:"Identifier"===o.node.property.type&&o.node.property.name===t)){var s=i.node.arguments;if(s.length>0){var l=s[0];"Literal"===l.type&&"string"==typeof l.value?r.usedArgs.add(l.value):r.hasNonStaticUsage=!0}}}}}r.r(t),r.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>o,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>d,collectMemberUsageInFunction:()=>g,createProviderClass:()=>l.createProviderClass,scanPermissionActionsInAny:()=>E,scanPermissionActionsInStoryboard:()=>w,strictCollectMemberUsage:()=>u,strictCollectMemberUsageInFunction:()=>m,track:()=>p,trackAll:()=>f,traverseStoryboardExpressions:()=>c,traverseStoryboardFunction:()=>h,traverseStoryboardFunctions:()=>v,unwrapProvider:()=>l.unwrapProvider});var o=a("APP","getMenu"),i=a("INSTALLED_APPS","has"),s=r(9044),l=r(5927);function c(e,t,r){var n=new WeakSet,{matchExpressionString:a,visitNotMatchedExpressionString:o,visitNonExpressionString:i,visitObject:c}="string"==typeof r?{matchExpressionString:e=>e.includes(r)}:r;!function e(r){if("string"==typeof r)if((0,s.isEvaluable)(r))if(a(r))try{(0,s.preevaluate)(r,{withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,r)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==o||o(r);else null==i||i(r);else if((0,l.isObject)(r)){if(n.has(r))return;for(var u of(n.add(r),null==c||c(r),Array.isArray(r)?r:Object.values(r)))e(u)}}(e)}function u(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{hasNonStaticUsage:n,nonStaticUsage:a,usedProperties:o}=d(e,t,r);if(n)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your expression: "').concat(a,'"'));return o}function d(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a={usedProperties:new Set,hasNonStaticUsage:!1},o=n(a,t,r);return c(e,((e,t,r)=>{o(e,t),a.hasNonStaticUsage&&(a.nonStaticUsage=r)}),t),a}function p(e,t,r){if(e.includes(t)){var a,o={usedProperties:new Set,hasNonStaticUsage:!1},{expression:i}=(0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(o,r)}});if("SequenceExpression"===i.type&&(a=i.expressions[0])&&"Literal"===a.type&&a.value===t){if(o.usedProperties.size>0)return o.usedProperties;console.warn('You are using "'.concat(t,'" but no `').concat(r,"` usage found in your expression: ").concat(JSON.stringify(e)))}}return!1}function f(e){if(e){var t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(t,["CTX","STATE","FORM_STATE"],1,!0)}}),t.usedProperties.size>0){var r=[...t.usedProperties],a={context:!1,state:!1,formState:!1},o={CTX:"context",STATE:"state",FORM_STATE:"formState"};return r.forEach((e=>{var[t,r]=e.split(".");a[o[t]]||(a[o[t]]=[]),a[o[t]].push(r)})),a}console.warn('You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: '.concat(JSON.stringify(e)))}return!1}function v(e,t){if(Array.isArray(e))for(var r of e)h(r,t)}function h(e,t){try{(0,s.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t}})}catch(t){console.error('Parse storyboard function "'.concat(e.name,'" failed:'),t)}}function m(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{hasNonStaticUsage:n,usedProperties:a}=g(e,t,r);if(n)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your function: "').concat(e.name,'"'));return a}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a={usedProperties:new Set,hasNonStaticUsage:!1};return h(e,n(a,t,r)),a.usedProperties.delete(e.name),a}var y="PERMISSIONS",b="check";function w(e){var t,r=new Set,n=S(r),{customTemplates:a,functions:o}=null!==(t=e.meta)&&void 0!==t?t:{};return c([e.routes,a],n,y),v(o,n),Array.from(r)}function E(e){var t=new Set;return c(e,S(t),y),Array.from(t)}function S(e){return function(t,r){if(t.name===y){var n=r[r.length-1],a=r[r.length-2];if("CallExpression"===(null==a?void 0:a.node.type)&&"callee"===(null==a?void 0:a.key)&&"MemberExpression"===(null==n?void 0:n.node.type)&&"object"===n.key&&(n.node.computed?"Literal"===n.node.property.type&&n.node.property.value===b:"Identifier"===n.node.property.type&&n.node.property.name===b))for(var o of a.node.arguments)"Literal"===o.type&&"string"==typeof o.value&&e.add(o.value)}}}}}]);
2
+ //# sourceMappingURL=core.99d010e6.js.map