@next-bricks/advanced 0.33.3 → 0.33.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/1122.5043f029.js +2 -0
  3. package/dist/chunks/1122.5043f029.js.map +1 -0
  4. package/dist/chunks/1940.5c477924.js +2 -0
  5. package/dist/chunks/1940.5c477924.js.map +1 -0
  6. package/dist/chunks/{3171.fec4c148.js → 3171.510584aa.js} +2 -2
  7. package/dist/chunks/{3171.fec4c148.js.map → 3171.510584aa.js.map} +1 -1
  8. package/dist/chunks/{3933.a2ec75ea.js → 3933.161a05ea.js} +2 -2
  9. package/dist/chunks/{3933.a2ec75ea.js.map → 3933.161a05ea.js.map} +1 -1
  10. package/dist/chunks/4837.06f2c602.js +2 -0
  11. package/dist/chunks/{7218.ef148faa.js.map → 4837.06f2c602.js.map} +1 -1
  12. package/dist/chunks/{489.5ebb95a0.js → 489.59318cb6.js} +3 -3
  13. package/dist/chunks/{489.5ebb95a0.js.map → 489.59318cb6.js.map} +1 -1
  14. package/dist/chunks/4947.38659b48.js +3 -0
  15. package/dist/chunks/4947.38659b48.js.map +1 -0
  16. package/dist/chunks/5053.739ba196.js +2 -0
  17. package/dist/chunks/{5053.bc9a8e5b.js.map → 5053.739ba196.js.map} +1 -1
  18. package/dist/chunks/5479.201a8708.js +2 -0
  19. package/dist/chunks/{5479.344ebe72.js.map → 5479.201a8708.js.map} +1 -1
  20. package/dist/chunks/{5552.db1eb7a6.js → 5552.0c2f3750.js} +2 -2
  21. package/dist/chunks/{5552.db1eb7a6.js.map → 5552.0c2f3750.js.map} +1 -1
  22. package/dist/chunks/5683.c096a54a.js +2 -0
  23. package/dist/chunks/5683.c096a54a.js.map +1 -0
  24. package/dist/chunks/{6314.412f1f16.js → 6314.4face918.js} +2 -2
  25. package/dist/chunks/{6314.412f1f16.js.map → 6314.4face918.js.map} +1 -1
  26. package/dist/chunks/7218.dce2c80d.js +2 -0
  27. package/dist/chunks/{4837.eae6f7c1.js.map → 7218.dce2c80d.js.map} +1 -1
  28. package/dist/chunks/7434.8fc102a2.js +2 -0
  29. package/dist/chunks/{7434.e0962dca.js.map → 7434.8fc102a2.js.map} +1 -1
  30. package/dist/chunks/{790.3b264cd2.js → 790.59874681.js} +2 -2
  31. package/dist/chunks/{790.3b264cd2.js.map → 790.59874681.js.map} +1 -1
  32. package/dist/chunks/9260.a0f83253.js +2 -0
  33. package/dist/chunks/{9260.e70e8033.js.map → 9260.a0f83253.js.map} +1 -1
  34. package/dist/chunks/9559.9f33ce23.js +2 -0
  35. package/dist/chunks/9559.9f33ce23.js.map +1 -0
  36. package/dist/chunks/capture-snapshot.f047f15c.js +2 -0
  37. package/dist/chunks/{capture-snapshot.7c399065.js.map → capture-snapshot.f047f15c.js.map} +1 -1
  38. package/dist/chunks/eo-cascader.e3dca283.js +2 -0
  39. package/dist/chunks/{eo-cascader.f5ed2c9d.js.map → eo-cascader.e3dca283.js.map} +1 -1
  40. package/dist/chunks/eo-table.042eb0c6.js +2 -0
  41. package/dist/chunks/{eo-table.1d52f43f.js.map → eo-table.042eb0c6.js.map} +1 -1
  42. package/dist/chunks/eo-tree-select.1b84b62a.js +2 -0
  43. package/dist/chunks/{eo-tree-select.9d227853.js.map → eo-tree-select.1b84b62a.js.map} +1 -1
  44. package/dist/chunks/{eo-tree.bb267ad3.js → eo-tree.89207869.js} +3 -3
  45. package/dist/chunks/{eo-tree.bb267ad3.js.map → eo-tree.89207869.js.map} +1 -1
  46. package/dist/chunks/eo-workbench-layout.ae77de67.js +2 -0
  47. package/dist/chunks/{eo-workbench-layout.c476f8b7.js.map → eo-workbench-layout.ae77de67.js.map} +1 -1
  48. package/dist/chunks/main.77b41cd6.js +2 -0
  49. package/dist/chunks/{main.58be882b.js.map → main.77b41cd6.js.map} +1 -1
  50. package/dist/index.8a1c753e.js +2 -0
  51. package/dist/{index.83dd4a85.js.map → index.8a1c753e.js.map} +1 -1
  52. package/package.json +2 -2
  53. package/dist/chunks/1122.2f11298f.js +0 -2
  54. package/dist/chunks/1122.2f11298f.js.map +0 -1
  55. package/dist/chunks/1940.cf7f5dd0.js +0 -2
  56. package/dist/chunks/1940.cf7f5dd0.js.map +0 -1
  57. package/dist/chunks/4837.eae6f7c1.js +0 -2
  58. package/dist/chunks/5053.bc9a8e5b.js +0 -2
  59. package/dist/chunks/5479.344ebe72.js +0 -2
  60. package/dist/chunks/5683.7b312ccc.js +0 -2
  61. package/dist/chunks/5683.7b312ccc.js.map +0 -1
  62. package/dist/chunks/7218.ef148faa.js +0 -2
  63. package/dist/chunks/7434.e0962dca.js +0 -2
  64. package/dist/chunks/9260.e70e8033.js +0 -2
  65. package/dist/chunks/9559.9d919d1a.js +0 -2
  66. package/dist/chunks/9559.9d919d1a.js.map +0 -1
  67. package/dist/chunks/9612.99e6f1a8.js +0 -3
  68. package/dist/chunks/9612.99e6f1a8.js.map +0 -1
  69. package/dist/chunks/capture-snapshot.7c399065.js +0 -2
  70. package/dist/chunks/eo-cascader.f5ed2c9d.js +0 -2
  71. package/dist/chunks/eo-table.1d52f43f.js +0 -2
  72. package/dist/chunks/eo-tree-select.9d227853.js +0 -2
  73. package/dist/chunks/eo-workbench-layout.c476f8b7.js +0 -2
  74. package/dist/chunks/main.58be882b.js +0 -2
  75. package/dist/index.83dd4a85.js +0 -2
  76. /package/dist/chunks/{489.5ebb95a0.js.LICENSE.txt → 489.59318cb6.js.LICENSE.txt} +0 -0
  77. /package/dist/chunks/{9612.99e6f1a8.js.LICENSE.txt → 4947.38659b48.js.LICENSE.txt} +0 -0
  78. /package/dist/chunks/{eo-tree.bb267ad3.js.LICENSE.txt → eo-tree.89207869.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- (globalThis.webpackChunk_next_bricks_advanced=globalThis.webpackChunk_next_bricks_advanced||[]).push([[7434,5053],{6621:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},86284:(e,t,n)=>{"use strict";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}n.d(t,{A:()=>r})},96488:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},55152:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},30414:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(11369);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.A)(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}},24586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(11369);function o(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},5405:(e,t,n)=>{"use strict";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,{A:()=>r})},14223:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{A:()=>r})},90689:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96488),o=n(27985),i=n(5405);function a(e,t){return(0,r.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||(0,o.A)(e,t)||(0,i.A)()}},11369:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(17545);function o(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=(0,r.A)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},17545:(e,t,n)=>{"use strict";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,{A:()=>r})},27985:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(86284);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(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)?(0,r.A)(e,t):void 0}}},97434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{I18nContext:()=>J,I18nextProvider:()=>de,Trans:()=>te,TransWithoutContext:()=>W,Translation:()=>fe,composeInitialProps:()=>G,date:()=>he,getDefaults:()=>C,getI18n:()=>R,getInitialProps:()=>Q,initReactI18next:()=>$,number:()=>Oe,plural:()=>we,select:()=>je,selectOrdinal:()=>Pe,setDefaults:()=>D,setI18n:()=>T,time:()=>me,useSSR:()=>ge,useTranslation:()=>ae,withSSR:()=>ve,withTranslation:()=>le});var r=n(24586),o=n(14223),i=n(18769),a=n(17545),c=n(6621),s=n.n(c),u=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function l(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(s()[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var o=new RegExp(u),i=null;null!==(i=o.exec(e));)if(i[0].trim())if(i[1]){var a=i[1].trim(),c=[a,""];a.indexOf("=")>-1&&(c=a.split("=")),t.attrs[c[0]]=c[1],o.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return t}var p=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,f=/^\s*$/,d=Object.create(null);function g(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(g,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var y={parse:function(e,t){t||(t={}),t.components||(t.components=d);var n,r=[],o=[],i=-1,a=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(p,(function(c,s){if(a){if(c!=="</"+n.name+">")return;a=!1}var u,p="/"!==c.charAt(1),d=c.startsWith("\x3c!--"),g=s+c.length,y=e.charAt(g);if(d){var b=l(c);return i<0?(r.push(b),r):((u=o[i]).children.push(b),r)}if(p&&(i++,"tag"===(n=l(c)).type&&t.components[n.name]&&(n.type="component",a=!0),n.voidElement||a||!y||"<"===y||n.children.push({type:"text",content:e.slice(g,e.indexOf("<",g))}),0===i&&r.push(n),(u=o[i-1])&&u.children.push(n),o[i]=n),(!p||n.voidElement)&&(i>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(i--,n=-1===i?r:o[i]),!a&&"<"!==y&&y)){u=-1===i?r:o[i].children;var v=e.indexOf("<",g),h=e.slice(g,-1===v?void 0:v);f.test(h)&&(h=" "),(v>-1&&i+u.length>=0||" "!==h)&&u.push({type:"text",content:h})}})),r},stringify:function(e){return e.reduce((function(e,t){return e+g("",t)}),"")}};const b=y;function v(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var h={};function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&h[t[0]]||("string"==typeof t[0]&&(h[t[0]]=new Date),v.apply(void 0,t))}var O=function(e,t){return function(){e.isInitialized?t():e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}};function j(e,t,n){e.loadNamespaces(t,O(e,n))}function w(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((function(t){e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,O(e,r))}function P(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var x=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,A={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},E=function(e){return A[e]};function S(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 k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N,I={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(x,E)}};function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I=k(k({},I),e)}function C(){return I}function T(e){N=e}function R(){return N}var L=["format"],U=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];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 B(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,r.A)(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}function K(e,t){if(!e)return!1;var n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function V(e){return e?e.props?e.props.children:e.children:[]}function F(e){return Array.isArray(e)?e:[e]}function H(e,t){if(!e)return"";var n="",r=F(e),c=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach((function(e,r){if("string"==typeof e)n+="".concat(e);else if((0,i.isValidElement)(e)){var s=Object.keys(e.props).length,u=c.indexOf(e.type)>-1,l=e.props.children;if(!l&&u&&0===s)n+="<".concat(e.type,"/>");else if(l||u&&0===s)if(e.props.i18nIsDynamicList)n+="<".concat(r,"></").concat(r,">");else if(u&&1===s&&"string"==typeof l)n+="<".concat(e.type,">").concat(l,"</").concat(e.type,">");else{var p=H(l,t);n+="<".concat(r,">").concat(p,"</").concat(r,">")}else n+="<".concat(r,"></").concat(r,">")}else if(null===e)v("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===(0,a.A)(e)){var f=e.format,d=(0,o.A)(e,L),g=Object.keys(d);if(1===g.length){var y=f?"".concat(g[0],", ").concat(f):g[0];n+="{{".concat(y,"}}")}else v("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else v("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),n}function W(e){var t=e.children,n=e.count,r=e.parent,c=e.i18nKey,s=e.context,u=e.tOptions,l=void 0===u?{}:u,p=e.values,f=e.defaults,d=e.components,g=e.ns,y=e.i18n,v=e.t,h=e.shouldUnescape,O=(0,o.A)(e,U),j=y||R();if(!j)return m("You will need to pass in an i18next instance by using i18nextReactModule"),t;var w=v||j.t.bind(j)||function(e){return e};s&&(l.context=s);var P=B(B({},C()),j.options&&j.options.react),x=g||w.ns||j.options&&j.options.defaultNS;x="string"==typeof x?[x]:x||["translation"];var A=f||H(t,P)||P.transEmptyNodeValue||c,E=P.hashTransKey,S=c||(E?E(A):A),k=p?l.interpolation:{interpolation:B(B({},l.interpolation),{},{prefix:"#$?",suffix:"?$#"})},N=B(B(B(B({},l),{},{count:n},p),k),{},{defaultValue:A,ns:x}),I=function(e,t,n,r,o,c){if(""===t)return[];var s=r.transKeepBasicHtmlNodesFor||[],u=t&&new RegExp(s.join("|")).test(t);if(!e&&!u)return[t];var l={};!function e(t){F(t).forEach((function(t){"string"!=typeof t&&(K(t)?e(V(t)):"object"!==(0,a.A)(t)||(0,i.isValidElement)(t)||Object.assign(l,t))}))}(e);var p=b.parse("<0>".concat(t,"</0>")),f=B(B({},l),o);function d(e,t,n){var r=V(e),o=y(r,t.children,n);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return(0,i.isValidElement)(e)}))}(r)&&0===o.length?r:o}function g(e,t,n,r,o){e.dummy&&(e.children=t),n.push((0,i.cloneElement)(e,B(B({},e.props),{},{key:r}),o?void 0:t))}function y(t,o,l){var p=F(t);return F(o).reduce((function(t,o,b){var v,h,m,O=o.children&&o.children[0]&&o.children[0].content&&n.services.interpolator.interpolate(o.children[0].content,f,n.language);if("tag"===o.type){var j=p[parseInt(o.name,10)];!j&&1===l.length&&l[0][o.name]&&(j=l[0][o.name]),j||(j={});var w=0!==Object.keys(o.attrs).length?(v={props:o.attrs},(m=B({},h=j)).props=Object.assign(v.props,h.props),m):j,P=(0,i.isValidElement)(w),x=P&&K(o,!0)&&!o.voidElement,A=u&&"object"===(0,a.A)(w)&&w.dummy&&!P,E="object"===(0,a.A)(e)&&null!==e&&Object.hasOwnProperty.call(e,o.name);if("string"==typeof w){var S=n.services.interpolator.interpolate(w,f,n.language);t.push(S)}else if(K(w)||x)g(w,d(w,o,l),t,b);else if(A){var k=y(p,o.children,l);t.push((0,i.cloneElement)(w,B(B({},w.props),{},{key:b}),k))}else if(Number.isNaN(parseFloat(o.name)))if(E)g(w,d(w,o,l),t,b,o.voidElement);else if(r.transSupportBasicHtmlNodes&&s.indexOf(o.name)>-1)if(o.voidElement)t.push((0,i.createElement)(o.name,{key:"".concat(o.name,"-").concat(b)}));else{var N=y(p,o.children,l);t.push((0,i.createElement)(o.name,{key:"".concat(o.name,"-").concat(b)},N))}else if(o.voidElement)t.push("<".concat(o.name," />"));else{var I=y(p,o.children,l);t.push("<".concat(o.name,">").concat(I,"</").concat(o.name,">"))}else if("object"!==(0,a.A)(w)||P)1===o.children.length&&O?t.push((0,i.cloneElement)(w,B(B({},w.props),{},{key:b}),O)):t.push((0,i.cloneElement)(w,B(B({},w.props),{},{key:b})));else{var D=o.children[0]?O:null;D&&t.push(D)}}else if("text"===o.type){var C=r.transWrapTextNodes,T=c?r.unescape(n.services.interpolator.interpolate(o.content,f,n.language)):n.services.interpolator.interpolate(o.content,f,n.language);C?t.push((0,i.createElement)(C,{key:"".concat(o.name,"-").concat(b)},T)):t.push(T)}return t}),[])}return V(y([{dummy:!0,children:e||[]}],p,F(e||[]))[0])}(d||t,S?w(S,N):A,j,P,N,h),D=void 0!==r?r:P.defaultTransParent;return D?(0,i.createElement)(D,O,I):I}var _=n(55152),M=n(30414),$={type:"3rdParty",init:function(e){D(e.options.react),T(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 Y(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,r.A)(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}var J=(0,i.createContext)(),Z=function(){function e(){(0,_.A)(this,e),this.usedNamespaces={}}return(0,M.A)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function G(e){return function(t){return new Promise((function(n){var r=Q();e.getInitialProps?e.getInitialProps(t).then((function(e){n(Y(Y({},e),r))})):n(r)}))}}function Q(){var e=R(),t=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],n={},r={};return e.languages.forEach((function(n){r[n]={},t.forEach((function(t){r[n][t]=e.getResourceBundle(n,t)||{}}))})),n.initialI18nStore=r,n.initialLanguage=e.language,n}var X=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function ee(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 te(e){var t=e.children,n=e.count,a=e.parent,c=e.i18nKey,s=e.context,u=e.tOptions,l=void 0===u?{}:u,p=e.values,f=e.defaults,d=e.components,g=e.ns,y=e.i18n,b=e.t,v=e.shouldUnescape,h=(0,o.A)(e,X),m=(0,i.useContext)(J)||{},O=m.i18n,j=m.defaultNS,w=y||O||R(),P=b||w&&w.t.bind(w);return W(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({children:t,count:n,parent:a,i18nKey:c,context:s,tOptions:l,values:p,defaults:f,components:d,ns:g||P&&P.ns||j||w&&w.options&&w.options.defaultNS,i18n:w,t:b,shouldUnescape:v},h))}var ne=n(90689);function re(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 oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ie=function(e,t){var n=(0,i.useRef)();return(0,i.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=(0,i.useContext)(J)||{},o=r.i18n,c=r.defaultNS,s=n||o||R();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Z),!s){m("You will need to pass in an i18next instance by using initReactI18next");var u=function(e,t){return"string"==typeof t?t:t&&"object"===(0,a.A)(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},l=[u,{},!1];return l.t=u,l.i18n={},l.ready=!1,l}s.options.react&&void 0!==s.options.react.wait&&m("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=oe(oe(oe({},C()),s.options.react),t),f=p.useSuspense,d=p.keyPrefix,g=e||c||s.options&&s.options.defaultNS;g="string"==typeof g?[g]:g||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(g);var y=(s.isInitialized||s.initializedStoreOnce)&&g.every((function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],o=!!t.options&&t.options.fallbackLng,i=t.languages[t.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};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}(e,t,n):(m("i18n.languages were undefined or empty",t.languages),!0)}(e,s,p)}));function b(){return s.getFixedT(t.lng||null,"fallback"===p.nsMode?g:g[0],d)}var v=(0,i.useState)(b),h=(0,ne.A)(v,2),O=h[0],P=h[1],x=g.join();t.lng&&(x="".concat(t.lng).concat(x));var A=ie(x),E=(0,i.useRef)(!0);(0,i.useEffect)((function(){var e=p.bindI18n,n=p.bindI18nStore;function r(){E.current&&P(b)}return E.current=!0,y||f||(t.lng?w(s,t.lng,g,(function(){E.current&&P(b)})):j(s,g,(function(){E.current&&P(b)}))),y&&A&&A!==x&&E.current&&P(b),e&&s&&s.on(e,r),n&&s&&s.store.on(n,r),function(){E.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,r)})),n&&s&&n.split(" ").forEach((function(e){return s.store.off(e,r)}))}}),[s,x]);var S=(0,i.useRef)(!0);(0,i.useEffect)((function(){E.current&&!S.current&&P(b),S.current=!1}),[s,d]);var k=[O,s,y];if(k.t=O,k.i18n=s,k.ready=y,y)return k;if(!y&&!f)return k;throw new Promise((function(e){t.lng?w(s,t.lng,g,(function(){return e()})):j(s,g,(function(){return e()}))}))}var ce=["forwardedRef"];function se(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 ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function le(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){function r(r){var a=r.forwardedRef,c=(0,o.A)(r,ce),s=ae(e,ue(ue({},c),{},{keyPrefix:t.keyPrefix})),u=(0,ne.A)(s,3),l=u[0],p=u[1],f=u[2],d=ue(ue({},c),{},{t:l,i18n:p,tReady:f});return t.withRef&&a?d.ref=a:!t.withRef&&a&&(d.forwardedRef=a),(0,i.createElement)(n,d)}return r.displayName="withI18nextTranslation(".concat(P(n),")"),r.WrappedComponent=n,t.withRef?(0,i.forwardRef)((function(e,t){return(0,i.createElement)(r,Object.assign({},e,{forwardedRef:t}))})):r}}var pe=["ns","children"];function fe(e){var t=e.ns,n=e.children,r=ae(t,(0,o.A)(e,pe)),i=(0,ne.A)(r,3),a=i[0],c=i[1],s=i[2];return n(a,{i18n:c,lng:c.language},s)}function de(e){var t=e.i18n,n=e.defaultNS,r=e.children,o=(0,i.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,i.createElement)(J.Provider,{value:o},r)}function ge(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).i18n,r=((0,i.useContext)(J)||{}).i18n,o=n||r||R();o.options&&o.options.isClone||(e&&!o.initializedStoreOnce&&(o.services.resourceStore.data=e,o.options.ns=Object.values(e).reduce((function(e,t){return Object.keys(t).forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}),o.options.ns),o.initializedStoreOnce=!0,o.isInitialized=!0),t&&!o.initializedLanguageOnce&&(o.changeLanguage(t),o.initializedLanguageOnce=!0))}var ye=["initialI18nStore","initialLanguage"];function be(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 ve(){return function(e){function t(t){var n=t.initialI18nStore,a=t.initialLanguage,c=(0,o.A)(t,ye);return ge(n,a),(0,i.createElement)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},c))}return t.getInitialProps=G(e),t.displayName="withI18nextSSR(".concat(P(e),")"),t.WrappedComponent=e,t}}var he=function(){return""},me=function(){return""},Oe=function(){return""},je=function(){return""},we=function(){return""},Pe=function(){return""}}}]);
2
- //# sourceMappingURL=7434.e0962dca.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_advanced=globalThis.webpackChunk_next_bricks_advanced||[]).push([[9260],{43509:(e,t,i)=>{i.r(t);var s=i(24586),a=i(74635),n=i(70918),r=i(26902),l=i(5536),o=i(86121),h=i(70829),d=i(62740),c=i(18769),p=i.n(c),u=i(55351),A=i(43340),g=i(2198),w=i(41030),m=i(2454),y=i(89575),f=i(42391),b=i(80050);const k={$eq:w.isEqual,$lt:w.lt,$lte:w.lte,$gt:w.gt,$gte:w.gte,$ne:(e,t)=>!(0,w.isEqual)(e,t),$isEqual:w.isEqual,$notEqual:(e,t)=>!(0,w.isEqual)(e,t),$in:w.includes,$nin:(e,t)=>!(0,w.includes)(e,t),$exists:(e,t)=>e?!(0,w.isUndefined)(t):(0,w.isUndefined)(t)};function x(e,t,i){const{dataIndex:s,mapping:a}=e,n=void 0!==s?(0,w.get)(t,s):i,r=a.find((e=>e.value===n));return r?{borderLeft:`4px solid ${r.leftBorderColor}`}:{}}const C=(e,t,i,s)=>{e&&(0,w.forEach)(e,(e=>{const a=(0,w.get)(e,i),n=(0,w.get)(e,t);s.push(n),null!=a&&a.length&&C(a,t,i,s)}))},v=(e,t,i)=>{e&&(0,w.forEach)(e,(e=>{const s=(0,w.get)(e,t);i.push(e),null!=s&&s.length&&v(s,t,i)}))};function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=t&&t.length&&t.forEach((t=>{var i;return null!==(i=t[e])&&void 0!==i&&i.length?S(e,t[e]):(delete t[e],t)})),t}var E=i(53373),M=i.n(E),W=i(47522),R=i(80255),_=i(63737),N=i(50692),D=i(53435),B=i.n(D),I=i(33763),K=i(68621);const P="bricks/advanced/eo-table";var z=i(85502),T=i(18799),U=i(84352),F=i(26386);(0,z.initializeReactI18n)(P,{en:{},zh:{}});const L="DraggableBodyRow",H={lib:"antd",icon:"down",theme:"outlined"},q={lib:"antd",icon:"right",theme:"outlined"},O=(0,A.wrapBrick)("eo-icon"),$=e=>{let{index:t,moveRow:i,className:s,style:a,...n}=e;const r=p().useRef(null),[{isOver:l,dropClassName:o},h]=(0,W.H)({accept:L,collect:e=>{const{index:i}=e.getItem()||{};return i===t?{}:{isOver:e.isOver(),dropClassName:i<t?"dropOverDownward":"dropOverUpward"}},drop:e=>{i(e.index,t)}}),[,d]=(0,R.i)({type:L,item:{type:L,index:t},collect:e=>({isDragging:e.isDragging()})});return h(d(r)),p().createElement("tr",(0,y.A)({ref:r,className:M()(s,{[o]:l}),style:{cursor:"move",...a}},n))};function j(e){const{t}=(0,z.useTranslation)(P),i="zh"===T.i18n.language.split("-")[0]?F.A:U.A;if(e.error)throw e.error;const{configProps:s={pagination:!0,sortBy:!1},columns:a,rowKey:n="key",expandIconAsCell:r,expandIconColumnIndex:l,childrenColumnName:o,scroll:h,optimizedColumns:d,onDelete:u,ellipsisInfo:A,showHeader:g}=e,m=(0,c.useMemo)((()=>{var t;return null===(t=e.dataSource)||void 0===t?void 0:t.map(((e,t)=>(0,w.isNil)(e[n])?{...e,[n]:t}:e))}),[e.dataSource,n]),[k,C]=(0,c.useState)(m),v=(0,c.useRef)(new Map),S=(0,c.useRef)(new Map),E=(0,c.useRef)(new Map),W=(0,c.useRef)(new Map);(0,c.useEffect)((()=>{W.current.clear(),C(m)}),[m]);const R=null!=s&&s.rowSelection?-1:0,D=(0,c.useMemo)((()=>{if(a){S.current.clear(),E.current.clear();const e=a.map(((e,t)=>{const{useBrick:i,valueSuffix:s,cellStatus:a,cellStyle:h={},headerBrick:d,colSpanKey:c,rowSpanKey:u,filterDropdownBrick:g,...m}=e;if(null!=d&&d.useBrick){const t=null==d?void 0:d.useBrick;let i=S.current.get(e);i||(i={title:m.title},S.current.set(e,i)),m.title=((e,t)=>function(){return p().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:t})})(t,i)}if(null!=g&&g.useBrick&&(m.filterDropdown=p().createElement(I.ReactUseMultipleBricks,{useBrick:g.useBrick})),i){let e;i&&(e=E.current.get(i),e||(e=new Map,E.current.set(i,e))),m.render=((e,t)=>function(i,s,a){if(e){let n=null==t?void 0:t.get(s);return n||(n={cellData:i,rowData:s,columnIndex:a},null==t||t.set(s,n)),p().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:n})}})(i,e),m.shouldCellUpdate=(e,t)=>!(0,w.isEqual)(e,t)}else s&&(m.render=e=>e+s);if(!r&&t===Number(l)+R){const e=m.render;m.render=function(t,i,s){return p().createElement(p().Fragment,null,!i[o]&&v.current.get(n?i[n]:i),e?e(t,i,s):t)}}if(a||c||u||h){const e=m.render;m.render=(t,i,s)=>({children:e?e(t,i,s):t,props:{colSpan:i[c],rowSpan:i[u],style:{...a?x(a,i,t):{},...h}}})}return"string"==typeof m.dataIndex&&(m.dataIndex=(0,w.toPath)(m.dataIndex)),"top"===m.verticalAlign&&(m.className?m.className+=" alignTop":m.className="alignTop"),"bottom"===m.verticalAlign&&(m.className?m.className+=" alignBottom":m.className="alignBottom"),A&&(m.className?m.className+=" ellipsisInfoCell":m.className="ellipsisInfoCell"),m}));return e}}),[a,o,r,l,R,n,u,A]),L={body:{row:$}},j=(t,i)=>{const s=k[t],a=B()(k,{$splice:[[t,1],[i,0,s]]});C(a),e.onDrag&&e.onDrag(a)},Q=(0,w.pickBy)({expandIconColumnIndex:l,expandIconAsCell:r,expandRowByClick:e.expandRowByClick,expandedRowKeys:e.expandedRowKeys,defaultExpandAllRows:e.defaultExpandAllRows},(e=>!(0,w.isNil)(e)));let Z=p().createElement(f.A,(0,y.A)({className:M()("brickTable",{expandIconCellHidden:!r,customDropTable:e.tableDraggable,tableThTransparent:e.thTransparent,zebraPatternTable:(null==k?void 0:k.length)>=2&&e.zebraPattern,xSmallSizeTable:e.xSmallSizeTable}),dataSource:k},e.tableDraggable?{components:L,onRow:(e,t)=>({index:t,moveRow:j})}:{},{columns:D,onChange:e.onChange},e.expandedRowBrick?{expandedRowRender:(t,i)=>{var s;let a=W.current.get(t);return a||(a={rowData:t,rowIndex:i},W.current.set(t,a)),p().createElement(I.ReactUseMultipleBricks,{useBrick:null===(s=e.expandedRowBrick)||void 0===s?void 0:s.useBrick,data:a})}}:{},Q,{onExpand:(t,i)=>{e.onExpand&&e.onExpand(t,i)},showSorterTooltip:!1,onExpandedRowsChange:t=>{e.onExpandedRowsChange&&e.onExpandedRowsChange(t)},rowKey:n,childrenColumnName:o,rowClassName:(t,i)=>t.invalidRow?"invalidRow":t.disabledRow?"disabledRow":e.zebraPattern&&i%2?"brickTableOddRow":"",expandIcon:t=>{var i;const{record:s,expandable:a,expanded:l,onExpand:o}=t;let h,d=(null===(i=e.expandIcon)||void 0===i?void 0:i.collapsedIcon)||H;var c;a?(l||(d=(null===(c=e.expandIcon)||void 0===c?void 0:c.expandedIcon)||q),h=p().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon",onClick:e=>{o(s,e)}},p().createElement(O,d))):h=p().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon"},p().createElement("span",{style:{visibility:"hidden"}},p().createElement(O,d)));return h?(r||v.current.set(n?s[n]:s,h),h):p().createElement(p().Fragment,null)},scroll:h,showHeader:g},s));e.tableDraggable&&(Z=p().createElement(_.Q,{backend:N.t2},Z));const V=(0,c.useMemo)((()=>(0,K.VC)()),[]);return p().createElement(b.Ay,{locale:i},p().createElement(K.N7,{container:e.shadowRoot,cache:V},Z))}var Q;let Z,V,G,Y,J,X,ee,te,ie,se,ae,ne,re,le,oe,he,de,ce,pe,ue,Ae,ge,we,me,ye,fe,be,ke,xe,Ce,ve,Se,Ee,Me,We,Re,_e,Ne,De,Be,Ie,Ke,Pe,ze,Te,Ue,Fe,Le,He,qe,Oe,$e,je,Qe,Ze,Ve,Ge,Ye,Je,Xe,et,tt,it,st,at,nt,rt,lt,ot,ht,dt,ct,pt,ut,At,gt,wt,mt,yt,ft,bt,kt,xt,Ct,vt,St,Et,Mt,Wt,Rt,_t,Nt,Dt,Bt,It,Kt,Pt,zt,Tt,Ut,Ft,Lt,Ht,qt,Ot,$t,jt,Qt,Zt,Vt,Gt,Yt,Jt,Xt,ei,ti,ii,si,ai,ni,ri,li,oi,hi;i(19583);const{defineElement:di,property:ci,event:pi,method:ui}=(0,u.createDecorators)();let Ai;var gi=new WeakMap,wi=new WeakSet,mi=new WeakMap,yi=new WeakMap,fi=new WeakMap,bi=new WeakMap,ki=new WeakMap,xi=new WeakMap,Ci=new WeakMap,vi=new WeakMap,Si=new WeakMap,Ei=new WeakMap,Mi=new WeakMap,Wi=new WeakMap,Ri=new WeakMap,_i=new WeakMap,Ni=new WeakMap,Di=new WeakMap,Bi=new WeakMap,Ii=new WeakMap,Ki=new WeakMap,Pi=new WeakMap,zi=new WeakMap,Ti=new WeakMap,Ui=new WeakMap,Fi=new WeakMap,Li=new WeakMap,Hi=new WeakMap,qi=new WeakMap,Oi=new WeakMap,$i=new WeakMap,ji=new WeakMap,Qi=new WeakMap,Zi=new WeakMap,Vi=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,Ji=new WeakMap,Xi=new WeakMap,es=new WeakMap,ts=new WeakMap,is=new WeakMap,ss=new WeakMap,as=new WeakMap,ns=new WeakMap,rs=new WeakMap,ls=new WeakMap,os=new WeakMap,hs=new WeakMap,ds=new WeakMap,cs=new WeakMap,ps=new WeakMap,us=new WeakMap,As=new WeakMap,gs=new WeakMap;class ws extends A.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,wi),(0,n.A)(this,gi,(Z(this),G(this))),(0,n.A)(this,mi,(X(this),ee(this))),(0,n.A)(this,yi,(se(this),ae(this))),(0,n.A)(this,fi,(le(this),oe(this))),(0,n.A)(this,bi,(ce(this),pe(this))),(0,n.A)(this,ki,(ge(this),we(this))),(0,n.A)(this,xi,(fe(this),be(this))),(0,n.A)(this,Ci,(Ce(this),ve(this))),(0,n.A)(this,vi,(Me(this),We(this,!0))),(0,n.A)(this,Si,(Re(this),_e(this))),(0,n.A)(this,Ei,(Ne(this),De(this))),(0,n.A)(this,Mi,(Be(this),Ie(this))),(0,n.A)(this,Wi,(Ke(this),Pe(this,!1))),(0,n.A)(this,Ri,(ze(this),Te(this))),(0,n.A)(this,_i,(Ue(this),Fe(this))),(0,n.A)(this,Ni,(Le(this),He(this))),(0,n.A)(this,Di,(qe(this),Oe(this))),(0,n.A)(this,Bi,($e(this),je(this))),(0,n.A)(this,Ii,(Qe(this),Ze(this))),(0,n.A)(this,Ki,(Ve(this),Ge(this))),(0,n.A)(this,Pi,(Ye(this),Je(this,!0))),(0,n.A)(this,zi,(Xe(this),et(this))),(0,n.A)(this,Ti,(tt(this),it(this))),(0,n.A)(this,Ui,(st(this),at(this))),(0,n.A)(this,Fi,(nt(this),rt(this,!1))),(0,n.A)(this,Li,(lt(this),ot(this))),(0,n.A)(this,Hi,(ht(this),dt(this))),(0,n.A)(this,qi,(ct(this),pt(this))),(0,n.A)(this,Oi,(ut(this),At(this))),(0,n.A)(this,$i,(gt(this),wt(this))),(0,s.A)(this,"_disabledChildrenKeys",(mt(this),[])),(0,n.A)(this,ji,yt(this,"children")),(0,n.A)(this,Qi,(ft(this),bt(this,!0))),(0,n.A)(this,Zi,(kt(this),xt(this))),(0,n.A)(this,Vi,(Ct(this),vt(this,""))),(0,n.A)(this,Gi,(St(this),Et(this))),(0,n.A)(this,Yi,(Mt(this),Wt(this))),(0,n.A)(this,Ji,(Rt(this),_t(this))),(0,n.A)(this,Xi,(Nt(this),Dt(this))),(0,n.A)(this,es,(Bt(this),It(this,{x:!0}))),(0,n.A)(this,ts,(Kt(this),Pt(this,"q"))),(0,n.A)(this,is,(zt(this),Tt(this))),(0,n.A)(this,ss,(Ut(this),Ft(this))),(0,n.A)(this,as,(Lt(this),Ht(this))),(0,n.A)(this,ns,(qt(this),Ot(this,[]))),(0,n.A)(this,rs,($t(this),jt(this))),(0,n.A)(this,ls,(Qt(this),Zt(this))),(0,n.A)(this,os,(Vt(this),Gt(this,!0))),(0,n.A)(this,hs,(Yt(this),Jt(this))),(0,n.A)(this,ds,(Xt(this),ei(this))),(0,n.A)(this,cs,(ti(this),ii(this))),(0,n.A)(this,ps,(si(this),ai(this,!0))),(0,n.A)(this,us,(ni(this),ri(this,!0))),(0,s.A)(this,"_originalDataSource",(li(this),[])),(0,s.A)(this,"_dataSource",[]),(0,s.A)(this,"_pureSource",void 0),(0,s.A)(this,"_columns",void 0),(0,s.A)(this,"_finalConfigProps",{}),(0,s.A)(this,"_error",void 0),(0,n.A)(this,As,void 0),(0,s.A)(this,"_selectUpdateEventName",""),(0,s.A)(this,"_selectUpdateEventDetailKeys",[]),(0,s.A)(this,"_selectUpdateEventDetailField",""),(0,s.A)(this,"_selectUpdateEventDetailExtra",{}),(0,s.A)(this,"_fields",{page:"page",pageSize:"pageSize",dataSource:"list",total:"total",ascend:"ascend",descend:"descend"}),(0,n.A)(this,gs,oi(this,[])),(0,s.A)(this,"_selected",(hi(this),!1)),(0,s.A)(this,"_selectedRow",void 0),(0,s.A)(this,"_selectedRows",[]),(0,s.A)(this,"_allChildren",[]),(0,s.A)(this,"_isInSelect",!1),(0,s.A)(this,"_getRowKey",(()=>{var e;return this.rowKey??this._fields.rowKey??(null===(e=this.configProps)||void 0===e?void 0:e.rowKey)??"key"})),(0,s.A)(this,"_findParentByChildKeyValue",((e,t,i,s)=>{let a;return i.some((i=>{if(i[t]===e)a=s;else{const s=i[this.childrenColumnName];s&&(a=this._findParentByChildKeyValue(e,t,s,i))}return!!a})),a})),(0,s.A)(this,"_handleRowSelectChange",((e,t)=>{const i=this._getRowKey(),s=(0,w.keyBy)(t,i);if(this._selected){const t=[...e];if(this._allChildren.forEach((e=>{const a=e[i];t.push(a),s[a]=e})),this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow){const a=new Set(e),n=this._findParentByChildKeyValue(this._selectedRow[i],i,this._dataSource);if(n&&n[this.childrenColumnName].every((e=>a.has(e[i])))){const e=n[i];t.push(e),s[e]=n}}this.selectedRowKeys=(0,w.uniq)(t)}else{let t;this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow&&(t=this._findParentByChildKeyValue(this._selectedRow[i],i,this._dataSource)),this.selectedRowKeys=(0,w.pullAll)(e,(0,w.map)(this._allChildren.concat(t),i))}this._selectedRow=void 0;const a=(0,w.keyBy)(this.extraRows,i);this._selectedRows=this.selectedRowKeys.map((e=>s[e]||a[e]));let n=null;const r=(0,w.isEmpty)(this._selectUpdateEventDetailField)?this._selectedRows:(0,w.map)(this._selectedRows,(e=>(0,w.get)(e,this._selectUpdateEventDetailField)));n=(0,w.isEmpty)(this._selectUpdateEventDetailKeys)||(0,w.isEmpty)(r)?r:(0,w.set)({},this._selectUpdateEventDetailKeys,r),(0,w.isEmpty)(n)||(n=(0,w.merge)(n,this._selectUpdateEventDetailExtra)),this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:n})):(0,l.A)(wi,this,ne).emit(n),(0,l.A)(wi,this,he).emit(e)})),(0,s.A)(this,"_getSelectedRowsWithChildren",(e=>{const t=[];return!(0,w.isEmpty)(e[this.childrenColumnName])&&(0,w.isArray)(e[this.childrenColumnName])&&(0,w.forEach)(e[this.childrenColumnName],(e=>{t.push(e),t.push(...this._getSelectedRowsWithChildren(e))})),t})),(0,s.A)(this,"_handleOnSelect",((e,t)=>{this._selected=t,this._selectedRow=e,this._isInSelect=!0;const i=this._getRowKey(),s=this.selectAllChildren?this._getSelectedRowsWithChildren(e):[];this._allChildren=s,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=t?(0,w.uniq)([...this._disabledChildrenKeys,...(0,w.map)(s,i)]):(0,w.pullAll)(this._disabledChildrenKeys,[...(0,w.map)(s,i)])),this.storeCheckedByUrl&&i&&this._updateUrlChecked([e[i]],t)})),(0,s.A)(this,"_handleSelectAll",((e,t,i)=>{this._selected=e,this._isInSelect=!0;const s=this._getRowKey();if(this.selectAllChildren){const t=(0,w.map)(this._dataSource,s),a=i.filter((e=>t.includes(e[s]))),n=(0,w.flatten)((0,w.map)(a,(e=>(0,w.map)(this._getSelectedRowsWithChildren(e),(e=>e[s]))))),r=(0,w.flatten)((0,w.map)(a,(e=>(0,w.map)(this._getSelectedRowsWithChildren(e),(e=>e)))));this._allChildren=r,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=e?(0,w.uniq)(this._disabledChildrenKeys.concat(n)):this._disabledChildrenKeys.filter((e=>!n.includes(e))))}this.storeCheckedByUrl&&s&&this._updateUrlChecked((0,w.map)(i,s),e)})),(0,s.A)(this,"_getCheckedFromUrl",(()=>{const e=(0,m.getHistory)(),t=new URLSearchParams(e.location.search).get("checked");return(0,w.isEmpty)(t)?[]:t.split(",")})),(0,s.A)(this,"_updateUrlChecked",((e,t)=>{const i=(0,m.getHistory)();let s=this._getCheckedFromUrl();t?s=[...s,...e]:(0,w.pull)(s,...e),this.shouldUpdateUrlParams&&i.pushQuery({checked:s.join(",")},{notify:!1})})),(0,s.A)(this,"_handleOnChange",((e,t,i)=>{const s=(0,m.getHistory)(),a=new URLSearchParams(s.location.search);if(!(0,w.isEmpty)(e))if(e.pageSize!==this.pageSize)e.current=1,a.set("page","1"),a.set("pageSize",(null==e?void 0:e.pageSize).toString()),(0,l.A)(wi,this,te).emit({[this._fields.pageSize]:e.pageSize,[this._fields.page]:1}),this.page=1,this.pageSize=e.pageSize;else if(e.current!==this.page){const t=e.current||1;a.set("page",t.toString()),(0,l.A)(wi,this,Y).emit({[this._fields.page]:t}),this.page=t}this.filters=t,(0,w.isEmpty)(t)||(0,w.forEach)(t,((e,t)=>{(0,w.isNil)(e)||0===e.length?a.delete(t):a.set(t,e)})),i.order&&(0,w.isNil)(i.order)&&(i.columnKey!==this.sort||this._fields[i.order]!==this.order)&&(i.columnKey&&i.order?(a.set("sort",i.columnKey),a.set("order",this._fields[i.order].toString()),this.sort=i.columnKey,this.order=this._fields[i.order]):(a.delete("sort"),a.delete("order"),this.sort=null,this.order=null),(0,l.A)(wi,this,ue).emit({sort:this.sort,order:this.order})),this.frontSearch?(this.shouldUpdateUrlParams&&s.push(`?${a}`,{notify:!1}),this.frontendSearch(e,t,i)):this.shouldUpdateUrlParams&&s.push(`?${a}`,{notify:!!this.shouldRenderWhenUrlParamsUpdate})})),(0,s.A)(this,"renderSelectInfo",(()=>p().createElement("span",{style:{marginLeft:20}},p().createElement("span",null,"已选择",this.selectedRowKeys.length,"项"),p().createElement("a",{role:"button",style:{marginLeft:"10px"},onClick:()=>{this.selectedRowKeys=[],this._selectedRows=[],this._disabledChildrenKeys=[],this._allChildren=[],this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:[]})):(0,l.A)(wi,this,ne).emit([])}},"清空")))),(0,s.A)(this,"_handleOnExpand",((e,t)=>{if(this.expandedRowKeys){const i=this._getRowKey(),s=[(0,w.get)(t,i)],a=(0,w.get)(t,this.childrenColumnName);if(!(0,w.isEmpty)(a)){const e=(0,w.map)((0,w.filter)(a,(e=>(0,w.isEmpty)((0,w.get)(e,this.childrenColumnName)))),i);s.push(...e)}this.expandedRowKeys=e?[...this.expandedRowKeys,...s]:(0,w.pull)(this.expandedRowKeys,...s),this._render()}(0,l.A)(wi,this,me).emit({expanded:e,record:t})})),(0,s.A)(this,"_handleOnExpandedRowsChange",(e=>{(0,l.A)(wi,this,ke).emit({expandedRows:e})})),(0,s.A)(this,"_handleOnDrag",(e=>{(0,l.A)(wi,this,Se).emit({data:e})})),(0,s.A)(this,"_getAllRows",(()=>{const e=[];return v(this._dataSource,this.childrenColumnName,e),e})),(0,s.A)(this,"_handleDefaultSelectAll",(()=>{this._isInSelect=!0;const e=this._getRowKey();return this._selectedRows=this._getAllRows(),this.selectedRowKeys=(0,w.map)(this._selectedRows,e),this.selectedRowKeys})),(0,s.A)(this,"_initConfigProps",(()=>{var e;const t={current:this.page,pageSize:this.pageSize,total:(0,h.A)(As,this),showSizeChanger:!0,pageSizeOptions:["10","20","50"],showTotal:e=>{var t;return p().createElement(p().Fragment,null,p().createElement("span",{className:"totalText"},"共 ",p().createElement("strong",{className:"total"},e)," 条"),((null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)||this.rowSelection)&&this.showSelectInfo&&0!==this.selectedRowKeys.length&&this.renderSelectInfo())}},i=this._getRowKey();let s;this.rowDisabledConfig&&(s=Array.isArray(this.rowDisabledConfig)?this.rowDisabledConfig:[this.rowDisabledConfig]);const a={...i?{selectedRowKeys:this._isInSelect?this.selectedRowKeys:this.storeCheckedByUrl?this._getCheckedFromUrl():this.defaultSelectAll?this._handleDefaultSelectAll():this.selectedRowKeys,onSelect:this._handleOnSelect,onSelectAll:this._handleSelectAll,onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}:{onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0},getCheckboxProps:e=>!(0,w.isEmpty)(this._disabledChildrenKeys)&&this._disabledChildrenKeys.includes((0,w.get)(e,i))?{disabled:!0}:s?{disabled:s.some((t=>{const{field:i,value:s,operator:a}=t,n=k[a];return null==n?void 0:n(s,(0,w.get)(e,i))}))}:{}};this.configProps?(this._finalConfigProps=(0,w.cloneDeep)(this.configProps),!1!==this.configProps.pagination&&(this._finalConfigProps.pagination={...t,...this.pagination,...this.configProps.pagination},void 0!==this.configProps.pagination&&null!==this.configProps.pagination||!1!==this.pagination||(this._finalConfigProps.pagination=!1)),this.configProps.size||(this._finalConfigProps.size="x-small"==this.size?"":this.size)):(this._finalConfigProps={},this._finalConfigProps.pagination=!1!==this.pagination&&t,this._finalConfigProps.size="x-small"==this.size?"":this.size);const n=(null===(e=this.configProps)||void 0===e?void 0:e.rowSelection)??this.rowSelection;n?this._finalConfigProps.rowSelection=!0===n?{...a,type:this.type??"checkbox"}:{...a,type:this.type??"checkbox",...n,...a.selectedRowKeys?{selectedRowKeys:a.selectedRowKeys}:{}}:this.type?this._finalConfigProps.rowSelection={...a,type:this.type}:this._finalConfigProps.rowSelection=!1,this._columns&&(this._columns=this._columns.map((e=>{if((0,w.isNil)(e.key)&&(e.key=e.dataIndex),e.sorter&&(e.sortOrder=this.sort===e.key&&!(0,w.isNil)(this.order)&&(this._fields.ascend===this.order?"ascend":"descend")),e.filters){var t;const i=(0,m.getHistory)(),s=new URLSearchParams(i.location.search).get(e.key)??(null===(t=(0,w.get)(this.filters,e.key))||void 0===t?void 0:t.join(","));(0,w.isNil)(s)||(0,w.isEmpty)(s)?(e.filtered=!1,e.filteredValue=[]):(e.filtered=!0,e.filteredValue=s.split(",").map((t=>{var i;return(null===(i=(0,w.find)(e.filters,(e=>String(e.value)===t)))||void 0===i?void 0:i.value)??t})))}return e})))}))}set columns(e){this._columns=e,this._render()}get columns(){return this._columns}set dataSource(e){var t;(this._isInSelect=!1,this._originalDataSource=e,this._dataSource=(0,w.cloneDeep)(this._fields.dataSource?(0,w.get)(e,this._fields.dataSource):e),this._pureSource=(0,w.cloneDeep)(this._dataSource),this.stripEmptyExpandableChildren)&&S((null===(t=this.configProps)||void 0===t||null===(t=t.expandable)||void 0===t?void 0:t.childrenColumnName)||"children",this._dataSource);(0,o.A)(As,this,(0,w.get)(e,this._fields.total)),this.page=(0,w.get)(e,"page")??this.page??1,this.pageSize=(0,w.get)(e,"page_size")??(0,w.get)(e,"pageSize")??this.pageSize??10,this._render()}get showCard(){return(0,h.A)(vi,this)}set showCard(e){(0,o.A)(vi,this,e)}get rowSelection(){return(0,h.A)(Si,this)}set rowSelection(e){(0,o.A)(Si,this,e)}get rowKey(){return(0,h.A)(Ei,this)}set rowKey(e){(0,o.A)(Ei,this,e)}get hiddenColumns(){return(0,h.A)(Mi,this)}set hiddenColumns(e){(0,o.A)(Mi,this,e)}get showSelectInfo(){return(0,h.A)(Wi,this)}set showSelectInfo(e){(0,o.A)(Wi,this,e)}get filters(){return(0,h.A)(Ri,this)}set filters(e){(0,o.A)(Ri,this,e)}get configProps(){return(0,h.A)(_i,this)}set configProps(e){(0,o.A)(_i,this,e)}get sort(){return(0,h.A)(Ni,this)}set sort(e){(0,o.A)(Ni,this,e)}get order(){return(0,h.A)(Di,this)}set order(e){(0,o.A)(Di,this,e)}get rowDisabledConfig(){return(0,h.A)(Bi,this)}set rowDisabledConfig(e){(0,o.A)(Bi,this,e)}get expandedRowBrick(){return(0,h.A)(Ii,this)}set expandedRowBrick(e){(0,o.A)(Ii,this,e)}get expandIcon(){return(0,h.A)(Ki,this)}set expandIcon(e){(0,o.A)(Ki,this,e)}get expandIconAsCell(){return(0,h.A)(Pi,this)}set expandIconAsCell(e){(0,o.A)(Pi,this,e)}get expandIconColumnIndex(){return(0,h.A)(zi,this)}set expandIconColumnIndex(e){(0,o.A)(zi,this,e)}get expandRowByClick(){return(0,h.A)(Ti,this)}set expandRowByClick(e){(0,o.A)(Ti,this,e)}get optimizedColumns(){return(0,h.A)(Ui,this)}set optimizedColumns(e){(0,o.A)(Ui,this,e)}get stripEmptyExpandableChildren(){return(0,h.A)(Fi,this)}set stripEmptyExpandableChildren(e){(0,o.A)(Fi,this,e)}get defaultExpandAllRows(){return(0,h.A)(Li,this)}set defaultExpandAllRows(e){(0,o.A)(Li,this,e)}get ellipsisInfo(){return(0,h.A)(Hi,this)}set ellipsisInfo(e){(0,o.A)(Hi,this,e)}get expandedRowKeys(){return(0,h.A)(qi,this)}set expandedRowKeys(e){(0,o.A)(qi,this,e)}get selectAllChildren(){return(0,h.A)(Oi,this)}set selectAllChildren(e){(0,o.A)(Oi,this,e)}get defaultSelectAll(){return(0,h.A)($i,this)}set defaultSelectAll(e){(0,o.A)($i,this,e)}get childrenColumnName(){return(0,h.A)(ji,this)}set childrenColumnName(e){(0,o.A)(ji,this,e)}get sortable(){return(0,h.A)(Qi,this)}set sortable(e){(0,o.A)(Qi,this,e)}set fields(e){this._fields={...this._fields,...e},this._render()}get frontSearch(){return(0,h.A)(Zi,this)}set frontSearch(e){(0,o.A)(Zi,this,e)}get frontSearchQuery(){return(0,h.A)(Vi,this)}set frontSearchQuery(e){(0,o.A)(Vi,this,e)}get exactSearch(){return(0,h.A)(Gi,this)}set exactSearch(e){(0,o.A)(Gi,this,e)}get frontSearchFilterKeys(){return(0,h.A)(Yi,this)}set frontSearchFilterKeys(e){(0,o.A)(Yi,this,e)}get page(){return(0,h.A)(Ji,this)}set page(e){(0,o.A)(Ji,this,e)}get pageSize(){return(0,h.A)(Xi,this)}set pageSize(e){(0,o.A)(Xi,this,e)}get scrollConfigs(){return(0,h.A)(es,this)}set scrollConfigs(e){(0,o.A)(es,this,e)}get qField(){return(0,h.A)(ts,this)}set qField(e){(0,o.A)(ts,this,e)}get tableDraggable(){return(0,h.A)(is,this)}set tableDraggable(e){(0,o.A)(is,this,e)}get zebraPattern(){return(0,h.A)(ss,this)}set zebraPattern(e){(0,o.A)(ss,this,e)}get storeCheckedByUrl(){return(0,h.A)(as,this)}set storeCheckedByUrl(e){(0,o.A)(as,this,e)}get extraRows(){return(0,h.A)(ns,this)}set extraRows(e){(0,o.A)(ns,this,e)}get autoSelectParentWhenAllChildrenSelected(){return(0,h.A)(rs,this)}set autoSelectParentWhenAllChildrenSelected(e){(0,o.A)(rs,this,e)}get thTransparent(){return(0,h.A)(ls,this)}set thTransparent(e){(0,o.A)(ls,this,e)}get showHeader(){return(0,h.A)(os,this)}set showHeader(e){(0,o.A)(os,this,e)}get pagination(){return(0,h.A)(hs,this)}set pagination(e){(0,o.A)(hs,this,e)}get size(){return(0,h.A)(ds,this)}set size(e){(0,o.A)(ds,this,e)}get type(){return(0,h.A)(cs,this)}set type(e){(0,o.A)(cs,this,e)}get shouldUpdateUrlParams(){return(0,h.A)(ps,this)}set shouldUpdateUrlParams(e){(0,o.A)(ps,this,e)}get shouldRenderWhenUrlParamsUpdate(){return(0,h.A)(us,this)}set shouldRenderWhenUrlParamsUpdate(e){(0,o.A)(us,this,e)}get processedDataSource(){return this._dataSource}get processConfigProps(){return this._finalConfigProps}get processedColumns(){return this.getModifyColumns()}get selectedRowKeys(){return(0,h.A)(gs,this)}set selectedRowKeys(e){(0,o.A)(gs,this,e)}filterSourceData(e){const t=this.exactSearch?e.detail.q.trim():e.detail.q.trim().toLowerCase();if(this.shouldUpdateUrlParams){const e=(0,m.getHistory)(),i=new URLSearchParams(e.location.search);i.set("page","1"),t?(i.set(this.qField,t),e.push(`?${i}`,{notify:!this.frontSearch})):(i.delete(this.qField),e.push(`?${i}`,{notify:!this.frontSearch})),this.page=1}this.frontSearchQuery=t}handleFrontendDataChange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.shouldUpdateUrlParams){const e=(0,m.getHistory)(),t=new URLSearchParams(e.location.search);this.frontSearchQuery=t.get(this.qField)}let i=[];i=this.handleFrontendFilterSource(e,this.frontSearchQuery||"",t);const s=(0,w.isNil)(this.order)?null:this._fields.ascend===this.order?"ascend":"descend";return i=this.handleFrontendSorter(i,{columnKey:this.sort,order:s}),i=this.handleFrontendFilters(i),(0,o.A)(As,this,i.length),i}handleFrontendFilterSource(e,t,i,s){if(!t)return e;const a=[];return s||(s=this.frontSearchFilterKeys||i.map((e=>e.dataIndex))),e.forEach((e=>{var n;const r=e[this.childrenColumnName];if(r){const n=this.handleFrontendFilterSource(r,t,i,s);if(n.length>0)return void a.push({...e,[this.childrenColumnName]:n})}(null===(n=s)||void 0===n?void 0:n.some((i=>{const s=(0,w.get)(e,i);return!(0,w.isNil)(s)&&(this.exactSearch?s===t:JSON.stringify(s).toLowerCase().includes(t))})))&&a.push(e)})),a}handleFrontendSorter(e,t){const i=e||[],{columnKey:s,order:a}=t;if(!s||!a)return e;let n=1;return"descend"===a?n=-1:"ascend"===a&&(n=1),void 0!==n&&(i.sort(((e,t)=>{const i=(0,w.get)(e,s),a=(0,w.get)(t,s);if((0,w.isNil)(i)){if(!(0,w.isNil)(a))return 1}else if((0,w.isNil)(a))return-1;return i==a?0:i>a?n:-n})),i.forEach((e=>{const i=e[this.childrenColumnName];i&&this.handleFrontendSorter(i,t)}))),i}handleFrontendFilters(e){let t=e||[];const i=(0,w.map)(this.filters,((e,t)=>({key:t,value:e}))).filter((e=>!(0,w.isNil)(e.value)&&0!==e.value.length));return t=t.filter((e=>(0,w.every)(i,(t=>{var i;return(null===(i=t.value)||void 0===i?void 0:i.includes((0,w.get)(e,t.key)))??!0})))),t}frontendSearch(e,t,i){this.sort=(0,w.isNil)(i.order)?null:i.columnKey,this.order=(0,w.isNil)(i.order)?null:this._fields[i.order]}expandAll(){const e=[],t=this._getRowKey();this._dataSource&&C(this._dataSource,t,this.childrenColumnName,e),this.expandedRowKeys=e}getModifyColumns(){let e=this._columns;return this._columns&&this.hiddenColumns&&(e=this._columns.filter((e=>{var t;return!(null!==(t=this.hiddenColumns)&&void 0!==t&&t.includes(e.dataIndex??e.key))}))),!1===this.sortable&&(e=(0,w.map)(e,(e=>(e.sorter=!1,e)))),e}render(){return this.frontSearch&&(this._dataSource=this.handleFrontendDataChange(this._pureSource,this._columns)),this._initConfigProps(),p().createElement(j,{shadowRoot:this.shadowRoot,dataSource:this._dataSource||[],columns:this.getModifyColumns(),configProps:this._finalConfigProps,error:this._error,onChange:this._handleOnChange,showCard:this.showCard,showHeader:this.showHeader,expandedRowBrick:this.expandedRowBrick,expandIconAsCell:this.expandIconAsCell,expandIconColumnIndex:this.expandIconColumnIndex,expandRowByClick:this.expandRowByClick,defaultExpandAllRows:this.defaultExpandAllRows,onExpand:this._handleOnExpand,onExpandedRowsChange:this._handleOnExpandedRowsChange,expandedRowKeys:this.expandedRowKeys,rowKey:this._getRowKey(),childrenColumnName:this.childrenColumnName,tableDraggable:this.tableDraggable||this.draggable,onDrag:this._handleOnDrag,zebraPattern:this.zebraPattern,expandIcon:this.expandIcon,scroll:this.scrollConfigs,optimizedColumns:this.optimizedColumns,ellipsisInfo:this.ellipsisInfo,thTransparent:this.thTransparent,xSmallSizeTable:"x-small"==this.size})}_test_only_getOriginalDataSource(){return this._originalDataSource}updateData(e){this._dataSource=e.detail,this._error=null,this._render()}updateError(e){this._error=e.detail,this._render()}set selectUpdateEventName(e){this._selectUpdateEventName=e}set selectUpdateEventDetailKeys(e){this._selectUpdateEventDetailKeys=e}set selectUpdateEventDetailField(e){this._selectUpdateEventDetailField=e}set selectUpdateEventDetailExtra(e){this._selectUpdateEventDetailExtra=e}}Q=ws,({e:[G,Y,J,X,ee,te,ie,se,ae,ne,re,le,oe,he,de,ce,pe,ue,Ae,ge,we,me,ye,fe,be,ke,xe,Ce,ve,Se,Ee,Me,We,Re,_e,Ne,De,Be,Ie,Ke,Pe,ze,Te,Ue,Fe,Le,He,qe,Oe,$e,je,Qe,Ze,Ve,Ge,Ye,Je,Xe,et,tt,it,st,at,nt,rt,lt,ot,ht,dt,ct,pt,ut,At,gt,wt,mt,yt,ft,bt,kt,xt,Ct,vt,St,Et,Mt,Wt,Rt,_t,Nt,Dt,Bt,It,Kt,Pt,zt,Tt,Ut,Ft,Lt,Ht,qt,Ot,$t,jt,Qt,Zt,Vt,Gt,Yt,Jt,Xt,ei,ti,ii,si,ai,ni,ri,li,oi,hi,Z],c:[Ai,V]}=(0,d.A)(Q,[di("eo-table",{styleTexts:[g.A],alias:["advanced.general-table"]})],[[pi({type:"page.update"}),1,"pageUpdate",e=>(0,h.A)(gi,e),(e,t)=>(0,o.A)(gi,e,t)],[pi({type:"filter.update"}),1,"filterUpdate",e=>(0,h.A)(mi,e),(e,t)=>(0,o.A)(mi,e,t)],[pi({type:"select.update"}),1,"selectUpdate",e=>(0,h.A)(yi,e),(e,t)=>(0,o.A)(yi,e,t)],[pi({type:"select.row.keys.update"}),1,"selectRowKeysUpdate",e=>(0,h.A)(fi,e),(e,t)=>(0,o.A)(fi,e,t)],[pi({type:"sort.update",cancelable:!0}),1,"sortUpdate",e=>(0,h.A)(bi,e),(e,t)=>(0,o.A)(bi,e,t)],[pi({type:"row.expand"}),1,"rowExpand",e=>(0,h.A)(ki,e),(e,t)=>(0,o.A)(ki,e,t)],[pi({type:"expand.rows.change"}),1,"expandRowsChange",e=>(0,h.A)(xi,e),(e,t)=>(0,o.A)(xi,e,t)],[pi({type:"row.drag"}),1,"rowDrag",e=>(0,h.A)(Ci,e),(e,t)=>(0,o.A)(Ci,e,t)],[ci({type:Boolean}),1,"showCard"],[ci({attribute:!1}),1,"rowSelection"],[ci(),1,"rowKey"],[ci({attribute:!1}),1,"hiddenColumns"],[ci({type:Boolean}),1,"showSelectInfo"],[ci({attribute:!1}),1,"filters"],[ci({attribute:!1}),1,"configProps"],[ci(),1,"sort"],[ci({attribute:!1}),1,"order"],[ci({attribute:!1}),1,"rowDisabledConfig"],[ci({attribute:!1}),1,"expandedRowBrick"],[ci({attribute:!1}),1,"expandIcon"],[ci({attribute:!1}),1,"expandIconAsCell"],[ci({type:Number}),1,"expandIconColumnIndex"],[ci({type:Boolean}),1,"expandRowByClick"],[ci({attribute:!1}),1,"optimizedColumns"],[ci({attribute:!1}),1,"stripEmptyExpandableChildren"],[ci({type:Boolean}),1,"defaultExpandAllRows"],[ci({type:Boolean}),1,"ellipsisInfo"],[ci({attribute:!1}),1,"expandedRowKeys"],[ci({type:Boolean}),1,"selectAllChildren"],[ci({type:Boolean}),1,"defaultSelectAll"],[ci({attribute:!1}),1,"childrenColumnName"],[ci({attribute:!1}),1,"sortable"],[ci({type:Boolean}),1,"frontSearch"],[ci(),1,"frontSearchQuery"],[ci({type:Boolean}),1,"exactSearch"],[ci({attribute:!1}),1,"frontSearchFilterKeys"],[ci({type:Number}),1,"page"],[ci({type:Number}),1,"pageSize"],[ci({attribute:!1}),1,"scrollConfigs"],[ci(),1,"qField"],[ci({type:Boolean}),1,"tableDraggable"],[ci({type:Boolean}),1,"zebraPattern"],[ci({type:Boolean}),1,"storeCheckedByUrl"],[ci({attribute:!1}),1,"extraRows"],[ci({type:Boolean}),1,"autoSelectParentWhenAllChildrenSelected"],[ci({type:Boolean}),1,"thTransparent"],[ci({type:Boolean}),1,"showHeader"],[ci({attribute:!1}),1,"pagination"],[ci(),1,"size"],[ci({attribute:!1}),1,"type"],[ci({type:Boolean}),1,"shouldUpdateUrlParams"],[ci({type:Boolean}),1,"shouldRenderWhenUrlParamsUpdate"],[ci({attribute:!1}),1,"selectedRowKeys"],[ui(),2,"filterSourceData"],[ui(),2,"expandAll"]],0,(e=>As.has((0,r.A)(e))),A.ReactNextElement)),V();var ms,ys=i(16768),fs=i(97039),bs=i(99492);let ks,xs,Cs,vs,Ss,Es,Ms,Ws,Rs;const{method:_s,property:Ns}=(0,u.createDecorators)();var Ds=new WeakMap,Bs=new WeakSet,Is=new WeakMap,Ks=new WeakMap,Ps=new WeakMap,zs=new WeakMap,Ts=new WeakMap,Us=new WeakMap;class Fs extends A.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Bs),(0,n.A)(this,Ds,(ks(this),!1)),(0,n.A)(this,Is,"normal"),(0,n.A)(this,Ks,!1),(0,n.A)(this,Ps,xs(this)),(0,n.A)(this,zs,(Cs(this),vs(this))),(0,n.A)(this,Ts,(Ss(this),Es(this))),(0,n.A)(this,Us,(Ms(this),Ws(this))),Rs(this)}get isFormItemElement(){return!0}set validateState(e){(0,bs.A)(Bs,Os,this,e),this._render()}get validateState(){return(0,l.A)(Bs,this,qs)}set notRender(e){this.hidden=e,(0,bs.A)(Bs,Hs,this,e),this._render()}get notRender(){return(0,l.A)(Bs,this,Ls)}get $bindFormItem(){return(0,l.A)(Bs,this,$s)}set $bindFormItem(e){(0,bs.A)(Bs,js,this,e),this._render()}get helpBrick(){return(0,h.A)(Ps,this)}set helpBrick(e){(0,o.A)(Ps,this,e)}get labelBrick(){return(0,h.A)(zs,this)}set labelBrick(e){(0,o.A)(zs,this,e)}get labelCol(){return(0,h.A)(Ts,this)}set labelCol(e){(0,o.A)(Ts,this,e)}get wrapperCol(){return(0,h.A)(Us,this)}set wrapperCol(e){(0,o.A)(Us,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function Ls(e){return(0,h.A)(Ds,e)}function Hs(e,t){(0,o.A)(Ds,e,t)}function qs(e){return(0,h.A)(Is,e)}function Os(e,t){(0,o.A)(Is,e,t)}function $s(e){return(0,h.A)(Ks,e)}function js(e,t){(0,o.A)(Ks,e,t)}ms=Fs,[xs,Cs,vs,Ss,Es,Ms,Ws,Rs,ks]=(0,d.A)(ms,[],[[Ns({attribute:!1}),1,"helpBrick"],[Ns({attribute:!1}),1,"labelBrick"],[Ns({attribute:!1}),1,"labelCol"],[Ns({attribute:!1}),1,"wrapperCol"],[_s(),2,"setNotRender"],[_s(),2,"getFormElement"]],0,void 0,A.ReactNextElement).e;var Qs,Zs=i(71058);let Vs,Gs,Ys,Js,Xs,ea,ta,ia,sa,aa,na,ra,la,oa,ha,da,ca,pa,ua,Aa,ga,wa,ma,ya,fa,ba,ka,xa,Ca,va,Sa,Ea,Ma,Wa,Ra,_a,Na,Da,Ba,Ia,Ka;const{defineElement:Pa,property:za,event:Ta}=(0,u.createDecorators)(),Ua=(0,A.wrapBrick)("eo-icon"),Fa=(0,A.wrapBrick)("eo-form-item");let La;var Ha=new WeakMap,qa=new WeakMap,Oa=new WeakMap,$a=new WeakMap,ja=new WeakMap,Qa=new WeakMap,Za=new WeakMap,Va=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Ja=new WeakMap,Xa=new WeakMap,en=new WeakMap,tn=new WeakMap,sn=new WeakMap,an=new WeakMap,nn=new WeakMap,rn=new WeakMap,ln=new WeakMap,on=new WeakSet;function hn(e){const{shadowRoot:t,options:i,fieldNames:s,value:a,placeholder:n,disabled:r,multiple:l,allowClear:o,showSearch:h,expandTrigger:d,size:u,limit:A,popupPlacement:g,cascaderStyle:w,suffixIcon:m,maxTagCount:y,onChange:f}=e,k=(0,I.useCurrentTheme)(),x=(0,c.useMemo)((()=>(0,K.VC)()),[]);return p().createElement(b.Ay,{theme:{algorithm:"dark-v2"===k?ys.A.darkAlgorithm:ys.A.defaultAlgorithm}},p().createElement(K.N7,{container:t,cache:x},p().createElement(fs.A,{getPopupContainer:e=>e.parentElement,allowClear:o,disabled:r,multiple:l,expandTrigger:d,fieldNames:s,placeholder:n,size:u,showSearch:h&&{limit:A,filter:(e,t)=>{const i=(null==s?void 0:s.label)||"label",a=e.split(" ").filter((e=>e)).map((e=>e.toLocaleLowerCase()));for(let e=0;e<a.length;e++)if(!t.some((t=>t[i].toLowerCase().includes(a[e]))))return!1;return!0}},placement:g,style:w,suffixIcon:m&&p().createElement(Ua,m),maxTagCount:y,value:a,options:i,onChange:(e,t)=>null==f?void 0:f(e,t)})))}Qs=class extends Fs{constructor(){super(...arguments),(0,a.A)(this,on),(0,n.A)(this,Ha,Gs(this)),(0,n.A)(this,qa,(Ys(this),Js(this))),(0,n.A)(this,Oa,(Xs(this),ea(this))),(0,n.A)(this,$a,(ta(this),ia(this))),(0,n.A)(this,ja,(sa(this),aa(this,{label:"label",value:"value",children:"children"}))),(0,n.A)(this,Qa,(na(this),ra(this))),(0,n.A)(this,Za,(la(this),oa(this))),(0,n.A)(this,Va,(ha(this),da(this))),(0,n.A)(this,Ga,(ca(this),pa(this))),(0,n.A)(this,Ya,(ua(this),Aa(this,!0))),(0,n.A)(this,Ja,(ga(this),wa(this,!0))),(0,n.A)(this,Xa,(ma(this),ya(this))),(0,n.A)(this,en,(fa(this),ba(this,"click"))),(0,n.A)(this,tn,(ka(this),xa(this,"bottomLeft"))),(0,n.A)(this,sn,(Ca(this),va(this))),(0,n.A)(this,an,(Sa(this),Ea(this,50))),(0,n.A)(this,nn,(Ma(this),Wa(this))),(0,n.A)(this,rn,(Ra(this),_a(this))),(0,n.A)(this,ln,(Na(this),Da(this))),(0,s.A)(this,"handleOnChange",(Ka(this),(e,t)=>{this.value=e,Promise.resolve().then((()=>{(0,l.A)(on,this,Ba).emit({value:e,selectedOptions:t})}))}))}get name(){return(0,h.A)(Ha,this)}set name(e){(0,o.A)(Ha,this,e)}get label(){return(0,h.A)(qa,this)}set label(e){(0,o.A)(qa,this,e)}get required(){return(0,h.A)(Oa,this)}set required(e){(0,o.A)(Oa,this,e)}get options(){return(0,h.A)($a,this)}set options(e){(0,o.A)($a,this,e)}get fieldNames(){return(0,h.A)(ja,this)}set fieldNames(e){(0,o.A)(ja,this,e)}get value(){return(0,h.A)(Qa,this)}set value(e){(0,o.A)(Qa,this,e)}get placeholder(){return(0,h.A)(Za,this)}set placeholder(e){(0,o.A)(Za,this,e)}get multiple(){return(0,h.A)(Va,this)}set multiple(e){(0,o.A)(Va,this,e)}get disabled(){return(0,h.A)(Ga,this)}set disabled(e){(0,o.A)(Ga,this,e)}get allowClear(){return(0,h.A)(Ya,this)}set allowClear(e){(0,o.A)(Ya,this,e)}get showSearch(){return(0,h.A)(Ja,this)}set showSearch(e){(0,o.A)(Ja,this,e)}get suffixIcon(){return(0,h.A)(Xa,this)}set suffixIcon(e){(0,o.A)(Xa,this,e)}get expandTrigger(){return(0,h.A)(en,this)}set expandTrigger(e){(0,o.A)(en,this,e)}get popupPlacement(){return(0,h.A)(tn,this)}set popupPlacement(e){(0,o.A)(tn,this,e)}get size(){return(0,h.A)(sn,this)}set size(e){(0,o.A)(sn,this,e)}get limit(){return(0,h.A)(an,this)}set limit(e){(0,o.A)(an,this,e)}get maxTagCount(){return(0,h.A)(nn,this)}set maxTagCount(e){(0,o.A)(nn,this,e)}get cascaderStyle(){return(0,h.A)(rn,this)}set cascaderStyle(e){(0,o.A)(rn,this,e)}render(){return p().createElement(Fa,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,notRender:this.notRender,trigger:"handleOnChange"},p().createElement(hn,{shadowRoot:this.shadowRoot,options:this.options,fieldNames:this.fieldNames,value:this.value,multiple:this.multiple,placeholder:this.placeholder,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,expandTrigger:this.expandTrigger,suffixIcon:this.suffixIcon,size:this.size,limit:this.limit,popupPlacement:this.popupPlacement,maxTagCount:this.maxTagCount,cascaderStyle:this.cascaderStyle,onChange:this.handleOnChange}))}},({e:[Gs,Ys,Js,Xs,ea,ta,ia,sa,aa,na,ra,la,oa,ha,da,ca,pa,ua,Aa,ga,wa,ma,ya,fa,ba,ka,xa,Ca,va,Sa,Ea,Ma,Wa,Ra,_a,Na,Da,Ba,Ia,Ka],c:[La,Vs]}=(0,d.A)(Qs,[Pa("eo-cascader",{alias:["advanced.general-cascader"],styleTexts:[Zs.A]})],[[za(),1,"name"],[za(),1,"label"],[za({type:Boolean}),1,"required"],[za({attribute:!1}),1,"options"],[za({attribute:!1}),1,"fieldNames"],[za({attribute:!1}),1,"value"],[za(),1,"placeholder"],[za({type:Boolean}),1,"multiple"],[za({type:Boolean}),1,"disabled"],[za({type:Boolean}),1,"allowClear"],[za({type:Boolean}),1,"showSearch"],[za({attribute:!1}),1,"suffixIcon"],[za(),1,"expandTrigger"],[za(),1,"popupPlacement"],[za(),1,"size"],[za({type:Number}),1,"limit"],[za({attribute:!1}),1,"maxTagCount"],[za({attribute:!1}),1,"cascaderStyle"],[Ta({type:"cascader.change"}),1,"changeEvent",e=>(0,h.A)(ln,e),(e,t)=>(0,o.A)(ln,e,t)]],0,(e=>on.has((0,r.A)(e))),Fs)),Vs();var dn,cn=i(81634),pn=i(49385);let un,An,gn,wn,mn,yn,fn,bn,kn,xn,Cn,vn,Sn,En,Mn,Wn,Rn,_n,Nn,Dn,Bn,In,Kn,Pn,zn,Tn,Un,Fn,Ln,Hn,qn,On,$n,jn,Qn,Zn,Vn,Gn,Yn,Jn,Xn,er,tr,ir,sr,ar,nr,rr,lr,or,hr,dr,cr,pr,ur,Ar,gr,wr,mr,yr,fr,br,kr,xr,Cr,vr,Sr,Er,Mr,Wr;i(34612);const{defineElement:Rr,property:_r,method:Nr,event:Dr}=(0,u.createDecorators)();let Br;var Ir=new WeakMap,Kr=new WeakMap,Pr=new WeakMap,zr=new WeakMap,Tr=new WeakMap,Ur=new WeakMap,Fr=new WeakMap,Lr=new WeakMap,Hr=new WeakMap,qr=new WeakMap,Or=new WeakMap,$r=new WeakMap,jr=new WeakMap,Qr=new WeakMap,Zr=new WeakMap,Vr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Jr=new WeakMap,Xr=new WeakMap,el=new WeakMap,tl=new WeakMap,il=new WeakMap,sl=new WeakSet,al=new WeakMap,nl=new WeakMap,rl=new WeakMap,ll=new WeakMap,ol=new WeakMap,hl=new WeakMap,dl=new WeakMap,cl=new WeakMap,pl=new WeakMap,ul=new WeakMap,Al=new WeakMap,gl=new WeakMap,wl=new WeakMap;class ml extends A.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,sl),(0,n.A)(this,Ir,(un(this),(0,c.createRef)())),(0,n.A)(this,Kr,gn(this,"key")),(0,n.A)(this,Pr,(wn(this),mn(this))),(0,n.A)(this,zr,(yn(this),fn(this))),(0,n.A)(this,Tr,(bn(this),kn(this))),(0,n.A)(this,Ur,(xn(this),Cn(this))),(0,n.A)(this,Fr,(vn(this),Sn(this))),(0,n.A)(this,Lr,(En(this),Mn(this))),(0,n.A)(this,Hr,(Wn(this),Rn(this))),(0,n.A)(this,qr,(_n(this),Nn(this))),(0,n.A)(this,Or,(Dn(this),Bn(this))),(0,n.A)(this,$r,(In(this),Kn(this))),(0,n.A)(this,jr,(Pn(this),zn(this))),(0,n.A)(this,Qr,(Tn(this),Un(this))),(0,n.A)(this,Zr,(Fn(this),Ln(this,"children"))),(0,n.A)(this,Vr,(Hn(this),qn(this))),(0,n.A)(this,Gr,(On(this),$n(this))),(0,n.A)(this,Yr,(jn(this),Qn(this,"large"))),(0,n.A)(this,Jr,(Zn(this),Vn(this,!0))),(0,n.A)(this,Xr,void Gn(this)),(0,n.A)(this,el,Yn(this,{x:!0})),(0,n.A)(this,tl,(Jn(this),Xn(this))),(0,n.A)(this,il,(er(this),tr(this))),(0,n.A)(this,al,(ar(this),e=>{(0,l.A)(sl,this,ir).emit(e)})),(0,n.A)(this,nl,nr(this)),(0,n.A)(this,rl,(or(this),e=>{(0,l.A)(sl,this,rr).emit(e)})),(0,n.A)(this,ll,hr(this)),(0,n.A)(this,ol,(pr(this),e=>{(0,l.A)(sl,this,dr).emit(e)})),(0,n.A)(this,hl,ur(this)),(0,n.A)(this,dl,(wr(this),e=>{(0,l.A)(sl,this,Ar).emit(e)})),(0,n.A)(this,cl,mr(this)),(0,n.A)(this,pl,(br(this),e=>{(0,l.A)(sl,this,yr).emit(e)})),(0,n.A)(this,ul,kr(this)),(0,n.A)(this,Al,(vr(this),e=>{(0,l.A)(sl,this,xr).emit(e)})),(0,n.A)(this,gl,Sr(this)),(0,n.A)(this,wl,(Wr(this),e=>{(0,l.A)(sl,this,Er).emit(e)}))}get rowKey(){return(0,h.A)(Kr,this)}set rowKey(e){(0,o.A)(Kr,this,e)}get columns(){return(0,h.A)(Pr,this)}set columns(e){(0,o.A)(Pr,this,e)}get cell(){return(0,h.A)(zr,this)}set cell(e){(0,o.A)(zr,this,e)}get dataSource(){return(0,h.A)(Tr,this)}set dataSource(e){(0,o.A)(Tr,this,e)}get frontSearch(){return(0,h.A)(Ur,this)}set frontSearch(e){(0,o.A)(Ur,this,e)}get pagination(){return(0,h.A)(Fr,this)}set pagination(e){(0,o.A)(Fr,this,e)}get multiSort(){return(0,h.A)(Lr,this)}set multiSort(e){(0,o.A)(Lr,this,e)}get sort(){return(0,h.A)(Hr,this)}set sort(e){(0,o.A)(Hr,this,e)}get rowSelection(){return(0,h.A)(qr,this)}set rowSelection(e){(0,o.A)(qr,this,e)}get selectedRowKeys(){return(0,h.A)(Or,this)}set selectedRowKeys(e){(0,o.A)(Or,this,e)}get hiddenColumns(){return(0,h.A)($r,this)}set hiddenColumns(e){(0,o.A)($r,this,e)}get expandable(){return(0,h.A)(jr,this)}set expandable(e){(0,o.A)(jr,this,e)}get expandedRowKeys(){return(0,h.A)(Qr,this)}set expandedRowKeys(e){(0,o.A)(Qr,this,e)}get childrenColumnName(){return(0,h.A)(Zr,this)}set childrenColumnName(e){(0,o.A)(Zr,this,e)}get rowDraggable(){return(0,h.A)(Vr,this)}set rowDraggable(e){(0,o.A)(Vr,this,e)}get searchFields(){return(0,h.A)(Gr,this)}set searchFields(e){(0,o.A)(Gr,this,e)}get size(){return(0,h.A)(Yr,this)}set size(e){(0,o.A)(Yr,this,e)}get showHeader(){return(0,h.A)(Jr,this)}set showHeader(e){(0,o.A)(Jr,this,e)}get bordered(){return(0,h.A)(Xr,this)}set bordered(e){(0,o.A)(Xr,this,e)}get scrollConfig(){return(0,h.A)(el,this)}set scrollConfig(e){(0,o.A)(el,this,e)}get optimizedColumns(){return(0,h.A)(tl,this)}set optimizedColumns(e){(0,o.A)(tl,this,e)}search(e){var t;null===(t=(0,h.A)(Ir,this).current)||void 0===t||t.search(e)}render(){return p().createElement(pn.F,{ref:(0,h.A)(Ir,this),shadowRoot:this.shadowRoot,rowKey:this.rowKey,columns:this.columns,cell:this.cell,dataSource:this.dataSource,frontSearch:this.frontSearch,pagination:this.pagination,multiSort:this.multiSort,sort:this.sort,rowSelection:this.rowSelection,selectedRowKeys:this.selectedRowKeys,hiddenColumns:this.hiddenColumns,expandable:this.expandable,expandedRowKeys:this.expandedRowKeys,childrenColumnName:this.childrenColumnName,rowDraggable:this.rowDraggable,searchFields:this.searchFields,size:this.size,showHeader:this.showHeader,bordered:this.bordered,scrollConfig:this.scrollConfig,optimizedColumns:this.optimizedColumns,onPageChange:(0,h.A)(al,this),onPageSizeChange:(0,h.A)(rl,this),onSort:(0,h.A)(ol,this),onRowSelect:(0,h.A)(dl,this),onRowExpand:(0,h.A)(pl,this),onExpandedRowsChange:(0,h.A)(Al,this),onRowDrag:(0,h.A)(wl,this)})}}dn=ml,({e:[gn,wn,mn,yn,fn,bn,kn,xn,Cn,vn,Sn,En,Mn,Wn,Rn,_n,Nn,Dn,Bn,In,Kn,Pn,zn,Tn,Un,Fn,Ln,Hn,qn,On,$n,jn,Qn,Zn,Vn,Gn,Yn,Jn,Xn,er,tr,ir,sr,ar,nr,rr,lr,or,hr,dr,cr,pr,ur,Ar,gr,wr,mr,yr,fr,br,kr,xr,Cr,vr,Sr,Er,Mr,Wr,un],c:[Br,An]}=(0,d.A)(dn,[Rr("eo-next-table",{styleTexts:[cn.A]})],[[_r(),1,"rowKey"],[_r({attribute:!1}),1,"columns"],[_r({attribute:!1}),1,"cell"],[_r({attribute:!1}),1,"dataSource"],[_r({type:Boolean}),1,"frontSearch"],[_r({attribute:!1}),1,"pagination"],[_r({type:Boolean}),1,"multiSort"],[_r({attribute:!1}),1,"sort"],[_r({attribute:!1}),1,"rowSelection"],[_r({attribute:!1}),1,"selectedRowKeys"],[_r({attribute:!1}),1,"hiddenColumns"],[_r({attribute:!1}),1,"expandable"],[_r({attribute:!1}),1,"expandedRowKeys"],[_r(),1,"childrenColumnName"],[_r({type:Boolean}),1,"rowDraggable"],[_r({attribute:!1}),1,"searchFields"],[_r(),1,"size"],[_r({type:Boolean}),1,"showHeader"],[_r({attribute:!1}),1,"scrollConfig"],[_r({attribute:!1}),1,"optimizedColumns"],[Nr(),2,"search"],[Dr({type:"page.change"}),1,"pageChangeEvent",e=>(0,h.A)(il,e),(e,t)=>(0,o.A)(il,e,t)],[Dr({type:"page.size.change"}),1,"pageSizeChangeEvent",e=>(0,h.A)(nl,e),(e,t)=>(0,o.A)(nl,e,t)],[Dr({type:"sort.change"}),1,"sortChangeEvent",e=>(0,h.A)(ll,e),(e,t)=>(0,o.A)(ll,e,t)],[Dr({type:"row.select"}),1,"rowSelectEvent",e=>(0,h.A)(hl,e),(e,t)=>(0,o.A)(hl,e,t)],[Dr({type:"row.expand"}),1,"rowExpandEvent",e=>(0,h.A)(cl,e),(e,t)=>(0,o.A)(cl,e,t)],[Dr({type:"expanded.rows.change"}),1,"expandedRowsChangeEvent",e=>(0,h.A)(ul,e),(e,t)=>(0,o.A)(ul,e,t)],[Dr({type:"row.drag"}),1,"rowDragEvent",e=>(0,h.A)(gl,e),(e,t)=>(0,o.A)(gl,e,t)]],0,(e=>wl.has((0,r.A)(e))),A.ReactNextElement)),An();var yl,fl=i(45833),bl=i(91116);let kl,xl,Cl,vl,Sl,El,Ml,Wl,Rl,_l,Nl,Dl,Bl,Il,Kl,Pl,zl;const{defineElement:Tl,property:Ul,event:Fl}=(0,u.createDecorators)(),Ll=(0,A.wrapBrick)("eo-button"),Hl=(0,A.wrapBrick)("eo-icon"),ql=(0,A.wrapBrick)("eo-checkbox",{onChange:"change"});let Ol;var $l=new WeakMap,jl=new WeakMap,Ql=new WeakMap,Zl=new WeakMap,Vl=new WeakMap,Gl=new WeakSet,Yl=new WeakMap,Jl=new WeakMap,Xl=new WeakMap;class eo extends A.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Gl),(0,n.A)(this,$l,xl(this)),(0,n.A)(this,jl,(Cl(this),vl(this))),(0,n.A)(this,Ql,(Sl(this),El(this))),(0,n.A)(this,Zl,(Ml(this),Wl(this))),(0,n.A)(this,Vl,(Rl(this),_l(this))),(0,n.A)(this,Yl,(Bl(this),e=>{(0,l.A)(Gl,this,Nl).emit(e)})),(0,n.A)(this,Jl,Il(this)),(0,n.A)(this,Xl,(zl(this),()=>{(0,l.A)(Gl,this,Kl).emit()}))}get cardTitle(){return(0,h.A)($l,this)}set cardTitle(e){(0,o.A)($l,this,e)}get isEdit(){return(0,h.A)(jl,this)}set isEdit(e){(0,o.A)(jl,this,e)}get layouts(){return(0,h.A)(Ql,this)}set layouts(e){(0,o.A)(Ql,this,e)}get componentList(){return(0,h.A)(Zl,this)}set componentList(e){(0,o.A)(Zl,this,e)}render(){return p().createElement(io,{cardTitle:this.cardTitle,layouts:this.layouts,componentList:this.componentList,isEdit:this.isEdit,onSave:(0,h.A)(Yl,this),onCancel:(0,h.A)(Xl,this)})}}yl=eo,({e:[xl,Cl,vl,Sl,El,Ml,Wl,Rl,_l,Nl,Dl,Bl,Il,Kl,Pl,zl],c:[Ol,kl]}=(0,d.A)(yl,[Tl("eo-workbench-layout",{styleTexts:[bl.A]})],[[Ul(),1,"cardTitle"],[Ul({type:Boolean}),1,"isEdit"],[Ul({attribute:!1}),1,"layouts"],[Ul({attribute:!1}),1,"componentList"],[Fl({type:"save"}),1,"saveLayoutEvent",e=>(0,h.A)(Vl,e),(e,t)=>(0,o.A)(Vl,e,t)],[Fl({type:"cancel"}),1,"cancelEvent",e=>(0,h.A)(Jl,e),(e,t)=>(0,o.A)(Jl,e,t)]],0,(e=>Xl.has((0,r.A)(e))),A.ReactNextElement)),kl();const to=e=>null!=e&&e.includes(":")?e.split(":")[0]:e;function io(e){let{cardTitle:t="卡片列表",layouts:i,componentList:s=[],isEdit:a,onSave:n,onCancel:r}=e;const l=(0,c.useMemo)((()=>(0,fl.WidthProvider)(fl.Responsive)),[]),o=(0,c.useRef)(null),h=(0,c.useRef)(),d=(0,c.useRef)(null),[u,A]=(0,c.useState)(i??[]),[g,w]=(0,c.useState)(3),[m,y]=(0,c.useState)(),f=(0,c.useCallback)((e=>{h.current||(h.current=e);let t=!0;for(let i=0;i<e.length;i++){const{x:s,w:a,y:n,h:r,i:l,minH:o}=e[i];if(a>1&&s>0){t=!1;break}if(1===a&&s<2){const t=e.find((e=>e.i!==l&&1===e.w&&e.y===n&&s<2));t&&(e[i].minH=e[i].minH??r,e[i].h=Math.max(t.h,r))}else e[i].h=o??r,e[i].minH=void 0}t?h.current=e:A((e=>null==e?void 0:e.map((e=>{var t;return{...null===(t=h.current)||void 0===t?void 0:t.find((t=>to(t.i)===to(e.i))),i:`${to(e.i)}:${Math.random()}`}}))))}),[]),b=(0,c.useCallback)((e=>{const t=e.detail.map((e=>e.value)),i=u.map((e=>to(e.i))),s=e.detail.filter((e=>!i.includes(e.key))).map((e=>({...e.position,x:e.w>1?0:2*u.length%g,y:1/0})));A((e=>e.filter((e=>t.includes(to(e.i)))).concat(s)))}),[u,g]),k=(0,c.useCallback)((()=>{null==n||n((h.current??[]).map((e=>({...e,i:to(e.i)}))))}),[n]),x=(0,c.useCallback)(((e,t)=>{var i;e.stopPropagation(),A((null===(i=h.current)||void 0===i?void 0:i.filter((e=>to(e.i)!==t.key)))??[])}),[]),C=e=>{e.preventDefault()},v=(0,c.useMemo)((()=>u.map((e=>{const t=s.find((t=>t.key===to(e.i)));return t?p().createElement("div",{key:e.i,"data-grid":{...t.position??{},...e},style:t.style,className:"drag-box"},a&&p().createElement("div",{className:"edit-mask",onMouseDown:C}),p().createElement(I.ReactUseBrick,{useBrick:t.useBrick}),a&&p().createElement(Hl,{icon:"delete",lib:"antd",className:"delete-icon",onClick:e=>x(e,t)})):null})).filter(Boolean)),[s,x,u,a]),S=(0,c.useMemo)((()=>s.map((e=>({...e,label:e.title,value:e.key})))),[s]),E=(0,c.useMemo)((()=>u.map((e=>to(e.i)))),[u]),M=(0,c.useCallback)((()=>{if(d&&a){var e;const{top:t}=(null===(e=d.current)||void 0===e||null===(e=e.getClientRects())||void 0===e?void 0:e[0])??{};void 0!==t&&y({height:document.body.clientHeight-t,overflow:"scroll"})}}),[a]);return(0,c.useEffect)((()=>{if(a)return M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M)}}),[a,M]),p().createElement("div",{className:"grid-layout-wrapper",ref:o},a&&p().createElement("div",{className:"component-wrapper"},p().createElement("div",{className:"component-title"},t),p().createElement("div",{className:"component-list"},p().createElement(ql,{options:S,value:E,onChange:b}),p().createElement("slot",{name:"toolbar"}))),p().createElement("div",{className:"layout-wrapper",ref:d,style:m},a&&p().createElement("div",{className:"actions-wrapper"},p().createElement(Ll,{type:"primary",onClick:k},"保存"),p().createElement(Ll,{danger:!0,onClick:()=>{A([])}},"清除"),p().createElement(Ll,{onClick:()=>{null==r||r()}},"取消")),p().createElement(l,{className:"layout",draggableCancel:".delete-icon,.edit-actions,.ingore-item",breakpoints:{lg:1300,md:1024,sm:768},rowHeight:1,cols:{lg:3,md:3,sm:1},isResizable:!1,isDraggable:a,onDrag:(e,t,i)=>{var s;const a=null===(s=o.current)||void 0===s?void 0:s.querySelector(".react-grid-placeholder");a&&(i.w>1&&i.x>0?!a.classList.contains("forbidden")&&a.classList.add("forbidden"):a.classList.contains("forbidden")&&a.classList.remove("forbidden"))},onLayoutChange:f,onBreakpointChange:(e,t)=>{w(t)}},v)))}var so=i(52681),ao=i(3688),no=i(28317),ro=i.n(no);function lo(e,t){const i=e?document.querySelector(`${e}`):document.body;if(!i)throw new Error(`target not found: ${e}`);return new Promise((function(e,s){ro()(i,{backgroundColor:t||null,useCORS:!0,allowTaint:!0,scale:window.devicePixelRatio<3?window.devicePixelRatio:2}).then((function(t){e(t)})).catch(s)}))}customElements.define("advanced.capture-snapshot",(0,so.createProviderClass)((async function(e){const{name:t,fileType:s,bucketName:a,selector:n,backgroundColor:r}=e;switch(s){case"image":{const e=await lo(n,r);if(a){const i=await function(e){return new Promise((function(t,i){e.toBlob((function(e){e?t(e):i()}))}))}(e),s=new File([i],`${t}.png`,{type:i.type}),n=await function(e,t){const i=new FormData;i.append("file",e,e.name);const s=`${(0,m.getBasePath)()}api/gateway/object_store.object_store.PutObject/api/v1/objectStore/bucket/${t}/object`;return ao.http.request(s,{method:"PUT",body:i})}(s,a);return function(e,t){return`${(0,m.getBasePath)()}api/gateway/logic.object_store_service/api/v1/objectStore/bucket/${e}/object/${t}`}(a,n.data.objectName)}await function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image";return new Promise(((i,s)=>{try{const s=e.toDataURL("image/png"),a=new Image;a.onload=function(){const e=document.createElement("canvas");e.width=a.width,e.height=a.height;const i=e.getContext("2d");null==i||i.drawImage(a,0,0,a.width,a.height);const s=e.toDataURL("image/png"),n=document.createElement("a");n.href=s,n.download=t;const r=new MouseEvent("click");n.dispatchEvent(r)},a.src=s,i("succeed")}catch(e){s("failed")}}))}(e,t)}break;case"pdf":{const{jsPDF:e}=await i.e(1576).then(i.bind(i,31576)),s=await lo(n,r),a=s.toDataURL("image/jpeg",1),l=new e(s.width>s.height?"landscape":"portrait","pt",[s.width,s.height]);l.addImage(a,"JPEG",0,0,s.width,s.height),await l.save(`${t}.pdf`,{returnPromise:!0});break}}})));var oo,ho=i(54299),co=i(56664),po=i(39138);let uo,Ao,go,wo,mo,yo,fo,bo,ko,xo,Co,vo,So,Eo,Mo,Wo,Ro,_o,No,Do,Bo,Io,Ko,Po,zo,To,Uo,Fo,Lo,Ho,qo,Oo,$o,jo,Qo,Zo,Vo,Go,Yo;const{defineElement:Jo,property:Xo,event:eh}=(0,u.createDecorators)();let th;var ih=new WeakMap,sh=new WeakMap,ah=new WeakMap,nh=new WeakMap,rh=new WeakMap,lh=new WeakMap,oh=new WeakMap,hh=new WeakMap,dh=new WeakMap,ch=new WeakMap,ph=new WeakMap,uh=new WeakMap,Ah=new WeakSet,gh=new WeakMap,wh=new WeakMap,mh=new WeakMap,yh=new WeakMap,fh=new WeakMap,bh=new WeakMap;class kh extends A.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ah),(0,n.A)(this,ih,Ao(this)),(0,n.A)(this,sh,(go(this),wo(this))),(0,n.A)(this,ah,(mo(this),yo(this))),(0,n.A)(this,nh,(fo(this),bo(this))),(0,n.A)(this,rh,(ko(this),xo(this))),(0,n.A)(this,lh,(Co(this),vo(this))),(0,n.A)(this,oh,(So(this),Eo(this))),(0,n.A)(this,hh,(Mo(this),Wo(this))),(0,n.A)(this,dh,(Ro(this),_o(this))),(0,n.A)(this,ch,(No(this),Do(this))),(0,n.A)(this,ph,(Bo(this),Io(this))),(0,n.A)(this,uh,(Ko(this),Po(this))),(0,n.A)(this,gh,(Uo(this),Fo(this))),(0,n.A)(this,wh,(qo(this),(e,t)=>{(0,l.A)(Ah,this,zo).emit(e),(0,l.A)(Ah,this,Lo).emit({checkedKeys:e,halfCheckedKeys:t.halfCheckedKeys})})),(0,n.A)(this,mh,Oo(this)),(0,n.A)(this,yh,(Qo(this),e=>{(0,l.A)(Ah,this,$o).emit(e)})),(0,n.A)(this,fh,Zo(this)),(0,n.A)(this,bh,(Yo(this),e=>{let{dragNode:t,node:i,dropPosition:s}=e;(0,l.A)(Ah,this,Vo).emit({dragNode:t,dropNode:i,dropPosition:s})}))}get dataSource(){return(0,h.A)(ih,this)}set dataSource(e){(0,o.A)(ih,this,e)}get checkable(){return(0,h.A)(sh,this)}set checkable(e){(0,o.A)(sh,this,e)}get selectable(){return(0,h.A)(ah,this)}set selectable(e){(0,o.A)(ah,this,e)}get defaultExpandAll(){return(0,h.A)(nh,this)}set defaultExpandAll(e){(0,o.A)(nh,this,e)}get showLine(){return(0,h.A)(rh,this)}set showLine(e){(0,o.A)(rh,this,e)}get expandedKeys(){return(0,h.A)(lh,this)}set expandedKeys(e){(0,o.A)(lh,this,e)}get checkedKeys(){return(0,h.A)(oh,this)}set checkedKeys(e){(0,o.A)(oh,this,e)}get nodeDraggable(){return(0,h.A)(hh,this)}set nodeDraggable(e){(0,o.A)(hh,this,e)}get switcherIcon(){return(0,h.A)(dh,this)}set switcherIcon(e){(0,o.A)(dh,this,e)}get allowDrop(){return(0,h.A)(ch,this)}set allowDrop(e){(0,o.A)(ch,this,e)}get titleSuffixBrick(){return(0,h.A)(ph,this)}set titleSuffixBrick(e){(0,o.A)(ph,this,e)}render(){return p().createElement(xh,{dataSource:this.dataSource,shadowRoot:this.shadowRoot,checkable:this.checkable,selectable:this.selectable,defaultExpandAll:this.defaultExpandAll,showLine:this.showLine,nodeDraggable:this.nodeDraggable,switcherIcon:this.switcherIcon,expandedKeys:this.expandedKeys,checkedKeys:this.checkedKeys,titleSuffixBrick:this.titleSuffixBrick,onCheck:(0,h.A)(wh,this),onExpand:(0,h.A)(yh,this),allowDrop:this.allowDrop,onDrop:(0,h.A)(bh,this)})}}function xh(e){let{dataSource:t,shadowRoot:i,checkable:s,selectable:a,defaultExpandAll:n,showLine:r,expandedKeys:l,checkedKeys:o,nodeDraggable:h,switcherIcon:d,titleSuffixBrick:u,onCheck:A,onExpand:g,onDrop:w,allowDrop:m}=e;const f=(0,I.useCurrentTheme)(),k=(0,c.useMemo)((()=>(0,K.VC)()),[]);return p().createElement(b.Ay,{theme:{algorithm:"dark-v2"===f?ys.A.darkAlgorithm:ys.A.defaultAlgorithm}},p().createElement(K.N7,{container:i,autoClear:!0,cache:k,hashPriority:"high"},p().createElement(ho.A,(0,y.A)({switcherIcon:!1!==d&&("chevron"===d?p().createElement(co.A,null):void 0)},null!=u&&u.useBrick?{titleRender:e=>p().createElement(p().Fragment,null,e.title,p().createElement("span",{onClick:e=>e.stopPropagation()},p().createElement(I.ReactUseMultipleBricks,{useBrick:u.useBrick,data:e})))}:null,{treeData:t,checkable:s,selectable:a,defaultExpandAll:n,showLine:r,draggable:h},l?{expandedKeys:l}:null,o?{checkedKeys:o}:null,{onCheck:A,onExpand:g,allowDrop:m,onDrop:w}))))}oo=kh,({e:[Ao,go,wo,mo,yo,fo,bo,ko,xo,Co,vo,So,Eo,Mo,Wo,Ro,_o,No,Do,Bo,Io,Ko,Po,zo,To,Uo,Fo,Lo,Ho,qo,Oo,$o,jo,Qo,Zo,Vo,Go,Yo],c:[th,uo]}=(0,d.A)(oo,[Jo("eo-tree",{styleTexts:[po.A]})],[[Xo({attribute:!1}),1,"dataSource"],[Xo({type:Boolean}),1,"checkable"],[Xo({type:Boolean}),1,"selectable"],[Xo({type:Boolean}),1,"defaultExpandAll"],[Xo({type:Boolean}),1,"showLine"],[Xo({attribute:!1}),1,"expandedKeys"],[Xo({attribute:!1}),1,"checkedKeys"],[Xo({attribute:!1}),1,"nodeDraggable"],[Xo({attribute:!1}),1,"switcherIcon"],[Xo({attribute:!1}),1,"allowDrop"],[Xo({attribute:!1}),1,"titleSuffixBrick"],[eh({type:"check"}),1,"checkEvent",e=>(0,h.A)(uh,e),(e,t)=>(0,o.A)(uh,e,t)],[eh({type:"check.detail"}),1,"checkDetailEvent",e=>(0,h.A)(gh,e),(e,t)=>(0,o.A)(gh,e,t)],[eh({type:"expand"}),1,"expandEvent",e=>(0,h.A)(mh,e),(e,t)=>(0,o.A)(mh,e,t)],[eh({type:"node.drop"}),1,"dropEvent",e=>(0,h.A)(fh,e),(e,t)=>(0,o.A)(fh,e,t)]],0,(e=>bh.has((0,r.A)(e))),A.ReactNextElement)),uo();var Ch,vh=i(79484),Sh=i(34695);let Eh,Mh,Wh,Rh,_h,Nh,Dh,Bh,Ih,Kh,Ph,zh,Th,Uh,Fh,Lh,Hh,qh,Oh,$h,jh,Qh,Zh,Vh,Gh,Yh,Jh,Xh,ed,td,id,sd,ad,nd,rd,ld,od,hd,dd,cd,pd,ud,Ad,gd,wd,md,yd,fd,bd,kd,xd,Cd,vd,Sd,Ed,Md,Wd,Rd,_d;const{defineElement:Nd,property:Dd,event:Bd}=(0,u.createDecorators)(),Id=(0,A.wrapBrick)("eo-icon"),Kd=(0,A.wrapBrick)("eo-form-item");let Pd;var zd=new WeakMap,Td=new WeakMap,Ud=new WeakMap,Fd=new WeakMap,Ld=new WeakMap,Hd=new WeakMap,qd=new WeakMap,Od=new WeakMap,$d=new WeakMap,jd=new WeakMap,Qd=new WeakMap,Zd=new WeakMap,Vd=new WeakMap,Gd=new WeakMap,Yd=new WeakMap,Jd=new WeakMap,Xd=new WeakMap,ec=new WeakMap,tc=new WeakMap,ic=new WeakMap,sc=new WeakMap,ac=new WeakMap,nc=new WeakSet,rc=new WeakMap,lc=new WeakMap,oc=new WeakMap,hc=new WeakMap,dc=new WeakMap,cc=new WeakMap;function pc(e){const{shadowRoot:t,checkable:i,loading:s,treeData:a,treeExpandedKeys:n,treeDefaultExpandAll:r,fieldNames:l,value:o,placeholder:h,disabled:d,multiple:u,allowClear:A,popupPlacement:g,dropdownStyle:w,suffixIcon:m,size:y,maxTagCount:f,onChange:k,onSearch:x,onSelect:C,onTreeExpand:v}=e,S=(0,I.useCurrentTheme)(),E=(0,c.useMemo)((()=>(0,K.VC)()),[]);return p().createElement(b.Ay,{theme:{algorithm:"dark-v2"===S?ys.A.darkAlgorithm:ys.A.defaultAlgorithm}},p().createElement(K.N7,{container:t,cache:E},p().createElement(vh.A,{getPopupContainer:e=>e.parentElement,allowClear:A,loading:s,disabled:d,multiple:u,fieldNames:l,placeholder:h,placement:g,dropdownStyle:w,suffixIcon:m&&p().createElement(Id,m),maxTagCount:f,value:o,size:y,treeData:a,treeCheckable:i,treeExpandedKeys:n,treeDefaultExpandAll:r,onChange:k,onSelect:C,onSearch:x,onTreeExpand:v})))}Ch=class extends Fs{constructor(){super(...arguments),(0,a.A)(this,nc),(0,n.A)(this,zd,Mh(this)),(0,n.A)(this,Td,(Wh(this),Rh(this))),(0,n.A)(this,Ud,(_h(this),Nh(this))),(0,n.A)(this,Fd,(Dh(this),Bh(this))),(0,n.A)(this,Ld,(Ih(this),Kh(this))),(0,n.A)(this,Hd,(Ph(this),zh(this))),(0,n.A)(this,qd,(Th(this),Uh(this))),(0,n.A)(this,Od,(Fh(this),Lh(this))),(0,n.A)(this,$d,(Hh(this),qh(this))),(0,n.A)(this,jd,(Oh(this),$h(this))),(0,n.A)(this,Qd,(jh(this),Qh(this))),(0,n.A)(this,Zd,(Zh(this),Vh(this))),(0,n.A)(this,Vd,(Gh(this),Yh(this,!0))),(0,n.A)(this,Gd,(Jh(this),Xh(this,!1))),(0,n.A)(this,Yd,(ed(this),td(this))),(0,n.A)(this,Jd,(id(this),sd(this,!0))),(0,n.A)(this,Xd,(ad(this),nd(this))),(0,n.A)(this,ec,(rd(this),ld(this,"bottomLeft"))),(0,n.A)(this,tc,(od(this),hd(this))),(0,n.A)(this,ic,(dd(this),cd(this))),(0,n.A)(this,sc,(pd(this),ud(this))),(0,n.A)(this,ac,(Ad(this),gd(this))),(0,s.A)(this,"handleOnChange",(yd(this),e=>{this.value=e,(0,l.A)(nc,this,wd).emit({value:e})})),(0,n.A)(this,rc,fd(this)),(0,n.A)(this,lc,(xd(this),e=>{(0,l.A)(nc,this,bd).emit(e)})),(0,n.A)(this,oc,Cd(this)),(0,n.A)(this,hc,(Ed(this),e=>{(0,l.A)(nc,this,vd).emit({value:e})})),(0,n.A)(this,dc,Md(this)),(0,n.A)(this,cc,(_d(this),e=>{(0,l.A)(nc,this,Wd).emit({keys:e})}))}get name(){return(0,h.A)(zd,this)}set name(e){(0,o.A)(zd,this,e)}get label(){return(0,h.A)(Td,this)}set label(e){(0,o.A)(Td,this,e)}get required(){return(0,h.A)(Ud,this)}set required(e){(0,o.A)(Ud,this,e)}get treeData(){return(0,h.A)(Fd,this)}set treeData(e){(0,o.A)(Fd,this,e)}get treeDefaultExpandAll(){return(0,h.A)(Ld,this)}set treeDefaultExpandAll(e){(0,o.A)(Ld,this,e)}get treeExpandedKeys(){return(0,h.A)(Hd,this)}set treeExpandedKeys(e){(0,o.A)(Hd,this,e)}get fieldNames(){return(0,h.A)(qd,this)}set fieldNames(e){(0,o.A)(qd,this,e)}get value(){return(0,h.A)(Od,this)}set value(e){(0,o.A)(Od,this,e)}get placeholder(){return(0,h.A)($d,this)}set placeholder(e){(0,o.A)($d,this,e)}get multiple(){return(0,h.A)(jd,this)}set multiple(e){(0,o.A)(jd,this,e)}get disabled(){return(0,h.A)(Qd,this)}set disabled(e){(0,o.A)(Qd,this,e)}get checkable(){return(0,h.A)(Zd,this)}set checkable(e){(0,o.A)(Zd,this,e)}get allowClear(){return(0,h.A)(Vd,this)}set allowClear(e){(0,o.A)(Vd,this,e)}get loading(){return(0,h.A)(Gd,this)}set loading(e){(0,o.A)(Gd,this,e)}get filterTreeNode(){return(0,h.A)(Yd,this)}set filterTreeNode(e){(0,o.A)(Yd,this,e)}get showSearch(){return(0,h.A)(Jd,this)}set showSearch(e){(0,o.A)(Jd,this,e)}get suffixIcon(){return(0,h.A)(Xd,this)}set suffixIcon(e){(0,o.A)(Xd,this,e)}get popupPlacement(){return(0,h.A)(ec,this)}set popupPlacement(e){(0,o.A)(ec,this,e)}get size(){return(0,h.A)(tc,this)}set size(e){(0,o.A)(tc,this,e)}get maxTagCount(){return(0,h.A)(ic,this)}set maxTagCount(e){(0,o.A)(ic,this,e)}get dropdownStyle(){return(0,h.A)(sc,this)}set dropdownStyle(e){(0,o.A)(sc,this,e)}render(){return p().createElement(Kd,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,notRender:this.notRender,trigger:"handleOnChange"},p().createElement(pc,{shadowRoot:this.shadowRoot,checkable:this.checkable,treeData:this.treeData,treeDefaultExpandAll:this.treeDefaultExpandAll,fieldNames:this.fieldNames,filterTreeNode:this.filterTreeNode,value:this.value,multiple:this.multiple,placeholder:this.placeholder,loading:this.loading,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,suffixIcon:this.suffixIcon,size:this.size,popupPlacement:this.popupPlacement,treeExpandedKeys:this.treeExpandedKeys,maxTagCount:this.maxTagCount,dropdownStyle:this.dropdownStyle,onChange:this.handleOnChange,onSearch:(0,h.A)(lc,this),onSelect:(0,h.A)(hc,this),onTreeExpand:(0,h.A)(cc,this)}))}},({e:[Mh,Wh,Rh,_h,Nh,Dh,Bh,Ih,Kh,Ph,zh,Th,Uh,Fh,Lh,Hh,qh,Oh,$h,jh,Qh,Zh,Vh,Gh,Yh,Jh,Xh,ed,td,id,sd,ad,nd,rd,ld,od,hd,dd,cd,pd,ud,Ad,gd,wd,md,yd,fd,bd,kd,xd,Cd,vd,Sd,Ed,Md,Wd,Rd,_d],c:[Pd,Eh]}=(0,d.A)(Ch,[Nd("eo-tree-select",{styleTexts:[Sh.A]})],[[Dd(),1,"name"],[Dd(),1,"label"],[Dd({type:Boolean}),1,"required"],[Dd({attribute:!1}),1,"treeData"],[Dd({type:Boolean}),1,"treeDefaultExpandAll"],[Dd({attribute:!1}),1,"treeExpandedKeys"],[Dd({attribute:!1}),1,"fieldNames"],[Dd({attribute:!1}),1,"value"],[Dd(),1,"placeholder"],[Dd({type:Boolean}),1,"multiple"],[Dd({type:Boolean}),1,"disabled"],[Dd({type:Boolean}),1,"checkable"],[Dd({type:Boolean}),1,"allowClear"],[Dd({type:Boolean}),1,"loading"],[Dd({attribute:!1}),1,"filterTreeNode"],[Dd({type:Boolean}),1,"showSearch"],[Dd({attribute:!1}),1,"suffixIcon"],[Dd(),1,"popupPlacement"],[Dd(),1,"size"],[Dd({attribute:!1}),1,"maxTagCount"],[Dd({attribute:!1}),1,"dropdownStyle"],[Bd({type:"change"}),1,"changeEvent",e=>(0,h.A)(ac,e),(e,t)=>(0,o.A)(ac,e,t)],[Bd({type:"search"}),1,"searchEvent",e=>(0,h.A)(rc,e),(e,t)=>(0,o.A)(rc,e,t)],[Bd({type:"select"}),1,"selectEvent",e=>(0,h.A)(oc,e),(e,t)=>(0,o.A)(oc,e,t)],[Bd({type:"expand"}),1,"expandEvent",e=>(0,h.A)(dc,e),(e,t)=>(0,o.A)(dc,e,t)]],0,(e=>cc.has((0,r.A)(e))),Fs)),Eh()},71058:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(36758),a=i.n(s),n=i(40935),r=i.n(n)()(a());r.push([e.id,".ant-select-single .ant-select-selector{border-radius:var(--medius-border-radius)}.ant-select-dropdown{border-radius:var(--medius-border-radius)}.ant-cascader-dropdown .ant-cascader-menu-item{border-radius:var(--small-border-radius)}",""]);const l=r.toString()},2198:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(36758),a=i.n(s),n=i(40935),r=i.n(n)()(a());r.push([e.id,".brickTableOddRow{background-color:var(--color-fill-bg-base-4)}.ant-table-small .ant-table-body{margin:0}.ant-table-small .ant-table-thead{background:var(--antd-table-header-bg)}.ant-table-small .ant-table-row{line-height:26px}.ant-table-tbody > tr.invalidRow > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.invalidRow:hover > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.disabledRow > td{background-color:var(--theme-gray-border-color)}.ant-table-tbody > .ant-table-row-selected td{background:var(--antd-table-cell-fixed-body-bg)!important}td.alignTop{vertical-align:top}td.alignBottom{vertical-align:bottom}.expandIconCellHidden .ant-table-row-expand-icon-cell,\n.expandIconCellHidden .ant-table-expand-icon-col{width:1px;min-width:auto}.expandIconCellHidden .ant-table-row-expand-icon-cell > *,\n.expandIconCellHidden .ant-table-expand-icon-col > *{display:none}.expandIconSpan{cursor:pointer;margin-right:9px;color:var(--antd-table-row-expand-icon-color);font-size:11px}.expandIconSpan .anticon{background:var(--antd-table-row-expand-icon-action-bg);border-radius:2px;padding:3px}.tableThTransparent thead.ant-table-thead > tr > th{background:var(--antd-table-header-bg)}.zebraPatternTable .ant-table-tbody tr td{border-bottom:0}.ellipsis{max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.totalText{color:var(--antd-pagination-total-text)}.total{font-weight:normal;color:var(--antd-pagination-total-strong-text)}.ant-table-wrapper .ant-table-thead > tr > th{padding:11px 16px;font-size:12px;line-height:20px;border-bottom:0;font-weight:500;color:var(--antd-table-header-color)}.ant-table-wrapper .ant-table-pagination.ant-pagination{margin:24px 0}.xSmallSizeTable .ant-table{line-height:1}.xSmallSizeTable .ant-table .ant-table-selection-col{width:32px}.xSmallSizeTable .ant-table-thead tr th,\n.xSmallSizeTable .ant-table-tbody tr td{padding:0px 2px}.xSmallSizeTable .ant-table-thead tr th:first-child,\n.xSmallSizeTable .ant-table-tbody tr td:first-child{padding:0}",""]);const l=r.toString()},34695:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(36758),a=i.n(s),n=i(40935),r=i.n(n)()(a());r.push([e.id,":host{display:block}:host([hidden]){display:none}.ant-tree-select{width:100%;height:30px}.ant-select-lg{height:38px}.ant-select-sm{height:20px}",""]);const l=r.toString()},39138:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(36758),a=i.n(s),n=i(40935),r=i.n(n)()(a());r.push([e.id,":host{display:block}:host([hidden]){display:none}:host .ant-tree{background-color:transparent}",""]);const l=r.toString()},91116:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(36758),a=i.n(s),n=i(40935),r=i.n(n),l=i(34566),o=i(16322),h=r()(a());h.i(l.A),h.i(o.A),h.push([e.id,":host{display:block}:host([hidden]){display:none}.grid-layout-wrapper{display:flex;height:100%;position:relative}.grid-layout-wrapper .component-wrapper{width:150px;padding:6px 12px;overflow-y:scroll;box-shadow:1px 0 0 0 var(--palette-gray-5);background:var(--color-fill-bg-container-1);z-index:999;position:sticky;top:0}.grid-layout-wrapper .component-wrapper .component-title{font-size:16px;padding:6px 0;font-weight:500}.grid-layout-wrapper .component-wrapper .component-list{margin-top:6px}.grid-layout-wrapper .component-wrapper .component-list eo-checkbox::part(checkbox-wrapper){display:flex;flex-wrap:wrap;gap:8px}.grid-layout-wrapper .component-wrapper .component-list eo-checkbox::part(checkbox-option){margin-left:0;width:100%;background:none}.grid-layout-wrapper .layout-wrapper{flex:1}.grid-layout-wrapper .layout-wrapper .layout{max-width:1300px;margin:0 auto}.grid-layout-wrapper .layout-wrapper .actions-wrapper{position:sticky;top:0;z-index:999;margin-left:1px;display:flex;gap:8px;justify-content:end;background:var(--color-fill-bg-container-1);padding:8px 12px;box-shadow:0 1px 1px 0 var(--palette-gray-5)}.grid-layout-wrapper .layout-wrapper .edit-mask{position:absolute;left:0;right:0;top:45px;bottom:0;z-index:10}.grid-layout-wrapper .layout-wrapper .delete-icon{position:absolute;right:15px;top:15px;cursor:pointer;font-size:16px;width:30px;height:30px;display:flex;justify-content:center;align-items:center;background:var(--color-fill-bg-container-1);color:var(--color-normal-text)}.grid-layout-wrapper .layout-wrapper .delete-icon:hover{color:var(--color-error)}.grid-layout-wrapper .layout-wrapper .delete-icon:active{color:var(--color-error-active)}.react-grid-item.react-grid-placeholder{background-color:#ddd}.react-grid-item.react-draggable-dragging{pointer-events:none}.react-grid-item.react-grid-placeholder.forbidden{background-color:red}",""]);const d=h.toString()},59224:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"}}]);
2
- //# sourceMappingURL=9260.e70e8033.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_advanced=globalThis.webpackChunk_next_bricks_advanced||[]).push([[9559,1940],{49559:(e,t,n)=>{n.r(t),n.d(t,{supply:()=>s});var r=n(41030),a=n(21302),o=n(65575);function s(e,t,n){const r={...t};r[void 0]=void 0;for(const t of e)if(!Object.prototype.hasOwnProperty.call(r,t)){const e=u(t,n);void 0!==e&&(r[t]=e)}return r}const i=new Set(["fill","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","assign","assignIn","assignInWith","assignWith","defaults","defaultsDeep","merge","mergeWith","set","setWith","unset","update","updateWith","after","ary","before","bind","bindKey","curry","curryRight","debounce","defer","delay","flip","memoize","negate","once","overArgs","partial","partialRight","rearg","rest","spread","throttle","unary","wrap"]),c=new Set(["lang","langData","locale","localeData","defineLocale","updateLocale","updateOffset"]),l=new Set(["Array","Boolean","Date","Infinity","JSON","Math","NaN","Number","String","RegExp","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","isFinite","isNaN","parseFloat","parseInt","Map","Set","URLSearchParams","WeakMap","WeakSet","atob","btoa"]);function u(e,t){switch(e){case"Object":return n=Object,s=["entries","fromEntries","keys","values"],Object.fromEntries(s.map((e=>[e,function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return n[e].apply(n,r)}])));case"_":return Object.fromEntries(Object.entries(r).filter((e=>!i.has(e[0]))).concat(t?[["uniqueId",e=>`${e??""}42`]]:[]));case"moment":return Object.assign((function(){return a(...arguments)}),Object.fromEntries(Object.entries(a).filter((e=>!c.has(e[0])))));case"PIPES":return o.pipes;case"TAG_URL":return p(!0);case"SAFE_TAG_URL":return p();default:if(l.has(e))return window[e]}var n,s}function p(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];const o=[];return t.forEach(((t,n)=>{o.push(t),n<r.length&&o.push(e?String(r[n]).replace(/[^/]+/g,(e=>encodeURIComponent(e))):encodeURIComponent(String(r[n])))})),o.join("")}}}}]);
2
- //# sourceMappingURL=9559.9d919d1a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/9559.9d919d1a.js","mappings":"kNAGO,SAASA,EAAOC,EAAuBC,EAAyBC,GACrE,MAAMC,EAAkB,IACnBF,GAGLE,OAAgB,QAAeC,EAC/B,IAAK,MAAMC,KAAgBL,EACzB,IAAKM,OAAOC,UAAUC,eAAeC,KAAKN,EAAiBE,GAAe,CACxE,MAAMK,EAAWC,EAAiBN,EAAcH,QAC/BE,IAAbM,IACFP,EAAgBE,GAAgBK,EAEpC,CAEF,OAAOP,CACT,CACA,MAAMS,EAAqB,IAAIC,IAAI,CAGnC,OAAQ,OAAQ,UAAW,YAAa,cAAe,SAAU,SAAU,UAAW,SAAU,WAAY,eAAgB,aAAc,WAAY,eAAgB,QAAS,YAAa,MAAO,UAAW,QAAS,SAAU,aAWjO,QAAS,MAAO,SAAU,OAAQ,UAAW,QAAS,aAAc,WAAY,QAAS,QAAS,OAAQ,UAAW,SAAU,OAAQ,WAAY,UAAW,eAAgB,QAAS,OAAQ,SAAU,WAAY,QAAS,SAGxNC,EAAqB,IAAID,IAAI,CAAC,OAAQ,WAAY,SAAU,aAAc,eAAgB,eAAgB,iBAC1GE,EAAuB,IAAIF,IAAI,CAAC,QAAS,UAAW,OAAQ,WAAY,OAAQ,OAAQ,MAAO,SAAU,SAAU,SAAU,YAAa,qBAAsB,YAAa,qBAAsB,WAAY,QAAS,aAAc,WAAY,MAAO,MAAO,kBAAmB,UAAW,UAAW,OAAQ,SACvT,SAASF,EAAiBN,EAAcH,GACtC,OAAQG,GACN,IAAK,SAEH,OAmBmBW,EAnBIV,OAmBIW,EAnBI,CAAC,UAAW,cAAe,OAAQ,UAoB/DX,OAAOY,YAAYD,EAAQE,KAAIC,GAAU,CAACA,EAAQ,WACvD,IAAK,IAAIC,EAAOC,UAAUC,OAAQC,EAAO,IAAIC,MAAMJ,GAAOK,EAAO,EAAGA,EAAOL,EAAMK,IAC/EF,EAAKE,GAAQJ,UAAUI,GAEzB,OAAOV,EAAOI,GAAQO,MAAMX,EAAQQ,EACtC,MAxBE,IAAK,IACH,OAAOlB,OAAOY,YAAYZ,OAAOsB,QAAQ,GAAQC,QAAOC,IAAUlB,EAAmBmB,IAAID,EAAM,MAAKE,OAAO9B,EAAO,CAAC,CAAC,WAAY+B,GAAU,GAAGA,GAAU,SAAW,KACpK,IAAK,SACH,OAAO3B,OAAO4B,QAAO,WACnB,OAAO,KAAUZ,UACnB,GAAGhB,OAAOY,YAAYZ,OAAOsB,QAAQ,GAAQC,QAAOC,IAAUhB,EAAmBiB,IAAID,EAAM,QAC7F,IAAK,QACH,OAAO,EAAAK,MACT,IAAK,UACH,OAAOC,GAAc,GACvB,IAAK,eACH,OAAOA,IACT,QACE,GAAIrB,EAAqBgB,IAAI1B,GAC3B,OAAOgC,OAAOhC,GAItB,IAAyBW,EAAQC,CADjC,CAiCA,SAASmB,EAAcE,GACrB,OAAO,SAAUC,GACf,IAAK,IAAIC,EAAQlB,UAAUC,OAAQkB,EAAW,IAAIhB,MAAMe,EAAQ,EAAIA,EAAQ,EAAI,GAAIE,EAAQ,EAAGA,EAAQF,EAAOE,IAC5GD,EAASC,EAAQ,GAAKpB,UAAUoB,GAElC,MAAMC,EAAS,GAOf,OANAJ,EAAQK,SAAQ,CAACC,EAAKC,KACpBH,EAAOI,KAAKF,GACRC,EAAQL,EAASlB,QACnBoB,EAAOI,KAAKT,EAAgBU,OAAOP,EAASK,IAAQG,QAAQ,UAAUC,GAAKC,mBAAmBD,KAAMC,mBAAmBH,OAAOP,EAASK,KACzI,IAEKH,EAAOS,KAAK,GACrB,CACF,C","sources":["webpack:///../../node_modules/@next-core/supply/dist/esm/index.js"],"sourcesContent":["import lodash from \"lodash\";\nimport moment from \"moment\";\nimport { pipes } from \"@next-core/pipes\";\nexport function supply(attemptToVisitGlobals, providedGlobalVariables, mock) {\n const globalVariables = {\n ...providedGlobalVariables\n };\n // Allow limited browser builtin values.\n globalVariables[\"undefined\"] = undefined;\n for (const variableName of attemptToVisitGlobals) {\n if (!Object.prototype.hasOwnProperty.call(globalVariables, variableName)) {\n const variable = supplyIndividual(variableName, mock);\n if (variable !== undefined) {\n globalVariables[variableName] = variable;\n }\n }\n }\n return globalVariables;\n}\nconst shouldOmitInLodash = new Set([\n// Omit all mutable methods from lodash.\n// But allow sequence methods like `_.chain`.\n\"fill\", \"pull\", \"pullAll\", \"pullAllBy\", \"pullAllWith\", \"pullAt\", \"remove\", \"reverse\", \"assign\", \"assignIn\", \"assignInWith\", \"assignWith\", \"defaults\", \"defaultsDeep\", \"merge\", \"mergeWith\", \"set\", \"setWith\", \"unset\", \"update\", \"updateWith\",\n/**\n * Ignore `Function` methods from lodash, too.\n * There are chances to invoke `Object.assign`, etc.\n *\n * E.g.:\n *\n * ```\n * _.wrap(_.method('constructor.assign',{b:2},{b:3}),(func,...a) => func(...a))({})\n * ```\n */\n\"after\", \"ary\", \"before\", \"bind\", \"bindKey\", \"curry\", \"curryRight\", \"debounce\", \"defer\", \"delay\", \"flip\", \"memoize\", \"negate\", \"once\", \"overArgs\", \"partial\", \"partialRight\", \"rearg\", \"rest\", \"spread\", \"throttle\", \"unary\", \"wrap\"]);\n\n// Omit all mutable methods from moment.\nconst shouldOmitInMoment = new Set([\"lang\", \"langData\", \"locale\", \"localeData\", \"defineLocale\", \"updateLocale\", \"updateOffset\"]);\nconst allowedGlobalObjects = new Set([\"Array\", \"Boolean\", \"Date\", \"Infinity\", \"JSON\", \"Math\", \"NaN\", \"Number\", \"String\", \"RegExp\", \"decodeURI\", \"decodeURIComponent\", \"encodeURI\", \"encodeURIComponent\", \"isFinite\", \"isNaN\", \"parseFloat\", \"parseInt\", \"Map\", \"Set\", \"URLSearchParams\", \"WeakMap\", \"WeakSet\", \"atob\", \"btoa\"]);\nfunction supplyIndividual(variableName, mock) {\n switch (variableName) {\n case \"Object\":\n // Do not allow mutable methods like `Object.assign`.\n return delegateMethods(Object, [\"entries\", \"fromEntries\", \"keys\", \"values\"]);\n case \"_\":\n return Object.fromEntries(Object.entries(lodash).filter(entry => !shouldOmitInLodash.has(entry[0])).concat(mock ? [[\"uniqueId\", prefix => `${prefix ?? \"\"}42`]] : []));\n case \"moment\":\n return Object.assign(function () {\n return moment(...arguments);\n }, Object.fromEntries(Object.entries(moment).filter(entry => !shouldOmitInMoment.has(entry[0]))));\n case \"PIPES\":\n return pipes;\n case \"TAG_URL\":\n return tagUrlFactory(true);\n case \"SAFE_TAG_URL\":\n return tagUrlFactory();\n default:\n if (allowedGlobalObjects.has(variableName)) {\n return window[variableName];\n }\n }\n}\nfunction delegateMethods(target, methods) {\n return Object.fromEntries(methods.map(method => [method, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return target[method].apply(target, args);\n }]));\n}\n/**\n * Pass `ignoreSlashes` as `true` to encode all tagged expressions\n * as URL components, except for `/` which maybe used in `APP.homepage`.\n *\n * Otherwise encode all tagged expressions as URL components.\n * This will encode `/` as `%2F`. So do not use it directly\n * with `APP.homepage` as in template expressions.\n *\n * @example\n *\n * ```js\n * TAG_URL`${APP.homepage}/list?q=${q}&redirect=${redirect}`\n * ```\n *\n * ```js\n * SAFE_TAG_URL`file/${path}?q=${q}`\n * // `path` will be fully transformed by `encodeURIComponent`.\n * ```\n *\n * ```js\n * // Wrap `APP.homepage` outside of `SAFE_TAG_URL`.\n * `${APP.homepage}/${SAFE_TAG_URL`file/${path}?q=${q}`}`\n * ```\n */\nfunction tagUrlFactory(ignoreSlashes) {\n return function (strings) {\n for (var _len2 = arguments.length, partials = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n partials[_key2 - 1] = arguments[_key2];\n }\n const result = [];\n strings.forEach((str, index) => {\n result.push(str);\n if (index < partials.length) {\n result.push(ignoreSlashes ? String(partials[index]).replace(/[^/]+/g, p => encodeURIComponent(p)) : encodeURIComponent(String(partials[index])));\n }\n });\n return result.join(\"\");\n };\n}\n//# sourceMappingURL=index.js.map"],"names":["supply","attemptToVisitGlobals","providedGlobalVariables","mock","globalVariables","undefined","variableName","Object","prototype","hasOwnProperty","call","variable","supplyIndividual","shouldOmitInLodash","Set","shouldOmitInMoment","allowedGlobalObjects","target","methods","fromEntries","map","method","_len","arguments","length","args","Array","_key","apply","entries","filter","entry","has","concat","prefix","assign","pipes","tagUrlFactory","window","ignoreSlashes","strings","_len2","partials","_key2","result","forEach","str","index","push","String","replace","p","encodeURIComponent","join"],"sourceRoot":""}
@@ -1,3 +0,0 @@
1
- /*! For license information please see 9612.99e6f1a8.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_advanced=globalThis.webpackChunk_next_bricks_advanced||[]).push([[9612],{94579:(e,t,n)=>{n.d(t,{H:()=>d,K6:()=>a,Me:()=>l,Ob:()=>u,YL:()=>s,_:()=>o,g8:()=>p,n6:()=>f,oS:()=>h,wE:()=>c});var r=n(81071);function o(e,t,n){return{r:255*(0,r.Cg)(e,255),g:255*(0,r.Cg)(t,255),b:255*(0,r.Cg)(n,255)}}function a(e,t,n){e=(0,r.Cg)(e,255),t=(0,r.Cg)(t,255),n=(0,r.Cg)(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),i=0,s=0,c=(o+a)/2;if(o===a)s=0,i=0;else{var l=o-a;switch(s=c>.5?l/(2-o-a):l/(o+a),o){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i/=6}return{h:i,s,l:c}}function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function s(e,t,n){var o,a,s;if(e=(0,r.Cg)(e,360),t=(0,r.Cg)(t,100),n=(0,r.Cg)(n,100),0===t)a=n,s=n,o=n;else{var c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;o=i(l,c,e+1/3),a=i(l,c,e),s=i(l,c,e-1/3)}return{r:255*o,g:255*a,b:255*s}}function c(e,t,n){e=(0,r.Cg)(e,255),t=(0,r.Cg)(t,255),n=(0,r.Cg)(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),i=0,s=o,c=o-a,l=0===o?0:c/o;if(o===a)i=0;else{switch(o){case e:i=(t-n)/c+(t<n?6:0);break;case t:i=(n-e)/c+2;break;case n:i=(e-t)/c+4}i/=6}return{h:i,s:l,v:s}}function l(e,t,n){e=6*(0,r.Cg)(e,360),t=(0,r.Cg)(t,100),n=(0,r.Cg)(n,100);var o=Math.floor(e),a=e-o,i=n*(1-t),s=n*(1-a*t),c=n*(1-(1-a)*t),l=o%6;return{r:255*[n,s,i,i,c,n][l],g:255*[c,n,n,s,i,i][l],b:255*[i,i,c,n,n,s][l]}}function u(e,t,n,o){var a=[(0,r.wl)(Math.round(e).toString(16)),(0,r.wl)(Math.round(t).toString(16)),(0,r.wl)(Math.round(n).toString(16))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function d(e,t,n,o,a){var i,s=[(0,r.wl)(Math.round(e).toString(16)),(0,r.wl)(Math.round(t).toString(16)),(0,r.wl)(Math.round(n).toString(16)),(0,r.wl)((i=o,Math.round(255*parseFloat(i)).toString(16)))];return a&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function f(e){return p(e)/255}function p(e){return parseInt(e,16)}function h(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}},42887:(e,t,n)=>{n.d(t,{D:()=>r});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},84501:(e,t,n)=>{n.d(t,{RO:()=>i});var r=n(94579),o=n(42887),a=n(81071);function i(e){var t={r:0,g:0,b:0},n=1,i=null,s=null,c=null,l=!1,f=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(o.D[e])e=o.D[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=u.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=u.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=u.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=u.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=u.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=u.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=u.hex8.exec(e))?{r:(0,r.g8)(n[1]),g:(0,r.g8)(n[2]),b:(0,r.g8)(n[3]),a:(0,r.n6)(n[4]),format:t?"name":"hex8"}:(n=u.hex6.exec(e))?{r:(0,r.g8)(n[1]),g:(0,r.g8)(n[2]),b:(0,r.g8)(n[3]),format:t?"name":"hex"}:(n=u.hex4.exec(e))?{r:(0,r.g8)(n[1]+n[1]),g:(0,r.g8)(n[2]+n[2]),b:(0,r.g8)(n[3]+n[3]),a:(0,r.n6)(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=u.hex3.exec(e))&&{r:(0,r.g8)(n[1]+n[1]),g:(0,r.g8)(n[2]+n[2]),b:(0,r.g8)(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(d(e.r)&&d(e.g)&&d(e.b)?(t=(0,r._)(e.r,e.g,e.b),l=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):d(e.h)&&d(e.s)&&d(e.v)?(i=(0,a.Px)(e.s),s=(0,a.Px)(e.v),t=(0,r.Me)(e.h,i,s),l=!0,f="hsv"):d(e.h)&&d(e.s)&&d(e.l)&&(i=(0,a.Px)(e.s),c=(0,a.Px)(e.l),t=(0,r.YL)(e.h,i,c),l=!0,f="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,a.TV)(n),{ok:l,format:e.format||f,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var s="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),c="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),l="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),u={CSS_UNIT:new RegExp(s),rgb:new RegExp("rgb"+c),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+c),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+c),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function d(e){return Boolean(u.CSS_UNIT.exec(String(e)))}},81071:(e,t,n)=>{function r(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function o(e){return Math.min(1,Math.max(0,e))}function a(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function i(e){return e<=1?"".concat(100*Number(e),"%"):e}function s(e){return 1===e.length?"0"+e:String(e)}n.d(t,{Cg:()=>r,J$:()=>o,Px:()=>i,TV:()=>a,wl:()=>s})},12559:(e,t,n)=>{function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},72016:(e,t,n)=>{function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},70829:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(12559);function o(e,t){return e.get((0,r.A)(e,t))}},70918:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(72016);function o(e,t,n){(0,r.A)(e,t),t.set(e,n)}},86121:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(12559);function o(e,t,n){return e.set((0,r.A)(e,t),n),n}},74635:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(72016);function o(e,t){(0,r.A)(e,t),t.add(e)}},24586:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(11369);function o(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},11369:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(17545);function o(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=(0,r.A)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},17545:(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,{A:()=>r})},99612:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>Yt,Notification:()=>rn,StoryboardFunctionRegistryFactory:()=>pe,__secret_internals:()=>r,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>ua,batchSetAppsLocalTheme:()=>ne,checkIfByTransform:()=>St,checkIfOfComputed:()=>At,createHistory:()=>I,createRuntime:()=>Xo,customEditors:()=>ga,customProcessors:()=>_,customTemplates:()=>Pe,fetchByProvider:()=>ma,getAuth:()=>da,getBasePath:()=>g,getCssPropertyValue:()=>ce,getCurrentMode:()=>ie,getCurrentTheme:()=>ee,getHistory:()=>C,getPageInfo:()=>Zr,getRealValue:()=>ba,getRuntime:()=>Zo,getV2RuntimeFromDll:()=>k,handleHttpError:()=>nn,httpErrorToString:()=>Qt,isLoggedIn:()=>pa,isUnauthenticatedError:()=>Xt,logout:()=>fa,matchPath:()=>Lt,registerWidgetFunctions:()=>$e,registerWidgetI18n:()=>N,setUIVersion:()=>to,unstable_createRoot:()=>va});var r={};n.r(r),n.d(r,{addRealTimeDataInspectHook:()=>Ir,debugDataValue:()=>Ar,getAddedContracts:()=>wr,getAllContextValues:()=>gr,getBrickPackagesById:()=>mr,getContextValue:()=>hr,getRenderId:()=>yr,legacyDoTransform:()=>ar,loadBricks:()=>vr,loadEditors:()=>br,mountUseBrick:()=>rr,renderUseBrick:()=>nr,setRealTimeDataInspectRoot:()=>kr,symbolForRootRuntimeContext:()=>tr,unmountUseBrick:()=>or,updateSnippetPreviewSettings:()=>fr,updateStoryboard:()=>ir,updateStoryboardByRoute:()=>sr,updateStoryboardBySnippet:()=>dr,updateStoryboardByTemplate:()=>cr,updateTemplatePreviewSettings:()=>lr});var o=n(74635),a=n(24586),i=n(70918),s=n(12559),c=n(86121),l=n(70829),u=n(46939),d=n(35072),f=n(53486),p=n(21302),h=(n(26036),n(32890));function g(){const e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var m=n(41030);function v(e,t){const n=(0,m.orderBy)(e,(e=>{var t;return(null===(t=e.app.homepage)||void 0===t?void 0:t.length)??0}),"desc");for(const e of n){const n=e.app.homepage;if("string"==typeof n&&"/"===n[0]&&b(n,t))return e}}function b(e,t){return"/"===e?t===e:`${t.replace(/\/+$/,"")}/`.startsWith(`${e.replace(/\/+$/,"")}/`)}function y(e){var t;return!e||(null===(t=Zo().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}let w,A=!1;function S(e,t){A=!confirm(e),t(!A)}function E(e){const{push:t,replace:n}=e;function r(r){return function(o,a,i){let s;const c="string"==typeof o;return s=c?(0,h.parsePath)(o).pathname:o.pathname,"string"==typeof s&&s.startsWith("/")&&y(function(e){var t;return v((null===(t=Go)||void 0===t?void 0:t.storyboards)??[],e)}(s))?location["push"===r?"assign":"replace"](c?g()+o.substring(1):e.createHref(o)):("push"===r?t:n)(o,a,i)}}return{push:r("push"),replace:r("replace")}}function k(){var e;const{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function I(){if(!w){const e=(0,h.createBrowserHistory)({basename:g().replace(/\/$/,""),getUserConfirmation:S});Object.assign(e,function(e){const{push:t,replace:n}=e;function r(e,n,r){A=!1,t(e,n),null==r||r(A)}function o(e,t,r){A=!1,n(e,t),null==r||r(A)}function a(t){return function(n){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const{extraQuery:s,clear:c,keepHash:l,...u}=a,d=new URLSearchParams(c?"":e.location.search),f={};Object.assign(f,n,s);for(const[e,t]of Object.entries(f))if(Array.isArray(t)){d.delete(e);for(const n of t)d.append(e,n)}else null==t||""===t?d.delete(e):d.set(e,t);("push"===t?r:o)(`?${d.toString()}${l?e.location.hash:""}`,u,i)}}let i;return{pushQuery:a("push"),replaceQuery:a("replace"),pushAnchor:function(t,n,o){r({...e.location,key:void 0,hash:t,state:{notify:!1,...n}},void 0,o)},reload:function(t){o({...e.location,state:{...e.location.state,notify:!0,noIncremental:!0}},void 0,t)},setBlockMessage:function(e){i=e},getBlockMessage:function(){return i},unblock:function(){i=void 0},...E({...e,push:r,replace:o})}}(e)),w=e}return w}const C=function(){const e=k();if(e)return e.getHistory}()||function(){return w};var R=n(3688),T=n(80438),O=n(84376),x=n(81574),P=n(33302),M=new WeakMap;const _=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomProcessor(t,n)})}()||new class{constructor(){(0,i.A)(this,M,new Map)}define(e,t){const[n,r]=e.split(".");let o=(0,l.A)(M,this).get(n);if(o||(o=new Map,(0,l.A)(M,this).set(n,o)),o.has(r))throw new Error(`Custom processor of "${e}" already registered`);o.set(r,t)}get(e){return(0,l.A)(M,this).get(e)}};function B(e){let{app:t,meta:n}=e;if(null!=n&&n.i18n){const e=L("app",t.id),r=[];return Object.entries(n.i18n).forEach((t=>{let[n,o]=t;u.i18n.addResourceBundle(n,e,o),r.push(n)})),()=>{for(const t of r)u.i18n.removeResourceBundle(t,e)}}}function L(e,t){return`${e}/${t}`}function $(e){return u.i18n.getFixedT(null,L("widget",e))}const N=function(){const e=k();if(e)return function(t,n){return e.getRuntime().registerWidgetI18n(t,n)}}()||function(e,t){const n=L("widget",e);Object.entries(t).forEach((e=>{let[t,r]=e;u.i18n.addResourceBundle(t,n,r)}))},U="brick-next-devtools-panel",F="devtools-frame-active-change",j="devtools-panel-change";let D,K=!0;function V(e,t){const n=W();if(!n||"evaluation"===e&&(!K||D&&"Evaluations"!==D))return;const r=()=>{var r;null===(r=n.emit)||void 0===r||r.call(n,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(r):setTimeout(r,0)}function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}const H=()=>{throw new Error("Can't modify read-only proxy object")},q={set:H,defineProperty:H,deleteProperty:H,setPrototypeOf:H};function z(e){return new Proxy(e,q)}function G(e){let{get:t,ownKeys:n}=e;return W()?z(Object.fromEntries(n(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}let Y="light";const J=new f.JsonStorage(localStorage),Q="apps-theme";function X(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error(`Unsupported theme: ${e}`);Y=e}function Z(){return Y}function ee(){return document.documentElement.dataset.theme}function te(e){e?X(e):e=Z(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function ne(e){J.setItem(Q,{...re(),...e})}function re(){let e;try{e=J.getItem(Q)}catch{console.error("JSON parse error inside `getLocalAppsTheme()`")}return e??{}}let oe="default";function ae(e){if("dashboard"!==e&&"default"!==e)throw new Error(`Unsupported mode: ${e}`);oe=e}function ie(){return document.documentElement.dataset.mode}function se(e){e?ae(e):e=oe,e!==ie()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ce(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return n&&(null===(t=window.getComputedStyle(n))||void 0===t?void 0:t.getPropertyValue(e))||""}function le(e,t){const n={};for(const r of e){const e=ue(r,t);void 0!==e&&(n[r]=e)}return n}function ue(e,t){var n,r,o;let{collectCoverage:a,widgetId:i,widgetVersion:s,app:c,appendI18nNamespace:l,storyboardFunctions:d,isStoryboardFunction:f}=t;switch(e){case"BASE_URL":return a?"/next":g().replace(/\/$/,"");case"FN":return d;case"IMG":return a?{get:e=>`mock/images/${e}`}:i?null==Qo||null===(n=Qo.images)||void 0===n?void 0:n.widgetImagesFactory(i,s):null==Qo||null===(r=Qo.images)||void 0===r?void 0:r.imagesFactory(c.id,c.isBuildPush,c.currentVersion);case"I18N":return a?m.identity:i?$(i):u.i18n.getFixedT(null,[l,L("app",c.id)].filter(Boolean));case"I18N_TEXT":return a?de:u.i18nText;case"PERMISSIONS":return z({check:a?fe:null==Qo||null===(o=Qo.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return z({getTheme:a?()=>"light":Z});case"console":return f?z(console):void 0;case"location":return a?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function de(e){return null==e?void 0:e.en}function fe(){return!0}function pe(){let{widgetId:e,widgetVersion:t,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=new Map,o=new Proxy(Object.freeze({}),{get:(i,s)=>function(i){const s=r.get(i);if(!s)return;if(s.processed)return s.cooked;let c;n&&(c=n.createCollector(i));const l=(0,T.precookFunction)(s.source,{typescript:s.typescript,hooks:c&&{beforeVisit:c.beforeVisit}});return s.cooked=(0,T.cook)(l.function,s.source,{rules:{noVar:!0},globalVariables:(0,P.supply)(l.attemptToVisitGlobals,le(l.attemptToVisitGlobals,{collectCoverage:n,widgetId:e,widgetVersion:t,app:a,storyboardFunctions:o,isStoryboardFunction:!0}),!!n),hooks:c&&{beforeEvaluate:c.beforeEvaluate,beforeCall:c.beforeCall,beforeBranch:c.beforeBranch}}),s.processed=!0,s.cooked}(s)});let a;return{storyboardFunctions:o,registerStoryboardFunctions:function(e,t){if(t&&(a=t),r.clear(),Array.isArray(e))for(const t of e){const e=(0,O.collectMemberUsageInFunction)(t,"FN",!!n),o=(0,O.collectMemberUsageInFunction)(t,"PERMISSIONS",!!n).has("check");r.set(t.name,{source:t.source,typescript:t.typescript,deps:e,hasPermissionsCheck:o})}},updateStoryboardFunction(e,t){const n={...t,name:e},o=(0,O.collectMemberUsageInFunction)(n,"FN",!0),a=(0,O.collectMemberUsageInFunction)(n,"PERMISSIONS",!0).has("check");r.set(e,{source:t.source,typescript:t.typescript,deps:o,hasPermissionsCheck:a})},checkPermissionsUsage(e){const t=new Set,n=e=>{if(!t.has(e)){t.add(e);const o=r.get(e);return!!o&&(o.hasPermissionsCheck||[...o.deps].some(n))}return!1};return e.some(n)}}}const{storyboardFunctions:he,registerStoryboardFunctions:ge,checkPermissionsUsage:me}=pe();var ve={};try{ve.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,r=e.defineProperty,o=a.prototype;function a(){t.set(this,n(null))}function i(e,t,n){r(e,t,{configurable:!0,writable:!0,value:n})}function s(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}i(o,"addEventListener",(function(e,n,r){for(var o=t.get(this),a=o[e]||(o[e]=[]),i=0,s=a.length;i<s;i++)if(a[i].listener===n)return;a.push({target:this,listener:n,options:r})})),i(o,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(i(e,"target",this),i(e,"currentTarget",this),n.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(o,"removeEventListener",(function(e,n){for(var r=t.get(this),o=r[e]||(r[e]=[]),a=0,i=o.length;a<i;a++)if(o[a].listener===n)return void o.splice(a,1)})),ve.EventTarget=a}(Object,new WeakMap)}const be=ve.EventTarget;let ye=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({});const we=new Map([[ye.xLarge,"1920px"],[ye.large,"1600px"],[ye.medium,"1280px"],[ye.small,"1024px"],[ye.xSmall,0]]),Ae=new be,Se={},Ee={};function ke(e,t){let n=!1;Se[t]=e.matches;for(const[e]of we)if(Se[e]&&Ee.breakpoint!==e){Ee.breakpoint=e,n=!0;break}n&&Ae.dispatchEvent(new CustomEvent("change",{detail:Ee}))}we.forEach(((e,t)=>{const n=window.matchMedia(`(min-width: ${e})`);ke(n,t),n.addEventListener?n.addEventListener("change",(e=>{ke(e,t)})):n.addListener((e=>{ke(e,t)}))}));const Ie=()=>Ee;function Ce(e){return function(t){const n="local"===e?localStorage:sessionStorage;return JSON.parse(n.getItem(t)??"null")}}function Re(e){var t,n;return!(null===(t=e?e.flags:null===(n=Zo())||void 0===n?void 0:n.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Te(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];const a=0===r.length?"":",";e?console.error(`${t} is dropped in v3 strict mode${a}`,...r):console.warn(`${t} is deprecated in v3 and will be dropped in strict mode${a}`,...r)}const Oe=new Set(["prefix"]);var xe=new WeakMap;const Pe=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomTemplate(t,n)})}()||new class{constructor(){(0,i.A)(this,xe,new Map)}define(e,t){var n,r;let o=(0,l.A)(xe,this).has(e);o?console.warn(`Custom template of "${e}" already registered.`):(o=!!customElements.get(e),o&&console.warn(`Custom template of "${e}" already defined by customElements.`));const a=Re(),i=(null===(n=t.proxy)||void 0===n?void 0:n.properties)??{},s=[],c=[];for(const[t,n]of Object.entries(i))n.asVariable?(Te(a,"Template `asVariable`",e,t),a||c.push(t)):n.mergeProperty||n.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,t):n.ref&&s.push([t,n]);const u={...t,proxy:{...t.proxy,properties:Object.fromEntries(s)},state:(t.state?a?t.state:t.state.map((e=>({expose:!0,...e}))):[]).concat(c.map((e=>({name:e,expose:!0}))))};(0,l.A)(xe,this).set(e,{...u,name:e});const d=(f=u.state,(0,m.uniq)((null==f?void 0:f.filter((e=>e.expose)).map((e=>e.name)))??[]));var f;const p=Object.entries((null===(r=u.proxy)||void 0===r?void 0:r.methods)??{}),h=d.concat(s.map((e=>e[0]))),g=p.map((e=>e[0])),v=h.concat(g).filter((e=>e in HTMLElement.prototype&&!Oe.has(e)));if(v.length>0&&(Te(a,"Using native HTMLElement properties as template properties or methods",e,...v),a))throw new Error(`In custom template "${e}", ${v.map((e=>`"${e}"`)).join(", ")} are native HTMLElement properties, and should be avoid to be used as brick properties or methods.`);if(!o){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return h}static get _dev_only_definedMethods(){return g}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){let e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));const t=document.createDocumentFragment(),n=document.createElement("style");n.textContent=":host{display:block}:host([hidden]){display:none}";const r=document.createElement("slot");t.appendChild(n),t.appendChild(r),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}for(const n of d)s.some((e=>e[0]===n))?console.error(`Cannot define an exposed state that is also a proxy property: "${n}" in ${e}`):Object.defineProperty(t.prototype,n,{get(){return this.$$tplStateStore.getValue(n)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(n,e,"replace")},enumerable:!0});for(const[e,n]of s)Object.defineProperty(t.prototype,e,{get(){return this.$$getElementByRef(n.ref)[n.refProperty??e]},set(t){var r;const o=null===(r=this.$$getElementByRef)||void 0===r?void 0:r.call(this,n.ref);o&&(o[n.refProperty??e]=t)},enumerable:!0});for(const[e,n]of p)Object.defineProperty(t.prototype,e,{value(){this.$$getElementByRef(n.ref)[n.refMethod??e](...arguments)},enumerable:!0});customElements.define(e,t)}}get(e){return(0,l.A)(xe,this).get(e)}};function Me(e,t,n){let{tplStateStoreId:r,tplStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of a custom template${n??""}`);const a=o.get(r);if(!a)throw new Error(`Template state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return a}function _e(e,t,n){const r=Me(e,t,n).hostBrick.element;if(!r)throw new Error(`Template host element is gone when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return r}const Be=new Map,Le=new Proxy(Object.freeze({}),{get:(e,t)=>Be.get(t)}),$e=function(){const e=k();if(e)return function(t,n,r){return e.getRuntime().registerWidgetFunctions(t,n,r)}}()||function(e,t,n){if(Be.has(e))throw new Error(`Widget functions of "${e}" already registered`);const{storyboardFunctions:r,registerStoryboardFunctions:o}=pe({widgetId:e,widgetVersion:n});Be.set(e,r),o(t)},Ne=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ue=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Ne);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Fe=e=>"*"===e||"x"===e||"X"===e,je=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},De=(e,t)=>{if(Fe(e)||Fe(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(je(e),je(t));return n>r?1:n<r?-1:0},Ke=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=De(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},Ve=(e,t,n)=>{qe(n);const r=((e,t)=>{const n=Ue(e),r=Ue(t),o=n.pop(),a=r.pop(),i=Ke(n,r);return 0!==i?i:o&&a?Ke(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return We[n].includes(r)},We={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},He=Object.keys(We),qe=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===He.indexOf(e))throw new Error(`Invalid operator, expected one of ${He.join("|")}`)};function ze(e,t){let n=la(e);if(!n&&null!=Qo&&Qo.checkInstalledApps&&(n=Qo.checkInstalledApps.getCheckedApp(e)),!n||"running"===n.installStatus)return!1;if(!t||!n.currentVersion)return!0;const r=t.match(/^([><]=?|=)(.*)$/);try{if(!r)throw new TypeError(`Invalid match version: ${t}`);return Ve(n.currentVersion,r[2],r[1])}catch(e){console.error(e)}return!1}function Ge(e,t,n){let{formStateStoreId:r,formStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of form renderer${n??""}`);const a=o.get(r);if(!a)throw new Error(`Form state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return a}const Ye=new Map;async function Je(e){var t;const n=null==Qo||null===(t=Qo.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);n&&(e=Qo.flowApi.FLOW_API_PROVIDER);let r=Ye.get(e);if(r)return r;if(e.includes("-")&&!customElements.get(e))if(n)Qo.flowApi.registerFlowApiProvider();else if(await(0,d.loadBricksImperatively)([e],aa()),!customElements.get(e))throw new Error(`Provider not defined: "${e}".`);return r=document.createElement(e),Ye.set(e,r),r}let Qe=new WeakSet;function Xe(e){if((0,f.isObject)(e)&&!Ze(e))if(Qe.add(e),Array.isArray(e))e.forEach(Xe);else{const t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Xe)}}function Ze(e){return Qe.has(e)}const et=new Map;async function tt(e,t,n){const{useProvider:r,method:o="resolve",args:a=[],onReject:i}=e,{provider:s,field:c}=e;if(s&&!r)throw new Error(`You're using "provider: ${s}" which is dropped in v3, please use "useProvider" instead`);const l=null!=c;if(l){const e=Re();if(Te(e,"`resolve.field`"),e)throw new Error("Using deprecated `resolve.field`")}const[u,d]=await Promise.all([Je(r),gt(a,t)]),f=null==n?void 0:n.renderId,p=nt(u,r,o,d,n,a,!!f&&f!==ia());let h,{transform:g}=e;try{const e=await p;h=l?(0,m.get)(e,c):e,Xe(h)}catch(e){if(!function(e){return!(null==e||!e.transform)}(i))throw e;g=i.transform,h=e}return g?"string"==typeof g?{[g]:h}:gt(g,{...t,data:h}):h}async function nt(e,t,n,r,o,a,i){let s,c;try{s=JSON.stringify({useProvider:t,method:n,args:r})}catch(e){if(!a)throw e;s=JSON.stringify({useProvider:t,method:n,originalArgs:a})}return"reload"!==(null==o?void 0:o.cache)&&(c=et.get(s)),c||(c=(async o=>{const a=null!=Qo&&null!==(o=Qo.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?await Qo.flowApi.getArgsOfFlowApi(t,r,n):r;return e[n](...a)})(),i||et.set(s,c)),c}const rt=Symbol.for("pre.evaluated.raw"),ot=Symbol.for("pre.evaluated.context");function at(e){return!(null==e||!e[rt])}function it(e){return e[rt]}function st(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[rt])}const ct=new WeakSet([SyntaxError,TypeError,ReferenceError]);function lt(e){return ct.has(e.constructor)?e.constructor:TypeError}function ut(e,t,n){const{run:r}=dt(e,t,n,!1);return r()}function dt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const o=[];if("string"!=typeof e){const n=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t={...e[ot],...n},e=e[rt]}const a={usedArgs:new Set},i={usedArgs:new Set};let s;try{s=(0,T.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,O.collectAppGetMenuUsage)(a,e,t),(0,O.collectInstalledAppsHasUsage)(i,e,t)}}})}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}if(a.hasNonStaticUsage)throw new Error(`Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "${e}"`);if(i.hasNonStaticUsage)throw new Error(`Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "${e}"`);const c={},{attemptToVisitGlobals:l}=s;if(n.lazy||l.has("EVENT")&&!(0,f.hasOwnProperty)(t,"event")||l.has("DATA")&&!(0,f.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[rt]:e,[ot]:t}:e};let u,p,h,g;const v=Re(t);let b,y;(l.has("STATE")||!v&&l.has("TPL"))&&(g=Me(t,"STATE",`: "${e}"`)),l.has("FORM_STATE")&&(y=Ge(t,"FORM_STATE",`: "${e}"`));const w=W();if(r||w){if(l.has("CTX")&&(u=(0,O.strictCollectMemberUsage)(e,"CTX"),r&&o.push(t.ctxStore.waitFor(u))),g){if(h=(0,O.strictCollectMemberUsage)(e,"STATE"),!v){const t=(0,O.strictCollectMemberUsage)(e,"TPL");for(const e of t)h.add(e)}r&&o.push(g.waitFor(h))}y&&(b=(0,O.strictCollectMemberUsage)(e,"FORM_STATE"),r&&o.push(y.waitFor(b))),l.has("PROCESSORS")&&(p=(0,O.strictCollectMemberUsage)(e,"PROCESSORS",2),r&&o.push((0,d.loadProcessorsImperatively)(p,aa())))}if(r){let n=l.has("PERMISSIONS");if(!n&&l.has("FN")){const t=[...(0,O.strictCollectMemberUsage)(e,"FN")];n=me(t)}if(n&&o.push(...t.pendingPermissionsPreCheck),a.usedArgs.size>0&&null!=Qo&&Qo.menu){const e=[...a.usedArgs];o.push(Promise.all(e.map((e=>Qo.menu.fetchMenuById(e,t,{getStoryboardByAppId:ca,resolveData:tt,asyncComputeRealValue:gt})))))}var A;i.usedArgs.size>0&&o.push(null==Qo||null===(A=Qo.checkInstalledApps)||void 0===A?void 0:A.waitForCheckingApps([...i.usedArgs]))}return{blockingList:o,run(){var n,r;const{app:o,location:a,query:i,match:d,flags:w,sys:A,ctxStore:S,data:E,event:k}=t,I=t.overrideApp??o;for(const o of l)switch(o){case"ANCHOR":c[o]=a.hash?a.hash.substring(1):null;break;case"APP":if(null==I)throw new ReferenceError(`APP is not defined, in "${e}"`);c[o]={...(0,m.cloneDeep)(I),getMenu:null==Qo||null===(n=Qo.menu)||void 0===n?void 0:n.getMenuById};break;case"CTX":c[o]=G({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(u)});break;case"DATA":c[o]=E;break;case"EVENT":c[o]=k;break;case"FLAGS":c[o]=z(w);break;case"FORM_STATE":c[o]=G({get:(e,t)=>y.getValue(t),ownKeys:()=>Array.from(b)});break;case"HASH":c[o]=a.hash;break;case"INSTALLED_APPS":c[o]=z({has:ze});break;case"ITEM":case"INDEX":{const n="ITEM"===o?"forEachItem":"forEachIndex";(0,f.hasOwnProperty)(t,n)?c[o]=t[n]:console.error(`Using \`${o}\` but no \`:forEach\` is found, check your expression: "${e}"`);break}case"LOCAL_STORAGE":c[o]=z({getItem:Ce("local")});break;case"MEDIA":c[o]=z(Ie());break;case"MISC":c[o]=Zo().getMiscSettings();break;case"PARAMS":if(null==i)throw new ReferenceError(`PARAMS is not defined, in "${e}"`);c[o]=new URLSearchParams(i);break;case"PATH":c[o]=z((null==d?void 0:d.params)??{});break;case"PATH_NAME":c[o]=a.pathname;break;case"PROCESSORS":c[o]=G({get(e,t){const n=_.get(t);if(!n)throw new Error(`'PROCESSORS.${t}' is not registered! Have you installed the relevant brick package?`);return G({get:(e,t)=>n.get(t),ownKeys:()=>Array.from(n.keys())})},ownKeys(){const e=new Set;for(const t of p){const n=t.split(".")[0];e.add(n)}return Array.from(e)}});break;case"QUERY":if(null==i)throw new ReferenceError(`QUERY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(i.keys()).map((e=>[e,i.get(e)])));break;case"QUERY_ARRAY":if(null==i)throw new ReferenceError(`QUERY_ARRAY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(i.keys()).map((e=>[e,i.getAll(e)])));break;case"SESSION_STORAGE":c[o]=z({getItem:Ce("session")});break;case"TPL":if(Te(v,'Using "TPL" in expression',`check your expression: "${e}"`),v)break;case"STATE":c[o]=G({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":c[o]=z(A??{});break;case"__WIDGET_FN__":c[o]=Le;break;case"__WIDGET_IMG__":c[o]=null==Qo||null===(r=Qo.images)||void 0===r?void 0:r.widgetImagesFactory;break;case"__WIDGET_I18N__":c[o]=$}Object.assign(c,le(s.attemptToVisitGlobals,{storyboardFunctions:he,app:I,appendI18nNamespace:t.appendI18nNamespace}));try{const t=(0,T.cook)(s.expression,s.source,{globalVariables:(0,P.supply)(s.attemptToVisitGlobals,c)});return V("evaluation",{raw:e,context:c,result:t}),t}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}}}}let ft=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 pt(e){switch(e){case ft.USE_BRICK_PROPERTIES:case ft.USE_BRICK_TRANSFORM:case ft.USE_BRICK_EVENTS:case ft.USE_BRICK_IF:case ft.USE_BRICK_LIFECYCLE:case ft.USE_BRICK_DATA_SOURCE:return!0}return!1}function ht(e,t,n){if(pt(e))return e;if(t)switch(e){case ft.USE_BRICK:return ft.USE_BRICK_ITEM;case ft.USE_BRICK_SLOTS_ITEM_BRICKS:return ft.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case ft.INITIAL:if("useBrick"===n)return ft.USE_BRICK;break;case ft.USE_BRICK:case ft.USE_BRICK_ITEM:case ft.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(n){case"properties":return ft.USE_BRICK_PROPERTIES;case"transform":return ft.USE_BRICK_TRANSFORM;case"dataSource":return ft.USE_BRICK_DATA_SOURCE;case"events":return ft.USE_BRICK_EVENTS;case"slots":return ft.USE_BRICK_SLOTS;case"children":return ft.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return ft.USE_BRICK_IF;case"lifeCycle":return ft.USE_BRICK_LIFECYCLE}break;case ft.USE_BRICK_SLOTS:return ft.USE_BRICK_SLOTS_ITEM;case ft.USE_BRICK_SLOTS_ITEM:if("bricks"===n)return ft.USE_BRICK_SLOTS_ITEM_BRICKS}return ft.INITIAL}async function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=at(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&pt(n.$$stateOfUseBrick);let a,i=o;return r||(0,T.isEvaluable)(e)?(a=await async function(e,t,n){const{blockingList:r,run:o}=dt(e,t,n,!0);return await Promise.all(r),o()}(e,t,{lazy:o}),i=st(e)):a=o?e:((0,f.hasOwnProperty)(t,"data")?n.noInject?x.transform:x.transformAndInject:n.noInject?bt:x.inject)(e,t),i||Xe(a),a}if(!(0,f.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return Promise.all(e.map((e=>gt(e,t,r))))}return Object.fromEntries((await Promise.all(Object.entries(e).map((e=>{let[r,o]=e;return Promise.all([gt(r,t),gt(o,t,vt(n,!1,r))])})))).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=at(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&pt(n.$$stateOfUseBrick);let a,i=o;return r||(0,T.isEvaluable)(e)?(a=ut(e,t),i=st(e)):a=o?e:((0,f.hasOwnProperty)(t,"data")?n.noInject?x.transform:x.transformAndInject:n.noInject?bt:x.inject)(e,t),i||Xe(a),a}if(!(0,f.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return e.map((e=>mt(e,t,r)))}return Object.fromEntries(Object.entries(e).map((e=>{let[r,o]=e;return[mt(r,t),mt(o,t,vt(n,!1,r))]})).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function vt(e,t,n){return e.$$lazyForUseBrick?{...e,$$stateOfUseBrick:ht(e.$$stateOfUseBrick,t,n)}:e}function bt(e){return e}async function yt(e,t){return!(0,f.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||at(e.if)?await gt(e.if,t):e.if)}function wt(e,t){return!(0,f.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||at(e.if)?mt(e.if,t):e.if)}function At(e){return!(0,f.hasOwnProperty)(e,"if")||!!e.if}const St=function(){const e=k();if(e)return e.looseCheckIfByTransform}()||function(e,t){return wt(e,{data:t})};function Et(e){let t=!1,n=!1,r=!1;if("string"==typeof e?(0,T.isEvaluable)(e):at(e)){const o="string"==typeof e?e:it(e);if((0,T.isTrackAll)(o)){const e=(0,O.trackAll)(o);e&&(t=e.context,n=e.state,r=e.formState)}else t=(0,O.track)(o,"track context","CTX"),n=(0,O.track)(o,"track state","STATE"),r=(0,O.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:n,formStateNames:r}}async function kt(e,t){for(const[n,r,o]of e)if(n===t){const e=await r;if(void 0!==e||!o)return e}}async function It(e){const t={};for(const[n,r,o]of e){const e=await r;void 0===e&&o||!("style"!==n&&"dataset"!==n||(0,f.isObject)(e))||(t[n]=e)}return t}function Ct(e,t){if(t)for(const[n,r]of Object.entries(t))switch(n){case"style":case"dataset":for(const[t,o]of Object.entries(r))e[n][t]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error(`set \`${n}\` is prohibited`);default:e[n]=r}}function Rt(e,t,n){const r=function(e,t){return(0,f.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;const o=mt(r,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?ft.USE_BRICK:ft.INITIAL});if("style"!==n&&"dataset"!==n||(0,f.isObject)(o))return[n,o]})).filter(Boolean)):{}}(t,n);Array.isArray(e)||(e=[e]),e.forEach((e=>{Ct(e,r)}))}function Tt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ot(e){return e&&e.sensitive?"":"i"}function xt(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,a=n.start,i=void 0===a||a,s=n.end,c=void 0===s||s,l=n.encode,u=void 0===l?function(e){return e}:l,d=n.delimiter,f=void 0===d?"/#?":d,p=n.endsWith,h="[".concat(Tt(void 0===p?"":p),"]|$"),g="[".concat(Tt(f),"]"),m=i?"^":"",v=0,b=e;v<b.length;v++){var y=b[v];if("string"==typeof y)m+=Tt(u(y));else{var w=Tt(u(y.prefix)),A=Tt(u(y.suffix));if(y.pattern)if(t&&t.push(y),w||A)if("+"===y.modifier||"*"===y.modifier){var S="*"===y.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(y.pattern,")(?:").concat(A).concat(w,"(?:").concat(y.pattern,"))*)").concat(A,")").concat(S)}else m+="(?:".concat(w,"(").concat(y.pattern,")").concat(A,")").concat(y.modifier);else"+"===y.modifier||"*"===y.modifier?m+="((?:".concat(y.pattern,")").concat(y.modifier,")"):m+="(".concat(y.pattern,")").concat(y.modifier);else m+="(?:".concat(w).concat(A,")").concat(y.modifier)}}if(c)o||(m+="".concat(g,"?")),m+=n.endsWith?"(?=".concat(h,")"):"$";else{var E=e[e.length-1],k="string"==typeof E?g.indexOf(E[E.length-1])>-1:void 0===E;o||(m+="(?:".concat(g,"(?=").concat(h,"))?")),k||(m+="(?=".concat(g,"|").concat(h,")"))}return new RegExp(m,Ot(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,a="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--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(n));if(!a)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:a}),n=s}else{for(var i="",s=n+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(n));t.push({type:"NAME",index:n,value:i}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,a="[^".concat(Tt(t.delimiter||"/#?"),"]+?"),i=[],s=0,c=0,l="",u=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var r=n[c],o=r.type,a=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", expected ").concat(e))},f=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var p=u("CHAR"),h=u("NAME"),g=u("PATTERN");if(h||g){var m=p||"";-1===o.indexOf(m)&&(l+=m,m=""),l&&(i.push(l),l=""),i.push({name:h||s++,prefix:m,suffix:"",pattern:g||a,modifier:u("MODIFIER")||""})}else{var v=p||u("ESCAPED_CHAR");if(v)l+=v;else if(l&&(i.push(l),l=""),u("OPEN")){m=f();var b=u("NAME")||"",y=u("PATTERN")||"",w=f();d("CLOSE"),i.push({name:b||(y?s++:""),pattern:b&&!y?a:y,prefix:m,suffix:w,modifier:u("MODIFIER")||""})}else d("END")}}return i}(e,n),t,n)}function Pt(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return Pt(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),Ot(n))}(e,t,n):xt(e,t,n)}const Mt=new Map,_t=1e4;let Bt=0;function Lt(e,t){const{path:n,exact:r=!1,strict:o=!1,sensitive:a=!0}=t;return(Array.isArray(n)?n:[n]).reduce(((t,n)=>{if(t)return t;const{regexp:i,keys:s}=function(e,t){const n=`${t.end}${t.strict}${t.sensitive}`;let r=Mt.get(n);r||Mt.set(n,r=new Map);const o=r.get(e);if(o)return o;const a=[],i={regexp:Pt(e,a,t),keys:a};return Bt<_t&&(r.set(e,i),Bt++),i}(n,{end:r,strict:o,sensitive:a}),c=i.exec(e);if(!c)return null;const[l,...u]=c,d=e===l;return r&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:s.reduce(((e,t,n)=>(e[t.name]=u[n],e)),{})}}),null)}function $t(e,t,n){return Lt(n,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}const Nt=Symbol.for("tpl.asyncComputedPropsFromHost"),Ut=Symbol.for("tpl.stateStoreId"),Ft=Symbol.for("tpl.externalForEachItem"),jt=Symbol.for("tpl.externalForEachIndex"),Dt=Symbol.for("tpl.externalNoForEach"),Kt=new Set;let Vt=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}({});const Wt={[Vt.REQUEST_FAILED]:"Request Failed",[Vt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Vt.NETWORK_ERROR]:"Network error, please check your network."},Ht={[Vt.REQUEST_FAILED]:"请求失败",[Vt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Vt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},qt="core/runtime",zt={en:Wt,zh:Ht};let Gt;const Yt=Object.freeze({show:function(e){if(Gt)return Gt.resolve(e);if("confirm"===e.type){const t=confirm(e.content);return new Promise(((e,n)=>setTimeout((()=>{(t?e:n)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function Jt(e){const{search:t,pathname:n}=e,r=n?window.btoa(encodeURIComponent(n)):"",o=t?window.btoa(encodeURIComponent(t)):"";document.cookie=`SALOGINPATH=${r}; path=/`,document.cookie=`SALOGINQUERY=${o}; path=/`}function Qt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof R.HttpFetchError)return u.i18n.t(`${qt}:${Vt.NETWORK_ERROR}`);if(e instanceof R.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function Xt(e){return e instanceof R.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}let Zt,en,tn=!1;function nn(e){if(e instanceof R.HttpAbortError)return;if(Xt(e)&&!window.NO_AUTH_GUARD){if(tn)return;return tn=!0,void Yt.show({type:"confirm",content:u.i18n.t(`${qt}:${Vt.LOGIN_TIMEOUT_MESSAGE}`)}).then((()=>{!function(){const e=Zo().getFeatureFlags()["sso-enabled"],t=C();Jt(t.location),t.push(e?"/sso-auth/login":"/auth/login",{from:{...t.location,state:void 0}})}(),tn=!1}),(()=>{tn=!1}))}console.error(e);const t=Qt(e);t!==Zt&&(Zt=t,Yt.show({type:"error",title:u.i18n.t(`${qt}:${Vt.REQUEST_FAILED}`),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{Zt=void 0})))}const rn=Object.freeze({show:function(e){en?en.resolve(e):alert(e.message)}});function on(e,t,n){t&&Object.entries(t).forEach((t=>{let[r,o]=t;const a=un(o,n,{element:e});e.addEventListener(r,a),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([r,a]),e.$$eventListeners||(e.$$eventListeners=[]);for(const t of[].concat(o))e.$$eventListeners.push([r,null,t])}))}function an(e){return"string"==typeof e.action}function sn(e){return"string"==typeof e.useProvider}function cn(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ln(e){return!!e.then}function un(e,t,n){return function(r){for(const o of[].concat(e))if(wt(o,{...t,event:r}))if(ln(o))un(o.then,t,n)(r);else if(an(o)){const[e,a]=o.action.split(".");switch(o.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":hn(r,a,o.args,o.callback,t);break;case"window.open":gn(r,o.args,t);break;case"location.reload":case"location.assign":wn(r,a,o.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":An(r,e,a,o.args,t);break;case"event.preventDefault":r.preventDefault();break;case"event.stopPropagation":r.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":Sn(r,a,o.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":En(r,a,o.args,t);break;case"handleHttpError":nn(r.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":vn(r,a,o.args,o.batch??!0,o.callback,t);break;case"state.update":case"state.refresh":case"state.load":bn(r,a,o.args,o.batch??!0,o.callback,t);break;case"tpl.dispatchEvent":{const[e,n]=Cn(o.args,t,r);_e(t,o.action,`: ${e}`).dispatchEvent(new CustomEvent(e,n));break}case"formstate.update":yn(r,o.args,o.callback,t);break;case"message.subscribe":case"message.unsubscribe":kn(r,a,o.args,t,n,o.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===o.action?"dark":"light");break;case"theme.setTheme":{const[e]=Cn(o.args,t,r);te(e);break}case"mode.setDashboardMode":case"mode.setDefaultMode":se("mode.setDashboardMode"===o.action?"dashboard":"default");break;default:console.error("unknown event listener action:",o.action)}}else sn(o)?dn(r,o,t,n):cn(o)?fn(r,o,t,n):console.error("unknown event handler:",o);else o.else&&un(o.else,t,n)(r)}}async function dn(e,t,n,r){try{pn(e,await Je(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",n,r)}catch(e){console.error(Qt(e))}}function fn(e,t,n,r){let o=[];const a=t.target,i=t.targetRef;let s=a;if(("string"==typeof a?(0,T.isEvaluable)(a):at(a))&&(s=mt(a,{...n,event:e})),"string"==typeof s)if("_self"===s)o.push(r.element);else if(t.multiple)o=Array.from(document.querySelectorAll(s));else{const e=document.querySelector(s);null!==e&&o.push(e)}else if(s)s instanceof HTMLElement?o.push(s):console.error("unexpected target:",s);else if(i){let t=i;("string"==typeof i?(0,T.isEvaluable)(i):at(i))&&(t=mt(i,{...n,event:e}));const r=[].concat(t),a=_e(n,"targetRef",`: ${r.join(", ")}`);o.push(...r.map((e=>{var t;return null===(t=a.$$getElementByRef)||void 0===t?void 0:t.call(a,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((o=>{pn(e,o,t,t.method,n,r,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Rt(o,t.properties,{...n,event:e}):console.error("target not found:",a||i)}async function pn(e,t,n,r,o,a,i){if("function"!=typeof t[r])return void console.error("target has no method:",{target:t,method:r});const s=async()=>{var a;let s=Cn(n.args,o,e,i);var c;return sn(n)&&null!=Qo&&null!==(a=Qo.flowApi)&&void 0!==a&&a.isFlowApiProvider(n.useProvider)&&(s=await Qo.flowApi.getArgsOfFlowApi(n.useProvider,s,r,null===(c=n.sse)||void 0===c?void 0:c.stream)),t[r](...s)};if(!n.callback)return void s();const c=In(n.callback,o,a),l={progress:c("progress"),success:c("success"),error:c("error"),finally:c("finally")};if(sn(n)){var u,d;const t={...o,event:e};if(mt(null===(u=n.sse)||void 0===u?void 0:u.stream,t))return void async function(e,t){let{progress:n,success:r,error:o,finally:a}=t;const i=ia();try{const t=await e();for await(const e of t){if(i!==ia())return;null==n||n(e)}if(i!==ia())return;null==r||r()}catch(e){if(i!==ia())return;null==o||o(e)}finally{null==a||a()}}(s,l);if(mt(null===(d=n.poll)||void 0===d?void 0:d.enabled,t))return void function(e,t,n,r){let{progress:o,success:a,error:i,finally:s}=t;const{expectPollStopImmediately:c,expectPollEnd:l}=n,{interval:u,leadingRequestDelay:d,continueOnError:f,delegateLoadingBar:p}=mt((0,m.pick)(n,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),r),h=ia();let g;async function v(){let t;Kt.delete(g);try{var n;if(t=null===(n=mt(c,r))||void 0===n?void 0:n(),t)null==s||s();else{var d;const n=await e(),i=null===(d=mt(c,r))||void 0===d?void 0:d();var m;t=i||h!==ia(),t?i&&(null==s||s()):(null==o||o(n),null!==(m=mt(l,r))&&void 0!==m&&m(n)?(p&&window.dispatchEvent(new Event("request.end")),null==a||a(n),null==s||s()):b(u??3e3))}}catch(e){var v;const n=null===(v=mt(c,r))||void 0===v?void 0:v();t=n||h!==ia(),t?n&&(null==s||s()):(null==i||i(e),f?b(u??3e3):null==s||s())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}function b(e){g=setTimeout(v,e),Kt.add(g)}b(d??0),p&&window.dispatchEvent(new Event("request.start"))}(s,l,n.poll,t)}try{const e=await s();l.success(e)}catch(e){l.error(e)}finally{l.finally()}}function hn(e,t,n,r,o){let 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"}let c=[];if(a>0&&(c=Cn(n,o,e,{useEventDetailAsDefault:!0}),c.length=a),i&&r){const e=In(r,o,void 0);c.push((t=>{e(t?"error":"success")({blocked:t}),e("finally")({blocked:t})}))}C()[s](...c)}function gn(e,t,n){const[r,o,a]=Cn(t,n,e);window.open(r,o||"_self",a)}function mn(e,t,n,r,o,a){t?r.updateValues(e,n,(e=>Cn(e,o,a)[0])):e.forEach((e=>{const{name:t,value:i}=Cn([e],o,a)[0];r.updateValue(t,i,n)}))}function vn(e,t,n,r,o,a){if(!Array.isArray(n)||!n.every(f.isObject)||"assign"!==t&&"replace"!==t){const[r,i]=Cn(n,a,e);a.ctxStore.updateValue(r,i,t,o,a)}else mn(n,r,t,a.ctxStore,a,e)}function bn(e,t,n,r,o,a){if(Array.isArray(n)&&n.every(f.isObject)&&"update"===t)mn(n,r,"replace",Me(a,`state.${t}`,`: ${JSON.stringify(n)}`),a,e);else{const[r,i]=Cn(n,a,e);Me(a,`state.${t}`,`: ${r}`).updateValue(r,i,"update"===t?"replace":t,o,a)}}function yn(e,t,n,r){const[o,a]=Cn(t,r,e);Ge(r,"formstate.update",`: ${o}`).updateValue(o,a,"replace",n,r)}function wn(e,t,n,r){if("assign"===t){const[t]=Cn(n,r,e);location.assign(t)}else location[t]()}function An(e,t,n,r,o){const a="localStorage"===t?localStorage:sessionStorage,[i,s]=Cn(r,o,e);"setItem"===n?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function Sn(e,t,n,r){console[t](...Cn(n,r,e,{useEventAsDefault:!0}))}function En(e,t,n,r){const o=Cn(n,r,e,{useEventAsDefault:!0});rn.show({type:t,message:o[0]})}async function kn(e,t,n,r,o,a){const i=()=>{var o;const a=Cn(n,r,e);return null==Qo||null===(o=Qo.messageDispatcher)||void 0===o?void 0:o[t](...a)};if(!a)return void i();const s=In(a,r,o);try{const e=await i();s("success")(e)}catch(e){s("error")(e)}finally{s("finally")()}}function In(e,t,n){return function(r){return function(o){const a=null==e?void 0:e[r];if(a)try{const e=new CustomEvent(`callback.${r}`,{detail:o});un(a,t,n)(e)}catch(e){console.error(e)}else"error"===r&&console.error("Unhandled callback error:",o)}}}function Cn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?mt(e,{...t,event:n}):r.useEventAsDefault?[n]:r.useEventDetailAsDefault?[n.detail]:[]}function Rn(e){var t;const{ref:n,runtimeContext:r,element:o}=e;if(!n||!r.tplStateStoreId)return;const{hostBrick:a}=Me(r,"bindTemplateProxy"),i=a.tplHostMetadata;i.internalBricksByRef.set(n,e);const s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s)for(const[e,t]of Object.entries(s))if(t.ref===n){var c;const n=t=>{t.bubbles&&t.stopPropagation(),a.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},r=t.refEvent??e;o.addEventListener(r,n),(c=o).$$proxyListeners??(c.$$proxyListeners=[]),o.$$proxyListeners.push([r,n])}}function Tn(e){const{ref:t,runtimeContext:n,element:r}=e;if(null==n||!n.tplStateStoreId||!t)return;const{hostBrick:o}=Me(n,"unbindTemplateProxy");o.tplHostMetadata.internalBricksByRef.delete(t);for(const[e,t]of r.$$proxyListeners??[])r.removeEventListener(e,t);delete r.$$proxyListeners}let On=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.PLACEHOLDER=3]="PLACEHOLDER",e}({});function xn(e){e.replaceChildren()}function Pn(e,t){window.DISABLE_REACT_FLUSH_SYNC=!1;let n=e.child;const r=[];for(;n;){if(n.tag===On.BRICK){var o;const a=n.type;a.includes("-")&&!customElements.get(a)&&console.error(`Undefined custom element: ${a}`),"basic-bricks.script-brick"===a&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");const i=t&&n===e.child?t:document.createElement(a);n.element=i,n.slotId&&i.setAttribute("slot",n.slotId),n.iid&&(i.dataset.iid=n.iid),null!==(o=n.tplHostMetadata)&&void 0!==o&&o.tplStateStoreId&&(i.dataset.tplStateStoreId=n.tplHostMetadata.tplStateStoreId),Ct(i,n.properties),on(i,n.events,n.runtimeContext),n.tplHostMetadata&&(i.$$tplStateStore=Me({tplStateStoreId:n.tplHostMetadata.tplStateStoreId,tplStateStoreMap:n.runtimeContext.tplStateStoreMap},"mount")),Rn(n),n.portal?r.push(i):n.return&&(n.return.childElements||(n.return.childElements=[]),n.return.childElements.push(i))}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{var a;let e=n.return;for(;e;){var i;if(e.childElements)e.tag===On.ROOT?null===(i=e.container)||void 0===i||i.append(...e.childElements):e.element.append(...e.childElements),e.childElements=void 0;if(e.tag===On.ROOT&&r.length>0&&("function"==typeof e.createPortal?e.createPortal():e.createPortal).append(...r),e.sibling)break;e=e.return}n=null===(a=e)||void 0===a?void 0:a.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}const Mn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],_n=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"];var Bn=new WeakMap,Ln=new WeakMap,$n=new WeakMap,Nn=new WeakMap,Un=new WeakMap,Fn=new WeakMap,jn=new WeakMap,Dn=new WeakMap,Kn=new WeakMap,Vn=new WeakSet;class Wn{constructor(e,t){(0,o.A)(this,Vn),(0,a.A)(this,"scope",void 0),(0,a.A)(this,"unknownBricks",void 0),(0,a.A)(this,"renderId",void 0),(0,i.A)(this,Bn,void 0),(0,i.A)(this,Ln,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,i.A)(this,$n,new Map),(0,i.A)(this,Nn,void 0),(0,i.A)(this,Un,new Map),(0,i.A)(this,Fn,void 0),(0,i.A)(this,jn,void 0),(0,i.A)(this,Dn,new WeakMap),(0,i.A)(this,Kn,new Map),this.scope=e,this.unknownBricks=(null==t?void 0:t.unknownBricks)??"throw",(0,c.A)(Bn,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,c.A)(jn,this,e)}memoizeMenuRequestNode(e,t){(0,l.A)(Dn,this).set(e,t)}getMenuRequests(){const e=[];let t=(0,l.A)(jn,this);for(;t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var n;t&&!t.sibling;)t=t.return;t=null===(n=t)||void 0===n?void 0:n.sibling}return e}async reMergeMenuRequestNodes(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,l.A)(Dn,this).get(t);(0,l.A)(Dn,this).set(t,n);let o,a=e.child;for(;a&&a!==r;)o=a,a=a.sibling;o?(o.sibling=n,n.sibling=null==r?void 0:r.sibling):e.child=n,await(0,l.A)(Bn,this).mergeMenus(this.getMenuRequests())}reBailout(e){return(0,l.A)(Bn,this).bailout(e)}reCatch(e,t){return(0,l.A)(Bn,this).catch(e,t)}async didPerformIncrementalRender(e,t){let n=!1;const r=[];for(const{parentRoutes:o,callback:a}of[...(0,l.A)(Kn,this).values()].reverse()){const i=o[o.length-1];if(r.includes(i))continue;const s=await a(e,t);s&&r.push(...o.slice(0,-1)),!1!==s&&(n=!0)}return n}performIncrementalRender(e,t,n){(0,l.A)(Kn,this).set(e,{parentRoutes:t,callback:n})}registerBrickLifeCycle(e,t){if(!t)return;const n=[...Mn,..."page"===this.scope?_n:[]];for(const r of n){const n=t[r];n&&(0,l.A)(Ln,this)[r].push({brick:e,handlers:n})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}registerArbitraryLifeCycle(e,t){const n=(0,l.A)(Un,this).get(e);n?n.add(t):(0,l.A)(Un,this).set(e,new Set([t]))}memoize(e,t,n,r){(0,l.A)(Fn,this)||(0,c.A)(Fn,this,new WeakMap);const o=[e??"",...t].join(".");let a=(0,l.A)(Fn,this).get(r);a||(a=new Map,(0,l.A)(Fn,this).set(r,a)),a.set(o,{node:n,last:Yn(n),lastNormal:Jn(n),lastPortal:Xn(n)})}reRender(e,t,n,r){const o=[e??"",...t].join("."),a=(0,l.A)(Fn,this).get(r).get(o),{node:i,last:c,lastNormal:u,lastPortal:d}=a;let f;const p=[];if((null==i?void 0:i.tag)===On.PLACEHOLDER){var h,g;f=(null===(h=function(e){return Qn(e,!0)}(i))||void 0===h?void 0:h.element)??null;const e=null===(g=function(e){return Zn(e,!0)}(i))||void 0===g?void 0:g.element;e&&p.push(e)}else{var m,v;f=(null==u||null===(m=u.element)||void 0===m?void 0:m.nextSibling)??null;let e=null==d||null===(v=d.element)||void 0===v?void 0:v.nextSibling;for(;e&&(p.push(e),e instanceof HTMLElement&&"DIV"===e.tagName);)e=e.nextSibling}const b=Yn(n);let y;a.node=n,a.last=b,a.lastNormal=Jn(n),a.lastPortal=Xn(n);let w=r.child;for(;w&&w!==c;){if(w.sibling===i){y=w;break}w=w.sibling}const A=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:On.ROOT,container:A,createPortal:S,child:n};for(w=n;w;)w.return=E,w=w.sibling;const k=er(i,c);for((0,s.A)(Vn,this,Hn).call(this,k),Pn(E),y?y.sibling=n:r.child=n,b&&(b.sibling=null==c?void 0:c.sibling),w=n;w;)w.return=r,w=w.sibling;var I,C;if(r.tag===On.ROOT?null===(I=r.container)||void 0===I||I.insertBefore(A,f):null===(C=r.element)||void 0===C||C.insertBefore(A,f),S.childNodes.length>0){var R;let e=n;for(;e&&e.return;)e=e.return;if((null===(R=e)||void 0===R?void 0:R.tag)!==On.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");const t="function"==typeof e.createPortal?e.createPortal():e.createPortal;let r=null;for(const e of p)if(t.contains(e)){r=e;break}t.insertBefore(S,r)}const T=er(n,b);(0,s.A)(Vn,this,qn).call(this,T)}dispose(){for(const e of Object.values((0,l.A)(Ln,this)))e.length=0;for(const e of(0,l.A)($n,this).values()){for(const t of e)t.disconnect();e.length=0}(0,l.A)($n,this).clear(),(0,l.A)(Nn,this)&&(Ae.removeEventListener("change",(0,l.A)(Nn,this)),(0,c.A)(Nn,this,void 0)),(0,c.A)(Fn,this,void 0),(0,l.A)(Un,this).clear(),(0,l.A)(Kn,this).clear(),(0,c.A)(Dn,this,void 0)}dispatchBeforePageLoad(){(0,s.A)(Vn,this,zn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){const e=new CustomEvent("page.load");(0,s.A)(Vn,this,zn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,s.A)(Vn,this,zn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,s.A)(Vn,this,zn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){const{hash:e}=C().location;e&&"#"!==e?(0,s.A)(Vn,this,zn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,s.A)(Vn,this,zn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(const{brick:e,handlers:t}of(0,l.A)(Ln,this).onScrollIntoView)(0,s.A)(Vn,this,Gn).call(this,e,t)}initializeMediaChange(){(0,c.A)(Nn,this,(e=>{(0,s.A)(Vn,this,zn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:z(e.detail)}))})),Ae.addEventListener("change",(0,l.A)(Nn,this))}initializeMessageDispatcher(){var e;for(const{brick:e,handlers:n}of(0,l.A)(Ln,this).onMessage)for(const r of[].concat(n)){var t;null==Qo||null===(t=Qo.messageDispatcher)||void 0===t||t.onMessage(r.channel,(t=>{un(r.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:t}))}))}null==Qo||null===(e=Qo.messageDispatcher)||void 0===e||e.onClose((()=>{(0,s.A)(Vn,this,zn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,s.A)(Vn,this,zn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,s.A)(Vn,this,zn).call(this,"onUnmount",new CustomEvent("unmount"))}}function Hn(e){const t=[...Mn,..."page"===this.scope?_n:[]],n=[];for(const r of t){const t=(0,m.remove)((0,l.A)(Ln,this)[r],(t=>e.has(t.brick)));"onUnmount"===r&&n.push(...t)}for(const t of e){var r,o;const e=(0,l.A)($n,this).get(t);if(null!=e&&e.length){for(const t of e)t.disconnect();e.length=0,(0,l.A)($n,this).delete(t)}Tn(t),null===(r=t.element)||void 0===r||delete r.$$tplStateStore,null===(o=t.element)||void 0===o||o.remove()}const a=new CustomEvent("unmount");for(const{brick:e,handlers:t}of n)un(t,e.runtimeContext,e)(a)}function qn(e){const t=new CustomEvent("mount");for(const{brick:n,handlers:r}of(0,l.A)(Ln,this).onMount)e.has(n)&&un(r,n.runtimeContext,n)(t);for(const{brick:t,handlers:n}of(0,l.A)(Ln,this).onScrollIntoView)e.has(t)&&(0,s.A)(Vn,this,Gn).call(this,t,n)}function zn(e,t){for(const{brick:n,handlers:r}of(0,l.A)(Ln,this)[e])un(r,n.runtimeContext,n)(t);const n=(0,l.A)(Un,this).get(e);if(n)for(const e of n)e()}function Gn(e,t){const n=t.threshold??.1,r=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(un(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});r.observe(e.element);let o=(0,l.A)($n,this).get(e);o||(o=[],(0,l.A)($n,this).set(e,o)),o.push(r)}function Yn(e){let t=e;for(;null!==(n=t)&&void 0!==n&&n.sibling;){var n;t=t.sibling}return t}function Jn(e){return Qn(e,!1)}function Qn(e,t){let n,r=e;for(;r;){if(r.tag===On.BRICK&&!r.portal){if(t)return r;n=r}r=r.sibling}return n}function Xn(e){return Zn(e,!1)}function Zn(e,t){let n,r=e;for(;r;){if(r.tag===On.BRICK&&r.portal){if(t)return r;n=r}if(r.child)r=r.child;else if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&!e.sibling;)e=e.return;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}function er(e,t){const n=new Set;let r=e;for(;r;)if(r.tag===On.BRICK&&n.add(r),r.child)r=r.child;else{if(r===t)break;if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&e!==t&&!e.sibling;)e=e.return;if(e===t)break;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}const tr=Symbol.for("root.runtimeContext");async function nr(e,t,n){var r,o;const[a,i,s]=Hr({...e[tr]??sa(),data:t,pendingPermissionsPreCheck:[]});a.tplStateStoreMap??(a.tplStateStoreMap=new Map),a.formStateStoreMap??(a.formStateStoreMap=new Map);const c=new Wn("fragment"),l={tag:On.ROOT,createPortal:null},u=e.transform,d=Re();u&&Te(d,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);const f=await Kr(l,d&&!n?e:{errorBoundary:n,...e,properties:{...e.properties,...u}},a,c,[],{}),p=[...i,...s];if(await Wr(f,a,p),(null===(r=f.node)||void 0===r?void 0:r.tag)===On.PLACEHOLDER)throw new Error("The root brick of useBrick cannot be an ignored control node");if(null!==(o=f.node)&&void 0!==o&&o.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return l.child=f.node,{tagName:f.node?f.node.type:null,renderRoot:l,rendererContext:c,scopedStores:p}}function rr(e,t){let n,{renderRoot:r,rendererContext:o,scopedStores:a}=e;r.createPortal=()=>{const e=document.querySelector("#portal-mount-point");return n=document.createElement("div"),e.appendChild(n),n},Pn(r,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher();for(const e of a)e.mountAsyncData();return{portal:n}}function or(e,t){let{rendererContext:n}=e;t.portal&&(xn(t.portal),t.portal.remove()),n.dispatchOnUnmount(),n.dispose()}function ar(e,t,n){if(n)throw new Error("Legacy doTransform does not support options in v3");return mt(t,{...sa(),data:e},{noInject:!0})}function ir(e,t){const n=ca(e);Object.assign(n,{...t,meta:{...n.meta,...t.meta},$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1}),B(n)}function sr(e,t){const n=ca(e);let r=!1;const o=e=>`${e.path}.${e.exact}`,a=(e,n)=>e.map((e=>{const i=o(e);return"routes"===e.type?(e.routes=a(e.routes,n),e):i===n?(r=!0,t):e}));n.routes=a(n.routes,o(t)),r||n.routes.unshift(t)}function cr(e,t,n){const r=`${e}.${t.name}`;Pe.define(r,{bricks:t.bricks,proxy:t.proxy,state:t.state}),lr(e,t.name,n)}function lr(e,t,n){pr(e,`\${APP.homepage}/_dev_only_/template-preview/${t}`,[{brick:t,...(0,m.pick)(n,"properties","events","lifeCycle","context","slots","children")}])}function ur(e){return`\${APP.homepage}/_dev_only_/snippet-preview/${e}`}function dr(e,t){var n;pr(e,ur(t.snippetId),null!==(n=t.bricks)&&void 0!==n&&n.length?t.bricks:[{brick:"span"}],t.context)}const fr=dr;function pr(e,t,n,r){const{routes:o}=ca(e),a=o.findIndex((e=>e.path===t)),i={path:t,bricks:n,context:r,menu:!1,exact:!0};-1===a?o.unshift(i):o.splice(a,1,i)}function hr(e,t){let{tplStateStoreId:n}=t;const r=sa();return n?Me({...r,tplStateStoreId:n},"STATE").getValue(e):r.ctxStore.getValue(e)}function gr(e){let{tplStateStoreId:t}=e;const n=sa();return t?Me({...n,tplStateStoreId:t},"STATE").getAllValues():n.ctxStore.getAllValues()}function mr(e){return aa().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function vr(e){return(0,d.loadBricksImperatively)(e,aa())}function br(e){return(0,d.loadEditorsImperatively)(e,aa())}function yr(){return ia()}async function wr(e,t){let{appId:n,updateStoryboardType:r,collectUsedContracts:o}=t;const a=ca(n);let i;if("route"===r)i={routes:[e]};else if("template"===r)i={meta:{customTemplates:[e]}};else if("snippet"===r){var s;const t=ur(e.snippetId);i={routes:[null==a||null===(s=a.routes)||void 0===s?void 0:s.find((e=>e.path===t))]}}const c=[];return i&&o&&(await o(i)).forEach((e=>{var t;const[n,r,o]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=a&&null!==(t=a.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===r&&e.name===o))||c.push(e)})),c}async function Ar(e,t){let{tplStateStoreId:n}=t;const r={...sa(),tplStateStoreId:n};return e.resolve?tt(e.resolve,r,{cache:"reload"}):gt(e.value,r)}let Sr;const Er=[];function kr(e){Sr=e;const t=gr({tplStateStoreId:e.tplStateStoreId});Cr({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Ir(e){Er.push(e)}function Cr(e){setTimeout((()=>{for(const t of Er)try{t(e)}catch(t){console.error(`RealTimeDataInspectHook failed (${e.changeType}):`,t)}}))}const Rr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Tr{constructor(e,t,n,r){(0,a.A)(this,"type",void 0),(0,a.A)(this,"data",new Map),(0,a.A)(this,"changeEventType",void 0),(0,a.A)(this,"pendingStack",[]),(0,a.A)(this,"hostBrick",void 0),(0,a.A)(this,"stateStoreId",void 0),(0,a.A)(this,"batchUpdate",!1),(0,a.A)(this,"batchUpdateContextsNames",[]),(0,a.A)(this,"rendererContext",void 0),(0,a.A)(this,"routeMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=n,this.stateStoreId=r}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{let[t,{value:n}]=e;return[t,n]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(Sr){const{tplStateStoreId:n}=Sr;(n?"STATE"===this.type&&this.stateStoreId===n:"CTX"===this.type)&&Cr({changeType:"update",tplStateStoreId:n,detail:{name:e,value:t}})}}getAffectListByContext(e){const t=[e];return this.data.forEach(((e,n)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(n)&&t.push(...this.getAffectListByContext(n))})),t.shift(),[...new Set(t)]}updateValues(e,t,n){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");const r={},o={},a=[];e.forEach((e=>{const{name:o,value:i}=n([e]),s=this.data.get(o);a.push(...this.getAffectListByContext(o)),s&&(r[o]=s),this.updateValue(o,i,t)})),a.filter((e=>!r[e])).forEach((e=>{const t=this.data.get(e);t&&(o[e]=t)}));const i=e=>{for(const n in e){var t;const r=e[n];null===(t=r.eventTarget)||void 0===t||t.dispatchEvent(new CustomEvent(this.changeEventType,{detail:r.value}))}};i(r),i(o),this.batchUpdate=!1}updateValue(e,t,n,r,o){const a=this.data.get(e);if(!a)throw new Error(`${this.type} '${e}' is not defined`);if("refresh"!==n&&"load"!==n)"replace"===n?a.value=t:(0,f.isObject)(a.value)?Object.assign(a.value,t):(console.warn(`Non-object current value of "${this.type}.${e}" for "context.assign", try "context.replace" instead.`),a.value=t),this.batchUpdate||a.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:a.value}));else{if(!a.useResolve)throw new Error(`You can not ${n} "${this.type}.${e}" which is not using resolve`);let i;"load"===n&&(a.loaded?i=Promise.resolve(a.value):a.loading&&(i=a.loading));const s=e=>{var t;let n;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(n=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&n!==ia()};if(i||(i=a.loading=a.load({cache:"load"===n?"default":"reload",...t}),i.then((e=>{this.finishLoad(a,e)}),(e=>{!a.useResolve||s(e)||null!=r&&r.error||nn(e)}))),r){const e=In(r,o);i.then((t=>{e("success")({value:t}),e("finally")()}),(t=>{!s(t)&&r.error&&e("error")(t),e("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,n,r){if(Array.isArray(e)&&e.length>0){const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX";const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",n=arguments.length>2?arguments[2]:void 0;const r=new Map;for(const o of e){const e=[o.if,o.value,o.resolve],a=(0,O.collectMemberUsage)(e,t);if(!n&&"STATE"===t){const t=(0,O.collectMemberUsage)(e,"TPL");for(const e of t.usedProperties)a.usedProperties.add(e);t.hasNonStaticUsage&&(a.hasNonStaticUsage=!0)}r.set(o,a)}return r}(e,n,arguments.length>3?arguments[3]:void 0),o=new Map;for(const e of Array.from(r.keys()).map((e=>e.name)))o.set(e,(o.get(e)??0)+1);const a=Array.from(r.values()).some((e=>e.hasNonStaticUsage)),i=new WeakSet,s=new Map,c=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,n)=>{s.set(e,{resolve:t,reject:n})}))]))),l=async e=>{i.add(e);const n=await t(e);r.delete(e);const a=o.get(e.name)??0;if(n){if(s.get(e.name).resolve(),o.delete(e.name),0===a)throw new Error(`Duplicated context defined: ${e.name}`)}else 1===a?(s.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,a-1);await d()};let u=a;async function d(){const e=Array.from(r.entries()).filter(function(e,t){return(n,r)=>t?0===r:![...n[1].usedProperties].some((t=>e.has(t)))}(o,u)).map((e=>e[0])).filter((e=>!i.has(e)));await Promise.all(e.map(l))}return{pendingResult:d().then((async()=>{r.size>0&&(function(e,t){const n=new Map(e),r=new Set(Array.from(n.keys()).map((e=>e.name))),o=()=>{let e=!1;for(const[t,o]of n.entries())[...o.usedProperties].some((e=>r.has(e)))||(n.delete(t),r.delete(t.name),e=!0);e&&o()};if(o(),n.size>0)throw new ReferenceError(`Circular ${t} detected: ${Array.from(n.keys()).map((e=>e.name)).join(", ")}`)}(r,n),u=!0,await d());for(const e of s.values())e.resolve()})).catch((e=>{for(const t of s.values())t.reject(e);throw e})),pendingContexts:c}}(e,(e=>this.resolve(e,t,n,r)),this.type,Re(t));this.pendingStack.push(o)}}onChange(e,t){var n;null===(n=this.data.get(e))||void 0===n||n.eventTarget.addEventListener(this.changeEventType,t)}async waitFor(e){for(const{pendingContexts:t}of this.pendingStack)await Promise.all([...e].map((e=>t.get(e))))}async waitForAll(){for(const{pendingContexts:e}of this.pendingStack)for(const t of e.values())t.catch((()=>{}));for(const{pendingResult:e}of this.pendingStack)await e}mountAsyncData(e){this.data.forEach((t=>{var n;if(t.async&&(!e||null!==(n=this.routeMap.get(e))&&void 0!==n&&n.has(t.name))){if(t.asyncMounted)return void console.error(`Async data "${t.name}" already mounted. This is a bug of Brick Next, please report it.`);t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}async resolve(e,t,n,r){if(!await yt(e,t))return!1;let o,a,i,s,c,l;if(n&&("STATE"===this.type?e.expose:"FORM_STATE"===this.type)&&(o=await kt(n,e.name)),void 0===o){if(e.resolve){const n=(0,f.hasOwnProperty)(e,"value");c=e.track&&n&&(0,f.hasOwnProperty)(e.resolve,"if")&&(0,O.strictCollectMemberUsage)(e.resolve.if,this.type).size>0;const r={transform:"value",...e.resolve};if(s=await yt(e.resolve,t),(s||c)&&(a=async e=>{var n;return(await tt(r,t,{...e,renderId:null===(n=this.rendererContext)||void 0===n?void 0:n.renderId})).value}),s)l=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager","eager"===l?o=await a():"async"===l&&(i=a());else if(!n)return!1}s&&"eager"===l||void 0===e.value||(o=await gt(e.value,t))}if(this.data.has(e.name))throw new Error(`${this.type} '${e.name}' has already been declared`);const u={name:e.name,value:o,eventTarget:new be,useResolve:s,load:a,loaded:"eager"===l,loading:i,async:"async"===l,deps:[]};if("lazy"===l){const{trigger:t}=e.resolve;var d;t&&Rr.includes(t)&&(null===(d=this.rendererContext)||void 0===d||d.registerArbitraryLifeCycle(t,(()=>{this.updateValue(e.name,void 0,"load")})))}if(e.onChange&&u.eventTarget.addEventListener(this.changeEventType,un(e.onChange,t)),e.track){const n=(0,O.strictCollectMemberUsage)(c?[e.resolve,e.value]:a?e.resolve:e.value,this.type);!a&&(u.deps=[...n]);for(const r of n)this.onChange(r,this.batchAddListener((()=>{u.useResolve=c?wt(e.resolve,t):!!a,u.useResolve?this.updateValue(e.name,{cache:"default"},"refresh"):this.updateValue(e.name,mt(e.value,t),"replace")}),e))}if(u.eventTarget.addEventListener(this.changeEventType,(t=>{this.notifyRealTimeDataChange(e.name,t.detail)})),this.data.set(e.name,u),Array.isArray(r))for(const t of r){const n=this.routeMap.get(t);n?n.add(e.name):this.routeMap.set(t,new Set([e.name]))}return!0}disposeDataInRoutes(e){for(const t of e){const e=this.routeMap.get(t);if(void 0!==e)for(const t of e)this.data.delete(t)}}batchAddListener(e,t){return n=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(n)}}}function Or(e,t,n){const{reversedProxies:r,asyncHostPropertyEntries:o,externalSlots:a,tplStateStoreId:i,hostBrick:s}=e;let c;if(t&&r){const i=r.properties.get(t);i&&(u=o,c=i.map((e=>{let{from:t,to:n}=e;const r=u.filter((e=>e[0]===t));if(r.length>0&&n.refProperty)return[n.refProperty,kt(r,t),!0]})).filter(Boolean));const d=r.slots.get(t);if(d&&a){const t=new Map;for(const{from:r,to:o}of d){var l;const i=(null===(l=a[r])||void 0===l?void 0:l.bricks)??[];if(!i.length)continue;const c=o.refSlot??r;let u=t.get(c);if(!u){u=[];const e=(0,f.hasOwnProperty)(n,c)?n[c].bricks.length+1:1;for(let t=0;t<e;t+=1)u.push([]);t.set(c,u)}const d=o.refPosition??-1,p=(0,f.hasOwnProperty)(s.runtimeContext,"forEachItem");u[(0,m.clamp)(d<0?u.length+d:d,0,u.length-1)].push(..."base-layout-v3.tpl-scroll-load-list"!==e.__temporary_tpl_tag_name&&"shrcb-homepage.tpl-custom-scroll-load-list"!==e.__temporary_tpl_tag_name||p?xr(i,p,s.runtimeContext.forEachItem,s.runtimeContext.forEachIndex):i)}for(const[e,r]of t.entries()){(0,f.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]});const t=n[e];t.bricks=r.flatMap(((e,n)=>n<t.bricks.length?e.concat(t.bricks[n]):e)),0===t.bricks.length&&delete n[e]}}}var u;return{[Nt]:c,[Ut]:i}}function xr(e,t,n,r){return e.map((e=>{let{children:o,slots:a,[Ft]:i,[jt]:s,[Dt]:c,...l}=e;return{...l,...t?{[Ft]:n,[jt]:r}:{[Dt]:!0},slots:":forEach"===l.brick?Gr(o,a):Object.fromEntries(Object.entries(Gr(o,a)??{}).map((e=>{let[o,a]=e;return[o,"routes"===a.type?{type:"routes",routes:Pr(a.routes,t,n,r)}:{type:"bricks",bricks:xr(a.bricks,t,n,r)}]})))}}))}function Pr(e,t,n,r){return e.map((e=>"routes"===e.type?{...e,routes:Pr(e.routes,t,n,r)}:"redirect"===e.type?e:{...e,bricks:xr(e.bricks,t,n,r)}))}function Mr(e,t){function n(e){return(0,f.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(n):Object.fromEntries(Object.entries(e).map((e=>{let[t,o]=e;return(0,f.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(r)]:[t,r(o)]:[t,n(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function r(e){const{properties:o,slots:a,children:i,...s}=e,c=Gr(i,a),l=Object.fromEntries(Object.entries(c??{}).map((e=>{let[t,n]=e;return[t,{type:"bricks",bricks:(n.bricks??[]).map(r)}]})));return{...s,properties:n(o),slots:l,...Or(t,s.ref,l)}}return n(e)}function _r(e,t,n,r,o){var a;const i=(0,m.uniqueId)("tpl-state-"),s={...n.runtimeContext,tplStateStoreId:i};delete s.forEachItem,delete s.forEachIndex,delete s.formStateStoreId;const c=new Tr("STATE",n,o,i);s.tplStateStoreMap.set(i,c),s.tplStateStoreScope&&s.tplStateStoreScope.push(c);const{bricks:l,proxy:u,state:d,contracts:f}=Pe.get(e);null==Qo||null===(a=Qo.flowApi)||void 0===a||a.collectWidgetContract(f),c.define(d,s,r);const{slots:p,children:h,...g}=t,v={...g,brick:e};n.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:i,proxy:u};const b={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(const[e,t]of Object.entries(u.properties)){let n=b.properties.get(t.ref);n||(n=[],b.properties.set(t.ref,n)),n.push({from:e,to:t})}if(null!=u&&u.slots)for(const[e,t]of Object.entries(u.slots)){let n=b.slots.get(t.ref);n||(n=[],b.slots.set(t.ref,n)),n.push({from:e,to:t})}const y={reversedProxies:b,asyncHostPropertyEntries:r,externalSlots:Gr(h,p),tplStateStoreId:i,hostBrick:n,__temporary_tpl_tag_name:e};return v.slots={"":{type:"bricks",bricks:l.map((e=>Br(e,y)))}},v}function Br(e,t){null===e.if&&delete e.if;const{properties:n,slots:r,children:o,...a}=e,i=Gr(o,r),s=Object.fromEntries(Object.entries(i??{}).map((e=>{let[n,r]=e;return[n,{type:"bricks",bricks:(r.bricks??[]).map((e=>Br(e,t)))}]})));return{...a,properties:Mr(n,t),slots:s,...Or(t,a.ref,s)}}const Lr="form-renderer.form-renderer",$r=Symbol.for("form.stateStoreId"),Nr=["forms.general-form","form.general-form","eo-form"];function Ur(e,t,n){const{id:r,bricks:o,events:a,context:i,mountPoint:s,instanceId:c}=e;let{brick:l,properties:u}=e;const d=t.find((e=>e.fieldId===r));if(d){const e=function(e){let t;const n={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},r=()=>{var t,n;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(n=e.limit)||void 0===n?void 0:n.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}}};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:{...n,...r()}};break;case"FLOAT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUM":t={brick:"forms.general-select",properties:{...n,...r(),options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUMS":t={brick:"forms.general-select",properties:{...n,...r(),mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:{...n,...r(),placeholder:e.description}};break;case"IP":t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}}};break;case"JSON":t={brick:"forms.general-textarea",properties:{...n}};break;case"ARRAY":t={brick:"forms.general-select",properties:{...n}};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:{...n,...r()}};break;default:t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description}}}return t}(d);l||(l=e.brick),u={...e.properties,...u}}const p={brick:l,properties:u,iid:c,slot:s,events:a,context:i,children:Fr(o,t,n),[$r]:n};return(0,f.hasOwnProperty)(e,"if")&&(p.if=e.if),p}function Fr(e,t,n){if(Array.isArray(e))return e.map((e=>Ur(e,t,n)))}async function jr(e,t,n,r,o,a,i,s){const c=await async function(e,t){for(const n of e){if("string"!=typeof n.path)throw console.error("Invalid route with invalid path:",n),new Error("Invalid route with invalid type of path: "+typeof n.path);const e=$t(n,t.app.homepage,t.location.pathname);if(e&&await yt(n,t))return t.app.noAuthGuard||n.public||null==Qo||!Qo.auth||Qo.auth.isLoggedIn()?{match:e,route:n}:"unauthenticated"}return"missed"}(t,n),l={blockingList:[]},u=l.menuRequestNode={return:a};switch(c){case"missed":break;case"unauthenticated":l.unauthenticated=!0;break;default:{var f;const a=l.route=c.route;l.path=c.match.path;const p={...n,match:c.match};s&&p.ctxStore.disposeDataInRoutes(t);const h=o.concat(a);p.ctxStore.define(a.context,p,void 0,h),p.pendingPermissionsPreCheck.push(null==Qo||null===(f=Qo.checkPermissions)||void 0===f?void 0:f.preCheckPermissionsForBrickOrRoute(a,(e=>gt(e,p))));const{preLoadBricks:g}=a;if(Array.isArray(g)&&l.blockingList.push((0,d.loadBricksImperatively)(g,aa())),"redirect"===a.type){let e;if(e="string"==typeof a.redirect?await gt(a.redirect,p):(await tt({transform:"redirect",...a.redirect},p)).redirect,"string"!=typeof e)throw console.error("Unexpected redirect result:",e),new Error("Unexpected type of redirect result: "+typeof e);l.redirect={path:e}}else{const n=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return gt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(a.menu,p);let o;n&&(u.request=n),s||r.memoizeMenuRequestNode(t,u),o="routes"===a.type?await jr(e,a.routes,p,r,h,u,i):await Dr(e,a.bricks,p,r,h,u,i),qr(l,o),zr(u,o.menuRequestNode)}}}return l}async function Dr(e,t,n,r,o,a,i,s,c){!function(e,t,n){function r(e){if((0,f.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(r);else for(const[t,n]of Object.entries(e))(0,f.isObject)(n)&&"useBrick"===t?Array.isArray(n)?n.forEach((e=>o(e,!0))):o(n,!0,!0):r(n)}function o(e,a,i){if(a&&(e[tr]=t),r(e.properties),n&&!i)return;const s=Gr(e.children,e.slots);for(const e of Object.values(s??{}))for(const t of e.bricks??[])o(t,a)}for(const t of e)o(t)}(t,n,!0);const l={blockingList:[]},u=c??[];return(await Promise.all(t.map(((t,c)=>Kr(e,t,n,r,o,a,i,u.concat(c),s&&new Map(s)))))).forEach(((t,n)=>{t.hasTrackingControls&&r.memoize(i,u.concat(n),t.node,e),qr(l,t)})),l}async function Kr(e,t,n,r,o,a,i){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Map;try{return await async function(e,t,n,r,o,a,i,s,c){var l,u;const p={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),p;const{if:h,permissionsPreCheck:g,...v}=t;if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):at(e)&&(0,T.isTrackAll)(it(e))}(h))return Kr(e,{brick:":if",dataSource:h,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[v]}},...Object.getOwnPropertySymbols(t).reduce(((e,n)=>({...e,[n]:t[n]})),{})},n,r,o,a,i,s,c);const y=t[Ut],w=t[$r],A={...n,tplStateStoreId:y,formStateStoreId:w};(0,f.hasOwnProperty)(t,Ft)?(A.forEachItem=t[Ft],A.forEachIndex=t[jt]):t[Dt]&&(delete A.forEachItem,delete A.forEachIndex);const{context:S}=t;if(Array.isArray(S)&&S.length>0){const e=Re(A);Te(e,"Defining context on bricks","check your brick:",t),e||A.ctxStore.define(S,A)}if(A.pendingPermissionsPreCheck.push(null==Qo||null===(l=Qo.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>gt(e,A)))),!await async function(e,t){return(0,f.isObject)(e.if)&&!at(e.if)?At(await tt(e.if,t)):yt(e,t)}(t,A))return p;const E=t.brick;if(E.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error(`Unknown storyboard control node: "${e}"`)}(E);const{dataSource:n}=t,l=async l=>{var u;const d=await gt(n,l),p=":forEach"===E?"":":switch"===E?String(d):d?"":"else",h=Gr(t.children,t.slots),g=h&&(0,f.hasOwnProperty)(h,p)&&(null===(u=h[p])||void 0===u?void 0:u.bricks);if(!Array.isArray(g))return{blockingList:[]};switch(E){case":forEach":return Array.isArray(d)?async function(e,t,n,r,o,a,i,s,c,l){const u={blockingList:[]},d=t.length,f=await Promise.all(t.map(((t,u)=>Promise.all(n.map(((n,f)=>Kr(e,n,{...r,forEachItem:t,forEachIndex:u},o,a,i,s,l.concat(u*d+f),c&&new Map(c))))))));return f.flat().forEach(((t,n)=>{t.hasTrackingControls&&o.memoize(s,l.concat(n),t.node,e),qr(u,t)})),u}(e,d,g,l,r,o,a,i,c,s):{blockingList:[]};case":if":case":switch":return Dr(e,g,l,r,o,a,i,c,s)}},u=async t=>{const n=await l(t);return n.node??(n.node={tag:On.PLACEHOLDER,return:e}),n},d=await u(A),{onMount:p,onUnmount:h}=t.lifeCycle??{},{contextNames:g,stateNames:v}=Et(n);if(g||v){d.hasTrackingControls=!0;let t=0;const o=async()=>{const n=++t,[o,a,c]=Hr(A),l=await u(o),d=[...a,...c];if(await Wr(l,o,d),t===n){h&&un(h,A)(new CustomEvent("unmount",{detail:{rerender:!0}})),r.reRender(i,s,l.node,e),p&&un(p,o)(new CustomEvent("mount",{detail:{rerender:!0}}));for(const e of d)e.mountAsyncData()}},a=(0,m.debounce)(o);if(g)for(const e of g)A.ctxStore.onChange(e,a);if(v)for(const e of v)Me(A,"STATE",`: "${n}"`).onChange(e,a)}return p&&r.registerArbitraryLifeCycle("onMount",(()=>{un(p,A)(new CustomEvent("mount",{detail:{rerender:!1}}))})),h&&r.registerArbitraryLifeCycle("onUnmount",(()=>{un(h,A)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),d}/\.tpl-/.test(E)&&!Pe.get(E)&&await Yr((0,d.loadBricksImperatively)([E],aa()),"brick",E,r.unknownBricks);const k=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){const n=`${t}.${e}`;if(Pe.get(n))return n}return!!Pe.get(e)&&e}(E,null===(u=A.app)||void 0===u?void 0:u.id);if(k){const e=c.get(k)??0;if(e>=10)throw new Error(`Maximum custom template stack overflowed: "${k}"`);c.set(k,e+1)}else E.includes("-")&&!customElements.get(E)&&(E===Lr?customElements.define(Lr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):p.blockingList.push(Yr((0,d.enqueueStableLoadBricks)([E],aa()),"brick",E,r.unknownBricks)));let I,C;E===Lr?({formData:I,...C}=t.properties??{}):C=t.properties;const R=[],x=function(e,t,n){return(0,f.isObject)(e)?Object.entries(e).map((e=>{let[r,o]=e;const{contextNames:a,stateNames:i,formStateNames:s}=Et(o);return(a||i||s)&&n.push({contextNames:a,stateNames:i,formStateNames:s,propName:r,propValue:o}),[r,gt(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?ft.USE_BRICK:ft.INITIAL})]})):[]}(C,A,R),P=t[Nt];P&&x.push(...P);const M="script"===E;if(M||"link"===E){const e=await It(x);if(M?e.src:"stylesheet"===e.rel&&e.href){const t=window.PUBLIC_ROOT??"";if(M){const{src:n,...r}=e;await Yr((0,d.loadScript)(n,t,r),"script",n,"silent")}else{const{href:n,...r}=e;await Yr((0,d.loadStyle)(n,t,r),"stylesheet",n,"silent")}return p}}const _={tag:On.BRICK,type:k||E,return:e,slotId:i,events:t.events,runtimeContext:A,portal:t.portal,iid:t.iid,ref:t.ref};p.node=_;const B=(0,O.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);B.size>0&&p.blockingList.push(Yr((0,d.loadProcessorsImperatively)(B,aa()),"processors",[...B].join(", "),r.unknownBricks));const L=[];L.push((async()=>{_.properties=await It(x),function(e,t){for(const n of t){const t=()=>{e.element&&Rt(e.element,{[n.propName]:n.propValue},e.runtimeContext)};if(n.contextNames)for(const r of n.contextNames)e.runtimeContext.ctxStore.onChange(r,t);if(n.stateNames){const r=Me(e.runtimeContext,"STATE",`: "${n.propValue}"`);for(const e of n.stateNames)r.onChange(e,t)}if(n.formStateNames){const r=Ge(e.runtimeContext,"FORM_STATE",`: "${n.propValue}"`);for(const e of n.formStateNames)r.onChange(e,t)}}}(_,R)})()),r.registerBrickLifeCycle(_,t.lifeCycle);let $,N=t;k?N=_r(k,t,_,x,r):E===Lr&&(N=function(e,t,n,r,o){var a;const i="string"==typeof e?JSON.parse(e):e,s=(0,m.uniqueId)("form-state-"),c={...n.runtimeContext,formStateStoreId:s};delete c.forEachItem,delete c.forEachIndex,delete c.tplStateStoreId;const l=new Tr("FORM_STATE",void 0,o,s);c.formStateStoreMap.set(s,l),c.formStateStoreScope&&c.formStateStoreScope.push(l);const u=i.context??[];u.some((e=>"params"===e.name))||u.push({name:"params"}),l.define(u,c,r);const d=Ur(i.formSchema,i.fields,s);return Nr.includes(d.brick)&&t.events&&(d.events=function(e,t){const n=e??{};for(const[e,r]of Object.entries(t))n[e]=(0,f.hasOwnProperty)(n,e)?[n[e],r].flat():r;return n}(d.events,t.events)),"boolean"!=typeof(null===(a=t.properties)||void 0===a?void 0:a.renderRoot)||t.properties.renderRoot?{...t,slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[d]}]}:{...t,slots:void 0,children:[d]}}(I,t,_,x,r)),N.portal&&(_.slotId=void 0),k?($={...A},delete $.forEachItem,delete $.forEachIndex):$=A;return L.push((async()=>{const e=Gr(N.children,N.slots);if(!e)return;const t=new Map,n=await Promise.all(Object.entries(e).map(((e,n)=>{let[i,s]=e;if("routes"!==s.type)return Dr(_,s.bricks,$,r,o,a,i,c);const l=o[o.length-1];return null!=l&&l.incrementalSubRoutes&&(t.set(n,i),r.performIncrementalRender(s,o,(async(e,t)=>{const{homepage:n}=$.app,{pathname:c}=e;if(!b(n,c)||!o.every((e=>{let r,o;return(r=$t(e,n,t.pathname))&&(o=$t(e,n,c))&&(e!==l||(0,m.isEqual)(r.params,o.params))})))return!1;const[u,d,f]=Hr({...$,location:e,query:new URLSearchParams(e.search)});let p,h=!1,g=[];try{if(p=await jr(_,s.routes,u,r,o,a,i,!0),p.route){if(r.reBailout(p))return!0;g=[...d,...f],await Wr(p,u,[u.ctxStore,...g])}await r.reMergeMenuRequestNodes(a,s.routes,p.menuRequestNode)}catch(e){console.error("Incremental sub-router failed:",e);const t=r.reCatch(e,_);if(!t)return!0;({failed:h,output:p}=t),await r.reMergeMenuRequestNodes(a,s.routes,p.menuRequestNode)}if(r.reRender(i,[],p.node,_),!h){u.ctxStore.mountAsyncData(p.route);for(const e of g)e.mountAsyncData()}return!!p.route||null}))),jr(_,s.routes,$,r,o,a,i)}))),i={...p,node:void 0,blockingList:[],menuRequestNode:void 0};n.forEach(((e,n)=>{t.has(n)&&r.memoize(t.get(n),[],e.node,_),qr(i,e),function(e,t){const n=t.menuRequestNode;if(n)if(e.menuRequestNode){let t=e.menuRequestNode;for(;t.sibling;)t=t.sibling;t.sibling=n}else e.menuRequestNode=n}(i,e)})),i.node&&(_.child=i.node),qr(p,{...i,node:void 0}),zr(a,p.menuRequestNode=i.menuRequestNode)})()),await Promise.all(L),p}(e,t,n,r,o,a,i,s,c)}catch(n){if(t.errorBoundary)return console.error("Error caught by error boundary:",n),{node:{tag:On.BRICK,type:"div",properties:{textContent:Qt(n),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:e},blockingList:[]};throw n}}function Vr(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function Wr(e,t,n){return(0,d.flushStableLoadBricks)(),Promise.all([...e.blockingList,...n.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function Hr(e){const t=[],n=[];return[{...e,tplStateStoreScope:t,formStateStoreScope:n},t,n]}function qr(e,t){const{blockingList:n,node:r,menuRequestNode:o,hasTrackingControls:a,...i}=t;if(e.blockingList.push(...n),r)if(e.node){let t=e.node;for(;t.sibling;)t=t.sibling;t.sibling=r}else e.node=r;Object.assign(e,i)}function zr(e,t){if(t)if(e.child){let n=e.child;for(;n.sibling;)n=n.sibling;n.sibling=t}else e.child=t}function Gr(e,t){let n=t;if(Array.isArray(e)&&!n){n={};for(const t of e){const e=t.slot??"";(0,f.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]}),n[e].bricks.push(t)}}return n}function Yr(e,t,n,r){return"silent"===r?e.catch((e=>{console.error('Load %s "%s" failed:',t,n,e)})):e}let Jr,Qr,Xr;function Zr(){if(!Jr){if(Jr={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){Jr.isInIframe=!0;try{if(window.origin===window.parent.origin){Jr.isInIframeOfSameSite=!0;const e="/next/"===g(),t=window.parent.location.pathname,n=t.startsWith("/next/");Jr.isInIframeOfNext=0==(Number(e)^Number(n)),Jr.isInIframeOfVisualBuilder=t.startsWith((n?"/next":"")+"/visual-builder/"),Jr.isInIframeOfLegacyConsole=e&&!n}}catch(e){}}Object.freeze(Jr)}return Jr}function eo(e){var t;if(e.$$registerCustomTemplateProcessed)return;e.$$registerCustomTemplateProcessed=!0;const n=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(n))for(const t of n){const n=t.name.includes(".")?t.name:`${e.app.id}.${t.name}`;Pe.define(n,t)}}function to(e){let t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}const no="basic.show-watermark";var ro=new WeakMap,oo=new WeakMap,ao=new WeakMap,io=new WeakMap,so=new WeakMap,co=new WeakMap,lo=new WeakMap,uo=new WeakMap,fo=new WeakMap,po=new WeakMap,ho=new WeakMap,go=new WeakMap,mo=new WeakSet;class vo{constructor(e){(0,o.A)(this,mo),(0,i.A)(this,ro,void 0),(0,i.A)(this,oo,!1),(0,i.A)(this,ao,void 0),(0,i.A)(this,io,void 0),(0,i.A)(this,so,void 0),(0,i.A)(this,co,void 0),(0,i.A)(this,lo,new Set),(0,i.A)(this,uo,0),(0,i.A)(this,fo,void 0),(0,i.A)(this,po,void 0),(0,i.A)(this,ho,void 0),(0,i.A)(this,go,void 0),(0,c.A)(ro,this,e);const t=C();window.addEventListener("beforeunload",(e=>{(0,s.A)(mo,this,bo).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,s.A)(mo,this,bo).call(this,{location:e,action:t})))}getRenderId(){return(0,l.A)(fo,this)}getRuntimeContext(){return(0,l.A)(so,this)}getRecentApps(){return{currentApp:(0,l.A)(po,this),previousApp:(0,l.A)(ho,this)}}getNavConfig(){return(0,l.A)(go,this)}bootstrap(){window.AbortController&&(Qr=new AbortController,R.http.interceptors.request.use((e=>{var t;return{...e,options:{...e.options,signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:Qr.signal}}})));const e=C();(0,c.A)(ao,this,e.location);let t=0;return e.listen((async(e,n)=>{var r,o,a,i;const u=++t;let d;const f={hash:void 0,state:void 0};var p;if(void 0!==e.key&&("POP"!==n||void 0!==(0,l.A)(ao,this).key&&!1!==(null===(r=(0,l.A)(ao,this).state)||void 0===r?void 0:r.notify))||(f.key=void 0),((0,h.locationsAreEqual)({...(0,l.A)(ao,this),...f},{...e,...f})||"POP"!==n&&!1===(null===(o=e.state)||void 0===o?void 0:o.notify))&&(d=!0),d||null!==(a=e.state)&&void 0!==a&&a.noIncremental||(d=await(null===(p=(0,l.A)(co,this))||void 0===p?void 0:p.didPerformIncrementalRender(e,(0,l.A)(ao,this)))),t===u)if(d)(0,c.A)(ao,this,e);else{if(Qr&&(Qr.abort(),Qr=new AbortController),(0,c.A)(ao,this,e),null===(i=(0,l.A)(co,this))||void 0===i||i.dispatchPageLeave(),"POP"===n&&y(v((0,l.A)(ro,this),e.pathname)))return void window.location.reload();(0,l.A)(oo,this)?(0,c.A)(io,this,e):(V("locationChange"),(0,s.A)(mo,this,wo).call(this,e).catch(nn))}})),(0,s.A)(mo,this,wo).call(this,e.location)}}function bo(e){var t;const n=C(),r=n.getBlockMessage();null===(t=(0,l.A)(co,this))||void 0===t||t.dispatchBeforePageLeave(e);const o=n.getBlockMessage();return!r&&o&&n.unblock(),o}function yo(e,t,n){var r,o;if((0,c.A)(uo,this,(r=(0,l.A)(uo,this),o=r++,r)),o>10){const t=`Infinite redirect detected: from "${n.pathname}${n.search}${n.hash}" to "${e}"`;throw new Error(t)}C().replace(e,t)}async function wo(e){(0,c.A)(oo,this,!0);try{await(0,s.A)(mo,this,Ao).call(this,e)}finally{if((0,c.A)(oo,this,!1),(0,l.A)(io,this)){const e=(0,l.A)(io,this);(0,c.A)(io,this,void 0),await(0,s.A)(mo,this,wo).call(this,e)}}}async function Ao(e){var t,n,r,o;const a=(0,c.A)(fo,this,(0,m.uniqueId)("render-id-"));Qe=new WeakSet,et.clear(),null==Qo||null===(t=Qo.flowApi)||void 0===t||t.clearCollectWidgetContract(),C().unblock();const i=null==Qo||null===(n=Qo.pageView)||void 0===n?void 0:n.create(),u=v((0,l.A)(ro,this),e.pathname),f=null===(r=(0,l.A)(so,this))||void 0===r?void 0:r.app,p=null==u||null===(o=u.app)||void 0===o?void 0:o.id;window.BOOTSTRAP_UNION_FILE&&p&&p!==(null==f?void 0:f.id)&&function(e){const{appId:t,version:n}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",n))}({appId:p,version:u.app.currentVersion}),null!=u&&u.app&&await async function(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=async function(e){var t;await(null==Qo||null===(t=Qo.fulfilStoryboard)||void 0===t?void 0:t.call(Qo,e)),B(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}(e)),e.$$fulfilling}(u);const h=(0,c.A)(po,this,null==u?void 0:u.app);!function(){var e,t,n,r,o;const a=Zo().getFeatureFlags(),i=Zo().getMiscSettings();if(!a["show-watermark"])return;const s="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),c=(null==Qo||null===(n=Qo.auth)||void 0===n||null===(n=n.getAuth())||void 0===n?void 0:n.username)??"",l=i.watermarkConfig??{flags:{}},u={content:[..."string"==typeof l.content?[l.content]:l.content??[],null!==(r=l.flags)&&void 0!==r&&r["show-development"]&&s?"Development":"",null!==(o=l.flags)&&void 0!==o&&o["show-user"]?c:""].filter(Boolean),zIndex:1001,width:200,font:{fontSize:28},gap:[190,190],...(0,m.omit)(l,["content","flags"])};Xr?Xr.resolve(u):(0,d.loadBricksImperatively)([no],aa()).then((()=>{Xr=document.createElement(no),Xr.resolve(u)}),(e=>{console.error("Load watermark service failed:",e)}))}();const g=f&&h?f.id!==h.id:f!==h,b=Zo().getFeatureFlags(),y=(0,l.A)(co,this),w=(t,n)=>{null==i||i({status:"redirected"}),(0,l.A)(lo,this).add(y),(0,s.A)(mo,this,yo).call(this,t,n,e)},A=()=>{const t=b["sso-enabled"]?"/sso-auth/login":"/auth/login";Jt(e),w(t,{from:e})},S=document.querySelector("#main-mount-point"),E=document.querySelector("#portal-mount-point"),k={tag:On.ROOT,container:S,createPortal:E},I=()=>{var e;xn(S),xn(E),(0,l.A)(lo,this).add(y);for(const e of(0,l.A)(lo,this))e&&(e.dispatchOnUnmount(),e.dispose());(0,l.A)(lo,this).clear(),null==Qo||null===(e=Qo.messageDispatcher)||void 0===e||e.reset(),g&&((0,c.A)(ho,this,f),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:f,currentApp:h}})))};if(X(h&&(re()[h.id]||h.theme)||"light"),ae("default"),h){var T,O,x,P,M,_;null==Qo||null===(T=Qo.checkInstalledApps)||void 0===T||T.preCheckInstalledApps(u,(e=>!!la(e)));const t={bailout:e=>e.unauthenticated?(A(),!0):e.redirect?(w(e.redirect.path,e.redirect.state),!0):void(0,c.A)(uo,this,0),mergeMenus:async e=>{const t=await Promise.all(e);(0,c.A)(go,this,function(e){const t={breadcrumb:[]};for(const n of e){const{breadcrumb:e}=n;e&&(e.overwrite?t.breadcrumb=e.items:t.breadcrumb.push(...e.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,l.A)(go,this)}))},catch:(t,n)=>{if(!Xt(t)||window.NO_AUTH_GUARD){if(!(t instanceof R.HttpAbortError)){const r=Zo().getMiscSettings().noAuthGuardLoginPath;return Xt(t)&&r?void w(r,{from:e}):{failed:!0,output:{node:{tag:On.BRICK,type:"div",properties:{textContent:Qt(t),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:n},blockingList:[]}}}(0,l.A)(lo,this).add(y)}else A()}},n=(0,c.A)(co,this,new Wn("page",{routeHelper:t,renderId:a})),r=(0,c.A)(so,this,{app:h,location:e,query:new URLSearchParams(e.search),flags:b,sys:{...null==Qo||null===(O=Qo.auth)||void 0===O?void 0:O.getAuth(),...Zr(),settings:{brand:Zo().getBrandSettings()}},ctxStore:new Tr("CTX",void 0,n),pendingPermissionsPreCheck:[null==Qo||null===(x=Qo.checkPermissions)||void 0===x?void 0:x.preCheckPermissions(u)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,c.A)(go,this,void 0),eo(u),ge(null===(P=u.meta)||void 0===P?void 0:P.functions,h),null==Qo||null===(M=Qo.flowApi)||void 0===M||M.collectContract(null===(_=u.meta)||void 0===_?void 0:_.contracts);let o,s=!1,d=[];try{const e={};if(o=await jr(k,function(e){if(window.parent===window)return e;let t=e;const n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)];const r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)],t}(u.routes),r,n,[],e),t.bailout(o))return;d=Vr(r),await Wr(o,r,d),e.child=o.menuRequestNode,n.setInitialMenuRequestNode(e),await t.mergeMenus(n.getMenuRequests())}catch(e){console.error("Router failed:",e);const n=t.catch(e,k);if(!n)return;({failed:s,output:o}=n)}if(k.child=o.node,I(),o.route&&"routes"!==o.route.type||s){if(s||n.dispatchBeforePageLoad(),te(),se(),to(null==h?void 0:h.uiVersion),Pn(k),window.scrollTo(0,0),s)null==i||i({status:"failed"});else{n.dispatchPageLoad(),n.dispatchAnchorLoad(),n.dispatchOnMount(),n.initializeScrollIntoView(),n.initializeMediaChange(),n.initializeMessageDispatcher();for(const e of d)e.mountAsyncData();null==i||i({status:"ok",path:o.path,pageTitle:document.title})}return void V("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=Qo&&Qo.auth&&!Qo.auth.isLoggedIn())return void A();I()}te(),se();const L={tag:On.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:k};k.child=L,Pn(k),window.scrollTo(0,0),null==i||i({status:"not-found"}),V("rendered")}const So="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;var Eo=n(94579),ko=n(84501),Io=2,Co=.16,Ro=.05,To=.05,Oo=.15,xo=5,Po=4,Mo=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function _o(e){var t=e.r,n=e.g,r=e.b,o=(0,Eo.wE)(t,n,r);return{h:360*o.h,s:o.s,v:o.v}}function Bo(e){var t=e.r,n=e.g,r=e.b;return"#".concat((0,Eo.Ob)(t,n,r,!1))}function Lo(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-Io*t:Math.round(e.h)+Io*t:n?Math.round(e.h)+Io*t:Math.round(e.h)-Io*t)<0?r+=360:r>=360&&(r-=360),r}function $o(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-Co*t:t===Po?e.s+Co:e.s+Ro*t)>1&&(r=1),n&&t===xo&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function No(e,t,n){var r;return(r=n?e.v+To*t:e.v-Oo*t)>1&&(r=1),Number(r.toFixed(2))}function Uo(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,ko.RO)(e),o=xo;o>0;o-=1){var a=_o(r),i=Bo((0,ko.RO)({h:Lo(a,o,!0),s:$o(a,o,!0),v:No(a,o,!0)}));n.push(i)}n.push(Bo(r));for(var s=1;s<=Po;s+=1){var c=_o(r),l=Bo((0,ko.RO)({h:Lo(c,s),s:$o(c,s),v:No(c,s)}));n.push(l)}return"dark"===t.theme?Mo.map((function(e){var r,o,a,i=e.index,s=e.opacity;return Bo((r=(0,ko.RO)(t.backgroundColor||"#141414"),a=100*s/100,{r:((o=(0,ko.RO)(n[i])).r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b}))})):n}var Fo={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},jo={},Do={};function Ko(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function Vo(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function Wo(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function Ho(e,t,n){return"dark"===t?Uo(e,{theme:t,backgroundColor:n})[5]:e}function qo(e){const t=[];if(["light","dark"].forEach((n=>{if(e[n])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?Vo:Ko)("string"==typeof(n=t)?" --color-brand: ".concat(n,";\n"):[" --color-brand: ".concat(n.default,";")," --color-brand-hover: ".concat(n.hover,";")," --color-brand-active: ".concat(n.active,";"),""].join("\n"));var n}(n,e[n]));break;case"baseColors":t.push(function(e,t,n){return("dark"===e?Vo:Ko)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[n,r]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(n),r.map(((e,r)=>[" --palette-".concat(n,"-").concat(r+1,"-channel: ").concat(Wo(e),";")].concat("dark"===t?[]:" --palette-".concat(n,"-").concat(r+1,": rgb(var(--palette-").concat(n,"-").concat(r+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,n){return Object.fromEntries(Object.entries(e).map((e=>{var[r,o]=e;return[r,Uo(o,"dark"===t?{theme:t,backgroundColor:n}:void 0)]})))}(t,e,n),e),"\n").concat(function(e,t,n){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((r=>{var[o,a]=r;return[" --theme-".concat(o,"-color-rgb-channel: ").concat(Wo(Ho(t[a],e,n)),";"),..."dark"===e?[]:[" --theme-".concat(o,"-color: var(--palette-").concat(a,"-6);")," --theme-".concat(o,"-border-color: var(--palette-").concat(a,"-3);")]," --theme-".concat(o,"-background: var(--palette-").concat(a,"-").concat("dark"===e?2:1,");"),""]})).join("\n")}(e,t,n)))}(n,e[n],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?Vo:Ko)(function(e){return Object.entries(e).map((e=>{var[t,n]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(n,";")})).concat("").join("\n")}(t))}(n,e[n]))}})),t.length>0){const e=document.createElement("style");return e.textContent=t.join("\n\n"),document.head.appendChild(e),()=>{e.remove()}}}let zo,Go,Yo,Jo,Qo;function Xo(e){if(zo)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{let{data:t}=e;if((null==t?void 0:t.source)!==U)return;const n=t.payload;switch(null==n?void 0:n.type){case F:K=n.active;break;case j:D=n.panel}})),Qo=null==e?void 0:e.hooks,(0,u.initializeI18n)(qt,zt),p.locale(u.i18n.language),u.i18n.on("languageChanged",(()=>{p.locale(u.i18n.language)})),I(),zo=new ra,zo}Object.keys(Fo).forEach((function(e){jo[e]=Uo(Fo[e]),jo[e].primary=jo[e][5],Do[e]=Uo(Fo[e],{theme:"dark",backgroundColor:"#141414"}),Do[e].primary=Do[e][5]})),jo.red,jo.volcano,jo.gold,jo.orange,jo.yellow,jo.lime,jo.green,jo.cyan,jo.blue,jo.geekblue,jo.purple,jo.magenta,jo.grey;const Zo=function(){const e=k();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return zo};var ea=new WeakMap,ta=new WeakMap,na=new WeakSet;class ra{constructor(){(0,o.A)(this,na),(0,i.A)(this,ea,!1),(0,i.A)(this,ta,!1),(0,a.A)(this,"version",3)}initialize(e){var t;if((0,l.A)(ea,this))throw new Error("The runtime cannot be initialized more than once");(0,c.A)(ea,this,!0),function(e){(0,f.isObject)(e.settings)&&(0,f.deepFreeze)(e.settings),e.brickPackages&&(0,f.deepFreeze)(e.brickPackages)}(e),Go=e;const{notification:n,dialog:r}=(0,s.A)(na,this,oa).call(this);var o;!1!==n&&(o=n??"basic.show-notification",(0,this.loadBricks)([o]).then((()=>{en=document.createElement(o)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==r&&function(e,t){t([e]).then((()=>{Gt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(r??"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?qo({type:"brandColor",...e.brandColor}):e.baseColors?qo({type:"baseColors",...e.baseColors}):e.variables&&qo({type:"variables",...e.variables}))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}async bootstrap(e){if(e&&this.initialize(e),(0,l.A)(ta,this))throw new Error("The runtime cannot be bootstrapped more than once");(0,c.A)(ta,this,!0),Yo=new vo(Go.storyboards),await Yo.bootstrap()}getRecentApps(){var e;return(null===(e=Yo)||void 0===e?void 0:e.getRecentApps())??{}}getCurrentApp(){var e;return null===(e=Yo)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return ze(e,t)}getFeatureFlags(){var e,t;return{...null===(e=Go)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags,...null===(t=Yo)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags,"migrate-to-brick-next-v3":!0}}getMiscSettings(){var e,t;return{...null===(e=Go)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc,...null===(t=Yo)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc}}getBrandSettings(){var e;return{base_title:"DevOps 管理专家",...null===(e=Go)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand}}getLaunchpadSettings(){var e;return{columns:7,rows:4,...null===(e=Go)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad}}getDesktops(){var e;return(null===(e=Go)||void 0===e?void 0:e.desktops)??[]}getLaunchpadSiteMap(){var e;return(null===(e=Go)||void 0===e?void 0:e.siteSort)??[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){const t=this.getBrandSettings().base_title;document.title=e?`${e} - ${t}`:t}getNavConfig(){var e;return null===(e=Yo)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,d.loadBricksImperatively)(e,aa())}}function oa(){var e;return(null===(e=Go)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.presetBricks)??{}}function aa(){var e;return Jo??(Jo=function(e,t){if(null==t||!t.length)return e;const n=new Map;return[...t,...e].forEach((e=>{const t=e.filePath.split("/")[1];n.has(t)||n.set(t,e)})),Array.from(n.values())}((null===(e=Go)||void 0===e?void 0:e.brickPackages)??So??window.STANDALONE_BRICK_PACKAGES??[],window.PUBLIC_DEPS))}function ia(){var e;return null===(e=Yo)||void 0===e?void 0:e.getRenderId()}function sa(){var e;return null===(e=Yo)||void 0===e?void 0:e.getRuntimeContext()}function ca(e){var t;return null===(t=Go)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function la(e){var t;return null===(t=ca(e))||void 0===t?void 0:t.app}function ua(){for(var e,t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==Qo||null===(e=Qo.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...r)}function da(){var e;return null==Qo||null===(e=Qo.auth)||void 0===e?void 0:e.getAuth()}function fa(){var e,t;return null==Qo||null===(e=Qo.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function pa(){var e;return null==Qo||null===(e=Qo.auth)||void 0===e?void 0:e.isLoggedIn()}var ha=new WeakMap;const ga=new class{constructor(){(0,i.A)(this,ha,new Map)}define(e,t){if((0,l.A)(ha,this).has(e))throw new Error(`Custom editor of "${e}" already registered`);(0,l.A)(ha,this).set(e,t)}get(e){return(0,l.A)(ha,this).get(e)}};async function ma(e,t,n){return nt(await Je(e),e,"resolve",t,n)}function va(e){let t,{portal:n,scope:r="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n;t=n||(()=>(a=document.createElement("div"),a.style.position="absolute",a.style.width=a.style.height="0",document.body.append(a),a));let i,s,c=!1;return{async render(n){let{theme:l,uiVersion:u,context:d,functions:f,templates:p,i18n:h,url:g,app:v}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");const b=[].concat(n),y=i,w=(0,m.uniqueId)("render-id-");i=new Wn(r,{unknownBricks:o,renderId:w});const A={ctxStore:new Tr("CTX",void 0,i),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map};if(g){const e=new URL(g);A.query=e.searchParams,A.location={pathname:e.pathname,search:e.search,hash:e.hash,state:void 0}}const S={tag:On.ROOT,container:e,createPortal:t};if("page"===r){var E;X(l??"light"),ae("default"),to(u),v??(v={id:"demo",homepage:"/demo"}),A.app=v;const e={app:v,meta:{i18n:h,customTemplates:p}};null===(E=s)||void 0===E||E(),s=B(e),eo(e),ge(f,v)}A.ctxStore.define(d,A);let k,I=!1,C=[];try{k=await Dr(S,b,A,i,[],{}),C=Vr(A),await Wr(k,A,C)}catch(e){I=!0,k={node:{tag:On.BRICK,type:"div",properties:{textContent:Qt(e),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},return:S,runtimeContext:null},blockingList:[]}}if(S.child=k.node,null==y||y.dispatchOnUnmount(),null==y||y.dispose(),xn(e),a&&xn(a),"page"===r&&(I||i.dispatchBeforePageLoad(),te(),se()),Pn(S),"page"===r&&window.scrollTo(0,0),!I){for(const e of C)e.mountAsyncData();"page"===r&&i.dispatchPageLoad(),i.dispatchOnMount(),i.initializeScrollIntoView(),i.initializeMediaChange(),i.initializeMessageDispatcher()}},unmount(){c||(c=!0,xn(e),a&&(xn(a),n||a.remove()))}}}function ba(e){let{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...sa()};t&&(n.query=new URLSearchParams(C().location.search));const r=t=>{if("string"==typeof t){if((0,T.isEvaluable)(t)){const e=ut(t,n);return Xe(e),e}return(0,x.inject)(t,n)}return!(0,f.isObject)(t)||Ze(e)?t:Array.isArray(t)?t.map((e=>r(e))):Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[r(t),r(n)]})))};return r(e)}}}]);
3
- //# sourceMappingURL=9612.99e6f1a8.js.map