@next-bricks/data-view 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +8 -8
- package/dist/chunks/{1646.156dcbf3.js → 1646.d0a1030e.js} +2 -2
- package/dist/chunks/{1646.156dcbf3.js.map → 1646.d0a1030e.js.map} +1 -1
- package/dist/chunks/2255.4057783a.js +2 -0
- package/dist/chunks/{2255.ffe2878d.js.map → 2255.4057783a.js.map} +1 -1
- package/dist/chunks/2618.b7473aca.js +2 -0
- package/dist/chunks/2618.b7473aca.js.map +1 -0
- package/dist/chunks/2916.a50c63cb.js +2 -0
- package/dist/chunks/2916.a50c63cb.js.map +1 -0
- package/dist/chunks/{3458.73b6b402.js → 3458.789f8dd5.js} +2 -2
- package/dist/chunks/{3458.73b6b402.js.map → 3458.789f8dd5.js.map} +1 -1
- package/dist/chunks/3494.e97255cc.js +2 -0
- package/dist/chunks/{3494.6cf0edd1.js.map → 3494.e97255cc.js.map} +1 -1
- package/dist/chunks/4770.d23b88f6.js +2 -0
- package/dist/chunks/{4770.85ed3808.js.map → 4770.d23b88f6.js.map} +1 -1
- package/dist/chunks/4791.ff1d135f.js +2 -0
- package/dist/chunks/4791.ff1d135f.js.map +1 -0
- package/dist/chunks/5114.5a94f9ac.js +2 -0
- package/dist/chunks/{5114.95ef8002.js.map → 5114.5a94f9ac.js.map} +1 -1
- package/dist/chunks/5151.13888d0e.js +2 -0
- package/dist/chunks/5151.13888d0e.js.map +1 -0
- package/dist/chunks/{5636.d8be0c69.js → 5636.aa05b01d.js} +2 -2
- package/dist/chunks/{5636.d8be0c69.js.map → 5636.aa05b01d.js.map} +1 -1
- package/dist/chunks/6205.0b9aaf08.js +2 -0
- package/dist/chunks/{6205.3ec27cf6.js.map → 6205.0b9aaf08.js.map} +1 -1
- package/dist/chunks/{6789.47cc0cb4.js → 6789.fcbbeadb.js} +3 -3
- package/dist/chunks/6789.fcbbeadb.js.map +1 -0
- package/dist/chunks/7164.68a85e8b.js +2 -0
- package/dist/chunks/{7164.078e2335.js.map → 7164.68a85e8b.js.map} +1 -1
- package/dist/chunks/7746.dd1e6648.js +2 -0
- package/dist/chunks/{7746.cd2f8399.js.map → 7746.dd1e6648.js.map} +1 -1
- package/dist/chunks/7822.d333a55c.js +2 -0
- package/dist/chunks/{7822.71cdd51d.js.map → 7822.d333a55c.js.map} +1 -1
- package/dist/chunks/{8008.00ab7560.js → 8008.8d750b61.js} +3 -3
- package/dist/chunks/8008.8d750b61.js.map +1 -0
- package/dist/chunks/{8691.041abffe.js → 8691.a6fb5c94.js} +2 -2
- package/dist/chunks/{8691.041abffe.js.map → 8691.a6fb5c94.js.map} +1 -1
- package/dist/chunks/9566.91fd6607.js +2 -0
- package/dist/chunks/{9566.44c55749.js.map → 9566.91fd6607.js.map} +1 -1
- package/dist/chunks/app-wall-card-item.a3492828.js +3 -0
- package/dist/chunks/{app-wall-card-item.083aad61.js.map → app-wall-card-item.a3492828.js.map} +1 -1
- package/dist/chunks/app-wall-relation-line.9feb3b3f.js +3 -0
- package/dist/chunks/{app-wall-relation-line.f75b2c80.js.map → app-wall-relation-line.9feb3b3f.js.map} +1 -1
- package/dist/chunks/app-wall.aa916383.js +2 -0
- package/dist/chunks/{app-wall.5936781a.js.map → app-wall.aa916383.js.map} +1 -1
- package/dist/chunks/battery-chart.c7b33cfd.js +2 -0
- package/dist/chunks/{battery-chart.bd569294.js.map → battery-chart.c7b33cfd.js.map} +1 -1
- package/dist/chunks/cabinet-app-layer.e21662e2.js +3 -0
- package/dist/chunks/{cabinet-app-layer.e9fecdad.js.map → cabinet-app-layer.e21662e2.js.map} +1 -1
- package/dist/chunks/cabinet-button.8d0c43bb.js +2 -0
- package/dist/chunks/{cabinet-button.42a5f162.js.map → cabinet-button.8d0c43bb.js.map} +1 -1
- package/dist/chunks/cabinet-container.2a6bd9ff.js +3 -0
- package/dist/chunks/{cabinet-container.117e3e29.js.map → cabinet-container.2a6bd9ff.js.map} +1 -1
- package/dist/chunks/cabinet-graph.5fe924b2.js +2 -0
- package/dist/chunks/{cabinet-graph.2ef76e98.js.map → cabinet-graph.5fe924b2.js.map} +1 -1
- package/dist/chunks/cabinet-node.ee749eda.js +3 -0
- package/dist/chunks/{cabinet-node.555dd49f.js.map → cabinet-node.ee749eda.js.map} +1 -1
- package/dist/chunks/cabinet-thumbnail.33d08f9c.js +3 -0
- package/dist/chunks/{cabinet-thumbnail.115b7c11.js.map → cabinet-thumbnail.33d08f9c.js.map} +1 -1
- package/dist/chunks/complex-search.48468b67.js +2 -0
- package/dist/chunks/{complex-search.ac75614a.js.map → complex-search.48468b67.js.map} +1 -1
- package/dist/chunks/dropdown-menu.def63513.js +3 -0
- package/dist/chunks/{dropdown-menu.7e5b947c.js.map → dropdown-menu.def63513.js.map} +1 -1
- package/dist/chunks/gauge-chart.ebf65ada.js +2 -0
- package/dist/chunks/{gauge-chart.baad2ba5.js.map → gauge-chart.ebf65ada.js.map} +1 -1
- package/dist/chunks/gear-background.c727f136.js +2 -0
- package/dist/chunks/{gear-background.5d5cee98.js.map → gear-background.c727f136.js.map} +1 -1
- package/dist/chunks/graph-layout-grid.01486b61.js +2 -0
- package/dist/chunks/{graph-layout-grid.16ad05f1.js.map → graph-layout-grid.01486b61.js.map} +1 -1
- package/dist/chunks/graph-node.7e008e6d.js +2 -0
- package/dist/chunks/{graph-node.f20db984.js.map → graph-node.7e008e6d.js.map} +1 -1
- package/dist/chunks/graph-text.8b552f5a.js +2 -0
- package/dist/chunks/{graph-text.cb5750dd.js.map → graph-text.8b552f5a.js.map} +1 -1
- package/dist/chunks/grid-background.c0611eb6.js +2 -0
- package/dist/chunks/{grid-background.808fe7d2.js.map → grid-background.c0611eb6.js.map} +1 -1
- package/dist/chunks/loading-panel.77c4428a.js +2 -0
- package/dist/chunks/{loading-panel.5040ccd1.js.map → loading-panel.77c4428a.js.map} +1 -1
- package/dist/chunks/main.ae40e39f.js +2 -0
- package/dist/chunks/main.ae40e39f.js.map +1 -0
- package/dist/chunks/modern-style-component-title.7f261750.js +2 -0
- package/dist/chunks/{modern-style-component-title.d2de47bf.js.map → modern-style-component-title.7f261750.js.map} +1 -1
- package/dist/chunks/modern-style-page-title.e3cbe6a7.js +2 -0
- package/dist/chunks/{modern-style-page-title.a62f19ad.js.map → modern-style-page-title.e3cbe6a7.js.map} +1 -1
- package/dist/chunks/modern-style-treemap.67186c49.js +3 -0
- package/dist/chunks/{modern-style-treemap.1cfa0f4c.js.map → modern-style-treemap.67186c49.js.map} +1 -1
- package/dist/chunks/particle-animation.01eed207.js +2 -0
- package/dist/chunks/{particle-animation.bb5f6ec7.js.map → particle-animation.01eed207.js.map} +1 -1
- package/dist/chunks/radar-chart.6e054c16.js +2 -0
- package/dist/chunks/{radar-chart.a309d642.js.map → radar-chart.6e054c16.js.map} +1 -1
- package/dist/chunks/tabs-drawer.437d152e.js +3 -0
- package/dist/chunks/{tabs-drawer.12b4a6d0.js.map → tabs-drawer.437d152e.js.map} +1 -1
- package/dist/index.f6e83f32.js +2 -0
- package/dist/index.f6e83f32.js.map +1 -0
- package/package.json +4 -4
- package/dist/chunks/2255.ffe2878d.js +0 -2
- package/dist/chunks/2618.68a01967.js +0 -2
- package/dist/chunks/2618.68a01967.js.map +0 -1
- package/dist/chunks/2916.949ccbac.js +0 -2
- package/dist/chunks/2916.949ccbac.js.map +0 -1
- package/dist/chunks/3494.6cf0edd1.js +0 -2
- package/dist/chunks/4770.85ed3808.js +0 -2
- package/dist/chunks/4791.3791c567.js +0 -2
- package/dist/chunks/4791.3791c567.js.map +0 -1
- package/dist/chunks/5114.95ef8002.js +0 -2
- package/dist/chunks/5151.85589a1d.js +0 -2
- package/dist/chunks/5151.85589a1d.js.map +0 -1
- package/dist/chunks/6205.3ec27cf6.js +0 -2
- package/dist/chunks/6789.47cc0cb4.js.map +0 -1
- package/dist/chunks/7164.078e2335.js +0 -2
- package/dist/chunks/7746.cd2f8399.js +0 -2
- package/dist/chunks/7822.71cdd51d.js +0 -2
- package/dist/chunks/8008.00ab7560.js.map +0 -1
- package/dist/chunks/9566.44c55749.js +0 -2
- package/dist/chunks/app-wall-card-item.083aad61.js +0 -3
- package/dist/chunks/app-wall-relation-line.f75b2c80.js +0 -3
- package/dist/chunks/app-wall.5936781a.js +0 -2
- package/dist/chunks/battery-chart.bd569294.js +0 -2
- package/dist/chunks/cabinet-app-layer.e9fecdad.js +0 -3
- package/dist/chunks/cabinet-button.42a5f162.js +0 -2
- package/dist/chunks/cabinet-container.117e3e29.js +0 -3
- package/dist/chunks/cabinet-graph.2ef76e98.js +0 -2
- package/dist/chunks/cabinet-node.555dd49f.js +0 -3
- package/dist/chunks/cabinet-thumbnail.115b7c11.js +0 -3
- package/dist/chunks/complex-search.ac75614a.js +0 -2
- package/dist/chunks/dropdown-menu.7e5b947c.js +0 -3
- package/dist/chunks/gauge-chart.baad2ba5.js +0 -2
- package/dist/chunks/gear-background.5d5cee98.js +0 -2
- package/dist/chunks/graph-layout-grid.16ad05f1.js +0 -2
- package/dist/chunks/graph-node.f20db984.js +0 -2
- package/dist/chunks/graph-text.cb5750dd.js +0 -2
- package/dist/chunks/grid-background.808fe7d2.js +0 -2
- package/dist/chunks/loading-panel.5040ccd1.js +0 -2
- package/dist/chunks/main.a05c27c2.js +0 -2
- package/dist/chunks/main.a05c27c2.js.map +0 -1
- package/dist/chunks/modern-style-component-title.d2de47bf.js +0 -2
- package/dist/chunks/modern-style-page-title.a62f19ad.js +0 -2
- package/dist/chunks/modern-style-treemap.1cfa0f4c.js +0 -3
- package/dist/chunks/particle-animation.bb5f6ec7.js +0 -2
- package/dist/chunks/radar-chart.a309d642.js +0 -2
- package/dist/chunks/tabs-drawer.12b4a6d0.js +0 -3
- package/dist/index.cd0cba8b.js +0 -2
- package/dist/index.cd0cba8b.js.map +0 -1
- /package/dist/chunks/{6789.47cc0cb4.js.LICENSE.txt → 6789.fcbbeadb.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{8008.00ab7560.js.LICENSE.txt → 8008.8d750b61.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{app-wall-card-item.083aad61.js.LICENSE.txt → app-wall-card-item.a3492828.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{app-wall-relation-line.f75b2c80.js.LICENSE.txt → app-wall-relation-line.9feb3b3f.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-app-layer.e9fecdad.js.LICENSE.txt → cabinet-app-layer.e21662e2.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-container.117e3e29.js.LICENSE.txt → cabinet-container.2a6bd9ff.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-node.555dd49f.js.LICENSE.txt → cabinet-node.ee749eda.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-thumbnail.115b7c11.js.LICENSE.txt → cabinet-thumbnail.33d08f9c.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{dropdown-menu.7e5b947c.js.LICENSE.txt → dropdown-menu.def63513.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{modern-style-treemap.1cfa0f4c.js.LICENSE.txt → modern-style-treemap.67186c49.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{tabs-drawer.12b4a6d0.js.LICENSE.txt → tabs-drawer.437d152e.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[2255],{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:()=>o});var n=r(175);function o(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:()=>o});var n=r(5863);function o(e,t,r){(0,n.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(175);function o(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:()=>o});var n=r(5863);function o(e,t){(0,n.Z)(e,t),t.add(e)}},6666:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5850);function o(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:()=>a});var n=r(6666);function o(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 a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(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,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,{Z:()=>n})},5850:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(6522);function o(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 o=r.call(e,"string");if("object"!==(0,n.Z)(o))return o;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})},2255:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>Gt,Notification:()=>tr,StoryboardFunctionRegistryFactory:()=>ce,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>Q,authenticate:()=>ho,batchSetAppsLocalTheme:()=>J,checkIfByTransform:()=>kt,checkIfOfComputed:()=>St,createHistory:()=>k,createRuntime:()=>oo,customProcessors:()=>x,customTemplates:()=>Ae,fetchByProvider:()=>bo,getAuth:()=>mo,getBasePath:()=>v,getCssPropertyValue:()=>ne,getCurrentMode:()=>te,getCurrentTheme:()=>q,getHistory:()=>Z,getPageInfo:()=>An,getRuntime:()=>ao,handleHttpError:()=>er,httpErrorToString:()=>qt,isLoggedIn:()=>yo,isUnauthenticatedError:()=>Qt,logout:()=>go,matchPath:()=>Bt,registerWidgetFunctions:()=>Re,registerWidgetI18n:()=>L,unstable_createRoot:()=>So});var n={};r.r(n),r.d(n,{legacyDoTransform:()=>Ao,mountUseBrick:()=>Zo,renderUseBrick:()=>Eo,unmountUseBrick:()=>Io,updateSnippetPreviewSettings:()=>_o,updateStoryboard:()=>Oo,updateStoryboardByRoute:()=>To,updateStoryboardBySnippet:()=>Ro,updateStoryboardByTemplate:()=>Co,updateTemplatePreviewSettings:()=>Po});var o=r(3028),a=r(4795),i=r(3395),s=r(381),c=r(687),l=r(8641),u=r(5290),d=r(3080),p=r(8874),f=(r(8525),r(7857));function v(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var h=r(2159),m=r(5178);function g(e,t){var r=(0,m.orderBy)(e,(e=>{var t,r,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 o=n.app.homepage;if("string"==typeof o&&"/"===o[0]&&("/"===o?t===o:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(o.replace(/\/+$/,""),"/"))))return n}}function y(e){var t;return!e||(null===(t=ao().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var b,w=["extraQuery","clear","keepHash"],S=!1;function E(e,t){t(!(S=!confirm(e)))}function k(){if(!b){var e=(0,f.createBrowserHistory)({basename:v().replace(/\/$/,""),getUserConfirmation:E});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function a(e,t,n){S=!1,r(e,t),null==n||n(S)}function i(e,t,r){S=!1,n(e,t),null==r||r(S)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:c,keepHash:l}=n,u=(0,h.Z)(n,w),d=new URLSearchParams(c?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var m of(d.delete(f),v))d.append(f,m);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?a:i)("?".concat(d.toString()).concat(l?e.location.hash:""),u,o)}}return(0,o.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){a((0,o.Z)((0,o.Z)({},e.location),{},{key:void 0,hash:t,state:(0,o.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,o.Z)((0,o.Z)({},e.location),{},{state:(0,o.Z)((0,o.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(o,a,i){var s,c="string"==typeof o;return"string"==typeof(s=c?(0,f.parsePath)(o).pathname:o.pathname)&&s.startsWith("/")&&y(function(e){var t,r;return g(null!==(t=null===(r=eo)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](c?v()+o.substring(1):e.createHref(o)):("push"===n?t:r)(o,a,i)}}return{push:n("push"),replace:n("replace")}}((0,o.Z)((0,o.Z)({},e),{},{push:a,replace:i})))}(e)),b=e}return b}function Z(){return b}var I=r(5866),A=r(6171),O=r(1682),T=r(4537),C=r(534),P=r(2930),R=r(4608),_=new WeakMap,x=new class{constructor(){(0,i.Z)(this,_,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),o=(0,c.Z)(this,_).get(r);if(o||(o=new Map,(0,c.Z)(this,_).set(r,o)),o.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));o.set(n,t)}get(e){return(0,c.Z)(this,_).get(e)}};function M(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=B("app",t.id),o=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;l.i18n.addResourceBundle(t,n,r),o.push(t)})),()=>{for(var e of o)l.i18n.removeResourceBundle(e,n)}}}function B(e,t){return"".concat(e,"/").concat(t)}function L(e,t){var r=B("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;l.i18n.addResourceBundle(t,r,n)}))}function U(e){return l.i18n.getFixedT(null,B("widget",e))}function N(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 F(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var j=()=>{throw new Error("Can't modify read-only proxy object")},$={set:j,defineProperty:j,deleteProperty:j,setPrototypeOf:j};function K(e){return new Proxy(e,$)}function D(e){var{get:t,ownKeys:r}=e;return F()?K(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var W="light",V=new d.JsonStorage(localStorage),H="apps-theme";function z(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));W=e}function G(){return W}function q(){return document.documentElement.dataset.theme}function Q(e){e?z(e):e=G(),e!==q()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function J(e){V.setItem(H,(0,o.Z)((0,o.Z)({},Y()),e))}function Y(){var e,t;try{t=V.getItem(H)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var X="default";function ee(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));X=e}function te(){return document.documentElement.dataset.mode}function re(e){e?ee(e):e=X,e!==te()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ne(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 oe(e,t){var r={};for(var n of e){var o=ae(n,t);void 0!==o&&(r[n]=o)}return r}function ae(e,t){var r,n,o,a,{collectCoverage:i,widgetId:s,widgetVersion:c,app:u,appendI18nNamespace:d,storyboardFunctions:p,isStoryboardFunction:f}=t;switch(e){case"BASE_URL":return i?"/next":v().replace(/\/$/,"");case"FN":return p;case"IMG":return i?{get:e=>"mock/images/".concat(e)}:s?N(s,c):(n=u.id,o=u.isBuildPush,a=u.currentVersion,{get(e){if(o)return"".concat(v(),"api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/").concat(e);var t=window.APP_ROOT?"".concat(window.APP_ROOT,"-/"):"";return window.APP_ID&&window.APP_ID!==n&&(t=t.replace(new RegExp("(^|/)".concat((0,m.escapeRegExp)(window.APP_ID),"/")),"$1".concat(n,"/")).replace(/\/\d+\.\d+\.\d+\//,"/".concat(a,"/"))),t.startsWith("/")||(t=v()+t),"".concat(t,"micro-apps/").concat(n,"/images/").concat(e)}});case"I18N":return i?m.identity:s?U(s):l.i18n.getFixedT(null,[d,B("app",u.id)].filter(Boolean));case"I18N_TEXT":return i?ie:l.i18nText;case"PERMISSIONS":return K({check:i?se:null==ro||null===(r=ro.checkPermissions)||void 0===r?void 0:r.checkPermissions});case"THEME":return K({getTheme:i?()=>"light":G});case"console":return f?K(console):void 0;case"location":return i?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function ie(e){return null==e?void 0:e.en}function se(){return!0}function ce(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=new Map,i=new Proxy(Object.freeze({}),{get:(o,s)=>function(o){var s,c=a.get(o);if(c){if(c.processed)return c.cooked;n&&(s=n.createCollector(o));var l=(0,T.precookFunction)(c.source,{typescript:c.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return c.cooked=(0,T.cook)(l.function,c.source,{rules:{noVar:!0},globalVariables:(0,P.supply)(l.attemptToVisitGlobals,oe(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),a.clear(),Array.isArray(t))for(var n of t){var o=(0,R.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");a.set(n.name,{source:n.source,typescript:n.typescript,deps:o,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,o.Z)((0,o.Z)({},t),{},{name:e}),n=(0,R.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");a.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=a.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:le,registerStoryboardFunctions:ue,checkPermissionsUsage:de}=ce(),pe={};try{pe.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,o=a.prototype;function a(){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(o,"addEventListener",(function(e,r,n){for(var o=t.get(this),a=o[e]||(o[e]=[]),i=0,s=a.length;i<s;i++)if(a[i].listener===r)return;a.push({target:this,listener:r,options:n})})),i(o,"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(o,"removeEventListener",(function(e,r){for(var n=t.get(this),o=n[e]||(n[e]=[]),a=0,i=o.length;a<i;a++)if(o[a].listener===r)return void o.splice(a,1)})),pe.EventTarget=a}(Object,new WeakMap)}const fe=pe.EventTarget;var ve=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),he=new Map([[ve.xLarge,"1920px"],[ve.large,"1600px"],[ve.medium,"1280px"],[ve.small,"1024px"],[ve.xSmall,0]]),me=new fe,ge={},ye={};function be(e,t){var r=!1;for(var[n]of(ge[t]=e.matches,he))if(ge[n]&&ye.breakpoint!==n){ye.breakpoint=n,r=!0;break}r&&me.dispatchEvent(new CustomEvent("change",{detail:ye}))}he.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));be(r,t),r.addEventListener?r.addEventListener("change",(e=>{be(e,t)})):r.addListener((e=>{be(e,t)}))}));var we=()=>ye;function Se(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Ee(e){var t,r;return!(null===(t=e?e.flags:null===(r=ao())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function ke(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var a=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(a),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(a),...n)}var Ze=new Set(["prefix"]),Ie=new WeakMap,Ae=new class{constructor(){(0,i.Z)(this,Ie,{writable:!0,value:new Map})}define(e,t){var r,n,a,i,s=(0,c.Z)(this,Ie).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var l=Ee(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},d=[],p=[];for(var[f,v]of Object.entries(u))v.asVariable?(ke(l,"Template `asVariable`",e,f),l||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&d.push([f,v]);var h=(0,o.Z)((0,o.Z)({},t),{},{proxy:(0,o.Z)((0,o.Z)({},t.proxy),{},{properties:Object.fromEntries(d)}),state:(t.state?l?t.state:t.state.map((e=>(0,o.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,c.Z)(this,Ie).set(e,(0,o.Z)((0,o.Z)({},h),{},{name:e}));var g,y,b=(g=h.state,(0,m.uniq)(null!==(y=null==g?void 0:g.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),w=Object.entries(null!==(a=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==a?a:{}),S=b.concat(d.map((e=>e[0]))),E=w.map((e=>e[0])),k=S.concat(E).filter((e=>e in HTMLElement.prototype&&!Ze.has(e)));if(k.length>0&&(ke(l,"Using native HTMLElement properties as template properties or methods",e,...k),l))throw new Error('In custom template "'.concat(e,'", ').concat(k.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return S}static get _dev_only_definedMethods(){return E}$$getElementByRef(e){var t,r,n,o;return null===(t=this.$$tplStateStore)||void 0===t||null===(r=t.hostBrick)||void 0===r||null===(n=r.tplHostMetadata)||void 0===n||null===(o=n.internalBricksByRef.get(e))||void 0===o?void 0:o.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(d.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),"continue";Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var I of b)Z(I);var A=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,o,a=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);a&&(a[null!==(o=r.refProperty)&&void 0!==o?o:e]=t)},enumerable:!0})};for(var[O,T]of d)A(O,T);var C=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[P,R]of w)C(P,R);customElements.define(e,t)}}get(e){return(0,c.Z)(this,Ie).get(e)}};function Oe(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var a=o.get(n);if(!a)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 a}function Te(e,t,r){var n=Oe(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}var Ce=new Map,Pe=new Proxy(Object.freeze({}),{get:(e,t)=>Ce.get(t)});function Re(e,t,r){if(Ce.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:o}=ce({widgetId:e,widgetVersion:r});Ce.set(e,n),o(t)}const _e=(e,t,r)=>{$e(r);const n=((e,t)=>{const r=Me(e),n=Me(t),o=r.pop(),a=n.pop(),i=Ne(r,n);return 0!==i?i:o&&a?Ne(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return Fe[r].includes(n)},xe=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Me=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(xe);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Be=e=>"*"===e||"x"===e||"X"===e,Le=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Ue=(e,t)=>{if(Be(e)||Be(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(Le(e),Le(t));return r>n?1:r<n?-1:0},Ne=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=Ue(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},Fe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},je=Object.keys(Fe),$e=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===je.indexOf(e))throw new Error(`Invalid operator, expected one of ${je.join("|")}`)};function Ke(e,t){var r=vo(e);if(!r&&null!=ro&&ro.checkInstalledApps&&(r=ro.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return _e(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function De(e,t,r){var{formStateStoreId:n,formStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var a=o.get(n);if(!a)throw new Error('Form state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return a}var We=new Map;function Ve(e){return He.apply(this,arguments)}function He(){return He=(0,a.Z)((function*(e){var t,r=null==ro||null===(t=ro.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=ro.flowApi.FLOW_API_PROVIDER);var n=We.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)ro.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],lo()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),We.set(e,n),n})),He.apply(this,arguments)}var ze=new Map;function Ge(e,t,r){return qe.apply(this,arguments)}function qe(){return(qe=(0,a.Z)((function*(e,t,r){var{useProvider:n,method:a="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,d]=yield Promise.all([Ve(n),ft(i,t)]),p=Qe(u,n,a,d,r,i),{transform:f}=e;try{l=yield p}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}:ft(f,(0,o.Z)((0,o.Z)({},t),{},{data:l})):l}))).apply(this,arguments)}function Qe(e,t,r,n,o,a){return Je.apply(this,arguments)}function Je(){return Je=(0,a.Z)((function*(e,t,r,n,o,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==o?void 0:o.cache)&&(c=ze.get(s)),c||(c=(0,a.Z)((function*(){var o,a=null!=ro&&null!==(o=ro.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?yield ro.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...a)}))(),ze.set(s,c)),c})),Je.apply(this,arguments)}var Ye=Symbol.for("pre.evaluated.raw"),Xe=Symbol.for("pre.evaluated.context");function et(e){return!(null==e||!e[Ye])}function tt(e){return e[Ye]}function rt(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[Ye])}var nt=new WeakSet([SyntaxError,TypeError,ReferenceError]);function ot(e){return nt.has(e.constructor)?e.constructor:TypeError}function at(){return(at=(0,a.Z)((function*(e,t,r){var{blockingList:n,run:o}=it(e,t,r,!0);return yield Promise.all(n),o()}))).apply(this,arguments)}function it(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=[];if("string"!=typeof e){var i=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,o.Z)((0,o.Z)({},e[Xe]),i),e=e[Ye]}var s,c={usedArgs:new Set},l={usedArgs:new Set};try{s=(0,T.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,R.collectAppGetMenuUsage)(c,e,t),(0,R.collectInstalledAppsHasUsage)(l,e,t)}}})}catch(t){var p="".concat(t.message,', in "').concat(e,'"');throw new(ot(t))(p)}if(c.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(l.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var f,v,h,g,y={},{attemptToVisitGlobals:b}=s;if(r.lazy||b.has("EVENT")&&!(0,d.hasOwnProperty)(t,"event")||b.has("DATA")&&!(0,d.hasOwnProperty)(t,"data"))return{blockingList:a,run:()=>Object.keys(t).length>0?{[Ye]:e,[Xe]:t}:e};var w,S,E=Ee(t);(b.has("STATE")||!E&&b.has("TPL"))&&(g=Oe(t,"STATE",': "'.concat(e,'"'))),b.has("FORM_STATE")&&(S=De(t,"FORM_STATE",': "'.concat(e,'"')));var k=F();if(n||k){if(b.has("CTX")&&(f=(0,R.strictCollectMemberUsage)(e,"CTX"),n&&a.push(t.ctxStore.waitFor(f))),g){if(h=(0,R.strictCollectMemberUsage)(e,"STATE"),!E){var Z=(0,R.strictCollectMemberUsage)(e,"TPL");for(var I of Z)h.add(I)}n&&a.push(g.waitFor(h))}S&&(w=(0,R.strictCollectMemberUsage)(e,"FORM_STATE"),n&&a.push(S.waitFor(w))),b.has("PROCESSORS")&&(v=(0,R.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&a.push((0,u.loadProcessorsImperatively)(v,lo())))}if(n){var A,O=b.has("PERMISSIONS");if(!O&&b.has("FN")){var C=[...(0,R.strictCollectMemberUsage)(e,"FN")];O=de(C)}if(O&&a.push(...t.pendingPermissionsPreCheck),c.usedArgs.size>0&&null!=ro&&ro.menu){var _=[...c.usedArgs];a.push(Promise.all(_.map((e=>ro.menu.fetchMenuById(e,t,{getStoryboardByAppId:fo,resolveData:Ge,asyncComputeRealValue:ft})))))}l.usedArgs.size>0&&a.push(null==ro||null===(A=ro.checkInstalledApps)||void 0===A?void 0:A.waitForCheckingApps([...l.usedArgs]))}return{blockingList:a,run(){var r,n,a,{app:i,location:c,query:l,match:u,flags:p,sys:k,ctxStore:Z,data:I,event:A}=t,O=null!==(r=t.overrideApp)&&void 0!==r?r:i;for(var C of b)switch(C){case"ANCHOR":y[C]=c.hash?c.hash.substring(1):null;break;case"APP":y[C]=(0,o.Z)((0,o.Z)({},(0,m.cloneDeep)(O)),{},{getMenu:null==ro||null===(n=ro.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[C]=D({get:(e,t)=>Z.getValue(t),ownKeys:()=>Array.from(f)});break;case"DATA":y[C]=I;break;case"EVENT":y[C]=A;break;case"FLAGS":y[C]=K(p);break;case"FORM_STATE":y[C]=D({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[C]=c.hash;break;case"INSTALLED_APPS":y[C]=K({has:Ke});break;case"ITEM":(0,d.hasOwnProperty)(t,"forEachItem")?y[C]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":y[C]=K({getItem:Se("local")});break;case"MEDIA":y[C]=K(we());break;case"MISC":y[C]=ao().getMiscSettings();break;case"PARAMS":y[C]=new URLSearchParams(l);break;case"PATH":y[C]=K(null!==(a=null==u?void 0:u.params)&&void 0!==a?a:{});break;case"PATH_NAME":y[C]=c.pathname;break;case"PROCESSORS":y[C]=D({get(e,t){var r=x.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return D({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys:()=>Array.from(v)});break;case"QUERY":y[C]=Object.fromEntries(Array.from(l.keys()).map((e=>[e,l.get(e)])));break;case"QUERY_ARRAY":y[C]=Object.fromEntries(Array.from(l.keys()).map((e=>[e,l.getAll(e)])));break;case"SESSION_STORAGE":y[C]=K({getItem:Se("session")});break;case"TPL":if(ke(E,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),E)break;case"STATE":y[C]=D({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[C]=K(null!=k?k:{});break;case"__WIDGET_FN__":y[C]=Pe;break;case"__WIDGET_IMG__":y[C]=N;break;case"__WIDGET_I18N__":y[C]=U}Object.assign(y,oe(s.attemptToVisitGlobals,{storyboardFunctions:le,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{return(0,T.cook)(s.expression,s.source,{globalVariables:(0,P.supply)(s.attemptToVisitGlobals,y)})}catch(t){var R="".concat(t.message,', in "').concat(e,'"');throw new(ot(t))(R)}}}}var st=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function ct(e){switch(e){case st.USE_BRICK_PROPERTIES:case st.USE_BRICK_TRANSFORM:case st.USE_BRICK_EVENTS:case st.USE_BRICK_IF:case st.USE_BRICK_LIFECYCLE:case st.USE_BRICK_DATA_SOURCE:return!0}return!1}function lt(e,t,r){if(ct(e))return e;if(t)switch(e){case st.USE_BRICK:return st.USE_BRICK_ITEM;case st.USE_BRICK_SLOTS_ITEM_BRICKS:return st.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case st.INITIAL:if("useBrick"===r)return st.USE_BRICK;break;case st.USE_BRICK:case st.USE_BRICK_ITEM:case st.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return st.USE_BRICK_PROPERTIES;case"transform":return st.USE_BRICK_TRANSFORM;case"dataSource":return st.USE_BRICK_DATA_SOURCE;case"events":return st.USE_BRICK_EVENTS;case"slots":return st.USE_BRICK_SLOTS;case"children":return st.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return st.USE_BRICK_IF;case"lifeCycle":return st.USE_BRICK_LIFECYCLE}break;case st.USE_BRICK_SLOTS:return st.USE_BRICK_SLOTS_ITEM;case st.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return st.USE_BRICK_SLOTS_ITEM_BRICKS}return st.INITIAL}var ut=new WeakSet;function dt(e){if((0,d.isObject)(e)&&!pt(e))if(ut.add(e),Array.isArray(e))e.forEach(dt);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(dt)}}function pt(e){return ut.has(e)}function ft(e,t){return vt.apply(this,arguments)}function vt(){return vt=(0,a.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=et(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&ct(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=yield function(e,t,r){return at.apply(this,arguments)}(e,t,{lazy:a}),i=rt(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?C.transform:C.transformAndInject:r.noInject?gt:C.inject)(e,t),i||dt(o),o}if(!(0,d.isObject)(e)||pt(e))return e;if(Array.isArray(e)){var s=mt(r,!0);return Promise.all(e.map((e=>ft(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,o]=e;return Promise.all([ft(n,t),ft(o,t,mt(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),vt.apply(this,arguments)}function ht(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=et(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&ct(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=function(e,t,r){var{run:n}=it(e,t,void 0,!1);return n()}(e,t),i=rt(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?C.transform:C.transformAndInject:r.noInject?gt:C.inject)(e,t),i||dt(o),o}if(!(0,d.isObject)(e)||pt(e))return e;if(Array.isArray(e)){var s=mt(r,!0);return e.map((e=>ht(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;return[ht(n,t),ht(o,t,mt(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function mt(e,t,r){return e.$$lazyForUseBrick?(0,o.Z)((0,o.Z)({},e),{},{$$stateOfUseBrick:lt(e.$$stateOfUseBrick,t,r)}):e}function gt(e){return e}function yt(e,t){return bt.apply(this,arguments)}function bt(){return(bt=(0,a.Z)((function*(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||et(e.if)?yield ft(e.if,t):e.if)}))).apply(this,arguments)}function wt(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||et(e.if)?ht(e.if,t):e.if)}function St(e){return!(0,d.hasOwnProperty)(e,"if")||!!e.if}function Et(){return(Et=(0,a.Z)((function*(e,t){return(0,d.isObject)(e.if)&&!et(e.if)?St(yield Ge(e.if,t)):yt(e,t)}))).apply(this,arguments)}function kt(e,t){return wt(e,{data:t})}function Zt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,T.isEvaluable)(e):et(e)){var o="string"==typeof e?e:tt(e);if((0,T.isTrackAll)(o)){var a=(0,R.trackAll)(o);a&&(t=a.context,r=a.state,n=a.formState)}else t=(0,R.track)(o,"track context","CTX"),r=(0,R.track)(o,"track state","STATE"),n=(0,R.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function It(){return It=(0,a.Z)((function*(e,t,r){return(0,d.isObject)(e)?Object.fromEntries((yield Promise.all(Object.entries(e).map(function(){var e=(0,a.Z)((function*(e){var[n,o]=e;if(Array.isArray(r)){var{contextNames:a,stateNames:i,formStateNames:s}=Zt(o);(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o})}var c=yield ft(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?st.USE_BRICK:st.INITIAL});if("style"!==n&&"dataset"!==n||(0,d.isObject)(c))return[n,c]}));return function(t){return e.apply(this,arguments)}}()))).filter(Boolean)):{}})),It.apply(this,arguments)}function At(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[o,a]of Object.entries(n))e[r][o]=a;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function Ot(e,t,r){var n=function(e,t,r){return(0,d.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;if(Array.isArray(r)){var{contextNames:a,stateNames:i,formStateNames:s}=Zt(o);(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o})}var c=ht(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?st.USE_BRICK:st.INITIAL});if("style"!==n&&"dataset"!==n||(0,d.isObject)(c))return[n,c]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{At(e,n)}))}function Tt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ct(e){return e&&e.sensitive?"":"i"}function Pt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,a=r.start,i=void 0===a||a,s=r.end,c=void 0===s||s,l=r.encode,u=void 0===l?function(e){return e}:l,d=r.delimiter,p=void 0===d?"/#?":d,f=r.endsWith,v="[".concat(Tt(void 0===f?"":f),"]|$"),h="[".concat(Tt(p),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var b=y[g];if("string"==typeof b)m+=Tt(u(b));else{var w=Tt(u(b.prefix)),S=Tt(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)o||(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;o||(m+="(?:".concat(h,"(?=").concat(v,"))?")),Z||(m+="(?=".concat(h,"|").concat(v,")"))}return new RegExp(m,Ct(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 o=1,a="";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==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));a+=e[s++]}else a+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!a)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:a}),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,o=void 0===n?"./":n,a="[^".concat(Tt(t.delimiter||"/#?"),"]+?"),i=[],s=0,c=0,l="",u=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var n=r[c],o=n.type,a=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", expected ").concat(e))},p=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===o.indexOf(m)&&(l+=m,m=""),l&&(i.push(l),l=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||a,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)l+=g;else if(l&&(i.push(l),l=""),u("OPEN")){m=p();var y=u("NAME")||"",b=u("PATTERN")||"",w=p();d("CLOSE"),i.push({name:y||(b?s++:""),pattern:y&&!b?a:b,prefix:m,suffix:w,modifier:u("MODIFIER")||""})}else d("END")}}return i}(e,r),t,r)}function Rt(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return Rt(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),Ct(r))}(e,t,r):Pt(e,t,r)}var _t=new Map,xt=1e4,Mt=0;function Bt(e,t){var{path:r,exact:n=!1,strict:o=!1,sensitive:a=!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=_t.get(r);n||_t.set(r,n=new Map);var o=n.get(e);if(o)return o;var a=[],i={regexp:Rt(e,a,t),keys:a};return Mt<xt&&(n.set(e,i),Mt++),i}(r,{end:n,strict:o,sensitive:a}),c=i.exec(e);if(!c)return null;var[l,...u]=c,d=e===l;return n&&!d?null:{path:r,url:"/"===r&&""===l?"/":l,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Lt(){return(Lt=(0,a.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),o=Bt(t.location.pathname,{path:n,exact:r.exact});if(o&&(yield yt(r,t)))return t.app.noAuthGuard||r.public||null==ro||!ro.auth||ro.auth.isLoggedIn()?{match:o,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var Ut,Nt=Symbol.for("tpl.asyncComputedPropsFromHost"),Ft=Symbol.for("tpl.stateStoreId"),jt=Symbol.for("tpl.externalForEachItem"),$t=r(6666),Kt=new Set,Dt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({}),Wt={[Dt.REQUEST_FAILED]:"Request Failed",[Dt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Dt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Dt.NETWORK_ERROR]:"Network error, please check your network."},Vt={[Dt.REQUEST_FAILED]:"请求失败",[Dt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Dt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Dt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},Ht="core/runtime",zt={en:Wt,zh:Vt},Gt=Object.freeze({show:function(e){return Ut?Ut.resolve(e):"confirm"===e.type?confirm(e.content)?new Promise((e=>setTimeout((()=>{e()}),1))):new Promise(((e,t)=>setTimeout((()=>{t()}),1))):(alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1e3))))}});function qt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof O.HttpFetchError)return l.i18n.t("".concat(Ht,":").concat(Dt.NETWORK_ERROR));if(e instanceof O.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 Qt(e){return e instanceof O.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var Jt,Yt,Xt=!1;function er(e){if(!(e instanceof O.HttpAbortError)){if(Qt(e)&&!window.NO_AUTH_GUARD){if(Xt)return;return Xt=!0,void Gt.show({type:"confirm",content:l.i18n.t("".concat(Ht,":").concat(Dt.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=ao().getFeatureFlags()["sso-enabled"],(t=Z()).push(e?"/sso-auth/login":"/auth/login",{from:(0,o.Z)((0,o.Z)({},t.location),{},{state:void 0})}),Xt=!1}),(()=>{Xt=!1}))}console.error(e);var t=qt(e);t!==Jt&&(Jt=t,Gt.show({type:"error",title:l.i18n.t("".concat(Ht,":").concat(Dt.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{Jt=void 0})))}}var tr=Object.freeze({show:function(e){Yt?Yt.resolve(e):alert(e.message)}});function rr(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,o]=t,a=sr(o,r,{element:e});for(var i of(e.addEventListener(n,a),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,a]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(o)))e.$$eventListeners.push([n,null,i])}))}function nr(e){return"string"==typeof e.action}function or(e){return"string"==typeof e.useProvider}function ar(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ir(e){return!!e.then}function sr(e,t,r){return function(n){var a,i;for(var s of[].concat(e))if(wt(s,(0,o.Z)((0,o.Z)({},t),{},{event:n})))if(ir(s))sr(s.then,t,r)(n);else if(nr(s)){var[c,l]=s.action.split(".");switch(s.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":fr(n,l,s.args,s.callback,t);break;case"window.open":vr(n,s.args,t);break;case"location.reload":case"location.assign":br(n,l,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":wr(n,c,l,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":Sr(n,l,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Er(n,l,s.args,t);break;case"handleHttpError":er(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":mr(n,l,s.args,null===(a=s.batch)||void 0===a||a,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":gr(n,l,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=Zr(s.args,t,n);Te(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":yr(n,s.args,s.callback,t);break;case"theme.setDarkTheme":case"theme.setLightTheme":Q("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=Zr(s.args,t,n);Q(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":re("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else or(s)?cr(n,s,t,r):ar(s)?ur(n,s,t,r):console.error("unknown event handler:",s);else s.else&&sr(s.else,t,r)(n)}}function cr(e,t,r,n){return lr.apply(this,arguments)}function lr(){return(lr=(0,a.Z)((function*(e,t,r,n){try{dr(e,yield Ve(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(qt(e))}}))).apply(this,arguments)}function ur(e,t,r,n){var a=[],i=t.target,s=t.targetRef,c=i;if(("string"==typeof i?(0,T.isEvaluable)(i):et(i))&&(c=ht(i,(0,o.Z)((0,o.Z)({},r),{},{event:e}))),"string"==typeof c)if("_self"===c)a.push(n.element);else if(t.multiple)a=Array.from(document.querySelectorAll(c));else{var l=document.querySelector(c);null!==l&&a.push(l)}else if(c)c instanceof HTMLElement?a.push(c):console.error("unexpected target:",c);else if(s){var u=s;("string"==typeof s?(0,T.isEvaluable)(s):et(s))&&(u=ht(s,(0,o.Z)((0,o.Z)({},r),{},{event:e})));var d=[].concat(u),p=Te(r,"targetRef",": ".concat(d.join(", ")));a.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==a.length?function(e){return!!e.method}(t)?a.forEach((o=>{dr(e,o,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Ot(a,t.properties,(0,o.Z)((0,o.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function dr(e,t,r,n,o,a,i){return pr.apply(this,arguments)}function pr(){return pr=(0,a.Z)((function*(e,t,r,n,i,s,c){var l;if("function"==typeof t[n]){var u=function(){var o=(0,a.Z)((function*(){var o,a=Zr(r.args,i,e,c);return or(r)&&null!=ro&&null!==(o=ro.flowApi)&&void 0!==o&&o.isFlowApiProvider(r.useProvider)&&(a=yield ro.flowApi.getArgsOfFlowApi(r.useProvider,a,n)),t[n](...a)}));return function(){return o.apply(this,arguments)}}();if(r.callback){var d,p=kr(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(or(r)&&(d=ht(r.poll,(0,o.Z)((0,o.Z)({},i),{},{event:e}))),null!==(l=d)&&void 0!==l&&l.enabled)!function(e,t,r){var n,{progress:o,success:i,error:s,finally:c}=t,{interval:l,leadingRequestDelay:u,continueOnError:d,delegateLoadingBar:p,expectPollEnd:f,expectPollStopImmediately:v}=r,h=uo();function m(){return g.apply(this,arguments)}function g(){return(g=(0,a.Z)((function*(){var t;Kt.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==uo())||(null==o||o(r),null!=f&&f(r)?(p&&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!==uo())||(null==s||s(e),d?y(null!=l?l:3e3):null==c||c())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),Kt.add(n)}y(null!=u?u:0),p&&window.dispatchEvent(new Event("request.start"))}(u,f,d);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),pr.apply(this,arguments)}function fr(e,t,r,n,o){var a=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":a=2,i=!0;break;case"reload":i=!0;break;case"block":a=1,s="setBlockMessage"}var c=[];if(a>0&&((c=Zr(r,o,e,{useEventDetailAsDefault:!0})).length=a),i&&n){var l=kr(n,o,void 0);c.push((e=>{l(e?"error":"success")({blocked:e}),l("finally")({blocked:e})}))}Z()[s](...c)}function vr(e,t,r){var[n,o,a]=Zr(t,r,e);window.open(n,o||"_self",a)}function hr(e,t,r,n,o,a){t?n.updateValues(e,r,(e=>Zr(e,o,a)[0])):e.forEach((e=>{var{name:t,value:i}=Zr([e],o,a)[0];n.updateValue(t,i,r)}))}function mr(e,t,r,n,o,a){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=Zr(r,a,e);a.ctxStore.updateValue(i,s,t,o,a)}else hr(r,n,t,a.ctxStore,a,e)}function gr(e,t,r,n,o,a){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)hr(r,n,"replace",a.ctxStore,a,e);else{var[i,s]=Zr(r,a,e);Oe(a,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,o,a)}}function yr(e,t,r,n){var[o,a]=Zr(t,n,e);De(n,"formstate.update",": ".concat(o)).updateValue(o,a,"replace",r,n)}function br(e,t,r,n){if("assign"===t){var[o]=Zr(r,n,e);location.assign(o)}else location[t]()}function wr(e,t,r,n,o){var a="localStorage"===t?localStorage:sessionStorage,[i,s]=Zr(n,o,e);"setItem"===r?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function Sr(e,t,r,n){console[t](...Zr(r,n,e,{useEventAsDefault:!0}))}function Er(e,t,r,n){var o=Zr(r,n,e,{useEventAsDefault:!0});tr.show({type:t,message:o[0]})}function kr(e,t,r){return function(n){return function(o){var a=null==e?void 0:e[n];if(a)try{var i=new CustomEvent("callback.".concat(n),{detail:o});sr(a,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",o)}}}function Zr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?ht(e,(0,o.Z)((0,o.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}class Ir{constructor(e,t){(0,$t.Z)(this,"type",void 0),(0,$t.Z)(this,"data",new Map),(0,$t.Z)(this,"changeEventType",void 0),(0,$t.Z)(this,"pendingStack",[]),(0,$t.Z)(this,"hostBrick",void 0),(0,$t.Z)(this,"batchUpdate",!1),(0,$t.Z)(this,"batchUpdateContextsNames",[]),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}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");var n={},o={},a=[];e.forEach((e=>{var{name:o,value:i}=r([e]),s=this.data.get(o);a.push(...this.getAffectListByContext(o)),s&&(n[o]=s),this.updateValue(o,i,t)})),a.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(o[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(o),this.batchUpdate=!1}updateValue(e,t,r,n,a){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,d.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,o.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||er(e)})),n){var c=kr(n,a);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 o=(0,R.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,o)}return r}(e,r),o=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;o.set(i,(null!==(s=o.get(i))&&void 0!==s?s:0)+1)}var c=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),l=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,a.Z)((function*(e){var r;l.add(e);var a=yield t(e);n.delete(e);var i=null!==(r=o.get(e.name))&&void 0!==r?r:0;if(a){if(u.get(e.name).resolve(),o.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=c;function v(){return h.apply(this,arguments)}function h(){return h=(0,a.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)))}(o,f)).map((e=>e[0])).filter((e=>!l.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,a.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))),o=()=>{var e=!1;for(var[t,a]of r.entries())[...a.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&o()};if(o(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r)),this.type);this.pendingStack.push(n)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,a.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,a.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}resolve(e,t,r){var n=this;return(0,a.Z)((function*(){if(!(yield yt(e,t)))return!1;var i,s;if(r&&("STATE"===n.type?e.expose:"FORM_STATE"===n.type)){var c=yield r;(0,d.hasOwnProperty)(c,e.name)&&(i=c[e.name])}var l=!1;if(void 0===i){if(e.resolve){var u=(0,o.Z)({transform:"value"},e.resolve);if(yield yt(e.resolve,t))s=function(){var e=(0,a.Z)((function*(e){return(yield Ge(u,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),(l=e.resolve.lazy)||(i=yield s());else if(!(0,d.hasOwnProperty)(e,"value"))return!1}s&&!l||void 0===e.value||(i=yield ft(e.value,t))}var p={value:i,eventTarget:new EventTarget,load:s,loaded:!l,deps:[]};if(e.onChange&&p.eventTarget.addEventListener(n.changeEventType,sr(e.onChange,t)),e.track){var f=(0,R.strictCollectMemberUsage)(s?e.resolve:e.value,n.type);for(var v of(!s&&(p.deps=[...f]),f))n.onChange(v,n.batchAddListener((()=>{s?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,ht(e.value,t),"replace")}),e))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,p),!0}))()}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function Ar(e,t,r){var n,{reversedProxies:o,asyncHostProperties:a,externalSlots:i,tplStateStoreId:s,hostBrick:c}=e;if(t&&o){var l=o.properties.get(t);l&&(n=a.then((e=>{var t={};for(var{from:r,to:n}of l){var o=e[r];void 0!==o&&n.refProperty&&(t[n.refProperty]=o)}return t})));var u=o.slots.get(t);if(u&&i){var p=new Map;for(var{from:f,to:v}of u){var h,g,y,b,w=null!==(h=null===(g=i[f])||void 0===g?void 0:g.bricks)&&void 0!==h?h:[];if(w.length){var S=null!==(y=v.refSlot)&&void 0!==y?y:f,E=p.get(S);if(!E){E=[];for(var k=(0,d.hasOwnProperty)(r,S)?r[S].bricks.length+1:1,Z=0;Z<k;Z+=1)E.push([]);p.set(S,E)}var I=null!==(b=v.refPosition)&&void 0!==b?b:-1;E[(0,m.clamp)(I<0?E.length+I:I,0,E.length-1)].push(...(0,d.hasOwnProperty)(c.runtimeContext,"forEachItem")?Or(w,c.runtimeContext.forEachItem):w)}}var A=function(){(0,d.hasOwnProperty)(r,O)||(r[O]={type:"bricks",bricks:[]});var e=r[O];e.bricks=T.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[O]};for(var[O,T]of p.entries())A()}}return{[Nt]:n,[Ft]:s}}function Or(e,t){return e.map((e=>{var r;return(0,o.Z)((0,o.Z)({},e),{},{[jt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,o]=e;return[n,"routes"===o.type?{type:"routes",routes:Tr(o.routes,t)}:{type:"bricks",bricks:Or(null!==(r=o.bricks)&&void 0!==r?r:[],t)}]})))})}))}function Tr(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,o.Z)((0,o.Z)({},e),{},{bricks:Or(e.bricks,t)})))}var Cr=["properties","slots","children"];function Pr(e,t){function r(e){return(0,d.isObject)(e)?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,o]=e;return(0,d.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(n)]:[t,n(o)]:[t,r(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:a,slots:i,children:s}=e,c=(0,h.Z)(e,Cr),l=Yr(s,i),u=Object.fromEntries(Object.entries(null!=l?l:{}).map((e=>{var t,[r,o]=e;return[r,{type:"bricks",bricks:(null!==(t=o.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,o.Z)((0,o.Z)({},c),{},{properties:r(a),slots:u},Ar(t,c.ref,u))}return r(e)}var Rr=["slots","children"],_r=["properties","slots","children"];function xr(e,t,r,n){var a,i=(0,m.uniqueId)("tpl-state-"),s=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{tplStateStoreId:i});delete s.forEachItem,delete s.formStateStoreId;var c=new Ir("STATE",r);s.tplStateStoreMap.set(i,c),s.tplStateStoreScope&&s.tplStateStoreScope.push(c);var{bricks:l,proxy:u,state:d,contracts:p}=Ae.get(e);null==ro||null===(a=ro.flowApi)||void 0===a||a.collectWidgetContract(p),c.define(d,s,n);var{slots:f,children:v}=t,g=(0,h.Z)(t,Rr),y=(0,o.Z)((0,o.Z)({},g),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:i,proxy:u};var b={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(var[w,S]of Object.entries(u.properties)){var E=b.properties.get(S.ref);E||(E=[],b.properties.set(S.ref,E)),E.push({from:w,to:S})}if(null!=u&&u.slots)for(var[k,Z]of Object.entries(u.slots)){var I=b.slots.get(Z.ref);I||(I=[],b.slots.set(Z.ref,I)),I.push({from:k,to:Z})}var A={reversedProxies:b,asyncHostProperties:n,externalSlots:Yr(v,f),tplStateStoreId:i,hostBrick:r};return y.slots={"":{type:"bricks",bricks:l.map((e=>Mr(e,A)))}},y}function Mr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:a}=e,i=(0,h.Z)(e,_r),s=Yr(a,n),c=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,o]=e;return[n,{type:"bricks",bricks:(null!==(r=o.bricks)&&void 0!==r?r:[]).map((e=>Mr(e,t)))}]})));return(0,o.Z)((0,o.Z)({},i),{},{properties:Pr(r,t),slots:c},Ar(t,i.ref,c))}var Br=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),Lr="form-renderer.form-renderer",Ur=Symbol.for("form.stateStoreId");function Nr(e,t,r){var{id:n,bricks:a,events:i,context:s,mountPoint:c,instanceId:l}=e,{brick:u,properties:p}=e,f=t.find((e=>e.fieldId===n));if(f){var v=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,o.Z)((0,o.Z)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}})};break;case"JSON":t={brick:"forms.general-textarea",properties:(0,o.Z)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,o.Z)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,o.Z)((0,o.Z)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})}}return t}(f);u||(u=v.brick),p=(0,o.Z)((0,o.Z)({},v.properties),p)}var h={brick:u,properties:p,iid:l,slot:c,events:i,context:s,children:Fr(a,t,r),[Ur]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Fr(e,t,r){if(Array.isArray(e))return e.map((e=>Nr(e,t,r)))}var jr=["blockingList","node","menuRequests","hasTrackingControls"],$r=["if","permissionsPreCheck"],Kr=["formData"];function Dr(e,t,r,n,o){return Wr.apply(this,arguments)}function Wr(){return Wr=(0,a.Z)((function*(e,t,r,n,a){var i=yield function(e,t){return Lt.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var c,l=s.route=i.route,d=(0,o.Z)((0,o.Z)({},r),{},{match:i.match});d.ctxStore.define(l.context,d),d.pendingPermissionsPreCheck.push(null==ro||null===(c=ro.checkPermissions)||void 0===c?void 0:c.preCheckPermissionsForBrickOrRoute(l,(e=>ft(e,d))));var{preLoadBricks:p}=l;switch(Array.isArray(p)&&s.blockingList.push((0,u.loadBricksImperatively)(p,lo())),l.type){case"redirect":var f;if("string"!=typeof(f="string"==typeof l.redirect?yield ft(l.redirect,d):(yield Ge((0,o.Z)({transform:"redirect"},l.redirect),d)).redirect))throw console.error("Unexpected redirect result:",f),new Error("Unexpected type of redirect result: ".concat(typeof f));s.redirect={path:f};break;case"routes":s.menuRequests.push(Qr(l.menu,d)),Jr(s,yield Dr(e,l.routes,d,n,a));break;default:s.menuRequests.push(Qr(l.menu,d)),Jr(s,yield Vr(e,l.bricks,d,n,a))}}return s})),Wr.apply(this,arguments)}function Vr(e,t,r,n,o,a,i){return Hr.apply(this,arguments)}function Hr(){return(Hr=(0,a.Z)((function*(e,t,r,n,o,a,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>zr(e,t,r,n,o,i,a&&new Map(a)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(o,r,t.node,e),Jr(s,t)})),s}))).apply(this,arguments)}function zr(e,t,r,n,o,a){return Gr.apply(this,arguments)}function Gr(){return Gr=(0,a.Z)((function*(e,t,r,n,i,s){var c,l,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,f={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;var{if:v,permissionsPreCheck:g}=t,y=(0,h.Z)(t,$r);if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):et(e)&&(0,T.isTrackAll)(tt(e))}(v))return zr(e,(0,o.Z)({brick:":if",dataSource:v,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[y]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,o.Z)((0,o.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p);var b=t[Ft],w=t[Ur],S=(0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:b,formStateStoreId:w});(0,d.hasOwnProperty)(t,jt)&&(S.forEachItem=t[jt]);var{context:E}=t;if(Array.isArray(E)&&E.length>0){var k=Ee(S);ke(k,"Defining context on bricks","check your brick:",t),k||S.ctxStore.define(E,S)}if(S.pendingPermissionsPreCheck.push(null==ro||null===(c=ro.checkPermissions)||void 0===c?void 0:c.preCheckPermissionsForBrickOrRoute(t,(e=>ft(e,S)))),!(yield function(e,t){return Et.apply(this,arguments)}(t,S)))return f;var Z=t.brick;if(Z.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(Z);var{dataSource:I}=t,A=function(){var r=(0,a.Z)((function*(){var r,o=yield ft(I,S),a=":forEach"===Z?"":":switch"===Z?String(o):o?"":"else",s=Yr(t.children,t.slots),c=s&&(0,d.hasOwnProperty)(s,a)&&(null===(r=s[a])||void 0===r?void 0:r.bricks);if(!Array.isArray(c))return f;switch(Z){case":forEach":return Array.isArray(o)?function(e,t,r,n,o,a,i){return qr.apply(this,arguments)}(e,o,c,S,n,i,p):f;case":if":case":switch":return Vr(e,c,S,n,i,p,!0)}}));return function(){return r.apply(this,arguments)}}(),O=yield A(),{contextNames:C,stateNames:P}=Zt(I);if(C||P){O.hasTrackingControls=!0;var R=0,_=function(){var t=(0,a.Z)((function*(){var t=++R,r=yield A();r.blockingList.push(...[...S.tplStateStoreMap.values(),...S.formStateStoreMap.values()].map((e=>e.waitForAll())),...S.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),R===t&&n.rerenderControlNode(i,s,r.node,e)}));return function(){return t.apply(this,arguments)}}(),x=(0,m.debounce)(_);if(C)for(var M of C)S.ctxStore.onChange(M,x);if(P)for(var B of P)Oe(S,"STATE",': "'.concat(I,'"')).onChange(B,x)}return O}/\.tpl-/.test(Z)&&!Ae.get(Z)&&(yield Xr((0,u.loadBricksImperatively)([Z],lo()),Z,n.unknownBricks));var L=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Ae.get(r))return r}return!!Ae.get(e)&&e}(Z,null===(l=S.app)||void 0===l?void 0:l.id);if(L){var U,N=null!==(U=p.get(L))&&void 0!==U?U:0;if(N>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(L,'"'));p.set(L,N+1)}else Z.includes("-")&&!customElements.get(Z)&&(Z===Lr?customElements.define(Lr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):f.blockingList.push(Xr((0,u.enqueueStableLoadBricks)([Z],lo()),Z,n.unknownBricks)));var F,j,$={tag:Br.BRICK,type:L||Z,return:e,slotId:i,events:t.events,runtimeContext:S,portal:t.portal,iid:t.iid,ref:t.ref};if(f.node=$,Z===Lr){var K,D=null!==(K=t.properties)&&void 0!==K?K:{};({formData:F}=D),j=(0,h.Z)(D,Kr)}else j=t.properties;var W=[],V=[],H=function(){var e=(0,a.Z)((function*(){$.properties=yield function(e,t,r){return It.apply(this,arguments)}(j,S,V);var e=t[Nt];if(e){var r;null!==(r=$.properties)&&void 0!==r||($.properties={});var n=yield e;for(var[o,a]of Object.entries(n))$.properties[o]=a}return function(e,t){var r=function(t){var r=()=>{e.element&&Ot(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 o=Oe(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var a of t.stateNames)o.onChange(a,r)}if(t.formStateNames){var i=De(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}($,V),$.properties}));return function(){return e.apply(this,arguments)}}(),z=H();W.push(z),n.registerBrickLifeCycle($,t.lifeCycle);var G,q=t;L?q=xr(L,t,$,z):Z===Lr&&(q=function(e,t,r,n){var a,i,s="string"==typeof e?JSON.parse(e):e,c=(0,m.uniqueId)("form-state-"),l=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{formStateStoreId:c});delete l.forEachItem,delete l.tplStateStoreId;var u=new Ir("FORM_STATE");l.formStateStoreMap.set(c,u),l.formStateStoreScope&&l.formStateStoreScope.push(u);var p=null!==(a=s.context)&&void 0!==a?a:[];p.some((e=>"params"===e.name))||p.push({name:"params"}),u.define(p,l,n);var f=Nr(s.formSchema,s.fields,c);return"forms.general-form"===f.brick&&t.events&&(f.events=function(e,t){var r=null!=e?e:{};for(var[n,o]of Object.entries(t))r[n]=(0,d.hasOwnProperty)(r,n)?[r[n],o].flat():o;return r}(f.events,t.events)),"boolean"!=typeof(null===(i=t.properties)||void 0===i?void 0:i.renderRoot)||t.properties.renderRoot?(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[{brick:"basic-bricks.micro-view",properties:{style:{padding:"12px"}},slots:{content:{bricks:[f],type:"bricks"}}}]}):(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[f]})}(F,t,$,z)),q.portal&&($.slotId=void 0),L?delete(G=(0,o.Z)({},S)).forEachItem:G=S;var Q=function(){var e=(0,a.Z)((function*(){var e=Yr(q.children,q.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?Vr($,r.bricks,G,n,t,p):Dr($,r.routes,G,n,t)}))),r=(0,o.Z)((0,o.Z)({},f),{},{node:void 0,blockingList:[]});for(var a of t)Jr(r,a);r.node&&($.child=r.node),Jr(f,(0,o.Z)((0,o.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return W.push(Q()),yield Promise.all(W),f})),Gr.apply(this,arguments)}function qr(){return(qr=(0,a.Z)((function*(e,t,r,n,a,i,s){var c={blockingList:[],menuRequests:[]},l=yield Promise.all(t.map(((t,c)=>Promise.all(r.map(((r,l)=>zr(e,r,(0,o.Z)((0,o.Z)({},n),{},{forEachItem:t}),a,i,c*l,s&&new Map(s))))))));for(var u of l.flat())Jr(c,u);return c}))).apply(this,arguments)}function Qr(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 ft(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function Jr(e,t){var{blockingList:r,node:n,menuRequests:o,hasTrackingControls:a}=t,i=(0,h.Z)(t,jr);if(e.blockingList.push(...r),e.menuRequests.push(...o),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 o,a=null!==(o=n.slot)&&void 0!==o?o:"";(0,d.hasOwnProperty)(r,a)||(r[a]={type:"bricks",bricks:[]}),r[a].bricks.push(n)}return r}function Xr(e,t,r){return"silent"===r?e.catch((e=>{console.error('Load brick "'.concat(t,'" failed:'),e)})):e}function en(e){var t,{ref:r,runtimeContext:n,element:o}=e;if(r&&n.tplStateStoreId){var{hostBrick:a}=Oe(n,"bindTemplateProxy"),i=a.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){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),a.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},c=null!==(t=u.refEvent)&&void 0!==t?t:e;o.addEventListener(c,s),null!==(i=(n=o).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),o.$$proxyListeners.push([c,s])}};for(var[l,u]of Object.entries(s))c(l)}}}function tn(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:o}=Oe(r,"unbindTemplateProxy"),a=o.tplHostMetadata;for(var[i,s]of(a.internalBricksByRef.delete(t),null!==(c=n.$$proxyListeners)&&void 0!==c?c:[])){var c;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function rn(e){e.innerHTML=""}function nn(e,t){for(var r=e.child,n=[];r;){var o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var a=t&&r===e.child?t:document.createElement(o);if(r.element=a,r.slotId&&a.setAttribute("slot",r.slotId),r.iid&&(a.dataset.iid=r.iid),At(a,r.properties),rr(a,r.events,r.runtimeContext),r.tplHostMetadata&&(a.$$tplStateStore=Oe({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),en(r),r.portal?n.push(a):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(a)),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===Br.ROOT?null===(c=s.container)||void 0===c||c.append(...s.childElements):s.element.append(...s.childElements),s.childElements=void 0;if(s.tag===Br.ROOT&&n.length>0&&("function"==typeof s.createPortal?s.createPortal():s.createPortal).append(...n),s.sibling)break;s=s.return}r=null===(i=s)||void 0===i?void 0:i.sibling}}}var on,an,sn=["onMount","onUnmount","onMediaChange","onScrollIntoView"],cn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],ln=new WeakMap,un=new WeakMap,dn=new WeakMap,pn=new WeakMap,fn=new WeakSet,vn=new WeakSet,hn=new WeakSet,mn=new WeakSet;class gn{constructor(e,t){var r;(0,I.Z)(this,mn),(0,I.Z)(this,hn),(0,I.Z)(this,vn),(0,I.Z)(this,fn),(0,$t.Z)(this,"scope",void 0),(0,$t.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,ln,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[]}}),(0,i.Z)(this,un,{writable:!0,value:new Map}),(0,i.Z)(this,dn,{writable:!0,value:void 0}),(0,i.Z)(this,pn,{writable:!0,value:void 0}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw"}registerBrickLifeCycle(e,t){if(t){var r=[...sn,..."page"===this.scope?cn:[]];for(var n of r){var o=t[n];o&&(0,c.Z)(this,ln)[n].push({brick:e,handlers:o})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}memoizeControlNode(e,t,r,n){(0,c.Z)(this,pn)||(0,s.Z)(this,pn,new WeakMap);var o="".concat(null!=e?e:"",".").concat(t),a=(0,c.Z)(this,pn).get(n);a||(a=new Map,(0,c.Z)(this,pn).set(n,a)),a.set(o,{node:r,last:En(r),lastNormal:kn(r),lastPortal:Zn(r)})}rerenderControlNode(e,t,r,n){var o,a,i,s,l,u="".concat(null!=e?e:"",".").concat(t),d=(0,c.Z)(this,pn).get(n).get(u),{node:p,last:f,lastNormal:v,lastPortal:h}=d,m=null!==(o=null==v||null===(a=v.element)||void 0===a?void 0:a.nextSibling)&&void 0!==o?o:null,g=null!==(i=null==h||null===(s=h.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=En(r);d.node=r,d.last=y,d.lastNormal=kn(r),d.lastPortal=Zn(r);for(var b=n.child;b&&b!==f;){if(b.sibling===p){l=b;break}b=b.sibling}var w=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:Br.ROOT,container:w,createPortal:S,child:r};for(b=r;b;)b.return=E,b=b.sibling;var k,Z,I=In(p,f);for((0,A.Z)(this,fn,yn).call(this,I),nn(E),l?l.sibling=r:n.child=r,y&&(y.sibling=null==f?void 0:f.sibling),b=r;b;)b.return=n,b=b.sibling;if(n.tag===Br.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(w,m):null===(Z=n.element)||void 0===Z||Z.insertBefore(w,m),S.childNodes.length>0){for(var O,T=r;T&&T.return;)T=T.return;if((null===(O=T)||void 0===O?void 0:O.tag)!==Br.ROOT)throw new Error("Cannot find render root node");("function"==typeof T.createPortal?T.createPortal():T.createPortal).insertBefore(S,g)}var C=In(r,y);(0,A.Z)(this,vn,bn).call(this,C)}dispose(){for(var e of Object.values((0,c.Z)(this,ln)))e.length=0;for(var t of(0,c.Z)(this,un).values()){for(var r of t)r.disconnect();t.length=0}(0,c.Z)(this,un).clear(),(0,c.Z)(this,dn)&&(me.removeEventListener("change",(0,c.Z)(this,dn)),(0,s.Z)(this,dn,void 0)),(0,s.Z)(this,pn,void 0)}dispatchBeforePageLoad(){(0,A.Z)(this,hn,wn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,A.Z)(this,hn,wn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,A.Z)(this,hn,wn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,A.Z)(this,hn,wn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=Z().location;e&&"#"!==e?(0,A.Z)(this,hn,wn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,A.Z)(this,hn,wn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,c.Z)(this,ln).onScrollIntoView)(0,A.Z)(this,mn,Sn).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,dn,(e=>{(0,A.Z)(this,hn,wn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:K(e.detail)}))})),me.addEventListener("change",(0,c.Z)(this,dn))}dispatchOnMount(){(0,A.Z)(this,hn,wn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,A.Z)(this,hn,wn).call(this,"onUnmount",new CustomEvent("unmount"))}}function yn(e){var t=[...sn,..."page"===this.scope?cn:[]],r=[];for(var n of t){var o=(0,m.remove)((0,c.Z)(this,ln)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...o)}for(var a of e){var i,s,l=(0,c.Z)(this,un).get(a);if(null!=l&&l.length){for(var u of l)u.disconnect();l.length=0,(0,c.Z)(this,un).delete(a)}tn(a),null===(i=a.element)||void 0===i||delete i.$$tplStateStore,null===(s=a.element)||void 0===s||s.remove()}var d=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)sr(f,p.runtimeContext,p)(d)}function bn(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,c.Z)(this,ln).onMount)e.has(r)&&sr(n,r.runtimeContext,r)(t);for(var{brick:o,handlers:a}of(0,c.Z)(this,ln).onScrollIntoView)e.has(o)&&(0,A.Z)(this,mn,Sn).call(this,o,a)}function wn(e,t){for(var{brick:r,handlers:n}of(0,c.Z)(this,ln)[e])sr(n,r.runtimeContext,r)(t)}function Sn(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,o=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(sr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});o.observe(e.element);var a=(0,c.Z)(this,un).get(e);a||(a=[],(0,c.Z)(this,un).set(e,a)),a.push(o)}function En(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function kn(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Zn(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,o=r.return;o&&!o.sibling;)o=o.return;r=null===(n=o)||void 0===n?void 0:n.sibling}return t}function In(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 o,a=n.return;a&&a!==t&&!a.sibling;)a=a.return;if(a===t)break;n=null===(o=a)||void 0===o?void 0:o.sibling}}return r}function An(){if(!on){if(on={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){on.isInIframe=!0;try{if(window.origin===window.parent.origin){on.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");on.isInIframeOfNext=0==(Number(e)^Number(r)),on.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),on.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(on)}return on}function On(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 o=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Ae.define(o,n)}}}function Tn(){return Tn=(0,a.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return Cn.apply(this,arguments)}(e)),e.$$fulfilling})),Tn.apply(this,arguments)}function Cn(){return(Cn=(0,a.Z)((function*(e){var t;yield null==ro||null===(t=ro.fulfilStoryboard)||void 0===t?void 0:t.call(ro,e),M(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var Pn=new WeakMap,Rn=new WeakMap,_n=new WeakMap,xn=new WeakMap,Mn=new WeakMap,Bn=new WeakMap,Ln=new WeakMap,Un=new WeakMap,Nn=new WeakMap,Fn=new WeakMap,jn=new WeakMap,$n=new WeakMap,Kn=new WeakSet,Dn=new WeakSet,Wn=new WeakSet,Vn=new WeakSet;class Hn{constructor(e){(0,I.Z)(this,Vn),(0,I.Z)(this,Wn),(0,I.Z)(this,Dn),(0,I.Z)(this,Kn),(0,i.Z)(this,Pn,{writable:!0,value:void 0}),(0,i.Z)(this,Rn,{writable:!0,value:!1}),(0,i.Z)(this,_n,{writable:!0,value:void 0}),(0,i.Z)(this,xn,{writable:!0,value:void 0}),(0,i.Z)(this,Mn,{writable:!0,value:void 0}),(0,i.Z)(this,Bn,{writable:!0,value:void 0}),(0,i.Z)(this,Ln,{writable:!0,value:new Set}),(0,i.Z)(this,Un,{writable:!0,value:0}),(0,i.Z)(this,Nn,{writable:!0,value:void 0}),(0,i.Z)(this,Fn,{writable:!0,value:void 0}),(0,i.Z)(this,jn,{writable:!0,value:void 0}),(0,i.Z)(this,$n,{writable:!0,value:void 0}),(0,s.Z)(this,Pn,e);var t=Z();window.addEventListener("beforeunload",(e=>{(0,A.Z)(this,Kn,zn).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,A.Z)(this,Kn,zn).call(this,{location:e,action:t})))}getRenderId(){return(0,c.Z)(this,Nn)}getRuntimeContext(){return(0,c.Z)(this,Mn)}getRecentApps(){return{currentApp:(0,c.Z)(this,Fn),previousApp:(0,c.Z)(this,jn)}}getNavConfig(){return(0,c.Z)(this,$n)}bootstrap(){window.AbortController&&(an=new AbortController,O.http.interceptors.request.use((e=>{var t;return(0,o.Z)((0,o.Z)({},e),{},{options:(0,o.Z)((0,o.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:an.signal})})})));var e=Z();return(0,s.Z)(this,_n,e.location),e.listen(((e,t)=>{var r,n,a,i=!1,l={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,c.Z)(this,_n).key&&!1!==(null===(r=(0,c.Z)(this,_n).state)||void 0===r?void 0:r.notify))||(l.key=void 0),((0,f.locationsAreEqual)((0,o.Z)((0,o.Z)({},(0,c.Z)(this,_n)),l),(0,o.Z)((0,o.Z)({},e),l))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,s.Z)(this,_n,e);else{if(an&&(an.abort(),an=new AbortController),(0,s.Z)(this,_n,e),null===(a=(0,c.Z)(this,Bn))||void 0===a||a.dispatchPageLeave(),"POP"===t&&y(g((0,c.Z)(this,Pn),e.pathname)))return void window.location.reload();(0,c.Z)(this,Rn)?(0,s.Z)(this,xn,e):(0,A.Z)(this,Wn,qn).call(this,e).catch(er)}})),(0,A.Z)(this,Wn,qn).call(this,e.location)}}function zn(e){var t,r=Z(),n=r.getBlockMessage();null===(t=(0,c.Z)(this,Bn))||void 0===t||t.dispatchBeforePageLeave(e);var o=r.getBlockMessage();return!n&&o&&r.unblock(),o}function Gn(e,t,r){var n,o;if((0,s.Z)(this,Un,(n=(0,c.Z)(this,Un),o=n++,n)),o>10){var a='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(a)}Z().replace(e,t)}function qn(e){return Qn.apply(this,arguments)}function Qn(){return(Qn=(0,a.Z)((function*(e){(0,s.Z)(this,Rn,!0);try{yield(0,A.Z)(this,Vn,Jn).call(this,e)}finally{if((0,s.Z)(this,Rn,!1),(0,c.Z)(this,xn)){var t=(0,c.Z)(this,xn);(0,s.Z)(this,xn,void 0),yield(0,A.Z)(this,Wn,qn).call(this,t)}}}))).apply(this,arguments)}function Jn(e){return Yn.apply(this,arguments)}function Yn(){return Yn=(0,a.Z)((function*(e){var t,r;(0,s.Z)(this,Nn,(0,m.uniqueId)("render-id-1")),ut=new WeakSet,ze.clear(),null==ro||null===(t=ro.flowApi)||void 0===t||t.clearCollectWidgetContract(),Z().unblock();var n=g((0,c.Z)(this,Pn),e.pathname),a=null===(r=(0,c.Z)(this,Mn))||void 0===r?void 0:r.app;null!=n&&n.app&&(yield function(e){return Tn.apply(this,arguments)}(n));var i=(0,s.Z)(this,Fn,null==n?void 0:n.app),l=a&&i?a.id!==i.id:a!==i,d=ao().getFeatureFlags(),p=(0,c.Z)(this,Bn),f=(t,r)=>{(0,c.Z)(this,Ln).add(p),(0,A.Z)(this,Dn,Gn).call(this,t,r,e)},v=()=>{var t=d["sso-enabled"]?"/sso-auth/login":"/auth/login";f(t,{from:e})},h=document.querySelector("#main-mount-point"),y=document.querySelector("#portal-mount-point"),b={tag:Br.ROOT,container:h,createPortal:y},w=()=>{for(var e of(rn(h),rn(y),(0,c.Z)(this,Ln).add(p),(0,c.Z)(this,Ln)))e&&(e.dispatchOnUnmount(),e.dispose());(0,c.Z)(this,Ln).clear(),z(i&&(Y()[i.id]||i.theme)||"light"),ee("default"),l&&((0,s.Z)(this,jn,a),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:a,currentApp:i}})))};if(i){var S,E,k,I,T,C;null==ro||null===(S=ro.checkInstalledApps)||void 0===S||S.preCheckInstalledApps(n,(e=>!!vo(e)));var P=(0,s.Z)(this,Mn,{app:i,location:e,query:new URLSearchParams(e.search),flags:d,sys:(0,o.Z)((0,o.Z)({},null==ro||null===(E=ro.auth)||void 0===E?void 0:E.getAuth()),An()),ctxStore:new Ir("CTX"),pendingPermissionsPreCheck:[null==ro||null===(k=ro.checkPermissions)||void 0===k?void 0:k.preCheckPermissions(n)],tplStateStoreMap:new Map,formStateStoreMap:new Map}),R=(0,s.Z)(this,Bn,new gn("page"));(0,s.Z)(this,$n,void 0),On(n),ue(null===(I=n.meta)||void 0===I?void 0:I.functions,i),null==ro||null===(T=ro.flowApi)||void 0===T||T.collectContract(null===(C=n.meta)||void 0===C?void 0:C.contracts);var _,x=!1;try{if((_=yield Dr(b,function(e){if(window.parent===window)return e;var t=e,r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(n.routes),P,R)).unauthenticated)return void v();if(_.redirect)return void f(_.redirect.path,_.redirect.state);(0,s.Z)(this,Un,0),(0,u.flushStableLoadBricks)(),yield Promise.all([..._.blockingList,...[P.ctxStore,...P.tplStateStoreMap.values(),...P.formStateStoreMap.values()].map((e=>e.waitForAll())),...P.pendingPermissionsPreCheck]);var M=yield Promise.all(_.menuRequests);(0,s.Z)(this,$n,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(M))}catch(e){if(console.error("Router failed:",e),Qt(e)&&!window.NO_AUTH_GUARD)return void v();if(e instanceof O.HttpAbortError)return void(0,c.Z)(this,Ln).add(p);x=!0,_={node:{tag:Br.BRICK,type:"div",properties:{textContent:qt(e)},runtimeContext:null,return:b},blockingList:[],menuRequests:[]}}if(b.child=_.node,w(),_.route&&"routes"!==_.route.type||x)return x||R.dispatchBeforePageLoad(),Q(),re(),nn(b),window.scrollTo(0,0),void(x||(R.dispatchPageLoad(),R.dispatchAnchorLoad(),R.dispatchOnMount(),R.initializeScrollIntoView(),R.initializeMediaChange()))}else{if(!window.NO_AUTH_GUARD&&null!=ro&&ro.auth&&!ro.auth.isLoggedIn())return void v();w()}Q(),re();var B={tag:Br.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:b};b.child=B,nn(b),window.scrollTo(0,0)})),Yn.apply(this,arguments)}var Xn,eo,to,ro,no="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:[];function oo(e){if(Xn)throw new Error("Cannot create multiple runtimes");return ro=null==e?void 0:e.hooks,(0,l.initializeI18n)(Ht,zt),p.locale(l.i18n.language),l.i18n.on("languageChanged",(()=>{p.locale(l.i18n.language)})),k(),Xn=new co}function ao(){return Xn}var io=new WeakMap,so=new WeakMap;class co{constructor(){(0,i.Z)(this,io,{writable:!0,value:!1}),(0,i.Z)(this,so,{writable:!0,value:!1})}initialize(e){var t,r;if((0,c.Z)(this,io))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,io,!0),function(e){if(Array.isArray(e.storyboards)){var t=function(){if(r.locales){var e="tmp/".concat(r.id);Object.entries(r.locales).forEach((t=>{var[r,n]=t;l.i18n.addResourceBundle(r,e,n)})),r.localeName=l.i18n.getFixedT(null,e)("name",r.name),Object.keys(r.locales).forEach((t=>{l.i18n.removeResourceBundle(t,e)}))}else r.localeName=r.name};for(var{app:r}of e.storyboards)t()}(0,d.isObject)(e.settings)&&(0,d.deepFreeze)(e.settings),e.brickPackages&&(0,d.deepFreeze)(e.brickPackages)}(e),eo=e;var n,{notification:o,dialog:a}=null!==(t=null===(r=e.settings)||void 0===r?void 0:r.presetBricks)&&void 0!==t?t:{};!1!==o&&(n=null!=o?o:"shoelace.show-notification",(0,this.loadBricks)([n]).then((()=>{Yt=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==a&&function(e,t){t([e]).then((()=>{Ut=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=a?a:"shoelace.show-dialog",this.loadBricks)}bootstrap(e){var t=this;return(0,a.Z)((function*(){if(e&&t.initialize(e),(0,c.Z)(t,so))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,so,!0),to=new Hn(eo.storyboards),yield to.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=to)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=to)||void 0===e?void 0:e.getRecentApps().currentApp}getFeatureFlags(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)((0,o.Z)({},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.featureFlags),null===(r=to)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)({},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.misc),null===(r=to)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.misc)}getBrandSettings(){var e,t;return(0,o.Z)({base_title:"DevOps 管理专家"},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.brand)}getLaunchpadSettings(){var e,t;return(0,o.Z)({columns:7,rows:4},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=eo)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=eo)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=to)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,lo())}}function lo(){var e,t;return null!==(e=null===(t=eo)||void 0===t?void 0:t.brickPackages)&&void 0!==e?e:no}function uo(){var e;return null===(e=to)||void 0===e?void 0:e.getRenderId()}function po(){var e;return null===(e=to)||void 0===e?void 0:e.getRuntimeContext()}function fo(e){var t,r;return null===(t=eo)||void 0===t||null===(r=t.storyboards)||void 0===r?void 0:r.find((t=>t.app.id===e))}function vo(e){var t;return null===(t=fo(e))||void 0===t?void 0:t.app}function ho(){for(var e,t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null==ro||null===(e=ro.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function mo(){var e;return null==ro||null===(e=ro.auth)||void 0===e?void 0:e.getAuth()}function go(){var e,t;return null==ro||null===(e=ro.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function yo(){var e;return null==ro||null===(e=ro.auth)||void 0===e?void 0:e.isLoggedIn()}function bo(e,t,r){return wo.apply(this,arguments)}function wo(){return(wo=(0,a.Z)((function*(e,t,r){return Qe(yield Ve(e),e,"resolve",t,r)}))).apply(this,arguments)}function So(e){var t,{portal:r,scope:n="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,c,l=!1;return{render(r){var d=arguments;return(0,a.Z)((function*(){var{theme:a,context:p,functions:f,templates:v,i18n:h}=d.length>1&&void 0!==d[1]?d[1]:{};if(l)throw new Error("The root is unmounted and cannot be rendered any more");var m=[].concat(r),g={ctxStore:new Ir("CTX"),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},y=s;s=new gn(n,{unknownBricks:o});var b={tag:Br.ROOT,container:e,createPortal:t};if("page"===n){var w,S={id:"demo",homepage:"/demo"};g.app=S;var E={app:S,meta:{i18n:h,customTemplates:v}};null===(w=c)||void 0===w||w(),c=M(E),On(E),ue(f,S)}g.ctxStore.define(p,g);var k,Z=!1;try{k=yield Vr(b,m,g,s),(0,u.flushStableLoadBricks)(),yield Promise.all([...k.blockingList,g.ctxStore.waitForAll(),...[...g.tplStateStoreMap.values(),...g.formStateStoreMap.values()].map((e=>e.waitForAll())),...g.pendingPermissionsPreCheck])}catch(e){Z=!0,k={node:{tag:Br.BRICK,type:"div",properties:{textContent:qt(e)},return:b,runtimeContext:null},blockingList:[],menuRequests:[]}}b.child=k.node,null==y||y.dispatchOnUnmount(),null==y||y.dispose(),rn(e),i&&rn(i),"page"===n&&(z(null!=a?a:"light"),ee("default"),Z||s.dispatchBeforePageLoad(),Q(),re()),nn(b),"page"===n&&window.scrollTo(0,0),Z||("page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange())}))()},unmount(){l||(l=!0,rn(e),i&&(rn(i),r||i.remove()))}}}function Eo(e,t){return ko.apply(this,arguments)}function ko(){return(ko=(0,a.Z)((function*(e,t){var r,n,a,i=[],s=[],c=(0,o.Z)((0,o.Z)({},po()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:i,formStateStoreScope:s});null!==(r=c.tplStateStoreMap)&&void 0!==r||(c.tplStateStoreMap=new Map),null!==(n=c.formStateStoreMap)&&void 0!==n||(c.formStateStoreMap=new Map);var l=new gn("fragment"),d={tag:Br.ROOT,createPortal:null},p=e.transform,f=Ee();p&&ke(f,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var v=yield zr(d,f?e:(0,o.Z)((0,o.Z)({},e),{},{properties:(0,o.Z)((0,o.Z)({},e.properties),p)}),c,l);if((0,u.flushStableLoadBricks)(),yield Promise.all([...v.blockingList,...[...i,...s].map((e=>e.waitForAll())),...c.pendingPermissionsPreCheck]),null!==(a=v.node)&&void 0!==a&&a.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return d.child=v.node,{tagName:v.node?v.node.type:null,renderRoot:d,rendererContext:l}}))).apply(this,arguments)}function Zo(e,t){var r,{renderRoot:n,rendererContext:o}=e;return n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},nn(n,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),{portal:r}}function Io(e,t){var{rendererContext:r}=e;t.portal&&(rn(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function Ao(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return ht(t,(0,o.Z)((0,o.Z)({},po()),{},{data:e}),{noInject:!0})}function Oo(e,t){var r=fo(e);Object.assign(r,(0,o.Z)((0,o.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),M(r)}function To(e,t){var r=fo(e),n=!1,o=e=>"".concat(e.path,".").concat(e.exact),a=(e,r)=>e.map((e=>{var i=o(e);return"routes"===e.type?(e.routes=a(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=a(r.routes,o(t)),n||r.routes.unshift(t)}function Co(e,t,r){var n="".concat(e,".").concat(t.name);Ae.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Po(e,t.name,r)}function Po(e,t,r){xo(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,o.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Ro(e,t){var r;xo(e,"${APP.homepage}/_dev_only_/snippet-preview/".concat(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var _o=Ro;function xo(e,t,r){var{routes:n}=fo(e),o=n.findIndex((e=>e.path===t)),a={path:t,bricks:r,menu:!1,exact:!0};-1===o?n.unshift(a):n.splice(o,1,a)}}}]);
|
|
2
|
-
//# sourceMappingURL=2255.ffe2878d.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[2618],{9868:(e,t,n)=>{function r(e){if(Array.isArray(e))return e}n.d(t,{Z:()=>r})},9249:(e,t,n)=>{function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},7371:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(5850);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.Z)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},6666:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(5850);function o(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},4434:(e,t,n)=>{function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},5850:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(6522);function o(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==(0,r.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,r.Z)(t)?t:String(t)}},6522:(e,t,n)=>{function r(e){return r="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},r(e)}n.d(t,{Z:()=>r})},3145:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{Z:()=>o})},2618:(e,t,n)=>{n.r(t),n.d(t,{changeLanguage:()=>ye,createInstance:()=>fe,default:()=>le,dir:()=>pe,exists:()=>Oe,getFixedT:()=>me,hasLoadedNamespace:()=>we,init:()=>ge,loadLanguages:()=>Se,loadNamespaces:()=>xe,loadResources:()=>he,reloadResources:()=>de,setDefaultNamespace:()=>ke,t:()=>be,use:()=>ve});var r=n(6522),o=n(9249),i=n(7371);function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function c(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var f=n(6666),p=n(9868),g=n(3145),h=n(4434);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},m=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Z)(this,e),this.init(t,n)}return(0,i.Z)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,v(v({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),b=function(){function e(){(0,o.Z)(this,e),this.observers={}}return(0,i.Z)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function O(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function k(e){return null==e?"":""+e}function w(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function x(e,t,n){var r=w(e,t,Object);r.obj[r.k]=n}function S(e,t){var n=w(e,t),r=n.obj,o=n.k;if(r)return r[o]}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function P(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var L={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function R(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return L[e]})):e}var N="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,C=[" ",",","?","!",";"];function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),u=o[s];void 0===u&&r.length>i+a;)a++,u=o[s=r.slice(i,i+a).join(n)];if(void 0===u)return;if(null===u)return null;if(t.endsWith(s)){if("string"==typeof u)return u;if(s&&"string"==typeof u[s])return u[s]}var c=r.slice(i+a).join(n);return c?E(u,c,n):void 0}o=o[r[i]]}return o}}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F=function(e){u(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=l(t);if(n){var o=l(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return c(this,e)});function s(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,o.Z)(this,s),t=r.call(this),N&&b.call(a(t)),t.data=e||{},t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,i.Z)(s,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=S(this.data,a);return s||!i||"string"!=typeof n?s:E(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),x(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=S(this.data,a)||{};r?j(s,n,o):s=I(I({},s),n),x(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?I(I({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),s}(b),A={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V={},U=function(e){u(f,e);var t,n,s=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=l(t);if(n){var o=l(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return c(this,e)});function f(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.Z)(this,f),t=s.call(this),N&&b.call(a(t)),function(e,t,n){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){t[e]&&(n[e]=t[e])}))}(0,e,a(t)),t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=m.create("translator"),t}return(0,i.Z)(f,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=C.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,n){var o=this;if("object"!==(0,r.Z)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,c=s.namespaces,l=c[c.length-1],p=t.lng||this.language,g=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(g){var h=t.nsSeparator||this.options.nsSeparator;return i?{res:"".concat(l).concat(h).concat(u),usedKey:u,exactUsedKey:u,usedLng:p,usedNS:l}:"".concat(l).concat(h).concat(u)}return i?{res:u,usedKey:u,exactUsedKey:u,usedLng:p,usedNS:l}:u}var d=this.resolve(e,t),v=d&&d.res,y=d&&d.usedKey||u,m=d&&d.exactUsedKey||u,b=Object.prototype.toString.apply(v),O=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject;if(k&&v&&"string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&("string"!=typeof O||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,v,T(T({},t),{},{ns:c})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(d.res=w,d):w}if(a){var x="[object Array]"===b,S=x?[]:{},j=x?m:y;for(var P in v)if(Object.prototype.hasOwnProperty.call(v,P)){var L="".concat(j).concat(a).concat(P);S[P]=this.translate(L,T(T({},t),{joinArrays:!1,ns:c})),S[P]===L&&(S[P]=v[P])}v=S}}else if(k&&"string"==typeof O&&"[object Array]"===b)(v=v.join(O))&&(v=this.extendTranslation(v,e,t,n));else{var R=!1,N=!1,C=void 0!==t.count&&"string"!=typeof t.count,E=f.hasDefaultValue(t),D=C?this.pluralResolver.getSuffix(p,t.count,t):"",I=t["defaultValue".concat(D)]||t.defaultValue;!this.isValidLookup(v)&&E&&(R=!0,v=I),this.isValidLookup(v)||(N=!0,v=u);var F=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:v,A=E&&I!==v&&this.options.updateMissing;if(N||R||A){if(this.logger.log(A?"updateKey":"missingKey",p,l,u,A?I:v),a){var Z=this.resolve(u,T(T({},t),{},{keySeparator:!1}));Z&&Z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var V=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&U&&U[0])for(var K=0;K<U.length;K++)V.push(U[K]);else"all"===this.options.saveMissingTo?V=this.languageUtils.toResolveHierarchy(t.lng||this.language):V.push(t.lng||this.language);var B=function(e,n,r){var i=E&&r!==v?r:F;o.options.missingKeyHandler?o.options.missingKeyHandler(e,l,n,i,A,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,l,n,i,A,t),o.emit("missingKey",e,l,n,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?V.forEach((function(e){o.pluralResolver.getSuffixes(e,t).forEach((function(n){B([e],u+n,t["defaultValue".concat(n)]||I)}))})):B(V,u,I))}v=this.extendTranslation(v,e,t,d,n),N&&v===u&&this.options.appendNamespaceToMissingKey&&(v="".concat(l,":").concat(u)),(N||R)&&this.options.parseMissingKeyHandler&&(v="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l,":").concat(u):u,R?v:void 0):this.options.parseMissingKeyHandler(v))}return i?(d.res=v,d):v}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,T(T({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(T(T({},n),{interpolation:T(T({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=T(T({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=A.handle(p,e,t,this.options&&this.options.postProcessPassResolved?T({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),g=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!V["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(V["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,c,n,e,s);else{var l;f&&(l=a.pluralResolver.getSuffix(n,s.count,s));var h="".concat(a.options.pluralSeparator,"zero");if(f&&(u.push(c+l),p&&u.push(c+h)),g){var d="".concat(c).concat(a.options.contextSeparator).concat(s.context);u.push(d),f&&(u.push(d+l),p&&u.push(d+h))}}for(;i=u.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),f}(b);function K(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){(0,o.Z)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=m.create("languageUtils")}return(0,i.Z)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=K(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){return e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:0===e.indexOf(r)?e:void 0}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),M=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],H={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},_=["v1","v2","v3"],J={zero:0,one:1,two:2,few:3,many:4,other:5},z=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Z)(this,e),this.languageUtils=t,this.options=r,this.logger=m.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},M.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:H[e.fc]}}))})),n)}return(0,i.Z)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return J[e]-J[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!_.includes(this.options.compatibilityJSON)}}]),e}();function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,n){var r=S(e,n);return void 0!==r?r:S(t,n)}(e,t,n);return!i&&o&&"string"==typeof n&&void 0===(i=E(e,n,r))&&(i=E(t,n,r)),i}var Y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.Z)(this,e),this.logger=m.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,i.Z)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:R,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?P(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?P(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?P(t.nestingPrefix):t.nestingPrefixEscaped||P("$t("),this.nestingSuffix=t.nestingSuffix?P(t.nestingSuffix):t.nestingSuffixEscaped||P(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=W(t,u,e,s.options.keySeparator,s.options.ignoreJSONStructure);return s.alwaysFormat?s.format(o,void 0,n,$($($({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(W(t,u,a,s.options.keySeparator,s.options.ignoreJSONStructure),c,n,$($($({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof f){var u=f(e,o,r);i="string"==typeof u?u:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(p){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=k(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var a=(i=this.interpolate(i,o)).match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o=$($({},t),o))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var u=[];(o=(o=$({},a)).replace&&"string"!=typeof o.replace?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;var c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),u=l,c=!0}if((r=t(s.call(this,n[1].trim(),o),o))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=k(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=u.reduce((function(e,t){return i.format(e,t,a.lng,$($({},a),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var ee=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.Z)(this,e),this.logger=m.create("formatter"),this.options=t,this.formats={number:X((function(e,t){var n=new Intl.NumberFormat(e,Q({},t));return function(e){return n.format(e)}})),currency:X((function(e,t){var n=new Intl.NumberFormat(e,Q(Q({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:X((function(e,t){var n=new Intl.DateTimeFormat(e,Q({},t));return function(e){return n.format(e)}})),relativetime:X((function(e,t){var n=new Intl.RelativeTimeFormat(e,Q({},t));return function(e){return n.format(e,t.range||"day")}})),list:X((function(e,t){var n=new Intl.ListFormat(e,Q({},t));return function(e){return n.format(e)}}))},this.init(t)}return(0,i.Z)(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=X(t)}},{key:"format",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=(i=e.split(":"),(0,p.Z)(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||(0,g.Z)(i)||(0,h.Z)()),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}var i}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,s=i.formatOptions;if(r.formats[a]){var u=e;try{var c=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},l=c.locale||c.lng||o.locale||o.lng||n;u=r.formats[a](e,l,Q(Q(Q({},s),o),c))}catch(e){r.logger.warn(e)}return u}return r.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e){u(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=l(t);if(n){var o=l(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return c(this,e)});function s(e,t,n){var i,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,o.Z)(this,s),i=r.call(this),N&&b.call(a(i)),i.backend=e,i.store=t,i.services=n,i.languageUtils=n.languageUtils,i.options=u,i.logger=m.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=u.maxParallelReads||10,i.readingCalls=0,i.maxRetries=u.maxRetries>=0?u.maxRetries:5,i.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,u.backend,u),i}return(0,i.Z)(s,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},s={},u={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=w(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a});else{this.readingCalls++;var s=function(s,u){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&u&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)},u=this.backend[n].bind(this.backend);if(2!==u.length)return u(e,t,s);try{var c=u(e,t);c&&"function"==typeof c.then?c.then((function(e){return s(null,e)})).catch(s):s(null,c)}catch(e){s(e)}}}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var s=ne(ne({},i),{},{isUpdate:o}),u=this.backend.create.bind(this.backend);if(u.length<6)try{var c;(c=5===u.length?u(e,t,n,r,s):u(e,t,n,r))&&"function"==typeof c.then?c.then((function(e){return a(null,e)})).catch(a):a(null,c)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),s}(b);function oe(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,r.Z)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,r.Z)(e[2])||"object"===(0,r.Z)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ie(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(){}var ce=function(e){u(f,e);var t,n,s=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=l(t);if(n){var o=l(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return c(this,e)});function f(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if((0,o.Z)(this,f),e=s.call(this),N&&b.call(a(e)),e.options=ie(n),e.services={},e.logger=m,e.modules={external:[]},t=a(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),c(e,a(e));setTimeout((function(){e.init(n,r)}),0)}return e}return(0,i.Z)(f,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=oe();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=se(se(se({},r),this.options),ie(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=se(se({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?m.init(o(this.modules.logger),this.options):m.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=ee);var a=new B(this.options);this.store=new F(this.options.resources,this.options);var s=this.services;s.logger=m,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new z(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Y(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new re(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new U(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=ue),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var c=O(),l=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=O();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ue),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&A.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=O();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var o=this,i=function e(t,i){var a;if("object"!==(0,r.Z)(i)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=o.options.overloadTranslationOptionHandler([t,i].concat(u))}else a=se({},i);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||n||e.keyPrefix;var l,f=o.options.keySeparator||".";return l=a.keyPrefix&&Array.isArray(t)?t.map((function(e){return"".concat(a.keyPrefix).concat(f).concat(e)})):a.keyPrefix?"".concat(a.keyPrefix).concat(f).concat(t):t,o.t(l,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=O();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=O();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new B(oe());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue,r=se(se(se({},this.options),t),{isClone:!0}),o=new f(r);return void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t)),["store","services","language"].forEach((function(t){o[t]=e[t]})),o.services=se({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new U(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(r,n),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),f}(b);(0,f.Z)(ce,"createInstance",(function(){return new ce(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var le=ce.createInstance();le.createInstance=ce.createInstance;var fe=le.createInstance,pe=le.dir,ge=le.init,he=le.loadResources,de=le.reloadResources,ve=le.use,ye=le.changeLanguage,me=le.getFixedT,be=le.t,Oe=le.exists,ke=le.setDefaultNamespace,we=le.hasLoadedNamespace,xe=le.loadNamespaces,Se=le.loadLanguages}}]);
|
|
2
|
-
//# sourceMappingURL=2618.68a01967.js.map
|