@next-bricks/data-view 0.2.0 → 0.3.0

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.
Files changed (123) hide show
  1. package/dist/bricks.json +5 -3
  2. package/dist/chunks/{1646.c6fb10b9.js → 1646.840ff4cb.js} +2 -2
  3. package/dist/chunks/1646.840ff4cb.js.map +1 -0
  4. package/dist/chunks/2323.d18e8952.js +2 -0
  5. package/dist/chunks/2323.d18e8952.js.map +1 -0
  6. package/dist/chunks/2618.68a01967.js +2 -0
  7. package/dist/chunks/2618.68a01967.js.map +1 -0
  8. package/dist/chunks/{3494.f3d54505.js → 3494.d359914f.js} +2 -2
  9. package/dist/chunks/{3494.f3d54505.js.map → 3494.d359914f.js.map} +1 -1
  10. package/dist/chunks/{353.aaa52aa5.js → 353.379af925.js} +2 -2
  11. package/dist/chunks/{353.aaa52aa5.js.map → 353.379af925.js.map} +1 -1
  12. package/dist/chunks/4454.3c78522e.js +2 -0
  13. package/dist/chunks/4454.3c78522e.js.map +1 -0
  14. package/dist/chunks/{4512.6ed82117.js → 4512.a6f07874.js} +2 -2
  15. package/dist/chunks/{4512.6ed82117.js.map → 4512.a6f07874.js.map} +1 -1
  16. package/dist/chunks/4728.fb9d912a.js +2 -0
  17. package/dist/chunks/4728.fb9d912a.js.map +1 -0
  18. package/dist/chunks/5151.f76b1f6a.js +2 -0
  19. package/dist/chunks/5151.f76b1f6a.js.map +1 -0
  20. package/dist/chunks/{5636.ed10ef34.js → 5636.6a5194f2.js} +2 -2
  21. package/dist/chunks/{5636.ed10ef34.js.map → 5636.6a5194f2.js.map} +1 -1
  22. package/dist/chunks/5746.0603bcc0.js +3 -0
  23. package/dist/chunks/5746.0603bcc0.js.map +1 -0
  24. package/dist/chunks/6205.ad762e76.js +2 -0
  25. package/dist/chunks/{6205.de9bf2ba.js.map → 6205.ad762e76.js.map} +1 -1
  26. package/dist/chunks/7164.679a698f.js +2 -0
  27. package/dist/chunks/{7164.4bb29d10.js.map → 7164.679a698f.js.map} +1 -1
  28. package/dist/chunks/7746.ad47a983.js +2 -0
  29. package/dist/chunks/7746.ad47a983.js.map +1 -0
  30. package/dist/chunks/{7822.c3e6d531.js → 7822.4a63fdd3.js} +2 -2
  31. package/dist/chunks/{7822.c3e6d531.js.map → 7822.4a63fdd3.js.map} +1 -1
  32. package/dist/chunks/{7915.0bf6d068.js → 7915.f3e0ede9.js} +2 -2
  33. package/dist/chunks/{7915.0bf6d068.js.map → 7915.f3e0ede9.js.map} +1 -1
  34. package/dist/chunks/{8008.00ab7560.js → 8008.a58de07d.js} +3 -3
  35. package/dist/chunks/{8008.00ab7560.js.map → 8008.a58de07d.js.map} +1 -1
  36. package/dist/chunks/8196.667392f2.js +2 -0
  37. package/dist/chunks/8196.667392f2.js.map +1 -0
  38. package/dist/chunks/873.b84ce056.js +2 -0
  39. package/dist/chunks/873.b84ce056.js.map +1 -0
  40. package/dist/chunks/8843.dcd562e8.js +3 -0
  41. package/dist/chunks/8843.dcd562e8.js.map +1 -0
  42. package/dist/chunks/app-wall-card-item.74fb1221.js +3 -0
  43. package/dist/chunks/{app-wall-card-item.840fb3f9.js.map → app-wall-card-item.74fb1221.js.map} +1 -1
  44. package/dist/chunks/app-wall-relation-line.ff4dd4fc.js +3 -0
  45. package/dist/chunks/app-wall-relation-line.ff4dd4fc.js.map +1 -0
  46. package/dist/chunks/app-wall-system-card.331f8176.js +3 -0
  47. package/dist/chunks/app-wall-system-card.331f8176.js.map +1 -0
  48. package/dist/chunks/battery-chart.658a3780.js +2 -0
  49. package/dist/chunks/{battery-chart.2c991e97.js.map → battery-chart.658a3780.js.map} +1 -1
  50. package/dist/chunks/complex-search.c4405533.js +2 -0
  51. package/dist/chunks/{complex-search.e5ad7ef3.js.map → complex-search.c4405533.js.map} +1 -1
  52. package/dist/chunks/dropdown-menu.43f26f9a.js +3 -0
  53. package/dist/chunks/{dropdown-menu.2681372b.js.map → dropdown-menu.43f26f9a.js.map} +1 -1
  54. package/dist/chunks/gauge-chart.0ae3f129.js +2 -0
  55. package/dist/chunks/{gauge-chart.5c4ba6a4.js.map → gauge-chart.0ae3f129.js.map} +1 -1
  56. package/dist/chunks/loading-panel.c495be3f.js +2 -0
  57. package/dist/chunks/{loading-panel.c594808c.js.map → loading-panel.c495be3f.js.map} +1 -1
  58. package/dist/chunks/main.8488fbc4.js +2 -0
  59. package/dist/chunks/{main.887a6193.js.map → main.8488fbc4.js.map} +1 -1
  60. package/dist/chunks/modern-style-component-title.389445d4.js +2 -0
  61. package/dist/chunks/{modern-style-component-title.e8b2aa60.js.map → modern-style-component-title.389445d4.js.map} +1 -1
  62. package/dist/chunks/modern-style-page-title.ca489473.js +2 -0
  63. package/dist/chunks/{modern-style-page-title.9290bacc.js.map → modern-style-page-title.ca489473.js.map} +1 -1
  64. package/dist/chunks/modern-style-treemap.8cfc03bf.js +2 -0
  65. package/dist/chunks/{modern-style-treemap.025c61b9.js.map → modern-style-treemap.8cfc03bf.js.map} +1 -1
  66. package/dist/chunks/particle-animation.39f3cafa.js +2 -0
  67. package/dist/chunks/particle-animation.39f3cafa.js.map +1 -0
  68. package/dist/chunks/tabs-drawer.9ae3c94a.js +3 -0
  69. package/dist/chunks/tabs-drawer.9ae3c94a.js.LICENSE.txt +5 -0
  70. package/dist/chunks/{tabs-drawer.a75dc490.js.map → tabs-drawer.9ae3c94a.js.map} +1 -1
  71. package/dist/index.710e5862.js +2 -0
  72. package/dist/index.710e5862.js.map +1 -0
  73. package/dist-types/app-wall/relation-line/index.d.ts +24 -0
  74. package/dist-types/app-wall/relation-line/index.spec.d.ts +1 -0
  75. package/dist-types/bootstrap.d.ts +1 -0
  76. package/package.json +13 -12
  77. package/dist/chunks/1646.c6fb10b9.js.map +0 -1
  78. package/dist/chunks/2323.5185fa60.js +0 -2
  79. package/dist/chunks/2323.5185fa60.js.map +0 -1
  80. package/dist/chunks/2618.a2399464.js +0 -2
  81. package/dist/chunks/2618.a2399464.js.map +0 -1
  82. package/dist/chunks/2951.57059430.js +0 -3
  83. package/dist/chunks/2951.57059430.js.map +0 -1
  84. package/dist/chunks/4454.25db2c7a.js +0 -2
  85. package/dist/chunks/4454.25db2c7a.js.map +0 -1
  86. package/dist/chunks/4728.b40327c9.js +0 -2
  87. package/dist/chunks/4728.b40327c9.js.map +0 -1
  88. package/dist/chunks/5151.f19f99d2.js +0 -2
  89. package/dist/chunks/5151.f19f99d2.js.map +0 -1
  90. package/dist/chunks/6205.de9bf2ba.js +0 -2
  91. package/dist/chunks/7164.4bb29d10.js +0 -2
  92. package/dist/chunks/7746.2d8b6f17.js +0 -2
  93. package/dist/chunks/7746.2d8b6f17.js.map +0 -1
  94. package/dist/chunks/873.58c2e4d7.js +0 -2
  95. package/dist/chunks/873.58c2e4d7.js.map +0 -1
  96. package/dist/chunks/9685.b7dafab6.js +0 -3
  97. package/dist/chunks/9685.b7dafab6.js.map +0 -1
  98. package/dist/chunks/991.42fd7b7b.js +0 -2
  99. package/dist/chunks/991.42fd7b7b.js.map +0 -1
  100. package/dist/chunks/app-wall-card-item.840fb3f9.js +0 -3
  101. package/dist/chunks/app-wall-system-card.2a19da39.js +0 -3
  102. package/dist/chunks/app-wall-system-card.2a19da39.js.map +0 -1
  103. package/dist/chunks/battery-chart.2c991e97.js +0 -2
  104. package/dist/chunks/complex-search.e5ad7ef3.js +0 -2
  105. package/dist/chunks/dropdown-menu.2681372b.js +0 -3
  106. package/dist/chunks/gauge-chart.5c4ba6a4.js +0 -2
  107. package/dist/chunks/loading-panel.c594808c.js +0 -2
  108. package/dist/chunks/main.887a6193.js +0 -2
  109. package/dist/chunks/modern-style-component-title.e8b2aa60.js +0 -2
  110. package/dist/chunks/modern-style-page-title.9290bacc.js +0 -2
  111. package/dist/chunks/modern-style-treemap.025c61b9.js +0 -2
  112. package/dist/chunks/particle-animation.37f88acb.js +0 -2
  113. package/dist/chunks/particle-animation.37f88acb.js.map +0 -1
  114. package/dist/chunks/tabs-drawer.a75dc490.js +0 -3
  115. package/dist/index.d5a4d33a.js +0 -2
  116. package/dist/index.d5a4d33a.js.map +0 -1
  117. /package/dist/chunks/{9685.b7dafab6.js.LICENSE.txt → 5746.0603bcc0.js.LICENSE.txt} +0 -0
  118. /package/dist/chunks/{8008.00ab7560.js.LICENSE.txt → 8008.a58de07d.js.LICENSE.txt} +0 -0
  119. /package/dist/chunks/{2951.57059430.js.LICENSE.txt → 8843.dcd562e8.js.LICENSE.txt} +0 -0
  120. /package/dist/chunks/{app-wall-card-item.840fb3f9.js.LICENSE.txt → app-wall-card-item.74fb1221.js.LICENSE.txt} +0 -0
  121. /package/dist/chunks/{app-wall-system-card.2a19da39.js.LICENSE.txt → app-wall-relation-line.ff4dd4fc.js.LICENSE.txt} +0 -0
  122. /package/dist/chunks/{dropdown-menu.2681372b.js.LICENSE.txt → app-wall-system-card.331f8176.js.LICENSE.txt} +0 -0
  123. /package/dist/chunks/{tabs-drawer.a75dc490.js.LICENSE.txt → dropdown-menu.43f26f9a.js.LICENSE.txt} +0 -0
@@ -1,3 +0,0 @@
1
- /*! For license information please see 2951.57059430.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[2951],{5863:(e,t,r)=>{function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{Z:()=>n})},175:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Z:()=>n})},687:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(175);function a(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,n.Z)(e,t,"get"))}},3395:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(5863);function a(e,t,r){(0,n.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(175);function a(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,(0,n.Z)(e,t,"set"),r),r}},6171:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r.d(t,{Z:()=>n})},5866:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(5863);function a(e,t){(0,n.Z)(e,t),t.add(e)}},6666:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(5850);function a(e,t,r){return(t=(0,n.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},3028:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(6666);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},2159:(e,t,r)=>{function n(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.d(t,{Z:()=>n})},5850:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(6522);function a(e){var t=function(e,t){if("object"!==(0,n.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==(0,n.Z)(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,n.Z)(t)?t:String(t)}},6522:(e,t,r)=>{function n(e){return n="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},n(e)}r.d(t,{Z:()=>n})},2951:(e,t,r)=>{r.r(t),r.d(t,{StoryboardFunctionRegistryFactory:()=>J,__secret_internals:()=>n,applyTheme:()=>N,authenticate:()=>oo,batchSetAppsLocalTheme:()=>j,checkIfByTransform:()=>Qe,checkIfOfComputed:()=>Je,createHistory:()=>ye,createRuntime:()=>ra,customProcessors:()=>b,customTemplates:()=>lt,fetchByProvider:()=>lo,getAuth:()=>io,getBasePath:()=>W,getCssPropertyValue:()=>V,getCurrentMode:()=>D,getCurrentTheme:()=>L,getHistory:()=>be,getPageInfo:()=>Kr,getRuntime:()=>na,handleHttpError:()=>_t,httpErrorToString:()=>Pt,isLoggedIn:()=>co,isUnauthenticatedError:()=>Ct,logout:()=>so,matchPath:()=>bt,registerWidgetFunctions:()=>fa,registerWidgetI18n:()=>k});var n={};r.r(n),r.d(n,{initializePreviewBootstrap:()=>mo,legacyDoTransform:()=>bo,loadBricks:()=>wo,mountUseBrick:()=>vo,renderPreviewBricks:()=>go,renderUseBrick:()=>po,unmountUseBrick:()=>ho,updateSnippetPreviewSettings:()=>Po,updateStoryboard:()=>So,updateStoryboardByRoute:()=>Eo,updateStoryboardBySnippet:()=>Io,updateStoryboardByTemplate:()=>ko,updateTemplatePreviewSettings:()=>Zo});var a=r(3028),o=r(4795),i=r(5178),s=r(8701),c=r(3352),l=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}(),u=r(9481),p=r(4537),d=r(5188),f=r(2159),v=r(6059),h=r(2257),m=r(3395),g=r(687),y=new WeakMap,b=new class{constructor(){(0,m.Z)(this,y,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),a=(0,g.Z)(this,y).get(r);if(a||(a=new Map,(0,g.Z)(this,y).set(r,a)),a.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));a.set(n,t)}get(e){return(0,g.Z)(this,y).get(e)}},w=r(2409);function S(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=E("app",t.id);Object.entries(r.i18n).forEach((e=>{var[t,r]=e;w.i18n.addResourceBundle(t,n,r)}))}}function E(e,t){return"".concat(e,"/").concat(t)}function k(e,t){var r=E("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;w.i18n.addResourceBundle(t,r,n)}))}function Z(e){return w.i18n.getFixedT(null,E("widget",e))}function I(e,t){return{get(r){var n;return"".concat(null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:"","bricks/").concat(e,"/").concat(window.PUBLIC_ROOT_WITH_VERSION&&t?"".concat(t,"/"):"","dist/assets/").concat(r)}}}function P(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var C=()=>{throw new Error("Can't modify read-only proxy object")},O={set:C,defineProperty:C,deleteProperty:C,setPrototypeOf:C};function A(e){return new Proxy(e,O)}function _(e){var{get:t,ownKeys:r}=e;return P()?A(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var T="light",R=new p.JsonStorage(localStorage),M="apps-theme";function x(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));T=e}function B(){return T}function L(){return document.documentElement.dataset.theme}function N(e){e?x(e):e=B(),e!==L()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function j(e){R.setItem(M,(0,a.Z)((0,a.Z)({},U()),e))}function U(){var e,t;try{t=R.getItem(M)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var $="default";function F(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));$=e}function D(){return document.documentElement.dataset.mode}function K(e){e?F(e):e=$,e!==D()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function V(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function W(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}function H(e,t){var r={};for(var n of e){var a=q(n,t);void 0!==a&&(r[n]=a)}return r}function q(e,t){var r,n,{collectCoverage:a,widgetId:o,widgetVersion:s,app:c,appendI18nNamespace:l,storyboardFunctions:u,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return a?"/next":W().replace(/\/$/,"");case"FN":return u;case"IMG":return a?{get:e=>"mock/images/".concat(e)}:o?I(o,s):(r=c.id,n=c.isBuildPush,{get:e=>n?"api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/".concat(e):"".concat(window.APP_ROOT?"".concat(window.APP_ROOT,"-/"):"","micro-apps/").concat(r,"/images/").concat(e)});case"I18N":return a?i.identity:o?Z(o):w.i18n.getFixedT(null,[l,E("app",c.id)].filter(Boolean));case"I18N_TEXT":return a?z:w.i18nText;case"PERMISSIONS":return A({check:a?G:ro});case"THEME":return A({getTheme:a?()=>"light":B});case"console":return p?A(console):void 0;case"location":return a?{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 z(e){return null==e?void 0:e.en}function G(){return!0}function J(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new Map,i=new Proxy(Object.freeze({}),{get:(a,s)=>function(a){var s,c=o.get(a);if(c){if(c.processed)return c.cooked;n&&(s=n.createCollector(a));var l=(0,u.precookFunction)(c.source,{typescript:c.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return c.cooked=(0,u.cook)(l.function,c.source,{rules:{noVar:!0},globalVariables:(0,h.supply)(l.attemptToVisitGlobals,H(l.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),c.processed=!0,c.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),o.clear(),Array.isArray(t))for(var n of t){var a=(0,s.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,s.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");o.set(n.name,{source:n.source,typescript:n.typescript,deps:a,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,a.Z)((0,a.Z)({},t),{},{name:e}),n=(0,s.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,s.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=o.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:Y,registerStoryboardFunctions:Q,checkPermissionsUsage:X}=J(),ee={};try{ee.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,a=o.prototype;function o(){t.set(this,r(null))}function i(e,t,r){n(e,t,{configurable:!0,writable:!0,value:r})}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}i(a,"addEventListener",(function(e,r,n){for(var a=t.get(this),o=a[e]||(a[e]=[]),i=0,s=o.length;i<s;i++)if(o[i].listener===r)return;o.push({target:this,listener:r,options:n})})),i(a,"dispatchEvent",(function(e){var r=t.get(this)[e.type];return r&&(i(e,"target",this),i(e,"currentTarget",this),r.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(a,"removeEventListener",(function(e,r){for(var n=t.get(this),a=n[e]||(n[e]=[]),o=0,i=a.length;o<i;o++)if(a[o].listener===r)return void a.splice(o,1)})),ee.EventTarget=o}(Object,new WeakMap)}const te=ee.EventTarget;var re;!function(e){e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall"}(re||(re={}));var ne=new Map([[re.xLarge,"1920px"],[re.large,"1600px"],[re.medium,"1280px"],[re.small,"1024px"],[re.xSmall,0]]),ae=new te,oe={},ie={};function se(e,t){var r=!1;for(var[n]of(oe[t]=e.matches,ne))if(oe[n]&&ie.breakpoint!==n){ie.breakpoint=n,r=!0;break}r&&ae.dispatchEvent(new CustomEvent("change",{detail:ie}))}ne.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));se(r,t),r.addEventListener?r.addEventListener("change",(e=>{se(e,t)})):r.addListener((e=>{se(e,t)}))}));var ce=()=>ie;function le(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}var ue=r(8874),pe=(r(8525),r(7857));function de(e,t){var r=(0,i.orderBy)(e,(e=>{var t,r,n;return null!==(t=null===(r=e.app)||void 0===r||null===(n=r.homepage)||void 0===n?void 0:n.length)&&void 0!==t?t:0}),"desc");for(var n of r){var a=n.app.homepage;if("string"==typeof a&&"/"===a[0]&&("/"===a?t===a:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(a.replace(/\/+$/,""),"/"))))return n}}function fe(e){return!e||!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var ve,he=["extraQuery","clear","keepHash"],me=!1;function ge(e,t){t(!(me=!confirm(e)))}function ye(){if(!ve){var e=(0,pe.createBrowserHistory)({basename:W().replace(/\/$/,""),getUserConfirmation:ge});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function o(e,t,n){me=!1,r(e,t),null==n||n(me)}function i(e,t,r){me=!1,n(e,t),null==r||r(me)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:c,keepHash:l}=n,u=(0,f.Z)(n,he),p=new URLSearchParams(c?"":e.location.search),d={};for(var[v,h]of(Object.assign(d,r,s),Object.entries(d)))if(Array.isArray(h))for(var m of(p.delete(v),h))p.append(v,m);else null==h||""===h?p.delete(v):p.set(v,h);("push"===t?o:i)("?".concat(p.toString()).concat(l?e.location.hash:""),u,a)}}return(0,a.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){o((0,a.Z)((0,a.Z)({},e.location),{},{key:void 0,hash:t,state:(0,a.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,a.Z)((0,a.Z)({},e.location),{},{state:(0,a.Z)((0,a.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(a,o,i){var s,c="string"==typeof a;return"string"==typeof(s=c?(0,pe.parsePath)(a).pathname:a.pathname)&&s.startsWith("/")&&fe(function(e){var t,r;return de(null!==(t=null===(r=Yn)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](c?W()+a.substring(1):e.createHref(a)):("push"===n?t:r)(a,o,i)}}return{push:n("push"),replace:n("replace")}}((0,a.Z)((0,a.Z)({},e),{},{push:o,replace:i})))}(e)),ve=e}return ve}function be(){return ve}var we=r(5866),Se=r(6171),Ee=r(381),ke=r(1304),Ze=r(2308),Ie=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.post("api/contract/single_search",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}(),Pe=new Map,Ce=new Map,Oe=(e,t)=>{null==e||e.forEach((e=>{t.set("".concat(e.namespaceId,".").concat(e.name),e)}))},Ae=new Map;function _e(e){return e.includes("@")}function Te(e,t,r){return Re.apply(this,arguments)}function Re(){return Re=(0,o.Z)((function*(e,t,r){if(!_e(e))return t;if(!e.includes(":"))throw new Error("You're using legacy Custom API \"".concat(e,'" which is dropped in v3, please use Flow API instead'));var n=yield function(e){var t=Ae.get(e);return t||(t=function(e){return Me.apply(this,arguments)}(e),Ae.set(e,t)),t}(e);if(!n)throw new Error('Flow API not found: "'.concat(e,'"'));var a=function(e,t){var r,n,a="string"==typeof t.contract?Ze.safeLoad(t.contract,{schema:Ze.JSON_SCHEMA,json:!0}):t.contract,{uri:o,method:i="GET",ext_fields:s}=null!==(r=null==a?void 0:a.endpoint)&&void 0!==r?r:{},c=!(null==a||!a.response)&&!1!==a.response.wrapper;if(!o)throw new Error('Missing endpoint.uri in contract of provider "'.concat(e,'"'));return{uri:o,method:"list"===i.toLowerCase()?"get":i,ext_fields:s,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==a||null===(n=a.response)||void 0===n?void 0:n.type),responseWrapper:c,request:null==a?void 0:a.request}}(e,n);return function(e,t,r){var n,{uri:a,method:o,ext_fields:i,name:s,namespace:c,serviceName:l,responseWrapper:u,version:p,isFileType:d,request:f}=e,v=d&&"saveAs"===r;v&&(n=t.shift());var{url:h,args:m}=function(e,t,r,n,a,o){var i=o?a?"api/gateway/".concat(a):"api/gateway/".concat(n,".").concat(r,"@").concat(o):"api/gateway/api_service.".concat(n,".").concat(r),s=t.slice();return{url:i+e.replace(/:([^/]+)/g,(()=>s.shift())),args:s}}(a,t,s,c,l,p);return[...v?[n]:[],{url:h,originalUri:a,method:o,ext_fields:i,responseWrapper:u,request:f,isFileType:d},...m]}(a,t,r)})),Re.apply(this,arguments)}function Me(){return(Me=(0,o.Z)((function*(e){var[t,r]=e.split("@"),[n,a]=r.split(":"),o=function(e){return Pe.get(e)||Ce.get(e)}("".concat(t,".").concat(n));if(o)return{name:o.name,namespace:o.namespaceId,serviceName:o.serviceName,version:o.version,contract:{endpoint:o.endpoint,response:o.response,request:o.request}};var i,s,{contractData:c}=yield Ie({contractName:"".concat(t,".").concat(n),version:a});return c?{name:c.name,namespace:null===(i=c.namespace)||void 0===i||null===(s=i[0])||void 0===s?void 0:s.name,serviceName:c.serviceName,version:c.version,contract:{endpoint:c.endpoint,response:c.response,request:c.request}}:void 0}))).apply(this,arguments)}var xe="core.provider-flow-api";function Be(e,t){return e.some((e=>e.source===t))}function Le(e){return Ne.apply(this,arguments)}function Ne(){return Ne=(0,o.Z)((function*(e){for(var t,{url:r,originalUri:n,method:o="GET",responseWrapper:s=!0,ext_fields:c=[],request:l,isFileType:u}=e,p=["get","delete","head"].includes(o.toLowerCase()),d=u?{responseType:"blob"}:{},f=arguments.length,v=new Array(f>1?f-1:0),h=1;h<f;h++)v[h-1]=arguments[h];if(p){var m,g,y,b,w,S;n&&"object"===(null==l?void 0:l.type)&&(null!==(m=null===(g=n.match(/:([^/]+)/g))||void 0===g?void 0:g.length)&&void 0!==m?m:0)===(null!==(y=null===(b=l.fields)||void 0===b?void 0:b.length)&&void 0!==y?y:0)?[S]=v:[w,S]=v,t=yield ke.http.simpleRequest(o,r,(0,a.Z)((0,a.Z)({params:w},d),S))}else{var E=function(e){if(!e||"object"!==e.type)return!1;var t=e=>!(0,i.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(l),k=function(e){for(var t=Be(e,"query"),r=Be(e,"body"),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(t){if(r){var[s,c,l]=o;return{data:s,options:(0,a.Z)({params:c},l)}}var[u,p]=o;return{data:{},options:(0,a.Z)({params:u},p)}}var[d,f]=o;return{data:d,options:f}}(c,...v);t=yield ke.http.requestWithBody(o,r,E?function(e){if(e instanceof FormData)return e;var t=new FormData,r=function(e,r){Array.isArray(r)?r.forEach((r=>{t.append(e,r)})):!(0,i.isObject)(r)||r instanceof Blob||r instanceof Date?t.append(e,r):Object.entries(r).forEach((r=>{var[n,a]=r;t.append("".concat(e,"[").concat(n,"]"),a)}))};for(var[n,a]of Object.entries(e))r(n,a);return t}(k.data):k.data,(0,a.Z)((0,a.Z)({},d),k.options))}return!u&&s?t.data:t})),Ne.apply(this,arguments)}var je=new Map;function Ue(e){return $e.apply(this,arguments)}function $e(){return($e=(0,o.Z)((function*(e){_e(e)&&(e=xe);var t=je.get(e);if(t)return t;if(e.includes("-")&&!customElements.get(e))if(e===xe)customElements.define(xe,(0,s.createProviderClass)(Le));else if(yield(0,v.loadBricksImperatively)([e],ia()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return t=document.createElement(e),je.set(e,t),t}))).apply(this,arguments)}var Fe,De=new Map;function Ke(e,t,r){return Ve.apply(this,arguments)}function Ve(){return(Ve=(0,o.Z)((function*(e,t,r){var{useProvider:n,method:o="resolve",args:i=[],onReject:s}=e,c=e.provider;if(c&&!n)throw new Error("You're using \"provider: ".concat(c,'" which is dropped in v3, please use "useProvider" instead'));var l,[u,p]=yield Promise.all([Ue(n),Ka(i,t)]),d=We(u,n,o,p,r,i),{transform:f}=e;try{l=yield d}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;f=s.transform,l=e}return f?"string"==typeof f?{[f]:l}:Ka(f,(0,a.Z)((0,a.Z)({},t),{},{data:l})):l}))).apply(this,arguments)}function We(e,t,r,n,a,o){return He.apply(this,arguments)}function He(){return(He=(0,o.Z)((function*(e,t,r,n,a,i){var s,c;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==a?void 0:a.cache)&&(c=De.get(s)),c||(c=(0,o.Z)((function*(){var a=yield Te(t,n,r);return e.resolve(...a)}))(),De.set(s,c)),c}))).apply(this,arguments)}function qe(e,t){return ze.apply(this,arguments)}function ze(){return(ze=(0,o.Z)((function*(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Na(e.if)?yield Ka(e.if,t):e.if)}))).apply(this,arguments)}function Ge(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Na(e.if)?Wa(e.if,t):e.if)}function Je(e){return!(0,p.hasOwnProperty)(e,"if")||!!e.if}function Ye(){return(Ye=(0,o.Z)((function*(e,t){return(0,p.isObject)(e.if)&&!Na(e.if)?Je(yield Ke(e.if,t)):qe(e,t)}))).apply(this,arguments)}function Qe(e,t){return Ge(e,{data:t})}function Xe(e){switch(e){case Fe.USE_BRICK_PROPERTIES:case Fe.USE_BRICK_TRANSFORM:case Fe.USE_BRICK_EVENTS:case Fe.USE_BRICK_IF:case Fe.USE_BRICK_LIFECYCLE:case Fe.USE_BRICK_DATA_SOURCE:return!0}return!1}function et(e,t,r){if(Xe(e))return e;if(t)switch(e){case Fe.USE_BRICK:return Fe.USE_BRICK_ITEM;case Fe.USE_BRICK_SLOTS_ITEM_BRICKS:return Fe.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case Fe.INITIAL:if("useBrick"===r)return Fe.USE_BRICK;break;case Fe.USE_BRICK:case Fe.USE_BRICK_ITEM:case Fe.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return Fe.USE_BRICK_PROPERTIES;case"transform":return Fe.USE_BRICK_TRANSFORM;case"dataSource":return Fe.USE_BRICK_DATA_SOURCE;case"events":return Fe.USE_BRICK_EVENTS;case"slots":return Fe.USE_BRICK_SLOTS;case"children":return Fe.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return Fe.USE_BRICK_IF;case"lifeCycle":return Fe.USE_BRICK_LIFECYCLE}break;case Fe.USE_BRICK_SLOTS:return Fe.USE_BRICK_SLOTS_ITEM;case Fe.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return Fe.USE_BRICK_SLOTS_ITEM_BRICKS}return Fe.INITIAL}function tt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,u.isEvaluable)(e):Na(e)){var a="string"==typeof e?e:e[Ba];t=(0,s.track)(a,"track context","CTX"),r=(0,s.track)(a,"track state","STATE"),n=(0,s.track)(a,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function rt(){return rt=(0,o.Z)((function*(e,t,r){return(0,p.isObject)(e)?Object.fromEntries((yield Promise.all(Object.entries(e).map(function(){var e=(0,o.Z)((function*(e){var[n,a]=e;if(Array.isArray(r)){var{contextNames:o,stateNames:i,formStateNames:s}=tt(a);(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a})}var c=yield Ka(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?Fe.USE_BRICK:Fe.INITIAL});if(void 0!==c&&("style"!==n&&"dataset"!==n||(0,p.isObject)(c)))return[n,c]}));return function(t){return e.apply(this,arguments)}}()))).filter(Boolean)):{}})),rt.apply(this,arguments)}function nt(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[a,o]of Object.entries(n))e[r][a]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function at(e,t,r){var n=function(e,t,r){return(0,p.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;if(Array.isArray(r)){var{contextNames:o,stateNames:i,formStateNames:s}=tt(a);(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a})}var c=Wa(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?Fe.USE_BRICK:Fe.INITIAL});if(void 0!==c&&("style"!==n&&"dataset"!==n||(0,p.isObject)(c)))return[n,c]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{nt(e,n)}))}function ot(e){var t,r;return!(null===(t=e?e.flags:null===(r=na())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function it(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];var o=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(o),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(o),...n)}!function(e){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"}(Fe||(Fe={}));var st=new Set(["prefix"]),ct=new WeakMap,lt=new class{constructor(){(0,m.Z)(this,ct,{writable:!0,value:new Map})}define(e,t){var r,n,o,s,c=(0,g.Z)(this,ct).has(e);c?console.warn('Custom template of "'.concat(e,'" already registered.')):(c=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var l=ot(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},p=[],d=[];for(var[f,v]of Object.entries(u))v.asVariable?(it(l,"Template `asVariable`",e,f),l||d.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&p.push([f,v]);var h=(0,a.Z)((0,a.Z)({},t),{},{proxy:(0,a.Z)((0,a.Z)({},t.proxy),{},{properties:Object.fromEntries(p)}),state:(t.state?l?t.state:t.state.map((e=>(0,a.Z)({expose:!0},e))):[]).concat(d.map((e=>({name:e,expose:!0}))))});(0,g.Z)(this,ct).set(e,(0,a.Z)((0,a.Z)({},h),{},{name:e}));var m,y,b=(m=h.state,(0,i.uniq)(null!==(y=null==m?void 0:m.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),w=Object.entries(null!==(o=null===(s=h.proxy)||void 0===s?void 0:s.methods)&&void 0!==o?o:{}),S=b.concat(p.map((e=>e[0]))),E=w.map((e=>e[0])),k=S.concat(E).find((e=>e in HTMLElement.prototype&&!st.has(e)));if(void 0!==k)throw new Error('In custom template "'.concat(e,'", "').concat(k,'" is a native HTMLElement property, and should be avoid to be used as a brick property or method.'));if(!c){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return S}static get _dev_only_definedMethods(){return E}$$getElementByRef(e){var t,r,n,a;return null===(t=this.$$tplStateStore)||void 0===t||null===(r=t.hostBrick)||void 0===r||null===(n=r.tplHostMetadata)||void 0===n||null===(a=n.internalBricksByRef.get(e))||void 0===a?void 0:a.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var Z=function(r){if(p.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),"continue";Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var I of b)Z(I);var P=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,a,o=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);o&&(o[null!==(a=r.refProperty)&&void 0!==a?a:e]=t)},enumerable:!0})};for(var[C,O]of p)P(C,O);var A=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[_,T]of w)A(_,T);customElements.define(e,t)}}get(e){return(0,g.Z)(this,ct).get(e)}};function ut(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}function pt(e,t,r){var n=ut(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}function dt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function ft(e){return e&&e.sensitive?"":"i"}function vt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,a=void 0!==n&&n,o=r.start,i=void 0===o||o,s=r.end,c=void 0===s||s,l=r.encode,u=void 0===l?function(e){return e}:l,p=r.delimiter,d=void 0===p?"/#?":p,f=r.endsWith,v="[".concat(dt(void 0===f?"":f),"]|$"),h="[".concat(dt(d),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var b=y[g];if("string"==typeof b)m+=dt(u(b));else{var w=dt(u(b.prefix)),S=dt(u(b.suffix));if(b.pattern)if(t&&t.push(b),w||S)if("+"===b.modifier||"*"===b.modifier){var E="*"===b.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(b.pattern,")(?:").concat(S).concat(w,"(?:").concat(b.pattern,"))*)").concat(S,")").concat(E)}else m+="(?:".concat(w,"(").concat(b.pattern,")").concat(S,")").concat(b.modifier);else"+"===b.modifier||"*"===b.modifier?m+="((?:".concat(b.pattern,")").concat(b.modifier,")"):m+="(".concat(b.pattern,")").concat(b.modifier);else m+="(?:".concat(w).concat(S,")").concat(b.modifier)}}if(c)a||(m+="".concat(h,"?")),m+=r.endsWith?"(?=".concat(v,")"):"$";else{var k=e[e.length-1],Z="string"==typeof k?h.indexOf(k[k.length-1])>-1:void 0===k;a||(m+="(?:".concat(h,"(?=").concat(v,"))?")),Z||(m+="(?=".concat(h,"|").concat(v,")"))}return new RegExp(m,ft(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var a=1,o="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--a){s++;break}}else if("("===e[s]&&(a++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));o+=e[s++]}else o+=e[s++]+e[s++];if(a)throw new TypeError("Unbalanced pattern at ".concat(r));if(!o)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:o}),r=s}else{for(var i="",s=r+1;s<e.length;){var c=e.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,a=void 0===n?"./":n,o="[^".concat(dt(t.delimiter||"/#?"),"]+?"),i=[],s=0,c=0,l="",u=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var n=r[c],a=n.type,o=n.index;throw new TypeError("Unexpected ".concat(a," at ").concat(o,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=u("CHAR"),v=u("NAME"),h=u("PATTERN");if(v||h){var m=f||"";-1===a.indexOf(m)&&(l+=m,m=""),l&&(i.push(l),l=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||o,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)l+=g;else if(l&&(i.push(l),l=""),u("OPEN")){m=d();var y=u("NAME")||"",b=u("PATTERN")||"",w=d();p("CLOSE"),i.push({name:y||(b?s++:""),pattern:y&&!b?o:b,prefix:m,suffix:w,modifier:u("MODIFIER")||""})}else p("END")}}return i}(e,r),t,r)}function ht(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(e.source);a;)t.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return ht(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),ft(r))}(e,t,r):vt(e,t,r)}var mt=new Map,gt=1e4,yt=0;function bt(e,t){var{path:r,exact:n=!1,strict:a=!1,sensitive:o=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=mt.get(r);n||mt.set(r,n=new Map);var a=n.get(e);if(a)return a;var o=[],i={regexp:ht(e,o,t),keys:o};return yt<gt&&(n.set(e,i),yt++),i}(r,{end:n,strict:a,sensitive:o}),c=i.exec(e);if(!c)return null;var[l,...u]=c,p=e===l;return n&&!p?null:{path:r,url:"/"===r&&""===l?"/":l,isExact:p,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function wt(){return(wt=(0,o.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),a=bt(t.location.pathname,{path:n,exact:r.exact});if(a&&(yield qe(r,t)))return t.app.noAuthGuard||r.public||co()?{match:a,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var St=Symbol.for("tpl.asyncComputedPropsFromHost"),Et=Symbol.for("tpl.stateStoreId"),kt=Symbol.for("tpl.externalForEachItem"),Zt=r(6666),It=new Set;function Pt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof ke.HttpFetchError)return"网络错误,请检查您的网络连接。";if(e instanceof ke.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 Ct(e){return e instanceof ke.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var Ot,At=!1;function _t(e){if(!(e instanceof ke.HttpAbortError))if(!Ct(e)||window.NO_AUTH_GUARD){console.error(e);var t=Pt(e);t!==Ot&&(Ot=t,alert(t),setTimeout((()=>{Ot=void 0}),1e3))}else{if(At)return;if(At=!0,confirm("您还未登录或登录信息已过期,现在重新登录?")){var r=na().getFeatureFlags()["sso-enabled"],n=be();n.push(r?"/sso-auth/login":"/auth/login",{from:(0,a.Z)((0,a.Z)({},n.location),{},{state:void 0})})}setTimeout((()=>{At=!1}),1)}}function Tt(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,a]=t,o=Bt(a,r,{element:e});for(var i of(e.addEventListener(n,o),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,o]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(a)))e.$$eventListeners.push([n,null,i])}))}function Rt(e){return"string"==typeof e.action}function Mt(e){return"string"==typeof e.useProvider}function xt(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function Bt(e,t,r){return function(n){for(var o of[].concat(e))if(Ge(o,(0,a.Z)((0,a.Z)({},t),{},{event:n})))if(Rt(o)){var[i,s]=o.action.split(".");switch(o.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":Ft(n,s,o.args,o.callback,t);break;case"window.open":Dt(n,o.args,t);break;case"location.reload":case"location.assign":Wt(n,s,o.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Ht(n,i,s,o.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":qt(n,s,o.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":zt(n,0,o.args,t);break;case"handleHttpError":_t(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":Kt(n,s,o.args,o.callback,t);break;case"state.update":case"state.refresh":case"state.load":Vt(n,s,o.args,o.callback,t);break;case"tpl.dispatchEvent":var[c,l]=Jt(o.args,t,n);pt(t,o.action,": ".concat(c)).dispatchEvent(new CustomEvent(c,l));break;case"theme.setDarkTheme":case"theme.setLightTheme":N("theme.setDarkTheme"===o.action?"dark":"light");break;case"theme.setTheme":var[u]=Jt(o.args,t,n);N(u);break;case"mode.setDashboardMode":case"mode.setDefaultMode":K("mode.setDashboardMode"===o.action?"dashboard":"default");break;default:console.error("unknown event listener action:",o.action)}}else Mt(o)?Lt(n,o,t,r):xt(o)?jt(n,o,t,r):console.error("unknown event handler:",o)}}function Lt(e,t,r,n){return Nt.apply(this,arguments)}function Nt(){return(Nt=(0,o.Z)((function*(e,t,r,n){try{Ut(e,yield Ue(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(Pt(e))}}))).apply(this,arguments)}function jt(e,t,r,n){var o=[],i=t.target,s=t.targetRef,c=i;if(("string"==typeof i?(0,u.isEvaluable)(i):Na(i))&&(c=Wa(i,(0,a.Z)((0,a.Z)({},r),{},{event:e}))),"string"==typeof c)if("_self"===c)o.push(n.element);else if(t.multiple)o=Array.from(document.querySelectorAll(c));else{var l=document.querySelector(c);null!==l&&o.push(l)}else if(c)c instanceof HTMLElement?o.push(c):console.error("unexpected target:",c);else if(s){var p=s;("string"==typeof s?(0,u.isEvaluable)(s):Na(s))&&(p=Wa(s,(0,a.Z)((0,a.Z)({},r),{},{event:e})));var d=[].concat(p),f=pt(r,"targetRef",": ".concat(d.join(", ")));o.push(...d.map((e=>{var t;return null===(t=f.$$getElementByRef)||void 0===t?void 0:t.call(f,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((a=>{Ut(e,a,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&at(o,t.properties,(0,a.Z)((0,a.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function Ut(e,t,r,n,a,o,i){return $t.apply(this,arguments)}function $t(){return $t=(0,o.Z)((function*(e,t,r,n,i,s,c){var l;if("function"==typeof t[n]){var u=function(){var a=(0,o.Z)((function*(){var a=Jt(r.args,i,e,c);return Mt(r)&&(a=yield Te(r.useProvider,a,n)),t[n](...a)}));return function(){return a.apply(this,arguments)}}();if(r.callback){var p,d=Gt(r.callback,i,s),f={progress:d("progress"),success:d("success"),error:d("error"),finally:d("finally")};if(Mt(r)&&(p=Wa(r.poll,(0,a.Z)((0,a.Z)({},i),{},{event:e}))),null!==(l=p)&&void 0!==l&&l.enabled)!function(e,t,r){var n,{progress:a,success:i,error:s,finally:c}=t,{interval:l,leadingRequestDelay:u,continueOnError:p,delegateLoadingBar:d,expectPollEnd:f,expectPollStopImmediately:v}=r,h=sa();function m(){return g.apply(this,arguments)}function g(){return(g=(0,o.Z)((function*(){var t;It.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==sa())||(null==a||a(r),null!=f&&f(r)?(d&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==c||c()):y(null!=l?l:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==sa())||(null==s||s(e),p?y(null!=l?l:3e3):null==c||c())}finally{d&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),It.add(n)}y(null!=u?u:0),d&&window.dispatchEvent(new Event("request.start"))}(u,f,p);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),$t.apply(this,arguments)}function Ft(e,t,r,n,a){var o=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":o=2,i=!0;break;case"reload":i=!0;break;case"block":o=1,s="setBlockMessage"}var c=[];if(o>0&&((c=Jt(r,a,e,{useEventDetailAsDefault:!0})).length=o),i&&n){var l=Gt(n,a,void 0);c.push((e=>{l(e?"error":"success")({blocked:e}),l("finally")({blocked:e})}))}be()[s](...c)}function Dt(e,t,r){var[n,a,o]=Jt(t,r,e);window.open(n,a||"_self",o)}function Kt(e,t,r,n,a){var[o,i]=Jt(r,a,e);a.ctxStore.updateValue(o,i,t,n,a)}function Vt(e,t,r,n,a){var[o,i]=Jt(r,a,e);ut(a,"state.".concat(t),": ".concat(o)).updateValue(o,i,"update"===t?"replace":t,n,a)}function Wt(e,t,r,n){if("assign"===t){var[a]=Jt(r,n,e);location.assign(a)}else location[t]()}function Ht(e,t,r,n,a){var o="localStorage"===t?localStorage:sessionStorage,[i,s]=Jt(n,a,e);"setItem"===r?void 0!==s&&o.setItem(i,JSON.stringify(s)):o.removeItem(i)}function qt(e,t,r,n){console[t](...Jt(r,n,e,{useEventAsDefault:!0}))}function zt(e,t,r,n){alert(...Jt(r,n,e,{useEventAsDefault:!0}))}function Gt(e,t,r){return function(n){return function(a){var o=null==e?void 0:e[n];if(o)try{var i=new CustomEvent("callback.".concat(n),{detail:a});Bt(o,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",a)}}}function Jt(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?Wa(e,(0,a.Z)((0,a.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}class Yt{constructor(e,t){(0,Zt.Z)(this,"type",void 0),(0,Zt.Z)(this,"data",new Map),(0,Zt.Z)(this,"changeEventType",void 0),(0,Zt.Z)(this,"pendingStack",[]),(0,Zt.Z)(this,"hostBrick",void 0),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}updateValue(e,t,r,n,o){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,p.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,a.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||_t(e)})),n){var c=Gt(n,o);s.then((e=>{c("success")({value:e}),c("finally")()}),(e=>{c("error")(e),c("finally")()}))}}}define(e,t,r){if(Array.isArray(e)&&e.length>0){var n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=new Map;for(var n of e){var a=(0,s.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,a)}return r}(e,r),a=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var c;a.set(i,(null!==(c=a.get(i))&&void 0!==c?c:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),u=new WeakSet,p=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{p.set(e,{resolve:t,reject:r})}))]))),f=function(){var e=(0,o.Z)((function*(e){var r;u.add(e);var o=yield t(e);n.delete(e);var i=null!==(r=a.get(e.name))&&void 0!==r?r:0;if(o){if(p.get(e.name).resolve(),a.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(p.get(e.name).resolve(),a.delete(e.name)):a.set(e.name,i-1);yield h()}));return function(t){return e.apply(this,arguments)}}(),v=l;function h(){return m.apply(this,arguments)}function m(){return m=(0,o.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(a,v)).map((e=>e[0])).filter((e=>!u.has(e)));yield Promise.all(e.map(f))})),m.apply(this,arguments)}return{pendingResult:h().then((0,o.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),a=()=>{var e=!1;for(var[t,o]of r.entries())[...o.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&a()};if(a(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),v=!0,yield h()),p.values()))e.resolve()}))).catch((e=>{for(var t of p.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r)),this.type);this.pendingStack.push(n)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,o.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,o.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}resolve(e,t,r){var n=this;return(0,o.Z)((function*(){if(!(yield qe(e,t)))return!1;var i,c;if("STATE"===n.type&&r&&e.expose){var l=yield r;(0,p.hasOwnProperty)(l,e.name)&&(i=l[e.name])}var u=!1;if(void 0===i){if(e.resolve){var d=(0,a.Z)({transform:"value"},e.resolve);if(yield qe(e.resolve,t))c=function(){var e=(0,o.Z)((function*(e){return(yield Ke(d,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),(u=e.resolve.lazy)||(i=yield c());else if(!(0,p.hasOwnProperty)(e,"value"))return!1}c&&!u||void 0===e.value||(i=yield Ka(e.value,t))}var f={value:i,eventTarget:new EventTarget,load:c,loaded:!u};if(e.onChange&&f.eventTarget.addEventListener(n.changeEventType,Bt(e.onChange,t)),e.track&&"FORM_STATE"!==n.type){var v=(0,s.strictCollectMemberUsage)(c?e.resolve:e.value,n.type);for(var h of v)n.onChange(h,(()=>{c?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,Wa(e.value,t),"replace")}))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,f),!0}))()}}function Qt(e,t,r){var n,{reversedProxies:a,asyncHostProperties:o,externalSlots:s,tplStateStoreId:c,hostBrick:l}=e;if(t&&a){var u=a.properties.get(t);u&&(n=o.then((e=>{var t={};for(var{from:r,to:n}of u){var a=e[r];void 0!==a&&n.refProperty&&(t[n.refProperty]=a)}return t})));var d=a.slots.get(t);if(d&&s){var f=new Map;for(var{from:v,to:h}of d){var m,g,y,b,w=null!==(m=null===(g=s[v])||void 0===g?void 0:g.bricks)&&void 0!==m?m:[];if(w.length){var S=null!==(y=h.refSlot)&&void 0!==y?y:v,E=f.get(S);if(!E){E=[];for(var k=(0,p.hasOwnProperty)(r,S)?r[S].bricks.length+1:1,Z=0;Z<k;Z+=1)E.push([]);f.set(S,E)}var I=null!==(b=h.refPosition)&&void 0!==b?b:-1;E[(0,i.clamp)(I<0?E.length+I:I,0,E.length-1)].push(...(0,p.hasOwnProperty)(l.runtimeContext,"forEachItem")?Xt(w,l.runtimeContext.forEachItem):w)}}var P=function(e,t){(0,p.hasOwnProperty)(r,e)||(r[e]={type:"bricks",bricks:[]});var n=r[e];n.bricks=t.flatMap(((e,t)=>t<n.bricks.length?e.concat(n.bricks[t]):e)),0===n.bricks.length&&delete r[e]};for(var[C,O]of f.entries())P(C,O)}}return{[St]:n,[Et]:c}}function Xt(e,t){return e.map((e=>{var r;return(0,a.Z)((0,a.Z)({},e),{},{[kt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,a]=e;return[n,"routes"===a.type?{type:"routes",routes:er(a.routes,t)}:{type:"bricks",bricks:Xt(null!==(r=a.bricks)&&void 0!==r?r:[],t)}]})))})}))}function er(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,a.Z)((0,a.Z)({},e),{},{bricks:Xt(e.bricks,t)})))}var tr=["properties","slots","children"];function rr(e,t){function r(e){return(0,p.isObject)(e)?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,a]=e;return(0,p.isObject)(a)&&"useBrick"===t?Array.isArray(a)?[t,a.map(n)]:[t,n(a)]:[t,r(a)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:o,slots:i,children:s}=e,c=(0,f.Z)(e,tr),l=yr(s,i),u=Object.fromEntries(Object.entries(null!=l?l:{}).map((e=>{var t,[r,a]=e;return[r,{type:"bricks",bricks:(null!==(t=a.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,a.Z)((0,a.Z)({},c),{},{properties:r(o),slots:u},Qt(t,c.ref,u))}return r(e)}var nr,ar=["slots","children"],or=["properties","slots","children"];function ir(e,t,r,n){var o=(0,i.uniqueId)("tpl-state-"),s=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{tplStateStoreId:o});delete s.forEachItem;var c=new Yt("STATE",r);s.tplStateStoreMap.set(o,c),s.tplStateStoreScope&&s.tplStateStoreScope.push(c);var{bricks:l,proxy:u,state:p,contracts:d}=lt.get(e);!function(e){Oe(e,Ce)}(d),c.define(p,s,n);var{slots:v,children:h}=t,m=(0,f.Z)(t,ar),g=(0,a.Z)((0,a.Z)({},m),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:o,proxy:u};var y={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(var[b,w]of Object.entries(u.properties)){var S=y.properties.get(w.ref);S||(S=[],y.properties.set(w.ref,S)),S.push({from:b,to:w})}if(null!=u&&u.slots)for(var[E,k]of Object.entries(u.slots)){var Z=y.slots.get(k.ref);Z||(Z=[],y.slots.set(k.ref,Z)),Z.push({from:E,to:k})}var I={reversedProxies:y,asyncHostProperties:n,externalSlots:yr(h,v),tplStateStoreId:o,hostBrick:r};return g.slots={"":{type:"bricks",bricks:l.map((e=>sr(e,I)))}},g}function sr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:o}=e,i=(0,f.Z)(e,or),s=yr(o,n),c=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,a]=e;return[n,{type:"bricks",bricks:(null!==(r=a.bricks)&&void 0!==r?r:[]).map((e=>sr(e,t)))}]})));return(0,a.Z)((0,a.Z)({},i),{},{properties:rr(r,t),slots:c},Qt(t,i.ref,c))}!function(e){e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK"}(nr||(nr={}));var cr=["blockingList","node","menuRequests","hasTrackingControls"];function lr(e,t,r,n,a){return ur.apply(this,arguments)}function ur(){return ur=(0,o.Z)((function*(e,t,r,n,o){var i=yield function(e,t){return wt.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var c=s.route=i.route,l=(0,a.Z)((0,a.Z)({},r),{},{match:i.match});switch(l.ctxStore.define(c.context,l),l.pendingPermissionsPreCheck.push(Ya(c,l)),c.type){case"redirect":var u;if("string"!=typeof(u="string"==typeof c.redirect?yield Ka(c.redirect,l):(yield Ke((0,a.Z)({transform:"redirect"},c.redirect),l)).redirect))throw console.error("Unexpected redirect result:",u),new Error("Unexpected type of redirect result: ".concat(typeof u));s.redirect={path:u};break;case"routes":s.menuRequests.push(mr(c.menu,l)),gr(s,yield lr(e,c.routes,l,n,o));break;default:s.menuRequests.push(mr(c.menu,l)),gr(s,yield pr(e,c.bricks,l,n,o))}}return s})),ur.apply(this,arguments)}function pr(e,t,r,n,a,o,i){return dr.apply(this,arguments)}function dr(){return(dr=(0,o.Z)((function*(e,t,r,n,a,o,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>fr(e,t,r,n,a,i,o&&new Map(o)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(a,r,t.node,e),gr(s,t)})),s}))).apply(this,arguments)}function fr(e,t,r,n,a,o){return vr.apply(this,arguments)}function vr(){return vr=(0,o.Z)((function*(e,t,r,n,s,c){var l,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,d={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),d;var f=t[Et],h=(0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:f});(0,p.hasOwnProperty)(t,kt)&&(h.forEachItem=t[kt]);var{context:m}=t;if(Array.isArray(m)&&m.length>0){var g=ot(h);it(g,"Defining context on bricks","check your brick:",t),g||h.ctxStore.define(m,h)}if(h.pendingPermissionsPreCheck.push(Ya(t,h)),!(yield function(e,t){return Ye.apply(this,arguments)}(t,h)))return d;var y=t.brick;if(y.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(y);var{dataSource:b}=t,w=function(){var r=(0,o.Z)((function*(){var r,a=yield Ka(b,h),o=":forEach"===y?"":":switch"===y?String(a):a?"":"else",i=yr(t.children,t.slots),c=i&&(0,p.hasOwnProperty)(i,o)&&(null===(r=i[o])||void 0===r?void 0:r.bricks);if(!Array.isArray(c))return d;switch(y){case":forEach":return Array.isArray(a)?function(e,t,r,n,a,o,i){return hr.apply(this,arguments)}(e,a,c,h,n,s,u):d;case":if":case":switch":return pr(e,c,h,n,s,u,!0)}}));return function(){return r.apply(this,arguments)}}(),S=yield w(),{contextNames:E,stateNames:k}=tt(b);if(E||k){S.hasTrackingControls=!0;var Z=0,I=function(){var t=(0,o.Z)((function*(){var t=++Z,r=yield w();r.blockingList.push(...[...h.tplStateStoreMap.values()].map((e=>e.waitForAll())),...h.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),Z===t&&n.rerenderControlNode(s,c,r.node,e)}));return function(){return t.apply(this,arguments)}}(),P=(0,i.debounce)(I);if(E)for(var C of E)h.ctxStore.onChange(C,P);if(k)for(var O of k)ut(h,"STATE",': "'.concat(b,'"')).onChange(O,P)}return S}/\.tpl-/.test(y)&&!lt.get(y)&&(yield(0,v.loadBricksImperatively)([y],ia()));var A=function(e,t){if(!e.includes(".")&&t){var r="".concat(t,".").concat(e);if(lt.get(r))return r}return!!lt.get(e)&&e}(y,null===(l=h.app)||void 0===l?void 0:l.id);if(A){var _,T=null!==(_=u.get(A))&&void 0!==_?_:0;if(T>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(A,'"'));u.set(A,T+1)}y.includes(".")&&d.blockingList.push((0,v.enqueueStableLoadBricks)([y],ia()));var R={tag:nr.BRICK,type:A||y,return:e,slotId:s,events:t.events,runtimeContext:h,portal:t.portal,iid:t.iid,ref:t.ref};d.node=R;var M=[],x=[],B=function(){var e=(0,o.Z)((function*(){R.properties=yield function(e,t,r){return rt.apply(this,arguments)}(t.properties,h,x);var e=t[St];if(e){var r;null!==(r=R.properties)&&void 0!==r||(R.properties={});var n=yield e;for(var[a,o]of Object.entries(n))R.properties[a]=o}return R.properties}));return function(){return e.apply(this,arguments)}}(),L=B();M.push(L),L.then((()=>{!function(e,t){var r=function(t){var r=()=>{e.element&&at(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var a=ut(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var o of t.stateNames)a.onChange(o,r)}};for(var n of t)r(n)}(R,x)})),n.registerBrickLifeCycle(R,t.lifeCycle);var N,j=t;A&&(j=ir(A,t,R,L)),j.portal&&(R.slotId=void 0),A?delete(N=(0,a.Z)({},h)).forEachItem:N=h;var U=function(){var e=(0,o.Z)((function*(){var e=yr(j.children,j.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?pr(R,r.bricks,N,n,t,u):lr(R,r.routes,N,n,t)}))),r=(0,a.Z)((0,a.Z)({},d),{},{node:void 0,blockingList:[]});for(var o of t)gr(r,o);r.node&&(R.child=r.node),gr(d,(0,a.Z)((0,a.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return M.push(U()),yield Promise.all(M),d})),vr.apply(this,arguments)}function hr(){return(hr=(0,o.Z)((function*(e,t,r,n,o,i,s){var c={blockingList:[],menuRequests:[]},l=yield Promise.all(t.map(((t,c)=>Promise.all(r.map(((r,l)=>fr(e,r,(0,a.Z)((0,a.Z)({},n),{},{forEachItem:t}),o,i,c*l,s&&new Map(s))))))));for(var u of l.flat())gr(c,u);return c}))).apply(this,arguments)}function mr(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 Ka(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function gr(e,t){var{blockingList:r,node:n,menuRequests:a,hasTrackingControls:o}=t,i=(0,f.Z)(t,cr);if(e.blockingList.push(...r),e.menuRequests.push(...a),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function yr(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var a,o=null!==(a=n.slot)&&void 0!==a?a:"";(0,p.hasOwnProperty)(r,o)||(r[o]={type:"bricks",bricks:[]}),r[o].bricks.push(n)}return r}function br(e){var t,{ref:r,runtimeContext:n,element:a}=e;if(r&&n.tplStateStoreId){var{hostBrick:o}=ut(n,"bindTemplateProxy"),i=o.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var c=function(e,t){if(t.ref===r){var n,i,s,c=t=>{t.bubbles&&t.stopPropagation(),o.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},l=null!==(n=t.refEvent)&&void 0!==n?n:e;a.addEventListener(l,c),null!==(s=(i=a).$$proxyListeners)&&void 0!==s||(i.$$proxyListeners=[]),a.$$proxyListeners.push([l,c])}};for(var[l,u]of Object.entries(s))c(l,u)}}}function wr(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:a}=ut(r,"unbindTemplateProxy"),o=a.tplHostMetadata;for(var[i,s]of(o.internalBricksByRef.delete(t),null!==(c=n.$$proxyListeners)&&void 0!==c?c:[])){var c;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function Sr(e){e.innerHTML=""}function Er(e,t){for(var r=e.child,n=[];r;){var a=r.type;a.includes("-")&&!customElements.get(a)&&console.error("Undefined custom element: ".concat(a)),"basic-bricks.script-brick"===a&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var o=t&&r===e.child?t:document.createElement(a);if(r.element=o,r.slotId&&o.setAttribute("slot",r.slotId),r.iid&&(o.dataset.iid=r.iid),nt(o,r.properties),Tt(o,r.events,r.runtimeContext),r.tplHostMetadata&&(o.$$tplStateStore=ut({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),br(r),r.portal?n.push(o):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(o)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var i,s=r.return;s;){var c;if(s.childElements)s.tag===nr.ROOT?(null===(c=s.container)||void 0===c||c.append(...s.childElements),n.length>0&&("function"==typeof s.createPortal?s.createPortal():s.createPortal).append(...n)):s.element.append(...s.childElements),s.childElements=void 0;if(s.sibling)break;s=s.return}r=null===(i=s)||void 0===i?void 0:i.sibling}}}var kr,Zr=["onMount","onUnmount","onMediaChange","onScrollIntoView"],Ir=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],Pr=new WeakMap,Cr=new WeakMap,Or=new WeakMap,Ar=new WeakMap,_r=new WeakSet,Tr=new WeakSet,Rr=new WeakSet,Mr=new WeakSet;class xr{constructor(e){(0,we.Z)(this,Mr),(0,we.Z)(this,Rr),(0,we.Z)(this,Tr),(0,we.Z)(this,_r),(0,Zt.Z)(this,"type",void 0),(0,m.Z)(this,Pr,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[]}}),(0,m.Z)(this,Cr,{writable:!0,value:new Map}),(0,m.Z)(this,Or,{writable:!0,value:void 0}),(0,m.Z)(this,Ar,{writable:!0,value:void 0}),this.type=e}registerBrickLifeCycle(e,t){if(t){var r=[...Zr,..."router"===this.type?Ir:[]];for(var n of r){var a=t[n];a&&(0,g.Z)(this,Pr)[n].push({brick:e,handlers:a})}(0,i.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}memoizeControlNode(e,t,r,n){(0,g.Z)(this,Ar)||(0,Ee.Z)(this,Ar,new WeakMap);var a="".concat(null!=e?e:"",".").concat(t),o=(0,g.Z)(this,Ar).get(n);o||(o=new Map,(0,g.Z)(this,Ar).set(n,o)),o.set(a,{node:r,last:Ur(r),lastNormal:$r(r),lastPortal:Fr(r)})}rerenderControlNode(e,t,r,n){var a,o,i,s,c,l="".concat(null!=e?e:"",".").concat(t),u=(0,g.Z)(this,Ar).get(n).get(l),{node:p,last:d,lastNormal:f,lastPortal:v}=u,h=null!==(a=null==f||null===(o=f.element)||void 0===o?void 0:o.nextSibling)&&void 0!==a?a:null,m=null!==(i=null==v||null===(s=v.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=Ur(r);u.node=r,u.last=y,u.lastNormal=$r(r),u.lastPortal=Fr(r);for(var b=n.child;b&&b!==d;){if(b.sibling===p){c=b;break}b=b.sibling}var w=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:nr.ROOT,container:w,createPortal:S,child:r};for(b=r;b;)b.return=E,b=b.sibling;var k,Z,I=Dr(p,d);for((0,Se.Z)(this,_r,Br).call(this,I),Er(E),c?c.sibling=r:n.child=r,y&&(y.sibling=null==d?void 0:d.sibling),b=r;b;)b.return=n,b=b.sibling;if(n.tag===nr.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(w,h):null===(Z=n.element)||void 0===Z||Z.insertBefore(w,h),S.childNodes.length>0){for(var P,C=r;C&&C.return;)C=C.return;if((null===(P=C)||void 0===P?void 0:P.tag)!==nr.ROOT)throw new Error("Cannot find render root node");("function"==typeof C.createPortal?C.createPortal():C.createPortal).insertBefore(S,m)}var O=Dr(r,y);(0,Se.Z)(this,Tr,Lr).call(this,O)}dispose(){for(var e of Object.values((0,g.Z)(this,Pr)))e.length=0;for(var t of(0,g.Z)(this,Cr).values()){for(var r of t)r.disconnect();t.length=0}(0,g.Z)(this,Cr).clear(),(0,g.Z)(this,Or)&&(ae.removeEventListener("change",(0,g.Z)(this,Or)),(0,Ee.Z)(this,Or,void 0)),(0,Ee.Z)(this,Ar,void 0)}dispatchBeforePageLoad(){(0,Se.Z)(this,Rr,Nr).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,Se.Z)(this,Rr,Nr).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,Se.Z)(this,Rr,Nr).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,Se.Z)(this,Rr,Nr).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=be().location;e&&"#"!==e?(0,Se.Z)(this,Rr,Nr).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,Se.Z)(this,Rr,Nr).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,g.Z)(this,Pr).onScrollIntoView)(0,Se.Z)(this,Mr,jr).call(this,e,t)}initializeMediaChange(){(0,Ee.Z)(this,Or,(e=>{(0,Se.Z)(this,Rr,Nr).call(this,"onMediaChange",new CustomEvent("media.change",{detail:A(e.detail)}))})),ae.addEventListener("change",(0,g.Z)(this,Or))}dispatchOnMount(){(0,Se.Z)(this,Rr,Nr).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,Se.Z)(this,Rr,Nr).call(this,"onUnmount",new CustomEvent("unmount"))}}function Br(e){var t=[...Zr,..."router"===this.type?Ir:[]],r=[];for(var n of t){var a=(0,i.remove)((0,g.Z)(this,Pr)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...a)}for(var o of e){var s,c,l=(0,g.Z)(this,Cr).get(o);if(null!=l&&l.length){for(var u of l)u.disconnect();l.length=0,(0,g.Z)(this,Cr).delete(o)}wr(o),null===(s=o.element)||void 0===s||delete s.$$tplStateStore,null===(c=o.element)||void 0===c||c.remove()}var p=new CustomEvent("unmount");for(var{brick:d,handlers:f}of r)Bt(f,d.runtimeContext,d)(p)}function Lr(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,g.Z)(this,Pr).onMount)e.has(r)&&Bt(n,r.runtimeContext,r)(t);for(var{brick:a,handlers:o}of(0,g.Z)(this,Pr).onScrollIntoView)e.has(a)&&(0,Se.Z)(this,Mr,jr).call(this,a,o)}function Nr(e,t){for(var{brick:r,handlers:n}of(0,g.Z)(this,Pr)[e])Bt(n,r.runtimeContext,r)(t)}function jr(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,a=new IntersectionObserver(((r,a)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(Bt(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),a.disconnect())}))}),{threshold:n});a.observe(e.element);var o=(0,g.Z)(this,Cr).get(e);o||(o=[],(0,g.Z)(this,Cr).set(e,o)),o.push(a)}function Ur(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function $r(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Fr(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,a=r.return;a&&!a.sibling;)a=a.return;r=null===(n=a)||void 0===n?void 0:n.sibling}return t}function Dr(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var a,o=n.return;o&&o!==t&&!o.sibling;)o=o.return;if(o===t)break;n=null===(a=o)||void 0===a?void 0:a.sibling}}return r}function Kr(){if(!kr){if(kr={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){kr.isInIframe=!0;try{if(window.origin===window.parent.origin){kr.isInIframeOfSameSite=!0;var e="/next/"===W(),t=window.parent.location.pathname,r=t.startsWith("/next/");kr.isInIframeOfNext=0==(Number(e)^Number(r)),kr.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),kr.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(kr)}return kr}var Vr,Wr=new WeakSet;function Hr(e){if((0,p.isObject)(e)&&!qr(e))if(Wr.add(e),Array.isArray(e))e.forEach(Hr);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Hr)}}function qr(e){return Wr.has(e)}var zr=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.get("api/auth/v2/bootstrap",(0,a.Z)((0,a.Z)({},t),{},{params:e}))).data}));return function(t,r){return e.apply(this,arguments)}}(),Gr=function(){var e=(0,o.Z)((function*(e){return(yield c.http.get("api/v1/runtime_standalone",e)).data}));return function(t){return e.apply(this,arguments)}}(),Jr=function(){var e=(0,o.Z)((function*(e,t,r){return(yield c.http.get("api/auth/v2/bootstrap/".concat(e),(0,a.Z)((0,a.Z)({},r),{},{params:t}))).data}));return function(t,r,n){return e.apply(this,arguments)}}(),Yr=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.get("api/gateway/micro_app_standalone.runtime.RuntimeMicroAppStandalone/api/v1/micro_app_standalone/runtime/".concat(e),t)).data}));return function(t,r){return e.apply(this,arguments)}}(),Qr=["feature_flags"],Xr=["featureFlags","misc"];function en(){return tn.apply(this,arguments)}function tn(){return tn=(0,o.Z)((function*(){var e=yield window.STANDALONE_MICRO_APPS?function(){return rn.apply(this,arguments)}():zr({appFields:"defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status,icons,standaloneMode",ignoreTemplateFields:"templates",ignoreBrickFields:"bricks,processors,providers,editors"});for(var{app:t}of e.storyboards)t.locales?function(){var e="tmp/".concat(t.id);Object.entries(t.locales).forEach((t=>{var[r,n]=t;w.i18n.addResourceBundle(r,e,n)})),t.localeName=w.i18n.getFixedT(null,e)("name",t.name),Object.keys(t.locales).forEach((t=>{w.i18n.removeResourceBundle(t,e)}))}():t.localeName=t.name;return(0,p.isObject)(e.settings)&&(0,p.deepFreeze)(e.settings),e.brickPackages=(0,p.deepFreeze)(e.brickPackages),e})),tn.apply(this,arguments)}function rn(){return rn=(0,o.Z)((function*(){var e=[ke.http.get(window.BOOTSTRAP_FILE),ke.http.get("".concat(window.APP_ROOT,"conf.yaml"),{responseType:"text"}),Gr().catch((e=>{console.warn("request runtime api from api-gateway failed: ",e,", something might went wrong running standalone micro app")}))];if(!window.NO_AUTH_GUARD){var t,r=window.APP_ID||(window.APP_ROOT&&(t=window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/([^/]+)\/versions\//))?t[1]:null);r&&an(r)}var[n,o,i]=yield Promise.all(e);return function(e,t){var r;try{r=t?(0,Ze.safeLoad)(t,{schema:Ze.JSON_SCHEMA,json:!0}):void 0}catch(e){throw console.error("Parse conf.yaml failed",e),new Error("Invalid conf.yaml")}if(r){var{sys_settings:n,user_config:o,user_config_by_apps:i}=r;if(n){var{feature_flags:s}=n,c=(0,f.Z)(n,Qr);e.settings=(0,a.Z)({featureFlags:s},c)}if(o&&1===e.storyboards.length)e.storyboards[0].app.userConfig=o;else if(i)for(var{app:l}of e.storyboards)(0,p.hasOwnProperty)(i,l.id)&&(l.userConfig=i[l.id])}}(n,o),function(e,t){var r;if(t){var{featureFlags:n,misc:o}=t,i=(0,f.Z)(t,Xr),s=null!==(r=e.settings)&&void 0!==r?r:e.settings={};s.featureFlags=(0,a.Z)((0,a.Z)({},s.featureFlags),n),s.misc=(0,a.Z)((0,a.Z)({},s.misc),o),Object.assign(s,i)}}(n,null==i?void 0:i.settings),n})),rn.apply(this,arguments)}var nn=new Map;function an(e){return on.apply(this,arguments)}function on(){return(on=(0,o.Z)((function*(e){if(nn.has(e))return nn.get(e);var t=Yr(e).catch((e=>{console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}));return nn.set(e,t),t}))).apply(this,arguments)}function sn(){return sn=(0,o.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return cn.apply(this,arguments)}(e)),e.$$fulfilling})),sn.apply(this,arguments)}function cn(){return(cn=(0,o.Z)((function*(e){if(window.STANDALONE_MICRO_APPS){if(Object.assign(e,{$$fulfilled:!0,$$fulfilling:null}),!window.NO_AUTH_GUARD){var t;try{t=yield an(e.app.id)}catch(e){console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}if(t){var{userConfig:r,injectMenus:n}=t;e.app.userConfig=(0,a.Z)((0,a.Z)({},e.app.userConfig),r),function(e){if(Array.isArray(e))for(var t of e)t.overrideApp&&ln(t.overrideApp)}(n),e.meta=(0,a.Z)((0,a.Z)({},e.meta),{},{injectMenus:n})}}}else{var{routes:o,meta:i,app:s}=yield Jr(e.app.id,{});Object.assign(e,{routes:o,meta:i,app:(0,a.Z)((0,a.Z)({},e.app),s),$$fulfilled:!0,$$fulfilling:null})}S(e),ln(e.app)}))).apply(this,arguments)}function ln(e){e.config=(0,p.deepFreeze)((0,i.merge)({},e.defaultConfig,e.userConfig))}var un=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.post("api/gateway/micro_app_standalone.runtime.SearchMicroAppStandalone/api/v1/micro_app_standalone/search",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}();const pn=(e,t,r)=>{wn(r);const n=((e,t)=>{const r=fn(e),n=fn(t),a=r.pop(),o=n.pop(),i=gn(r,n);return 0!==i?i:a&&o?gn(a.split("."),o.split(".")):a||o?a?-1:1:0})(e,t);return yn[r].includes(n)},dn=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fn=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(dn);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},vn=e=>"*"===e||"x"===e||"X"===e,hn=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},mn=(e,t)=>{if(vn(e)||vn(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(hn(e),hn(t));return r>n?1:r<n?-1:0},gn=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=mn(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},yn={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},bn=Object.keys(yn),wn=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===bn.indexOf(e))throw new Error(`Invalid operator, expected one of ${bn.join("|")}`)};function Sn(e,t){return function(r,n,a){if(n.name===e){var o=a[a.length-1],i=a[a.length-2];if("CallExpression"===(null==i?void 0:i.node.type)&&"callee"===(null==i?void 0:i.key)&&"MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key&&(o.node.computed?"Literal"===o.node.property.type&&o.node.property.value===t:"Identifier"===o.node.property.type&&o.node.property.name===t)){var s=i.node.arguments;if(s.length>0){var c=s[0];"Literal"===c.type&&"string"==typeof c.value?r.usedArgs.add(c.value):r.hasNonStaticUsage=!0}}}}}var En=Sn("APP","getMenu"),kn=Sn("INSTALLED_APPS","has"),Zn=new Map,In=new Map;function Pn(e,t){var r=ua(e);if(!r&&window.STANDALONE_MICRO_APPS&&(r=In.get(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return pn(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}var Cn=new WeakMap,On=new WeakMap,An=new WeakMap,_n=new WeakMap,Tn=new WeakMap,Rn=new WeakMap,Mn=new WeakMap,xn=new WeakMap,Bn=new WeakMap,Ln=new WeakMap,Nn=new WeakMap,jn=new WeakMap,Un=new WeakSet,$n=new WeakSet,Fn=new WeakSet,Dn=new WeakSet;class Kn{constructor(e){(0,we.Z)(this,Dn),(0,we.Z)(this,Fn),(0,we.Z)(this,$n),(0,we.Z)(this,Un),(0,m.Z)(this,Cn,{writable:!0,value:void 0}),(0,m.Z)(this,On,{writable:!0,value:!1}),(0,m.Z)(this,An,{writable:!0,value:void 0}),(0,m.Z)(this,_n,{writable:!0,value:void 0}),(0,m.Z)(this,Tn,{writable:!0,value:void 0}),(0,m.Z)(this,Rn,{writable:!0,value:void 0}),(0,m.Z)(this,Mn,{writable:!0,value:new Set}),(0,m.Z)(this,xn,{writable:!0,value:0}),(0,m.Z)(this,Bn,{writable:!0,value:void 0}),(0,m.Z)(this,Ln,{writable:!0,value:void 0}),(0,m.Z)(this,Nn,{writable:!0,value:void 0}),(0,m.Z)(this,jn,{writable:!0,value:void 0}),(0,Ee.Z)(this,Cn,e);var t=be();window.addEventListener("beforeunload",(e=>{(0,Se.Z)(this,Un,Vn).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,Se.Z)(this,Un,Vn).call(this,{location:e,action:t})))}getRenderId(){return(0,g.Z)(this,Bn)}getRuntimeContext(){return(0,g.Z)(this,Tn)}getRecentApps(){return{currentApp:(0,g.Z)(this,Ln),previousApp:(0,g.Z)(this,Nn)}}getNavConfig(){return(0,g.Z)(this,jn)}bootstrap(){window.AbortController&&(Vr=new AbortController,ke.http.interceptors.request.use((e=>{var t;return(0,a.Z)((0,a.Z)({},e),{},{options:(0,a.Z)((0,a.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:Vr.signal})})})));var e=be();return(0,Ee.Z)(this,An,e.location),e.listen(((e,t)=>{var r,n,o,i=!1,s={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,g.Z)(this,An).key&&!1!==(null===(r=(0,g.Z)(this,An).state)||void 0===r?void 0:r.notify))||(s.key=void 0),((0,pe.locationsAreEqual)((0,a.Z)((0,a.Z)({},(0,g.Z)(this,An)),s),(0,a.Z)((0,a.Z)({},e),s))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,Ee.Z)(this,An,e);else{if(Vr&&(Vr.abort(),Vr=new AbortController),(0,Ee.Z)(this,An,e),null===(o=(0,g.Z)(this,Rn))||void 0===o||o.dispatchPageLeave(),"POP"===t&&fe(de((0,g.Z)(this,Cn),e.pathname)))return void window.location.reload();(0,g.Z)(this,On)?(0,Ee.Z)(this,_n,e):(0,Se.Z)(this,Fn,Hn).call(this,e).catch(_t)}})),(0,Se.Z)(this,Fn,Hn).call(this,e.location)}}function Vn(e){var t,r=be(),n=r.getBlockMessage();null===(t=(0,g.Z)(this,Rn))||void 0===t||t.dispatchBeforePageLeave(e);var a=r.getBlockMessage();return!n&&a&&r.unblock(),a}function Wn(e,t,r){var n,a;if((0,Ee.Z)(this,xn,(n=(0,g.Z)(this,xn),a=n++,n)),a>10){var o='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(o)}be().replace(e,t)}function Hn(e){return qn.apply(this,arguments)}function qn(){return(qn=(0,o.Z)((function*(e){(0,Ee.Z)(this,On,!0);try{yield(0,Se.Z)(this,Dn,zn).call(this,e)}finally{if((0,Ee.Z)(this,On,!1),(0,g.Z)(this,_n)){var t=(0,g.Z)(this,_n);(0,Ee.Z)(this,_n,void 0),yield(0,Se.Z)(this,Fn,Hn).call(this,t)}}}))).apply(this,arguments)}function zn(e){return Gn.apply(this,arguments)}function Gn(){return Gn=(0,o.Z)((function*(e){var t;(0,Ee.Z)(this,Bn,(0,i.uniqueId)("render-id-1")),Wr=new WeakSet,De.clear(),Ce.clear(),be().unblock();var r=de((0,g.Z)(this,Cn),e.pathname),n=null===(t=(0,g.Z)(this,Tn))||void 0===t?void 0:t.app;null!=r&&r.app&&(yield function(e){return sn.apply(this,arguments)}(r));var o,c=(0,Ee.Z)(this,Ln,null==r?void 0:r.app),l=n&&c?n.id!==c.id:n!==c,u=na().getFeatureFlags(),p=(0,g.Z)(this,Rn),d=(t,r)=>{(0,g.Z)(this,Mn).add(p),(0,Se.Z)(this,$n,Wn).call(this,t,r,e)},f=()=>{var t=u["sso-enabled"]?"/sso-auth/login":"/auth/login";d(t,{from:e})},h=document.querySelector("#main-mount-point"),m=document.querySelector("#portal-mount-point"),y={tag:nr.ROOT,container:h,createPortal:m},b=()=>{for(var e of(Sr(h),Sr(m),(0,g.Z)(this,Mn).add(p),(0,g.Z)(this,Mn)))e&&(e.dispatchOnUnmount(),e.dispose());(0,g.Z)(this,Mn).clear(),x(c&&(U()[c.id]||c.theme)||"light"),F("default"),l&&((0,Ee.Z)(this,Nn,n),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:n,currentApp:c}})))};if(c){var w,S;!function(e){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){var t=function(e){var t,r={usedArgs:new Set},{customTemplates:n,menus:a}=null!==(t=e.meta)&&void 0!==t?t:{};return(0,s.traverseStoryboardExpressions)([e.routes,n,a],((e,t)=>{kn(r,e,t)}),"INSTALLED_APPS"),[...r.usedArgs]}(e),r=[];for(var n of t)Zn.has(n)||ua(n)||r.push(n);if(0===r.length)return;var o=un({query:{appId:{$in:r}},fields:["appId","currentVersion","installStatus"]}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)})),i=function(e){Zn.set(e,o.then((t=>{var r,n=null==t||null===(r=t.list)||void 0===r?void 0:r.find((t=>t.appId===e)),o=n?(0,a.Z)((0,a.Z)({},n),{},{id:e}):void 0;return In.set(e,o),o})))};for(var c of r)i(c)}}(r);var E=(0,Ee.Z)(this,Tn,{app:c,location:e,query:new URLSearchParams(e.search),flags:u,sys:(0,a.Z)((0,a.Z)({},io()),Kr()),ctxStore:new Yt("CTX"),pendingPermissionsPreCheck:[Ja(r)],tplStateStoreMap:new Map}),k=(0,Ee.Z)(this,Rn,new xr("router"));(0,Ee.Z)(this,jn,void 0),function(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var a=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);lt.define(a,n)}}}(r),Q(null===(w=r.meta)||void 0===w?void 0:w.functions,c),o=null===(S=r.meta)||void 0===S?void 0:S.contracts,Oe(o,Pe);var Z,I=!1;try{if((Z=yield lr(y,function(e){if(window.parent===window)return e;var t=e,r=(0,i.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,i.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(r.routes),E,k)).unauthenticated)return void f();if(Z.redirect)return void d(Z.redirect.path,Z.redirect.state);(0,Ee.Z)(this,xn,0),(0,v.flushStableLoadBricks)(),yield Promise.all([...Z.blockingList,E.ctxStore.waitForAll(),...[...E.tplStateStoreMap.values()].map((e=>e.waitForAll())),...E.pendingPermissionsPreCheck]);var P=yield Promise.all(Z.menuRequests);(0,Ee.Z)(this,jn,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(P))}catch(e){if(console.error("Router failed:",e),Ct(e)&&!window.NO_AUTH_GUARD)return void f();if(e instanceof ke.HttpAbortError)return void(0,g.Z)(this,Mn).add(p);I=!0,Z={node:{tag:nr.BRICK,type:"div",properties:{textContent:Pt(e)},runtimeContext:null,return:y},blockingList:[],menuRequests:[]}}if(y.child=Z.node,b(),Z.route&&"routes"!==Z.route.type||I)return I||k.dispatchBeforePageLoad(),N(),K(),Er(y),window.scrollTo(0,0),void(I||(k.dispatchPageLoad(),k.dispatchAnchorLoad(),k.dispatchOnMount(),k.initializeScrollIntoView(),k.initializeMediaChange()))}else{if(!window.NO_AUTH_GUARD&&!co())return void f();b()}N(),K();var C={tag:nr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:y};y.child=C,Er(y),window.scrollTo(0,0)})),Gn.apply(this,arguments)}var Jn,Yn,Qn,Xn=function(){var e=(0,o.Z)((function*(e){return(yield c.http.get("api/auth/login",e)).data}));return function(t){return e.apply(this,arguments)}}();function ea(){return ta.apply(this,arguments)}function ta(){return ta=(0,o.Z)((function*(){if(!window.NO_AUTH_GUARD){var e=yield Xn();e.loggedIn&&oo(e)}})),ta.apply(this,arguments)}function ra(){if(Jn)throw new Error("Cannot create multiple runtimes");return(0,w.initializeI18n)(),ue.locale(w.i18n.language),w.i18n.on("languageChanged",(()=>{ue.locale(w.i18n.language)})),ye(),Jn=new aa}function na(){return Jn}class aa{bootstrap(){return(0,o.Z)((function*(){var[,e]=yield Promise.all([ea(),en()]);Yn=e,Qn=new Kn(e.storyboards),yield Qn.bootstrap()}))()}getRecentApps(){return Qn.getRecentApps()}getCurrentApp(){return Qn.getRecentApps().currentApp}getFeatureFlags(){var e,t,r,n,o;return(0,a.Z)((0,a.Z)((0,a.Z)({},null===(e=Yn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.featureFlags),null===(r=Qn.getRecentApps().currentApp)||void 0===r||null===(n=r.config)||void 0===n||null===(o=n.settings)||void 0===o?void 0:o.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t,r,n,o;return(0,a.Z)((0,a.Z)({},null===(e=Yn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.misc),null===(r=Qn.getRecentApps().currentApp)||void 0===r||null===(n=r.config)||void 0===n||null===(o=n.settings)||void 0===o?void 0:o.misc)}getBrandSettings(){var e,t;return(0,a.Z)({base_title:"DevOps 管理专家"},null===(e=Yn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.brand)}getLaunchpadSettings(){var e,t;return(0,a.Z)({columns:7,rows:4},null===(e=Yn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=Yn)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=Yn)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){return Qn.getNavConfig()}}function oa(e){Yn=e}function ia(){var e,t;return null!==(e=null===(t=Yn)||void 0===t?void 0:t.brickPackages)&&void 0!==e?e:[]}function sa(){return Qn.getRenderId()}function ca(){var e;return null===(e=Qn)||void 0===e?void 0:e.getRuntimeContext()}function la(e){var t,r;return null===(t=Yn)||void 0===t||null===(r=t.storyboards)||void 0===r?void 0:r.find((t=>t.app.id===e))}function ua(e){var t;return null===(t=la(e))||void 0===t?void 0:t.app}var pa=new Map,da=new Proxy(Object.freeze({}),{get:(e,t)=>pa.get(t)});function fa(e,t,r){if(pa.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:a}=J({widgetId:e,widgetVersion:r});pa.set(e,n),a(t)}var va=function(){var e=(0,o.Z)((function*(e,t,r){return(yield c.http.post("api/gateway/cmdb.instance.PostSearch/object/".concat(e,"/instance/_search"),t,r)).data}));return function(t,r,n){return e.apply(this,arguments)}}(),ha=Symbol("appId"),ma=Symbol("menuI18nNamespace"),ga=Symbol("overrideApp");function ya(){return(ya=(0,o.Z)((function*(e,t,r){if(e.dynamicItems&&e.itemsResolve){var n=e.app[0].appId,o=t;if(n!==t.app.id){var i=window.STANDALONE_MICRO_APPS?e.overrideApp:ua(n);o=(0,a.Z)((0,a.Z)({},t),{},{overrideApp:i,appendI18nNamespace:r.get(e)})}var s=yield Ke((0,a.Z)({transform:"items"},e.itemsResolve),o);e.items=s.items}}))).apply(this,arguments)}function ba(){return ba=(0,o.Z)((function*(e,t){var r=e.find((e=>"inject"!==e.type));if(r){var n=[],o=new Map,i=new WeakMap;for(var s of e)s.i18n&&function(){var e=E("menu","".concat(s.menuId,"~").concat(s.app[0].appId,"+").concat(s.instanceId));Object.entries(s.i18n).forEach((t=>{var[r,n]=t;w.i18n.addResourceBundle(r,e,n)})),i.set(s,e)}();for(var c of(yield Promise.all(e.map((e=>function(e,t,r){return ya.apply(this,arguments)}(e,t,i)))),e)){var l;if(null!==(l=c.items)&&void 0!==l&&l.length)if("inject"===c.type&&c.injectMenuGroupId){var u=o.get(c.injectMenuGroupId);u||(u=[],o.set(c.injectMenuGroupId,u)),u.push(c)}else n.push(c)}return(0,a.Z)((0,a.Z)({},r),{},{items:n.flatMap((e=>wa(e.items,e,o,i))),[ma]:i.get(r),[ga]:r.overrideApp})}})),ba.apply(this,arguments)}function wa(e,t,r,n){return null==e?void 0:e.map((e=>{var o,i=e.groupId&&r.get(e.groupId);return i&&r.delete(e.groupId),(0,a.Z)((0,a.Z)({},e),{},{children:(null!==(o=wa(e.children,t,r,n))&&void 0!==o?o:[]).concat(i?i.flatMap((e=>wa(e.items,e,r,n))):[]),[ha]:t.app[0].appId,[ma]:n.get(t),[ga]:t.overrideApp})}))}function Sa(e){return(0,i.sortBy)(e,(e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}))}var Ea=["children"];function ka(e,t,r){var n=r;if(t!==r.app.id){var o=window.STANDALONE_MICRO_APPS?e[ga]:ua(t);n=(0,a.Z)((0,a.Z)({},r),{},{overrideApp:o,appendI18nNamespace:e[ma]})}return Ka(e,n,{ignoreSymbols:!0})}function Za(e,t){return Promise.all(e.map(function(){var e=(0,o.Z)((function*(e){var{children:r}=e,n=(0,f.Z)(e,Ea),[o,i]=yield Promise.all([ka(n,n[ha],t),r&&(yield Za(r,t))]);return(0,a.Z)((0,a.Z)({},o),{},{children:i})}));return function(t){return e.apply(this,arguments)}}()))}var Ia=function(){var e=(0,o.Z)((function*(e,t,r,n){return(yield c.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),(0,a.Z)((0,a.Z)({},n),{},{params:r}))).data}));return function(t,r,n,a){return e.apply(this,arguments)}}(),Pa=new Map;function Ca(e){return Oa.apply(this,arguments)}function Oa(){return(Oa=(0,o.Z)((function*(e){if(e.title||(0,i.isEmpty)(e.titleDataSource))return e.title;var t=JSON.stringify(e.titleDataSource);if(Pa.has(t))return Pa.get(t);var r,{objectId:n,instanceId:a,attributeId:o}=e.titleDataSource,s=null!=o?o:"name",c=yield Ia(n,a,{fields:s});if("#showKey"===o&&Array.isArray(c[s])){var[l,...u]=c[s];r=u.length>0?"".concat(l,"(").concat(u.join(","),")"):String(l)}else r=String(c[s]);return Pa.set(t,r),r}))).apply(this,arguments)}var Aa=["items","app"],_a=new Map,Ta=new Map;function Ra(e){return Ta.get(e)}function Ma(){return Ma=(0,o.Z)((function*(e,t){var r=window.STANDALONE_MICRO_APPS?function(e,t){var r,n,o,i,s=la(t);return(null!==(r=null!==(n=null===(o=s.meta)||void 0===o?void 0:o.injectMenus)&&void 0!==n?n:null===(i=s.meta)||void 0===i?void 0:i.menus)&&void 0!==r?r:[]).filter((t=>t.menuId===e)).map((e=>{var r,n;return(0,a.Z)((0,a.Z)({},e),null!==(r=e.app)&&void 0!==r&&null!==(n=r[0])&&void 0!==n&&n.appId?{}:{app:[{appId:t}]})}))}(e,t.app.id):(yield va("EASYOPS_STORYBOARD_MENU",{page:1,page_size:200,fields:{menuId:!0,title:!0,icon:!0,link:!0,titleDataSource:!0,defaultCollapsed:!0,defaultCollapsedBreakpoint:!0,type:!0,injectMenuGroupId:!0,dynamicItems:!0,itemsResolve:!0,items:!0,i18n:!0,"items.children":!0,"app.appId":!0},query:{menuId:{$eq:e},app:{$size:{$gt:0}}}})).list,n=yield function(e,t){return ba.apply(this,arguments)}(r,t);if(!n)throw new Error("Menu not found: ".concat(e));!function(e){e.items=Sa(e.items).map((e=>(0,a.Z)((0,a.Z)({},e),{},{children:Sa(e.children)})))}(n);var{items:o,app:s}=n,c=(0,f.Z)(n,Aa),l=(0,a.Z)((0,a.Z)({},t),{},{pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,Xa([o,c])]});delete l.tplStateStoreId,delete l.forEachItem;var u=s[0].appId,[p,d]=yield Promise.all([ka(c,u,l),Za(o,l)]),v=(0,a.Z)((0,a.Z)({title:yield Ca(p)},(0,i.pick)(p,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"])),{},{menuItems:d.filter(Je).map((e=>{var t,r=null===(t=e.children)||void 0===t?void 0:t.filter(Je);return"group"===e.type?{type:"group",title:e.text,items:r}:null!=r&&r.length?{type:"subMenu",title:e.text,icon:e.icon,items:r,defaultExpanded:e.defaultExpanded}:e}))});Ta.set(e,v)})),Ma.apply(this,arguments)}var xa=["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope"],Ba=Symbol.for("pre.evaluated.raw"),La=Symbol.for("pre.evaluated.context");function Na(e){return!(null==e||!e[Ba])}function ja(e){return"string"==typeof e?(0,u.shouldAllowRecursiveEvaluations)(e):(0,u.shouldAllowRecursiveEvaluations)(e[Ba])}var Ua=new WeakSet([SyntaxError,TypeError,ReferenceError]);function $a(e){return Ua.has(e.constructor)?e.constructor:TypeError}function Fa(){return(Fa=(0,o.Z)((function*(e,t,r){var{blockingList:n,run:a}=Da(e,t,r,!0);return yield Promise.all(n),a()}))).apply(this,arguments)}function Da(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=[];if("string"!=typeof e){var{pendingPermissionsPreCheck:c,tplStateStoreMap:l,tplStateStoreScope:d}=t,m=(0,f.Z)(t,xa);t=(0,a.Z)((0,a.Z)({},e[La]),m),e=e[Ba]}var g,y={usedArgs:new Set},w={usedArgs:new Set};try{g=(0,u.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){En(y,e,t),kn(w,e,t)}}})}catch(t){var S="".concat(t.message,', in "').concat(e,'"');throw new($a(t))(S)}if(y.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(w.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var E,k,C,O,T={},{attemptToVisitGlobals:R}=g;if(r.lazy||R.has("EVENT")&&!(0,p.hasOwnProperty)(t,"event")||R.has("DATA")&&!(0,p.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[Ba]:e,[La]:t}:e};var M=ot(t);(R.has("STATE")||!M&&R.has("TPL"))&&(O=ut(t,"STATE",': "'.concat(e,'"')));var x,B=P();if(n||B){if(R.has("CTX")&&(E=(0,s.strictCollectMemberUsage)(e,"CTX"),n&&o.push(t.ctxStore.waitFor(E))),O){if(C=(0,s.strictCollectMemberUsage)(e,"STATE"),!M){var L=(0,s.strictCollectMemberUsage)(e,"TPL");for(var N of L)C.add(N)}n&&o.push(O.waitFor(C))}R.has("PROCESSORS")&&(k=(0,s.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&o.push((0,v.loadProcessorsImperatively)(k,ia())))}if(n){var j=R.has("PERMISSIONS");if(!j&&R.has("FN")){var U=[...(0,s.strictCollectMemberUsage)(e,"FN")];j=X(U)}if(j&&o.push(...t.pendingPermissionsPreCheck),y.usedArgs.size>0){var $=[...y.usedArgs];o.push(Promise.all($.map((e=>function(e,t){var r=_a.get(e);return r||(r=function(e,t){return Ma.apply(this,arguments)}(e,t)),r}(e,t)))))}w.usedArgs.size>0&&o.push((x=[...w.usedArgs],Promise.all(x.map((e=>Zn.get(e))))))}return{blockingList:o,run(){var r,n,{app:o,location:s,query:c,match:l,flags:d,sys:f,ctxStore:v,data:m,event:y}=t,w=null!==(r=t.overrideApp)&&void 0!==r?r:o;for(var S of R)switch(S){case"ANCHOR":T[S]=s.hash?s.hash.substring(1):null;break;case"APP":T[S]=(0,a.Z)((0,a.Z)({},(0,i.cloneDeep)(w)),{},{getMenu:Ra});break;case"CTX":T[S]=_({get:(e,t)=>v.getValue(t),ownKeys:()=>Array.from(E)});break;case"DATA":T[S]=m;break;case"EVENT":T[S]=y;break;case"FLAGS":T[S]=A(d);break;case"HASH":T[S]=s.hash;break;case"INSTALLED_APPS":T[S]=A({has:Pn});break;case"ITEM":(0,p.hasOwnProperty)(t,"forEachItem")?T[S]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":T[S]=A({getItem:le("local")});break;case"MEDIA":T[S]=A(ce());break;case"MISC":T[S]=na().getMiscSettings();break;case"PARAMS":T[S]=new URLSearchParams(c);break;case"PATH":T[S]=A(null!==(n=null==l?void 0:l.params)&&void 0!==n?n:{});break;case"PATH_NAME":T[S]=s.pathname;break;case"PROCESSORS":T[S]=_({get(e,t){var r=b.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return _({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys:()=>Array.from(k)});break;case"QUERY":T[S]=Object.fromEntries(Array.from(c.keys()).map((e=>[e,c.get(e)])));break;case"QUERY_ARRAY":T[S]=Object.fromEntries(Array.from(c.keys()).map((e=>[e,c.getAll(e)])));break;case"SESSION_STORAGE":T[S]=A({getItem:le("session")});break;case"TPL":if(it(M,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),M)break;case"STATE":T[S]=_({get:(e,t)=>O.getValue(t),ownKeys:()=>Array.from(C)});break;case"SYS":T[S]=A(null!=f?f:{});break;case"__WIDGET_FN__":T[S]=da;break;case"__WIDGET_IMG__":T[S]=I;break;case"__WIDGET_I18N__":T[S]=Z}Object.assign(T,H(g.attemptToVisitGlobals,{storyboardFunctions:Y,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{return(0,u.cook)(g.expression,g.source,{globalVariables:(0,h.supply)(g.attemptToVisitGlobals,T)})}catch(t){var P="".concat(t.message,', in "').concat(e,'"');throw new($a(t))(P)}}}}function Ka(e,t){return Va.apply(this,arguments)}function Va(){return Va=(0,o.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Na(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&Xe(r.$$stateOfUseBrick),i=o;return n||(0,u.isEvaluable)(e)?(a=yield function(e,t,r){return Fa.apply(this,arguments)}(e,t,{lazy:o}),i=ja(e)):a=o?e:((0,p.hasOwnProperty)(t,"data")?r.noInject?d.transform:d.transformAndInject:r.noInject?qa:d.inject)(e,t),i||Hr(a),a}if(!(0,p.isObject)(e)||qr(e))return e;if(Array.isArray(e)){var s=Ha(r,!0);return Promise.all(e.map((e=>Ka(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,a]=e;return Promise.all([Ka(n,t),Ka(a,t,Ha(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),Va.apply(this,arguments)}function Wa(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Na(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&Xe(r.$$stateOfUseBrick),i=o;return n||(0,u.isEvaluable)(e)?(a=function(e,t,r){var{run:n}=Da(e,t,void 0,!1);return n()}(e,t),i=ja(e)):a=o?e:((0,p.hasOwnProperty)(t,"data")?r.noInject?d.transform:d.transformAndInject:r.noInject?qa:d.inject)(e,t),i||Hr(a),a}if(!(0,p.isObject)(e)||qr(e))return e;if(Array.isArray(e)){var s=Ha(r,!0);return e.map((e=>Wa(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;return[Wa(n,t),Wa(a,t,Ha(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function Ha(e,t,r){return e.$$lazyForUseBrick?(0,a.Z)((0,a.Z)({},e),{},{$$stateOfUseBrick:et(e.$$stateOfUseBrick,t,r)}):e}function qa(e){return e}var za=[],Ga=new Map;function Ja(e){if(co()&&!io().isAdmin)return eo((0,s.scanPermissionActionsInStoryboard)(e))}function Ya(e,t){return Qa.apply(this,arguments)}function Qa(){return(Qa=(0,o.Z)((function*(e,t){if(co()&&!io().isAdmin&&Array.isArray(e.permissionsPreCheck))return eo(yield Ka(e.permissionsPreCheck,t))}))).apply(this,arguments)}function Xa(e){if(co()&&!io().isAdmin)return eo((0,s.scanPermissionActionsInAny)(e))}function eo(e){return to.apply(this,arguments)}function to(){return(to=(0,o.Z)((function*(e){var t=(0,i.difference)(e,[...za]);if(0!==t.length){za.push(...t);try{var r=yield l({actions:t});for(var n of r.actions)Ga.set(n.action,n.authorizationStatus),"undefined"===n.authorizationStatus&&console.error('Undefined permission action: "'.concat(n.action,'"'))}catch(e){console.error("Pre-check permissions failed",e)}}}))).apply(this,arguments)}function ro(){if(!co())return!1;if(io().isAdmin)return!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n of t)switch(Ga.get(n)){case"unauthorized":case"undefined":return!1;case void 0:return console.error('Un-checked permission action: "'.concat(n,'", please make sure the permission to check is defined in permissionsPreCheck.')),!1}return!0}var no,ao={};function oo(e){Object.assign(ao,{org:e.org,username:e.username,userInstanceId:e.userInstanceId,loginFrom:e.loginFrom,accessRule:e.accessRule,isAdmin:e.isAdmin,csrfToken:e.csrfToken,license:e.license,userShowValue:e.userShowValue})}function io(){return(0,a.Z)({},ao)}function so(){for(var e of Object.keys(ao))ao[e]=void 0;za.length=0,Ga.clear()}function co(){return void 0!==ao.username}function lo(e,t,r){return uo.apply(this,arguments)}function uo(){return(uo=(0,o.Z)((function*(e,t,r){return We(yield Ue(e),e,"resolve",t,r)}))).apply(this,arguments)}function po(e,t){return fo.apply(this,arguments)}function fo(){return(fo=(0,o.Z)((function*(e,t){var r,n,o=[],i=(0,a.Z)((0,a.Z)({},ca()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:o});null!==(r=i.tplStateStoreMap)&&void 0!==r||(i.tplStateStoreMap=new Map);var s=new xr("useBrick"),c={tag:nr.ROOT,createPortal:null},l=e.transform,u=ot();l&&it(u,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var p=yield fr(c,u?e:(0,a.Z)((0,a.Z)({},e),{},{properties:(0,a.Z)((0,a.Z)({},e.properties),l)}),i,s);if((0,v.flushStableLoadBricks)(),yield Promise.all([...p.blockingList,...o.map((e=>e.waitForAll())),...i.pendingPermissionsPreCheck]),null!==(n=p.node)&&void 0!==n&&n.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return c.child=p.node,{tagName:p.node?p.node.type:null,renderRoot:c,rendererContext:s}}))).apply(this,arguments)}function vo(e,t){var r,{renderRoot:n,rendererContext:a}=e;return n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},Er(n,t),a.dispatchOnMount(),a.initializeScrollIntoView(),a.initializeMediaChange(),{portal:r}}function ho(e,t){var{rendererContext:r}=e;t.portal&&(Sr(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function mo(e){oa(e)}function go(e,t){return yo.apply(this,arguments)}function yo(){return yo=(0,o.Z)((function*(e,t){var r,n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={pendingPermissionsPreCheck:[],tplStateStoreMap:new Map},i=no,s=no=new xr("router"),c={tag:nr.ROOT,container:t.main,createPortal:t.portal},l=!1;try{(r=yield pr(c,e,o,s)).blockingList.push(...[...o.tplStateStoreMap.values()].map((e=>e.waitForAll())),...o.pendingPermissionsPreCheck),(0,v.flushStableLoadBricks)(),yield Promise.all(r.blockingList)}catch(e){l=!0,r={node:{tag:nr.BRICK,type:"div",properties:{textContent:Pt(e)},return:c,runtimeContext:null},blockingList:[],menuRequests:[]}}c.child=r.node,null==i||i.dispose(),Sr(t.main),Sr(t.portal),a.sandbox&&(x(null!==(n=a.theme)&&void 0!==n?n:"light"),F("default"),l||s.dispatchBeforePageLoad(),N(),K()),Er(c),a.sandbox&&window.scrollTo(0,0),l||(s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange())})),yo.apply(this,arguments)}function bo(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return Wa(t,(0,a.Z)((0,a.Z)({},ca()),{},{data:e}),{noInject:!0})}function wo(e){return(0,v.loadBricksImperatively)(e,ia())}function So(e,t){var r=la(e);Object.assign(r,(0,a.Z)((0,a.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),S(r)}function Eo(e,t){var r=la(e),n=!1,a=e=>"".concat(e.path,".").concat(e.exact),o=(e,r)=>e.map((e=>{var i=a(e);return"routes"===e.type?(e.routes=o(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=o(r.routes,a(t)),n||r.routes.unshift(t)}function ko(e,t,r){var n="".concat(e,".").concat(t.name);lt.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Zo(e,t.name,r)}function Zo(e,t,r){Co(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,a.Z)({brick:t},(0,i.pick)(r,"properties","events","lifeCycle","context"))])}function Io(e,t){var r;Co(e,"${APP.homepage}/_dev_only_/snippet-preview/".concat(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var Po=Io;function Co(e,t,r){var{routes:n}=la(e),a=n.findIndex((e=>e.path===t)),o={path:t,bricks:r,menu:!1,exact:!0};-1===a?n.unshift(o):n.splice(a,1,o)}}}]);
3
- //# sourceMappingURL=2951.57059430.js.map