@next-bricks/ai-portal 0.60.0 → 0.60.2
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.
- package/dist/bricks.json +22 -22
- package/dist/chunks/1480.0de951a3.js +2 -0
- package/dist/chunks/1480.0de951a3.js.map +1 -0
- package/dist/chunks/{2084.ddaad7cc.js → 2084.aae5392b.js} +3 -3
- package/dist/chunks/2084.aae5392b.js.map +1 -0
- package/dist/chunks/{2232.02cd2bbc.js → 2232.085b8abd.js} +2 -2
- package/dist/chunks/{2232.02cd2bbc.js.map → 2232.085b8abd.js.map} +1 -1
- package/dist/chunks/{2324.d6932d39.js → 2324.a4a90c77.js} +2 -2
- package/dist/chunks/{2324.d6932d39.js.map → 2324.a4a90c77.js.map} +1 -1
- package/dist/chunks/2357.b6f1e719.js +2 -0
- package/dist/chunks/2357.b6f1e719.js.map +1 -0
- package/dist/chunks/{3171.a0251432.js → 3171.45ef4669.js} +2 -2
- package/dist/chunks/{3171.a0251432.js.map → 3171.45ef4669.js.map} +1 -1
- package/dist/chunks/3793.03162dd0.js +2 -0
- package/dist/chunks/3793.03162dd0.js.map +1 -0
- package/dist/chunks/{7146.1af0c62e.js → 4765.03d9c7c5.js} +2 -2
- package/dist/chunks/{7146.1af0c62e.js.map → 4765.03d9c7c5.js.map} +1 -1
- package/dist/chunks/{4837.c7f9a784.js → 4837.570099ad.js} +2 -2
- package/dist/chunks/{4837.c7f9a784.js.map → 4837.570099ad.js.map} +1 -1
- package/dist/chunks/{5552.84bdc597.js → 5552.09658542.js} +2 -2
- package/dist/chunks/{5552.84bdc597.js.map → 5552.09658542.js.map} +1 -1
- package/dist/chunks/5712.827c2e04.js +2 -0
- package/dist/chunks/5712.827c2e04.js.map +1 -0
- package/dist/chunks/6450.ade6ef3e.js +2 -0
- package/dist/chunks/6450.ade6ef3e.js.map +1 -0
- package/dist/chunks/6792.03e66697.js +2 -0
- package/dist/chunks/6792.03e66697.js.map +1 -0
- package/dist/chunks/{4765.e2813cac.js → 7146.b327120d.js} +2 -2
- package/dist/chunks/{4765.e2813cac.js.map → 7146.b327120d.js.map} +1 -1
- package/dist/chunks/7888.61a7cdf2.js +3 -0
- package/dist/chunks/7888.61a7cdf2.js.LICENSE.txt +7 -0
- package/dist/chunks/7888.61a7cdf2.js.map +1 -0
- package/dist/chunks/7955.0c92eb57.js +3 -0
- package/dist/chunks/{7238.9abe2a64.js.LICENSE.txt → 7955.0c92eb57.js.LICENSE.txt} +0 -6
- package/dist/chunks/7955.0c92eb57.js.map +1 -0
- package/dist/chunks/948.e601f18c.js +3 -0
- package/dist/chunks/948.e601f18c.js.map +1 -0
- package/dist/chunks/9525.9e5140be.js +15 -0
- package/dist/chunks/9525.9e5140be.js.map +1 -0
- package/dist/chunks/{9599.1f04dd1f.js → 9599.02a5e6e3.js} +2 -2
- package/dist/chunks/{9599.1f04dd1f.js.map → 9599.02a5e6e3.js.map} +1 -1
- package/dist/chunks/9979.44f64896.js +2 -0
- package/dist/chunks/9979.44f64896.js.map +1 -0
- package/dist/chunks/{action-buttons.989fd1c9.js → action-buttons.68666920.js} +2 -2
- package/dist/chunks/{action-buttons.989fd1c9.js.map → action-buttons.68666920.js.map} +1 -1
- package/dist/chunks/{activity-timeline.60adaa84.js → activity-timeline.96e7aaea.js} +2 -2
- package/dist/chunks/{activity-timeline.60adaa84.js.map → activity-timeline.96e7aaea.js.map} +1 -1
- package/dist/chunks/{ai-agents.92ed0274.js → ai-agents.cffd08a0.js} +3 -3
- package/dist/chunks/{ai-agents.92ed0274.js.map → ai-agents.cffd08a0.js.map} +1 -1
- package/dist/chunks/{ai-employees.52fe4443.js → ai-employees.267c3626.js} +3 -3
- package/dist/chunks/{ai-employees.52fe4443.js.map → ai-employees.267c3626.js.map} +1 -1
- package/dist/chunks/{call-tool.89a848e0.js → call-tool.a3219d5e.js} +2 -2
- package/dist/chunks/call-tool.a3219d5e.js.map +1 -0
- package/dist/chunks/{chat-box.991e397f.js → chat-box.ca4c62c9.js} +3 -3
- package/dist/chunks/{chat-box.991e397f.js.map → chat-box.ca4c62c9.js.map} +1 -1
- package/dist/chunks/{chat-input.fce2d021.js → chat-input.e999f79c.js} +2 -2
- package/dist/chunks/{chat-input.fce2d021.js.map → chat-input.e999f79c.js.map} +1 -1
- package/dist/chunks/{chat-stream.362a2292.js → chat-stream.8d8dc5a0.js} +2 -2
- package/dist/chunks/{chat-stream.362a2292.js.map → chat-stream.8d8dc5a0.js.map} +1 -1
- package/dist/chunks/{cruise-canvas.b444c4ca.js → cruise-canvas.4a0692fb.js} +2 -2
- package/dist/chunks/{cruise-canvas.b444c4ca.js.map → cruise-canvas.4a0692fb.js.map} +1 -1
- package/dist/chunks/{dropdown-select.1140bf2b.js → dropdown-select.336442ba.js} +2 -2
- package/dist/chunks/{dropdown-select.1140bf2b.js.map → dropdown-select.336442ba.js.map} +1 -1
- package/dist/chunks/{elevo-sidebar.0d1f76dd.js → elevo-sidebar.68648b33.js} +3 -3
- package/dist/chunks/elevo-sidebar.68648b33.js.map +1 -0
- package/dist/chunks/{gantt-chart.c8cdcd66.js → gantt-chart.42c7f514.js} +2 -2
- package/dist/chunks/{gantt-chart.c8cdcd66.js.map → gantt-chart.42c7f514.js.map} +1 -1
- package/dist/chunks/{goal-card-list.44c21cf2.js → goal-card-list.74ab5767.js} +3 -3
- package/dist/chunks/{goal-card-list.44c21cf2.js.map → goal-card-list.74ab5767.js.map} +1 -1
- package/dist/chunks/{load-request-store.b4cf045b.js → load-request-store.a6effafd.js} +2 -2
- package/dist/chunks/{load-request-store.b4cf045b.js.map → load-request-store.a6effafd.js.map} +1 -1
- package/dist/chunks/main.65f1d0be.js +2 -0
- package/dist/chunks/{main.87ffc00f.js.map → main.65f1d0be.js.map} +1 -1
- package/dist/chunks/{mcp-tools.0acb474a.js → mcp-tools.f132c502.js} +2 -2
- package/dist/chunks/{mcp-tools.0acb474a.js.map → mcp-tools.f132c502.js.map} +1 -1
- package/dist/chunks/{notice-dropdown.365134e6.js → notice-dropdown.63cb2415.js} +2 -2
- package/dist/chunks/{notice-dropdown.365134e6.js.map → notice-dropdown.63cb2415.js.map} +1 -1
- package/dist/chunks/{notice-list.d51c0103.js → notice-list.9a78cc87.js} +3 -3
- package/dist/chunks/{notice-list.d51c0103.js.map → notice-list.9a78cc87.js.map} +1 -1
- package/dist/chunks/{page-container.570e7c6d.js → page-container.08e26095.js} +2 -2
- package/dist/chunks/{page-container.570e7c6d.js.map → page-container.08e26095.js.map} +1 -1
- package/dist/chunks/preview-container.a0ca6e2f.js +2 -0
- package/dist/chunks/preview-container.a0ca6e2f.js.map +1 -0
- package/dist/chunks/{project-conversations.3f559e57.js → project-conversations.4cc72f40.js} +3 -3
- package/dist/chunks/{project-conversations.3f559e57.js.map → project-conversations.4cc72f40.js.map} +1 -1
- package/dist/chunks/{project-knowledges.24611263.js → project-knowledges.51731410.js} +3 -3
- package/dist/chunks/{project-knowledges.24611263.js.map → project-knowledges.51731410.js.map} +1 -1
- package/dist/chunks/{set-chat-command.367b9c88.js → set-chat-command.182747cc.js} +2 -2
- package/dist/chunks/{set-chat-command.367b9c88.js.map → set-chat-command.182747cc.js.map} +1 -1
- package/dist/chunks/{show-case.7bc5fc9e.js → show-case.44e995fc.js} +2 -2
- package/dist/chunks/{show-case.7bc5fc9e.js.map → show-case.44e995fc.js.map} +1 -1
- package/dist/chunks/{show-cases.85fe99d4.js → show-cases.c3921ea0.js} +2 -2
- package/dist/chunks/{show-cases.85fe99d4.js.map → show-cases.c3921ea0.js.map} +1 -1
- package/dist/chunks/{stage-flow.22610ca5.js → stage-flow.9b6fad93.js} +2 -2
- package/dist/chunks/{stage-flow.22610ca5.js.map → stage-flow.9b6fad93.js.map} +1 -1
- package/dist/examples.json +13 -13
- package/dist/index.9833ba26.js +2 -0
- package/dist/index.9833ba26.js.map +1 -0
- package/dist/manifest.json +146 -146
- package/dist/types.json +193 -167
- package/dist-types/data-providers/call-tool.d.ts +1 -1
- package/dist-types/elevo-sidebar/ChatHistory.d.ts +3 -1
- package/dist-types/elevo-sidebar/index.d.ts +2 -1
- package/dist-types/jsx.d.ts +77 -0
- package/dist-types/shared/interfaces.d.ts +1 -1
- package/dist-types/shared/workers/tsxParser.d.ts +1 -1
- package/package.json +5 -3
- package/dist/chunks/2084.ddaad7cc.js.map +0 -1
- package/dist/chunks/3199.0220cf6e.js +0 -3
- package/dist/chunks/3199.0220cf6e.js.map +0 -1
- package/dist/chunks/3735.8c1d82e7.js +0 -15
- package/dist/chunks/3735.8c1d82e7.js.LICENSE.txt +0 -5
- package/dist/chunks/3735.8c1d82e7.js.map +0 -1
- package/dist/chunks/5712.c566ad78.js +0 -2
- package/dist/chunks/5712.c566ad78.js.map +0 -1
- package/dist/chunks/6593.58eda50f.js +0 -2
- package/dist/chunks/6593.58eda50f.js.map +0 -1
- package/dist/chunks/6792.0efb2d00.js +0 -2
- package/dist/chunks/6792.0efb2d00.js.map +0 -1
- package/dist/chunks/7238.9abe2a64.js +0 -3
- package/dist/chunks/7238.9abe2a64.js.map +0 -1
- package/dist/chunks/7586.b406d4bf.js +0 -2
- package/dist/chunks/7586.b406d4bf.js.map +0 -1
- package/dist/chunks/8135.3255c5ba.js +0 -2
- package/dist/chunks/8135.3255c5ba.js.map +0 -1
- package/dist/chunks/843.9b7325c3.js +0 -2
- package/dist/chunks/843.9b7325c3.js.map +0 -1
- package/dist/chunks/9388.e48bb229.js +0 -2
- package/dist/chunks/9388.e48bb229.js.map +0 -1
- package/dist/chunks/948.d125d58c.js +0 -3
- package/dist/chunks/948.d125d58c.js.map +0 -1
- package/dist/chunks/9496.1d7ebb7f.js +0 -2
- package/dist/chunks/9496.1d7ebb7f.js.map +0 -1
- package/dist/chunks/call-tool.89a848e0.js.map +0 -1
- package/dist/chunks/elevo-sidebar.0d1f76dd.js.map +0 -1
- package/dist/chunks/main.87ffc00f.js +0 -2
- package/dist/chunks/preview-container.19631a7b.js +0 -2
- package/dist/chunks/preview-container.19631a7b.js.map +0 -1
- package/dist/index.a91518b7.js +0 -2
- package/dist/index.a91518b7.js.map +0 -1
- /package/dist/chunks/{2084.ddaad7cc.js.LICENSE.txt → 2084.aae5392b.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{948.d125d58c.js.LICENSE.txt → 948.e601f18c.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{3199.0220cf6e.js.LICENSE.txt → 9525.9e5140be.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{ai-agents.92ed0274.js.LICENSE.txt → ai-agents.cffd08a0.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{ai-employees.52fe4443.js.LICENSE.txt → ai-employees.267c3626.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{chat-box.991e397f.js.LICENSE.txt → chat-box.ca4c62c9.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{elevo-sidebar.0d1f76dd.js.LICENSE.txt → elevo-sidebar.68648b33.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{goal-card-list.44c21cf2.js.LICENSE.txt → goal-card-list.74ab5767.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{notice-list.d51c0103.js.LICENSE.txt → notice-list.9a78cc87.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{project-conversations.3f559e57.js.LICENSE.txt → project-conversations.4cc72f40.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{project-knowledges.24611263.js.LICENSE.txt → project-knowledges.51731410.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 948.d125d58c.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[948],{11369:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(17545);function r(e){var t=function(e){if("object"!=(0,o.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=(0,o.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,o.A)(t)?t:t+""}},12559:(e,t,n)=>{function o(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>o})},17545:(e,t,n)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{A:()=>o})},24586:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(11369);function r(e,t,n){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},30948:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>rn,Notification:()=>pn,StoryboardFunctionRegistryFactory:()=>ve,__secret_internals:()=>o,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>ji,batchSetAppsLocalTheme:()=>ne,checkIfByTransform:()=>_t,checkIfOfComputed:()=>Ot,createHistory:()=>A,createRuntime:()=>_i,customEditors:()=>Gi,customProcessors:()=>x,customTemplates:()=>Ne,fetchByProvider:()=>Hi,getAuth:()=>Ki,getBasePath:()=>p,getCssPropertyValue:()=>le,getCurrentMode:()=>ae,getCurrentTheme:()=>ee,getHistory:()=>k,getPageInfo:()=>Sr,getRealValue:()=>Xi,getRuntime:()=>Pi,getThemeVariant:()=>de,getV2RuntimeFromDll:()=>S,handleHttpError:()=>fn,httpErrorToString:()=>sn,instantiateModalStack:()=>Ji,isLoggedIn:()=>Wi,isNetworkError:()=>Cr,isUnauthenticatedError:()=>ln,logout:()=>Vi,matchPath:()=>Wt,registerWidgetFunctions:()=>Ve,registerWidgetI18n:()=>N,resetReloadForError:()=>_r,setUIVersion:()=>kr,shouldReloadForError:()=>Or,unstable_createRoot:()=>qi});var o={};n.r(o),n.d(o,{addRealTimeDataInspectHook:()=>Ko,debugDataValue:()=>No,getAddedContracts:()=>$o,getAllContextValues:()=>Po,getBrickPackages:()=>Li,getBrickPackagesById:()=>Mo,getContextValue:()=>_o,getLegalRuntimeValue:()=>Uo,getRenderId:()=>Lo,legacyDoTransform:()=>ho,legacyTransformIntermediateData:()=>mo,legacyTransformProperties:()=>go,loadBricks:()=>xo,loadEditors:()=>Bo,mountUseBrick:()=>wo,renderUseBrick:()=>yo,setRealTimeDataInspectRoot:()=>jo,symbolForRootRuntimeContext:()=>bo,unmountUseBrick:()=>Eo,updateSnippetPreviewSettings:()=>To,updateStoryboard:()=>So,updateStoryboardByRoute:()=>Ao,updateStoryboardBySnippet:()=>Ro,updateStoryboardByTemplate:()=>ko,updateTemplatePreviewSettings:()=>Io});var r=n(24586),i=n(70918),a=n(86121),s=n(70829),l=n(52616),c=n(45599),u=n(77019),d=n(21302),f=(n(26036),n(11732));function p(){const e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var h=n(41030);function g(e,t){const n=(0,h.orderBy)(e,(e=>{var t,n;return null!==(t=null===(n=e.app.homepage)||void 0===n?void 0:n.length)&&void 0!==t?t:0}),"desc");for(const e of n){const n=e.app.homepage;if("string"==typeof n&&"/"===n[0]&&m(n,t))return e}}function m(e,t){return"/"===e?t===e:`${t.replace(/\/+$/,"")}/`.startsWith(`${e.replace(/\/+$/,"")}/`)}function v(e){var t;return!e||(null===(t=Pi().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}let b,y=!1;function w(e,t){y=!confirm(e),t(!y)}function E(e){const{push:t,replace:n}=e;function o(o){return function(r,i,a){let s;const l="string"==typeof r;return s=l?(0,f.parsePath)(r).pathname:r.pathname,"string"==typeof s&&s.startsWith("/")&&v(function(e){var t,n;return g(null!==(t=null===(n=Ci)||void 0===n?void 0:n.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===o?"assign":"replace"](l?p()+r.substring(1):e.createHref(r)):("push"===o?t:n)(r,i,a)}}return{push:o("push"),replace:o("replace")}}function S(){var e;const{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function A(){if(!b){const e=(0,f.createBrowserHistory)({basename:p().replace(/\/$/,""),getUserConfirmation:w});Object.assign(e,function(e){const{push:t,replace:n}=e;function o(e,n,o){y=!1,t(e,n),null==o||o(y)}function r(e,t,o){y=!1,n(e,t),null==o||o(y)}function i(t){return function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;const{extraQuery:s,clear:l,keepHash:c,...u}=i,d=new URLSearchParams(l?"":e.location.search),f={};Object.assign(f,n,s);for(const[e,t]of Object.entries(f))if(Array.isArray(t)){d.delete(e);for(const n of t)d.append(e,n)}else null==t||""===t?d.delete(e):d.set(e,t);("push"===t?o:r)(`?${d.toString()}${c?e.location.hash:""}`,u,a)}}let a;return{pushQuery:i("push"),replaceQuery:i("replace"),pushAnchor:function(t,n,r){o({...e.location,key:void 0,hash:t,state:{notify:!1,...n}},void 0,r)},reload:function(t){r({...e.location,state:{...e.location.state,notify:!0,noIncremental:!0}},void 0,t)},setBlockMessage:function(e){a=e},getBlockMessage:function(){return a},unblock:function(){a=void 0},...E({...e,push:o,replace:r})}}(e)),b=e}return b}const k=function(){const e=S();if(e)return e.getHistory}()||function(){return b};var I=n(74635),C=n(12559),R=n(22919),T=n(71321),O=n(69655),_=n(29283),P=n(94167),M=new WeakMap;const x=function(){const e=S();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomProcessor(t,n)})}()||new class{constructor(){(0,i.A)(this,M,new Map)}define(e,t){const[n,o]=e.split(".");let r=(0,s.A)(M,this).get(n);if(r||(r=new Map,(0,s.A)(M,this).set(n,r)),r.has(o))throw new Error(`Custom processor of "${e}" already registered`);r.set(o,t)}get(e){return(0,s.A)(M,this).get(e)}};function B(e){let{app:t,meta:n}=e;if(null!=n&&n.i18n){const e=L("app",t.id),o=[];return Object.entries(n.i18n).forEach((t=>{let[n,r]=t;l.i18n.addResourceBundle(n,e,r),o.push(n)})),()=>{for(const t of o)l.i18n.removeResourceBundle(t,e)}}}function L(e,t){return`${e}/${t}`}function $(e){return l.i18n.getFixedT(null,L("widget",e))}const N=function(){const e=S();if(e)return function(t,n){return e.getRuntime().registerWidgetI18n(t,n)}}()||function(e,t){const n=L("widget",e);Object.entries(t).forEach((e=>{let[t,o]=e;l.i18n.addResourceBundle(t,n,o)}))},U="brick-next-devtools-panel",F="devtools-frame-active-change",D="devtools-panel-change";let j,K=!0;function V(e,t){const n=W();if(!n||"evaluation"===e&&(!K||j&&"Evaluations"!==j))return;const o=()=>{var o;null===(o=n.emit)||void 0===o||o.call(n,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(o):setTimeout(o,0)}function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}const z=()=>{throw new Error("Can't modify read-only proxy object")},G={set:z,defineProperty:z,deleteProperty:z,setPrototypeOf:z};function H(e){return new Proxy(e,G)}function q(e){let{get:t,ownKeys:n}=e;return W()?H(Object.fromEntries(n(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}let X="light";const Y=new u.JsonStorage(localStorage),J="apps-theme";function Q(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error(`Unsupported theme: ${e}`);X=e}function Z(){return X}function ee(){return document.documentElement.dataset.theme}function te(e){e?Q(e):e=Z(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function ne(e){Y.setItem(J,{...oe(),...e})}function oe(){let e;try{e=Y.getItem(J)}catch{console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!=e?e:{}}let re="default";function ie(e){if("dashboard"!==e&&"default"!==e)throw new Error(`Unsupported mode: ${e}`);re=e}function ae(){return document.documentElement.dataset.mode}function se(e){e?ie(e):e=re,e!==ae()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function le(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return n&&(null===(t=window.getComputedStyle(n))||void 0===t?void 0:t.getPropertyValue(e))||""}let ce="default";function ue(e){if("default"!==e&&"elevo"!==e)return ue("default");ce!==e&&(document.documentElement.dataset.variant=ce=e,window.dispatchEvent(new CustomEvent("variant.change",{detail:e})))}function de(){return ce}const fe=new Map;function pe(e,t){const n={};for(const o of e){const e=he(o,t);void 0!==e&&(n[o]=e)}return n}function he(e,t){var n,o,r;let{collectCoverage:i,widgetId:a,widgetVersion:s,isolatedRoot:c,app:u,appendI18nNamespace:d,storyboardFunctions:f,isStoryboardFunction:g}=t;switch(e){case"BASE_URL":return i?"/next":p().replace(/\/$/,"");case"FN":return c?fe.get(c):f;case"IMG":return i?{get:e=>`mock/images/${e}`}:a?null==Oi||null===(n=Oi.images)||void 0===n?void 0:n.widgetImagesFactory(a,s):null==Oi||null===(o=Oi.images)||void 0===o?void 0:o.imagesFactory(u.id,u.isBuildPush,u.currentVersion);case"I18N":return i?h.identity:a?$(a):l.i18n.getFixedT(null,[d,L("app",u.id)].filter(Boolean));case"I18N_TEXT":return i?ge:l.i18nText;case"LANGUAGE":return i?"zh":l.i18n.language||"zh";case"PERMISSIONS":return H({check:i?me:null==Oi||null===(r=Oi.checkPermissions)||void 0===r?void 0:r.checkPermissions});case"THEME":return H({getTheme:i?()=>"light":Z,getCssPropertyValue:i?()=>"":le});case"console":return g?H(console):void 0;case"location":return i?{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 ge(e){return null==e?void 0:e.en}function me(){return!0}function ve(){let{widgetId:e,widgetVersion:t,isolatedRoot:n,collectCoverage:o,debuggerOverrides:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=new Map,a=null==r?void 0:r({precookFunction:T.precookFunction,cook:T.cook,supply:P.supply}),s=new Proxy(Object.freeze({}),{get:(e,t)=>function(e){const t=i.get(e);if(!t)return;if(t.processed)return t.cooked;let n;o&&(n=o.createCollector(e));const s=!a&&!n&&t.transformed;if(s){const e=c(s.globals);t.cooked=new Function(...s.globals,`"use strict";return (${s.source})`)(...s.globals.map((t=>(0,u.hasOwnProperty)(e,t)?e[t]:void 0)))}else{const e=(0,T.precookFunction)(t.source,{typescript:t.typescript,hooks:n&&{beforeVisit:n.beforeVisit},cacheKey:t}),o=c(e.attemptToVisitGlobals);t.cooked=(0,T.cook)(e.function,t.source,{rules:{noVar:!0},globalVariables:a?{...o,...null!=a&&a.LodashWithStaticFields&&e.attemptToVisitGlobals.has("_")?{_:{...o._,...a.LodashWithStaticFields}}:null,...null!=a&&a.ArrayConstructor&&e.attemptToVisitGlobals.has("Array")?{Array:a.ArrayConstructor}:null,...null!=a&&a.ObjectWithStaticFields&&e.attemptToVisitGlobals.has("Object")?{Object:{...o.Object,...a.ObjectWithStaticFields}}:null}:o,ArrayConstructor:null==a?void 0:a.ArrayConstructor,hooks:n&&{beforeEvaluate:n.beforeEvaluate,beforeCall:n.beforeCall,beforeBranch:n.beforeBranch},debug:!!r})}return t.processed=!0,t.cooked}(t)});let l;function c(r){return(0,P.supply)(r,pe(r,{collectCoverage:o,widgetId:e,widgetVersion:t,isolatedRoot:n,app:l,storyboardFunctions:s,isStoryboardFunction:!0}),!!o)}return{storyboardFunctions:s,registerStoryboardFunctions:function(e,t){if(t&&(l=t),i.clear(),Array.isArray(e))for(const t of e){var n;let e=t.deps;null==e&&(e=(0,O.collectMemberUsageInFunction)(t,"FN",!!o),e.delete(t.name));const r=null!==(n=t.perm)&&void 0!==n?n:(0,O.collectMemberUsageInFunction)(t,"PERMISSIONS",!!o).has("check");i.set(t.name,{source:t.source,typescript:t.typescript,transformed:t.transformed,deps:e,hasPermissionsCheck:r})}},updateStoryboardFunction(e,t){const n={...t,name:e},o=(0,O.collectMemberUsageInFunction)(n,"FN",!0),r=(0,O.collectMemberUsageInFunction)(n,"PERMISSIONS",!0).has("check");i.set(e,{source:t.source,typescript:t.typescript,transformed:t.transformed,deps:o,hasPermissionsCheck:r})},checkPermissionsUsage(e){const t=new Set,n=e=>{if(!t.has(e)){t.add(e);const o=i.get(e);return!!o&&(o.hasPermissionsCheck||[...o.deps].some(n))}return!1};return e.some(n)},clearGlobalExecutionContextStack(){(0,T.__dev_only_clearGlobalExecutionContextStack)()},getGlobalExecutionContextStack:()=>(0,T.__dev_only_getGlobalExecutionContextStack)()}}const{storyboardFunctions:be,registerStoryboardFunctions:ye,checkPermissionsUsage:we}=ve();var Ee={};try{Ee.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,o=e.defineProperty,r=i.prototype;function i(){t.set(this,n(null))}function a(e,t,n){o(e,t,{configurable:!0,writable:!0,value:n})}function s(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}a(r,"addEventListener",(function(e,n,o){for(var r=t.get(this),i=r[e]||(r[e]=[]),a=0,s=i.length;a<s;a++)if(i[a].listener===n)return;i.push({target:this,listener:n,options:o})})),a(r,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(a(e,"target",this),a(e,"currentTarget",this),n.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),a(r,"removeEventListener",(function(e,n){for(var o=t.get(this),r=o[e]||(o[e]=[]),i=0,a=r.length;i<a;i++)if(r[i].listener===n)return void r.splice(i,1)})),Ee.EventTarget=i}(Object,new WeakMap)}const Se=Ee.EventTarget;let Ae=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({});const ke=new Map([[Ae.xLarge,"1920px"],[Ae.large,"1600px"],[Ae.medium,"1280px"],[Ae.small,"1024px"],[Ae.xSmall,0]]),Ie=new Se,Ce={},Re={};function Te(e,t){let n=!1;Ce[t]=e.matches;for(const[e]of ke)if(Ce[e]&&Re.breakpoint!==e){Re.breakpoint=e,n=!0;break}n&&Ie.dispatchEvent(new CustomEvent("change",{detail:Re}))}ke.forEach(((e,t)=>{const n=window.matchMedia(`(min-width: ${e})`);Te(n,t),n.addEventListener?n.addEventListener("change",(e=>{Te(e,t)})):n.addListener((e=>{Te(e,t)}))}));const Oe=()=>Re;function _e(e){return function(t){var n;const o="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(n=o.getItem(t))&&void 0!==n?n:"null")}}function Pe(e){var t,n;return!(null===(t=e?e.flags:null===(n=Pi())||void 0===n?void 0:n.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Me(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];const i=0===o.length?"":",";e?console.error(`${t} is dropped in v3 strict mode${i}`,...o):console.warn(`${t} is deprecated in v3 and will be dropped in strict mode${i}`,...o)}const xe=new Set(["prefix"]);var Be=new WeakMap,Le=new WeakMap;class $e{constructor(e){(0,i.A)(this,Be,new Map),(0,i.A)(this,Le,void 0),(0,a.A)(Le,this,e)}define(e,t){var n,o,r,i;let a=(0,s.A)(Be,this).has(e);a?console.warn(`Custom template of "${e}" already registered.`):(a=!!customElements.get(e),a&&console.warn(`Custom template of "${e}" already defined by customElements.`));const l=Pe(),c=null!==(n=null===(o=t.proxy)||void 0===o?void 0:o.properties)&&void 0!==n?n:{},u=[],d=[];for(const[t,n]of Object.entries(c))n.asVariable?(Me(l,"Template `asVariable`",e,t),l||d.push(t)):n.mergeProperty||n.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,t):n.ref&&u.push([t,n]);const f={...t,proxy:{...t.proxy,properties:Object.fromEntries(u)},state:(t.state?l?t.state:t.state.map((e=>({expose:!0,...e}))):[]).concat(d.map((e=>({name:e,expose:!0}))))};(0,s.A)(Be,this).set(e,{...f,name:e});const p=(g=f.state,(0,h.uniq)(null!==(m=null==g?void 0:g.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==m?m:[]));var g,m;const v=Object.entries(null!==(r=null===(i=f.proxy)||void 0===i?void 0:i.methods)&&void 0!==r?r:{}),b=p.concat(u.map((e=>e[0]))),y=v.map((e=>e[0])),w=b.concat(y).filter((e=>e in HTMLElement.prototype&&!xe.has(e)));if(w.length>0&&(Me(l,"Using native HTMLElement properties as template properties or methods",e,...w),l))throw new Error(`In custom template "${e}", ${w.map((e=>`"${e}"`)).join(", ")} are native HTMLElement properties, and should be avoid to be used as brick properties or methods.`);if(!a){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return b}static get _dev_only_definedMethods(){return y}$$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(){let e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));const t=document.createDocumentFragment(),n=document.createElement("style");n.textContent=":host{display:block}:host([hidden]){display:none}";const o=document.createElement("slot");t.appendChild(n),t.appendChild(o),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}for(const n of p)u.some((e=>e[0]===n))?console.error(`Cannot define an exposed state that is also a proxy property: "${n}" in ${e}`):Object.defineProperty(t.prototype,n,{get(){return this.$$tplStateStore.getValue(n)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(n,e,"replace")},enumerable:!0});for(const[e,n]of u)Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(n.ref)[null!==(t=n.refProperty)&&void 0!==t?t:e]},set(t){var o;const r=null===(o=this.$$getElementByRef)||void 0===o?void 0:o.call(this,n.ref);var i;r&&(r[null!==(i=n.refProperty)&&void 0!==i?i:e]=t)},enumerable:!0});for(const[e,n]of v)Object.defineProperty(t.prototype,e,{value(){var t;return this.$$getElementByRef(n.ref)[null!==(t=n.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0});customElements.define(e,t)}}get(e){return(0,s.A)(Be,this).get(e)}clearIsolatedRegistry(){(0,s.A)(Le,this)&&(0,s.A)(Be,this).clear()}}const Ne=function(){const e=S();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomTemplate(t,n)})}()||new $e,Ue=new Map;function Fe(e,t,n){let{tplStateStoreId:o,tplStateStoreMap:r}=e;if(!o)throw new Error(`Using "${t}" outside of a custom template${null!=n?n:""}`);const i=r.get(o);if(!i)throw new Error(`Template state store is not found when using "${t}"${null!=n?n:""}.\nThis is a bug of Brick Next, please report it.`);return i}function De(e,t,n){const o=Fe(e,t,n).hostBrick.element;if(!o)throw new Error(`Template host element is gone when using "${t}"${null!=n?n:""}.\nThis is a bug of Brick Next, please report it.`);return o}const je=new Map,Ke=new Proxy(Object.freeze({}),{get:(e,t)=>je.get(t)}),Ve=function(){const e=S();if(e)return function(t,n,o){return e.getRuntime().registerWidgetFunctions(t,n,o)}}()||function(e,t,n){if(je.has(e))throw new Error(`Widget functions of "${e}" already registered`);const{storyboardFunctions:o,registerStoryboardFunctions:r}=ve({widgetId:e,widgetVersion:n});je.set(e,o),r(t)},We=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,ze=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(We);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Ge=e=>"*"===e||"x"===e||"X"===e,He=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},qe=(e,t)=>{if(Ge(e)||Ge(t))return 0;const[n,o]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(He(e),He(t));return n>o?1:n<o?-1:0},Xe=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const o=qe(e[n]||"0",t[n]||"0");if(0!==o)return o}return 0},Ye=(e,t,n)=>{Ze(n);const o=((e,t)=>{const n=ze(e),o=ze(t),r=n.pop(),i=o.pop(),a=Xe(n,o);return 0!==a?a:r&&i?Xe(r.split("."),i.split(".")):r||i?r?-1:1:0})(e,t);return Je[n].includes(o)},Je={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Qe=Object.keys(Je),Ze=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===Qe.indexOf(e))throw new Error(`Invalid operator, expected one of ${Qe.join("|")}`)};function et(e,t){let n=Di(e);if(!n&&null!=Oi&&Oi.checkInstalledApps&&(n=Oi.checkInstalledApps.getCheckedApp(e)),!n||"running"===n.installStatus)return!1;if(!t||!n.currentVersion)return!0;const o=t.match(/^([><]=?|=)(.*)$/);try{if(!o)throw new TypeError(`Invalid match version: ${t}`);return Ye(n.currentVersion,o[2],o[1])}catch(e){console.error(e)}return!1}function tt(e,t,n){let{formStateStoreId:o,formStateStoreMap:r}=e;if(!o)throw new Error(`Using "${t}" outside of form renderer${null!=n?n:""}`);const i=r.get(o);if(!i)throw new Error(`Form state store is not found when using "${t}"${null!=n?n:""}.\nThis is a bug of Brick Next, please report it.`);return i}const nt=new Map;async function ot(e){var t;const n=null==Oi||null===(t=Oi.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);n&&(e=Oi.flowApi.FLOW_API_PROVIDER);let o=nt.get(e);if(o)return o;if(e.includes("-")&&!customElements.get(e))if(n)Oi.flowApi.registerFlowApiProvider();else if(await(0,c.loadBricksImperatively)([e],Li()),!customElements.get(e))throw new Error(`Provider not defined: "${e}".`);return o=document.createElement(e),nt.set(e,o),o}let rt=new WeakSet;function it(e){if((0,u.isObject)(e)&&!at(e))if(rt.add(e),Array.isArray(e))e.forEach(it);else{const t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(it)}}function at(e){return rt.has(e)}const st=new Map;async function lt(e,t,n){var o;const{useProvider:r,method:i="resolve",args:a,params:s,options:l,filename:c,onReject:u}=e,{provider:d,field:f}=e;if(d&&!r)throw new Error(`You're using "provider: ${d}" which is dropped in v3, please use "useProvider" instead`);const p=null!=f;if(p){const e=Pe();if(Me(e,"`resolve.field`"),e)throw new Error("Using deprecated `resolve.field`")}const g=!Array.isArray(a)&&s&&null!=Oi&&null!==(o=Oi.flowApi)&&void 0!==o&&o.isFlowApiProvider(r)?{params:s,options:l,filename:c}:null,[m,v,b]=await Promise.all([ot(r),At(a,t),At(g,t)]),y=null==n?void 0:n.renderId,w=!!y&&y!==Ni(),E=ct(m,r,i,null!=b&&b.params?b:null!=v?v:[],n,a,w);let S,{transform:A}=e;try{const e=await E;S=p?(0,h.get)(e,f):e,it(S)}catch(e){if(!function(e){return!(null==e||!e.transform)}(u))throw e;A=u.transform,S=e}return A?"string"==typeof A?{[A]:S}:At(A,{...t,data:S}):S}async function ct(e,t,n,o,r,i,a){let s,l;try{s=JSON.stringify({useProvider:t,method:n,args:o})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:n,originalArgs:i})}return"reload"!==(null==r?void 0:r.cache)&&(l=st.get(s)),l||(l=(async r=>{const i=null!=Oi&&null!==(r=Oi.flowApi)&&void 0!==r&&r.isFlowApiProvider(t)?await Oi.flowApi.getArgsOfFlowApi(t,o,n):o;return e[n](...i)})(),a||st.set(s,l)),l}const ut=Symbol.for("pre.evaluated.raw"),dt=Symbol.for("pre.evaluated.context");function ft(e){return!(null==e||!e[ut])}function pt(e){return e[ut]}function ht(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[ut])}const gt=new WeakSet([SyntaxError,TypeError,ReferenceError]);function mt(e){return gt.has(e.constructor)?e.constructor:TypeError}function vt(e,t,n){const{run:o}=bt(e,t,n,!1);return o()}function bt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;const r=[];if("string"!=typeof e){const n=(0,h.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t={...e[dt],...n},e=e[ut]}const i={usedArgs:new Set},a={usedArgs:new Set};let s;try{s=(0,T.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,O.collectAppGetMenuUsage)(i,e,t),(0,O.collectInstalledAppsHasUsage)(a,e,t)}}})}catch(t){const n=`${t.message}, in "${e}"`;throw new(mt(t))(n)}if(i.hasNonStaticUsage)throw new Error(`Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "${e}"`);if(a.hasNonStaticUsage)throw new Error(`Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "${e}"`);const l={},{attemptToVisitGlobals:d}=s;if(n.lazy||d.has("EVENT")&&!(0,u.hasOwnProperty)(t,"event")||d.has("DATA")&&!(0,u.hasOwnProperty)(t,"data"))return{blockingList:r,run:()=>Object.keys(t).length>0?{[ut]:e,[dt]:t}:e};let f,p,g,m;const v=Pe(t);let b,y;(d.has("STATE")||!v&&d.has("TPL"))&&(m=Fe(t,"STATE",`: "${e}"`)),d.has("FORM_STATE")&&(y=tt(t,"FORM_STATE",`: "${e}"`));const w=W();if(o||w){if(d.has("CTX")&&(f=(0,O.strictCollectMemberUsage)(e,"CTX"),o&&r.push(t.ctxStore.waitFor(f))),m){if(g=(0,O.strictCollectMemberUsage)(e,"STATE"),!v){const t=(0,O.strictCollectMemberUsage)(e,"TPL");for(const e of t)g.add(e)}o&&r.push(m.waitFor(g))}y&&(b=(0,O.strictCollectMemberUsage)(e,"FORM_STATE"),o&&r.push(y.waitFor(b))),d.has("PROCESSORS")&&(p=(0,O.strictCollectMemberUsage)(e,"PROCESSORS",2),o&&r.push((0,c.loadProcessorsImperatively)(p,Li())))}if(o){let n=d.has("PERMISSIONS");if(!n&&d.has("FN")){const t=[...(0,O.strictCollectMemberUsage)(e,"FN")];n=we(t)}if(n&&r.push(...t.pendingPermissionsPreCheck),i.usedArgs.size>0&&null!=Oi&&Oi.menu){const e=[...i.usedArgs];r.push(Promise.all(e.map((e=>Oi.menu.fetchMenuById(e,t,{getStoryboardByAppId:Fi,resolveData:lt,asyncComputeRealValue:At})))))}var E;a.usedArgs.size>0&&r.push(null==Oi||null===(E=Oi.checkInstalledApps)||void 0===E?void 0:E.waitForCheckingApps([...a.usedArgs]))}return{blockingList:r,run(){var n,o,r,i;const{ctxStore:a,data:c,event:w,unsafe_penetrate:E}=t,S=E?Ui():t,{app:A,location:k,query:I,match:C,flags:R,sys:O}=S,_=null!==(n=S.overrideApp)&&void 0!==n?n:A;for(const n of d)switch(n){case"ANCHOR":l[n]=k.hash?k.hash.substring(1):null;break;case"APP":if(null==_)throw new ReferenceError(`APP is not defined, in "${e}"`);l[n]={...(0,h.cloneDeep)(_),getMenu:null==Oi||null===(o=Oi.menu)||void 0===o?void 0:o.getMenuById};break;case"CTX":l[n]=q({get(e,t){if("DS"===t&&!a.has(t)){var n;const e=null===(n=Ui())||void 0===n?void 0:n.ctxStore;if(null!=e&&e.has(t))return e.getValue(t)}return a.getValue(t)},ownKeys:()=>f?Array.from(f):[]});break;case"DATA":l[n]=c;break;case"EVENT":l[n]=w;break;case"FLAGS":l[n]=H(R);break;case"FORM_STATE":l[n]=q({get:(e,t)=>y.getValue(t),ownKeys:()=>Array.from(b)});break;case"HASH":l[n]=k.hash;break;case"INSTALLED_APPS":l[n]=H({has:et});break;case"ITEM":case"INDEX":case"SIZE":{const o="ITEM"===n?"forEachItem":"INDEX"===n?"forEachIndex":"forEachSize";(0,u.hasOwnProperty)(t,o)?l[n]=t[o]:console.error(`Using \`${n}\` but no \`:forEach\` is found, check your expression: "${e}"`);break}case"LOCAL_STORAGE":l[n]=H({getItem:_e("local")});break;case"MEDIA":l[n]=H(Oe());break;case"MISC":l[n]=Pi().getMiscSettings();break;case"PARAMS":if(null==I)throw new ReferenceError(`PARAMS is not defined, in "${e}"`);l[n]=new URLSearchParams(I);break;case"PATH":l[n]=H(null!==(r=null==C?void 0:C.params)&&void 0!==r?r:{});break;case"PATH_NAME":l[n]=k.pathname;break;case"PROCESSORS":l[n]=q({get(e,t){const n=x.get(t);if(!n)throw new Error(`'PROCESSORS.${t}' is not registered! Have you installed the relevant brick package?`);return q({get:(e,t)=>n.get(t),ownKeys:()=>Array.from(n.keys())})},ownKeys(){const e=new Set;for(const t of p){const n=t.split(".")[0];e.add(n)}return Array.from(e)}});break;case"QUERY":if(null==I)throw new ReferenceError(`QUERY is not defined, in "${e}"`);l[n]=Object.fromEntries(Array.from(I.keys()).map((e=>[e,I.get(e)])));break;case"QUERY_ARRAY":if(null==I)throw new ReferenceError(`QUERY_ARRAY is not defined, in "${e}"`);l[n]=Object.fromEntries(Array.from(I.keys()).map((e=>[e,I.getAll(e)])));break;case"SESSION_STORAGE":l[n]=H({getItem:_e("session")});break;case"TPL":if(Me(v,'Using "TPL" in expression',`check your expression: "${e}"`),v)break;case"STATE":l[n]=q({get:(e,t)=>m.getValue(t),ownKeys:()=>Array.from(g)});break;case"SYS":l[n]=H(null!=O?O:{});break;case"__WIDGET_FN__":l[n]=Ke;break;case"__WIDGET_IMG__":l[n]=null==Oi||null===(i=Oi.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":l[n]=$}Object.assign(l,pe(s.attemptToVisitGlobals,{storyboardFunctions:be,app:_,appendI18nNamespace:t.appendI18nNamespace,isolatedRoot:t.isolatedRoot}));try{const t=(0,T.cook)(s.expression,s.source,{globalVariables:(0,P.supply)(s.attemptToVisitGlobals,l)});return V("evaluation",{raw:e,context:l,result:t}),t}catch(t){const n=`${t.message}, in "${e}"`;throw new(mt(t))(n)}}}}let yt=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 wt(e){switch(e){case yt.USE_BRICK_PROPERTIES:case yt.USE_BRICK_TRANSFORM:case yt.USE_BRICK_EVENTS:case yt.USE_BRICK_IF:case yt.USE_BRICK_LIFECYCLE:case yt.USE_BRICK_DATA_SOURCE:return!0}return!1}function Et(e,t,n){if(wt(e))return e;if(t)switch(e){case yt.USE_BRICK:return yt.USE_BRICK_ITEM;case yt.USE_BRICK_SLOTS_ITEM_BRICKS:return yt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case yt.INITIAL:if("useBrick"===n)return yt.USE_BRICK;break;case yt.USE_BRICK:case yt.USE_BRICK_ITEM:case yt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(n){case"properties":return yt.USE_BRICK_PROPERTIES;case"transform":return yt.USE_BRICK_TRANSFORM;case"dataSource":return yt.USE_BRICK_DATA_SOURCE;case"events":return yt.USE_BRICK_EVENTS;case"slots":return yt.USE_BRICK_SLOTS;case"children":return yt.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return yt.USE_BRICK_IF;case"lifeCycle":return yt.USE_BRICK_LIFECYCLE}break;case yt.USE_BRICK_SLOTS:return yt.USE_BRICK_SLOTS_ITEM;case yt.USE_BRICK_SLOTS_ITEM:if("bricks"===n)return yt.USE_BRICK_SLOTS_ITEM_BRICKS}return yt.INITIAL}const St=["app","location","query","match","flags","sys"];async function At(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=ft(e);if(o||"string"==typeof e){const r=n.$$lazyForUseBrick&&wt(n.$$stateOfUseBrick);let i,a=r;if(o||(0,T.isEvaluable)(e))i=await async function(e,t,n){const{blockingList:o,run:r}=bt(e,t,n,!0);return await Promise.all(o),r()}(e,t,{lazy:r}),a=ht(e);else if(r)i=e;else{const o=t.unsafe_penetrate?{...(0,h.pick)(Ui(),St),...(0,h.omit)(t,St)}:t;i=((0,u.hasOwnProperty)(o,"data")?n.noInject?_.transform:_.transformAndInject:n.noInject?Ct:_.inject)(e,o)}return a||it(i),i}if(!(0,u.isObject)(e)||at(e)||"function"==typeof e)return e;if(Array.isArray(e)){const o=It(n,!0);return Promise.all(e.map((e=>At(e,t,o))))}return Object.fromEntries((await Promise.all(Object.entries(e).map((e=>{let[o,r]=e;return Promise.all([At(o,t),At(r,t,It(n,!1,o))])})))).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function kt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=ft(e);if(o||"string"==typeof e){const r=n.$$lazyForUseBrick&&wt(n.$$stateOfUseBrick);let i,a=r;if(o||(0,T.isEvaluable)(e))i=vt(e,t),a=ht(e);else if(r)i=e;else{const o=t.unsafe_penetrate?{...(0,h.pick)(Ui(),St),...(0,h.omit)(t,St)}:t;i=((0,u.hasOwnProperty)(o,"data")?n.noInject?_.transform:_.transformAndInject:n.noInject?Ct:_.inject)(e,o)}return a||it(i),i}if(!(0,u.isObject)(e)||at(e)||"function"==typeof e)return e;if(Array.isArray(e)){const o=It(n,!0);return e.map((e=>kt(e,t,o)))}return Object.fromEntries(Object.entries(e).map((e=>{let[o,r]=e;return[kt(o,t),kt(r,t,It(n,!1,o))]})).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function It(e,t,n){return e.$$lazyForUseBrick?{...e,$$stateOfUseBrick:Et(e.$$stateOfUseBrick,t,n)}:e}function Ct(e){return e}async function Rt(e,t){return!(0,u.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||ft(e.if)?await At(e.if,t):e.if)}function Tt(e,t){return!(0,u.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||ft(e.if)?kt(e.if,t):e.if)}function Ot(e){return!(0,u.hasOwnProperty)(e,"if")||!!e.if}const _t=function(){const e=S();if(e)return e.looseCheckIfByTransform}()||function(e,t){return Tt(e,{data:t})};function Pt(e){let t=!1,n=!1,o=!1;if("string"==typeof e?(0,T.isEvaluable)(e):ft(e)){const r="string"==typeof e?e:pt(e);if((0,T.isTrackAll)(r)){const e=(0,O.trackAll)(r);e&&(t=e.context,n=e.state,o=e.formState)}else t=(0,O.track)(r,"track context","CTX"),n=(0,O.track)(r,"track state","STATE"),o=(0,O.track)(r,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:n,formStateNames:o}}async function Mt(e,t){for(const[n,o,r]of e)if(n===t){const e=await o;if(void 0!==e||!r)return e}}async function xt(e){const t={};for(const[n,o,r]of e){const e=await o;void 0===e&&r||!("style"!==n&&"dataset"!==n||(0,u.isObject)(e))||(t[n]=e)}return t}function Bt(e,t){if(t)for(const[i,a]of Object.entries(t))switch(i){case"style":case"dataset":for(const[t,s]of Object.entries(a))"style"===i?(n=e.style,r=s,(o=t).startsWith("--")?n.setProperty(o,r):"float"===o?n.cssFloat=r:n[o]=r):e[i][t]=s;break;case"constructor":case"__proto__":case"innerHTML":throw new Error(`set \`${i}\` is prohibited`);default:e[i]=a}var n,o,r}function Lt(e,t,n){const o=function(e,t){return(0,u.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[n,o]=e;const r=kt(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?yt.USE_BRICK:yt.INITIAL});if("style"!==n&&"dataset"!==n||(0,u.isObject)(r))return[n,r]})).filter(Boolean)):{}}(t,n);Array.isArray(e)||(e=[e]),e.forEach((e=>{Bt(e,o)}))}function $t(e,t,n){if(n)for(const{contextNames:o,stateNames:r,propValue:i}of t){if(o)for(const t of o)n.disposes.push(e.ctxStore.onChange(t,n.listener));if(r)for(const t of r){const o=Fe(e,"STATE",`: "${i}"`);n.disposes.push(o.onChange(t,n.listener))}}}function Nt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ut(e){return e&&e.sensitive?"":"i"}function Ft(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var o=n.strict,r=void 0!==o&&o,i=n.start,a=void 0===i||i,s=n.end,l=void 0===s||s,c=n.encode,u=void 0===c?function(e){return e}:c,d=n.delimiter,f=void 0===d?"/#?":d,p=n.endsWith,h="[".concat(Nt(void 0===p?"":p),"]|$"),g="[".concat(Nt(f),"]"),m=a?"^":"",v=0,b=e;v<b.length;v++){var y=b[v];if("string"==typeof y)m+=Nt(u(y));else{var w=Nt(u(y.prefix)),E=Nt(u(y.suffix));if(y.pattern)if(t&&t.push(y),w||E)if("+"===y.modifier||"*"===y.modifier){var S="*"===y.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(y.pattern,")(?:").concat(E).concat(w,"(?:").concat(y.pattern,"))*)").concat(E,")").concat(S)}else m+="(?:".concat(w,"(").concat(y.pattern,")").concat(E,")").concat(y.modifier);else{if("+"===y.modifier||"*"===y.modifier)throw new TypeError('Can not repeat "'.concat(y.name,'" without a prefix and suffix'));m+="(".concat(y.pattern,")").concat(y.modifier)}else m+="(?:".concat(w).concat(E,")").concat(y.modifier)}}if(l)r||(m+="".concat(g,"?")),m+=n.endsWith?"(?=".concat(h,")"):"$";else{var A=e[e.length-1],k="string"==typeof A?g.indexOf(A[A.length-1])>-1:void 0===A;r||(m+="(?:".concat(g,"(?=").concat(h,"))?")),k||(m+="(?=".concat(g,"|").concat(h,")"))}return new RegExp(m,Ut(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var o=e[n];if("*"!==o&&"+"!==o&&"?"!==o)if("\\"!==o)if("{"!==o)if("}"!==o)if(":"!==o)if("("!==o)t.push({type:"CHAR",index:n,value:e[n++]});else{var r=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--r){s++;break}}else if("("===e[s]&&(r++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));i+=e[s++]}else i+=e[s++]+e[s++];if(r)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=t.prefixes,r=void 0===o?"./":o,i=t.delimiter,a=void 0===i?"/#?":i,s=[],l=0,c=0,u="",d=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},f=function(e){var t=d(e);if(void 0!==t)return t;var o=n[c],r=o.type,i=o.index;throw new TypeError("Unexpected ".concat(r," at ").concat(i,", expected ").concat(e))},p=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t},h=function(e){var t=s[s.length-1],n=e||(t&&"string"==typeof t?t:"");if(t&&!n)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!n||function(e){for(var t=0,n=a;t<n.length;t++){var o=n[t];if(e.indexOf(o)>-1)return!0}return!1}(n)?"[^".concat(Nt(a),"]+?"):"(?:(?!".concat(Nt(n),")[^").concat(Nt(a),"])+?")};c<n.length;){var g=d("CHAR"),m=d("NAME"),v=d("PATTERN");if(m||v){var b=g||"";-1===r.indexOf(b)&&(u+=b,b=""),u&&(s.push(u),u=""),s.push({name:m||l++,prefix:b,suffix:"",pattern:v||h(b),modifier:d("MODIFIER")||""})}else{var y=g||d("ESCAPED_CHAR");if(y)u+=y;else if(u&&(s.push(u),u=""),d("OPEN")){b=p();var w=d("NAME")||"",E=d("PATTERN")||"",S=p();f("CLOSE"),s.push({name:w||(E?l++:""),pattern:w&&!E?h(b):E,prefix:b,suffix:S,modifier:d("MODIFIER")||""})}else f("END")}}return s}(e,n),t,n)}function Dt(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,o=0,r=n.exec(e.source);r;)t.push({name:r[1]||o++,prefix:"",suffix:"",modifier:"",pattern:""}),r=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var o=e.map((function(e){return Dt(e,t,n).source}));return new RegExp("(?:".concat(o.join("|"),")"),Ut(n))}(e,t,n):Ft(e,t,n)}const jt=new Map,Kt=1e4;let Vt=0;function Wt(e,t){const{path:n,exact:o=!1,strict:r=!1,sensitive:i=!0}=t;return(Array.isArray(n)?n:[n]).reduce(((t,n)=>{if(t)return t;const{regexp:a,keys:s}=function(e,t){const n=`${t.end}${t.strict}${t.sensitive}`;let o=jt.get(n);o||jt.set(n,o=new Map);const r=o.get(e);if(r)return r;const i=[],a={regexp:Dt(e,i,t),keys:i};return Vt<Kt&&(o.set(e,a),Vt++),a}(n,{end:o,strict:r,sensitive:i}),l=a.exec(e);if(!l)return null;const[c,...u]=l,d=e===c;return o&&!d?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:d,params:s.reduce(((e,t,n)=>(e[t.name]=u[n],e)),{})}}),null)}function zt(e,t,n){return Wt(n,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}const Gt=Symbol.for("tpl.asyncComputedPropsFromHost"),Ht=Symbol.for("tpl.stateStoreId"),qt=Symbol.for("tpl.externalForEachItem"),Xt=Symbol.for("tpl.externalForEachIndex"),Yt=Symbol.for("tpl.externalForEachSize"),Jt=new Set;let Qt=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.LICENSE_EXPIRED="LICENSE_EXPIRED",e.LICENSE_BLOCKED="LICENSE_BLOCKED",e.NO_PERMISSION="NO_PERMISSION",e.PAGE_NOT_FOUND="PAGE_NOT_FOUND",e.APP_NOT_FOUND="APP_NOT_FOUND",e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.GO_BACK_TO_PREVIOUS_PAGE="GO_BACK_TO_PREVIOUS_PAGE",e.GO_BACK_HOME="GO_BACK_HOME",e.RELOAD="RELOAD",e}({});const Zt={[Qt.REQUEST_FAILED]:"Request Failed",[Qt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Qt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Qt.NETWORK_ERROR]:"Network error, please check your network.",[Qt.LICENSE_EXPIRED]:"The license authorization has expired, please contact the platform administrator",[Qt.LICENSE_BLOCKED]:"The page is not authorized, please contact the platform administrator",[Qt.NO_PERMISSION]:"Unauthorized access, unable to retrieve the required resources for this page",[Qt.PAGE_NOT_FOUND]:"Page not found, please check the URL",[Qt.APP_NOT_FOUND]:"App not found, maybe the URL is wrong or you don't have permission to access",[Qt.UNKNOWN_ERROR]:"Oops! Something went wrong",[Qt.GO_BACK_TO_PREVIOUS_PAGE]:"Go back to previous page",[Qt.GO_BACK_HOME]:"Go back to home page",[Qt.RELOAD]:"Reload"},en={[Qt.REQUEST_FAILED]:"请求失败",[Qt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Qt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Qt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。",[Qt.LICENSE_EXPIRED]:"License 授权失效,请联系平台管理员",[Qt.LICENSE_BLOCKED]:"该页面未授权,请联系平台管理员",[Qt.NO_PERMISSION]:"没有权限,无法获取页面所需要的资源",[Qt.PAGE_NOT_FOUND]:"请求的页面未找到,请确认 URL 是否正确",[Qt.APP_NOT_FOUND]:"请求的微应用无法找到, 可能是 URL 错误或者无权限访问",[Qt.UNKNOWN_ERROR]:"糟糕!页面出现了一些问题",[Qt.GO_BACK_TO_PREVIOUS_PAGE]:"回到上一页",[Qt.GO_BACK_HOME]:"回到首页",[Qt.RELOAD]:"刷新"},tn="core/runtime",nn={en:Zt,zh:en};let on;const rn=Object.freeze({show:function(e){if(on)return on.resolve(e);if("confirm"===e.type){const t=confirm(e.content);return new Promise(((e,n)=>setTimeout((()=>{(t?e:n)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function an(e){const{search:t,pathname:n}=e,o=n?window.btoa(encodeURIComponent(n)):"",r=t?window.btoa(encodeURIComponent(t)):"";document.cookie=`SALOGINPATH=${o}; path=/`,document.cookie=`SALOGINQUERY=${r}; path=/`}function sn(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof R.HttpFetchError)return l.i18n.t(`${tn}:${Qt.NETWORK_ERROR}`);if(e instanceof R.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 ln(e){return e instanceof R.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}let cn,un,dn=!1;function fn(e){if(e instanceof R.HttpAbortError)return;if(ln(e)&&!window.NO_AUTH_GUARD){if(dn)return;return dn=!0,void rn.show({type:"confirm",content:l.i18n.t(`${tn}:${Qt.LOGIN_TIMEOUT_MESSAGE}`)}).then((()=>{!function(){const e=Pi().getFeatureFlags()["sso-enabled"],t=k();an(t.location),t.push(e?"/sso-auth/login":"/auth/login",{from:{...t.location,state:void 0}})}(),dn=!1}),(()=>{dn=!1}))}console.error(e);const t=sn(e);t!==cn&&(cn=t,rn.show({type:"error",title:l.i18n.t(`${tn}:${Qt.REQUEST_FAILED}`),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{cn=void 0})))}const pn=Object.freeze({show:function(e){un?un.resolve(e):alert(e.message)}});class hn{static getInstance(){return hn.instance||(hn.instance=new hn),hn.instance}constructor(){(0,r.A)(this,"debugMode",!1),(0,r.A)(this,"debugType","none"),this.initDebugMode(),this.setupWindowAPI()}initDebugMode(){if("true"!==new URLSearchParams(window.location.search).get("__debugConsole__"))return"true"===localStorage.getItem("debugConsole")?(this.debugMode=!0,this.debugType="persistent",void console.log("🔧 调试模式已开启(持久模式 - 内部调试)")):"true"===sessionStorage.getItem("debugConsole")?(this.debugMode=!0,this.debugType="session",void console.log("🔧 调试模式已开启(会话模式 - 关闭标签页后失效)")):void 0;this.activateSessionDebug()}activateSessionDebug(){this.debugMode=!0,this.debugType="session",sessionStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已通过URL参数激活(会话模式)")}setupWindowAPI(){window.debugConsole={enable:()=>(this.debugMode=!0,this.debugType="session",sessionStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(会话模式 - 关闭标签页后失效)"),this.debugMode),enablePersistent:()=>(this.debugMode=!0,this.debugType="persistent",localStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(持久模式 - 内部调试)"),this.debugMode),disable:()=>(this.debugMode=!1,this.debugType="none",sessionStorage.removeItem("debugConsole"),localStorage.removeItem("debugConsole"),console.log("🔧 调试模式已关闭"),this.debugMode),toggle:()=>(this.debugMode?(this.debugMode=!1,this.debugType="none",sessionStorage.removeItem("debugConsole"),localStorage.removeItem("debugConsole"),console.log("🔧 调试模式已关闭")):(this.debugMode=!0,this.debugType="session",sessionStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(会话模式 - 关闭标签页后失效)")),this.debugMode),togglePersistent:()=>(this.debugMode&&"persistent"===this.debugType?(this.debugMode=!1,this.debugType="none",sessionStorage.removeItem("debugConsole"),localStorage.removeItem("debugConsole"),console.log("🔧 调试模式已关闭")):(this.debugMode=!0,this.debugType="persistent",localStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(持久模式 - 内部调试)")),this.debugMode),status:()=>{const e={debugMode:this.debugMode,debugType:this.debugType,description:this.getStatusDescription()};return console.log("🔧 调试状态:",e),e},help:()=>{console.log("\n🔧 混合调试控制台使用说明:\n\n👥 生产环境使用(临时调试):\n window.debugConsole.enable() - 开启会话调试(关闭标签页后失效)\n window.debugConsole.disable() - 关闭调试模式\n window.debugConsole.toggle() - 切换会话调试模式\n\n👨💻 开发人员使用(长期调试):\n window.debugConsole.enablePersistent() - 开启持久调试(长期有效)\n window.debugConsole.togglePersistent() - 切换持久调试模式\n window.debugConsole.disable() - 关闭调试模式\n\n🔍 其他功能:\n window.debugConsole.status() - 查看当前状态\n window.debugConsole.help() - 显示此帮助信息\n\n🌐 URL参数:\n ?__debugConsole__=true - 通过URL激活会话调试模式\n\n📝 说明:\n - 会话模式:刷新页面后仍然有效,关闭标签页后失效\n - 持久模式:长期有效,除非手动关闭\n ")}},this.debugMode?console.log(`🔧 调试模式已开启(${"persistent"===this.debugType?"持久模式":"会话模式"})`):console.log("💡 提示:使用 window.debugConsole.help() 查看使用说明")}getStatusDescription(){if(!this.debugMode)return"调试模式已关闭";switch(this.debugType){case"persistent":return"持久模式 - 内部调试(长期有效)";case"session":return"会话模式 - 临时调试(关闭标签页后失效)";default:return"未知模式"}}isDebugMode(){return this.debugMode}getDebugType(){return this.debugType}shouldLog(e){return"error"===e||this.debugMode}}(0,r.A)(hn,"instance",void 0);const gn=hn.getInstance();function mn(e,t,n){t&&Object.entries(t).forEach((t=>{let[o,r]=t;const i=En(r,n,{element:e});e.addEventListener(o,i),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([o,i]),e.$$eventListeners||(e.$$eventListeners=[]);for(const t of[].concat(r))e.$$eventListeners.push([o,null,t])}))}function vn(e){return"string"==typeof e.action}function bn(e){return"string"==typeof e.useProvider}function yn(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function wn(e){return!!e.then}function En(e,t,n){return function(o){var r,i;for(const a of[].concat(e))if(Tt(a,{...t,event:o}))if(wn(a))En(a.then,t,n)(o);else if(vn(a)){const[e,s]=a.action.split(".");switch(a.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":In(o,s,a.args,a.callback,t);break;case"window.open":Cn(o,a.args,t);break;case"window.postMessage":Rn(o,a.args,t);break;case"parent.postMessage":Tn(o,a.args,t);break;case"location.reload":case"location.assign":xn(o,s,a.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Bn(o,e,s,a.args,t);break;case"event.preventDefault":o.preventDefault();break;case"event.stopPropagation":o.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":Ln(o,s,a.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":$n(o,s,a.args,t);break;case"handleHttpError":fn(o.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":case"context.set":_n(o,s,a.args,null===(r=a.batch)||void 0===r||r,a.callback,t);break;case"state.update":case"state.refresh":case"state.load":case"state.set":Pn(o,s,a.args,null===(i=a.batch)||void 0===i||i,a.callback,t);break;case"tpl.dispatchEvent":{const[e,n]=Fn(a.args,t,o);De(t,a.action,`: ${e}`).dispatchEvent(new CustomEvent(e,n));break}case"formstate.update":Mn(o,a.args,a.callback,t);break;case"message.subscribe":case"message.unsubscribe":Nn(o,s,a.args,t,n,a.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===a.action?"dark":"light");break;case"theme.setTheme":{const[e]=Fn(a.args,t,o);te(e);break}case"mode.setDashboardMode":case"mode.setDefaultMode":se("mode.setDashboardMode"===a.action?"dashboard":"default");break;default:console.error("unknown event listener action:",a.action)}}else bn(a)?Sn(o,a,t,n):yn(a)?An(o,a,t,n):console.error("unknown event handler:",a);else a.else&&En(a.else,t,n)(o)}}function Sn(e,t,n,o){const r="saveAs"!==t.method?"resolve":"saveAs";kn(e,t.useProvider,t,r,n,o)}function An(e,t,n,o){let r=[];const i=t.target,a=t.targetRef;let s=i;if(("string"==typeof i?(0,T.isEvaluable)(i):ft(i))&&(s=kt(i,{...n,event:e})),"string"==typeof s)if("_self"===s)r.push(o.element);else if(t.multiple)r=Array.from(document.querySelectorAll(s));else{const e=document.querySelector(s);null!==e&&r.push(e)}else if(s)s instanceof HTMLElement?r.push(s):console.error("unexpected target:",s);else if(a){let t=a;("string"==typeof a?(0,T.isEvaluable)(a):ft(a))&&(t=kt(a,{...n,event:e}));const o=[].concat(t),i=De(n,"targetRef",`: ${o.join(", ")}`);r.push(...o.map((e=>{var t;return null===(t=i.$$getElementByRef)||void 0===t?void 0:t.call(i,e)})).filter(Boolean))}0!==r.length?function(e){return!!e.method}(t)?r.forEach((r=>{kn(e,r,t,t.method,n,o,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Lt(r,t.properties,{...n,event:e}):console.error("target not found:",i||a)}async function kn(e,t,n,o,r,i,a){const s=bn(n),l=async()=>{var i;const l=s?await ot(t):t;if("function"!=typeof l[o])throw new Error(`target <${l.tagName.toLowerCase()}> has no method: ${o}`);const c=bn(n);let u,d=c?function(e,t,n){return Array.isArray(e)?kt(e,{...t,event:n}):e}(n.args,r,e):Fn(n.args,r,e,a);var f;return c&&null!=Oi&&null!==(i=Oi.flowApi)&&void 0!==i&&i.isFlowApiProvider(n.useProvider)?(!Array.isArray(n.args)&&n.params&&(d=kt((0,h.pick)(n,"params","options","filename"),{...r,event:e})),u=await Oi.flowApi.getArgsOfFlowApi(n.useProvider,null!=d?d:[],o,null===(f=n.sse)||void 0===f?void 0:f.stream)):u=null!=d?d:[],l[o](...u)};if(!n.callback)return void l();const c=Un(n.callback,r,i),u={progress:c("progress"),success:c("success"),error:c("error"),finally:c("finally")};if(s){var d,f;const t={...r,event:e};if(kt(null===(d=n.sse)||void 0===d?void 0:d.stream,t))return void async function(e,t){let{progress:n,success:o,error:r,finally:i}=t;const a=Ni();try{const t=await e();for await(const e of t){if(a!==Ni())return;null==n||n(e)}if(a!==Ni())return;null==o||o()}catch(e){if(a!==Ni())return;null==r||r(e)}finally{null==i||i()}}(l,u);if(kt(null===(f=n.poll)||void 0===f?void 0:f.enabled,t))return void function(e,t,n,o){let{progress:r,success:i,error:a,finally:s}=t;const{expectPollStopImmediately:l,expectPollEnd:c}=n,{interval:u,leadingRequestDelay:d,continueOnError:f,delegateLoadingBar:p}=kt((0,h.pick)(n,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),o),g=Ni();let m;async function v(){let t;Jt.delete(m);try{var n;if(t=null===(n=kt(l,o))||void 0===n?void 0:n(),t)null==s||s();else{var d;const n=await e(),a=null===(d=kt(l,o))||void 0===d?void 0:d();var h;t=a||g!==Ni(),t?a&&(null==s||s()):(null==r||r(n),null!==(h=kt(c,o))&&void 0!==h&&h(n)?(p&&window.dispatchEvent(new Event("request.end")),null==i||i(n),null==s||s()):b(null!=u?u:3e3))}}catch(e){var v;const n=null===(v=kt(l,o))||void 0===v?void 0:v();t=n||g!==Ni(),t?n&&(null==s||s()):(null==a||a(e),f?b(null!=u?u:3e3):null==s||s())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}function b(e){m=setTimeout(v,e),Jt.add(m)}b(null!=d?d:0),p&&window.dispatchEvent(new Event("request.start"))}(l,u,n.poll,t)}try{const e=await l();u.success(e)}catch(e){u.error(e)}finally{u.finally()}}function In(e,t,n,o,r){let i=0,a=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":i=2,a=!0;break;case"reload":a=!0;break;case"block":i=1,s="setBlockMessage"}let l=[];if(i>0&&(l=Fn(n,r,e,{useEventDetailAsDefault:!0}),l.length=i),a&&o){const e=Un(o,r,void 0);l.push((t=>{e(t?"error":"success")({blocked:t}),e("finally")({blocked:t})}))}k()[s](...l)}function Cn(e,t,n){const[o,r,i]=Fn(t,n,e);window.open(o,r||"_self",i)}function Rn(e,t,n){const o=Fn(t,n,e);1===o.length&&o.push(location.origin),window.postMessage(...o)}function Tn(e,t,n){if(parent===window)throw new Error("parent is the window itself");const o=Fn(t,n,e);parent.postMessage(...o)}function On(e,t,n,o,r,i){t?o.updateValues(e,n,(e=>Fn(e,r,i)[0])):e.forEach((e=>{const{name:t,value:a}=Fn([e],r,i)[0];o.updateValue(t,a,n)}))}function _n(e,t,n,o,r,i){if(!Array.isArray(n)||!n.every(u.isObject)||"assign"!==t&&"replace"!==t){const[o,a]=Fn(n,i,e);i.ctxStore.updateValue(o,a,t,r,i)}else On(n,o,t,i.ctxStore,i,e)}function Pn(e,t,n,o,r,i){if(Array.isArray(n)&&n.every(u.isObject)&&"update"===t)On(n,o,"replace",Fe(i,`state.${t}`,`: ${JSON.stringify(n)}`),i,e);else{const[o,a]=Fn(n,i,e);Fe(i,`state.${t}`,`: ${o}`).updateValue(o,a,"update"===t?"replace":t,r,i)}}function Mn(e,t,n,o){const[r,i]=Fn(t,o,e);tt(o,"formstate.update",`: ${r}`).updateValue(r,i,"replace",n,o)}function xn(e,t,n,o){if("assign"===t){const[t]=Fn(n,o,e);location.assign(t)}else location[t]()}function Bn(e,t,n,o,r){const i="localStorage"===t?localStorage:sessionStorage,[a,s]=Fn(o,r,e);"setItem"===n?void 0!==s&&i.setItem(a,JSON.stringify(s)):i.removeItem(a)}function Ln(e,t,n,o){gn.shouldLog(t)&&console[t](...Fn(n,o,e,{useEventAsDefault:!0}))}function $n(e,t,n,o){const r=Fn(n,o,e,{useEventAsDefault:!0});pn.show({type:t,message:r[0]})}async function Nn(e,t,n,o,r,i){const a=()=>{var r;const i=Fn(n,o,e);return null==Oi||null===(r=Oi.messageDispatcher)||void 0===r?void 0:r[t](...i)};if(!i)return void a();const s=Un(i,o,r);try{const e=await a();s("success")(e)}catch(e){s("error")(e)}finally{s("finally")()}}function Un(e,t,n){return function(o){return function(r){const i=null==e?void 0:e[o];if(i)try{const e=new CustomEvent(`callback.${o}`,{detail:r});En(i,t,n)(e)}catch(e){console.error(e)}else"error"===o&&console.error("Unhandled callback error:",r)}}}function Fn(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?kt(e,{...t,event:n}):o.useEventAsDefault?[n]:o.useEventDetailAsDefault?[n.detail]:[]}function Dn(e){var t;const{ref:n,runtimeContext:o,element:r}=e;if(!n||!o.tplStateStoreId)return;const{hostBrick:i}=Fe(o,"bindTemplateProxy"),a=i.tplHostMetadata;a.internalBricksByRef.set(n,e);const s=null===(t=a.proxy)||void 0===t?void 0:t.events;if(s)for(const[e,t]of Object.entries(s))if(t.ref===n){var l,c,u;const n=t=>{t.bubbles&&t.stopPropagation(),i.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},o=null!==(l=t.refEvent)&&void 0!==l?l:e;r.addEventListener(o,n),null!==(u=(c=r).$$proxyListeners)&&void 0!==u||(c.$$proxyListeners=[]),r.$$proxyListeners.push([o,n])}}function jn(e){const{ref:t,runtimeContext:n,element:o}=e;if(null==n||!n.tplStateStoreId||!t)return;const{hostBrick:r}=Fe(n,"unbindTemplateProxy");r.tplHostMetadata.internalBricksByRef.delete(t);for(const[e,t]of null!==(i=o.$$proxyListeners)&&void 0!==i?i:[]){var i;o.removeEventListener(e,t)}delete o.$$proxyListeners}let Kn=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.ABSTRACT=3]="ABSTRACT",e}({});function Vn(e){e.replaceChildren()}function Wn(e,t){e.mounted=!0,window.DISABLE_REACT_FLUSH_SYNC=!1;let n=e.child;const o=[];for(;n;){if(n.mounted=!0,n.tag===Kn.BRICK){var r;const i=n.type;i.includes("-")&&!customElements.get(i)&&console.error(`Undefined custom element: ${i}`),"basic-bricks.script-brick"===i&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");const a=t&&n===e.child?t:document.createElement(i);if(n.element=a,n.slotId&&a.setAttribute("slot",n.slotId),n.iid&&(a.dataset.iid=n.iid),null!==(r=n.tplHostMetadata)&&void 0!==r&&r.tplStateStoreId&&(a.dataset.tplStateStoreId=n.tplHostMetadata.tplStateStoreId),Bt(a,n.properties),mn(a,n.events,n.runtimeContext),n.tplHostMetadata&&(a.$$tplStateStore=Fe({tplStateStoreId:n.tplHostMetadata.tplStateStoreId,tplStateStoreMap:n.runtimeContext.tplStateStoreMap},"mount")),Dn(n),n.portal)o.push(a);else if(n.return){let e=n.return;for(;e;){if(e.tag!==Kn.ABSTRACT){e.childElements||(e.childElements=[]),e.childElements.push(a);break}e=e.return}}}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{var i;let e=n.return;for(;e;){var a;if(e.tag!==Kn.ABSTRACT&&e.childElements)e.tag===Kn.ROOT?null===(a=e.container)||void 0===a||a.append(...e.childElements):e.element.append(...e.childElements),e.childElements=void 0;if(e.tag===Kn.ROOT&&o.length>0&&("function"==typeof e.createPortal?e.createPortal():e.createPortal).append(...o),e.sibling)break;e=e.return}n=null===(i=e)||void 0===i?void 0:i.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}const zn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],Gn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"];var Hn=new WeakMap,qn=new WeakMap,Xn=new WeakMap,Yn=new WeakMap,Jn=new WeakMap,Qn=new WeakMap,Zn=new WeakMap,eo=new WeakMap,to=new WeakSet;class no{constructor(e,t){var n;(0,I.A)(this,to),(0,r.A)(this,"scope",void 0),(0,r.A)(this,"unknownBricks",void 0),(0,r.A)(this,"renderId",void 0),(0,i.A)(this,Hn,void 0),(0,i.A)(this,qn,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,i.A)(this,Xn,new Map),(0,i.A)(this,Yn,void 0),(0,i.A)(this,Jn,new Map),(0,i.A)(this,Qn,void 0),(0,i.A)(this,Zn,new WeakMap),(0,i.A)(this,eo,new Map),this.scope=e,this.unknownBricks=null!==(n=null==t?void 0:t.unknownBricks)&&void 0!==n?n:"throw",(0,a.A)(Hn,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,a.A)(Qn,this,e)}memoizeMenuRequestNode(e,t){(0,s.A)(Zn,this).set(e,t)}getMenuRequests(){const e=[];let t=(0,s.A)(Qn,this);for(;t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var n;t&&!t.sibling;)t=t.return;t=null===(n=t)||void 0===n?void 0:n.sibling}return e}async reMergeMenuRequestNodes(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=(0,s.A)(Zn,this).get(t);(0,s.A)(Zn,this).set(t,n);let r,i=e.child;for(;i&&i!==o;)r=i,i=i.sibling;r?(r.sibling=n,n.sibling=null==o?void 0:o.sibling):e.child=n,await(0,s.A)(Hn,this).mergeMenus(this.getMenuRequests())}reBailout(e){return(0,s.A)(Hn,this).bailout(e)}reCatch(e,t){return(0,s.A)(Hn,this).catch(e,t,!1,!0)}async didPerformIncrementalRender(e,t){let n=!1;const o=[];for(const{parentRoutes:r,callback:i}of[...(0,s.A)(eo,this).values()].reverse()){const a=r[r.length-1];if(o.includes(a))continue;const s=await i(e,t);s&&o.push(...r.slice(0,-1)),!1!==s&&(n=!0)}return n}performIncrementalRender(e,t,n){(0,s.A)(eo,this).set(e,{parentRoutes:t,callback:n})}registerBrickLifeCycle(e,t){if(!t)return;const n=[...zn,..."page"===this.scope?Gn:[]];for(const o of n){const n=t[o];n&&(0,s.A)(qn,this)[o].push({brick:e,handlers:n})}(0,h.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}registerArbitraryLifeCycle(e,t){const n=(0,s.A)(Jn,this).get(e);n?n.add(t):(0,s.A)(Jn,this).set(e,new Set([t]))}reRender(e,t,n){var o,r,i,a,s;if(e.tag!==Kn.ROOT&&e.disposed)return;const[l,c]=function(e){let t,n,o=e,r=0;for(;o;){if(o.tag===Kn.BRICK)o.portal?n=o:t=o;else if(o.child&&o.tag===Kn.ABSTRACT){o=o.child,r++;continue}if(r<=0)break;if(o.sibling)o=o.sibling;else{var i;let e=o.return;for(r--;e&&!e.sibling;)e=e.return,r--;if(r<=0)break;o=null===(i=e)||void 0===i?void 0:i.sibling}}return[t,n]}(n),u=null!==(o=l?null===(r=l.element)||void 0===r?void 0:r.nextSibling:null===(i=co(n,!1))||void 0===i?void 0:i.element)&&void 0!==o?o:null,d=[];let f,p=c?null==c||null===(a=c.element)||void 0===a?void 0:a.nextSibling:null===(s=co(n,!0))||void 0===s?void 0:s.element;for(;p&&(d.push(p),p instanceof HTMLElement&&"DIV"===p.tagName);)p=p.nextSibling;let h=e.child;for(;h&&h!==n;){if(h.sibling===n){f=h;break}h=h.sibling}const g=document.createDocumentFragment(),m=document.createDocumentFragment(),v={tag:Kn.ROOT,container:g,createPortal:m,child:t};for(h=t;h;)h.return=v,h=h.sibling;const[b,y]=uo(n);for((0,C.A)(to,this,oo).call(this,b),(0,C.A)(to,this,ro).call(this,y),Wn(v),f?f.sibling=t:e.child=t,t.sibling=n.sibling,(0,C.A)(to,this,io).call(this,y),(0,C.A)(to,this,io).call(this,b),h=t;h;)h.return=e,h=h.sibling;if(g.hasChildNodes()){const t=function(e){let t=e;for(;t.tag===Kn.ABSTRACT;)if(t=t.return,!t)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");return t}(e);var w,E;t.tag===Kn.ROOT?null===(w=t.container)||void 0===w||w.insertBefore(g,u):null===(E=t.element)||void 0===E||E.insertBefore(g,u)}if(m.hasChildNodes()){var S;let e=t;for(;e&&e.return;)e=e.return;if((null===(S=e)||void 0===S?void 0:S.tag)!==Kn.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");const n="function"==typeof e.createPortal?e.createPortal():e.createPortal;let o=null;for(const e of d)if(n.contains(e)){o=e;break}n.insertBefore(m,o)}const[A]=uo(t);(0,C.A)(to,this,ao).call(this,A)}dispose(){for(const e of Object.values((0,s.A)(qn,this)))e.length=0;for(const e of(0,s.A)(Xn,this).values()){for(const t of e)t.disconnect();e.length=0}(0,s.A)(Xn,this).clear(),(0,s.A)(Yn,this)&&(Ie.removeEventListener("change",(0,s.A)(Yn,this)),(0,a.A)(Yn,this,void 0)),(0,s.A)(Jn,this).clear(),(0,s.A)(eo,this).clear(),(0,a.A)(Zn,this,void 0)}dispatchBeforePageLoad(){(0,C.A)(to,this,so).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){const e=new CustomEvent("page.load");(0,C.A)(to,this,so).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,C.A)(to,this,so).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,C.A)(to,this,so).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){const{hash:e}=k().location;e&&"#"!==e?(0,C.A)(to,this,so).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,C.A)(to,this,so).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(const{brick:e,handlers:t}of(0,s.A)(qn,this).onScrollIntoView)(0,C.A)(to,this,lo).call(this,e,t)}initializeMediaChange(){(0,a.A)(Yn,this,(e=>{(0,C.A)(to,this,so).call(this,"onMediaChange",new CustomEvent("media.change",{detail:H(e.detail)}))})),Ie.addEventListener("change",(0,s.A)(Yn,this))}initializeMessageDispatcher(){var e;for(const{brick:e,handlers:n}of(0,s.A)(qn,this).onMessage)for(const o of[].concat(n)){var t;null==Oi||null===(t=Oi.messageDispatcher)||void 0===t||t.onMessage(o.channel,(t=>{En(o.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:t}))}))}null==Oi||null===(e=Oi.messageDispatcher)||void 0===e||e.onClose((()=>{(0,C.A)(to,this,so).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,C.A)(to,this,so).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,C.A)(to,this,so).call(this,"onUnmount",new CustomEvent("unmount"))}}function oo(e){const t=[...zn,..."page"===this.scope?Gn:[]],n=[];for(const o of t){const t=(0,h.remove)((0,s.A)(qn,this)[o],(t=>e.has(t.brick)));"onUnmount"===o&&n.push(...t)}for(const t of e){var o,r,i;const e=(0,s.A)(Xn,this).get(t);if(null!=e&&e.length){for(const t of e)t.disconnect();e.length=0,(0,s.A)(Xn,this).delete(t)}jn(t),null===(o=t.element)||void 0===o||delete o.$$tplStateStore,null===(r=t.element)||void 0===r||r.remove(),null===(i=t.disposes)||void 0===i||i.forEach((e=>e())),delete t.disposes}const a=new CustomEvent("unmount");for(const{brick:e,handlers:t}of n)En(t,e.runtimeContext,e)(a)}function ro(e){for(const n of e){var t;null===(t=n.disposes)||void 0===t||t.forEach((e=>e())),delete n.disposes}}function io(e){for(const t of e)delete t.child,delete t.sibling,delete t.return,t.disposed=!0,t.tag===Kn.BRICK&&(delete t.element,delete t.runtimeContext),Object.freeze(t)}function ao(e){const t=new CustomEvent("mount");for(const{brick:n,handlers:o}of(0,s.A)(qn,this).onMount)e.has(n)&&En(o,n.runtimeContext,n)(t);for(const{brick:t,handlers:n}of(0,s.A)(qn,this).onScrollIntoView)e.has(t)&&(0,C.A)(to,this,lo).call(this,t,n)}function so(e,t){for(const{brick:n,handlers:o}of(0,s.A)(qn,this)[e])En(o,n.runtimeContext,n)(t);const n=(0,s.A)(Jn,this).get(e);if(n)for(const e of n)e()}function lo(e,t){var n;const o=null!==(n=t.threshold)&&void 0!==n?n:.1,r=new IntersectionObserver(((n,r)=>{n.forEach((n=>{n.isIntersecting&&n.intersectionRatio>=o&&(En(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),r.disconnect())}))}),{threshold:o});r.observe(e.element);let i=(0,s.A)(Xn,this).get(e);i||(i=[],(0,s.A)(Xn,this).set(e,i)),i.push(r)}function co(e,t){let n=e;for(;n;){if(n!==e&&n.tag===Kn.BRICK&&(t?n.portal:!n.portal))return n;if(n!==e&&n.child&&n.tag===Kn.ABSTRACT)n=n.child;else if(n.sibling)n=n.sibling;else{var o;let e=n.return;for(;e;){if(e.tag!==Kn.ABSTRACT)return;if(e.sibling)break;e=e.return}n=null===(o=e)||void 0===o?void 0:o.sibling}}}function uo(e){const t=new Set,n=new Set;let o=e;for(;o;)if(o.tag===Kn.BRICK?t.add(o):o.tag===Kn.ABSTRACT&&n.add(o),o.child)o=o.child;else{if(o===e)break;if(o.sibling)o=o.sibling;else{var r;let i=o.return;for(;i;){if(i===e)return[t,n];if(i.sibling)break;i=i.return}o=null===(r=i)||void 0===r?void 0:r.sibling}}return[t,n]}const fo=new Map;function po(e){return fo.get(e)}function ho(e,t,n){const o=S();if(o)return o.doTransform(e,t,n);if(n)throw new Error("Legacy doTransform does not support options in v3");return kt(t,{...Ui(),data:e},{noInject:!0})}function go(e,t,n,o,r,i){const a=S();if(a)return a.transformProperties(e,t,n,o,r,i);if(i)throw new Error("Legacy transformProperties does not support options in v3");const s=function(e,t,n,o){const r={},i=n?(0,h.get)(e,n):e;if(Array.isArray(t))for(const e of t)vo(r,i,e.to,e.from,e.mapArray);else vo(r,i,t,void 0,o);return r}(t,n,o,r);for(const[t,n]of Object.entries(s))(0,h.set)(e,t,n);return e}function mo(e,t,n,o){const r=n?(0,h.get)(e,n):e;return t?go({},r,t,void 0,o):r}function vo(e,t,n,o,r){if(!n)return;let i=o?(0,h.get)(t,o):t,a=Array.isArray(i);if(a||!0!==r?a&&!1===r&&(a=!1):(a=!0,i=[i]),"string"!=typeof n)for(const[t,o]of Object.entries(n))e[t]=a?i.map((e=>ho(e,o))):ho(i,o);else e[n]=i}const bo=Symbol.for("root.runtimeContext");async function yo(e,t,n){var o,r,i,a;const[s,l,c]=hr({...null!==(o=e[bo])&&void 0!==o?o:Ui(),data:t,pendingPermissionsPreCheck:[]});s.inUseBrick=!0,null!==(r=s.tplStateStoreMap)&&void 0!==r||(s.tplStateStoreMap=new Map),null!==(i=s.formStateStoreMap)&&void 0!==i||(s.formStateStoreMap=new Map);const u=new no("fragment"),d={tag:Kn.ROOT,createPortal:null},f=Pe(),p=await dr(d,f&&!n?e:{errorBoundary:n,...e},s,u,[],{}),h=[...l,...c];let g;await pr(p,s,h);let m=p.node;for(;m;){if(m.tag===Kn.BRICK){g=m;break}m=m.child}if(null!==(a=g)&&void 0!==a&&a.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return d.child=p.node,{tagName:g?g.type:null,renderRoot:d,rendererContext:u,scopedStores:h}}function wo(e,t){let n,{renderRoot:o,rendererContext:r,scopedStores:i}=e;o.createPortal=()=>{const e=document.querySelector("#portal-mount-point");return n=document.createElement("div"),e.appendChild(n),n},Wn(o,t),r.dispatchOnMount(),r.initializeScrollIntoView(),r.initializeMediaChange(),r.initializeMessageDispatcher();for(const e of i)e.mountAsyncData();return{portal:n}}function Eo(e,t){let{rendererContext:n}=e;t.portal&&(Vn(t.portal),t.portal.remove()),n.dispatchOnUnmount(),n.dispose()}function So(e,t){const n=Fi(e);Object.assign(n,{...t,meta:{...n.meta,...t.meta},$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1}),B(n)}function Ao(e,t){const n=Fi(e);let o=!1;function r(e){e.forEach(((n,a)=>{"routes"===n.type?r(n.routes):function(e){return e.path===t.path&&!e.exact==!t.exact}(n)?(o=!0,e[a]=t):Array.isArray(n.bricks)&&i(n.bricks)}))}function i(e){e.forEach((e=>{if(e.slots)for(const t of Object.values(e.slots))"routes"===t.type?r(t.routes):i(t.bricks)}))}r(n.routes),o||n.routes.unshift(t)}function ko(e,t,n){const o=`${e}.${t.name}`;Ne.define(o,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Io(e,t.name,n)}function Io(e,t,n){Oo(e,`\${APP.homepage}/_dev_only_/template-preview/${t}`,[{brick:t,...(0,h.pick)(n,"properties","events","lifeCycle","context","slots","children")}])}function Co(e){return`\${APP.homepage}/_dev_only_/snippet-preview/${e}`}function Ro(e,t){var n;Oo(e,Co(t.snippetId),null!==(n=t.bricks)&&void 0!==n&&n.length?t.bricks:[{brick:"span"}],t.context)}const To=Ro;function Oo(e,t,n,o){const{routes:r}=Fi(e),i=r.findIndex((e=>e.path===t)),a={path:t,bricks:n,context:o,menu:!1,exact:!0};-1===i?r.unshift(a):r.splice(i,1,a)}function _o(e,t){let{tplStateStoreId:n}=t;const o=Ui();return n?Fe({...o,tplStateStoreId:n},"STATE").getValue(e):o.ctxStore.getValue(e)}function Po(e){let{tplStateStoreId:t}=e;const n=Ui();return t?Fe({...n,tplStateStoreId:t},"STATE").getAllValues():n.ctxStore.getAllValues()}function Mo(e){return Li().find((t=>t.id?t.id===e:t.filePath.startsWith(`${e}/`)))}function xo(e){return(0,c.loadBricksImperatively)(e,Li())}function Bo(e,t){return(0,c.loadEditorsImperatively)(e,null!=t?t:Li())}function Lo(){return Ni()}async function $o(e,t){let{appId:n,updateStoryboardType:o,collectUsedContracts:r}=t;const i=Fi(n);let a;if("route"===o)a={routes:[e]};else if("template"===o)a={meta:{customTemplates:[e]}};else if("snippet"===o){var s;const t=Co(e.snippetId);a={routes:[null==i||null===(s=i.routes)||void 0===s?void 0:s.find((e=>e.path===t))]}}const l=[];return a&&r&&(await r(a)).forEach((e=>{var t;const[n,o,r]=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===o&&e.name===r))||l.push(e)})),l}async function No(e,t){let{tplStateStoreId:n,routeId:o}=t;const r={...Ui(),tplStateStoreId:n,match:po(o)};return e.resolve?lt(e.resolve,r,{cache:"reload"}):At(e.value,r)}function Uo(e){var t;const n=Ui();return{app:null!==(t=null==n?void 0:n.overrideApp)&&void 0!==t?t:null==n?void 0:n.app,location:(0,h.pick)(location,["href","origin","hostname","host"]),...(0,h.pick)(n,["query","sys"]),match:po(null==e?void 0:e.routeId)}}let Fo;const Do=[];function jo(e){Fo=e;const t=Po({tplStateStoreId:e.tplStateStoreId});Vo({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Ko(e){Do.push(e)}function Vo(e){setTimeout((()=>{for(const t of Do)try{t(e)}catch(t){console.error(`RealTimeDataInspectHook failed (${e.changeType}):`,t)}}))}const Wo=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class zo{constructor(e,t,n,o){(0,r.A)(this,"type",void 0),(0,r.A)(this,"data",new Map),(0,r.A)(this,"changeEventType",void 0),(0,r.A)(this,"pendingStack",[]),(0,r.A)(this,"hostBrick",void 0),(0,r.A)(this,"stateStoreId",void 0),(0,r.A)(this,"batchUpdate",!1),(0,r.A)(this,"batchUpdateContextsNames",[]),(0,r.A)(this,"rendererContext",void 0),(0,r.A)(this,"routeMap",new WeakMap),(0,r.A)(this,"routeStackMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=n,this.stateStoreId=o}has(e){return this.data.has(e)}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{let[t,{value:n}]=e;return[t,n]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(Fo){const{tplStateStoreId:n}=Fo;(n?"STATE"===this.type&&this.stateStoreId===n:"CTX"===this.type)&&Vo({changeType:"update",tplStateStoreId:n,detail:{name:e,value:t}})}}getAffectListByContext(e){const t=[e];return this.data.forEach(((e,n)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(n)&&t.push(...this.getAffectListByContext(n))})),t.shift(),[...new Set(t)]}updateValues(e,t,n){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");const o={},r={},i=[];e.forEach((e=>{const{name:r,value:a}=n([e]),s=this.data.get(r);i.push(...this.getAffectListByContext(r)),s&&(o[r]=s),this.updateValue(r,a,t)})),i.filter((e=>!o[e])).forEach((e=>{const t=this.data.get(e);t&&(r[e]=t)}));const a=e=>{for(const n in e){var t;const o=e[n];null===(t=o.eventTarget)||void 0===t||t.dispatchEvent(new CustomEvent(this.changeEventType,{detail:o.value}))}};a(o),a(r),this.batchUpdate=!1}updateValue(e,t,n,o,r){const i=this.data.get(e);if(!i)throw new Error(`${this.type} '${e}' is not defined`);if("refresh"!==n&&"load"!==n){if("replace"===n)i.value=t;else if("assign"===n)(0,u.isObject)(i.value)?Object.assign(i.value,t):(console.warn(`Non-object current value of "${this.type}.${e}" for "context.assign", try "context.replace" instead.`),i.value=t);else{let e=t;if("function"==typeof t&&(e=t(i.value)),Object.is(i.value,e))return;i.value=e}this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}else{if(!i.useResolve)throw new Error(`You can not ${n} "${this.type}.${e}" which is not using resolve`);let a;"load"===n&&(i.loaded?a=Promise.resolve(i.value):i.loading&&(a=i.loading));const s=e=>{var t;let n;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(n=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&n!==Ni()};if(a||(a=i.loading=i.load({cache:"load"===n?"default":"reload",...t}),a.then((e=>{this.finishLoad(i,e)}),(e=>{!i.useResolve||s(e)||null!=o&&o.error||fn(e)}))),o){const e=Un(o,r);a.then((t=>{e("success")({value:t}),e("finally")()}),(t=>{!s(t)&&o.error&&e("error")(t),e("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,n,o){if(Array.isArray(e)&&e.length>0){const r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX";const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",n=arguments.length>2?arguments[2]:void 0;const o=new Map;for(const r of e){const e=[r.if,r.value,r.resolve],i=(0,O.collectMemberUsage)(e,t);if(!n&&"STATE"===t){const t=(0,O.collectMemberUsage)(e,"TPL");for(const e of t.usedProperties)i.usedProperties.add(e);t.hasNonStaticUsage&&(i.hasNonStaticUsage=!0)}o.set(r,i)}return o}(e,n,arguments.length>3?arguments[3]:void 0),r=new Map;for(const e of Array.from(o.keys()).map((e=>e.name))){var i;r.set(e,(null!==(i=r.get(e))&&void 0!==i?i:0)+1)}const a=Array.from(o.values()).some((e=>e.hasNonStaticUsage)),s=new WeakSet,l=new Map,c=new Map([...new Set(e.map((e=>e.name)))].map((e=>{const t=new Promise(((t,n)=>{l.set(e,{resolve:t,reject:n})}));return t.catch((()=>{})),[e,t]}))),u=async e=>{var n;s.add(e);const i=await t(e);o.delete(e);const a=null!==(n=r.get(e.name))&&void 0!==n?n:0;if(i){if(l.get(e.name).resolve(),r.delete(e.name),0===a)throw new Error(`Duplicated context defined: ${e.name}`)}else 1===a?(l.get(e.name).resolve(),r.delete(e.name)):r.set(e.name,a-1);await f()};let d=a;async function f(){const e=Array.from(o.entries()).filter(function(e,t){return(n,o)=>t?0===o:![...n[1].usedProperties].some((t=>e.has(t)))}(r,d)).map((e=>e[0])).filter((e=>!s.has(e)));await Promise.all(e.map(u))}const p=f().then((async()=>{o.size>0&&(function(e,t){const n=new Map(e),o=new Set(Array.from(n.keys()).map((e=>e.name))),r=()=>{let e=!1;for(const[t,r]of n.entries())[...r.usedProperties].some((e=>o.has(e)))||(n.delete(t),o.delete(t.name),e=!0);e&&r()};if(r(),n.size>0)throw new ReferenceError(`Circular ${t} detected: ${Array.from(n.keys()).map((e=>e.name)).join(", ")}`)}(o,n),d=!0,await f());for(const e of l.values())e.resolve()})).catch((e=>{for(const t of l.values())t.reject(e);throw e}));return p.catch((()=>{})),{pendingResult:p,pendingContexts:c}}(e,(e=>this.resolve(e,t,n,o)),this.type,Pe(t));if(Array.isArray(o))for(const e of o){const t=this.routeStackMap.get(e);t?t.add(r):this.routeStackMap.set(e,new Set([r]))}this.pendingStack.push(r)}}onChange(e,t){var n;const o=null===(n=this.data.get(e))||void 0===n?void 0:n.eventTarget;return null==o||o.addEventListener(this.changeEventType,t),()=>{null==o||o.removeEventListener(this.changeEventType,t)}}async waitFor(e){for(const{pendingContexts:t}of this.pendingStack)await Promise.all([...e].map((e=>t.get(e))))}async waitForAll(){for(const{pendingResult:e}of this.pendingStack)await e}mountAsyncData(e){this.data.forEach((t=>{var n;if(t.async&&(!e||null!==(n=this.routeMap.get(e))&&void 0!==n&&n.has(t.name))){if(t.asyncMounted)return void console.error(`Async data "${t.name}" already mounted. This is a bug of Brick Next, please report it.`);t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}async resolve(e,t,n,o){if(!await Rt(e,t))return!1;let r,i,a,s,l,c;if(n&&("STATE"===this.type?e.expose:"FORM_STATE"===this.type)&&(r=await Mt(n,e.name)),void 0===r){if(e.resolve){const n=(0,u.hasOwnProperty)(e,"value");l=e.track&&n&&(0,u.hasOwnProperty)(e.resolve,"if")&&(0,O.strictCollectMemberUsage)(e.resolve.if,this.type).size>0;const o={transform:"value",...e.resolve};if(s=await Rt(e.resolve,t),(s||l)&&(i=async e=>{var n;return(await lt(o,t,{...e,renderId:null===(n=this.rendererContext)||void 0===n?void 0:n.renderId})).value}),s)c=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager","eager"===c?r=await i():"async"===c&&(a=i());else if(!n)return!1}s&&"eager"===c||void 0===e.value||(r=await At(e.value,t))}if(this.data.has(e.name))throw new Error(`${this.type} '${e.name}' has already been declared`);const d={name:e.name,value:r,eventTarget:new Se,useResolve:s,load:i,loaded:"eager"===c,loading:a,async:"async"===c,deps:[]};if("lazy"===c){const{trigger:t}=e.resolve;var f;t&&Wo.includes(t)&&(null===(f=this.rendererContext)||void 0===f||f.registerArbitraryLifeCycle(t,(()=>{this.updateValue(e.name,void 0,"load")})))}if(e.onChange&&d.eventTarget.addEventListener(this.changeEventType,En(e.onChange,t)),e.track){const n=(0,O.strictCollectMemberUsage)(l?[e.resolve,e.value]:i?e.resolve:e.value,this.type);!i&&(d.deps=[...n]);for(const o of n)this.onChange(o,this.batchAddListener((()=>{d.useResolve=l?Tt(e.resolve,t):!!i,d.useResolve?this.updateValue(e.name,{cache:"default"},"refresh"):this.updateValue(e.name,kt(e.value,t),"replace")}),e))}if(d.eventTarget.addEventListener(this.changeEventType,(t=>{this.notifyRealTimeDataChange(e.name,t.detail)})),this.data.set(e.name,d),Array.isArray(o))for(const t of o){const n=this.routeMap.get(t);n?n.add(e.name):this.routeMap.set(t,new Set([e.name]))}return!0}disposeDataInRoutes(e){for(const t of e){const e=this.routeMap.get(t);if(void 0!==e){for(const t of e)this.data.delete(t);this.routeMap.delete(t)}const n=this.routeStackMap.get(t);void 0!==n&&((0,h.pull)(this.pendingStack,...n),this.routeStackMap.delete(t))}}batchAddListener(e,t){return n=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(n)}}}function Go(e,t,n,o){const{reversedProxies:r,asyncHostPropertyEntries:i,externalSlots:a,tplStateStoreId:s,hostBrick:l}=e;let c;if(t&&r){const e=r.properties.get(t);e&&(m=i,c=e.map((e=>{let{from:t,to:n}=e;const o=m.filter((e=>e[0]===t));if(o.length>0&&n.refProperty)return[n.refProperty,Mt(o,t),!0]})).filter(Boolean));const s=r.slots.get(t);if(s&&o)throw new Error(`Can not have proxied slot ref when the ref target has a slot element child, check your template "${l.type}" and ref "${t}"`);if(s&&a){const e=new Map;for(const{from:t,to:o}of s){var d,f,p,g;const r=null!==(d=null===(f=a[t])||void 0===f?void 0:f.bricks)&&void 0!==d?d:[];if(!r.length)continue;const i=null!==(p=o.refSlot)&&void 0!==p?p:t;let s=e.get(i);if(!s){s=[];const t=(0,u.hasOwnProperty)(n,i)?n[i].bricks.length+1:1;for(let e=0;e<t;e+=1)s.push([]);e.set(i,s)}const c=null!==(g=o.refPosition)&&void 0!==g?g:-1,m=(0,u.hasOwnProperty)(l.runtimeContext,"forEachItem");s[(0,h.clamp)(c<0?s.length+c:c,0,s.length-1)].push(...m?Ho(r,l.runtimeContext.forEachItem,l.runtimeContext.forEachIndex,l.runtimeContext.forEachSize):r)}for(const[t,o]of e.entries()){(0,u.hasOwnProperty)(n,t)||(n[t]={type:"bricks",bricks:[]});const e=n[t];e.bricks=o.flatMap(((t,n)=>n<e.bricks.length?t.concat(e.bricks[n]):t)),0===e.bricks.length&&delete n[t]}}}var m;return{[Gt]:c,[Ht]:s}}function Ho(e,t,n,o){return e.map((e=>{var r;let{children:i,slots:a,...s}=e;return{...s,[qt]:t,[Xt]:n,[Yt]:o,slots:":forEach"===s.brick?vr(i,a):Object.fromEntries(Object.entries(null!==(r=vr(i,a))&&void 0!==r?r:{}).map((e=>{let[r,i]=e;return[r,"routes"===i.type?{type:"routes",routes:qo(i.routes,t,n,o)}:{type:"bricks",bricks:Ho(i.bricks,t,n,o)}]})))}}))}function qo(e,t,n,o){return e.map((e=>"routes"===e.type?{...e,routes:qo(e.routes,t,n,o)}:"redirect"===e.type?e:{...e,bricks:Ho(e.bricks,t,n,o)}))}function Xo(e,t,n){var o,r,i,a;if(null!=e.if&&!e.if||"string"==typeof e.if)throw new Error(`Can not use "if" in a slot currently, check your template "${t.hostBrick.type}"`);const s=String(null!==(o=null===(r=e.properties)||void 0===r?void 0:r.name)&&void 0!==o?o:"");if((0,T.isEvaluable)(s))throw new Error(`Can not use an expression as slot name "${s}" currently, check your template "${t.hostBrick.type}"`);if(t.usedSlots.has(s))throw new Error(`Can not have multiple slots with the same name "${s}", check your template "${t.hostBrick.type}"`);if(t.usedSlots.add(s),t.externalSlots&&(0,u.hasOwnProperty)(t.externalSlots,s)){var l;const e=null!==(l=t.externalSlots[s].bricks)&&void 0!==l?l:[];if(e.length>0){const n=t.hostBrick.runtimeContext;return(0,u.hasOwnProperty)(n,"forEachItem")?Ho(e,n.forEachItem,n.forEachIndex,n.forEachSize):e}}const c=vr(e.children,e.slots);return(null!==(i=null==c||null===(a=c[""])||void 0===a?void 0:a.bricks)&&void 0!==i?i:[]).flatMap((e=>n(e,t)))}function Yo(e,t){function n(e){return(0,u.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(n):Object.fromEntries(Object.entries(e).map((e=>{let[t,r]=e;return(0,u.isObject)(r)&&"useBrick"===t?Array.isArray(r)?[t,r.flatMap((e=>o(e)))]:[t,o(r)]:[t,n(r)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function o(e,r){if("slot"===e.brick)return null==r||r(),Xo(e,t,(e=>o(e)));const{properties:i,slots:a,children:s,...l}=e,c=vr(s,a);let u=!1;const d=()=>{u=!0},f=Object.fromEntries(Object.entries(null!=c?c:{}).map((e=>{var t;let[n,r]=e;return[n,{type:"bricks",bricks:(null!==(t=r.bricks)&&void 0!==t?t:[]).flatMap((e=>o(e,d)))}]})));return{...l,properties:n(i),slots:f,...Go(t,l.ref,f,u)}}return n(e)}function Jo(e,t,n){if(null===e.if&&delete e.if,"slot"===e.brick)return null==n||n(),Xo(e,t,Jo);const{properties:o,slots:r,children:i,...a}=e,s=vr(i,r);let l=!1;const c=()=>{l=!0},u=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var n;let[o,r]=e;return[o,{type:"bricks",bricks:(null!==(n=r.bricks)&&void 0!==n?n:[]).flatMap((e=>Jo(e,t,c)))}]})));return{...a,properties:Yo(o,t),slots:u,...Go(t,a.ref,u,l)}}const Qo="form-renderer.form-renderer",Zo=Symbol.for("form.stateStoreId"),er=["forms.general-form","form.general-form","eo-form"];function tr(e,t,n){const{id:o,bricks:r,events:i,context:a,mountPoint:s,instanceId:l}=e;let{brick:c,properties:d}=e;const f=t.find((e=>e.fieldId===o));if(f){const e=function(e){let t;const n={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},o=()=>{var t,n;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(n=e.limit)||void 0===n?void 0:n.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:{...n,...o(),placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}}};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:{...n,...o()}};break;case"FLOAT":t={brick:"forms.general-input-number",properties:{...n,...o(),placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUM":t={brick:"forms.general-select",properties:{...n,...o(),options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUMS":t={brick:"forms.general-select",properties:{...n,...o(),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:{...n,...o(),placeholder:e.description}};break;case"IP":t={brick:"forms.general-input",properties:{...n,...o(),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:{...n}};break;case"ARRAY":t={brick:"forms.general-select",properties:{...n}};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:{...n,...o()}};break;default:t={brick:"forms.general-input",properties:{...n,...o(),placeholder:e.description}}}return t}(f);c||(c=e.brick),d={...e.properties,...d}}const p={brick:c,properties:d,iid:l,slot:s,events:i,context:a,children:nr(r,t,n),[Zo]:n};return(0,u.hasOwnProperty)(e,"if")&&(p.if=e.if),p}function nr(e,t,n){if(Array.isArray(e))return e.map((e=>tr(e,t,n)))}var or=new WeakSet;class rr extends HTMLElement{constructor(){super(...arguments),(0,I.A)(this,or),(0,r.A)(this,"renderRoot",void 0)}get $$typeof(){return"formRenderer"}validate(){(0,C.A)(or,this,ir).call(this,"validate")}setInitValue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,C.A)(or,this,ir).call(this,"setInitValue",t)}resetFields(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,C.A)(or,this,ir).call(this,"resetFields",t)}getFieldsValue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,C.A)(or,this,ir).call(this,"getFieldsValue",t)}}function ir(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=!1!==this.renderRoot?null===(t=this.firstElementChild)||void 0===t?void 0:t.firstElementChild:this.firstElementChild,i=null==r||null===(n=r.tagName)||void 0===n?void 0:n.toLowerCase();if(er.includes(i))return r[e](...o);console.error(`no ${e} method in the container element`,{container:i})}class ar extends Error{constructor(e){super(e),this.name="PageError",Error.captureStackTrace&&Error.captureStackTrace(this,c.BrickLoadError)}}async function sr(e,t,n){const{title:o,variant:r,showLink:i,showDescription:a}=function(e){var t,n;return e instanceof ar?"page blocked"===e.message?{showLink:"home",title:l.i18n.t(`${tn}:${Qt.LICENSE_BLOCKED}`),variant:"no-permission"}:"app not found"===e.message?{showLink:"home",title:l.i18n.t(`${tn}:${Qt.APP_NOT_FOUND}`),variant:"no-permission"}:{showLink:"home",variant:"not-found",title:l.i18n.t(`${tn}:${Qt.PAGE_NOT_FOUND}`)}:e instanceof c.BrickLoadError||e instanceof Error&&"ChunkLoadError"===e.name||e instanceof Event&&"error"===e.type&&e.target instanceof HTMLScriptElement?{showDescription:!0,title:l.i18n.t(`${tn}:${Qt.NETWORK_ERROR}`),variant:"internet-disconnected",showLink:"reload"}:e instanceof R.HttpResponseError&&403===(null===(t=e.response)||void 0===t?void 0:t.status)?{showLink:"previous",showDescription:!0,title:l.i18n.t(`${tn}:${Qt.NO_PERMISSION}`),variant:"no-permission"}:e instanceof R.HttpResponseError&&"200000"===(null===(n=e.responseJson)||void 0===n?void 0:n.code)?{showDescription:!0,title:l.i18n.t(`${tn}:${Qt.LICENSE_EXPIRED}`),variant:"license-expired"}:{showLink:"previous",showDescription:!0,title:l.i18n.t(`${tn}:${Qt.UNKNOWN_ERROR}`),variant:"unknown-error"}}(e);if(n){var s;const n=null!==(s=$i().error)&&void 0!==s?s:"illustrations.error-message";if(!1!==n){const s="eo-link",l=(i?[n,s]:[n]).filter((e=>!customElements.get(e)));try{await Promise.race([(0,c.loadBricksImperatively)(l,Li()),new Promise(((e,t)=>setTimeout((()=>{t(new Error("timeout"))}),3e3)))]);const u={tag:Kn.BRICK,type:n,properties:{errorTitle:o,description:a?sn(e):void 0,variant:r,dataset:{errorBoundary:""}},runtimeContext:null,return:t};return i&&(u.child=lr(i,s,u,"")),u}catch(e){console.error("Failed to load brick:",l.join(", "),e)}}}const u=n&&!!customElements.get("easyops-default-error"),d={tag:Kn.BRICK,type:u?"easyops-default-error":"div",properties:{errorTitle:o,dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:t},f={tag:Kn.BRICK,type:"div",properties:{textContent:u?a?sn(e):"":a?`${o}: ${sn(e)}`:o},runtimeContext:null,return:d};return d.child=f,n&&i&&(f.sibling=lr(i,"a",d,u?"link":"")),d}function lr(e,t,n,o){return{tag:Kn.BRICK,type:t,slotId:o,properties:{textContent:"home"===e?l.i18n.t(`${tn}:${Qt.GO_BACK_HOME}`):"reload"===e?l.i18n.t(`${tn}:${Qt.RELOAD}`):l.i18n.t(`${tn}:${Qt.GO_BACK_TO_PREVIOUS_PAGE}`),href:"home"===e?p():"reload"===e?location.href:void 0},events:"previous"===e?{click:{action:"history.goBack"}}:void 0,runtimeContext:null,return:n}}async function cr(e,t,n,o,r,i,a,s,l){const u=await async function(e,t){for(const n of e){if("string"!=typeof n.path)throw console.error("Invalid route with invalid path:",n),new Error("Invalid route with invalid type of path: "+typeof n.path);const e=zt(n,t.app.homepage,t.location.pathname);if(e&&await Rt(n,t))return t.app.noAuthGuard||n.public||null==Oi||!Oi.auth||Oi.auth.isLoggedIn()?{match:e,route:n}:"unauthenticated"}return"missed"}(t,n),d={blockingList:[]},f=d.menuRequestNode={return:i};switch(u){case"missed":break;case"unauthenticated":d.unauthenticated=!0;break;default:{var p;const i=d.route=u.route;d.path=u.match.path;const m={...n,match:u.match};i.iid&&(h=i.iid,g=u.match,fo.set(h,g)),s&&m.ctxStore.disposeDataInRoutes(t);const v=r.concat(i);m.ctxStore.define(i.context,m,void 0,v),m.pendingPermissionsPreCheck.push(null==Oi||null===(p=Oi.checkPermissions)||void 0===p?void 0:p.preCheckPermissionsForBrickOrRoute(i,(e=>At(e,m))));const{preLoadBricks:b}=i;if(Array.isArray(b)&&d.blockingList.push((0,c.loadBricksImperatively)(b,Li())),"redirect"===i.type){let e;if(e="string"==typeof i.redirect?await At(i.redirect,m):(await lt({transform:"redirect",...i.redirect},m)).redirect,"string"!=typeof e)throw console.error("Unexpected redirect result:",e),new Error("Unexpected type of redirect result: "+typeof e);d.redirect={path:e}}else{const n=function(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 At(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(i.menu,m);n&&(f.request=n),s||o.memoizeMenuRequestNode(t,f);const r=(0,O.strictCollectMemberUsage)(i.context,"PROCESSORS",2);let u;r.size>0&&d.blockingList.push(br((0,c.loadProcessorsImperatively)(r,Li()),"processors",[...r].join(", "),o.unknownBricks)),u="routes"===i.type?await cr(e,i.routes,m,o,v,f,a,void 0,l):await ur(e,i.bricks,m,o,v,f,a,void 0,l),gr(d,u),mr(f,u.menuRequestNode)}}}var h,g;return d}async function ur(e,t,n,o,r,i,a,s,l){!function(e,t){function n(e){if((0,u.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(n);else for(const[t,r]of Object.entries(e))(0,u.isObject)(r)&&"useBrick"===t?Array.isArray(r)?r.forEach((e=>o(e,!0))):o(r,!0,!0):n(r)}function o(e,r,i){if(r&&(e[bo]=t),n(e.properties),!i)return;const a=vr(e.children,e.slots);for(const e of Object.values(null!=a?a:{}))for(const t of null!==(s=e.bricks)&&void 0!==s?s:[]){var s;o(t,r)}}for(const t of e)o(t)}(t,n);const c={blockingList:[]};return(await Promise.all(t.map((t=>dr(e,t,n,o,r,i,a,s&&new Map(s),l))))).forEach((e=>{gr(c,e)})),c}async function dr(e,t,n,o,r,i,a){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:new Map,l=arguments.length>8?arguments[8]:void 0;try{return await async function(e,t,n,o,r,i,a,s,l){var d;const f={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;const{if:p,permissionsPreCheck:g,...v}=t;if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):ft(e)&&(0,T.isTrackAll)(pt(e))}(p))return dr(e,{brick:":if",iid:t.iid,dataSource:p,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[v]}},...Object.getOwnPropertySymbols(t).reduce(((e,n)=>({...e,[n]:t[n]})),{})},n,o,r,i,a,s,l);const b=t[Ht],y=t[Zo],w={...n,tplStateStoreId:b,formStateStoreId:y};(0,u.hasOwnProperty)(t,qt)&&(w.forEachItem=t[qt],w.forEachIndex=t[Xt],w.forEachSize=t[Yt]);const E=Pe(w),{context:S}=t;if(Array.isArray(S)&&S.length>0&&(Me(E,"Defining context on bricks","check your brick:",t),E||w.ctxStore.define(S,w)),w.pendingPermissionsPreCheck.push(null==Oi||null===(d=Oi.checkPermissions)||void 0===d?void 0:d.preCheckPermissionsForBrickOrRoute(t,(e=>At(e,w)))),!await async function(e,t){return(0,u.isObject)(e.if)&&!ft(e.if)?Ot(await lt(e.if,t)):Rt(e,t)}(t,w))return f;const A=t.brick;if(A.startsWith(":")){var k;!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error(`Unknown storyboard control node: "${e}"`)}(A);const{dataSource:n}=t,{contextNames:l,stateNames:c}=Pt(n),d=!(!l&&!c),f=async(d,f,p)=>{var h;const g=await At(n,d);p&&$t(d,[{contextNames:l,stateNames:c,propValue:n}],f);const m=":forEach"===A?"":":switch"===A?String(g):g?"":"else",v=vr(t.children,t.slots),b=v&&(0,u.hasOwnProperty)(v,m)&&(null===(h=v[m])||void 0===h?void 0:h.bricks),y={blockingList:[]},w={tag:Kn.ABSTRACT,return:e,iid:t.iid};if(y.node=w,!Array.isArray(b))return y;let E;switch(A){case":forEach":if(!Array.isArray(g))break;E=await async function(e,t,n,o,r,i,a,s,l,c){const u={blockingList:[]},d=t.length,f=await Promise.all(t.map(((t,u)=>Promise.all(n.map((n=>dr(e,n,{...o,forEachItem:t,forEachIndex:u,forEachSize:d},r,i,a,s,l&&new Map(l),c)))))));return f.flat().forEach((e=>{gr(u,e)})),u}(w,g,b,d,o,r,i,a,s,f);break;case":if":case":switch":E=await ur(w,b,d,o,r,i,a,s,f)}return E&&(w.child=E.node,gr(y,{...E,node:void 0})),y},p=async e=>{let{type:n,runtimeContext:o,tplStateStoreScope:r,formStateStoreScope:i}=e,a=!1;const s={disposes:[],listener:()=>{a=!0}};let l,c=0,u=!0;for(;u||a;){if(a=!1,l=await f(o,s,u&&"initial"===n),!a&&"rerender"===n){const e=[...r,...i];await pr(l,o,[o.ctxStore,...e])}if(s.disposes.forEach((e=>e())),s.disposes.length=0,u=!1,++c>10)throw new Error(`Maximum rerender stack overflowed (iid: ${t.iid})`)}return l};let g=await p({type:"initial",runtimeContext:w});const{onMount:m,onUnmount:v}=null!==(k=t.lifeCycle)&&void 0!==k?k:{};if(d){var I;let t=0;const r=async()=>{if(!e.mounted||e.disposed)return;const n=++t,[r,i,a]=hr(w),s=await p({type:"rerender",runtimeContext:r,tplStateStoreScope:i,formStateStoreScope:a});if(t===n&&e.mounted&&!e.disposed){v&&En(v,w)(new CustomEvent("unmount",{detail:{rerender:!0}})),o.reRender(e,s.node,g.node),g=s,m&&En(m,r)(new CustomEvent("mount",{detail:{rerender:!0}}));for(const e of[...i,...a])e.mountAsyncData()}},i=(0,h.debounce)(r,0,{leading:!0,trailing:!0}),a=e.tag===Kn.ROOT?null:e,s=a?null!==(I=a.disposes)&&void 0!==I?I:a.disposes=[]:[];if(l)for(const e of l)s.push(w.ctxStore.onChange(e,i));if(c)for(const e of c){const t=Fe(w,"STATE",`: "${n}"`);s.push(t.onChange(e,i))}}return m&&o.registerArbitraryLifeCycle("onMount",(()=>{En(m,w)(new CustomEvent("mount",{detail:{rerender:!1}}))})),v&&o.registerArbitraryLifeCycle("onUnmount",(()=>{En(v,w)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),g}/\.tpl-/.test(A)&&!Ne.get(A)&&await br((0,c.loadBricksImperatively)([A],Li()),"brick",A,o.unknownBricks);const C=function(e,t){if(t.isolatedRoot){const n=Ue.get(t.isolatedRoot);return!(null==n||!n.get(e))&&e}if(!e.includes(".")&&e.startsWith("tpl-")&&t.app){const n=`${t.app.id}.${e}`;if(Ne.get(n))return n}return!!Ne.get(e)&&e}(A,w);if(C){var R;const e=null!==(R=s.get(C))&&void 0!==R?R:0;if(e>=10)throw new Error(`Maximum custom template stack overflowed: "${C}"`);s.set(C,e+1)}else A.includes("-")&&!customElements.get(A)&&(A===Qo?customElements.get(Qo)||customElements.define(Qo,rr):f.blockingList.push(br((0,c.enqueueStableLoadBricks)([A],Li()),"brick",A,o.unknownBricks)));let _,P;if(A===Qo){var M,x;({formData:_,...P}=null!==(M=t.properties)&&void 0!==M?M:{}),null!==(x=t.properties)&&void 0!==x&&x.compute&&(_=await At(_,w))}else{if(w.inUseBrick){const e=t.transform;e&&(Me(E,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',t),E||(P={...t.properties,...e}))}null!=P||(P=t.properties)}const B=[],L=function(e,t,n){return(0,u.isObject)(e)?Object.entries(e).map((e=>{let[o,r]=e;const{contextNames:i,stateNames:a,formStateNames:s}=Pt(r);return(i||a||s)&&n.push({contextNames:i,stateNames:a,formStateNames:s,propName:o,propValue:r}),[o,At(r,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===o?yt.USE_BRICK:yt.INITIAL})]})):[]}(P,w,B),$=t[Gt];$&&L.push(...$);const N="script"===A;if(N||"link"===A){const e=await xt(L);if(N?e.src:"stylesheet"===e.rel&&e.href){var U;const t=null!==(U=window.PUBLIC_ROOT)&&void 0!==U?U:"";if(N){const{src:n,...o}=e;await br((0,c.loadScript)(n,t,o),"script",n,"silent")}else{const{href:n,...o}=e;await br((0,c.loadStyle)(n,t,o),"stylesheet",n,"silent")}return f}}const F={tag:Kn.BRICK,type:C||A,return:e,slotId:a,events:t.events,runtimeContext:w,portal:t.portal,iid:t.iid,ref:t.ref};f.node=F;const D=(0,O.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);D.size>0&&f.blockingList.push(br((0,c.loadProcessorsImperatively)(D,Li()),"processors",[...D].join(", "),o.unknownBricks));const j=[];$t(w,B,l);j.push((async()=>{F.properties=await xt(L),function(e,t){for(const o of t){var n;const t=()=>{e.element&&Lt(e.element,{[o.propName]:o.propValue},e.runtimeContext)};if(null!==(n=e.disposes)&&void 0!==n||(e.disposes=[]),o.contextNames)for(const n of o.contextNames)e.disposes.push(e.runtimeContext.ctxStore.onChange(n,t));if(o.stateNames){const n=Fe(e.runtimeContext,"STATE",`: "${o.propValue}"`);for(const r of o.stateNames)e.disposes.push(n.onChange(r,t))}if(o.formStateNames){const n=tt(e.runtimeContext,"FORM_STATE",`: "${o.propValue}"`);for(const r of o.formStateNames)e.disposes.push(n.onChange(r,t))}}}(F,B)})()),o.registerBrickLifeCycle(F,t.lifeCycle);let K,V=t;C?V=function(e,t,n,o,r){var i;const a=(0,h.uniqueId)("tpl-state-"),s={...n.runtimeContext,tplStateStoreId:a};delete s.forEachItem,delete s.forEachIndex,delete s.forEachSize,delete s.formStateStoreId;const l=new zo("STATE",n,r,a);s.tplStateStoreMap.set(a,l),s.tplStateStoreScope&&s.tplStateStoreScope.push(l);const{bricks:c,proxy:u,state:d,contracts:f}=n.runtimeContext.isolatedRoot?Ue.get(n.runtimeContext.isolatedRoot).get(e):Ne.get(e);null==Oi||null===(i=Oi.flowApi)||void 0===i||i.collectWidgetContract(f),l.define(d,s,o);const{slots:p,children:g,...m}=t,v={...m,brick:e};n.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:a,proxy:u};const b={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(const[e,t]of Object.entries(u.properties)){let n=b.properties.get(t.ref);n||(n=[],b.properties.set(t.ref,n)),n.push({from:e,to:t})}if(null!=u&&u.slots)for(const[e,t]of Object.entries(u.slots)){let n=b.slots.get(t.ref);n||(n=[],b.slots.set(t.ref,n)),n.push({from:e,to:t})}const y={reversedProxies:b,asyncHostPropertyEntries:o,externalSlots:vr(g,p),tplStateStoreId:a,hostBrick:n,usedSlots:new Set};return v.slots={"":{type:"bricks",bricks:c.flatMap((e=>Jo(e,y)))}},v}(C,t,F,L,o):A===Qo&&(V=function(e,t,n,o,r){var i,a;const s="string"==typeof e?JSON.parse(e):e,l=(0,h.uniqueId)("form-state-"),c={...n.runtimeContext,formStateStoreId:l};delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize,delete c.tplStateStoreId;const d=new zo("FORM_STATE",void 0,r,l);c.formStateStoreMap.set(l,d),c.formStateStoreScope&&c.formStateStoreScope.push(d);const f=null!==(i=s.context)&&void 0!==i?i:[];f.some((e=>"params"===e.name))||f.push({name:"params"}),d.define(f,c,o);const p=tr(s.formSchema,s.fields,l);return er.includes(p.brick)&&t.events&&(p.events=function(e,t){const n=null!=e?e:{};for(const[e,o]of Object.entries(t))n[e]=(0,u.hasOwnProperty)(n,e)?[n[e],o].flat():o;return n}(p.events,t.events)),"boolean"!=typeof(null===(a=t.properties)||void 0===a?void 0:a.renderRoot)||t.properties.renderRoot?{...t,slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[p]}]}:{...t,slots:void 0,children:[p]}}(_,t,F,L,o)),V.portal&&(F.slotId=void 0),C?(K={...w},delete K.forEachItem,delete K.forEachIndex,delete K.forEachSize):K=w;return j.push((async()=>{const e=vr(V.children,V.slots);if(!e)return;const t=new Map,n=await Promise.all(Object.entries(e).map((async(e,n)=>{let[a,c]=e;if("routes"!==c.type)return ur(F,c.bricks,K,o,r,i,a,s,l);let u={blockingList:[]};const d={tag:Kn.ABSTRACT,return:F};u.node=d;const p=r[r.length-1];null!=p&&p.incrementalSubRoutes&&(t.set(n,a),o.performIncrementalRender(c,r,(async(e,t)=>{const{homepage:n}=K.app,{pathname:s}=e;if(!m(n,s)||!r.every((e=>{let o,r;return(o=zt(e,n,t.pathname))&&(r=zt(e,n,s))&&(e!==p||function(e,t){if((0,h.isEqual)(e,t))return!0;const n=(e,t)=>String(Number(t))===t,o=(0,h.omitBy)(e,n),r=(0,h.omitBy)(t,n);return(0,h.isEqual)(o,r)}(o.params,r.params))})))return!1;const[l,d,f]=hr({...K,location:e,query:new URLSearchParams(e.search)});let g,v=!1,b=[];const y={blockingList:[]},w={tag:Kn.ABSTRACT,return:F};y.node=w;try{if(g=await cr(w,c.routes,l,o,r,i,a,!0),g.route){if(o.reBailout(g))return!0;b=[...d,...f],await pr(g,l,[l.ctxStore,...b])}}catch(e){console.error("Incremental sub-router failed:",e);const t=await o.reCatch(e,w);if(!t)return!0;({failed:v,output:g}=t)}if(F.disposed)return!0;if(w.child=g.node,gr(y,{...g,node:void 0}),await o.reMergeMenuRequestNodes(i,c.routes,g.menuRequestNode),o.reRender(F,w,u.node),u=y,!v){l.ctxStore.mountAsyncData(g.route);for(const e of b)e.mountAsyncData()}return!0})));const g=await cr(d,c.routes,K,o,r,i,a,void 0,l);return d.child=g.node,gr(f,{...g,node:void 0}),mr(i,f.menuRequestNode=g.menuRequestNode),u}))),a={...f,node:void 0,blockingList:[],menuRequestNode:void 0};n.forEach((e=>{gr(a,e),function(e,t){const n=t.menuRequestNode;if(n)if(e.menuRequestNode){let t=e.menuRequestNode;for(;t.sibling;)t=t.sibling;t.sibling=n}else e.menuRequestNode=n}(a,e)})),a.node&&(F.child=a.node),gr(f,{...a,node:void 0}),mr(i,f.menuRequestNode=a.menuRequestNode)})()),await Promise.all(j),f}(e,t,n,o,r,i,a,s,l)}catch(n){if(t.errorBoundary)return console.error("Error caught by error boundary:",n),{node:await sr(n,e),blockingList:[]};throw n}}function fr(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function pr(e,t,n){return(0,c.flushStableLoadBricks)(),Promise.all([...e.blockingList,...n.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function hr(e){const t=[],n=[];return[{...e,tplStateStoreScope:t,formStateStoreScope:n},t,n]}function gr(e,t){const{blockingList:n,node:o,menuRequestNode:r,...i}=t;if(e.blockingList.push(...n),o)if(e.node){let t=e.node;for(;t.sibling;)t=t.sibling;t.sibling=o}else e.node=o;Object.assign(e,i)}function mr(e,t){if(t)if(e.child){let n=e.child;for(;n.sibling;)n=n.sibling;n.sibling=t}else e.child=t}function vr(e,t){let n=t;if(Array.isArray(e)&&!n){n={};for(const{slot:t,...o}of e){const e=null!=t?t:"";(0,u.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]}),n[e].bricks.push(o)}}return n}function br(e,t,n,o){return"silent"===o?e.catch((e=>{console.error('Load %s "%s" failed:',t,n,e)})):e}let yr,wr,Er;function Sr(){if(!yr){if(yr={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){yr.isInIframe=!0;try{if(window.origin===window.parent.origin){yr.isInIframeOfSameSite=!0;const e="/next/"===p(),t=window.parent.location.pathname,n=t.startsWith("/next/");yr.isInIframeOfNext=!(Number(e)^Number(n));const o=n?"/next":"";yr.isInIframeOfVisualBuilder=t.startsWith(`${o}/visual-builder/`)||t.startsWith(`${o}/visual-builder-`),yr.isInIframeOfLegacyConsole=e&&!n}}catch{}}Object.freeze(yr)}return yr}function Ar(e){var t;if(e.$$registerCustomTemplateProcessed)return;e.$$registerCustomTemplateProcessed=!0;const n=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(n))for(const t of n){const n=t.name.includes(".")?t.name:`${e.app.id}.${t.name}`;Ne.define(n,t)}}function kr(e){let t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}const Ir="basic.show-watermark";function Cr(e){return!!e&&(e instanceof c.BrickLoadError||e instanceof R.HttpFetchError||e instanceof Error&&"ChunkLoadError"===e.name||e instanceof Event&&"error"===e.type&&e.target instanceof HTMLScriptElement)}const Rr="reload-for-error-count",Tr=2;function Or(e){if(/upchat/i.test(navigator.userAgent)&&Cr(e)){var t;const e=+(null!==(t=sessionStorage.getItem(Rr))&&void 0!==t?t:0);if(e<Tr)return sessionStorage.setItem(Rr,String(e+1)),!0;_r()}return!1}function _r(){sessionStorage.removeItem(Rr)}var Pr=new WeakMap,Mr=new WeakMap,xr=new WeakMap,Br=new WeakMap,Lr=new WeakMap,$r=new WeakMap,Nr=new WeakMap,Ur=new WeakMap,Fr=new WeakMap,Dr=new WeakMap,jr=new WeakMap,Kr=new WeakMap,Vr=new WeakSet;class Wr{constructor(e){(0,I.A)(this,Vr),(0,i.A)(this,Pr,void 0),(0,i.A)(this,Mr,!1),(0,i.A)(this,xr,void 0),(0,i.A)(this,Br,void 0),(0,i.A)(this,Lr,void 0),(0,i.A)(this,$r,new Set),(0,i.A)(this,Nr,0),(0,i.A)(this,Ur,void 0),(0,i.A)(this,Fr,void 0),(0,i.A)(this,Dr,void 0),(0,i.A)(this,jr,void 0),(0,i.A)(this,Kr,!1),(0,a.A)(Pr,this,e);const t=k();window.addEventListener("beforeunload",(e=>{(0,C.A)(Vr,this,zr).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,C.A)(Vr,this,zr).call(this,{location:e,action:t})))}getRenderId(){return(0,s.A)(Ur,this)}getRuntimeContext(){return(0,s.A)(Br,this)}getRecentApps(){return{currentApp:(0,s.A)(Fr,this),previousApp:(0,s.A)(Dr,this)}}getNavConfig(){return(0,s.A)(jr,this)}bootstrap(){window.AbortController&&(wr=new AbortController,R.http.interceptors.request.use((e=>{var t;return{...e,options:{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:wr.signal,...e.options}}})));const e=k();let t=e.location;return e.listen(((e,n)=>{const o=t;t=e,(0,s.A)(Mr,this)?(0,a.A)(xr,this,{location:e,prevLocation:o,action:n}):(0,C.A)(Vr,this,Hr).call(this,{location:e,prevLocation:o,action:n}).catch(fn)})),(0,C.A)(Vr,this,Hr).call(this,{location:e.location})}}function zr(e){var t;const n=k(),o=n.getBlockMessage();null===(t=(0,s.A)(Lr,this))||void 0===t||t.dispatchBeforePageLeave(e);const r=n.getBlockMessage();return!o&&r&&n.unblock(),r}function Gr(e,t,n){var o,r;if((0,a.A)(Nr,this,(o=(0,s.A)(Nr,this),r=o++,o)),r>10){const t=`Infinite redirect detected: from "${n.pathname}${n.search}${n.hash}" to "${e}"`;throw new Error(t)}k().replace(e,t)}async function Hr(e){(0,a.A)(Mr,this,!0);try{await(0,C.A)(Vr,this,qr).call(this,e)}finally{if((0,a.A)(Mr,this,!1),(0,s.A)(xr,this)){const e=(0,s.A)(xr,this);(0,a.A)(xr,this,void 0),await(0,C.A)(Vr,this,Hr).call(this,e)}}}async function qr(e){let{location:t,prevLocation:n,action:o}=e;if(n){var r,i,a,l;let e;const u={hash:void 0,state:void 0};var c;if(void 0!==t.key&&("POP"!==o||void 0!==n.key&&!1!==(null===(r=n.state)||void 0===r?void 0:r.notify))||(u.key=void 0),((0,f.locationsAreEqual)({...n,...u},{...t,...u})||"POP"!==o&&!1===(null===(i=t.state)||void 0===i?void 0:i.notify))&&(e=!0),e||null!==(a=t.state)&&void 0!==a&&a.noIncremental||(0,s.A)(Kr,this)||(e=await(null===(c=(0,s.A)(Lr,this))||void 0===c?void 0:c.didPerformIncrementalRender(t,n))),e)return;if(wr&&(wr.abort(),wr=new AbortController),null===(l=(0,s.A)(Lr,this))||void 0===l||l.dispatchPageLeave(),"POP"===o&&v(g((0,s.A)(Pr,this),t.pathname)))return void window.location.reload();V("locationChange")}return(0,C.A)(Vr,this,Xr).call(this,t,!n)}async function Xr(e,t){var n,o,r,i,l,u;const d=(0,a.A)(Ur,this,(0,h.uniqueId)("render-id-"));let f=null==Oi||null===(n=Oi.auth)||void 0===n||null===(o=n.isBlockedPath)||void 0===o?void 0:o.call(n,e.pathname);rt=new WeakSet,st.clear(),null==Oi||null===(r=Oi.flowApi)||void 0===r||r.clearCollectWidgetContract(),k().unblock();const p=null==Oi||null===(i=Oi.pageView)||void 0===i?void 0:i.create(),m=f?void 0:g((0,s.A)(Pr,this),e.pathname),v=null===(l=(0,s.A)(Br,this))||void 0===l?void 0:l.app,b=null==m||null===(u=m.app)||void 0===u?void 0:u.id;window.BOOTSTRAP_UNION_FILE&&b&&b!==(null==v?void 0:v.id)&&function(e){const{appId:t,version:n}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",n))}({appId:b,version:m.app.currentVersion}),null!=m&&m.app&&await async function(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=async function(e){var t;await(null==Oi||null===(t=Oi.fulfilStoryboard)||void 0===t?void 0:t.call(Oi,e)),B(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}(e)),e.$$fulfilling}(m);const y=(0,a.A)(Fr,this,null==m?void 0:m.app);var w,E,S,A;y&&(null==m||null===(w=m.meta)||void 0===w||null===(w=w.blackList)||void 0===w||null===(E=w.forEach)||void 0===E||E.call(w,(e=>{var t,n;let o=e&&(e.to||e.url);if(o&&"string"==typeof o){if(o=o.split("?")[0].replace(/\${\s*(?:(?:PATH|CTX)\.)?(\w+)\s*}/g,":$1"),e.to)try{o=kt(o,{app:y})}catch(e){console.error(e)}else o=o.replace(/^\/next\//,"/");o&&(null==Oi||null===(t=Oi.auth)||void 0===t||null===(n=t.addPathToBlackList)||void 0===n||n.call(t,o))}})),f=null==Oi||null===(S=Oi.auth)||void 0===S||null===(A=S.isBlockedPath)||void 0===A?void 0:A.call(S,e.pathname)),function(){var e,t,n,o,r,i,a,s;const l=Pi().getFeatureFlags(),u=Pi().getMiscSettings();if(!l["show-watermark"])return;const d="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),f=null!==(n=null==Oi||null===(o=Oi.auth)||void 0===o||null===(o=o.getAuth())||void 0===o?void 0:o.username)&&void 0!==n?n:"",p=null!==(r=u.watermarkConfig)&&void 0!==r?r:{flags:{}},g=[..."string"==typeof p.content?[p.content]:null!==(i=p.content)&&void 0!==i?i:[],null!==(a=p.flags)&&void 0!==a&&a["show-development"]&&d?"Development":"",null!==(s=p.flags)&&void 0!==s&&s["show-user"]?f:""].filter(Boolean);if(0===g.length)return;const m={content:g,zIndex:1001,width:200,font:{fontSize:28},gap:[190,190],...(0,h.omit)(p,["content","flags"])};Er?Er.resolve(m):(0,c.loadBricksImperatively)([Ir],Li()).then((()=>{Er=document.createElement(Ir),Er.resolve(m)}),(e=>{console.error("Load watermark service failed:",e)}))}();const I=v&&y?v.id!==y.id:v!==y;(0,T.clearExpressionASTCache)(),I&&(0,T.clearFunctionASTCache)();const O=Pi().getFeatureFlags(),_=(0,s.A)(Lr,this),P=(t,n)=>{null==p||p({status:"redirected"}),(0,s.A)($r,this).add(_),(0,C.A)(Vr,this,Gr).call(this,t,n,e)},M=()=>{const t=O["sso-enabled"]?"/sso-auth/login":"/auth/login";an(e),P(t,{from:e})},x=document.querySelector("#main-mount-point"),L=document.querySelector("#portal-mount-point"),$={tag:Kn.ROOT,container:x,createPortal:L},N=()=>{var e;Vn(x),Vn(L),(0,s.A)($r,this).add(_);for(const e of(0,s.A)($r,this))e&&(e.dispatchOnUnmount(),e.dispose());(0,s.A)($r,this).clear(),null==Oi||null===(e=Oi.messageDispatcher)||void 0===e||e.reset(),I&&((0,a.A)(Dr,this,v),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:v,currentApp:y}})))};if(Q(y&&(oe()[y.id]||y.theme)||"light"),ie("default"),ue(Pi().getMiscSettings().globalThemeVariant),y&&!f){var U,F,D,j,K,W;null==Oi||null===(U=Oi.checkInstalledApps)||void 0===U||U.preCheckInstalledApps(m,(e=>!!Di(e)));const n={bailout:e=>e.unauthenticated?(M(),!0):e.redirect?(P(e.redirect.path,e.redirect.state),!0):void(0,a.A)(Nr,this,0),mergeMenus:async e=>{const t=await Promise.all(e);(0,a.A)(jr,this,function(e){const t={breadcrumb:[]};for(const n of e){const{breadcrumb:e}=n;e&&(e.overwrite?t.breadcrumb=e.items:t.breadcrumb.push(...e.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,s.A)(jr,this)}))},catch:async(t,n,o,r)=>{if(!ln(t)||window.NO_AUTH_GUARD){if(!(t instanceof R.HttpAbortError)){const i=Pi().getMiscSettings().noAuthGuardLoginPath;if(ln(t)&&i)return void P(i,{from:e});if(o)throw t;return!r&&Or(t)?void window.location.reload():{failed:!0,output:{node:await sr(t,n,!r),blockingList:[]}}}(0,s.A)($r,this).add(_)}else M()}},o=(0,a.A)(Lr,this,new no("page",{routeHelper:n,renderId:d})),r=(0,a.A)(Br,this,{app:y,location:e,query:new URLSearchParams(e.search),flags:O,sys:{...null==Oi||null===(F=Oi.auth)||void 0===F?void 0:F.getAuth(),...Sr(),settings:{brand:Pi().getBrandSettings()}},ctxStore:new zo("CTX",void 0,o),pendingPermissionsPreCheck:[null==Oi||null===(D=Oi.checkPermissions)||void 0===D?void 0:D.preCheckPermissions(m)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,a.A)(jr,this,void 0),Ar(m),ye(null===(j=m.meta)||void 0===j?void 0:j.functions,y),null==Oi||null===(K=Oi.flowApi)||void 0===K||K.collectContract(null===(W=m.meta)||void 0===W?void 0:W.contracts);let i,l=!1,c=[];try{fo.clear();const e={};if(i=await cr($,function(e){if(window.parent===window)return e;let t=e;const n=(0,h.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)];const o=(0,h.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return t=[...t.slice(0,o+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(o+1)],t}(m.routes),r,o,[],e),n.bailout(i))return;c=fr(r),await pr(i,r,c),e.child=i.menuRequestNode,o.setInitialMenuRequestNode(e),await n.mergeMenus(o.getMenuRequests())}catch(e){console.error("Router failed:",e),t&&(0,a.A)(Kr,this,!0);const o=await n.catch(e,$,t);if(!o)return;({failed:l,output:i}=o)}if(_r(),$.child=i.node,(0,a.A)(Kr,this,!1),N(),i.route&&"routes"!==i.route.type||l){if(l||o.dispatchBeforePageLoad(),te(),se(),kr(null==y?void 0:y.uiVersion),Wn($),window.scrollTo(0,0),l)null==p||p({status:"failed"});else{o.dispatchPageLoad(),o.dispatchAnchorLoad(),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher();for(const e of c)e.mountAsyncData();null==p||p({status:"ok",path:i.path,pageTitle:document.title})}return void V("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=Oi&&Oi.auth&&!Oi.auth.isLoggedIn())return void M();N()}te(),se();const z=await sr(new ar(f?"page blocked":y?"page not found":"app not found"),$,!0);$.child=z,Wn($),window.scrollTo(0,0),null==p||p({status:f?"blocked":"not-found"}),V("rendered")}const Yr="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function Jr(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function Qr(e){return e<=1?"".concat(100*Number(e),"%"):e}function Zr(e){return 1===e.length?"0"+e:String(e)}function ei(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ti(e){return ni(e)/255}function ni(e){return parseInt(e,16)}var oi={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ri(e){var t,n,o,r={r:0,g:0,b:0},i=1,a=null,s=null,l=null,c=!1,u=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(oi[e])e=oi[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=li.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=li.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=li.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=li.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=li.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=li.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=li.hex8.exec(e))?{r:ni(n[1]),g:ni(n[2]),b:ni(n[3]),a:ti(n[4]),format:t?"name":"hex8"}:(n=li.hex6.exec(e))?{r:ni(n[1]),g:ni(n[2]),b:ni(n[3]),format:t?"name":"hex"}:(n=li.hex4.exec(e))?{r:ni(n[1]+n[1]),g:ni(n[2]+n[2]),b:ni(n[3]+n[3]),a:ti(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=li.hex3.exec(e))&&{r:ni(n[1]+n[1]),g:ni(n[2]+n[2]),b:ni(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(ci(e.r)&&ci(e.g)&&ci(e.b)?(t=e.r,n=e.g,o=e.b,r={r:255*Jr(t,255),g:255*Jr(n,255),b:255*Jr(o,255)},c=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):ci(e.h)&&ci(e.s)&&ci(e.v)?(a=Qr(e.s),s=Qr(e.v),r=function(e,t,n){e=6*Jr(e,360),t=Jr(t,100),n=Jr(n,100);var o=Math.floor(e),r=e-o,i=n*(1-t),a=n*(1-r*t),s=n*(1-(1-r)*t),l=o%6;return{r:255*[n,a,i,i,s,n][l],g:255*[s,n,n,a,i,i][l],b:255*[i,i,s,n,n,a][l]}}(e.h,a,s),c=!0,u="hsv"):ci(e.h)&&ci(e.s)&&ci(e.l)&&(a=Qr(e.s),l=Qr(e.l),r=function(e,t,n){var o,r,i;if(e=Jr(e,360),t=Jr(t,100),n=Jr(n,100),0===t)r=n,i=n,o=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;o=ei(s,a,e+1/3),r=ei(s,a,e),i=ei(s,a,e-1/3)}return{r:255*o,g:255*r,b:255*i}}(e.h,a,l),c=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(i),{ok:c,format:e.format||u,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:i}}var ii="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),ai="[\\s|\\(]+(".concat(ii,")[,|\\s]+(").concat(ii,")[,|\\s]+(").concat(ii,")\\s*\\)?"),si="[\\s|\\(]+(".concat(ii,")[,|\\s]+(").concat(ii,")[,|\\s]+(").concat(ii,")[,|\\s]+(").concat(ii,")\\s*\\)?"),li={CSS_UNIT:new RegExp(ii),rgb:new RegExp("rgb"+ai),rgba:new RegExp("rgba"+si),hsl:new RegExp("hsl"+ai),hsla:new RegExp("hsla"+si),hsv:new RegExp("hsv"+ai),hsva:new RegExp("hsva"+si),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ci(e){return Boolean(li.CSS_UNIT.exec(String(e)))}var ui=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function di(e){var t=function(e,t,n){e=Jr(e,255),t=Jr(t,255),n=Jr(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,a=o,s=o-r,l=0===o?0:s/o;if(o===r)i=0;else{switch(o){case e:i=(t-n)/s+(t<n?6:0);break;case t:i=(n-e)/s+2;break;case n:i=(e-t)/s+4}i/=6}return{h:i,s:l,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function fi(e){var t=e.r,n=e.g,o=e.b;return"#".concat(function(e,t,n){var o=[Zr(Math.round(e).toString(16)),Zr(Math.round(t).toString(16)),Zr(Math.round(n).toString(16))];return o.join("")}(t,n,o))}function pi(e,t,n){var o;return(o=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?o+=360:o>=360&&(o-=360),o}function hi(e,t,n){return 0===e.h&&0===e.s?e.s:((o=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(o=1),n&&5===t&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2)));var o}function gi(e,t,n){var o;return(o=n?e.v+.05*t:e.v-.15*t)>1&&(o=1),Number(o.toFixed(2))}function mi(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],o=ri(e),r=5;r>0;r-=1){var i=di(o),a=fi(ri({h:pi(i,r,!0),s:hi(i,r,!0),v:gi(i,r,!0)}));n.push(a)}n.push(fi(o));for(var s=1;s<=4;s+=1){var l=di(o),c=fi(ri({h:pi(l,s),s:hi(l,s),v:gi(l,s)}));n.push(c)}return"dark"===t.theme?ui.map((function(e){var o,r,i,a=e.index,s=e.opacity;return fi((o=ri(t.backgroundColor||"#141414"),i=100*s/100,{r:((r=ri(n[a])).r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b}))})):n}var vi={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},bi={},yi={};function wi(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function Ei(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function Si(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function Ai(e,t,n){return"dark"===t?mi(e,{theme:t,backgroundColor:n})[5]:e}function ki(e){const t=[];if(["light","dark"].forEach((n=>{if(e[n])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?Ei:wi)("string"==typeof(n=t)?" --color-brand: ".concat(n,";\n"):[" --color-brand: ".concat(n.default,";")," --color-brand-hover: ".concat(n.hover,";")," --color-brand-active: ".concat(n.active,";"),""].join("\n"));var n}(n,e[n]));break;case"baseColors":t.push(function(e,t,n){return("dark"===e?Ei:wi)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[n,o]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(n),o.map(((e,o)=>[" --palette-".concat(n,"-").concat(o+1,"-channel: ").concat(Si(e),";")].concat("dark"===t?[]:" --palette-".concat(n,"-").concat(o+1,": rgb(var(--palette-").concat(n,"-").concat(o+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,n){return Object.fromEntries(Object.entries(e).map((e=>{var[o,r]=e;return[o,mi(r,"dark"===t?{theme:t,backgroundColor:n}:void 0)]})))}(t,e,n),e),"\n").concat(function(e,t,n){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((o=>{var[r,i]=o;return[" --theme-".concat(r,"-color-rgb-channel: ").concat(Si(Ai(t[i],e,n)),";"),..."dark"===e?[]:[" --theme-".concat(r,"-color: var(--palette-").concat(i,"-6);")," --theme-".concat(r,"-border-color: var(--palette-").concat(i,"-3);")]," --theme-".concat(r,"-background: var(--palette-").concat(i,"-").concat("dark"===e?2:1,");"),""]})).join("\n")}(e,t,n)))}(n,e[n],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?Ei:wi)(function(e){return Object.entries(e).map((e=>{var[t,n]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(n,";")})).concat("").join("\n")}(t))}(n,e[n]))}})),t.length>0){const e=document.createElement("style");return e.textContent=t.join("\n\n"),document.head.appendChild(e),()=>{e.remove()}}}let Ii,Ci,Ri,Ti,Oi;function _i(e){if(Ii)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{let{data:t}=e;if((null==t?void 0:t.source)!==U)return;const n=t.payload;switch(null==n?void 0:n.type){case F:K=n.active;break;case D:j=n.panel}})),Oi=null==e?void 0:e.hooks,(0,l.initializeI18n)(tn,nn),d.locale(l.i18n.language),l.i18n.on("languageChanged",(()=>{d.locale(l.i18n.language)})),A(),Ii=new Bi,Ii}Object.keys(vi).forEach((function(e){bi[e]=mi(vi[e]),bi[e].primary=bi[e][5],yi[e]=mi(vi[e],{theme:"dark",backgroundColor:"#141414"}),yi[e].primary=yi[e][5]})),bi.red,bi.volcano,bi.gold,bi.orange,bi.yellow,bi.lime,bi.green,bi.cyan,bi.blue,bi.geekblue,bi.purple,bi.magenta,bi.grey;const Pi=function(){const e=S();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return Ii};var Mi=new WeakMap,xi=new WeakMap;class Bi{constructor(){(0,i.A)(this,Mi,!1),(0,i.A)(this,xi,!1),(0,r.A)(this,"version",3)}initialize(e){var t;if((0,s.A)(Mi,this))throw new Error("The runtime cannot be initialized more than once");(0,a.A)(Mi,this,!0),function(e){(0,u.isObject)(e.settings)&&(0,u.deepFreeze)(e.settings),e.brickPackages&&(0,u.deepFreeze)(e.brickPackages)}(e),Ci=e;const{notification:n,dialog:o}=$i();var r;!1!==n&&(r=null!=n?n:"basic.show-notification",(0,this.loadBricks)([r]).then((()=>{un=document.createElement(r)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==o&&function(e,t){t([e]).then((()=>{on=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=o?o:"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?ki({type:"brandColor",...e.brandColor}):e.baseColors?ki({type:"baseColors",...e.baseColors}):e.variables&&ki({type:"variables",...e.variables}))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}async bootstrap(e){if(e&&this.initialize(e),(0,s.A)(xi,this))throw new Error("The runtime cannot be bootstrapped more than once");(0,a.A)(xi,this,!0),Ri=new Wr(Ci.storyboards),await Ri.bootstrap()}getRecentApps(){var e,t;return null!==(e=null===(t=Ri)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=Ri)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return et(e,t)}getFeatureFlags(){var e,t;return{...null===(e=Ci)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags,...null===(t=Ri)||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{...null===(e=Ci)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc,...null===(t=Ri)||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{base_title:"DevOps 管理专家",...null===(e=Ci)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand}}getLaunchpadSettings(){var e;return{columns:7,rows:4,...null===(e=Ci)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad}}getDesktops(){var e,t;return null!==(e=null===(t=Ci)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=Ci)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t;const n=this.getBrandSettings().base_title;document.title=(null===(t=Ri)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t?void 0:t.localeTitle)||(e?`${e} - ${n}`:n)}getNavConfig(){var e;return null===(e=Ri)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,c.loadBricksImperatively)(e,Li())}}function Li(){var e,t,n,o;return null!=Ti?Ti:Ti=function(e,t){if(null==t||!t.length)return e;const n=new Map;return[...t,...e].forEach((e=>{const t=e.filePath.split("/")[1];n.has(t)||n.set(t,e)})),Array.from(n.values())}(null!==(e=null!==(t=null!==(n=null===(o=Ci)||void 0===o?void 0:o.brickPackages)&&void 0!==n?n:Yr)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[],window.PUBLIC_DEPS)}function $i(){var e,t;return null!==(e=null===(t=Ci)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.presetBricks)&&void 0!==e?e:{}}function Ni(){var e;return null===(e=Ri)||void 0===e?void 0:e.getRenderId()}function Ui(){var e;return null===(e=Ri)||void 0===e?void 0:e.getRuntimeContext()}function Fi(e){var t;return null===(t=Ci)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function Di(e){var t;return null===(t=Fi(e))||void 0===t?void 0:t.app}function ji(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];null==Oi||null===(e=Oi.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...o)}function Ki(){var e;return null==Oi||null===(e=Oi.auth)||void 0===e?void 0:e.getAuth()}function Vi(){var e,t;return null==Oi||null===(e=Oi.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function Wi(){var e;return null==Oi||null===(e=Oi.auth)||void 0===e?void 0:e.isLoggedIn()}var zi=new WeakMap;const Gi=new class{constructor(){(0,i.A)(this,zi,new Map)}define(e,t){(0,s.A)(zi,this).has(e)?console.error(`Custom editor of "${e}" already registered`):(0,s.A)(zi,this).set(e,t)}get(e){return(0,s.A)(zi,this).get(e)}};async function Hi(e,t,n){return ct(await ot(e),e,"resolve",t,n)}function qi(e){let t,{portal:n,scope:o="fragment",unknownBricks:r,supportsUseChildren:i,unsafe_penetrate:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=n;t=n||(()=>(s=document.createElement("div"),s.style.position="absolute",s.style.width=s.style.height="0",document.body.append(s),s));let c,u,d=!1;const f="page"===o?void 0:Symbol("IsolatedRoot");return{async render(n){let{theme:p,uiVersion:g,language:m,context:v,functions:b,templates:y,i18n:w,url:E,app:S}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(d)throw new Error("The root is unmounted and cannot be rendered any more");const A=[].concat(n);if(i){(0,O.replaceUseChildren)(A);for(const e of null!=y?y:[])Array.isArray(e.bricks)&&(0,O.replaceUseChildren)(e.bricks)}const k=c,I=(0,h.uniqueId)("render-id-");c=new no(o,{unknownBricks:r,renderId:I});const C={ctxStore:new zo("CTX",void 0,c),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map,isolatedRoot:f,unsafe_penetrate:a};if(E){const e=new URL(E);C.query=e.searchParams,C.location={pathname:e.pathname,search:e.search,hash:e.hash,state:void 0}}const R={tag:Kn.ROOT,container:e,createPortal:t};if("page"===o){var T;Q(null!=p?p:"light"),ie("default"),kr(g),m&&await l.i18n.changeLanguage(m),null!=S||(S={id:"demo",homepage:"/demo"}),C.app=S;const e={app:S,meta:{i18n:w,customTemplates:y}};null===(T=u)||void 0===T||T(),u=B(e),Ar(e),ye(b,S)}else!function(e,t){let n=Ue.get(e);if(n||(n=new $e(!0),Ue.set(e,n)),n.clearIsolatedRegistry(),Array.isArray(t))for(const e of t)n.define(e.name,e)}(f,y),function(e,t){const{storyboardFunctions:n,registerStoryboardFunctions:o}=ve({isolatedRoot:e});fe.set(e,n),o(t)}(f,b);C.ctxStore.define(v,C);let _,P=!1,M=[];try{_=await ur(R,A,C,c,[],{}),M=fr(C),await pr(_,C,M)}catch(e){P=!0,_={node:await sr(e,R,"page"===o),blockingList:[]}}if(R.child=_.node,null==k||k.dispatchOnUnmount(),null==k||k.dispose(),Vn(e),s&&Vn(s),"page"===o&&(P||c.dispatchBeforePageLoad(),te(),se()),Wn(R),"page"===o&&window.scrollTo(0,0),!P){for(const e of M)e.mountAsyncData();"page"===o&&c.dispatchPageLoad(),c.dispatchOnMount(),c.initializeScrollIntoView(),c.initializeMediaChange(),c.initializeMessageDispatcher()}},unmount(){d||(d=!0,f&&(fe.delete(f),Ue.delete(f)),Vn(e),s&&(Vn(s),n||s.remove()))}}}function Xi(e){let{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...Ui()};t&&(n.query=new URLSearchParams(k().location.search));const o=t=>{if("string"==typeof t){if((0,T.isEvaluable)(t)){const e=vt(t,n);return it(e),e}return(0,_.inject)(t,n)}return!(0,u.isObject)(t)||at(e)?t:Array.isArray(t)?t.map((e=>o(e))):Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[o(t),o(n)]})))};return o(e)}const Yi=[];function Ji(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3,t=-1;const n=()=>{if(t>-1){const e=Yi.indexOf(t);e>-1&&Yi.splice(e,1)}};return{push:()=>{var o;return n(),t=(null!==(o=Yi[Yi.length-1])&&void 0!==o?o:-1)+1,Yi.push(t),t+e},pull:n}}},70829:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(12559);function r(e,t){return e.get((0,o.A)(e,t))}},70918:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(72016);function r(e,t,n){(0,o.A)(e,t),t.set(e,n)}},72016:(e,t,n)=>{function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>o})},74635:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(72016);function r(e,t){(0,o.A)(e,t),t.add(e)}},86121:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(12559);function r(e,t,n){return e.set((0,o.A)(e,t),n),n}}}]);
|
|
3
|
-
//# sourceMappingURL=948.d125d58c.js.map
|