@pega/constellationjs 24.1.1-dev → 24.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/README.md +3 -2
- package/dist/bootstrap-shell.js +1 -1
- package/dist/bootstrap-shell.js.br +0 -0
- package/dist/bootstrap-shell.js.gz +0 -0
- package/dist/constellation-core-web.js +1 -0
- package/dist/constellation-core-web.js.br +0 -0
- package/dist/constellation-core-web.js.gz +0 -0
- package/dist/constellation-core-web.js.map +1 -0
- package/dist/constellation-core.0f86e2c6.js +1 -0
- package/dist/constellation-core.0f86e2c6.js.br +0 -0
- package/dist/constellation-core.0f86e2c6.js.gz +0 -0
- package/dist/constellation-core.0f86e2c6.js.map +1 -0
- package/dist/lib_asset.json +1 -1
- package/package.json +1 -1
- package/dist/constellation-core.656f2c54.js +0 -2
- package/dist/constellation-core.656f2c54.js.br +0 -0
- package/dist/constellation-core.656f2c54.js.gz +0 -0
- package/dist/constellation-core.656f2c54.js.map +0 -1
- /package/dist/{constellation-core.656f2c54.js.LICENSE.txt → constellation-core.0f86e2c6.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={933:(e,t,n)=>{var r=n(515);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},515:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],n=void 0;function r(){t===n&&(t=t.slice())}function a(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var n=!0;return r(),t.push(e),function(){n&&(r(),t.splice(t.indexOf(e),1),n=!1)}}function s(){for(var e=t,r=0;r<e.length;++r)n=e,e[r]()}return function(){var t=e.apply(void 0,arguments),n=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:s()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var a=o(e),i=n&&!t;return t||(n=!1,r=!1),i&&s(),a},subscribe:a})}}},923:(e,t,n)=>{e.exports=n(933)},303:e=>{e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,s[a]))return!1;for(a=r;0!=a--;){var o=s[a];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},924:(e,t,n)=>{var r="__lodash_hash_undefined__",a=/^\[object .+?Constructor\]$/,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,o="object"==typeof self&&self&&self.Object===Object&&self,i=s||o||Function("return this")();function c(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var a=e.length,s=-1;++s<a;)if(t(e[s],s,e))return s;return-1}(e,l);for(var r=-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}(e,t)>-1}function d(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function l(e){return e!=e}function u(e,t){return e.has(t)}var p,h=Array.prototype,g=Function.prototype,f=Object.prototype,y=i["__core-js_shared__"],m=(p=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",I=g.toString,E=f.hasOwnProperty,A=f.toString,_=RegExp("^"+I.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=i.Symbol,C=f.propertyIsEnumerable,$=h.splice,b=S?S.isConcatSpreadable:void 0,P=Math.max,O=L(i,"Map"),T=L(Object,"create");function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function v(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.__data__=new R;++t<n;)this.add(e[t])}function x(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function w(e,t,n,r,a){var s=-1,o=e.length;for(n||(n=j),a||(a=[]);++s<o;){var i=e[s];t>0&&n(i)?t>1?w(i,t-1,n,r,a):d(a,i):r||(a[a.length]=i)}return a}function M(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!H(e)||m&&m in e)return!1;var t=B(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?_:a;return t.test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e){return V(e)||function(e){return G(e)&&E.call(e,"callee")&&(!C.call(e,"callee")||"[object Arguments]"==A.call(e))}(e)||!!(b&&e&&e[b])}N.prototype.clear=function(){this.__data__=T?T(null):{}},N.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},N.prototype.get=function(e){var t=this.__data__;if(T){var n=t[e];return n===r?void 0:n}return E.call(t,e)?t[e]:void 0},N.prototype.has=function(e){var t=this.__data__;return T?void 0!==t[e]:E.call(t,e)},N.prototype.set=function(e,t){return this.__data__[e]=T&&void 0===t?r:t,this},v.prototype.clear=function(){this.__data__=[]},v.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():$.call(t,n,1),0))},v.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},v.prototype.has=function(e){return x(this.__data__,e)>-1},v.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new N,map:new(O||v),string:new N}},R.prototype.delete=function(e){return M(this,e).delete(e)},R.prototype.get=function(e){return M(this,e).get(e)},R.prototype.has=function(e){return M(this,e).has(e)},R.prototype.set=function(e,t){return M(this,e).set(e,t),this},D.prototype.add=D.prototype.push=function(e){return this.__data__.set(e,r),this},D.prototype.has=function(e){return this.__data__.has(e)};var U,F,k=(U=function(e,t){return G(e)?function(e,t,n,r){var a=-1,s=c,o=!0,i=e.length,d=[],l=t.length;if(!i)return d;t.length>=200&&(s=u,o=!1,t=new D(t));e:for(;++a<i;){var p=e[a],h=p;if(p=0!==p?p:0,o&&h==h){for(var g=l;g--;)if(t[g]===h)continue e;d.push(p)}else s(t,h,r)||d.push(p)}return d}(e,w(t,1,G,!0)):[]},F=P(void 0===F?U.length-1:F,0),function(){for(var e=arguments,t=-1,n=P(e.length-F,0),r=Array(n);++t<n;)r[t]=e[F+t];t=-1;for(var a=Array(F+1);++t<F;)a[t]=e[t];return a[F]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(U,this,a)}),V=Array.isArray;function G(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!B(e)}(e)}function B(e){var t=H(e)?A.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=k},174:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,g=p||h||Function("return this")(),f=Array.prototype,y=Function.prototype,m=Object.prototype,I=g["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,C=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=g.Symbol,b=f.splice,P=M(g,"Map"),O=M(Object,"create"),T=$?$.prototype:void 0,N=T?T.toString:void 0;function v(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function w(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function M(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!k(e)||E&&E in e)return!1;var t=function(e){var t=k(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}v.prototype.clear=function(){this.__data__=O?O(null):{}},v.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},v.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:_.call(t,e)},v.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?a:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return x(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new v,map:new(P||R),string:new v}},D.prototype.delete=function(e){return w(this,e).delete(e)},D.prototype.get=function(e){return w(this,e).get(e)},D.prototype.has=function(e){return w(this,e).has(e)},D.prototype.set=function(e,t){return w(this,e).set(e,t),this};var L=U((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return c.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function j(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function U(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(U.Cache||D),n}U.Cache=D;var F=Array.isArray;function k(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){var n;t=function(e,t){if(F(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!V(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:F(n=t)?n:L(n);for(var r=0,a=t.length;null!=e&&r<a;)e=e[j(t[r++])];return r&&r==a?e:void 0}(e,t);return void 0===r?n:r}},207:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=9007199254740991,i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,y=g||f||Function("return this")(),m=Array.prototype,I=Function.prototype,E=Object.prototype,A=y["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",S=I.toString,C=E.hasOwnProperty,$=E.toString,b=RegExp("^"+S.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=y.Symbol,O=E.propertyIsEnumerable,T=m.splice,N=F(y,"Map"),v=F(Object,"create"),R=P?P.prototype:void 0,D=R?R.toString:void 0;function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function j(e,t){return null!=e&&C.call(e,t)}function U(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function F(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!q(e)||_&&_ in e)return!1;var t=H(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:p;return t.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}x.prototype.clear=function(){this.__data__=v?v(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return n===a?void 0:n}return C.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:C.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?a:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0||(n==t.length-1?t.pop():T.call(t,n,1),0))},w.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return L(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new x,map:new(N||w),string:new x}},M.prototype.delete=function(e){return U(this,e).delete(e)},M.prototype.get=function(e){return U(this,e).get(e)},M.prototype.has=function(e){return U(this,e).has(e)},M.prototype.set=function(e,t){return U(this,e).set(e,t),this};var k=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(l,(function(e,t,r,a){n.push(r?a.replace(u,"$1"):t||e)})),n}));function V(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(G.Cache||M),n}G.Cache=M;var B=Array.isArray;function H(e){var t=q(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function W(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function z(e){return!!e&&"object"==typeof e}function Y(e){return"symbol"==typeof e||z(e)&&"[object Symbol]"==$.call(e)}e.exports=function(e,t){return null!=e&&function(e,t,n){var r;t=function(e,t){if(B(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||c.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:B(r=t)?r:k(r);for(var a,s=-1,d=t.length;++s<d;){var l=V(t[s]);if(!(a=null!=e&&n(e,l)))break;e=e[l]}return a||!!(d=e?e.length:0)&&W(d)&&function(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}(l,d)&&(B(e)||function(e){return function(e){return z(e)&&function(e){return null!=e&&W(e.length)&&!H(e)}(e)}(e)&&C.call(e,"callee")&&(!O.call(e,"callee")||"[object Arguments]"==$.call(e))}(e))}(e,t,j)}},828:(e,t,n)=>{e=n.nmd(e);var r,a,s,o="[object Map]",i="[object Promise]",c="[object Set]",d="[object WeakMap]",l="[object DataView]",u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,g=p||h||Function("return this")(),f=t&&!t.nodeType&&t,y=f&&e&&!e.nodeType&&e,m=y&&y.exports===f,I=Function.prototype,E=Object.prototype,A=g["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",S=I.toString,C=E.hasOwnProperty,$=E.toString,b=RegExp("^"+S.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m?g.Buffer:void 0,O=E.propertyIsEnumerable,T=P?P.isBuffer:void 0,N=(a=Object.keys,s=Object,function(e){return a(s(e))}),v=V(g,"DataView"),R=V(g,"Map"),D=V(g,"Promise"),x=V(g,"Set"),w=V(g,"WeakMap"),M=!O.call({valueOf:1},"valueOf"),L=B(v),j=B(R),U=B(D),F=B(x),k=B(w);function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!Y(e)||function(e){return!!_&&_ in e}(e))return!1;var t=z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:u;return t.test(B(e))}(n)?n:void 0}var G=function(e){return $.call(e)};function B(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(v&&G(new v(new ArrayBuffer(1)))!=l||R&&G(new R)!=o||D&&G(D.resolve())!=i||x&&G(new x)!=c||w&&G(new w)!=d)&&(G=function(e){var t=$.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?B(n):void 0;if(r)switch(r){case L:return l;case j:return o;case U:return i;case F:return c;case k:return d}return t});var H=Array.isArray;function W(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!z(e)}var q=T||function(){return!1};function z(e){var t=Y(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(W(e)&&(H(e)||"string"==typeof e||"function"==typeof e.splice||q(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&W(e)}(e)&&C.call(e,"callee")&&(!O.call(e,"callee")||"[object Arguments]"==$.call(e))}(e)))return!e.length;var t=G(e);if(t==o||t==c)return!e.size;if(M||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||E)}(e))return!N(e).length;for(var n in e)if(C.call(e,n))return!1;return!0}},722:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Array]",i="[object Boolean]",c="[object Date]",d="[object Error]",l="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",f="[object RegExp]",y="[object Set]",m="[object String]",I="[object WeakMap]",E="[object ArrayBuffer]",A="[object DataView]",_=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[s]=C[o]=C[E]=C[i]=C[A]=C[c]=C[d]=C[l]=C[u]=C[p]=C[h]=C[f]=C[y]=C[m]=C[I]=!1;var $="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,P=$||b||Function("return this")(),O=t&&!t.nodeType&&t,T=O&&e&&!e.nodeType&&e,N=T&&T.exports===O,v=N&&$.process,R=function(){try{return v&&v.binding&&v.binding("util")}catch(e){}}(),D=R&&R.isTypedArray;function x(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function w(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function M(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var L,j,U,F=Array.prototype,k=Function.prototype,V=Object.prototype,G=P["__core-js_shared__"],B=k.toString,H=V.hasOwnProperty,W=(L=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",q=V.toString,z=RegExp("^"+B.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=N?P.Buffer:void 0,K=P.Symbol,X=P.Uint8Array,J=V.propertyIsEnumerable,Q=F.splice,Z=K?K.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(j=Object.keys,U=Object,function(e){return j(U(e))}),re=Te(P,"DataView"),ae=Te(P,"Map"),se=Te(P,"Promise"),oe=Te(P,"Set"),ie=Te(P,"WeakMap"),ce=Te(Object,"create"),de=De(re),le=De(ae),ue=De(se),pe=De(oe),he=De(ie),ge=K?K.prototype:void 0,fe=ge?ge.valueOf:void 0;function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new me(e);this.size=t.size}function _e(e,t){for(var n=e.length;n--;)if(xe(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=H.call(e,Z),n=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var a=q.call(e);return r&&(t?e[Z]=n:delete e[Z]),a}(e):function(e){return q.call(e)}(e)}function Ce(e){return ke(e)&&Se(e)==s}function $e(e,t,n,r,a){return e===t||(null==e||null==t||!ke(e)&&!ke(t)?e!=e&&t!=t:function(e,t,n,r,a,l){var g=Me(e),I=Me(t),_=g?o:ve(e),S=I?o:ve(t),C=(_=_==s?h:_)==h,$=(S=S==s?h:S)==h,b=_==S;if(b&&Le(e)){if(!Le(t))return!1;g=!0,C=!1}if(b&&!C)return l||(l=new Ae),g||Ve(e)?be(e,t,n,r,a,l):function(e,t,n,r,a,s,o){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!s(new X(e),new X(t)));case i:case c:case p:return xe(+e,+t);case d:return e.name==t.name&&e.message==t.message;case f:case m:return e==t+"";case u:var l=w;case y:var h=1&r;if(l||(l=M),e.size!=t.size&&!h)return!1;var g=o.get(e);if(g)return g==t;r|=2,o.set(e,t);var I=be(l(e),l(t),r,a,s,o);return o.delete(e),I;case"[object Symbol]":if(fe)return fe.call(e)==fe.call(t)}return!1}(e,t,_,n,r,a,l);if(!(1&n)){var P=C&&H.call(e,"__wrapped__"),O=$&&H.call(t,"__wrapped__");if(P||O){var T=P?e.value():e,N=O?t.value():t;return l||(l=new Ae),a(T,N,n,r,l)}}return!!b&&(l||(l=new Ae),function(e,t,n,r,a,s){var o=1&n,i=Pe(e),c=i.length;if(c!=Pe(t).length&&!o)return!1;for(var d=c;d--;){var l=i[d];if(!(o?l in t:H.call(t,l)))return!1}var u=s.get(e);if(u&&s.get(t))return u==t;var p=!0;s.set(e,t),s.set(t,e);for(var h=o;++d<c;){var g=e[l=i[d]],f=t[l];if(r)var y=o?r(f,g,l,t,e,s):r(g,f,l,e,t,s);if(!(void 0===y?g===f||a(g,f,n,r,s):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var m=e.constructor,I=t.constructor;m==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof I&&I instanceof I||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,a,l))}(e,t,n,r,$e,a))}function be(e,t,n,r,a,s){var o=1&n,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var l=-1,u=!0,p=2&n?new Ee:void 0;for(s.set(e,t),s.set(t,e);++l<i;){var h=e[l],g=t[l];if(r)var f=o?r(g,h,l,t,e,s):r(h,g,l,e,t,s);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!x(t,(function(e,t){if(o=t,!p.has(o)&&(h===e||a(h,e,n,r,s)))return p.push(t);var o}))){u=!1;break}}else if(h!==g&&!a(h,g,n,r,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function Pe(e){return function(e,t,n){var r=t(e);return Me(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,Ge,Ne)}function Oe(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Te(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Fe(e)||function(e){return!!W&&W in e}(e))&&(je(e)?z:_).test(De(e))}(n)?n:void 0}ye.prototype.clear=function(){this.__data__=ce?ce(null):{},this.size=0},ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ye.prototype.get=function(e){var t=this.__data__;if(ce){var n=t[e];return n===r?void 0:n}return H.call(t,e)?t[e]:void 0},ye.prototype.has=function(e){var t=this.__data__;return ce?void 0!==t[e]:H.call(t,e)},ye.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ce&&void 0===t?r:t,this},me.prototype.clear=function(){this.__data__=[],this.size=0},me.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0||(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,0))},me.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},me.prototype.has=function(e){return _e(this.__data__,e)>-1},me.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ye,map:new(ae||me),string:new ye}},Ie.prototype.delete=function(e){var t=Oe(this,e).delete(e);return this.size-=t?1:0,t},Ie.prototype.get=function(e){return Oe(this,e).get(e)},Ie.prototype.has=function(e){return Oe(this,e).has(e)},Ie.prototype.set=function(e,t){var n=Oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,r),this},Ee.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new me,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof me){var r=n.__data__;if(!ae||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this};var Ne=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,s=[];++n<r;){var o=e[n];t(o)&&(s[a++]=o)}return s}(ee(e),(function(t){return J.call(e,t)})))}:function(){return[]},ve=Se;function Re(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function De(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function xe(e,t){return e===t||e!=e&&t!=t}(re&&ve(new re(new ArrayBuffer(1)))!=A||ae&&ve(new ae)!=u||se&&ve(se.resolve())!=g||oe&&ve(new oe)!=y||ie&&ve(new ie)!=I)&&(ve=function(e){var t=Se(e),n=t==h?e.constructor:void 0,r=n?De(n):"";if(r)switch(r){case de:return A;case le:return u;case ue:return g;case pe:return y;case he:return I}return t});var we=Ce(function(){return arguments}())?Ce:function(e){return ke(e)&&H.call(e,"callee")&&!J.call(e,"callee")},Me=Array.isArray,Le=te||function(){return!1};function je(e){if(!Fe(e))return!1;var t=Se(e);return t==l||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ke(e){return null!=e&&"object"==typeof e}var Ve=D?function(e){return function(t){return e(t)}}(D):function(e){return ke(e)&&Ue(e.length)&&!!C[Se(e)]};function Ge(e){return null!=(t=e)&&Ue(t.length)&&!je(t)?function(e,t){var n=Me(e),r=!n&&we(e),a=!n&&!r&&Le(e),s=!n&&!r&&!a&&Ve(e),o=n||r||a||s,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var d in e)!H.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Re(d,c))||i.push(d);return i}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||V))return ne(e);var t,n,r=[];for(var a in Object(e))H.call(e,a)&&"constructor"!=a&&r.push(a);return r}(e);var t}e.exports=function(e,t){return $e(e,t)}},431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Function]",i="[object Object]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[s]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[o]=l["[object Map]"]=l["[object Number]"]=l[i]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var u,p,h,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,y=g||f||Function("return this")(),m=t&&!t.nodeType&&t,I=m&&e&&!e.nodeType&&e,E=I&&I.exports===m,A=E&&g.process,_=function(){try{return I&&I.require&&I.require("util").types||A&&A.binding&&A.binding("util")}catch(e){}}(),S=_&&_.isTypedArray,C=Array.prototype,$=Function.prototype,b=Object.prototype,P=y["__core-js_shared__"],O=$.toString,T=b.hasOwnProperty,N=(u=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",v=b.toString,R=O.call(Object),D=RegExp("^"+O.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=E?y.Buffer:void 0,w=y.Symbol,M=y.Uint8Array,L=(x&&x.allocUnsafe,p=Object.getPrototypeOf,h=Object,function(e){return p(h(e))}),j=Object.create,U=b.propertyIsEnumerable,F=C.splice,k=w?w.toStringTag:void 0,V=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=x?x.isBuffer:void 0,B=Math.max,H=Date.now,W=ie(y,"Map"),q=ie(Object,"create"),z=function(){function e(){}return function(t){if(!Ee(t))return{};if(j)return j(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function J(e){var t=this.__data__=new K(e);this.size=t.size}function Q(e,t,n){(void 0!==n&&!pe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Z(e,t,n){var r=e[t];T.call(e,t)&&pe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(pe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":k&&k in Object(e)?function(e){var t=T.call(e,k),n=e[k];try{e[k]=void 0;var r=!0}catch(e){}var a=v.call(e);return r&&(t?e[k]=n:delete e[k]),a}(e):function(e){return v.call(e)}(e)}function re(e){return Ae(e)&&ne(e)==s}function ae(e,t,n,r,a){e!==t&&function(e,t,n){for(var r=-1,a=Object(e),s=n(e),o=s.length;o--;){var i=s[++r];if(!1===t(a[i],i))break}}(t,(function(s,o){if(a||(a=new J),Ee(s))!function(e,t,n,r,a,s,o){var c=le(e,n),d=le(t,n),l=o.get(d);if(l)Q(e,n,l);else{var u,p,h,g,f,y=s?s(c,d,n+"",e,t,o):void 0,m=void 0===y;if(m){var I=ge(d),E=!I&&ye(d),A=!I&&!E&&_e(d);y=d,I||E||A?ge(c)?y=c:Ae(f=c)&&fe(f)?y=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(c):E?(m=!1,y=function(e,t){return e.slice()}(d)):A?(m=!1,g=new(h=(u=d).buffer).constructor(h.byteLength),new M(g).set(new M(h)),p=g,y=new u.constructor(p,u.byteOffset,u.length)):y=[]:function(e){if(!Ae(e)||ne(e)!=i)return!1;var t=L(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&O.call(n)==R}(d)||he(d)?(y=c,he(c)?y=function(e){return function(e,t,n,r){var a=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var i=t[s],c=void 0;void 0===c&&(c=e[i]),a?te(n,i,c):Z(n,i,c)}return n}(e,Se(e))}(c):Ee(c)&&!me(c)||(y=function(e){return"function"!=typeof e.constructor||de(e)?{}:z(L(e))}(d))):m=!1}m&&(o.set(d,y),a(y,d,r,s,o),o.delete(d)),Q(e,n,y)}}(e,t,o,n,ae,r,a);else{var c=r?r(le(e,o),s,o+"",e,t,a):void 0;void 0===c&&(c=s),Q(e,o,c)}}),Se)}Y.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},Y.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Y.prototype.get=function(e){var t=this.__data__;if(q){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},Y.prototype.has=function(e){var t=this.__data__;return q?void 0!==t[e]:T.call(t,e)},Y.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=q&&void 0===t?r:t,this},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():F.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return ee(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(W||K),string:new Y}},X.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return oe(this,e).get(e)},X.prototype.has=function(e){return oe(this,e).has(e)},X.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},J.prototype.clear=function(){this.__data__=new K,this.size=0},J.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},J.prototype.get=function(e){return this.__data__.get(e)},J.prototype.has=function(e){return this.__data__.has(e)},J.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};var se=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:be;function oe(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ee(e)||function(e){return!!N&&N in e}(e))&&(me(e)?D:c).test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ce(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}function le(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ue=function(e){var t=0,n=0;return function(){var r=H(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(se);function pe(e,t){return e===t||e!=e&&t!=t}var he=re(function(){return arguments}())?re:function(e){return Ae(e)&&T.call(e,"callee")&&!U.call(e,"callee")},ge=Array.isArray;function fe(e){return null!=e&&Ie(e.length)&&!me(e)}var ye=G||function(){return!1};function me(e){if(!Ee(e))return!1;var t=ne(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ie(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var _e=S?function(e){return function(t){return e(t)}}(S):function(e){return Ae(e)&&Ie(e.length)&&!!l[ne(e)]};function Se(e){return fe(e)?function(e,t){var n=ge(e),r=!n&&he(e),a=!n&&!r&&ye(e),s=!n&&!r&&!a&&_e(e),o=n||r||a||s,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var d in e)o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ce(d,c))||i.push(d);return i}(e):function(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}(e)}var Ce,$e=(Ce=function(e,t,n,r){ae(e,t,n,r)},function(e,t){return ue(function(e,t,n){return t=B(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,s=B(r.length-t,0),o=Array(s);++a<s;)o[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=n(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,i)}}(e,void 0,be),e+"")}((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(a=Ce.length>3&&"function"==typeof a?(r--,a):void 0,s&&function(e,t,n){if(!Ee(n))return!1;var r=typeof t;return!!("number"==r?fe(n)&&ce(t,n.length):"string"==r&&t in n)&&pe(n[t],e)}(t[0],t[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var o=t[n];o&&Ce(e,o,n,a)}return e})));function be(e){return e}e.exports=$e},8:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),y=Array.prototype,m=Function.prototype,I=Object.prototype,E=f["__core-js_shared__"],A=(r=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",_=m.toString,S=I.hasOwnProperty,C=I.toString,$=RegExp("^"+_.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=f.Symbol,P=y.splice,O=j(f,"Map"),T=j(Object,"create"),N=b?b.prototype:void 0,v=N?N.toString:void 0;function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e,t,n){var r=e[t];S.call(e,t)&&G(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function M(e,t){for(var n=e.length;n--;)if(G(e[n][0],t))return n;return-1}function L(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function j(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!H(e)||A&&A in e)return!1;var t=function(e){var t=H(e)?C.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?$:u;return t.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function U(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&e<t}R.prototype.clear=function(){this.__data__=T?T(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(T){var n=t[e];return n===a?void 0:n}return S.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return T?void 0!==t[e]:S.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=T&&void 0===t?a:t,this},D.prototype.clear=function(){this.__data__=[]},D.prototype.delete=function(e){var t=this.__data__,n=M(t,e);return!(n<0||(n==t.length-1?t.pop():P.call(t,n,1),0))},D.prototype.get=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]},D.prototype.has=function(e){return M(this.__data__,e)>-1},D.prototype.set=function(e,t){var n=this.__data__,r=M(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new R,map:new(O||D),string:new R}},x.prototype.delete=function(e){return L(this,e).delete(e)},x.prototype.get=function(e){return L(this,e).get(e)},x.prototype.has=function(e){return L(this,e).has(e)},x.prototype.set=function(e,t){return L(this,e).set(e,t),this};var F=V((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(W(e))return v?v.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return c.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function k(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(V.Cache||x),n}function G(e,t){return e===t||e!=e&&t!=t}V.Cache=x;var B=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==C.call(e)}e.exports=function(e,t,n){return null==e?e:function(e,t,n,r){if(!H(e))return e;t=function(e,t){if(B(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!W(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return B(e)?e:F(e)}(t);for(var a=-1,s=t.length,c=s-1,d=e;null!=d&&++a<s;){var l=k(t[a]),u=n;if(a!=c){var p=d[l];void 0===(u=void 0)&&(u=H(p)?p:U(t[a+1])?[]:{})}w(d,l,u),d=d[l]}return e}(e,t,n)}},795:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,g=p||h||Function("return this")(),f=Array.prototype,y=Function.prototype,m=Object.prototype,I=g["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,C=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=g.Symbol,b=f.splice,P=L(g,"Map"),O=L(Object,"create"),T=$?$.prototype:void 0,N=T?T.toString:void 0;function v(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function w(e){return V(e)?e:U(e)}function M(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!G(e)||E&&E in e)return!1;var t=function(e){var t=G(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e,t){if(V(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!B(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}v.prototype.clear=function(){this.__data__=O?O(null):{}},v.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},v.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:_.call(t,e)},v.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?a:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return x(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new v,map:new(P||R),string:new v}},D.prototype.delete=function(e){return M(this,e).delete(e)},D.prototype.get=function(e){return M(this,e).get(e)},D.prototype.has=function(e){return M(this,e).has(e)},D.prototype.set=function(e,t){return M(this,e).set(e,t),this};var U=k((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return c.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function F(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(k.Cache||D),n}k.Cache=D;var V=Array.isArray;function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t){return null==e||function(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=j(t,e)?[t]:w(t)).length;null!=e&&n<r;)e=e[F(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(a);++r<a;)s[r]=e[r+t];return s}(t,0,-1))}(e,t=j(t,e)?[t]:w(t));var n,r,a=F((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&_.call(e,a))||delete e[a]}(e,t)}},386:e=>{class t{constructor(e,t,n,r,a){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=d(n,e),this.xor_out=r,this.reflect=a,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let s=this.gen_table();this.table=s,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=s[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:a,mask:s}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++)t=(n[255&(t^e[r])]^t>>>8)&s}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+a^e[o])]<<a^t<<8-a&s<<a;t>>=a}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=d(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=d(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=d(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=d(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,r=e.length>>n,a=1<<n,s="";for(let o=0;o<r;o++){let r="";for(let s=0;s<a;s++){let a=e[o<<n|s];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}s+=" "+r+"\n"}return s="[\n"+s.slice(0,-3)+"\n]",s}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class s{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%a)),e/=a;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends s{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends s{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!n))return new i;if(n)return new o;throw Error("either need TypedArrays or Buffer")}function d(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const l={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function u(e){}e.exports={CRC:t,crc:function(e,n,r,a,s){let o=new t(e,n,r,a,s);return o.calculate.bind(o)},makeBufferConverter:c,models:l,crc1:u,crc6:u,crc8:u,crc10:u,crc16:u,crc24:u,crc32:u,crc32c:u};for(let t in l){let n=l[t];e.exports[t]=n.calculate.bind(n)}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r](s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{n.d(r,{Z:()=>dI});var e={};n.r(e),n.d(e,{buildContextName:()=>fe,buildModalContext:()=>Ee,buildTransientContextName:()=>ye,getContainerIdFromContext:()=>_e,getParentContext:()=>Ae,getParentContextName:()=>ge,getTargetFromContext:()=>Ie,getTransientContext:()=>me});var t={};n.r(t),n.d(t,{getResolvedTargetName:()=>Rt,getRoutingInfo:()=>Dt,getSemanticURLFromRoutingInfo:()=>xt});var a={};n.r(a),n.d(a,{evaluate:()=>cn,handleChange:()=>sn,hasDeclareExpression:()=>an,updateDeclareExpressions:()=>on});var s={};n.r(s),n.d(s,{publishExpressions:()=>qr,publishResponse:()=>zr});var o={};n.r(o),n.d(o,{CONTAINER_NAMES:()=>Ka,CONTAINER_TYPES:()=>Ya,addRootContainerItem:()=>Ps,areContainerItemsPresent:()=>ts,clearTransientData:()=>vs,closeContainerItem:()=>bs,getActiveContainerItemContext:()=>ls,getActiveContainerItemIDFromRoutingInfo:()=>Gs,getActiveContainerItemName:()=>os,getActiveContext:()=>Us,getChildContainerItems:()=>us,getChildContainers:()=>ps,getChildContainersContexts:()=>hs,getContainerAPI:()=>xs,getContainerAccessOrder:()=>es,getContainerData:()=>Ja,getContainerItemData:()=>Qa,getContainerItemName:()=>rs,getContainerItems:()=>Za,getContainerLimit:()=>Is,getContainerParentContext:()=>Vs,getContainerType:()=>ss,getContextByTargetAndKey:()=>ks,getDataContextName:()=>ds,getFlowContainer:()=>Bs,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Cs,getRootContainerName:()=>js,getSuggestionContexts:()=>gs,getTargetFromContainerItemID:()=>$s,getTransientItems:()=>Ns,hasContainerItems:()=>ms,isContainerDirty:()=>Ss,isContainerInitialized:()=>as,isContainerItemActive:()=>is,isContainerItemContextBeingUsedInOtherContainers:()=>Ts,isContainerItemExists:()=>ns,isContainerLimitReached:()=>As,isContainerMultipleMode:()=>ys,isContainerSingleMode:()=>fs,purgeTransientData:()=>Rs,removeContainer:()=>ws,resetContainersPayload:()=>_s,setContainerLimit:()=>Es,updateCaseContextEtag:()=>Ls,updateParentLastUpdateTime:()=>Fs,updateRelatedContextEtag:()=>Ms});var i={};n.r(i),n.d(i,{hasBrowserEnv:()=>ei,hasStandardBrowserEnv:()=>ti,hasStandardBrowserWebWorkerEnv:()=>ri,origin:()=>ai});var c={};n.r(c),n.d(c,{getAdditionalInfo:()=>Yl,getDataPageKeys:()=>Wl,getDataPageMetadata:()=>Ul,getEmbeddedPropertyMetadata:()=>Dl,getFieldParameters:()=>Gl,getFieldsByClassName:()=>Vl,getInsight:()=>kl,getLookUpDataPage:()=>ql,getLookUpDataPageInfo:()=>zl,getParagraph:()=>Bl,getPersonalizationMetadata:()=>Fl,getPropertyMetadata:()=>Rl,getResolvedFieldMetadata:()=>Kl,getSavableDataPage:()=>Hl,mergeStore:()=>vl,resolveNavigation:()=>jl,resolveView:()=>Ll,updateNavigationStore:()=>wl,updateStores:()=>Ml,updateViewStore:()=>xl});var d={};n.r(d),n.d(d,{dispatch:()=>ru,getActionType:()=>lu,getContextValue:()=>cu,getDataObject:()=>au,getReferenceTokens:()=>eu,getSharedDataObject:()=>su,getStore:()=>nu,getValue:()=>iu,isMergeable:()=>pu,lookupContextValue:()=>du,mergeDeep:()=>hu,removeItem:()=>uu,replaceValue:()=>fu,resetStore:()=>yu,setStore:()=>tu,updateValue:()=>gu});var l={};n.r(l),n.d(l,{activateContainerItem:()=>Gu,addContainerItem:()=>Mu,addMessages:()=>Bu,addSharedData:()=>Zu,addTransientItem:()=>Lu,addWork:()=>Ru,clearTransientData:()=>Uu,createWork:()=>bu,error:()=>Qu,finishAssignment:()=>Yu,initContainers:()=>xu,listAction:()=>tp,loadView:()=>Nu,mergeData:()=>Ou,openAssignment:()=>Ku,openWorkByHandle:()=>Du,postProcess:()=>Ju,purgeTransientData:()=>Fu,removeAllTransientItems:()=>Wu,removeContainerItem:()=>Hu,removeSharedData:()=>ep,removeTransientItem:()=>qu,replaceContainerItem:()=>zu,resetContainers:()=>wu,setSharedProperty:()=>rp,setStateProperty:()=>ap,showCasePreview:()=>np,showHarness:()=>Tu,showHistory:()=>Xu,showPage:()=>vu,upMergeAndRemoveContainerItem:()=>Vu,updateContainerItem:()=>ku,updateTransientData:()=>ju});var u={};n.r(u),n.d(u,{doesRestApiExist:()=>_g,getCancelTokenSource:()=>Sg,getCaseApi:()=>bg,getHeaderProcessor:()=>Ig,invokeCustomRestApi:()=>Ag,invokeRestApi:()=>Eg,isRequestCanceled:()=>Cg,registerInterceptor:()=>$g});var p={};n.r(p),n.d(p,{fetchViewResources:()=>Kf,updateViewResources:()=>Yf});var h=n(722),g=n.n(h);let f,y,m;const I=e=>{e&&(f=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},f.BASEURL=e.server,f.ACTIONURL=e["action-end-point"],f.DATAURL=e["data-end-point"],m=e.reAuthUrl)},E=()=>m,A=()=>f.BASEURL,_=e=>{y=e};var S=n(386),C=n(795),$=n.n(C),b=n(207),P=n.n(b),O=n(174),T=n.n(O),N=n(8),v=n.n(N),R=n(431),D=n.n(R),x=n(828),w=n.n(x);const M={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let L;const j=new Uint8Array(16);function U(){if(!L&&(L="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!L))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(j)}const F=[];for(let e=0;e<256;++e)F.push((e+256).toString(16).slice(1));const k=function(e,t,n){if(M.randomUUID&&!t&&!e)return M.randomUUID();const r=(e=e||{}).random||(e.rng||U)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]}(r)},V={APP:{APP:"app",ROOT:"root",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO_CONTENT:"dataInfo.content"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"}},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"}},G={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PRIMARY:"primary",MODAL:"modal",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",CONTENT:"content",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",MESSAGES:"messages__",PAGE_ERRORS:"page_level_errors",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",UI_RESOURCERS:"uiResources",UI_RESOURCERS_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCERS:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",CONTEXT_DATA_MODAL_VIEW:{IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage"},...V},B=class{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>_u.getProperty(".RemoteSystemID",G.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))}},H=/{(.*?)}/i,W=/{(.*?)}/g,q=e=>null!==e.match(H),z=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),Y=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},K=()=>z(window.location.pathname),X=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}},J=new class{constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta},this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{q(e)?this.dynamicRoutesList?.push(e):this.staticRoutesList?.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>z(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>z(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return e=e.replace(n,""),z(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),n=this._getMatchedRouteInRoutingTable(t);void 0===n&&(t=this.processUrl(this.defaultViewUrlPath,!0),n=this._getMatchedRouteInRoutingTable(t)||"");const{routeKey:r,payload:a}=this.appRoutes[n],{reqType:s,endPoint:o,params:i}=this.appRoutesMeta[r].restApi,c={...a},{caseClassName:d,caseID:l}=c;if(B.isRemoteCase(d)){const{RemoteClassGroup:e,RemoteSystemID:t}=B.getRemoteCase(d);c.caseID=l?.replace(d,e?.toUpperCase()),c.RemoteSystemID=t}const u={routeKey:r,requestType:s,routeEndpoint:o,payload:{...i,...c}};return this._resolveRoute(u,this.processUrl(e,!1),n)};getSemanticURL(e,t,n){return this._buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let a=r;q(r)&&r.match(W)?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}));const s=Ap(a),o=new URL(s);return!this.getPortalName()||o.searchParams.toString().indexOf("portal=")>=0||o.searchParams.append("portal",this.getPortalName()),o.toString()}_buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta[e],a=r.split("/").length,s=r.split("/"),o=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return s.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const r=this.appRoutes[e].payload,a={...n};delete a.dataViewName,delete a.dataContext;const s=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(Iu.isEmpty(s)||Iu.isEmpty(a)?o:Object.keys(a).every((e=>Object.prototype.hasOwnProperty.call(s,e))))}));return i?this._getQueryParamsResolvedURL(i,n):""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,a]=e.includes("?")?e.split("?"):[e];if(a){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const s=new URLSearchParams(a),o={};for(const[r,a]of s.entries())if("string"==typeof a&&q(a)){const s=this._getDynamicKeyName(a);o[r]=n?t[s]||e[s.toLowerCase()]:t[s]}else"string"==typeof a&&(o[r]=a);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta[e]){const{reqType:n,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:a}=this.appRoutesMeta[e].restApi;t&&t.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const s=a.match(W);if(s)for(let e=0;e<s.length;e+=1){const n=s[e].replace("{","").replace("}",""),r=new RegExp(s[e],"g");a=a.replace(r,t[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:a,reqType:n,body:e}}return{restApi:a,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[a,s]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),d=o.split("/"),l={};for(let e=0;e<d.length;e+=1)r[e]=d[e],q(d[e])&&(l[this._getDynamicKeyName(d[e])]=c[e],r[e]=c[e]);const u=this._getQueryParamsObject(i),p=this._getQueryParamsObject(s),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in u)q(u[e])?l[e]=p[e]||h[e.toLowerCase()]:l[e]=u[e];let g;s&&(g=this._getQueryParamsResolvedURL(n,p,!0));const f=this._resolvePayload(e,l,n);return{...this._resolveRouteEndPoint(f,n),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!q(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(W);for(let a=0;a<t.length;a+=1){const s=t[a],o=this._getDynamicKeyName(s);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(s,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let a=e[r];if("string"==typeof a&&q(a)){const e=a.match(W);for(let n=0;n<e.length;n+=1){const r=e[n],s=this._getDynamicKeyName(r);if(void 0!==t[s]){const e=t[s];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${s}} in payload- {${s}} is missing in semantic url construct`)}n[r]=a}else"object"==typeof a&&(n[r]=this._resolvePayloadRecursive(a,t))}return n}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList?.find((t=>t.toLowerCase()===e.toLowerCase()));_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,a]=e.includes("?")?e.split("?"):[e],s=t.split("/");if(s.length!==r.length)return!1;let o=0;for(o=0;o<s.length;o+=1){const e=s[o].toLowerCase();if(!q(e)&&e!==r[o]&&Y(e)!==r[o])return!1}if(a){const e=new URLSearchParams(n),t=new URLSearchParams(a),r=new Set,s=new Set;for(const t of e.keys())r.add(t.toLowerCase());for(const e of t.keys())s.add(e.toLowerCase());if(s.size!==r.size)return!1;for(const e of r)if(!s.has(e))return!1}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{X(e,t,"warning"),X("Error in Generated Routing Table",null,"error"),X("Back | Forward for this page may NOT work as intended",null,"warning"),X("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},Q=J,Z=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}}(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels},ee=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none"}setEnvironmentInfo(e){this.environmentInfoObject=e}getOperatorName(){return this.environmentInfoObject?.pxOperator.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication.pyLabel}getPortalName(){return Q.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(G.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication.pyBuiltOnApplications}setPreviewMode(){Z.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}},te="text/javascript",ne=new class{constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId=""}getTypes={SCRIPT:"script",STYLE:"link"};getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return"/"===this.staticServerURL.charAt(this.staticServerURL.length-1)?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=ee.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r),s=this.loadAndCustomerComponentsConfig(t),o=this.fetchSDKComponent(t),i=[];if(await Promise.all([a,s,o]).then((e=>{const t=this.mergeComponentList(e);i.push(...t)})),n.alternateDesignSystemURL&&1===i.length){const r=await this.getSvcComponentsConfigADS(e,t,n);i[0].alternateDesignSystemConfig=r}return{data:{components:i}}}mergeComponentList=(e=[])=>{const[t=[],n=[],r=[]]=e,a=[...t,...n];return this.appStaticUrl?a.map((e=>{const{name:t,type:n,subtype:a}=e,s=r.reduce(((e,r)=>(t===r.name&&n===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(s).length>0?{...e,alternateDesignSystemConfig:{...s}}:e})):a};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let a=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(a=!1):r[e.field]!==e.value&&(a=!1)})),a&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((e=>{this.componentsConfig=e})).catch()}else e=Promise.resolve();return e}async loadAndCustomerComponentsConfig(e){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const n=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((function(e){return-1!==t.indexOf(e)}))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,a=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(n.alternateDesignSystemURL&&1===a?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);a.data.components[0].alternateDesignSystemConfig=r}return a}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}async importCustomComponentMap(e){fetch(`${this.appStaticUrl}v100/componentlib/componentsmap/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>(e.ok||console.error("Error while fetching custom component map"),e))).then((e=>e.text())).then((t=>{this.setCCV2LibId(e);const n=document.createElement("script");n.src=window.URL.createObjectURL(new Blob([t],{type:te})),n.onload=()=>console.log("Custom component lib map loaded"),n.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(n)})).catch((e=>{console.error("Exception while appending custom component map : "),console.error(e)}))}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const a=document.createElement("script");a.src=window.URL.createObjectURL(new Blob([r],{type:te})),a.onload=()=>t(e),a.onerror=()=>n(e),document.head.appendChild(a)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t={};return t=e?this.loaderObj[e]:(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);"script"===t?(a.onload=()=>{n(e)},a.onerror=()=>{r(e)},a.type=te,a.charset="UTF-8",a.async=!1,a.src=e):(a.type="text/css",a.rel="stylesheet",a.href=e),document.head.appendChild(a)})).catch((e=>{console.log(e)})),t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let a=n?Object.values(e)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(a+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(a+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",r=decodeURIComponent(n.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),a=JSON.parse(r)?.tenant_id,{restApi:s,reqType:o}=gp("getAssetsFromIsolations",{isolationID:a,assetPath:e})||{},i=`${this.appStaticUrl}${s}`;return fetch(i,{method:o,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},re=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const a=e.indexOf("}",t),s=e.substring(r,a+1),[o,i]=this.getKeyAndValue(s);this.addKeyToMap(o,i),n+=`${s.split(":")[0]}}`,t=a+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const a=e.indexOf("}",t),s=e.substring(r,a+1);n+=this.keyMap[s],t=a+1}return n}};class ae{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent||e;this.localeStore[t]=n};getLocaleForRule=(e=this.GENERIC_BUNDLE_KEY)=>this.localeStore[e];resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n=this.GENERIC_BUNDLE_KEY){let r=!1;e&&"string"==typeof e&&(r=e.includes("@P ")),r&&(e=re.formatLocaleKey(e)),t=t?`${t}.fields`:"fields";const a=this.localeStore[n.toUpperCase()],s=a?Iu.getIn(a,t,{}):{};return r?re.replaceWithValue(s[e]||e):s[e]||e}getParagraphLocaleValue(e,t,n){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(n,t)}static async getLocaleJsons(e){const t=ee.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:ne.getSvcLocale(t,`${e}.json`)}))),a=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(a.map((async(e,t)=>{if("fulfilled"===e.status){const a=r[t];let s;try{s=await e.value.json()}catch{s=null}s&&n.push({localeRuleKey:a.localeRuleKey,jsonData:s})}})))}return n}async loadLocaleResources(e){const t=ee.getUseLocale(),n=ee.getBaseLocale();if(ee&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await ae.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}}const se=new ae;let oe;const ie=e=>{if(e){let t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")||"";if(t=t.replace(/[^a-zA-Z.]+/g,""),t){const e=oe.getValue(t);return oe.registerAdditionalProps({[t]:`@P ${t}`}),e}}},ce=class{static getParagraphStream(e,t){return((e,t)=>{oe=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,ie);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}},de=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){Iu.copy(e,this.componentMap)}mergeOverrideMap(e={}){Iu.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}},le=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}},ue=class{static handleAnnotation(e,t){const n=e.indexOf(" "),r=-1===n?e:e.substring(0,n),a=le.getHandler(r);return a?a(e.substring(n+1),t):e}static trimAnnotation(e){if(!Iu.isString(e))return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return le.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=de.getComponent(t.type);if(!r||!r.mapping)return;const a=r.mapping(t.config);if(a&&a["@map"]){const t=a["@map"],{source:r}=t;if(!r)return;const s=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,s);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];s.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let a=n[r];a&&0===a.indexOf(".")?(a=a.substring(1),t[r]=e[a]):t[r]=a})),r.push(t)}))}}}static getPropertyName(e){if(e&&Iu.isString(e)){const t=e.startsWith(G.PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(Iu.isString(e)&&e?.startsWith(G.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return Iu.isString(e)&&!!e?.startsWith(G.PROPERTY_ANNOTATION)}},pe={},he=new Map,ge=e=>{let t=G.EMPTY_STRING;return t=e&&e.includes(G.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},fe=(e,t,n=!1)=>{let r=G.EMPTY_STRING;if(t&&e){let a=`${t}${G.FORWARD_SLASH_STRING}${e}`;const s=Ja(a);if(s||t!==G.APP.APP&&t!==G.APP.ROOT)if(s){if(n&&pe[a])return r=`${a}${G.UNDERSCORE_STRING}${pe[a]}`,r;pe[a]?pe[a]+=1:pe[a]=1,r=`${a}${G.UNDERSCORE_STRING}${pe[a]}`}else r=fe(e,ge(t));else a=`${t}${G.FORWARD_SLASH_STRING}${G.PRIMARY}`,pe[a]?pe[a]+=1:pe[a]=1,r=`${a}${G.UNDERSCORE_STRING}${pe[a]}`}return r},ye=(e,t)=>{if(e&&t){const n=(he[t]?.[e]??0)+1;return he[t]||(he[t]={}),he[t][e]=n,`${t}${G.FORWARD_SLASH_STRING}${e}_${n}`}return""},me=(e,t)=>{if(e&&t){const n=he[t]?.[e];return n?`${t}${G.FORWARD_SLASH_STRING}${e}_${n}`:ye(e,t)}return""},Ie=e=>{let t=G.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},Ee=(e,t)=>{if(null===e)return t;const[,n]=t.split(G.FORWARD_SLASH_STRING);return e+G.FORWARD_SLASH_STRING+n},Ae=e=>{const t=e.indexOf(G.FORWARD_SLASH_STRING),n=e.lastIndexOf(G.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},_e=e=>{const t=e.split(G.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+G.FORWARD_SLASH_STRING+t[2]},Se="SET_PROPERTY",Ce="REPLACE_PROPERTY",$e="FIELD_CHANGE",be="LOAD_VIEW",Pe="SHOW_PAGE",Oe="SHOW_DATA",Te="SHOW_INSIGHT",Ne="SHOW_DASHBOARD",ve="SET_LOADING",Re="RESET_LOADING",De="SET_SHARED_PROPERTY",xe="CREATE_WORK",we="OPEN_WORK_BY_HANDLE",Me="UPDATE_DOCUMENT",Le="FINISH_ASSIGNMENT",je="CANCEL_ASSIGNMENT",Ue="OPEN_ASSIGNMENT",Fe="MERGE_DATA",ke="REMOVE_ITEM",Ve="GET_DATAOBJECT_ACTIONS",Ge="SHOW_HISTORY",Be="ERROR",He="INIT_CONTAINERS",We="RESET_CONTAINERS",qe="ADD_CONTAINER_ITEM",ze="REMOVE_CONTAINER_ITEM",Ye="ADD_TRANSIENT_ITEM",Ke="UPDATE_TRANSIENT_DATA",Xe="REMOVE_TRANSIENT_ITEM",Je="REMOVE_ALL_TRANSIENT_ITEMS",Qe="CLEAR_TRANSIENT_DATA",Ze="PURGE_TRANSIENT_DATA",et="ACTIVATE_CONTAINER_ITEM",tt="UPDATE_CONTAINER_ITEM",nt="UPMERGE_AND_REMOVE_CONTAINER_ITEM",rt="REPLACE_CONTAINER_ITEM",at="ACTIVATE_MODAL_CONTAINER_ITEM",st="REMOVE_CONTAINER",ot="ADD_SUGGESTION_CONTEXT",it="showView",ct="showData",dt="showInsight",lt="showDashboard",ut="openWorkByHandle",pt="openAssignment",ht="createNewWork",gt="SHOW_CANCEL_ALERT",ft="openLocalAction",yt="openProcessAction",mt="caseWideActions",It="openBulkAction",Et="ADD_MESSAGES",At="CLEAR_MESSAGES",_t="RESET_STORE",St="FETCH_DATAPAGE",Ct="ADD_SHARED_DATA",$t="REMOVE_SHARED_DATA",bt="LIST_ACTION",Pt="DELETE_CASE_SUMMARY",Ot="ALTER_BLOCKING_ACTION_COUNT",Tt="OPEN_EMBEDDED_DATA_MODAL",Nt="SUBMIT_EMBEDDED_DATA_MODAL",vt="FILL_FORM_WITH_AI",Rt=(e,t)=>{if(!e||!t)return null;let n,r=G.EMPTY_STRING;return t&&(r=`${t}${G.FORWARD_SLASH_STRING}${e}`,n=Ja(r),n||t.includes("/")?n||(r=Rt(e,ge(t))):r=`${t}${G.FORWARD_SLASH_STRING}${e}`),r},Dt=(e,t)=>{const n=Rt(e,t);return n&&Ja(n)?Ja(n):{}},xt=(e,t)=>Q.getSemanticURL(it,{page:e},t),wt=new class{error=e=>{console.error(e)}};class Mt{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=n||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Bt[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],r=Gt[e.tokenType];r&&r.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=Bt[this._state];this._subParser=new Mt(this._grammar,e,t)}_endSubExpression(){Bt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,Mt._setParent(e,this._position)):this._tree=e,this._position=e}}const Lt=Mt,jt="identifier",Ut={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Ft={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},kt={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":Ut,AND:Ut,and:Ut,"||":Ft,OR:Ft,or:Ft,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},Vt={BinaryExpression:function(e){const t=[];return t[0]=this.evaluateAST(e.left),t[1]=e.right?this.evaluateAST(e.right):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]:this._context.getValue(e.value)??""},literal:function(e){return"true"===e.value||"false"===e.value?"true"===e.value:e.value},UnaryExpression:function(e){return this._grammar[e.operator].evaluate(e.right)}},Gt={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;for(;n&&n.operator&&this._grammar[n.operator].precedence>=t;)this._position=n,n=n._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};Lt._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:jt,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Bt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:jt},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Gt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Ht=["binaryOperator","unaryOperator","openParenthesis"],Wt=/^\s*$/,qt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,zt=/\\\\/,Yt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Kt=["[a-zA-Z_.\\$][(0-9)a-zA-Z0-9_.\\$]*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],Xt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Jt{constructor(e){this._grammar=e}static _isNegative(e){return Ht.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Wt)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(qt)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(zt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Jt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[Yt.join("|"),e.join("|"),Kt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=Jt._unquote(e):e.match(Xt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(qt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Jt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Jt._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const Qt=Jt,Zt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new class{constructor(e,t){this._grammar={...kt},this._expression=e,this._ast=null,this._context={},this._localDataObject=t}buildAST(){const e=new Qt(this._grammar).tokenize(this._expression),t=new Lt(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e){return this._context=e,this.evaluateAST(this._ast)}evaluateAST(e){return Vt[e.operationType].call(this,e)}}(n,t)},en=e=>!e||e.buildAST(),tn=(e,t)=>!e||e.evaluate(t),nn=(e,t,n)=>{const r=Zt(e,t),a=en(r);return tn(a,n)},rn={},an=(e,t)=>rn[t]&&Object.prototype.hasOwnProperty.call(rn[t],e),sn=e=>{const{context:t}=e;an(e.reference,t)&&class{static handleExpression(e,t,n,r){(e=>fetch(f.BASEURL+f.ACTIONURL,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:this.getContext(e,r)}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:_u.getProperyValue(`${n}.pxObjClass`,null,t)||_u.getProperyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>ru({type:Se,payload:{context:t,reference:n,value:e[n]}})))}}.handleExpression(e.reference,e.value,rn[t][e.reference],t)},on=(e={})=>{Iu.copy(e,rn)},cn=(e,t,n)=>nn(e,t,n?.pConnect.getPConnect()),dn=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}},ln=e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}return!1},un=(e,t)=>{if(e&&t){const n=Iu.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},pn=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},hn=(e,t)=>{const n=_u.getProperyValue(V.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=_u.getProperyValue(V.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===V.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}return e&&!r&&(a=au(e)?.context_data?.actionType===G.CASE),a},gn=e=>cu(null,G.CASE_VIEW_MODE_PROP,e)===G.PERFORM_MODE&&(e.includes(G.WORKAREA)||e.includes(G.MODAL)),fn=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},yn=(e,t,n)=>{let r,a,s,o,i,c,d;const l=au(e);return n?.isTriggeredFromDifferentContext?(r=l.caseInfo.assignments[0].ID,a=l.caseInfo.ID,s=l.caseInfo.assignments,o=l.caseInfo.activeActionID,i=l.caseInfo.availableActions,c=l.caseInfo,d=l.caseInfo.businessID):(r=t.getValue(V.CASE_INFO.ASSIGNMENT_ID),a=t.getValue(V.CASE_INFO.CASE_INFO_ID),s=t.getValue(V.CASE_INFO.ASSIGNMENTS),o=t.getValue(V.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(V.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(V.CASE_INFO.CASE_INFO),d=t.getValue(V.CASE_INFO.BUSINESS_ID)),{assignmentID:r,caseID:a,assignments:s,localActionID:o,caseActions:i,caseInfo:c,businessID:d}},mn=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&ru({type:ve,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>setTimeout((()=>t(e)),this.pauseDuration)));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&ru({type:Re,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}},In=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,a="unknown",s,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:r,actionPayload:s};return this.actionMgrActions[e]=i,o&&mn.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t=null)=>{let n,r;null===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));return this.register(t,a,n,r,e),{actionMgrID:t,promise:a}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let a=e;return r?(setTimeout((()=>{r.resolve(t)}),0),mn.disableLoadingIndicator(r.actionPayload,n)):a=null,a}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let a=e;return r?(r.reject(n),mn.disableLoadingIndicator(r.actionPayload,t)):a=null,a}},En="REFRESH_DATA",An=e=>({type:En,payload:e}),_n={},Sn=(e,t,n,r,a)=>{e&&n&&t&&(r&&(r=Iu.convertPageRefToClipboardPageNotation(r)),ru(An({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r})))},Cn=(e,t,n)=>{_n[t]||(_n[t]={}),_n[t][e]||(_n[t][e]={pageReference:n})},$n=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;return!!Rl(n.propertyName,e.getValue(G.CLASS_ID,n.pageName))?.isDeclarativeTarget},bn=(e,t,n)=>{const r=hn(e,t),a=_u.getProperyValue(V.CASE_INFO.ACTIVE_ACTION_ID,t,e)?_u.getProperyValue(V.CASE_INFO.ACTIVE_ACTION_ID,t,e):_u.getProperyValue(V.CASE_INFO.ASSIGNMENTACTION_ID,t,e);let s;s=r?_u.getProperyValue(V.CASE_INFO.CASE_INFO_ID,t,e):_u.getProperyValue(V.CASE_INFO.ASSIGNMENT_ID,t,e)?_u.getProperyValue(V.CASE_INFO.ASSIGNMENT_ID,t,e):_u.getProperyValue(V.CONTEXT_DATA_ASSIGNMENTID,t,e),((e,t,n,r,a)=>{if(!(e&&n&&t))return;const s=a.actionMgrID||In.getNextActionMgrId(),o={ID:e,actionID:t,context:n,caseWideAction:r,options:{...a,actionMgrID:s}};a.isFillFormWithAI?ru((e=>({type:vt,payload:e}))(o)):ru(An(o))})(s,a,e,r,n)},Pn=e=>{const{context:t,pageReference:n}=e,r=(e=>_n[e]&&Object.keys(_n[e]).length>0&&gn(e))(t);if(r)if(_u.getProperyValue(G.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=_u.getProperyValue(V.CASE_INFO.CASE_INFO_ID,n,t),r=_u.getProperyValue(G.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),a=_u.getProperyValue(G.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,n,t);Sn(e,r,t,a,{})}else bn(t,n,{})},On=(e,t)=>(e?.options?.refreshFor&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&(t+="?fillFormWithAI=true"),t),Tn=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),a=Number(r)+1;return`${e.substring(0,t)}(${a})${e.substring(n+1)}`}return e}));return t.join(".")}static getFieldLabel(e){let t=e.getConfigProps().label;if(!t&&"function"==typeof e.getInheritedProps){const n=e.getInheritedProps();(n.showLabel??1)&&(t=n.label)}return t}};class Nn{constructor(e,t){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return this.references.get(e)}getNode(e,t){return this.children.find((n=>n.type===e&&n.name===t))}addNode(e,t){let n=this.getNode(e,t);return n||(n=new Nn(e,t),n.parent=this,this.children.push(n)),n}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)})),this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}}const vn=Nn,Rn=e=>{if((e?.split(".")??[]).length<3)return[e];let t,n=e?.split("]")[0]?.split(".")?.pop();return n=`${n}]`,e=e?.split(n)[0],e=e?.substring(0,e.length-1),[n,t]=n.split("["),t=t?.split("]")[0],[e,n,t]},Dn=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new vn("CONTEXT",e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return this.rootNodes[e]}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const r=this.addContextNode(e).addNode("PAGE",t);let a=r.getReference(n);return a||(a=r.addNode("VIEW",n),r.addReference(n,a)),a}addViewNode(e,t,n,r){const a=this.addContextNode(e).addNode("PAGE",t);let s=null;return s=r&&n!==r?this._addParentViewNode(e,t,r).addNode("VIEW",n):a.addNode("VIEW",n),a.addReference(n,s),s}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r){r.startsWith(".")&&(r=r.substring(1));const a=this.addContextNode(e),s=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",r);return s&&a.addReference(`${t}.${r}`,s),s}getPageListNode(e,t,n,r){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)?.getNode("PAGELIST",r)}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode("FIELD",r)}addFieldNode(e,t,n,r,a){const s=this.addContextNode(e),[o]=Rn(t);let i=s.addNode("PAGE",o)?.getReference(n);i||(i=this.addViewNode(e,t,n));const c=i.addNode("FIELD",`${t}${r}`);if(c){const e=`${o}${r}`,n=`${t}${r}`;s.addReference(e,c),s.addReference(n,c),c.value=a,c.setPreviousDefaultValue()}return c}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const a=this.getContextNode(e),[s,o,i]=Rn(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,s,o,{...r,rowIndex:i}),a?.getReference(`${t}.${n}`)?.triggerEvent(r)}onPageListMutate(e,t,n,r,a){this.getPageListNode(e,t,n,r)?.addEventListener(a)}mutatePageList(e,t,n,r){this.getContextNode(e).getReference(`${t}.${n}`)?.triggerEvent(r)}getFieldsList(e){return this.getContextNode(e)?.references}getFieldReferencePreviousValue(e,t){return this.getContextNode(e)?.references?.get(t)?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(t);r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}},xn={CONTENT_FIELDS_PATH:[G.CONTEXT_DATA,G.CASE_INFO.CASE_INFO,G.CONTENT],FIELD_MESSAGES_PATH:[G.CONTEXT_DATA,G.CASE_INFO.CASE_INFO,G.CONTENT,G.SUMMARY_OF_MESSAGES,G.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[G.CONTEXT_DATA,G.SUMMARY_OF_MESSAGES,G.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[G.CONTEXT_DATA,G.SUMMARY_OF_MESSAGES,G.HTTP_MESSAGES],CASE_MESSAGE_PATH:[G.CASEMESSAGES]},wn=(e="",t="",n,r)=>{let a,s=[];null!==e&&(a=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===G.PROPERTY&&e||e){s=[G.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)s.push(a[e]);s.push(G.SUMMARY_OF_MESSAGES,G.PROPERTY_MESSAGES,a[a.length-1])}else n===V.PAGE?s=[...xn.PAGE_MESSAGES_PATH]:n===G.HTTP?s=[...xn.HTTP_MESSAGES_PATH]:n===G.CASEMESSAGES?s=[...xn.CASE_MESSAGE_PATH]:r&&(s=[G.CONTEXT_DATA,...o.split(".")]);return s.filter(Boolean)},Mn=(e,t,n)=>{const r={content:{}},a=`${t}[${n}]`;return e?.content[a]&&(r.content={[a]:e.content[a]}),r},Ln=(e,t,n,r,a,s,o={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)[0],10)>t&&parseInt(e.match(/\d+/)[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)[0],10)<t&&parseInt(e.match(/\d+/)[0],10)>=n)))(n,r,a),c=r>a?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)[0],10),a=`${s}[${r}]`;o[`${s}[${r+("up"===c?1:-1)}]`]=Iu.getIn(e[t],[G.CONTEXT_DATA,...a.split(".")]),Iu.deleteIn(e[t],[G.CONTEXT_DATA,...a.split(".")])}));const d=Object.keys(o);d.length>0&&d.forEach((n=>{Iu.setIn(e[t],[G.CONTEXT_DATA,...n.split(".")],o[n])}))},jn=e=>{const{type:t,property:n,category:r,context:a,pageReference:s}=e;let o;n&&(o=n.slice(1));const i=au(a);let c=[];const d=Iu.getIn(i,wn(o,s,r));return t&&"all"!==t?(d&&Array.isArray(d)&&d.length>0&&(c=d.filter((e=>e.type===t))),t===V.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&Dn.mutateField(a,s,n,{messages:[...c],type:V.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):d},Un=e=>{const{property:t,pageReference:n,category:r,context:a,type:s,isListEntry:o,clearContextMessages:i,deletingIndex:c}=e,d={context:a,type:s};t&&!o?(Dn.mutateField(a,n,t,{type:At,fieldName:t}),d.property=t,d.pageReference=n):o?(d.pageReference=n,d.isListEntry=o,d.deletingIndex=c):d.category=r,ru(i?{type:At,payload:{stateObj:e.stateObj,context:a}}:{type:At,payload:d})},Fn=e=>{const{messages:t,property:n,pageReference:r,category:a,context:s}=e,o={messages:t,context:s};n?(o.property=n,o.pageReference=r):o.category=a,ru({type:Et,payload:o})},kn=(e,t,n)=>{for(const r of Object.keys(e))t.push(r),r===G.SUMMARY_OF_MESSAGES?n.push([...t]):"object"==typeof e[r]&&kn(e[r],t,n),t.pop();return n},Vn=(e,t)=>{let n=jn({context:G.APP.ROOT,category:"HTTP"});if(e){const e=jn({context:t,category:"HTTP"});n?e&&(n=n.concat(jn({context:t,category:"HTTP"}))):n=jn({context:t,category:"HTTP"})}return n},Gn=e=>{let t=null;t=ps(e)[0]?os(ps(e)[0]):e,t&&Un({context:t,stateObj:au(t),clearContextMessages:!0})},Bn={addMessages:Fn,getValidationErrorMessages:e=>{const t=au(e),n=[],r=Iu.getIn(t,[...xn.CONTENT_FIELDS_PATH])||{};return kn(r,[],[]).forEach((e=>{const t=Iu.getIn(r,[...e,G.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].length&&t[e][0].type===G.MESSAGES.MESSAGES_TYPE_ERROR&&(t[e][0].fieldLabel?n.push({label:`${t[e][0].fieldLabel}:`,description:t[e][0].message}):n.push(t[e][0].message))}))})),n},getMessages:jn,clearMessages:Un,getRootContainerHttpMessages:Vn,clearContextMessagesInActiveWorkArea:Gn},Hn=Bn,Wn=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:Iu.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||ru(tp({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}},qn=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}}(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const r=e.getValue(this.target)||[];t?r.forEach(((e,r)=>{t.forEach((t=>{const a=Er(t),s={};let o=!0;n&&(s[Er(n)]=k(),o=!1);const i={[a]:e[a],...s};this.update(i,r+1,o,{isDefault:!0})}))})):r.forEach(((e,t)=>{if(n&&!e[Er(n)]){const e={};e[Er(n)]=k(),this.update(e,t+1,!1,{isDefault:!0})}}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,r){const a=class{static execute(e,t,n,r,a,s){const o={instruction:"UPDATE",content:{...Iu.unflatten(r)}},i={content:{...o.content},target:Iu.buildInstructionPageReference(a,t),listIndex:n,instruction:"UPDATE"};return s||ru(tp({...o,listIndex:n-1,context:e,referenceList:`${a}${t}`})),i}}.execute(this.contextName,this.target,t,e,this.pageReference,n),{isDefault:s=!1,skipPageinstruction:o}=r;if(!o){if(this.initChangeList(t-1),!s){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=hu(Iu.deepClone(n),e,r)}if(this.current?.automatic!==s||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(a),s&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=hu(Iu.deepClone(t),Iu.unflatten(e),r)}}}delete(e,t){const n=class{static execute(e,t,n){return{target:Iu.buildInstructionPageReference(n,e),listIndex:t,instruction:"DELETE"}}}.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||ru(tp({instruction:"DELETE",listIndex:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:a,actionPayload:s={content:{}},displayPropertPayload:o={}}=class{static execute(e,t,n,r){const a={};Object.prototype.hasOwnProperty.call(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{a[e]=n[e],delete n[e]})),delete n.nonFormProperties);const s={instruction:"INSERT",content:{...Iu.unflatten(n)}},o=JSON.parse(JSON.stringify(s));return delete o.content.classID,{instruction:{target:Iu.buildInstructionPageReference(r,e),content:{...o.content},listIndex:t,instruction:"INSERT"},actionPayload:s,displayPropertPayload:a}}}.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList(t-1),!i){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=hu(Iu.deepClone(n),e,r)}this.insertNode(a),n||(s.content={...s.content,...o},ru(tp({...s,listIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e){const t=class{static execute(e,t,n,r){return{content:{...{...Iu.unflatten(n)}},target:Iu.buildInstructionPageReference(r,t),instruction:"REPLACE"}}}.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}deletePage(){const e=class{static execute(e,t){return{target:Iu.buildInstructionPageReference(t,e),instruction:"DELETE"}}}.execute(this.target,this.pageReference);this.insertNode(e)}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=class{static execute(e,t,n,r){return{target:Iu.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}}.execute(this.target,e,t,this.pageReference);this.insertNode(r),ru(tp({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=Wn.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),Wn.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=hu(Iu.deepClone(t),e)}},zn={},Yn={},Kn={},Xn=(e,t,n)=>{const r=e.getContextName();zn[r]||(zn[r]={}),zn[r][t]||(zn[r][t]={content:[]}),Yn[r]||(Yn[r]=[],Kn[r]=[]),fr.isStateMachineExist(r,n,t)||fr.setStateMachine(r,t,n,new qn(t,n,r))},Jn=e=>Tn.formatPageReference(e),Qn=(e,t)=>{const n=Yn[e],r=Kn[e],a=Er(t),s=a?.substring(0,a.indexOf("["));r?.indexOf(s)<0&&Kn[e].push(s),n?.indexOf(a)<0&&Yn[e].push(a)},Zn=e=>{delete Yn[e]},er=e=>fr.buildPageInstructionsByContext(e),tr=e=>fr.buildPageInstructionsByContext(e,!0),nr=e=>{fr.clearStateMachines(e),delete zn[e]},rr=(e,t,n,r)=>{let[,a]=t.split(`${e}[${r}]`);""!==a&&void 0!==a&&(a=a.startsWith(".")?a.substring(1):a,Object.keys(n).forEach((e=>{n[`${a}.${e}`]=n[e],delete n[e]})))},ar=(e,t,n,r,a)=>{const{skipStateUpdate:s=!1}=a,o=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),d=Jn(i);Xn(n,d,c),Qn(o,`${i}[${t}]`),rr(i,c,e,t);const l={instruction:G.LIST_ACTIONS.INSERT,content:{...Iu.unflatten(e)}};delete JSON.parse(JSON.stringify(l)).content.classID,fr.getStateMachine(o,c,d).insert(e,t+1,s,{})},sr=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},or=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(sr(e,n)){let n=Iu.getPropertyName(e);if(n=n.substr(n.indexOf(".")+1).split("."),n.length>1){let e=Iu.getIn(t,n)||null;if(!e){const r=`!P!${n.join(":")}`;e=Iu.getIn(t,r)||null}Iu.setIn(r,n,e)}else{const e=Iu.getIn(t,n);r[n[n.length-1]]=e}}})),r},ir=(e,t,n,r,a)=>{const s=e.getValue(t)||{};n&&Object.keys(s).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},cr=e=>{if(!e)return!1;const t=tr(e);return Array.isArray(t)&&t.length>0},dr=(e,t,n)=>{const{skipStateUpdate:r=!1}=n,a=e.getPageReference(),s=Jn(t);Xn(e,t,a),fr.getStateMachine(e.getContextName(),a,s).deleteAll(r)},lr=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?Iu.mergeDeep(e,this.fieldDefaults):Iu.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=n)}getDefaultsforType(e){return this.fieldDefaults[e]}};class ur{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;if("true"===o.required||!0===o.required){let c=r;switch(e){case"radiobuttons":c=o.value;break;case"attachment":{const e=s.getPageReference().replace(V.CASE_INFO.CASE_INFO_CONTENT,"").replace(V.DATA_INFO.DATA_INFO_CONTENT,"");c=(iu(`.attachmentsList${e}.${t.replace(".","")}`,"context_data",a)||[]).filter((e=>!e.delete)),0===c?.length&&(c="");break}case"checkbox":c&&"false"!==c||(c="");break;default:"string"==typeof c&&(c=c.trim())}i=this.getValidator("required")(c),ur.messageDispatcher(t,n,a,i,Tn.getFieldLabel(s))}return i}validateType(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;const c={pageReference:s.getPageReference(),context:a,property:t,target:s.getTarget()};let d=lr.getDefaultsforType(s.getComponentName())?.["client-validations"];!1!==d&&this.getValidator(e)&&(i=this.getValidator(e)(r,c),""!==r&&ur.messageDispatcher(t,n,a,i,o.label));const l=o.validationType;return d=l&&lr.getDefaultsforType(l)?.["client-validations"],!1!==d&&l&&this.getValidator(l)&&(i=this.getValidator(l)(r,c),ur.messageDispatcher(t,n,a,i,o.label)),i}validate(e,t,n,r){const a=r.getContextName();let s=null;if(!r.getConfigProps().disabled&&!r.getConfigProps().readOnly){const o=r.getPageReference();r.skipRequiredValidation()||(s=this.validateRequired(e,t,o,n,a,r)),s||(s=this.validateType(e,t,o,n,a,r))}return{message:s}}static messageDispatcher(e,t,n,r,a){if(r){const s=[];s.push({type:V.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),Fn({messages:s,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const pr=new ur;class hr{static getChanges(e){return{...kr(e)}}static isStateModified(e){return Br(e)||cr(e)||!!Gr(e)}static isFormValid(e){return vr(e)}static clearChangedProperties(e){return nr(e),Zn(e),Hr(e)}static getEditableFields(e){return Rr(e)}static setCustomValidator(e,t){pr.register(e,t)}static isPropertyEditable(e,t){return hr.getEditableFields(e).some((e=>e.name===t))}}const gr=hr,fr=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,r){const a=`${n}${t}`,{stateMachine:s}=this.getStateMachineObjByPath(a,e,!0);if(s&&s.targetPageReference!==r.targetPageReference)return s.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][a]||(this.unConnectedStates[e][a]={}),void(this.unConnectedStates[e][a]=r);this.states[e]||(this.states[e]={}),this.states[e][a]||(this.states[e][a]={}),this.states[e][a]=r}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((e=>{const a=n[e];if(a.visibility){const e=a.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),Iu.flatten(n,"",r),r}getStateMachinesByContext(e){return this.states?.[e]}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,n){const r=/\[\d+\]$/gm;let a=null;for(;e&&!this.isStateMachineExist(t,"",e);)a=null,n&&e.endsWith("]")?(a=e.match(r),a=a[a.length-1].substring(1,a[a.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:a}:{}}executeStateMachine(e,t,n,r=!0,a={}){const{stateMachineTarget:s,index:o}=this.getStateMachineObjByPath(t,e,r);if(!s)return!1;let[,i]=t.split(s);if(!i)return!1;null!==o&&([,i]=i.split(/^\[\d+\]/gm));const c={[Er(i)]:n},d=this.getStateMachine(e,"",s);return null!==o?d.update(c,Number(o)+1,a.skipStateUpdate??!0,a):d.updatePage(Iu.unflatten(c)),!0}registerForServerChanges(){Ql.registerForListChanges(((e,t,n)=>{t.indexOf(".classID")<0&&gr.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n)}))}unRegisterForServerChanges(){Ql.unRegisterForListChanges()}},yr={},mr={},Ir={},Er=e=>e.startsWith(".")?e.substring(1):e,Ar=(e="",t="")=>`${Er(t)}${e?".":""}${Er(e)}`,_r=e=>{delete yr[e],delete mr[e],delete Ir[e]},Sr=(e,t,n)=>{let r=t;return Ir[e]?.[n]&&Object.keys(Ir[e][n]).length&&Object.keys(Ir[e][n]).forEach((a=>{const s=Ir[e][n][a]?.getConfigProps();if(s.visibility||!Object.hasOwn(s,"visibility")){const s=Ir[e][n][a];s.isMounted=t.isMounted,r=s}})),r},Cr=(e,t,n)=>{((e,t,n)=>{if(yr[e]){const r=yr[e].fieldOrder[t];((e,t,n,r)=>{n&&r&&n.getStateProps().visibility!==r.getStateProps().visibility&&(Ir[e]||(Ir[e]={}),Ir[e][t]||(Ir[e][t]={}),Ir[e][t][r.getStateProps().visibility]=r,Ir[e][t][n.getStateProps().visibility]||(Ir[e][t][n.getStateProps().visibility]=n))})(e,t,r,n),r&&!r.getConfigProps().readOnly&&n.getConfigProps().readOnly||(yr[e].fieldOrder[t]=n,r?.isMounted&&(yr[e].fieldOrder[t].isMounted=r?.isMounted)),yr[e].fieldOrder[t].isError=r?.isError||!1}else yr[e]={fieldOrder:{[t]:n}},yr[e].fieldOrder[t].isError=!1})(e,Er(t),n)},$r=(e,t,n)=>{if(yr[e]){const r=Er(Ar(t,n)),a=Sr(e,yr[e].fieldOrder[r],r);a&&(a.isError=!1,Ir[e]?.[r]&&Object.keys(Ir[e][r]).forEach((t=>{Ir[e][r][t].isError=!1})))}},br=()=>yr,Pr=e=>{const t=e.isExpressionExist(),n=e.getConfigProps().visibility,r=t&&!1!==n,a=!t&&(void 0===n||"true"===n||!0===n);return e.isMounted&&(r||a)},Or=(e,t)=>{const n=e.isExpressionExist(),r=t.visibility,a=n&&!1!==r,s=!n&&(void 0===r||"true"===r||!0===r);return e.isMounted&&(a||s)},Tr=e=>{const t=e.readOnly;return!0===t||"true"===t},Nr=(e,t={})=>{const n=[];let r=[];const a=[],s=br(),{ignoreFieldsInsideList:o=!0}=t;if(s[e])for(const t in s[e].fieldOrder)if(Object.hasOwn(s[e].fieldOrder,t)){const a=Sr(e,s[e].fieldOrder[t],t),i=Pr(a),c=a.isInsideList(),d=a.getStateProps()?.value||a.getStateProps()?.selectionList;if(i&&a.isEditable()&&!Tr(a.getConfigProps())){const{attachmentPageInstructionEnabled:s=!1}=PCore.getEnvironmentInfo().environmentInfoObject?.features?.form||{},i=a.getPageReference().replace(V.CASE_INFO.CASE_INFO_CONTENT,"").replace(V.DATA_INFO.DATA_INFO_CONTENT,""),l="Attachment"===a.getMetadata().type&&s&&""!==i;if("Attachment"!==a.getMetadata().type||l)l||c&&(!c||o)||Array.isArray(a.getValue(t))||fr.executeStateMachine(e,t,a.getValue(d))||n.push(t);else{let n=(PCore.getStoreValue(`.attachmentsList.${d.replace(".","")}`,"context_data",e)||[]).filter((e=>`${a.options.pageReference}.${e.label}`===t));n=Iu.buildAttachmentsFormData(n),n.length>0&&(r=[...r,...n])}}}if(mr[e])for(const t in mr[e].fieldOrder)Object.hasOwn(mr[e].fieldOrder,t)&&a.push(t);return{formInputs:n,attachments:r,formPageFields:a}},vr=e=>{const t=br();let n,r=!0;if(t[e])for(const a in t[e].fieldOrder)if(Object.hasOwn(t[e].fieldOrder,a)){const s=Sr(e,t[e].fieldOrder[a],a);let o="value",i=s.getStateProps()[o];if(!i){const e=s.getComponentConfig();"multi"===e.selectionMode?o="selectionList":"Editable"===e.renderMode&&(o="referenceList"),i=s.getStateProps()[o]}const c=Pr(s),d=s.getConfigProps();!c||Tr(d)||d.disabled||(s.isError=!1,s.getValidationApi().validate(s.getValue(i))),!n&&s.isError&&c&&(n=a),r&&s.isError&&c&&(r=!1)}return r},Rr=e=>{const t=[],n=br();if(n[e])for(const r in n[e].fieldOrder)if(Object.hasOwn(n[e].fieldOrder,r)){const a=Sr(e,n[e].fieldOrder[r],r),s=a.getConfigProps();if(Or(a,s)&&!Tr(s)&&!s?.disabled&&"Attachment"!==a.getMetadata()?.type&&"multirecordlist"!==a.getMetadata()?.config?.type){const e=s?.label||s?.caption,n=a.getComponentName().toLowerCase();t.push({name:r,label:e,type:n,fieldC11nEnv:a})}}return t},Dr=class{static getPropertyName(e){return ue.getPropertyName(e)}static isProperty(e){return ue.isProperty(e)}static getLeafPropertyName(e){return ue.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},xr=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}};class wr{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,a){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:a}]}registerForRefresh(e,t,n,r,a){const s=r.split("/").join(G.HASH_DELIMITER),o=Iu.getHashedString(s);"PROP_CHANGE"===e?this.propChangeRefreshMap?.[a]?.[n]?!this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===o))&&this.propChangeRefreshMap[a][n].push({uniqueHash:o,callback:t}):wr.initializeRefreshCache(this.propChangeRefreshMap,a,n,o,t):this.refreshMap?.[a]?.[`${e}-${n}`]?!this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===o))&&this.refreshMap[a][`${e}-${n}`].push({uniqueHash:o,callback:t}):wr.initializeRefreshCache(this.refreshMap,a,`${e}-${n}`,o,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const Mr=new wr,{APP:Lr}=G;let jr={},Ur={};const Fr="You will lose unsaved changes. Do you want to continue?",kr=(e=Lr.APP,t,n)=>{let r=[],a=[];t||(r=(e=>{const t=br(),n=[];if(t[e])for(const r in t[e].fieldOrder)!Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)||!1!==t[e].fieldOrder[r].getConfigProps().visibility&&!1!==t[e].fieldOrder[r].isMounted||n.push(r);return n})(e)),n||(a=(e=>{const t=br(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)&&!0===t[e].fieldOrder[r].getConfigProps().readOnly&&n.push(r);return n})(e));const s={},o=jr[e]||{};return Object.keys(o).forEach((e=>{!Object.prototype.hasOwnProperty.call(o,e)||r.includes(e)||a.includes(e)||Iu.buildObject(e,s,o[e].value)})),s},Vr=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete jr[t]?.[n]},Gr=e=>Ur[e],Br=e=>{const t=tr(e)||{};return jr[e]&&Object.keys(jr[e]).some((t=>jr[e][t].initialValue!==jr[e][t].value))||Object.keys(t).length>0},Hr=e=>{e&&jr[e]?jr[e]={}:"all"===e&&(jr={},Ur={}),Ur[e]&&(Ur[e]=!1)},Wr=e=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===$e&&(sn(r),(e=>{const t=Iu.getPropertyName(e.propertyName),{context:n,pageReference:r,value:a}=e,s=r?`${r}.${t}`:t;Ql.triggerCascade(n,s,a);const o=dn.getDependencies(n,s),i=Ql.getResetDependencies(n,s),c={context:n,datapages:{}};[...o,...i].forEach((e=>{const t=Iu.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=t.split("."),r=`.${e.pop()}`,a=e.join(".");fr.getStateMachine(n,a,r).deleteAll(r)}else xr.isPageInstruction(t)&&fr.executeStateMachine(n,t,""),ru({type:Se,payload:{reference:t,value:"",context:n,isArrayDeepMerge:!0,isImplicit:!0}})})),o.forEach((t=>{let a=r;t.startsWith(r)||(a="");const s=t.replace(`${a}`,"").split(".").filter((e=>!!e));s.pop();const o=s.join("."),i=iu(`.${o}`,a,n)?.classID||e.classID,d=Rl(t.split(".").pop(),i),{datasource:l}=d,u={};let p=[];l.parameters.forEach((e=>{e?.value?(u[e.name]=Dr.isProperty(e.value)?iu(`.${Iu.getFullPropertyReference([o,Iu.getPropertyName(e.value)])}`,a,n):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(G.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(G.NULL_STRING))})),p=l.name.concat(G.UNDERSCORE_STRING,Iu.getHashedString(p.join(G.HASH_DELIMITER)));const{name:h}=l,g=Ul(h);c.datapages[p]={mode:l.mode,propertyName:t,name:l.name,dataViewParameters:u,refreshStrategy:g?.refreshStrategy}})),o.length&&ru({type:St,payload:c})})(r),(((e,t)=>{if(!e||!t)return!1;const n=jr[e]&&jr[e][t];return!!n&&n.previousValue!==n.value})(r.context,r.reference)||cr(r.context))&&Pn(r),Mr.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===bt){const{context:e,referenceList:t}=r;Pn({context:e,pageReference:t})}if(n===Se||n===Ce){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:s=!1}=r;Dn.updateFieldNodeValue(a,e,r.value),xr.isPageInstruction(e)||s?s||(Ur[`${a}`]=!0):(e=>{const{payload:t}=e,{context:n,initialValue:r="",isStrictTracking:a}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;jr[n]=jr[n]||{},jr[n][s]?jr[n][s].previousValue=iu(t.reference,null,n):(jr[n][s]={initialValue:r||iu(t.reference,null,n)},jr[n][s].previousValue=jr[n][s].initialValue),jr[n][s].value=t.value,a&&jr[n][s].value===jr[n][s].initialValue&&Vr(t)})(t),(r.removePropertyFromChangedList||n)&&Vr(r)}if(n===Qe||n===Ze){const{transientItemID:e,data:t}=r;Iu.iterateLeafNodes(t,(t=>{Vr({context:e,value:"",reference:t.join(".")})}))}n&&[tt,ze,rt].includes(n)&&(Hr(r.context),Ql.purgeResetDependencies(r.context),(e=>{e&&_n[e]&&delete _n[e]})(r.context),(r.childContainersContexts||[]).forEach((e=>{Hr(e)})),(r.transientItems||[]).forEach((e=>{Hr(e)}))),e(t)},qr=(e,t)=>{e.DeclareExpressions&&on({[t.context]:e.DeclareExpressions})},zr=(e,t,n=!1)=>{const r=Iu.getIn(e,G.RESOURCERS);r&&((e=>{e&&Ml(e)})(r),qr(r,t)),n||_p({...e,options:t})},Yr="component-loader",Kr={},Xr=async(e,t)=>{const n=ne.getLoader(),r=t||ne.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(ne.getLoader(Yr))return ne.getLoader(Yr)(e,r);const a=[];return e.forEach((e=>{if(Kr[e])return;const t=de.getComponent(e);if(t)(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;a.push(n(t,ne.getTypes.SCRIPT))})),(t.styles||[]).forEach((e=>{a.push(n(r+e,ne.getTypes.STYLE))})),Kr[e]=!0;else{const t=`${ne.getConstellationServiceUrl()}/v860/${ne.getAppAlias()}/component/${e}.js`;a.push(n(t,ne.getTypes.SCRIPT))}})),Promise.all(a)};class Jr{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const Qr=Jr,Zr=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let a=0,s=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(s=a),a+=1})),r.splice(s,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,a){this.subscribers[e]=this.subscribers[e]||[];let s=!1;if(a&&this.subscribers[e].forEach((e=>{s=e.id===t&&e.contextName===r})),!s){const a=new class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}}(e,t,n,r);this.subscribers[e].push(a)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}},ea=class{static subscribe(e,t,n,r=!1,a="app"){Zr.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Zr.publish(e,t)}static unsubscribe(e,t,n="app"){Zr.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Zr.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Zr.clearContext(e)}},ta=e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},na={CASE_INFO:`${G.DATA}.${G.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${G.DATA}.${G.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${G.DATA}.${G.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${G.DATA}.${G.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${G.DATA}.${G.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${G.DATA}.${G.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${G.DATA}.${G.CASE_INFO.ASSIGNMENT_ID}`},ra=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||Qr.getTargetViewContainerName(e)},aa=e=>{const t=e.lastIndexOf(G.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(G.UNDERSCORE_STRING);return e.substring(t,n)},sa=e=>e===Ka.WORKAREA,oa=e=>e===Ka.MODAL,ia=e=>e===Be,ca=e=>e&&e.find((e=>e.type===Be)),da=e=>Iu.getIn(e,na.CASE_INFO,{}),la=e=>e?e.split(" ").pop():void 0,ua=e=>Iu.getIn(e,na.CASE_CLASS_NAME,G.EMPTY_STRING),pa=e=>{const t=da(e);return ln(t)&&un(ee.getOperatorIdentifier(),t)},ha=e=>Iu.getIn(e,na.CASE_INFO_ID,G.EMPTY_STRING),ga=e=>Iu.getIn(e,na.CASE_FIRST_ASSIGNMENT_ID,G.EMPTY_STRING),fa=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(Ju(Hu,{containerItemID:t,context:a||ds(t),target:r}))}},ya=e=>{const t=nu();if(!e)return!1;const n=ge(e),r=$s(n),a=$s(e);if(!r||!a)return!1;const s=Qa(r,n),o=Qa(a,e);if(!s||!o)return!1;const{key:i}=s||{};let{key:c}=o||{};return c||(c=t.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},ma=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=ha(t);Iu.setIn(e,"key",a);const s=ln(da(t));if(!r&&(e=>{const t=Iu.getIn(e,na.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=ga(t),[,r]=n.split("!");(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:s}),Iu.setIn(e,"flowName",r)}},Ia=(e,t)=>{const{attachmentsExist:n}=t;n&&Iu.setIn(e,V.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),Iu.setIn(e,V.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Ea=(e,t,n)=>{let r=G.PROMISE_VALUE.RESOLVE;return ca(e)?(r=G.PROMISE_VALUE.REJECT,n?In.rejectActionByID(t,!0,n):In.rejectActionByID(t)):In.resolveActionByID(t),r},Aa=e=>"true"===ee.getCaseTypeList().filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase,_a=()=>"true"===ee?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,{RESOURCE_TYPES:Sa}=V,Ca={PAGE:"page",FORM:"form"},$a={[Sa.CASE]:[ht,ut,pt],[Sa.PAGE]:[it,dt],[Sa.DATA]:[ct]},ba=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[V.REMOTE_SYSTEM_ID]||e[V.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[V.REMOTE_SYSTEM_ID]||e[V.REMOTE_SYSTEM_ID.toLowerCase()]||a:B.isRemoteCase(t)&&(r.RemoteSystemID=B.getRemoteHeader(t)),r},Pa=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:a=!0}=t;let s={};s=((e,t={})=>{const n={},r=au(e),{ignoreFieldsInsideList:a=!0}=t;if(r&&r.caseInfo&&r.caseInfo.content){const{formInputs:t,attachments:s,formPageFields:o}=Nr(e,{ignoreFieldsInsideList:a});s&&s.length>0&&Iu.buildObject("caseInfo.attachments",n,s),o&&o.length>0&&o.forEach((e=>{let t=Iu.getIn(r,e);"object"==typeof t&&(t=Iu.deepClone(t),delete t?.classID),Iu.buildObject(e,n,t)})),t&&t.length>0?t.forEach((e=>{Iu.buildObject(e,n,Iu.getIn(r,e))})):Iu.buildObject("caseInfo.content",n,{})}if(r&&r.dataInfo&&r.dataInfo.content){const{formInputs:t}=Nr(e,{ignoreFieldsInsideList:a});t&&t.length>0&&t.forEach((e=>{Iu.buildObject(e,n,Iu.getIn(r,e))}))}return n})(e),n&&delete s?.caseInfo?.content;const o=kr(e,!1);r&&Object.entries(s?.caseInfo?.content).forEach((([t,n])=>{const r=au(e),a=T()(r,V.CASE_INFO.CASE_INFO_CLASSID);("True-False"===Rl(t,a)?.type&&!n||""===n)&&delete s.caseInfo.content[t]}));const i=D()(o,s);let c={},d=!1;i&&i.caseInfo&&(c={...i.caseInfo},i.caseInfo.attachments&&(d=!0));const l=[...er(e)];return a&&l.forEach((e=>{delete e.content?.EmbedListUUID__})),c.pageInstructions=l,(Yn[e]||[]).forEach((e=>{if(c&&c.content){const t=e?.replace(G.CASE_INFO.CASE_INFO_CONTENT,"");Iu.deleteIn(c.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),i&&i.dataInfo?{...i.dataInfo,pageInstructions:c.pageInstructions}:{content:c,attachmentsExist:d}},Oa=(e,t)=>{let n,r,a={};const s=Iu.getIn(e,G.UI_RESOURCERS),o=Iu.getIn(e,"confirmationNote");s?(n=Iu.getIn(e,G.UI_RESOURCERS_CONTEXT_DATA),r=Iu.getIn(e,G.ROOT),a=Iu.getIn(e,G.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:d,key:l,flowName:u}=e,p=Iu.getIn(e,"nextAssignmentInfo",null),h=Iu.getIn(e,"nextAssignmentInfo.context",""),g=Iu.getIn(e,"confirmationLinks",null),{isInCreateStage:f,openCaseViewAfterCreate:y,debugInfo:m}=t;return{data:{...i,key:l,flowName:u,coreHeaders:m&&{debugInfo:{[G.COREHEADER_APP_DEBUG_ID]:m.debugId}},caseInfo:{...i.caseInfo,actionButtons:a,headers:t.headers},[G.CONTEXT_DATA]:f?{...i[G.CONTEXT_DATA],...n,openCaseViewAfterCreate:y,errors:c}:{...i[G.CONTEXT_DATA],...n,errors:c}},semanticURL:d,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:g,key:l,root:r,...t}},Ta=async(e,t,n,r=!1,a=!1)=>{const s=Iu.getIn(e,G.LOCALE_REFERENCES);await se.loadLocaleResources(s);const o=Iu.getIn(e,G.COMPONENTS);if(o)try{await Xr(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?_p({...e,options:i,directUrlUpdation:!0}):zr(e,i,a)},Na=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},va=e=>{if(e){const[,t]=e.split("!");return{key:Na(e),flowName:t}}return{}},Ra=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,s=n&&n.response?n.response.data:"",o=(e=>{const t=br(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.hasOwn(t[e].fieldOrder,r)&&!1!==t[e].fieldOrder[r].getConfigProps().visibility&&n.push(r.substring(r.indexOf("content")+8));return n})(r);return a&&In.rejectActionByID(a),Ju(Qu,"Error action triggered",s,r,o)},Da=(e,t)=>fs(e)&&ms(e)?Ju(zu,t):Ju(Mu,t),xa=(e,t,n=G.APP.APP,r={})=>{let a=null;const{buildNew:s=!0}=r;return fs(e)?a=ms(e)?os(e):fe(t,n):ys(e)&&(ms(e)&&!s?a=ls(e):ms(e)&&!s||(a=fe(t,n))),a},wa=e=>e&&e.type===qe,Ma=e=>{let t=!1;const n=hs(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&Br(r)){t=!0;break}}return t},La=(e,t={})=>{let n=!1,r=!1,a={},s=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:d,skipChildDirtyState:l=!1}=t;if(fs(e)){const t=os(e),r=ds(t);Br(r)&&(n=!0),l||n||(n=Ma(t))}else if(ys(e)&&As(e)){let t=Cs(e);t||(t=os(e),r=!0),a.containerItemID=t,a.context=ds(t)}if(n){const e=d||Fr;o=window.confirm(se.getLocaleValue(e,"Messages"))}if(!o&&n&&(a={},s=!1),r){const e=se.getLocaleValue("You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.","Messages");c?i=window.confirm(e):(window.alert(e),s=!1)}return!i&&r&&(a={},s=!1),{continueExecution:s,removeActionPayload:a}},ja=(e,t)=>{let n=!1;const r=ee.isCoexistenceAppOfType(G.APP_TYPE.UIKIT),{insKey:a,isParallelCall:s,skipFlowNameCheck:o}=t;if(!a)return{};const[,i]=a.split("!")||"",c=o?a:Na(a),d=rs(e,c);let l={},u=!1;if(d&&!r&&(n=!0,l=Qa(e,d),!o)){let e=l?.flowName;const t=aa(d),r=us(d);if(r.length){const n=Rt(t,r[0]);e=Qa(n,r[0])?.flowName}else n=e===i;(e!==i||s)&&(u=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:u,containerItemID:d,semanticURL:l.semanticURL,insKey:a}}},Ua=(e,t,n)=>e===Sa.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=rs(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===Sa.ASSIGNMENT?ja(t,n):e===Sa.CASE?ja(t,{...n,skipFlowNameCheck:!0}):{},Fa=(e=[])=>{ms(`${G.APP.APP}/${G.PREVIEW}`)&&e.push(Ju(wu,_s({context:V.APP.APP,name:G.PREVIEW})))},ka=e=>{let t;for(const n of Object.keys($a))if($a[n].includes(e)){t=n;break}return t},Va=(e,t)=>{const{data:n={},context:r,caseViewMode:a}=e,s={data:{...n},caseViewMode:a,context:ge(r)};Iu.deleteIn(s.data,"shared"),Iu.setIn(s.data,["context_data","caseViewMode"],a),t.push({type:Pt,payload:{context:s.context}}),t.push(Ju(Ou,s))},Ga=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=Iu.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=Iu.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:Iu.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:Iu.getIn(t,["payload","context"]),context:Iu.getIn(t,["payload","context"])},r={type:je,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),ru(e),e=e.filter((e=>e.type!==je))}const a=((e,t,n)=>({assignmentID:e,vcName:G.PRIMARY,targetContainerName:Iu.getIn(t,["payload","target"]),context:Iu.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);fs(a.targetContainerName)||t?.payload?.containerName!==G.WORKAREA||(a.isMultiDoc=!0,e=[]);const s={type:Ue,payload:{...a}};e.push(s),ru(e)}else ru(e)}},Ba=(e,t)=>D()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),Ha=e=>{let t={},n=Vs(e);for(;n;){const e=Pa(n);t=Ba(e.content,t),n=Vs(n)}return t},Wa=new class{getCoreheaders(e){const t=`${V.APP.APP}${G.FORWARD_SLASH_STRING}${G.PRIMARY}`,n=os(t),r=ds(n),a=_u.getProperty(G.COREHEADERS,"",r);if(a&&e in a)return a[e]}},qa=class{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:a,items:s}=e;if(a&&s){const e=a[a.length-1];if(s[e]?.view&&Object.keys(s[e].view).length>0){const a=s[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=a,{viewName:d,viewContext:l}=this.processRootViewDetails(i,a,t);return d?gl({meta:i,options:{context:c,pageReference:l||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===Ka.WORKAREA||n===Ka.MODAL||d===G.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect:null}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:a}={}}=e,{context:s}=t;let o=a,i=r;const c=Dr.isProperty(a),d=Dr.isProperty(r);if(d){const e=Dr.getPropertyName(r);i=iu(`.${e}`,e.startsWith(".")?n:"",s)}if(i||(i=n),c){const e=Dr.getPropertyName(a);o=iu(`.${e}`,i,s)}return c&&d&&""!==o&&(o=a,i=r),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,a;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=os(e),s=Qa(e,t);s&&({key:r,flowName:a}=s)}t.addContainerItem({semanticURL:"",key:r,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}},za={defaultLimit:16},Ya={SINGLE:"single",MULTIPLE:"multiple"},Ka={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Xa=()=>nu()?.getState()?.containers,Ja=e=>e?nu().getState().containers[e]:(wt.error("getContainerData: target is the required parameter"),null),Qa=(e,t)=>{if(!e||!t)return null;const n=Xa()[e];return n&&n.items&&n.items[t]||null},Za=e=>e?nu().getState().containers[e]?.items||{}:(wt.error("getContainerItems: target is the required parameter"),null),es=e=>e?nu().getState().containers[e]?.accessedOrder||[]:(wt.error("getContainerAccessOrder: target is the required parameter"),[]),ts=e=>e?es(e)?.length>0||!1:(wt.error("areContainerItemsPresent: target is the required parameter"),!1),ns=(e,t,n)=>{if(!e||!t)return wt.error("isContainerItemExists: target and key are required parameters"),!1;const r=Xa()[e],a=r&&r.items||null,s=n||((e,t)=>e===t);if(t&&a)for(const e in a)if(s(t,a[e].key))return!0;return!1},rs=(e,t,n)=>{if(!e||!t)return wt.error("getContainerItemName: target and key are required parameters"),null;const r=Xa()[e],a=r&&r.items||null,s=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(s(t,a[e].key))return e;return null},as=(e,t)=>{if(!e||!t)return wt.error("isContainerInitialized: context and name are required parameters"),!1;const n=Xa();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},ss=(e,t)=>{if(!e||!t)return wt.error("getContainerType: context and name are required parameters"),null;const n=Xa()[`${e}/${t}`];return n&&n.type},os=e=>{if(!e)return wt.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=Xa();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},is=(e,t,n)=>{if(!e||!t)return wt.error("isContainerItemActive: target and key are required parameters"),!1;const r=rs(e,t,n);return!!r&&r===os(e)},cs=(e,t)=>{let n=null;const r=Xa();for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&r[a].items){const s=r[a].items[e];if(n=s?s[t]:null,n)break}return n},ds=e=>e?cs(e,"context"):(wt.error("getDataContextName: containerItemName is required parameters"),null),ls=e=>{if(!e)return wt.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=Xa();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,s=a&&a.length>0?a[a.length-1]:null;t=ds(s)}return t},us=e=>{if(!e)return wt.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=Xa(),s=n=>{const a=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&a.push(n),n===e&&(r=!0)})),a};for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)&&a[e].items){const t=s(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},ps=e=>{if(!e)return wt.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=Xa();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},hs=e=>{if(!e)return wt.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=Xa();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&(es(r)||[]).forEach((n=>{ds(n)!==e&&t.push(ds(n))}));return t},gs=e=>{const t=[...hs(e),e],n=[],r=nu().getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${G.SUGGESTION}`)&&n.push(`${e}/${G.SUGGESTION}`)})),n},fs=e=>e?e&&Ja(e)&&Ja(e).type===Ya.SINGLE:(wt.error("isContainerSingleMode: target is required parameters"),null),ys=e=>e?e&&Ja(e)&&Ja(e).type===Ya.MULTIPLE:(wt.error("isContainerMultipleMode: target is required parameters"),null),ms=e=>e?Ja(e)&&Ja(e).items&&Object.keys(Ja(e)?.items).length>0||!1:(wt.error("hasContainerItems: target is required parameters"),!1),Is=e=>e&&za[e]?za[e]:za.defaultLimit,Es=(e,t=za.defaultLimit)=>{e?za[e]=t:wt.error("setContainerLimit: target is required parameter")},As=e=>{if(!e)return wt.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=Ja(e),{items:r={}}=n,a=Object.keys(r),s=Is(e);return a&&a.length>0&&a.length>=s&&(t=!0),t},_s=e=>{if(!e||!e.name||!e.context)return wt.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=Ja(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=ps(`${G.APP.APP}/${G.PREVIEW}`),s=hs(`${G.APP.APP}/${G.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...s],childContainers:a}},Ss=e=>{if(!e)return wt.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=ds(e);return Br(t)||Ma(e)},Cs=e=>{if(!e)return wt.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=Ja(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!Ss(n)){t=n;break}}return t},$s=e=>{if(!e)return wt.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=nu().getState();for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(G.UNDERSCORE_STRING);return e.substring(0,n)},bs=(e,t={})=>{if(!e)return wt.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=$s(e),r=ds(e),{skipDirtyCheck:a}=t;let s=!0,o=[];if(Ss(e)&&!a&&(s=window.confirm(se.getLocaleValue(Fr,"Messages"))),s){const{accessedOrder:t=[],items:a={},type:s}=Ja(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=a[i]||{},{semanticURL:d=G.FORWARD_SLASH_STRING,context:l}=c;o.length>0&&d&&d!==G.FORWARD_SLASH_STRING?_p({directUrlUpdation:!0,semanticURL:d,options:{containerItemID:i,context:l}}):_p({directUrlUpdation:!0,semanticURL:G.FORWARD_SLASH_STRING,options:{}}),ru(Hu({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:s}}))}return Promise.resolve({newAccessedOrder:o})},Ps=(e,t,n,r)=>{const a="root",s=fe(t,a,!0),o=Rt(t,a),i={data:n,context:r?"app":s},c=[Mu({root:e,containerItemID:s,context:r?"app":s,target:o,containerName:t})];c.push(Ou(i)),ru(c)},Os=(e,t,n)=>{let r=es(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1)if(ds(r[e])===n){a=!0;break}return a},Ts=e=>{if(!e)return wt.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=Xa(),n=ds(e),r=Object.keys(t);let a=!1;for(let t=0;t<r.length&&(a=Os(r[t],e,n),!a);t+=1);return a},Ns=e=>{Array.isArray(e)||(e=[e]);const t=Xa()||{};return e.map((e=>{const n=$s(e);return Iu.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},vs=e=>{const t=Iu.deepClone(nu().getState().data[e]);Iu.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&Iu.setIn(t,e,"")})),ru(Uu({transientItemID:e,data:t}))},Rs=e=>{const t=Iu.deepClone(nu().getState().data[e]);Iu.iterateLeafNodes(t,(e=>Iu.setIn(t,e,""))),ru(Fu({transientItemID:e,data:t}))};class Ds{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const xs=()=>Ds,ws=e=>{const t={containerName:e};t.childContainers=ps(e),ru({type:st,payload:t})},Ms=(e,t)=>{const n=us(e),{key:r}=Qa($s(e),e),a=[];n.forEach((e=>{const{key:n}=Qa($s(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:$s(e),context:e};a.push({type:Fe,payload:n})}})),a.length&&ru(a)},Ls=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:$s(e),context:e};n.push({type:Fe,payload:r}),n.length&&ru(n)},js=()=>ee.isPortalLoaded?"app":"root",Us=()=>Wa,Fs=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:$s(e),context:e};ru({type:Fe,payload:n})},ks=(e,t)=>{const n=rs(e,t),r=rs(`${n}/workarea`,t);return ds(r)},Vs=e=>e?cs(e,"parentContext"):(wt.error("getContainerParentContext: containerItemName is required parameters"),null),Gs=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},Bs=()=>qa;function Hs(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ws}=Object.prototype,{getPrototypeOf:qs}=Object,zs=(Ys=Object.create(null),e=>{const t=Ws.call(e);return Ys[t]||(Ys[t]=t.slice(8,-1).toLowerCase())});var Ys;const Ks=e=>(e=e.toLowerCase(),t=>zs(t)===e),Xs=e=>t=>typeof t===e,{isArray:Js}=Array,Qs=Xs("undefined"),Zs=Ks("ArrayBuffer"),eo=Xs("string"),to=Xs("function"),no=Xs("number"),ro=e=>null!==e&&"object"==typeof e,ao=e=>{if("object"!==zs(e))return!1;const t=qs(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},so=Ks("Date"),oo=Ks("File"),io=Ks("Blob"),co=Ks("FileList"),lo=Ks("URLSearchParams"),[uo,po,ho,go]=["ReadableStream","Request","Response","Headers"].map(Ks);function fo(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),Js(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let o;for(r=0;r<s;r++)o=a[r],t.call(null,e[o],o,e)}}function yo(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const mo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Io=e=>!Qs(e)&&e!==mo,Eo=(Ao="undefined"!=typeof Uint8Array&&qs(Uint8Array),e=>Ao&&e instanceof Ao);var Ao;const _o=Ks("HTMLFormElement"),So=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Co=Ks("RegExp"),$o=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fo(n,((n,a)=>{let s;!1!==(s=t(n,a,e))&&(r[a]=s||n)})),Object.defineProperties(e,r)},bo="abcdefghijklmnopqrstuvwxyz",Po="0123456789",Oo={DIGIT:Po,ALPHA:bo,ALPHA_DIGIT:bo+bo.toUpperCase()+Po},To=Ks("AsyncFunction"),No=(vo="function"==typeof setImmediate,Ro=to(mo.postMessage),vo?setImmediate:Ro?(Do=`axios@${Math.random()}`,xo=[],mo.addEventListener("message",(({source:e,data:t})=>{e===mo&&t===Do&&xo.length&&xo.shift()()}),!1),e=>{xo.push(e),mo.postMessage(Do,"*")}):e=>setTimeout(e));var vo,Ro,Do,xo;const wo="undefined"!=typeof queueMicrotask?queueMicrotask.bind(mo):"undefined"!=typeof process&&process.nextTick||No,Mo={isArray:Js,isArrayBuffer:Zs,isBuffer:function(e){return null!==e&&!Qs(e)&&null!==e.constructor&&!Qs(e.constructor)&&to(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||to(e.append)&&("formdata"===(t=zs(e))||"object"===t&&to(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Zs(e.buffer),t},isString:eo,isNumber:no,isBoolean:e=>!0===e||!1===e,isObject:ro,isPlainObject:ao,isReadableStream:uo,isRequest:po,isResponse:ho,isHeaders:go,isUndefined:Qs,isDate:so,isFile:oo,isBlob:io,isRegExp:Co,isFunction:to,isStream:e=>ro(e)&&to(e.pipe),isURLSearchParams:lo,isTypedArray:Eo,isFileList:co,forEach:fo,merge:function e(){const{caseless:t}=Io(this)&&this||{},n={},r=(r,a)=>{const s=t&&yo(n,a)||a;ao(n[s])&&ao(r)?n[s]=e(n[s],r):ao(r)?n[s]=e({},r):Js(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&fo(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(fo(t,((t,r)=>{n&&to(t)?e[r]=Hs(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,s,o;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)o=a[s],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&qs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:zs,kindOfTest:Ks,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Js(e))return e;let t=e.length;if(!no(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:_o,hasOwnProperty:So,hasOwnProp:So,reduceDescriptors:$o,freezeMethods:e=>{$o(e,((t,n)=>{if(to(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];to(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Js(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:yo,global:mo,isContextDefined:Io,ALPHABET:Oo,generateString:(e=16,t=Oo.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&to(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ro(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=Js(e)?[]:{};return fo(e,((e,t)=>{const s=n(e,r+1);!Qs(s)&&(a[t]=s)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:To,isThenable:e=>e&&(ro(e)||to(e))&&to(e.then)&&to(e.catch),setImmediate:No,asap:wo};function Lo(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}Mo.inherits(Lo,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Mo.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const jo=Lo.prototype,Uo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Uo[e]={value:e}})),Object.defineProperties(Lo,Uo),Object.defineProperty(jo,"isAxiosError",{value:!0}),Lo.from=(e,t,n,r,a,s)=>{const o=Object.create(jo);return Mo.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Lo.call(o,e.message,t,n,r,a),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Fo=Lo;function ko(e){return Mo.isPlainObject(e)||Mo.isArray(e)}function Vo(e){return Mo.endsWith(e,"[]")?e.slice(0,-2):e}function Go(e,t,n){return e?e.concat(t).map((function(e,t){return e=Vo(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Bo=Mo.toFlatObject(Mo,{},null,(function(e){return/^is[A-Z]/.test(e)})),Ho=function(e,t,n){if(!Mo.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Mo.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Mo.isUndefined(t[e])}))).metaTokens,a=n.visitor||d,s=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Mo.isSpecCompliantForm(t);if(!Mo.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Mo.isDate(e))return e.toISOString();if(!i&&Mo.isBlob(e))throw new Fo("Blob is not supported. Use a Buffer instead.");return Mo.isArrayBuffer(e)||Mo.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,a){let i=e;if(e&&!a&&"object"==typeof e)if(Mo.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Mo.isArray(e)&&function(e){return Mo.isArray(e)&&!e.some(ko)}(e)||(Mo.isFileList(e)||Mo.endsWith(n,"[]"))&&(i=Mo.toArray(e)))return n=Vo(n),i.forEach((function(e,r){!Mo.isUndefined(e)&&null!==e&&t.append(!0===o?Go([n],r,s):null===o?n:n+"[]",c(e))})),!1;return!!ko(e)||(t.append(Go(a,n,s),c(e)),!1)}const l=[],u=Object.assign(Bo,{defaultVisitor:d,convertValue:c,isVisitable:ko});if(!Mo.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Mo.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Mo.forEach(n,(function(n,s){!0===(!(Mo.isUndefined(n)||null===n)&&a.call(t,n,Mo.isString(s)?s.trim():s,r,u))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t};function Wo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function qo(e,t){this._pairs=[],e&&Ho(e,this,t)}const zo=qo.prototype;zo.append=function(e,t){this._pairs.push([e,t])},zo.toString=function(e){const t=e?function(t){return e.call(this,t,Wo)}:Wo;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Yo=qo;function Ko(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xo(e,t,n){if(!t)return e;const r=n&&n.encode||Ko,a=n&&n.serialize;let s;if(s=a?a(t,n):Mo.isURLSearchParams(t)?t.toString():new Yo(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const Jo=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Mo.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Qo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Yo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ei="undefined"!=typeof window&&"undefined"!=typeof document,ti=(ni="undefined"!=typeof navigator&&navigator.product,ei&&["ReactNative","NativeScript","NS"].indexOf(ni)<0);var ni;const ri="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ai=ei&&window.location.href||"http://localhost",si={...i,...Zo},oi=function(e){function t(e,n,r,a){let s=e[a++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),i=a>=e.length;return s=!s&&Mo.isArray(r)?r.length:s,i?(Mo.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o):(r[s]&&Mo.isObject(r[s])||(r[s]=[]),t(e,n,r[s],a)&&Mo.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let s;for(r=0;r<a;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o)}if(Mo.isFormData(e)&&Mo.isFunction(e.entries)){const n={};return Mo.forEachEntry(e,((e,r)=>{t(function(e){return Mo.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ii={transitional:Qo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=Mo.isObject(e);if(a&&Mo.isHTMLForm(e)&&(e=new FormData(e)),Mo.isFormData(e))return r?JSON.stringify(oi(e)):e;if(Mo.isArrayBuffer(e)||Mo.isBuffer(e)||Mo.isStream(e)||Mo.isFile(e)||Mo.isBlob(e)||Mo.isReadableStream(e))return e;if(Mo.isArrayBufferView(e))return e.buffer;if(Mo.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ho(e,new si.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return si.isNode&&Mo.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=Mo.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ho(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(Mo.isString(e))try{return(0,JSON.parse)(e),Mo.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ii.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Mo.isResponse(e)||Mo.isReadableStream(e))return e;if(e&&Mo.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Fo.from(e,Fo.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:si.classes.FormData,Blob:si.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Mo.forEach(["delete","get","head","post","put","patch"],(e=>{ii.headers[e]={}}));const ci=ii,di=Mo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),li=Symbol("internals");function ui(e){return e&&String(e).trim().toLowerCase()}function pi(e){return!1===e||null==e?e:Mo.isArray(e)?e.map(pi):String(e)}function hi(e,t,n,r,a){return Mo.isFunction(r)?r.call(this,t,n):(a&&(t=n),Mo.isString(t)?Mo.isString(r)?-1!==t.indexOf(r):Mo.isRegExp(r)?r.test(t):void 0:void 0)}class gi{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=ui(t);if(!a)throw new Error("header name must be a non-empty string");const s=Mo.findKey(r,a);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=pi(e))}const s=(e,t)=>Mo.forEach(e,((e,n)=>a(e,n,t)));if(Mo.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Mo.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&di[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Mo.isHeaders(e))for(const[t,r]of e.entries())a(r,t,n);else null!=e&&a(t,e,n);return this}get(e,t){if(e=ui(e)){const n=Mo.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Mo.isFunction(t))return t.call(this,e,n);if(Mo.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ui(e)){const n=Mo.findKey(this,e);return!(!n||void 0===this[n]||t&&!hi(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=ui(e)){const a=Mo.findKey(n,e);!a||t&&!hi(0,n[a],a,t)||(delete n[a],r=!0)}}return Mo.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!hi(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return Mo.forEach(this,((r,a)=>{const s=Mo.findKey(n,a);if(s)return t[s]=pi(r),void delete t[a];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();o!==a&&delete t[a],t[o]=pi(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Mo.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Mo.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[li]=this[li]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ui(e);t[r]||(function(e,t){const n=Mo.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})}))}(n,e),t[r]=!0)}return Mo.isArray(e)?e.forEach(r):r(e),this}}gi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Mo.reduceDescriptors(gi.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Mo.freezeMethods(gi);const fi=gi;function yi(e,t){const n=this||ci,r=t||n,a=fi.from(r.headers);let s=r.data;return Mo.forEach(e,(function(e){s=e.call(n,s,a.normalize(),t?t.status:void 0)})),a.normalize(),s}function mi(e){return!(!e||!e.__CANCEL__)}function Ii(e,t,n){Fo.call(this,null==e?"canceled":e,Fo.ERR_CANCELED,t,n),this.name="CanceledError"}Mo.inherits(Ii,Fo,{__CANCEL__:!0});const Ei=Ii;function Ai(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Fo("Request failed with status code "+n.status,[Fo.ERR_BAD_REQUEST,Fo.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const _i=(e,t,n=3)=>{let r=0;const a=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,s=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),d=r[o];a||(a=c),n[s]=i,r[s]=c;let l=o,u=0;for(;l!==s;)u+=n[l++],l%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-a<t)return;const p=d&&c-d;return p?Math.round(1e3*u/p):void 0}}(50,250);return function(e,t){let n,r,a=0,s=1e3/t;const o=(t,s=Date.now())=>{a=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=s?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),s-i)))},()=>n&&o(n)]}((n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,i=s-r,c=a(i);r=s,e({loaded:s,total:o,progress:o?s/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},Si=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ci=e=>(...t)=>Mo.asap((()=>e(...t))),$i=si.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Mo.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},bi=si.hasStandardBrowserEnv?{write(e,t,n,r,a,s){const o=[e+"="+encodeURIComponent(t)];Mo.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Mo.isString(r)&&o.push("path="+r),Mo.isString(a)&&o.push("domain="+a),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Pi(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Oi=e=>e instanceof fi?{...e}:e;function Ti(e,t){t=t||{};const n={};function r(e,t,n){return Mo.isPlainObject(e)&&Mo.isPlainObject(t)?Mo.merge.call({caseless:n},e,t):Mo.isPlainObject(t)?Mo.merge({},t):Mo.isArray(t)?t.slice():t}function a(e,t,n){return Mo.isUndefined(t)?Mo.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!Mo.isUndefined(t))return r(void 0,t)}function o(e,t){return Mo.isUndefined(t)?Mo.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,a,s){return s in t?r(n,a):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(e,t)=>a(Oi(e),Oi(t),!0)};return Mo.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||a,o=s(e[r],t[r],r);Mo.isUndefined(o)&&s!==i||(n[r]=o)})),n}const Ni=e=>{const t=Ti({},e);let n,{data:r,withXSRFToken:a,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=fi.from(i),t.url=Xo(Pi(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Mo.isFormData(r))if(si.hasStandardBrowserEnv||si.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(n=i.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(si.hasStandardBrowserEnv&&(a&&Mo.isFunction(a)&&(a=a(t)),a||!1!==a&&$i(t.url))){const e=s&&o&&bi.read(o);e&&i.set(s,e)}return t},vi="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ni(e);let a=r.data;const s=fi.from(r.headers).normalize();let o,i,c,d,l,{responseType:u,onUploadProgress:p,onDownloadProgress:h}=r;function g(){d&&d(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function y(){if(!f)return;const r=fi.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Ai((function(e){t(e),g()}),(function(e){n(e),g()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(n(new Fo("Request aborted",Fo.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new Fo("Network Error",Fo.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||Qo;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Fo(t,a.clarifyTimeoutError?Fo.ETIMEDOUT:Fo.ECONNABORTED,e,f)),f=null},void 0===a&&s.setContentType(null),"setRequestHeader"in f&&Mo.forEach(s.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),Mo.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),u&&"json"!==u&&(f.responseType=r.responseType),h&&([c,l]=_i(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,d]=_i(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Ei(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===si.protocols.indexOf(m)?n(new Fo("Unsupported protocol "+m+":",Fo.ERR_BAD_REQUEST,e)):f.send(a||null)}))},Ri=(e,t)=>{let n,r=new AbortController;const a=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Fo?t:new Ei(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{a(new Fo(`timeout ${t} of ms exceeded`,Fo.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",a):e.unsubscribe(a))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=o,[i,()=>{s&&clearTimeout(s),s=null}]},Di=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,a=0;for(;a<n;)r=a+t,yield e.slice(a,r),a=r},xi=(e,t,n,r,a)=>{const s=async function*(e,t,n){for await(const r of e)yield*Di(ArrayBuffer.isView(r)?r:await n(String(r)),t)}(e,t,a);let o,i=0,c=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return c(),void e.close();let a=r.byteLength;if(n){let e=i+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw c(e),e}},cancel:e=>(c(e),s.return())},{highWaterMark:2})},wi="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Mi=wi&&"function"==typeof ReadableStream,Li=wi&&("function"==typeof TextEncoder?(ji=new TextEncoder,e=>ji.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ji;const Ui=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Fi=Mi&&Ui((()=>{let e=!1;const t=new Request(si.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),ki=Mi&&Ui((()=>Mo.isReadableStream(new Response("").body))),Vi={stream:ki&&(e=>e.body)};var Gi;wi&&(Gi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Vi[e]&&(Vi[e]=Mo.isFunction(Gi[e])?t=>t[e]():(t,n)=>{throw new Fo(`Response type '${e}' is not supported`,Fo.ERR_NOT_SUPPORT,n)})})));const Bi=wi&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:s,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:d,headers:l,withCredentials:u="same-origin",fetchOptions:p}=Ni(e);d=d?(d+"").toLowerCase():"text";let h,g,[f,y]=a||s||o?Ri([a,s],o):[];const m=()=>{!h&&setTimeout((()=>{f&&f.unsubscribe()})),h=!0};let I;try{if(c&&Fi&&"get"!==n&&"head"!==n&&0!==(I=await(async(e,t)=>{const n=Mo.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:Mo.isBlob(e)?e.size:Mo.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Mo.isArrayBufferView(e)||Mo.isArrayBuffer(e)?e.byteLength:(Mo.isURLSearchParams(e)&&(e+=""),Mo.isString(e)?(await Li(e)).byteLength:void 0))(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Mo.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=Si(I,_i(Ci(c)));r=xi(n.body,65536,e,t,Li)}}Mo.isString(u)||(u=u?"include":"omit"),g=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:u});let a=await fetch(g);const s=ki&&("stream"===d||"response"===d);if(ki&&(i||s)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=a[t]}));const t=Mo.toFiniteNumber(a.headers.get("content-length")),[n,r]=i&&Si(t,_i(Ci(i),!0))||[];a=new Response(xi(a.body,65536,n,(()=>{r&&r(),s&&m()}),Li),e)}d=d||"text";let o=await Vi[Mo.findKey(Vi,d)||"text"](a,e);return!s&&m(),y&&y(),await new Promise(((t,n)=>{Ai(t,n,{data:o,headers:fi.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:g})}))}catch(t){if(m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Fo("Network Error",Fo.ERR_NETWORK,e,g),{cause:t.cause||t});throw Fo.from(t,t&&t.code,e,g)}}),Hi={http:null,xhr:vi,fetch:Bi};Mo.forEach(Hi,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Wi=e=>`- ${e}`,qi=e=>Mo.isFunction(e)||null===e||!1===e,zi=e=>{e=Mo.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!qi(n)&&(r=Hi[(t=String(n)).toLowerCase()],void 0===r))throw new Fo(`Unknown adapter '${t}'`);if(r)break;a[t||"#"+s]=r}if(!r){const e=Object.entries(a).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Wi).join("\n"):" "+Wi(e[0]):"as no adapter specified";throw new Fo("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Yi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ei(null,e)}function Ki(e){return Yi(e),e.headers=fi.from(e.headers),e.data=yi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zi(e.adapter||ci.adapter)(e).then((function(t){return Yi(e),t.data=yi.call(e,e.transformResponse,t),t.headers=fi.from(t.headers),t}),(function(t){return mi(t)||(Yi(e),t&&t.response&&(t.response.data=yi.call(e,e.transformResponse,t.response),t.response.headers=fi.from(t.response.headers))),Promise.reject(t)}))}const Xi={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Xi[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ji={};Xi.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.3] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,s)=>{if(!1===e)throw new Fo(r(a," has been removed"+(t?" in "+t:"")),Fo.ERR_DEPRECATED);return t&&!Ji[a]&&(Ji[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,s)}};const Qi={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Fo("options must be an object",Fo.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const s=r[a],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new Fo("option "+s+" must be "+n,Fo.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Fo("Unknown option "+s,Fo.ERR_BAD_OPTION)}},validators:Xi},Zi=Qi.validators;class ec{constructor(e){this.defaults=e,this.interceptors={request:new Jo,response:new Jo}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ti(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&Qi.assertOptions(n,{silentJSONParsing:Zi.transitional(Zi.boolean),forcedJSONParsing:Zi.transitional(Zi.boolean),clarifyTimeoutError:Zi.transitional(Zi.boolean)},!1),null!=r&&(Mo.isFunction(r)?t.paramsSerializer={serialize:r}:Qi.assertOptions(r,{encode:Zi.function,serialize:Zi.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&Mo.merge(a.common,a[t.method]);a&&Mo.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=fi.concat(s,a);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let d;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,u=0;if(!i){const e=[Ki.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),l=e.length,d=Promise.resolve(t);u<l;)d=d.then(e[u++],e[u++]);return d}l=o.length;let p=t;for(u=0;u<l;){const t=o[u++],n=o[u++];try{p=t(p)}catch(e){n.call(this,e);break}}try{d=Ki.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,l=c.length;u<l;)d=d.then(c[u++],c[u++]);return d}getUri(e){return Xo(Pi((e=Ti(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Mo.forEach(["delete","get","head","options"],(function(e){ec.prototype[e]=function(t,n){return this.request(Ti(n||{},{method:e,url:t,data:(n||{}).data}))}})),Mo.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(Ti(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ec.prototype[e]=t(),ec.prototype[e+"Form"]=t(!0)}));const tc=ec;class nc{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,a){n.reason||(n.reason=new Ei(e,r,a),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new nc((function(t){e=t})),cancel:e}}}const rc=nc,ac={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ac).forEach((([e,t])=>{ac[t]=e}));const sc=ac,oc=function e(t){const n=new tc(t),r=Hs(tc.prototype.request,n);return Mo.extend(r,tc.prototype,n,{allOwnKeys:!0}),Mo.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ti(t,n))},r}(ci);oc.Axios=tc,oc.CanceledError=Ei,oc.CancelToken=rc,oc.isCancel=mi,oc.VERSION="1.7.3",oc.toFormData=Ho,oc.AxiosError=Fo,oc.Cancel=oc.CanceledError,oc.all=function(e){return Promise.all(e)},oc.spread=function(e){return function(t){return e.apply(null,t)}},oc.isAxiosError=function(e){return Mo.isObject(e)&&!0===e.isAxiosError},oc.mergeConfig=Ti,oc.AxiosHeaders=fi,oc.formToJSON=e=>oi(Mo.isHTMLForm(e)?new FormData(e):e),oc.getAdapter=zi,oc.HttpStatusCode=sc,oc.default=oc;const ic=oc;var cc=function(e,t){return cc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},cc(e,t)};function dc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}cc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function lc(e,t){var n,r,a,s,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function uc(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function pc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return o}function hc(e,t,n){if(n||2===arguments.length)for(var r,a=0,s=t.length;a<s;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function gc(e){return this instanceof gc?(this.v=e,this):new gc(e)}function fc(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=a[e](t)).value instanceof gc?Promise.resolve(n.value.v).then(c,d):l(s[0][2],n)}catch(e){l(s[0][3],e)}var n}function c(e){i("next",e)}function d(e){i("throw",e)}function l(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var yc=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function mc(e){return"function"==typeof e}function Ic(e){return mc(null==e?void 0:e.then)}function Ec(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ac=Ec((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function _c(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Sc=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=uc(s),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else s.remove(this);var c=this.initialTeardown;if(mc(c))try{c()}catch(e){a=e instanceof Ac?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var l=uc(d),u=l.next();!u.done;u=l.next()){var p=u.value;try{bc(p)}catch(e){a=null!=a?a:[],e instanceof Ac?a=hc(hc([],pc(a)),pc(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(a)throw new Ac(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)bc(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&_c(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&_c(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Cc=Sc.EMPTY;function $c(e){return e instanceof Sc||e&&"closed"in e&&mc(e.remove)&&mc(e.add)&&mc(e.unsubscribe)}function bc(e){mc(e)?e():e.unsubscribe()}var Pc={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=Pc.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,hc([e,t],pc(n))):setTimeout.apply(void 0,hc([e,t],pc(n)))},clearTimeout:function(e){var t=Pc.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Oc(e){Pc.setTimeout((function(){throw e}))}function Tc(){}var Nc=vc("C",void 0,void 0);function vc(e,t,n){return{kind:e,value:t,error:n}}function Rc(e){e()}var Dc=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,$c(t)&&t.add(n)):n.destination=jc,n}return dc(t,e),t.create=function(e,t,n){return new wc(e,t,n)},t.prototype.next=function(e){this.isStopped?Lc(function(e){return vc("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Lc(vc("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Lc(Nc,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Sc);Function.prototype.bind;var xc=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Mc(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Mc(e)}else Mc(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Mc(e)}},e}(),wc=function(e){function t(t,n,r){var a,s=e.call(this)||this;return a=mc(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,s.destination=new xc(a),s}return dc(t,e),t}(Dc);function Mc(e){Oc(e)}function Lc(e,t){var n=null;n&&Pc.setTimeout((function(){return n(e,t)}))}var jc={closed:!0,next:Tc,error:function(e){throw e},complete:Tc},Uc="function"==typeof Symbol&&Symbol.observable||"@@observable";function Fc(e){return e}function kc(e){return 0===e.length?Fc:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Vc=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,a=this,s=(r=e)&&r instanceof Dc||function(e){return e&&mc(e.next)&&mc(e.error)&&mc(e.complete)}(r)&&$c(r)?e:new wc(e,t,n);return Rc((function(){var e=a,t=e.operator,n=e.source;s.add(t?t.call(s,n):n?a._subscribe(s):a._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Gc(t))((function(t,r){var a=new wc({next:function(t){try{e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Uc]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return kc(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Gc(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Gc(e){var t;return null!==(t=null!=e?e:undefined)&&void 0!==t?t:Promise}function Bc(e){return mc(e[Uc])}function Hc(e){return Symbol.asyncIterator&&mc(null==e?void 0:e[Symbol.asyncIterator])}function Wc(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var qc="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function zc(e){return mc(null==e?void 0:e[qc])}function Yc(e){return fc(this,arguments,(function(){var t,n,r;return lc(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,gc(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,gc(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,gc(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Kc(e){return mc(null==e?void 0:e.getReader)}function Xc(e){if(e instanceof Vc)return e;if(null!=e){if(Bc(e))return a=e,new Vc((function(e){var t=a[Uc]();if(mc(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(yc(e))return r=e,new Vc((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(Ic(e))return n=e,new Vc((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,Oc)}));if(Hc(e))return Jc(e);if(zc(e))return t=e,new Vc((function(e){var n,r;try{for(var a=uc(t),s=a.next();!s.done;s=a.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}e.complete()}));if(Kc(e))return Jc(Yc(e))}var t,n,r,a;throw Wc(e)}function Jc(e){return new Vc((function(t){(function(e,t){var n,r,a,s;return function(e,t,n,r){return new(n||(n=Promise))((function(t,a){function s(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,o)}i((r=r.apply(e,[])).next())}))}(this,0,void 0,(function(){var o,i;return lc(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=uc(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,a){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,a,(t=e[n](t)).done,t.value)}))}}}(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),a={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Qc(e,t,n,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var s=t.schedule((function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(s),!a)return s}function Zc(e){return function(t){if(function(e){return mc(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function ed(e,t,n,r,a){return new td(e,t,n,r,a)}var td=function(e){function t(t,n,r,a,s,o){var i=e.call(this,t)||this;return i.onFinalize=s,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=a?function(e){try{a(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return dc(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(Dc);function nd(e,t){return void 0===t&&(t=0),Zc((function(n,r){n.subscribe(ed(r,(function(n){return Qc(r,e,(function(){return r.next(n)}),t)}),(function(){return Qc(r,e,(function(){return r.complete()}),t)}),(function(n){return Qc(r,e,(function(){return r.error(n)}),t)})))}))}function rd(e,t){return void 0===t&&(t=0),Zc((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function ad(e,t){if(!e)throw new Error("Iterable cannot be null");return new Vc((function(n){Qc(n,t,(function(){var r=e[Symbol.asyncIterator]();Qc(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function sd(e,t){return t?function(e,t){if(null!=e){if(Bc(e))return function(e,t){return Xc(e).pipe(rd(t),nd(t))}(e,t);if(yc(e))return function(e,t){return new Vc((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(Ic(e))return function(e,t){return Xc(e).pipe(rd(t),nd(t))}(e,t);if(Hc(e))return ad(e,t);if(zc(e))return function(e,t){return new Vc((function(n){var r;return Qc(n,t,(function(){r=e[qc](),Qc(n,t,(function(){var e,t,a;try{t=(e=r.next()).value,a=e.done}catch(e){return void n.error(e)}a?n.complete():n.next(t)}),0,!0)})),function(){return mc(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Kc(e))return function(e,t){return ad(Yc(e),t)}(e,t)}throw Wc(e)}(e,t):Xc(e)}function od(e,t,n){var r=mc(e)||t||n?{next:e,error:t,complete:n}:e;return r?Zc((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe(ed(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;a=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;a=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;a&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):Fc}class id{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new id(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Td(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Nd()}async buildAuthorizeUrl(e){e=e||window.btoa(location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:Q.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const d=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",l=new Uint8Array(64);window.crypto?.getRandomValues(l),this.config.codeVerifier=this.base64UrlSafeEncode(l),this.updateConfig(this.config,!1);const u=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${s}?client_id=${r}&response_type=code&redirect_uri=${a}&scope=openid${u}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${d}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri;const t=e.indexOf("//"),n=-1!==t?e.indexOf("/",t+2):-1;return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t);const n=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=this.config.tokenUri?this.config.tokenUri:this.config.endPoints.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),d=e||c.get("code"),l=new URLSearchParams;return l.append("client_id",n),r&&l.append("client_secret",r),l.append("grant_type","authorization_code"),l.append("code",d),l.append("redirect_uri",a),l.append("code_verifier",o),_d(s,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:l.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),Od({tokenInfo:e}),Pd({Authorization:`${e?.token_type} ${e?.access_token}`});const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const cd=id,dd=(e,t)=>{(async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new cd(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=A()+(E()?`${E()}`:"/?reAuth=true");return t})(t).then((t=>{const n={openReauthMessageModal:!0,reAutheticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};ea.publish(V.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},ld=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),ud=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},pd=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[G.COREHEADER_APP_DEBUG_ID]:e.debugId,[G.COREHEADER_APP_DEBUG_LEVELS]:Z.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=_u.getProperty(G.COREHEADERS,"",e);return t?{...t,debugInfo:Z.getPreviewMode()&&{...t.debugInfo,[G.COREHEADER_APP_DEBUG_LEVELS]:Z.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(G.SKIPCOREHEADERS))return void delete e[G.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&B.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},hd=pd,gd="updateSession",fd={},yd=new class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};let md={},Id={},Ed={},Ad="";const _d=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:s=n,includeRemoteSystemIdIfPresent:o=!0}=r;Ad=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,withoutDefaultHeaders:d=!1,...l}=t,{Authorization:u,...p}=t.headers||{};d||hd.injectCoreAdditionalHeaders(p,t.body,n,{includeRemoteSystemIdIfPresent:o}),s&&fd[s]>=0?fd[s]+=fd[s]:s&&void 0===fd[s]&&(fd[s]=1);let h=d?{...p}:{...hd.getDefaultHeaders(),...hd.getRegisteredHeaders(),...p,context:n};return e&&ld(e,Id)&&yd.getUpdateSessionStatus()||!yd.getUpdateSessionStatus()?(ld(e,Id)&&"OAuth2.0"===Id?.authType&&(h={...p}),sd(ic({context:n,...l,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},headers:h})).pipe(od((()=>{const e=hd.getCoreHeadersFromContext(h.context);e&&(e=>{ea.publish(G.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})}))).toPromise()):Sd(e,t,n,yd)},Sd=(e,t,n,r)=>new Promise(((a,s)=>{ea.subscribe(gd,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?_d(e,t,n).then((e=>a(e))).catch((e=>s(e))):s(o.updateStatus.error)}),gd)})),Cd=e=>{fd[e]>0&&(fd[e]-=fd[e],0===fd[e]&&delete fd[e])};ic.interceptors.request.use((e=>(md.request&&(e=md.request(e)),e)),(e=>Promise.reject(e))),ic.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Fn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(jn({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&Un({type:"error",category:"HTTP",context:e.config.headers.context}),jn({type:"error",category:e.config.headers.context===G.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&Un({type:"error",category:"PAGE",context:e.config.headers.context})),Cd(e.config.headers.context)),md.response&&(e=md.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&Cd(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config&&ld(e.config.url,Id)||ea.subscribe(gd,(e=>{yd.setUpdateSessionStatus(!e.updateStatus)}),gd),((e,t,n,r)=>{if(e.config&&ld(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(ea.unsubscribeAllWithEventType(gd),t.setUpdateSessionStatus(!0),"custom"===n?.authType){ea.publish(V.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=ud(e);return Sd(n,r,a,t)}return((e,t,n)=>{const{config:r}=e,{url:a,config:s,callback:o,isRefreshTokenPresent:i}=(e=>{let t="",n={},r={},a=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const s=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(a=!1),s.append("client_id",e.client_id),s.append("grant_type","refresh_token"),s.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:s.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:(t,n)=>{const{data:r}=t,a={access_token:r?.access_token,refresh_token:r?.refresh_token};Od({tokenInfo:{...e.tokenInfo,...a}}),Pd({Authorization:`${r?.token_type} ${r?.access_token}`}),n.headers={...n.headers,Authorization:`${r?.token_type} ${r?.access_token}`};const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(r)},failure:t=>{if(e.popupReauth)return dd(t,e);ea.publish(V.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${A()}/updateSession`,n={method:"GET",headers:{}},r={failure:dd};return{url:t,config:n,callback:r,isRefreshTokenPresent:a}})(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const d=Sd(r.url,r,c,t);return i?_d(a,s).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),ea.publish("updateSession",{updateStatus:"success"}),d.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&ld(e.config.url,n)?(o?.failure?.(r.url,n),d):Promise.reject(e))):(o?.failure?.(r.url,n),d)})(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=ud(e);return _d(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[V.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[V.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&!n.includes("/modal")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Fn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)})(e,yd,Id,e.response&&e.response.status&&e.response.status===Number(Ad)?Ad:null))));const $d=()=>ic.CancelToken.source(),bd=e=>ic.isCancel(e),Pd=e=>{hd.setDefaultHeaders(e)},Od=e=>{Id={...Id,...e}},Td=e=>{Ed={...Ed,...e}},Nd=()=>({...Ed}),vd="OPEN_PROCESS_ACTION",Rd="OPEN_ASSIGNMENT",Dd="DELETE_CASE_IN_CREATE_STAGE",xd="SAVE_AND_CLOSE",wd=e=>({type:xd,payload:e}),Md=class{static getSavableDataPage(e){return Hl(e)}static getLookUpDataPage(e){return ql(e)}static getLookUpDataPageInfo(e){return zl(e)}static getDataPageKeys(e){return Wl(e)}},Ld=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=In.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));return In.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=this.c11nEnv,n={context:t.getContextName(),name:t.getContainerName(),type:G.CONTAINER_TYPE.SINGLE},{actionMgrID:r,promise:a}=this.containerManagerPromise("INIT_CONTAINERS"),s={...n,...e,actionMgrID:r};return ru(xu(s)),a}addContainerItem(e){const t=qe,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r;let s;a&&([s]=a);const o=n.getContextName(),i=n.getContainerName(),c=fe(i,o,e?.containerType===G.CONTAINER_TYPE.SINGLE),d=Rt(i,o),l={root:{...s,config:{...s?.config,context:s?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:d,containerName:i};e=JSON.parse(JSON.stringify(e)),[G.WORKAREA].includes(i)&&delete e.data.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...l,...e,actionMgrID:u};return ru(Mu(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=tt,n={context:ds(e.containerItemID),target:$s(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return ru(ku(s)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t={target:$s(e.containerItemID)},{actionMgrID:n,promise:r}=this.containerManagerPromise("ACTIVATE_CONTAINER_ITEM"),a={...t,...e,actionMgrID:n};return ru(Gu(a)),r}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=ze,n={context:ds(e.containerItemID),target:$s(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return ru(Hu(s)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=_s(e),{actionMgrID:n,promise:r}=this.containerManagerPromise("RESET_CONTAINERS"),a={...t,...e,actionMgrID:n};return ru(wu(a)),r}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=me(t,r),s=Ns(r);return a&&s.includes(a)||ru(Lu({transientItemID:a,contextName:r,target:$s(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!Ns(r).includes(t))return;ru(ju({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:a}=e;if(a&&r){if(!Ns(t).includes(a))return;ru(qu({target:n,containerItemID:r,transientItemID:a}))}}createContainerPConnect(e,t,n,r=!1){qa.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return ms(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return as(e,t)}};var jd=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Ud(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,a=e.length;return n=1===a?function(t){return jd(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(jd(t.type,e[n]))return!0;return!1},Zc((function(e,t){var a=0;e.subscribe(ed(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function Fd(e,t){return Zc((function(n,r){var a=null,s=0,o=!1,i=function(){return o&&!a&&r.complete()};n.subscribe(ed(r,(function(n){null==a||a.unsubscribe();var o=0,c=s++;Xc(e(n,c)).subscribe(a=ed(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){a=null,i()})))}),(function(){o=!0,i()})))}))}function kd(e,t){return Zc((function(n,r){var a=0;n.subscribe(ed(r,(function(n){r.next(e.call(t,n,a++))})))}))}function Vd(e,t,n){return void 0===n&&(n=1/0),mc(t)?Vd((function(n,r){return kd((function(e,a){return t(n,e,r,a)}))(Xc(e(n,r)))}),n):("number"==typeof t&&(n=t),Zc((function(t,r){return function(e,t,n,r,a,s,o,i){var c=[],d=0,l=0,u=!1,p=function(){!u||c.length||d||t.complete()},h=function(e){d++;var a=!1;Xc(n(e,l++)).subscribe(ed(t,(function(e){t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{d--;for(var e=function(){var e=c.shift();h(e)};c.length&&d<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(ed(t,(function(e){return d<r?h(e):c.push(e)}),(function(){u=!0,p()}))),function(){}}(t,r,e,n)})))}function Gd(e){return e&&mc(e.schedule)}function Bd(e){return e[e.length-1]}function Hd(e){return Gd(Bd(e))?e.pop():void 0}function Wd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return sd(e,Hd(e))}function qd(e){return Zc((function(t,n){var r,a=null,s=!1;a=t.subscribe(ed(n,void 0,void 0,(function(o){r=Xc(e(o,qd(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):s=!0}))),s&&(a.unsubscribe(),a=null,r.subscribe(n))}))}var zd=new Vc((function(e){return e.complete()}));function Yd(e){return e?function(e){return new Vc((function(t){return e.schedule((function(){return t.complete()}))}))}(e):zd}var Kd=n(303),Xd=n.n(Kd);const Jd=(e,t,n)=>qd((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),Wd(Qu(e,r,t,null,n))))),Qd=(e,t)=>n=>new Vc((r=>{let a={},s=0;return n.pipe(Vd((n=>{const r=Date.now();let o;return o=t||Xd(),o&&o(n,a)&&r-s<e?Yd():(a=n,s=r,Wd(n))}))).subscribe(r)})),Zd=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=Ja(t);if(n){const r=os(t),{items:a={}}=n;return a[r]&&a[r].key===e}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=fp("loadView",n);return _d(r,{method:a},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=fp(mt,n);return _d(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:s}=fp(mt,a),o=t[e];return _d(`${s}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>au(e)?.caseMessages;static getCaseViewMode=e=>nu().getState()?.data[e]?.context_data?.caseViewMode},el=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let s=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(s)n.push({type:Fe,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();s=!s,n.push(t),n.push({type:Fe,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}})}}ru(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=au(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let s=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!s&&(r<=0?(n.push(e),s=!s):a.push(e),n.unshift({type:Fe,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),ru(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=au(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(ru({type:Fe,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?au(e)?(ru({type:Ot,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS)):Promise.reject(new Error(this.MISSING_CONTEXT_PARAM))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...au(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(ru({type:Ot,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=au(e);if(t){const n={...t};n.context_data?.deferred_action_queue&&delete n.context_data.deferred_action_queue,n.context_data?.blocking_action_counter&&delete n.context_data.blocking_action_counter,n.context_data?.is_deferred_action_in_progress&&delete n.context_data.is_deferred_action_in_progress,ru({type:Fe,payload:{context:e,data:{...n}}}),mn.disableLoadingIndicator({context:e})}}},{RESOURCE_TYPES:tl}=V,nl=class{static openCase(e,t,n,r={}){const a={insKey:e,acTargetName:n,actionMgrID:In.getNextActionMgrId(),context:t,...r},s=we;r&&r.channelName&&(a.headers={},a.headers[G.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=In.actionManagerPromise(s,a.actionMgrID);return ru({type:s,payload:a}),o}static openAssignment(e,t,n,r={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:In.getNextActionMgrId(),context:t,...r},s=Ue;r&&r.channelName&&(a.headers={},a.headers[G.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=In.actionManagerPromise(s,a.actionMgrID);return ru({type:s,payload:{...a}}),o}static createCase(e,t,n,r={}){const a=xe,s={class:e,acTargetName:n,actionMgrID:In.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(s.headers={},s.headers[G.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=In.actionManagerPromise(a,s.actionMgrID);return ru({type:a,payload:{...s}}),o}static getNextWork(e,t,n={}){const r=Ue,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:In.getNextActionMgrId(),context:e,...n},{promise:s}=In.actionManagerPromise(r,a.actionMgrID);return ru({type:r,payload:{...a}}),s}static getOpenedCaseItems(e){const t=[],n=Ja(e);if(n){const{items:r={}}=n,a=Object.keys(r),s=os(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===tl.CASE||r[n].resourceType===tl.ASSIGNMENT)){const{key:a="",context:o}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),d=iu(".caseTypeID","caseInfo",o),l=s===n;t.push({...i,key:a,workID:a,caseID:c,className:d,context:o,containerItemID:n,target:e,active:l})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:n,reqType:r}=fp(ut,t);return _d(n,{method:r})};static getCaseBulkActions=e=>{const{restApi:t,reqType:n}=fp("getBulkActions"),r=e.map((e=>({ID:e}))),a=r.length,s=a/5,o={},i=[];for(let e=0;e<a;e+=s)o.cases=r.slice(e,e+s),o.cases.length&&i.push(_d(t,{method:n,body:o}));return Promise.all(i).then((e=>{let t=[];for(let n=0;n<e.length;n+=1)0!==n?t.length&&(t=t.filter((t=>e[n].data.availableActions.some((e=>t.ID===e.ID))))):t=e[n].data.availableActions;return t}))}};class rl{constructor(e){rl._instance=this,this.context=`${e}/${G.SUGGESTION}`,nu().getState().data?.[this.context]||ru({type:ot,payload:{context:this.context,data:{}}})}getField(e){return iu(e,"",this.context)}setField(e,t){ru({type:Se,payload:{reference:e,value:t,context:this.context}})}removeField(e){ru({type:ke,payload:{reference:e,context:this.context}})}setState(e){ru(Ou({context:this.context,data:e,isArrayDeepMerge:!0}))}}const al=rl,sl=class{static getSharedState(e){const t=0===e.indexOf(".")?e.substring(1):e,n=su();return n?Iu.getIn(n,t):null}static setSharedState(e,t){e&&ru(rp({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:s}=r;e&&t&&ru(ap({context:e,reference:s?`${s}.${t}`:t,value:n,isArrayDeepMerge:a}))}static getSuggestionsContext(e){return new al(e)}},ol=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=_u.getProperyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=_u.getContextPath(this.datasource,this.index);return this.index+=1,gl({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class il{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,gl({meta:e,options:this.options})}resetIndex(){this.index=0}}class cl{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>Dr.isProperty(e))).map((e=>Dr.getPropertyName(e)))}}const dl=new cl;let ll;Object.freeze(dl);const ul=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],s=ue.trimAnnotation(a);if("string"!=typeof s&&"string"!=typeof a||!(Iu.isPropertyRef(s)||a.startsWith("@W ")||a.startsWith("@E ")||a.startsWith("@ATTACHMENT "))){if(Array.isArray(s))s.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),ul(e,t[r][n],a)}));else if(s&&"object"==typeof s&&"exp"!==s.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},ul(s,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=s}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},pl=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...Iu.deepClone(t.inheritedProps)]};class hl{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:a}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=a,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this.xrayInfo={},this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,r.inheritedConfig&&(this._inheritedConfig=Iu.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&pl(this._inheritedConfig,t?.config),ul(this._rawConfig,this._stateProps),this._isState=!Iu.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=Iu.isExpressionExist(this._rawConfig.config),this._isWhenExist=Iu.isWhenExist(this._rawConfig.config),this._isValidatorExist=pr.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=V.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let s=this.options.pageReference;if(s&&(s=ue.handleAnnotation(this.options.pageReference,this)),this._pageReference=_u.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&Iu.isWhenExist({visibility:this.meta?.config.visibility})&&Cn(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=_u.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=ue.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=Iu.isExpressionExist(e),this._isWhenExist=Iu.isWhenExist(e),this._isValidatorExist=pr.isValidatorExist(e)),this._children=this._rawConfig.children,this.options.hasForm&&this._rawConfig.config&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&(!this._rawConfig.config.readOnly||"true"!==this._rawConfig.config.readOnly)&&Cr(this._contextName,this.getFullReference(),this),this._rawConfig?.type?.toLowerCase()===G.VIEW&&this._rawConfig.name&&(this.viewName=ue.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&(e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata().config?.value;if(n){const r=Rl(ue.getLeafPropertyName(n),_u.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(t&&Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=$n(e,r)),n};t.some(r)}else if(t&&"object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=$n(e,t[r]),n))break;return n})(e,r?.datasource?.parameters))}}t&&Cn(e.getCurrentView(),e.getContextName(),e.getPageReference())})(this)}this.updateContextTree()}updateContextTree(){if(this._rawConfig&&this._rawConfig.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.isEditable()&&!this.isReadOnly()&&this.isVisible()&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode){const e=ue.trimAnnotation(this._rawConfig.config.value);Dn.addFieldNode(this._contextName,this._pageReference,this.viewName??"",e,this.getValue(e))}this._rawConfig?.type?.toLowerCase()===G.VIEW&&this._rawConfig.name&&this.viewName&&Dn.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&Dn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.viewName??""),this._rawConfig?.config?.referenceList&&Dn.addPageListNode(this._contextName,this._pageReference,this.viewName??"",ue.trimAnnotation(this._rawConfig.config.referenceList))}setXRayInfo(e){Iu.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){Iu.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new class{constructor(e){this.c11nEnv=e}getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=fp("getCaseStages",n);return _d(r,{method:a},t).then((e=>e.data.stages))}getCaseTypeName(){return this.c11nEnv.getValue(G.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(G.CASE_INFO.CASE_TYPE_ID)}getAvailableProcesses(){return this.c11nEnv.getValue(G.CASE_INFO.AVAILABLEPROCESSES)}getKey(){return this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(G.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(G.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(G.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(G.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(G.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${G.CONTEXT_DATA}${G.CASE_VIEW_MODE_PROP}`)===G.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${G.CONTEXT_DATA}${G.CASE_VIEW_MODE_PROP}`)===G.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO);return ln(e)}isLocalAction(){const e=this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO);return pn(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===G.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=Qa(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===G.VIEW?a?.name:null}(e&&e.startsWith(G.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(G.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(G.CASE_INFO.ACTIVE_ACTION_ID),t=ge(this.c11nEnv.getContextName());let n;t&&(n=au(t));const r=n?.caseInfo?.availableActions,a=au(this.c11nEnv.getContextName())?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(G.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(G.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(G.CASE_INFO.ACTIVE_ACTION_ID),t=this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO_ACTIONS);return!(!t||!e)&&"Case"===t.find((t=>t.ID===e))?.type};getAllAssignments(){const e=this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(G.CASE_INFO.ASSIGNMENT_LABEL),n=this.c11nEnv.getValue(G.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],r=this.getChildAssignments()||[];let a=JSON.parse(JSON.stringify(r));a=a.map((e=>(e.isChild=!0,e)));const s=[...n,...a];let o=JSON.parse(JSON.stringify(s));return e&&!this.isPerform()&&(o=o.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),o}getActiveCaseActionName(){const e=this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(G.CASE_INFO.ACTIVE_ACTION_ID);return e.find((e=>e.ID===t))?.name||""}getFirstCaseActionName(){return this.c11nEnv.getValue(G.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(G.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(G.CASE_INFO.GETNEXTWORK)}}(this)),this._caseInfo}getListActions(){return(e=>({insert:(t,n,r,a={})=>ar(t,n,e,r,a),update:(t,n,r)=>((e,t,n=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:s}=r,o=t.getContextName();let i=t.getReferenceList();const c=s||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(V.CONTENT)+V.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const d=Jn(i);Xn(t,d,c),Qn(o,`${i}[${n}]`),rr(i,c,e,n),fr.getStateMachine(o,c,d).update(e,n+1,a,r)})(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r)=>{const a=n.getPageReference(),{stateMachineTarget:s}=fr.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),!0);if(!s){let e=a.substring(0,a.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&Xn(n,t,e)}fr.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n)=>((e,t,n)=>{const r=t.getContextName(),a=t.getReferenceList(),s=n||t.getPageReference(),o=`${s+a}[${e}]`,i=Jn(a);Un({type:V.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:o,context:r,isListEntry:!0,deletingIndex:e}),Xn(t,i,s),Qn(r,`${a}[${e}]`),fr.getStateMachine(r,s,i).delete(e+1);const c=fr.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((t=>{t.includes(`${s}${i}[${e}]`)&&(c[t]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),s=n.getPageReference(),o=Jn(a);Xn(n,o,s),Qn(r,`${a}[${t}]`),fr.getStateMachine(r,s,o).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={})=>((e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:s,selectionList:o,required:i}=t.getConfigProps(),c=s===G.LIST_SELECTION_MODE.MULTI,d=t.getContextName();let l=t.getPageReference(),u=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,l,o);const p=t.getRawMetadata();let h=null;const g=(e=>e.config.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);g&&(u=p.config.dataRelationshipContext,h=l.concat(".").concat(u),l=h);const f=((e,t,n)=>e?`${t}${n}`:t)(c,l,o),y=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,u,h),{datasource:{parameters:m={}}}=y,I={...m};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{let n=Iu.getPropertyName(t);n=n.substr(n.indexOf(".")+1).split("."),e[n.join(".")]=t}))})(I,y,c),c){let n=o;n=Jn(n);const r=t.getValue(f)||[];Xn(t,n,l);const s=[];let i=r.length;e.forEach((e=>{const t=or(m,e,u),o={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!a){const r=fr.getStateMachine(d,l,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}s.push({instruction:e.$selected?G.LIST_ACTIONS.SELECT:G.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),ru(tp({instruction:G.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:d,referenceList:`${l}.${u}`,actions:s}))}else{const n=or(I,e[0],u),r=(e=>e.length>1?e.pop():"")(l.split(/\[\d+\]/gm));t.getActionsApi().updateFieldValue(r,n,g?{contextPageReference:l}:{}),t.getActionsApi().triggerFieldChange(r,n)}ir(t,f,i,c,u),r()})))(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let s=t.getPageReference();const o=n===G.LIST_SELECTION_MODE.MULTI;let i=o?r.substring(1):s.substring(s.lastIndexOf(".")+1);const c=t.getRawMetadata();let d=null;c.config.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,d=s.concat(".").concat(i),s=d);const l=o?`${s}${r}`:s;let u=t.getValue(l)||[];if(Array.isArray(u)||(u=[u]),e)return Promise.resolve(u);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(d);return u.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return sr(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&a.push(t.trim())})),Promise.resolve(a)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),a=e.getPageReference(),s=t,o=`${a}${t}`;return new Promise((t=>{let i=s;i=Jn(i),Xn(e,i,a),fr.getStateMachine(r,a,i).deleteAll(),ir(e,o,n,!0,s),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:s,referenceList:o}=e.getComponentConfig();let i;if(r===G.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===s&&o&&(i=e.getStateProps().referenceList),i){i=Jn(i);const r=fr.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const a=e.getContextName(),s=e.getPageReference(),o=Jn(t);Xn(e,o,s),fr.getStateMachine(a,s,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n={})=>dr(e,t,n),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),a=e.getContextName();Xn(e,t,r),Qn(a,Iu.buildInstructionPageReference(r,t)),fr.getStateMachine(a,r,t).replacePage(n)})(e,t,n),deletePage:t=>((e,t)=>{const n=e.getPageReference(),r=e.getContextName();Xn(e,t,n),Qn(r,Iu.buildInstructionPageReference(n,t)),fr.getStateMachine(r,n,t).deletePage()})(e,t)}))(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t="value";return"multi"===e.selectionMode?t="selectionList":"Editable"===e.renderMode&&(t="referenceList"),this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return _u.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{acTargetName:e="primary",type:t,name:n}=this.getComponentConfig();return"view"!==t?.toLowerCase()&&n?n:this.options.containerName||e}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e={}){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=d?.getStore()?.getState()?.data[`${this.getContextName()}/${G.SUGGESTION}`],n=this.getStateProps()?.value,r=_u.getContextPath(this.getPageReference(),n),a=t?sl.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...lr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),Iu.resolveStringBooleans(e)}getRawConfigProps(){const e={...lr.getDefaultsforType(this._type),...this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(_u.resolveProps(e,t,this),ue.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),ul(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),n=this.getComponentConfig(),r=t===G.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===G.MODAL_VIEW_CONTAINER||t===G.CASE_CREATE_STAGE){const t=os(`${G.APP.APP}/${this.getContainerName()}`),n=jn({context:t,category:V.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}const a=this._rawConfig?.config;if(this.options.hasForm&&a&&(Object.hasOwn(a,"value")||a.selectionList||"Editable"===a.renderMode&&a.referenceList)&&(!a.readOnly||"true"!==a.readOnly)&&Cr(this._contextName,this.getFullReference(),this),this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList:!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=jn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:V.MESSAGES.MESSAGES_TYPE_ERROR}),r=jn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:V.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){const t=n.map((e=>se.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=G.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=G.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===G.ROOT_CONTAINER){const t=Vn(r,os(`${G.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages}if(t===G.ROOT_CONTAINER){const t=jn({context:G.APP.ROOT,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(t===G.HYBRID_VIEW_CONTAINER){const t=jn({context:G.APP.APP,category:G.HTTP});e.httpMessages=t,this._stateProps.httpMessages=t}if(t===G.APP_SHELL&&e.portalDocMode===G.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=nl.getOpenedCaseItems(`${V.APP.APP}/${G.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===G.APP_SHELL){const t=jn({context:G.APP.APP,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===G.SCALARLIST&&(this._stateProps.value=e.value),t===G.APP_SHELL||t===G.MODAL_VIEW_CONTAINER||t===G.CASE_CREATE_STAGE||n.template===G.CASE_PREVIEW){let t=jn({context:G.APP.APP,category:"HTTP"});const n=jn({context:os(`${G.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(jn({context:os(`${G.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=jn({context:os(`${G.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>e.message)):t,this._stateProps.httpMessages=e.httpMessages,t?.map((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(t===G.VIEW_CONTAINER||t===G.FLOW_CONTAINER||t===G.MODAL_VIEW_CONTAINER||t===G.PREVIEW_VIEW_CONTAINER||t===G.ROOT_CONTAINER){if(e.routingInfo=Dt(this.getContainerName(),this._contextName),t===G.ROOT_CONTAINER&&(e.rootConfig=cl.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===G.FLOW_CONTAINER){const t=jn({context:this.getContextName(),category:G.CASEMESSAGES}),n=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=ps(n)[0];if(r){const t=os(r);e.lastUpdateTime=d?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=d?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime;const n=jn({context:t,category:V.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),t===G.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else n.template===G.CASE_VIEW||n.template===G.CASE_PREVIEW||n.template===G.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===G.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e)}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig();let a="",s="";if(r===G.ASSOCIATED?(a=n,s=G.ASSOCIATED_PROPERTY_ANNOTATION):(a=t,s=G.PROPERTY_ANNOTATION),a&&"string"==typeof a&&a.includes(s)){const t=ue.getPropertyName(a),n=this.getFieldMetadata(t);n&&(e.fieldMetadata=n,(e.fieldMetadata.isDeclarativeTarget||Dr.isPropertyInternal(t)||!e.datasource&&(e.fieldMetadata.isClassKey||e.fieldMetadata.isSpecial)&&e.listType!==G.ASSOCIATED)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})))}}resolvePropertyMetadata(e,t){if(!e)return e;const n=Yl(`${this._pageReference}.${t}`,this._contextName);return(n||null===n)&&(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(G.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(Rl(e,t),e)}return this.resolvePropertyMetadata(Rl(t.pop(),this.getValue(`.${t.join(".")}${G.CLASS_ID}`)),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(Rl(n,this.getValue(`${t.join(".")}${G.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(G.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[V.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(V.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>hn(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[V.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[V.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new class{constructor(e){this.c11nEnv=e}validate(e,t){if(!t&&!(t=this.c11nEnv.getStateProps().value)){const e=this.c11nEnv.getComponentConfig();"multi"===e.selectionMode?t=this.c11nEnv.getStateProps().selectionList:"Editable"===e.renderMode&&(t=this.c11nEnv.getStateProps().referenceList)}const n=pr.validate(this.c11nEnv.getComponentName().toLowerCase(),t,e,this.c11nEnv);return n?.message?{status:!1,message:n?.message}:{status:!0}}}(this)}isEditable(){return this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&!("string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly))&&!(Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return!Object.hasOwn(this._rawConfig?.config,"visibility")||"string"!=typeof this._rawConfig?.config?.visibility||ue.handleAnnotation(this._rawConfig?.config?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||ue.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;const t=e.getConfigProps(),n={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=n.includeTypes.includes(e._type)&&!n.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const a=e.getChildren();return!!a&&a.some((e=>e.getPConnect().getComputedVisibility()))}getChildrenIterato(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return this._rawConfig&&this._rawConfig.isRefreshable}getDataObject(e){return au(e||this.getContextName())}getImagePath(e){return`${ne.getConstellationServiceUrl()}/v860/${ne.getAppAlias()}/image/${e}?org=${Q.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=((e,t)=>{const n=!!e.repeat;if(e["repeat-self"])return new ol(e,e.context||"",t);if(n){const n=du(`${t.context}.${G.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new ol(e.children[0],n||e.context,t)}return e.children?new il(e.children,t):void 0})(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly}),t=[];for(;e?.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!0!==cl.allowedComponetsForBulkProcessing[e]&&!0!==cl.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e?.resetIndex(),t}return null}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName();return se.getLocaleValue(e,t,r)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),G.PARAGRAPH,e);return se.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e).split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext):this._hasSuggestions&&this.getStateProps()?.value===e?_u.getProperyValue(e,this.getPageReference(),`${this._contextName}/${G.SUGGESTION}`):_u.getProperyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:a}=e;a&&(this._inheritedConfig.hideLabel=a),r&&(this._inheritedConfig.referenceType=r),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),pl(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),_u.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,a={}){let s,o;const{isArrayDeepMerge:i}=a;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(s=!0,t||(o=!0)),ru({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...s&&{isStrictTracking:s},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(xr.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;jr[t]=jr[t]||{},jr[t][r]||(jr[t][r]={initialValue:iu(r,null,t)}),jr[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return cu(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(G.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=G.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),ru(Ou({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;ru({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){ru(Qu(e,t||{},n))}getComponent(){return ll({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=du(`${this.getPageReference()}.${G.SUMMARY_OF_LISTS}`,t,this._contextName);a=_u.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=ue.handleAnnotation(e,this),a=_u.getContextPath(this._pageReference,e)||""}return ll(gl({meta:e,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:a,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}}),r)}getReferencedView(){if(this.meta)return _u.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,gl({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new Ld(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new class{constructor(e){this.c11nEnv=e}MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(G.MODAL),a=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(V.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(V.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(V.CASE_INFO.CASE_TYPE_ID),d=t?void 0:vr(this.c11nEnv.getContextName()),l=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Cu.buildActionObject({context:n,containerItemID:e,assignmentID:s,actionID:o,caseID:a,containerName:i,caseType:c,isModalAction:r,isFormValid:d,isProcessAction:l,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,a,s=null;s=t&&null!==t.actionMgrID?t.actionMgrID:In.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,a=t}));return In.register(s,o,r,a,e,t,n),{actionMgrID:s,promise:o}};showDataObjectCreateView(e,t=V.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Cu.buildActionObject({viewName:t,className:e},this.c11nEnv),r=Pe,{promise:a}=this.actionsApiPromise(r,n);return ru({type:r,payload:{...n,containerName:V.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!Br(t))return new Ld(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});const n=gt,r=Cu.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&t.includes(G.MODAL);ru({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:s}=this.actionsApiPromise(n,r);return s}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=nu().getState(),n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error("Data object class not found"));const r=Md.getSavableDataPage(n),a=e&&e.includes(G.MODAL),s=Cu.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:o}=this.actionsApiPromise("CREATE_DATA_OBJECT",s);return ru({type:"CREATE_DATA_OBJECT",payload:{...s,isModalAction:a,isFormValid:vr(e)}}),o}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=Md.getSavableDataPage(e),r=Md.getDataPageKeys(n),a={};for(const e of r)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const s=Cu.buildActionObject({dataViewName:n,dataViewParameters:a},this.c11nEnv),{promise:o}=this.actionsApiPromise("DELETE_DATA_OBJECT",s);return ru({type:"DELETE_DATA_OBJECT",payload:{...s}}),o}getDataObjectView(e,t,n={viewName:""}){const r={};if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError("keyProperties is required parameter"));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const a=Md.getLookUpDataPage(e),s=Md.getDataPageKeys(a);for(const e of s)r[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Cu.buildActionObject({dataLookUp:a,requestPayload:r,viewName:n.viewName||V.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:G.MODAL,keyProperties:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("VIEW_DATA_OBJECT",o);return ru({type:"VIEW_DATA_OBJECT",payload:{...o}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=nu().getState(),r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error("Data object class not found"));const a=Md.getSavableDataPage(r);Md.getDataPageKeys(a).forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]}));const s=e&&e.includes(G.MODAL),o=Cu.buildActionObject({containerItemID:e,dataPageID:a,key:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("UPDATE_DATA_OBJECT",o);return ru({type:"UPDATE_DATA_OBJECT",payload:{...o,isModalAction:s,isFormValid:vr(e)}}),i}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{},r=xe,a=Cu.buildActionObject({class:e,flowType:"pyStartCase",containerName:G.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,a);if(t.channelName&&(a.headers=a.headers||{},a.headers[G.X_ORIGIN_CHANNEL]=t.channelName),B.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n}=B.getRemoteCase(e);a.class=t,a.headers=a.headers||{},a.headers.RemoteSystemID=n}return Z.getPreviewMode()&&(a.debugInfo={debugId:Iu.generateUniqueID()}),ru({type:r,payload:{...a}}),s}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const n=Ve,r=Cu.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,r);return ru({type:n,payload:{...r}}),a}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||G.PRIMARY,containerName:n.targetContainer||G.PRIMARY},a=we,s=Cu.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[G.X_ORIGIN_CHANNEL]=n.channelName),s.className=t,B.isRemoteCase(t)){const{RemoteSystemID:e}=B.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e,s.isRemoteCase=!0,s.remoteCaseClass=t}return Z.getPreviewMode()&&![G.WORKAREA].includes(n.targetContainer)&&(s.debugInfo={debugId:Iu.generateUniqueID()}),ru({type:a,payload:{...n,...s}}),o}openAssignment(e,t,n={containerName:"",channelName:"",isActionFromToDoList:void 0,isChild:void 0,context:void 0,viewType:void 0,skipBrowserSemanticUrlUpdate:void 0}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=G.PRIMARY,r.isChild=n.isChild);const a=Rd,s=Cu.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[G.X_ORIGIN_CHANNEL]=n.channelName),B.isRemoteCase(t)){const{RemoteSystemID:e}=B.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e}s.className=t,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Z.getPreviewMode()&&![G.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:Iu.generateUniqueID()});const i={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return ru({type:a,payload:{...s,...i}}),o}finishAssignment(e,t={outcomeID:""}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=ds(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r.lastIndexOf("/workarea"))),(e=>{const t=br();if(t[e])for(const n in t[e].fieldOrder)if(Object.hasOwn(t[e].fieldOrder,n)&&t[e].fieldOrder[n].getConfigProps().hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:se.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return Fn({messages:e,context:r,category:V.PAGE}),Promise.reject({type:V.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=Le,s=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:i,localActionID:c,caseActions:d,caseInfo:l,businessID:u}=yn(e,this.c11nEnv,{isTriggeredFromDifferentContext:s}),p=ln(l);let h,g=!1;d?g="Case"===d.find((e=>e.ID===c))?.type:h=au(n);let{assignmentID:f}=yn(e,this.c11nEnv,{isTriggeredFromDifferentContext:s});h?.context_data?.actionType&&(g=h.context_data.actionType===G.CASE,f=f||h.context_data.assignmentID);const y=((e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,s=a?.filter((e=>e.ID===G.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&s?.length>0?s[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),r})(i,f,c),[m,I]=o.split(" "),E={class:m,actionID:y,assignmentID:f,caseID:o,workID:I,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:g,doDeleteCaseSummary:!0,isInCreateStage:p,businessID:u};e?.includes(G.MODAL)&&(E.containerName=G.MODAL,E.isModalAction=!0),E.outcome=t.outcomeID,l?.isLocalAction&&(E.viewType=Ca.FORM);const A=Cu.buildActionObject(E,this.c11nEnv),{promise:_}=this.actionsApiPromise(a,A),S=this.c11nEnv.getValue("isProcessAction","isProcessAction");return A.isProcessAction=S,el.executeOrQueueDeferredAction({type:a,payload:{...A,context:n}}),_}getNextWork(){const e=Rd,t=Cu.buildActionObject({containerName:G.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return ru({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Rd,n=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Cu.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(t,a),o={type:t,payload:{...a,caseID:n,headers:r}};return ru(o),s}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue(V.CASE_INFO.CASES),r=this.c11nEnv.getValue(V.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(G.MODAL)&&(a.containerName=G.MODAL,a.isModalAction=!0);const s=Cu.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s),i=ds(e);return ru({type:t,payload:{...s,context:i,cases:n,actionID:r,isFormValid:vr(i),classID:this.c11nEnv.getCurrentClassID()}}),o}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));const{selectedList:n}=t,r=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},s="OPEN_BULK_ACTION",o=Cu.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return ru({type:s,payload:{...o}}),i}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ze,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${G.APP.APP}/${G.MODAL}`,caseViewMode:G.PERFORM_MODE,deleteContext:!0};ru({type:t,payload:n});const{promise:r}=this.actionsApiPromise(t,n);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(ru({type:Se,payload:{reference:V.CASE_INFO.APPROVALFLAG,value:G.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(ru({type:Se,payload:{reference:V.CASE_INFO.APPROVALFLAG,value:G.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(V.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Se,payload:{reference:V.CASE_INFO.DUPLICATECASEFLAG,value:G.DUPLICATE,context:e}},r={type:Se,payload:{reference:V.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return ru([n,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:Se,payload:{reference:V.CASE_INFO.DUPLICATECASEFLAG,value:G.IGNORE,context:e}},n={type:Se,payload:{reference:V.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Se,payload:{reference:V.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return ru([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=t.assignKey||this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENT_ID),r=t.caseID||this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ID),a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},o="OPEN_LOCAL_ACTION",i=Cu.buildActionObject(s,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:d}=this.actionsApiPromise(o,i),l=ps(c)[0];let u,p=!1;if(!l)return u=c,ru({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;u=os(l);const h=Ja(l);if(h?.accessedOrder.forEach((e=>{r===h.items[e].key&&(p=!0,u=h.items[e].context)})),!p||"review"===Zd.getCaseViewMode(u))return ru({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;const g=u,f=g&&-1!==g.indexOf(G.MODAL),y=t.assignKey||this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENT_ID),m=au(u),I=m?.caseInfo?.assignments?m.caseInfo.assignments[0]?.actions[0]?.ID:void 0,E=this.c11nEnv.getContainerName(),A=this.c11nEnv.getValue(V.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=Cu.buildActionObject({context:g,containerItemID:u,assignmentID:y,actionID:I,caseID:r,containerName:E,caseType:A,isModalAction:f,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=u;const C=ds(u),$=this.c11nEnv.getCaseSummary(),b=ln($),P=Cu.buildActionObject({caseID:r,containerItemID:u,cancelContext:C},this.c11nEnv);let O={};return f?(P.acTargetName=G.MODAL,P.isInCreateStage=b,P.isModalAction=f,O={...P}):O={...P,acName:Rt(this.c11nEnv.getContainerName(),P.context)},ru({type:o,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:O,continueExecution:p}}),d}openProcessAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,r=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ID)||t.caseID,a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},o=vd,i=Cu.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return ru({type:o,payload:{...i}}),c}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(V.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(V.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(V.CASE_INFO.ASSIGNMENT_ID),a=ln(this.c11nEnv.getCaseSummary()),s={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a};t&&t.includes(G.MODAL)&&(s.acTargetName=G.MODAL);const o=Cu.buildActionObject(s,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o),c=ds(t);return ru({type:n,payload:{...o,containerItemID:t,context:c}}),i}cancelAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=V,n=je,r=ds(e),a=e&&e.includes(G.MODAL),s=this.c11nEnv.getCaseSummary(),o=ln(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Cu.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv);let d={};a?(c.acTargetName=G.MODAL,c.isInCreateStage=o,c.isModalAction=a,d={...c}):d={...c,acName:Rt(this.c11nEnv.getContainerName(),c.context)};const{promise:l}=this.actionsApiPromise(n,c);return ru({type:n,payload:d}),l}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=V,n=e,r=gt,a=e&&e.includes(G.MODAL),s=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Cu.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!Br(n))return new Ld(this.c11nEnv).removeContainerItem({containerItemID:e});ru({type:r,payload:{...o,isModalAction:a}});const{promise:i}=this.actionsApiPromise(r,o);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=V,n=gt,r=e,a=r&&r.includes(G.MODAL),s=this.c11nEnv.getCaseSummary(),o=ln(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Cu.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),d=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=ee.isCoexistenceAppOfType(G.APP_TYPE.UIKIT);if(c.isProcessAction=d,o&&(a||l)&&!pn(s)){const t=this.c11nEnv.getValue("caseInfo.isFirstAssignment"),o=Br(r);if(this.shouldDeleteCaseInCreateStage(o,t,l))return this.deleteCaseInCreateStage(e);ru({type:n,payload:{...c,isModalAction:a,isChildCase:fn(s)}})}const{promise:u}=this.actionsApiPromise(n,c);return u}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=this.getSaveActionPayload(e,!0),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return ru(wd(t)),n}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=this.getSaveActionPayload(e),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return ru(wd(t)),n}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=e,r=n&&n.includes(G.MODAL),a=this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(V.CASE_INFO.CASE_TYPE_ID),o=Cu.buildActionObject({caseID:a,caseType:s,containerItemID:e,context:n,ignoreCaseDeletion:t},this.c11nEnv),i=this.c11nEnv.getValue("isProcessAction","isProcessAction"),c=this.c11nEnv.getValue(V.CASE_INFO.PARENTCASEINFO);o.isProcessAction=i,o.parentCaseInfo=c;const d=`${G.APP.APP}/${Ka.PRIMARY}`,l=xa(d,Ka.PRIMARY);o.parentContext=l,r&&(o.targetName=G.MODAL,o.containerName=Ka.MODAL,o.isModalAction=r),ru((e=>({type:Dd,payload:e}))(o));const{promise:u}=this.actionsApiPromise("DELETE_CASE_IN_CREATE_STAGE",o);return u}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=Q.getRestEndPoint("getRecents");t=`${t}?maxResultsToFetch=${e}`;const n=A()+t;return _d(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:a}=Q.getRestEndPoint("updateRecents"),s=A()+a;return _d(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=Q.getRestEndPoint("Logout"),t=A()+e;return _d(t,{method:"GET",headers:{}})}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return _d(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:Ka.PREVIEW,containerName:Ka.PREVIEW,context:V.APP.APP,...t})}showDataPreview(e,t,n={}){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:Ka.PREVIEW,containerName:Ka.PREVIEW,context:V.APP.APP,...n,skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let r=Cu.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(V.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:B.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n&&(r={...r,...n});const a=be,{promise:s}=this.actionsApiPromise(a,r,!1);return ru({type:a,payload:{...r}}),s}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));const r=Cu.buildActionObject({viewName:e,className:t},this.c11nEnv),a=Pe,{promise:s}=this.actionsApiPromise(a,r);return Z.getPreviewMode()&&(r.debugInfo={debugId:Iu.generateUniqueID()}),ru({type:a,payload:{...r,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Cu.buildActionObject({},this.c11nEnv),r=Te,{promise:a}=this.actionsApiPromise(r,n);return ru({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),a}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Cu.buildActionObject({},this.c11nEnv),r=Ne,{promise:a}=this.actionsApiPromise(r,n);return ru({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),a}showData(e,t,n,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const a=Cu.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n},this.c11nEnv),s=Oe,{promise:o}=this.actionsApiPromise(s,a);return ru({type:s,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Cu.changeHandler(e,t)}eventHandler(e,t){Cu.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),s=_u.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let o=this.c11nEnv.getValue(G.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),o=iu(`.${i.join(".")}.classID`,a,r)),ru({type:$e,payload:{reference:s,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:this.c11nEnv.getComponentConfig().value,classID:o}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:s=null,isListEntry:o=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName(),d=null===s?this.c11nEnv.getPageReference():s,l=_u.getContextPath(d,e);let u=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,{isArrayDeepMerge:a}),this.c11nEnv.isBulkAction()&&(u=!0),e||(e=this.c11nEnv.getStateProps().value),Un({type:V.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:c,isListEntry:o}),ru({type:Se,payload:{reference:l,value:t,context:c,isArrayDeepMerge:a,skipDirtyValidation:i,...u&&{isStrictTracking:u},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=at,{context:n}=e,r=n&&n.includes(G.MODAL),a=Cu.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=G.MODAL,a.isModalAction=r),ru({type:t,payload:a});const{promise:s}=this.actionsApiPromise(t,a);return s}refreshCaseView(e,t,n,r={}){const{promise:a,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:d}=r,l={actionMgrID:s,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:d};r.refreshFor&&(l.refreshFor=r?.refreshFor);const u=this.c11nEnv.getContextName(),p=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(G.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>gn(e)&&!hn(e,t))(u,p)||hn(u,p))?bn(u,n,l):Sn(e,t,u,n,l),a}openEmbeddedDataModal(e,t,n,r,a){const s=Tt,o=t.getCaseInfo().getKey(),i=`${t.getPageReference().replace(V.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,c={targetProperty:n,index:r,viewID:e,ID:o,actionType:a,interestPage:Iu.convertPageRefToClipboardPageNotation(i)},d=Cu.buildActionObject(c,this.c11nEnv),{promise:l}=this.actionsApiPromise(s,d);return ru({type:s,payload:{...d,containerName:V.MODAL,skipSemanticUrl:!0}}),l}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Nt,n=this.c11nEnv.getPageReference().replace(V.CASE_INFO.CASE_INFO_CONTENT,""),r=ds(e),a={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(V.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(G.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:vr(r),interestPage:Iu.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(G.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isModalAction:!1,target:this.c11nEnv.getTarget()};e&&e.includes(G.MODAL)&&(a.containerName=G.MODAL,a.isModalAction=!0);const s=Cu.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s);if(Br(r)){const[e,t,n]=Rn(this.c11nEnv.getPageReference());Dn.mutatePageList(this.c11nEnv.getValue(G.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),e,t,{type:At,rowIndex:n}),ru({type:At,payload:{pageReference:this.c11nEnv.getPageReference(),context:this.c11nEnv.getValue(G.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isListEntry:!0}})}return ru({type:t,payload:{...s,context:r}}),o}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ds(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(vt);return bn(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}}(this)),this._actionsApi}getActionManager(){return In}getGoogleMapsAPIKey(){return y}getServerURL(){return A()}getLoadingStatus(e){let t=null;return e?(t=au(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&!!t.isLoading&&t.isLoading}clearErrorMessages(e){e?.property?Un({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?Un({type:"error",...e}):(Un({type:"error",...e,context:G.APP.APP}),Un({type:"error",...e,context:os(`${G.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return du(`${this.getPageReference()}.${G.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&(Object.hasOwn(this._rawConfig.config,"value")||Object.hasOwn(this._rawConfig.config,"readonlyContextList")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&((e,t,n)=>{if(yr[e]){const r=Ar(t,n);yr[e].fieldOrder[r]&&(yr[e].fieldOrder[r].isMounted=!1)}})(this.getContextName(),ue.trimAnnotation(this.getPropertyName()),this.getPageReference())}addFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&this._type!==G.SCALARLIST&&((e,t,n)=>{if(yr[e]){const r=Ar(t,n);yr[e].fieldOrder[r]&&(yr[e].fieldOrder[r].isMounted=!0)}})(this.getContextName(),ue.trimAnnotation(this.getPropertyName()),this.getPageReference())}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Er(t);mr[e]?mr[e].fieldOrder[r]=n:mr[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this),n&&((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,a])=>{if(Array.isArray(a)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();dr(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e++)ar(a[e],e,r,void 0,{})}else"object"==typeof a&&r(a,`${t}.${e}`)}))};r(e,t)})(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=sl.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=_u.getContextPath(this.getPageReference(),n),a=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(r)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=_u.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,sl.getSuggestionsContext(this.getContextName()).removeField(n)}}}function gl(e){const t=new hl(e);return{getPConnect:()=>t}}le.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),le.registerHandler("@P",((e,t)=>t.getValue(e))),le.registerHandler("@E",((e,t)=>{try{const n=Zt(e),r=en(n);return tn(r,t)}catch(e){}return!0})),le.registerHandler("@W",((e,t)=>{const n=t.getContextDataValue(`.${G.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);return!0===n||"true"===n})),le.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let a="",s="";const o=t.getPageReference();if(e.startsWith(".")){a=`${o}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),s=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===G.READONLY,d=n?.datasource?.name||"",l=t.getComponentConfig();if(l&&l.deferDatasource)return l.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:l.datasourceMetadata}),i!==G.DATA_PAGE?n?.datasource?.records:null;if(i!==G.DATA_PAGE)return n?.datasource?.records;const u=ue.getPropertyName(n?.datasource?.propertyForDisplayText),p=ue.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(ue.isProperty(e?.value)){let t=iu(`.${Iu.getFullPropertyReference([s,ue.getPropertyName(e.value)])}`,o,g);f.push(Iu.getFullPropertyReference([o,s,ue.getPropertyName(e?.value)])),null!=t&&""!==t||(t=G.NULL_STRING),r.push(t)}else r.push(e?.value||G.NULL_STRING)})),g){const e=dn.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),dn.addContextName(g,e)}const y=function(e,t,n,r){let a="",s=n;if(t.join(G.HASH_DELIMITER)&&(a=Iu.getHashedString(t.join(G.HASH_DELIMITER)),s=n+G.UNDERSCORE_STRING+a),r){const e=su(),t=e?e[n]?.[s]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=(e.getDataObject()[n]||{})[s]||{};return Array.isArray(o?.pxResults)?o.pxResults:[]}(t,r,d,c);return y.map((e=>({key:e[p]||e[`.${p}`],value:e[u]||e[`.${u}`]})))})),le.registerHandler("@ROUTING_INFO",((e,t)=>Dt(t.getContainerName(),t.getContextName()))),le.registerHandler("@ENV",((e,t)=>{switch(e){case G.ENV_INFO_KEYS.APPLICATION_NAME:return ee.getApplicationName();case G.ENV_INFO_KEYS.ACCESS_GROUP:return ee.getAccessGroup();case G.ENV_INFO_KEYS.USER_NAME:return ee.getOperatorName();case G.ENV_INFO_KEYS.USER_ID:return ee.getOperatorIdentifier();case G.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(ee.getApplicationLabel()||"");case G.ENV_INFO_KEYS.USER_IMAGE:return ee.getOperatorImageInsKey();case G.ENV_INFO_KEYS.LOCALE:return ee.getUseLocale();case G.ENV_INFO_KEYS.TIMEZONE:return ee.getTimeZone();case G.ENV_INFO_KEYS.WORK_GROUP:return ee.getOperatorWorkGroup();default:return e}})),le.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getValue(e)||[],r=t.getComponentConfig(),a=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t}=r[a],s=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=ue.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=ue.getPropertyName(e[t]);r[t]=n[a]})),s.push(r)})),s}return[]})),le.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let a="";const s=e.split(".").filter((e=>!!e));if(s.length>1&&(s.pop(),a=`.${s.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:s,value:o}=n;r.name=s,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${a}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),le.registerHandler("@USER",((e,t)=>{const n=t.getValue(e),r=t.getReferencedUser(n);return{userId:n,userName:r?r.UserName:null}})),le.registerHandler("@ACTIVE_CASES",((e,t)=>nl.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),le.registerHandler("@LR",(e=>e)),le.registerHandler("@CASE",((e,t)=>e===G.ID?t.getCaseInfo().getKey():e)),le.registerHandler("@SHARED",(e=>sl.getSharedState(e))),le.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?ce.getParagraphStream(n,t):null})),le.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),a=e.substring(e.indexOf("[")+1,e.indexOf("]")),{useCustomContext:s}=t;let o;return Iu.isEmpty(s)?o=t.getValue(`.${n}`):(o=s,o=Iu.getIn(o,n)),o&&r.length>0?(a&&(o=o.filter((e=>nn(a,e)))),o.map((e=>Iu.getIn(e,r)))):null})),le.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),le.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const fl="downloadAttachment",yl={},ml=e=>{const t=$d();return yl[e]=t,t},Il=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},El=e=>{let t,n;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:Il(e.pyMimeFileExtension||e.MimeType)},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:e.pyFileName?e.pyFileName:e.FileName?.split(".")[0],category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:e.pyAttachName?e.pyAttachName?.split(".").pop():e.FileExtension,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreatedDateTime?e.pxCreatedDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null)}}},Al={uploadAttachment:(e,t,n,r)=>{const a=new FormData;a.append("appendUniqueIdToFileName",!0),a.append("file",e);const{restApi:s,reqType:o}=fp("uploadAttachment",{});return _d(s,{method:o,headers:{"Content-Type":"multipart/form-data"},body:a,onUploadProgress:t,signal:ml(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID}))).catch(n?n(bd,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete yl[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,a.signal=ml(n).token}const{restApi:s,reqType:o}=fp("linkCaseAttachment",{caseID:e});return _d(s,{...a,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=fp("getCaseAttachments",{caseID:e,includeThumbnail:n});return _d(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=fp("getAttachmentCategories",{caseID:e,type:t});return _d(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=fp(fl,{attachmentID:e});return _d(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=fp("editAttachment",{attachmentID:e});return _d(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=fp("deleteAttachment",{attachmentID:e});return _d(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=fp("downloadDocument",{documentID:e});return _d(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=fp("deleteDocument",{caseID:e,documentID:t});return _d(r,{method:a},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error ocurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{yl[e]&&(yl[e].cancel(),delete yl[e])},buildFilePropsFromResponse:El,getAttachmentURL:e=>{const{restApi:t}=fp(fl,{attachmentID:e});return t},prepareAttachmentData:e=>{let t=[];if(e&&Object.hasOwn(e,"pyCount")&&e.pyCount>0)t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>El(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>!!e.ID)).map((e=>El(e)))}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||"",attachments:t}}};le.registerHandler("@ATTACHMENT",((e,t)=>{const n=t.getValue(e);return Al.prepareAttachmentData(n)}));const _l={},Sl={},Cl={},$l={},bl={},Pl={},Ol={},Tl={},Nl={},vl=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],a=t[n];if(a){const e=Array.isArray(a)?a:[a];(Array.isArray(r)?r:[r]).forEach((t=>{const n=e.findIndex((e=>e.classID===t.classID));if(-1===n)e.push(t);else{const r={isDeclarativeTarget:!1},a={...e[n],...r,...t};e[n]=a}})),t[n]=1===e.length?e[0]:e}else t[n]=r})):Iu.copy(e,t)},Rl=(e,t="")=>{if(!e)return null;const n=$l[e];if(!n)return null;if(!t)return Array.isArray(n)?[...n]:n;let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase())):n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass.toLowerCase()===t.toLowerCase()?n:null,r},Dl=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const s=Rl(e,t);return r.length&&(a=r.join(".")),{...s,embeddedType:n,category:a}}const[a,...s]=e.split("."),o=Rl(a,t);return o&&r.push(o.label),Dl(s.join("."),o?.pageClass,o?.type,r)},xl=e=>{vl(e,Sl)},wl=e=>{vl(e,Cl)},Ml=e=>{if(e.views&&vl(e.views,Sl),e.navigations&&vl(e.navigations,Cl),e.personalizations&&vl(e.personalizations,Pl),e.insights&&vl(e.insights,Ol),e.paragraphs&&vl(e.paragraphs,_l),e.dataTypes&&vl(e.dataTypes,Tl),e.datapages&&vl(e.datapages,Nl),e.fields){Object.keys(e.fields).forEach((t=>{const n=e.fields[t];if(Array.isArray(n)){if(e.datapages&&n.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===n.length){const[r]=n;e.fields[t]=r}}else e.datapages&&n.datasource&&"DataPage"===n.datasource.tableType&&(n.datasource.mode=e.datapages[n.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{bl[e]=t[e]}))}vl(e.fields,$l)},Ll=e=>Sl[e],jl=e=>Cl[e],Ul=e=>e in bl?bl[e]:null,Fl=e=>e in Pl?Pl[e]:null,kl=e=>e in Ol?Ol[e]:null,Vl=e=>{const t={};return Object.keys($l).forEach((n=>{const r=$l[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=Iu.deepClone(a))})),t},Gl=(e,t)=>{const n=Rl(e,t)?.datasource?.parameters;return n?Iu.deepClone(n):null},Bl=(e,t)=>{let n=null;const r=_l[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Iu.deepClone(n).content:null},Hl=e=>{if(e in Tl){const{savableDataPage:t}=Tl[e];return t}return null},Wl=e=>{const t=[];let n=[];if(e in Nl){const r=Nl[e].classID,{isAlternateKeyStorage:a}=Nl[e];return a?Nl[e].parameters.forEach((e=>t.push({keyName:e.name,isAlternateKeyStorage:a,linkedField:e.linkedField}))):(n=Tl[r].classKeys,n.forEach((e=>t.push({keyName:e,isAlternateKeyStorage:a})))),t}return null},ql=e=>{if(e in Tl){const{lookupDataPage:t}=Tl[e];return t}return null},zl=e=>{if(Object.prototype.hasOwnProperty.call(Tl,e)){const{lookupDataPageInfo:t}=Tl[e];return t}return null},Yl=(e,t)=>{const n=e.split("."),r=n.pop(),a=new hl({options:{pageReference:`${n.join(".")}`,context:t}}),s=Rl(r,a.getCurrentClassID())?.additionalInformation;if(!s?.includes("@PARAGRAPH"))return s;const o=ue.trimAnnotation(s),i=a.getCurrentClassID(),c=a.getLocaleRuleNameFromKeys(i,G.PARAGRAPH,o),d=se.getParagraphLocaleValue(c,i,o);return d?ce.getParagraphStream(d,a):null},Kl=(e,t)=>{const n=e.split("."),r=n.pop(),a=new hl({options:{pageReference:`${n.join(".")}`,context:t}}),s=Rl(r,a.getCurrentClassID()),o={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(s,o),o},Xl=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,a){const s={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=s}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:r,pageReference:a}=n;Sn(e,r,t,a,{})}}};class Jl{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,s="singleRecord"){if(!e||!n||!r?.length>0)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,a);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=Iu.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:s})}else i[t]=[{propertyName:o,mode:s}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,a){if(!e||!n||!r?.length>0)return;const s=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=Iu.getFullPropertyReference([i,t]),t in o){const e=o[t];Iu.removeExistingDependentProperty(e,s)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n=[],r,a){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const s=this.cascadeSubscribers[e][`${t}${n}`];if(!s[a]){s[a]=r;const o=iu(n,t,e);s.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,a){const s=Jl._getFieldsForList(e,t,n);s.length>0&&(this.registerFields(e,t,s,r,a),Xl.enableCascade(e))}unRegisterListField(e,t,n,r){const a=Jl._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=Rl(n,iu("classID",t,e));return a&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(ue.isProperty(e)){const t=ue.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n=[],r){this.cascadeSubscribers[e]&&n.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const a=this.cascadeSubscribers[e][`${t}${n}`];a[r]&&delete a[r]}))}triggerCascade(e,t,n,r){let a=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((s=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==s&&o.previousValue!==n&&(a=!0,r?r.add(o[s]):o[s](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t,n=G.CASE_INFO.CASE_INFO_CONTENT){if(!e||!t)return;const r=new Set,a=Iu.getIn(e,n);a&&0!==Object.keys(a).length&&(this._handleCascadeObject(a,t,n,r),r.forEach((e=>{e()})))}_handleCascadeObject(e,t,n,r){if("object"!=typeof e)return this.triggerCascade(t,n,e,r),void this._triggerListChanges(t,n,e);const a=Object.keys(e);for(let s=0,o=a.length;s<o;s++){const o=a[s],i=`${n}.${o}`;this._handleCascadeObject(e[o],t,i,r)}}_handlePageReference(e,t,n){let r=e;return"Page"===n&&t.startsWith(".")&&t.match(/[.]/g).length>1&&(r=`${e}${t.substring(0,t.lastIndexOf("."))}`),r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}_triggerListChanges(e,t,n){if(0===this.listChangeSubscribers.length||!/[a-zA-Z]+\.(\d+)\./g.test(t))return;t=t.replace(/\.(\d+)/g,"[$1]");const r=Dn.getFieldReferencePreviousValue(e,t);void 0!==r&&r!==n&&this.listChangeSubscribers.forEach((r=>{r(e,t,n)}))}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Ql=new Jl;let Zl=null;const eu=e=>e.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),tu=e=>{Zl=e},nu=()=>Zl,ru=e=>{e&&(nu()?.dispatch(e),"MERGE_DATA"===e.type&&Ql.handleServerChanges(e.payload.data,e.payload.context,e.payload.rootPageReference))},au=e=>nu().getState().data?.[e],su=()=>nu().getState().data[G.SHARED],ou=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const a=e.startsWith(".")?t+e:e,s=eu(a);return Iu.getIn(n,s)},iu=(e,t,n)=>ou(e,t,au(n)),cu=(e,t,n)=>ou(t,e?`${G.CONTEXT_DATA}.${e}`:`${G.CONTEXT_DATA}`,au(n)),du=(e,t,n)=>((e,t,n)=>{const r=eu(`${t}.${n}`);return Iu.getIn(e,r)})(au(n),`${G.CONTEXT_DATA}.${e}`,t),lu=e=>{const{context:t}=e;if(nu().getState().data[t])return Me;const{action:n}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(n)?qe:Me},uu=(e,t)=>{const n=eu(t);return Iu.deleteIn(e,n)},pu=e=>!Array.isArray(e)&&"object"==typeof e,hu=(e,t,n={})=>{const{isArrayDeepMerge:r}=n;Array.isArray(e)&&!t&&(t=[]);const a=(e,t)=>{if(pu(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return D()(e,t,a);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return D()(e,t,a);{const n=t.length;if(void 0===r&&n===e.length)return D()(e,t,a)}}return""===t&&e&&"object"==typeof e?e:t};return a(e,t)},gu=(e,t,n,r={})=>{const{isArrayDeepMerge:a=!0}=r,s=eu(t);if("object"==typeof n){const t=hu(Iu.getIn(e,s),n,{isArrayDeepMerge:a});return Iu.setIn(e,s,t)}return Iu.setIn(e,s,n)},fu=(e,t,n)=>{const r=eu(t);return Iu.setIn(e,r,n)},yu=()=>{const e=_t,{promise:t,actionMgrID:n}=In.actionManagerPromise(e);return ru({type:e,payload:{actionMgrID:n}}),t};class mu{static mergeDeep(e,t){return D()(t,e)}static hasIn(e,t){return P()(e,t)}static getIn(e,t,n){return T()(e,t,n)}static setIn(e,t,n){return v()(e,t,n)}static deleteIn(e,t){return $()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return w()(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||-1===e.indexOf("."))return!1;let t=0;const n=e.length;for(;t<n;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@W ")&&(n=!0);return n}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;return t.indexOf(".")>0?t.split(".").forEach((e=>{if(-1!==e.indexOf("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]})):(n[t]={},n=n[t]),Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let a=0;for(;a<r.length-1;a+=1){const e=r[a];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[a]]||(t[r[a]]=Array.isArray(n)?[]:{}),hu(t[r[a]],n,{isArrayDeepMerge:!0})):t[r[a]]=n};static getHashedString(e){return(0,S.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return g()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(e[n[r]]&&mu.isEqual(e[n[r]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):null}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([a,s])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(s)?s.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof s?n(s,r):t(r.slice(),s),r.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return k()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let a;r.reduce(((e,t,s)=>(a=e[t]?e[t]:Number.isNaN(Number(r[s+1]))?r.length-1===s?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t="",n){Array.isArray(e)?e.forEach(((e,r)=>{mu.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;mu.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(G.CASE_INFO.CASE_INFO_CONTENT,"").replace(G.DATA_INFO.DATA_INFO_CONTENT,"");return Tn.formatPageReference(n)}static buildAttachmentsFormData(e=[]){return e.map((e=>{if(e.delete){let t="";return t=e.responseProps.ID?e.responseProps.ID:e.responseProps.pzInsKey,{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:t}}return{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}}))}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>parseInt(e,10)+1)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>parseInt(e,10)-1)).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}}const Iu=mu,Eu=G.SUMMARY_OF_LISTS,Au=G.SUMMARY_OF_WHEN_CONDITIONS,_u=class{static updateData(e){Object.keys(e).forEach((t=>{ru(Ou({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{ru(Ou({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Au}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return jl([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=Ll([this.resolveName(e,t)]);let a=[];return Array.isArray(r)&&r.length>0?(t&&(n||(n=t.getValue(G.CLASS_ID)),a=r.filter((e=>e[G.CLASSID]===n))),0===a.length?r[0]:a[0]):r}static resolveName(e,t){return e?.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e?.startsWith("@")&&(e=ue.handleAnnotation(e,t)),e)}static getContextPath(e,t){return"number"!=typeof t&&!t||"number"!=typeof(t=ue.trimAnnotation(t))&&"string"!=typeof t?e:"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:t.startsWith(".")?e+t:t}static getRuleClass(e,t,n){let r;return t?r=t.startsWith(G.CLASS_ANNOTATION)?t.split(G.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName()):n.authorContext&&(r=n.ruleClass),r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,a=n.type,{ref:s,name:o,context:i}=n,c=this.getRuleClass(t,i,n);return"navigation"===a?r=this.resolveNavigation(s||o,t):"view"===a?r=this.resolveView(s||o,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return iu(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=du(`${t}.${Eu}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getProperyValue(e,t,n){return e=ue.trimAnnotation(e),this.getProperty(e,t,n)}static _handlePropString(e,t,n,r){n.startsWith("@")?e[t]=ue.handleAnnotation(n,r):e[t]=n}static _resolveProps(e,t){e&&Object.keys(e).forEach((n=>{const r=e[n];"string"==typeof r?this._handlePropString(e,n,r,t):Array.isArray(r)?r.forEach((n=>{this._resolveProps("object"==typeof n?n:e[n],t)})):"object"==typeof r&&this._resolveProps(e[n],t)}))}static resolveProps(e,t,n){return e&&t?(Iu.mergeDeep(e,t),this._resolveProps(t,n),t):t}static resolveClassID(e,t,n){const r=ue.trimAnnotation(e);let a;for(a=r.startsWith(".")?`${t}${r}`:`${r}`;a;){const e=iu(G.CLASS_ID,a,n);if(e)return e;a=a.substring(0,a.lastIndexOf("."))}return null}},Su=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}},Cu=class{static#e=[];static#t=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=Su.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#n=(e,t,n)=>{for(let r=0;r<e.length;r++){const a=e[r],s={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#e.push(s)}};static buildActionObject=(e,t)=>{const n={...e};return n.context=t.getContextName(),n.pageReference=t.getPageReference(),n.actionMgrID=In.getNextActionMgrId(),n};static#r=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};_u.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#a())};static#a=()=>{if(!this.#t){if(0===this.#e.length)return;const e=this.#e.shift();this.#r(e),e.config&&"true"===e.config.parallel&&this.#e.length>0&&this.#a()}};static#s=()=>{this.#a()};static#o=(e,t,n)=>{this.#n(e,t,n),this.#s()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return _u.getContextPath(t,n)};static#i(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:a,actions:s}=n[r];if(s){const n=this.getActionHandlers(s,a,t);n&&n.length>0&&this.#o(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();if(Un({type:V.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r}),t instanceof Event||t.nativeEvent instanceof Event||null!==t.value&&void 0===t.prop){let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const a=void 0===n?t.value:"value"in n?n.value:n.innerText,s=this.getFullRef(e);ru({type:Se,payload:{reference:s,value:a,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||ru({type:$e,payload:{reference:s,pageReference:e.getPageReference(),value:a,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(G.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const s=a[e],o=t[e];ru({type:Se,payload:{reference:_u.getContextPath(n,s),value:o,context:r}}),ru({type:$e,payload:{reference:_u.getContextPath(n,s),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,s=this.getFullRef(e),o=e.getContextName();n.clearMessages&&Un({type:V.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&ru({type:$e,payload:{reference:s,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(G.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#i(e,n)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#a()};static isQueueEmpty=()=>0===this.#e.length;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},$u="CREATE_WORK",bu=e=>({type:$u,payload:e}),Pu=(e,t)=>{const n=[];for(const r in e)if("object"==typeof e[r]&&r.includes("[")){const a=r.substring(0,r.indexOf("[")),s=r.substring(r.indexOf("[")+1,r.indexOf("]"));t[a].splice(s,1,e[r]),n.push(a)}else"object"==typeof e[r]?(t[r]||(t[r]=Array.isArray(e[r])?[]:{}),Pu(e[r],t[r])):t[r]=e[r];for(const r in t)(Array.isArray(t[r])&&!n.includes(r)||!Array.isArray(t[r])&&!Object.hasOwnProperty.call(e,r))&&delete t[r]},Ou=(e,t={})=>{const{serverPrecedenceFields:n=[]}=t,{context:r,data:a,isArrayDeepMerge:s,preserveClientChanges:o=!1}=e,i=kr(r,!0);((e,t={})=>{const n=fr.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{Iu.buildObject(e,t,n[e])}))})(r,i);const c=au(r);let d={};c&&void 0!==c&&(d=JSON.parse(JSON.stringify(c)),Pu(i,d));const l={caseInfo:{content:{...d?.caseInfo?.content}}};let u=a;return o?(n.forEach((e=>{Iu.deleteIn(l,`caseInfo.content.${e}`)})),u=hu(a,l,{isArrayDeepMerge:!s})):((e,t)=>{const n=jr[e]||{};Object.keys(n).forEach((e=>{Iu.hasIn(t,e)&&(n[e].value=Iu.getIn(t,e))}))})(r,a),{type:Fe,payload:{...e,data:u}}},Tu=e=>({type:"SHOW_HARNESS",payload:e}),Nu=e=>({type:be,payload:e}),vu=e=>({type:Pe,payload:e}),Ru=e=>({type:"ADD_WORK",payload:e}),Du=e=>({type:we,payload:e}),xu=e=>({type:He,payload:e}),wu=e=>({type:We,payload:e}),Mu=e=>({type:qe,payload:e}),Lu=e=>({type:Ye,payload:e}),ju=e=>({type:Ke,payload:e}),Uu=e=>({type:Qe,payload:e}),Fu=e=>({type:Ze,payload:e}),ku=e=>{const{containerItemID:t}=e;return e.suggestionContexts=gs(t),{type:tt,payload:e}},Vu=e=>({type:nt,payload:e}),Gu=e=>({type:et,payload:e}),Bu=e=>({type:Et,payload:e}),Hu=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=ds(n)),e.context=r,e.deleteContext=!Ts(n),e.childContainers=ps(n),e.childContainersContexts=hs(n),e.transientItems=Ns([...e.childContainersContexts,n]),e.suggestionContexts=gs(n),n===t&&(e.caseID=iu(G.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=iu(G.CASE_INFO.REMOTESYSTEMID,"",t)),{type:ze,payload:e}},Wu=e=>{const{containerItemID:t}=e;return e.transientItems=Ns([...hs(t),t]),{type:Je,payload:e}},qu=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Xe,payload:e}},zu=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=ds(n)),e.context=r,e.childContainers=ps(n),e.childContainersContexts=hs(n),e.transientItems=Ns([...e.childContainersContexts,n]),e.suggestionContexts=gs(n),n===t&&(e.caseID=iu(G.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=iu(G.CASE_INFO.REMOTESYSTEMID,"",t)),{type:rt,payload:e}},Yu=e=>({type:Le,payload:e}),Ku=e=>({type:Ue,payload:e}),Xu=e=>({type:Ge,payload:e}),Ju=(e,...t)=>(Cu.resume(),e(...t)),Qu=(e,t,n,r,a)=>({type:Be,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),Zu=e=>({type:Ct,payload:e}),ep=e=>({type:$t,payload:e}),tp=e=>({type:bt,payload:e}),np=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),rp=e=>({type:De,payload:e}),ap=e=>({type:Se,payload:e}),sp="replace",op=["portal","noPortal","preview","debug","devtool"];let ip="",cp="Home",dp="",lp=!0;const up=e=>(lp=e,lp),pp=()=>lp,hp=(e,t,n)=>Q.getSemanticURL(e,t,n),gp=(e,t)=>Q.getRestEndPoint(e,t),fp=(e,t)=>{let n=A();const r=gp(e,t);return r?(r?.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},yp=(e,t,n)=>{const{root:r,resources:a}=e,{views:s}=a,{config:o}=r;let i="";if(n)i=n;else{const e=s[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e),i=t.config.urlPath}const c=i.match(W);if(c){const e=Iu.getIn(t,o.context);i=i.replace(c[0],e.pyID)}return i.startsWith("/")&&(i=i.substring(1,i.length)),{pxURLPath:i,historyAction:"add"}},mp=(e,t,n)=>{let r,a;r=z(t)?`${e}/${t}`:e;const s=z(n.pxURLPath);s&&(r=`${r}/${s}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==cp.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!Q.isDefaultPortal()){const e=Q.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return a=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&op.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},Ip=(e,t=!1,{urlPathObjParam:n,infoParam:r,optionsParam:a})=>{let s,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(t)s=n,o=r,i=a;else{const{uiResources:t,data:r}=e;({options:i}=e),s=n&&n.pxURLPath&&q(n.pxURLPath)?yp(t,r,n.pxURLPath):n||yp(t,r),o=Q.getEndPointInfo(s.pxURLPath),s.pxURLPath=o.urlPath}const c=mp(ip,Q.getApplicationPath(),s),{title:d}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:Q.getApplicationName()),n===`${ip}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),a=r.split("/");return/\d/.test(r)?{title:`${e} - ${a[a.length-1]}`}:{title:`${e} - ${a[0]}`}})(dp,Q.getApplicationPath(),c),l=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(o,{...i,title:d});"add"===s.historyAction?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(l,d,c):s.historyAction===sp&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(l,d,c)},Ep=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:"add",pxURLPath:""},t.pxURLPath=e.semanticURL),Ip(e,!1,{urlPathObjParam:t,infoParam:null,optionsParam:null})},Ap=e=>{const t={pxURLPath:e};return mp(ip,Q.getApplicationPath(),t)},_p=e=>{const{uiResources:t}=e;pp()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,a=t.config,s=a.type,o=a.name;if("VIEW"===s.toUpperCase()){const e=r[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&Ep(e)},Sp=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},Cp=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&ru(l.showHistory(Sp(t)))},$p=()=>Q.getApplicationPath()!==K(),bp=(e,t=!1)=>{var n;ip=e.domain,!1===t&&pp()&&(n=Cp,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),Q.init(e,cp)};function Pp(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Op="function"==typeof Symbol&&Symbol.observable||"@@observable",Tp=()=>Math.random().toString(36).substring(7).split("").join("."),Np={INIT:`@@redux/INIT${Tp()}`,REPLACE:`@@redux/REPLACE${Tp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Tp()}`};function vp(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Rp(e,t,n){if("function"!=typeof e)throw new Error(Pp(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Pp(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Pp(1));return n(Rp)(e,t)}let r=e,a=t,s=new Map,o=s,i=0,c=!1;function d(){o===s&&(o=new Map,s.forEach(((e,t)=>{o.set(t,e)})))}function l(){if(c)throw new Error(Pp(3));return a}function u(e){if("function"!=typeof e)throw new Error(Pp(4));if(c)throw new Error(Pp(5));let t=!0;d();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(Pp(6));t=!1,d(),o.delete(n),s=null}}}function p(e){if(!vp(e))throw new Error(Pp(7));if(void 0===e.type)throw new Error(Pp(8));if("string"!=typeof e.type)throw new Error(Pp(17));if(c)throw new Error(Pp(9));try{c=!0,a=r(a,e)}finally{c=!1}return(s=o).forEach((e=>{e()})),e}return p({type:Np.INIT}),{dispatch:p,subscribe:u,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Pp(10));r=e,p({type:Np.REPLACE})},[Op]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Pp(11));function n(){const e=t;e.next&&e.next(l())}return n(),{unsubscribe:e(n)}},[Op](){return this}}}}}function Dp(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var xp=function(e){function t(t,n){return e.call(this)||this}return dc(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Sc),wp={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=wp.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,hc([e,t],pc(n))):setInterval.apply(void 0,hc([e,t],pc(n)))},clearInterval:function(e){var t=wp.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Mp=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return dc(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,a=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(a,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(a,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),wp.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&wp.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,_c(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(xp),Lp=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return dc(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Mp),jp={now:function(){return(jp.delegate||Date).now()},delegate:void 0},Up=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=jp.now,e}(),Fp=function(e){function t(t,n){void 0===n&&(n=Up.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return dc(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Up),kp=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dc(t,e),t}(Fp))(Lp),Vp=Ec((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Gp=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return dc(t,e),t.prototype.lift=function(e){var t=new Bp(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Vp},t.prototype.next=function(e){var t=this;Rc((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=uc(t.currentObservers),s=a.next();!s.done;s=a.next())s.value.next(e)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;Rc((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;Rc((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,s=n.observers;return r||a?Cc:(this.currentObservers=null,s.push(e),new Sc((function(){t.currentObservers=null,_c(s,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new Vc;return e.source=this,e},t.create=function(e,t){return new Bp(e,t)},t}(Vc),Bp=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return dc(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Cc},t}(Gp),Hp=function(e,t){return Hp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Hp(e,t)};Object.create,Object.create;var Wp=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new Gp,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Hp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Vc),qp=n(923),zp=Symbol.for("immer-nothing"),Yp=Symbol.for("immer-draftable"),Kp=Symbol.for("immer-state");function Xp(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jp=Object.getPrototypeOf;function Qp(e){return!!e&&!!e[Kp]}function Zp(e){return!!e&&(th(e)||Array.isArray(e)||!!e[Yp]||!!e.constructor?.[Yp]||oh(e)||ih(e))}var eh=Object.prototype.constructor.toString();function th(e){if(!e||"object"!=typeof e)return!1;const t=Jp(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===eh}function nh(e,t){0===rh(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function rh(e){const t=e[Kp];return t?t.type_:Array.isArray(e)?1:oh(e)?2:ih(e)?3:0}function ah(e,t){return 2===rh(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function sh(e,t,n){const r=rh(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function oh(e){return e instanceof Map}function ih(e){return e instanceof Set}function ch(e){return e.copy_||e.base_}function dh(e,t){if(oh(e))return new Map(e);if(ih(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&th(e)){if(!Jp(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[Kp];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const a=r[t],s=n[a];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Jp(e),n)}function lh(e,t=!1){return ph(e)||Qp(e)||!Zp(e)||(rh(e)>1&&(e.set=e.add=e.clear=e.delete=uh),Object.freeze(e),t&&nh(e,((e,t)=>lh(t,!0)))),e}function uh(){Xp(2)}function ph(e){return Object.isFrozen(e)}var hh,gh={};function fh(e){const t=gh[e];return t||Xp(0),t}function yh(){return hh}function mh(e,t){t&&(fh("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ih(e){Eh(e),e.drafts_.forEach(_h),e.drafts_=null}function Eh(e){e===hh&&(hh=e.parent_)}function Ah(e){return hh={drafts_:[],parent_:hh,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function _h(e){const t=e[Kp];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Sh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Kp].modified_&&(Ih(t),Xp(4)),Zp(e)&&(e=Ch(t,e),t.parent_||bh(t,e)),t.patches_&&fh("Patches").generateReplacementPatches_(n[Kp].base_,e,t.patches_,t.inversePatches_)):e=Ch(t,n,[]),Ih(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zp?e:void 0}function Ch(e,t,n){if(ph(t))return t;const r=t[Kp];if(!r)return nh(t,((a,s)=>$h(e,r,t,a,s,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return bh(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let a=t,s=!1;3===r.type_&&(a=new Set(t),t.clear(),s=!0),nh(a,((a,o)=>$h(e,r,t,a,o,n,s))),bh(e,t,!1),n&&e.patches_&&fh("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function $h(e,t,n,r,a,s,o){if(Qp(a)){const o=Ch(e,a,s&&t&&3!==t.type_&&!ah(t.assigned_,r)?s.concat(r):void 0);if(sh(n,r,o),!Qp(o))return;e.canAutoFreeze_=!1}else o&&n.add(a);if(Zp(a)&&!ph(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ch(e,a),t&&t.scope_.parent_||bh(e,a)}}function bh(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lh(t,n)}var Ph={get(e,t){if(t===Kp)return e;const n=ch(e);if(!ah(n,t))return function(e,t,n){const r=Nh(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Zp(r)?r:r===Th(e.base_,t)?(Rh(e),e.copy_[t]=Dh(r,e)):r},has:(e,t)=>t in ch(e),ownKeys:e=>Reflect.ownKeys(ch(e)),set(e,t,n){const r=Nh(ch(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Th(ch(e),t),o=r?.[Kp];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((a=n)===(s=r)?0!==a||1/a==1/s:a!=a&&s!=s)&&(void 0!==n||ah(e.base_,t)))return!0;Rh(e),vh(e)}var a,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Th(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Rh(e),vh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=ch(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Xp(11)},getPrototypeOf:e=>Jp(e.base_),setPrototypeOf(){Xp(12)}},Oh={};function Th(e,t){const n=e[Kp];return(n?ch(n):e)[t]}function Nh(e,t){if(!(t in e))return;let n=Jp(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Jp(n)}}function vh(e){e.modified_||(e.modified_=!0,e.parent_&&vh(e.parent_))}function Rh(e){e.copy_||(e.copy_=dh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Dh(e,t){const n=oh(e)?fh("MapSet").proxyMap_(e,t):ih(e)?fh("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:yh(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=Ph;n&&(a=[r],s=Oh);const{revoke:o,proxy:i}=Proxy.revocable(a,s);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:yh()).drafts_.push(n),n}function xh(e){if(!Zp(e)||ph(e))return e;const t=e[Kp];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=dh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=dh(e,!0);return nh(n,((e,t)=>{sh(n,e,xh(t))})),t&&(t.finalized_=!1),n}nh(Ph,((e,t)=>{Oh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Oh.deleteProperty=function(e,t){return Oh.set.call(this,e,t,void 0)},Oh.set=function(e,t,n){return Ph.set.call(this,e[0],t,n,e[0])};var wh=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...a){return r.produce(e,(e=>t.call(this,e,...a)))}}let r;if("function"!=typeof t&&Xp(6),void 0!==n&&"function"!=typeof n&&Xp(7),Zp(e)){const a=Ah(this),s=Dh(e,void 0);let o=!0;try{r=t(s),o=!1}finally{o?Ih(a):Eh(a)}return mh(a,n),Sh(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===zp&&(r=void 0),this.autoFreeze_&&lh(r,!0),n){const t=[],a=[];fh("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}Xp(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Zp(e)||Xp(8),Qp(e)&&(e=function(e){return Qp(e)||Xp(10),xh(e)}(e));const t=Ah(this),n=Dh(e,void 0);return n[Kp].isManual_=!0,Eh(t),n}finishDraft(e,t){const n=e&&e[Kp];n&&n.isManual_||Xp(9);const{scope_:r}=n;return mh(r,t),Sh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=fh("Patches").applyPatches_;return Qp(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},Mh=wh.produce;wh.produceWithPatches.bind(wh),wh.setAutoFreeze.bind(wh),wh.setUseStrictShallowCopy.bind(wh),wh.applyPatches.bind(wh),wh.createDraft.bind(wh),wh.finishDraft.bind(wh);const Lh={getData:(e,t,n,r={})=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:d}=fp("getListData",a);return _d(c,{method:d,body:t,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:a,reqType:s}=fp("getListDataCount",r);return _d(a,{method:s,body:t},n)},getDataViewMetadata:(e,t,n)=>{const r={dataViewName:e},a=!!n,s=a?"postDataViewMetadata":"getDataViewMetadata",{restApi:o,reqType:i}=fp(s,r);return _d(o,a?{method:i,body:{associationFilter:n}}:{method:i},t)},getDataObjectView:(e,t,n,r,a={})=>{const{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},d={dataViewParameters:n},{restApi:l,reqType:u}=fp("readDataObject",c);return _d(l,{method:u,body:d,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},r,i)},getCaseEditMetadata:(e,t)=>Zd.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Zd.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Zd.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:a,listClass:s,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:d,reqType:l}=fp("moveListRecords",c);return _d(d,{method:l,body:{content:{sourceID:n,destinationID:r,context:a,listClass:s}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===G.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===G.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==ps("root").find((e=>e.includes("authoring-preview")))?`${G.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${ne.getAppAlias()}-${e}`};var jh=n(924),Uh=n.n(jh);const Fh=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),a=Object.keys(e);0===Uh()(r,a).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};Vh.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}}("CASE",t)}return this.subscriptions[e]}};class kh{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),a=this.users[e];if(a)return a.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const s={matcher:"PRESENCE",criteria:{userId:e}};return Vh.subscribe(s,this._handleUserPresence.bind(this)),r}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],Vh.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=ne.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{console.log(`MS : ${Date.now()}`);const e=new WebSocket(`${r}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(`MS catch : ${Date.now()}`),console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=null),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=null,null!==this.webSocket&&1===this.webSocket.readyState){const e=ne.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data recieved from messaging service",e.data)}if(t&&t.msgId&&this.webSocket.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const a=this.subscribers[r];a.filter.matcher===e&&Iu.isEqual(a.filter.criteria,n)&&a.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n.includes(t)||(n.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from recieved data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5e3))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const a=r||`${Date.now()}_${this.connectionsCount}`,s=new class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}}(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(s,a),a):(this.inProgressSubscriptions.push({messageSubscriber:s,id:a}),null===this.webSocket&&this.initConnection(this.connectionConfig),a)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>Fh.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:ne.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(ne.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occured while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const Vh=kh,Gh=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:n,pageSize:r}=e,a=n*r;let s=a-r;for(;s<a;s+=1){if(!this.records[s])return this.maxRecords===s?t:[];t.push(this.records[s])}return t}return this.records}mergeRecords(e,t){if(t){const{pageNumber:n,pageSize:r}=t,a=n*r;let s=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[s],s+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=hu(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}},Bh=new class{isCacheDisabled=!1;constructor(){this.datastore={},this.subscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t={},n,r){const a=this._generateHash(e,t,r);if(null===a)return[];if(this.datastore[e]&&this.datastore[e][a]){const t=this.datastore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}_generateHash(e,t,n){const r=Ul(e);if(!r)return null;const a=r.parameters||[];let s="",o=e;const i=[];return a.forEach((e=>{t[e.name]?i.push(t[e.name]):i.push(e.defaultValue||G.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(G.HASH_DELIMITER)&&(s=Iu.getHashedString(i.join(G.HASH_DELIMITER)),o=e+G.UNDERSCORE_STRING+s),o}async getDataAsync(e,t,n={},r,a,s={}){if(this._subscribeToMessageService(e),s.purgeDataPageCache&&(this.datastore[e]={}),!this._isCacheable(e,a)||s.invalidateCache){const o=await this._fetchData(e,n,r,a,t,s),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,a);if(o.length>0)return{data:o};const i=await this._fetchData(e,n,r,a,t,s);return{...i.data,data:this._mergeDataStore(e,n,r,a,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){const{restApi:a,reqType:s}=fp(G.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),o={method:s};if(r&&r.invalidateCache&&delete this.datastore[e],r&&!r.invalidateCache&&this.datastore[e])return this.datastore[e];const i=a&&0===Object.keys(n).length?a.split("?")[0]:a;return _d(i,o,t).then((t=>(this._isPerInteraction(e)||(this.datastore[e]=t.data||{}),t.data)))}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.datastore[t]||(this.datastore[t]={});const n=e[t];Object.keys(n).forEach((n=>{if(this.datastore[t][n])this.datastore[t][n].mergeRecords(e[t][n].pxResults);else{const r=new Gh;this.datastore[t][n]=r,r.mergeRecords(e[t][n].pxResults)}}))}))}_mergeDataStore(e,t,n,r,a){const s=this._generateHash(e,t,r),o=a?.data?.data;if(!o||0===o.length)return[];if(null===s)return o;this.datastore[e]||(this.datastore[e]={}),this.datastore[e][s]||(this.datastore[e][s]=new Gh);const i=this.datastore[e][s];return i.mergeRecords(o,n),i.isDirty=!1,i.getRecords(n)}async _fetchData(e,t,n,r,a,s){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=s,d={dataViewParameters:t};return i&&(d.includeTotalCount=!0),o&&(d.useExtendedTimeout=!0),n&&(d.paging=n),r&&(d.query=r),Lh.getData(e,d,a,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}_handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t._handleMessage({message:{datapage:e}})}subscribeToUpdate(e,t,n,r,a,s){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},this.subscribers[e].callback[s]||(this.subscribers[e].callback[s]=a),this._subscribeToCascadeUpdates(e,t,n,r,s)}unsubscribe(e,t,n,r,a){delete this.subscribers[e]?.callback[a],t&&t.length>0&&Ql.unRegisterFields(n,r,t,a)}_subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&Ql.registerFields(n,r,t,this._handleCascadeUpdate.bind({dataPageName:e,scope:this}),a)}_subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};Vh.subscribe(t,this._handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}_handleMessage(e){const{msgId:t,message:n}=e,{datapage:r}=n,a=this.subscribers[r];this._markDataInstancsDirty(r),a&&a.callback&&Object.keys(a.callback).forEach((n=>{a.callback[n](e.message,!!t)}))}_markDataInstancsDirty(e){this.datastore[e]&&Object.keys(this.datastore[e]).forEach((t=>{this.datastore[e][t].isDirty=!0}))}_isPerInteraction(e){const t=Ul(e);return t&&t.refreshStrategy&&"reloadOncePerInteraction"===t.refreshStrategy.type}_isCacheable(e,t){return!(this._isPerInteraction(e)||!this.isCacheEnabled||t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}},Hh=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{Bh.updateDataPageStore(t),Object.keys(t).forEach((n=>{Iu.getIn(e,[G.SHARED,n])?Object.keys(t[n]).forEach((r=>{Iu.setIn(e,[G.SHARED,n,r],t[n][r])})):Iu.setIn(e,[G.SHARED,n],t[n])}))})(e,n),r&&Iu.deleteIn(e,[r,"shared"])},Wh=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:G.PERFORM_MODE),containerName:s}=t;s!==Ka.WORKAREA&&a&&Iu.setIn(e,[r,"context_data","caseViewMode"],a)},qh=(e,t=[])=>{t.forEach((t=>Iu.deleteIn(e,t)))},zh=(e,t=[])=>{t.forEach((t=>Iu.deleteIn(e,t)))},Yh=(e,t=[])=>{t.forEach((t=>{Iu.deleteIn(e,t)}))},Kh=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;Iu.deleteIn(e,[t,"nextAssignmentInfo"]),Iu.deleteIn(e,[t,"caseInfo","availableActions"]),Iu.deleteIn(e,[t,"caseInfo","availableProcesses"]),Iu.deleteIn(e,[t,"caseInfo","activeActionID"]),Iu.deleteIn(e,[t,"caseInfo","assignments"]),Iu.deleteIn(e,[t,"caseInfo","childCases"]),a&&(Iu.deleteIn(e,[t,"caseInfo","confirmationLinks"]),Iu.deleteIn(e,[t,"caseMessages"])),r&&(Iu.deleteIn(e,[t,"caseInfo","actionButtons"]),Iu.deleteIn(e,[t,"caseInfo","navigation"]))},Xh=/\[(\d+)\]$/gi,Jh=/(\d+)/gi,Qh=/\[.\]$/gi,Zh=(e,t,n,r=[G.CONTEXT_DATA,G.CASE_INFO.CASE_INFO,G.CONTENT])=>{const a=Iu.getIn(t,r);if(a){const t=kn(a,[],[]);for(const a of t)Iu.setIn(e[n],[...r,...a],{})}};const eg=[(e,t)=>Mh(e,(e=>{switch(t.type){case Fe:return e[t.payload.context]=hu(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge}),Wh(e,t.payload,!0),Hh(e,t.payload),e;case Se:{const{context:n,reference:r,value:a,isArrayDeepMerge:s}=t.payload;return gu(e[n],r,a,{isArrayDeepMerge:s}),e}case Ce:{const{context:n,reference:r,value:a}=t.payload;return fu(e[n],r,a),e}case ke:return uu(e[t.payload.context],t.payload.reference),e;case ve:return Iu.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case Re:return Iu.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case Ct:{const{data:n}=t.payload;return Hh(e,{data:{shared:n}}),e}case $t:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;Iu.deleteIn(e.shared,[n,r]);const a=Iu.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&Iu.deleteIn(e.shared,[n])})),e}case Ot:{const n=Iu.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?Iu.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):Iu.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),(e={},t)=>Mh(e,(e=>{switch(t.type){case qe:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&Kh(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(G.WORKAREA)&&-1===n.indexOf(G.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,Wh(e,t.payload),((e,t)=>{const{context:n}=t;Iu.setIn(e,[n,"context_data","actionType"],t.actionType),Iu.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)})(e,t.payload),Hh(e,t.payload),e}case tt:{t.payload.doDeleteCaseSummary&&Kh(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n}=t.payload;return!n||-1===n.indexOf(G.WORKAREA)&&-1===n.indexOf(G.MODAL)?e[t.payload.containerItemID]=hu(e[t.payload.containerItemID],t.payload.data):e[t.payload.context]=hu(e[t.payload.context],t.payload.data),Wh(e,t.payload),Hh(e,t.payload),zh(e,t.payload.suggestionContexts),e}case ze:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&Iu.deleteIn(e,[r]),Iu.deleteIn(e,[n])})(e,t.payload),Yh(e,n),qh(e,t.payload.transientItems),zh(e,t.payload.suggestionContexts),e}case We:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{Iu.deleteIn(e,[t])})):Iu.deleteIn(e,[n]),e}case nt:{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:s}=t.payload;return Kh(e,t.payload.context),Wh(e,t.payload),e[n]=hu(e[n],e[r]),e[n]=hu(e[n],a),Iu.deleteIn(e,[r]),Yh(e,s),Hh(e,t.payload),e}case rt:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}}=t;let{payload:{data:s}}=t;const o=Iu.getIn(e[n],"pulse");let i=Iu.getIn(e[n],"OperatorID"),c=Iu.getIn(e[n],"pxRequestor");return c&&s.pxRequestor&&(c=Iu.mergeDeep(c,s.pxRequestor)),i&&s.OperatorID&&(i=Iu.mergeDeep(i,s.OperatorID)),!r&&o&&(s=gu(s,"pulse",o),s=gu(s,"OperatorID",i),s=gu(s,"pxRequestor",c)),Iu.setIn(e,n,s),Wh(e,t.payload),Hh(e,t.payload),Yh(e,a),qh(e,t.payload.transientItems),zh(e,t.payload.suggestionContexts),e}case Pt:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return Kh(e,n,{doDeleteConfirmationDetails:r}),e}case Ye:{const{transientItemID:n,data:r}=t.payload;return Iu.setIn(e,n,r)}case Xe:case Je:{const{transientItems:n}=t.payload;return n.forEach((t=>Iu.deleteIn(e,t))),e}case Ke:case Qe:{const{transientItemID:n,data:r}=t.payload;return hu(Iu.getIn(e,n),r),e}case Ze:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&Iu.deleteIn(e,[n,t]);return e}case De:{const{key:n,value:r}=t.payload;return Iu.setIn(e,`${G.SHARED}.${n}`,r),e}case ot:{const{context:n,data:r}=t.payload;return Iu.setIn(e,n,r)}default:return e}})),(e=og().data,t)=>Mh(e,(e=>{switch(t.type){case Be:return t.payload.err.errorDetails&&"Validation fail"===t.payload.err.errorClassification?function(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:s,pageErrors:o}=((e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[G.ERROR_IN_PAGE_IDENTIFIER]&&e[G.ERROR_FIELD_IN_PAGE]):{const a=`${e[G.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),s=`${a}${e[G.ERROR_IN_PAGE_IDENTIFIER]}`,o=Iu.deepClone(e);o[G.ERROR_FIELD_IN_PAGE]=a,t.includes(s.slice(1))||t.includes(s.substring(s.indexOf(".")+1,s.indexOf("[")))?r.push(o):n.push(e);break}case Boolean(e[G.ERROR_IN_PAGE_IDENTIFIER]&&!e[G.ERROR_FIELD_IN_PAGE]):{const a=e[G.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}})(n.errorDetails,r);if(Iu.setIn(e,[a,...xn.FIELD_MESSAGES_PATH],{}),Iu.setIn(e,[a,...xn.PAGE_MESSAGES_PATH],[]),s.forEach((t=>{if(t[G.ERROR_FIELD_IN_PAGE]){const n=t[G.ERROR_FIELD_IN_PAGE].slice(1);if(n){const t=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(n);if(!t)return!1;const r=n.substring(n.lastIndexOf(".")+1),s=wn(r,t,G.PROPERTY);Iu.setIn(e,[a,...s],[])}}})),s.length>0&&((e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[G.ERROR_FIELD_IN_PAGE].slice(1),a=n[G.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(a){let s=r?`caseInfo.content.${r}`:"caseInfo.content";s=s.replace(/\(/g,"[").replace(/\)/g,"]");const o=wn(a,s,G.PROPERTY),i={type:V.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue},c=Iu.getIn(e[t],o,[]);if(Iu.isContains(c,i))return;Iu.setIn(e[t],o,[...c,i])}})(e,t,n)}))})(e,a,s),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:V.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[a]||(a=G.APP.APP),Iu.setIn(e,[a,...xn.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(Ka.WORKAREA)&&(a=ge(a)),Iu.deleteIn(e,[a,...xn.PAGE_MESSAGES_PATH]);return e}(e,t):e;case tt:{const{context:n}=t.payload,r=[n,...xn.FIELD_MESSAGES_PATH],a=[n,...xn.PAGE_MESSAGES_PATH];if(Iu.setIn(e,r,{}),Iu.setIn(e,a,[]),n&&n.includes(Ka.WORKAREA)){const t=[Ae(n),...xn.PAGE_MESSAGES_PATH];Iu.setIn(e,t,[])}return e}case At:{const{isListEntry:n}=t.payload;return n?((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:s,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return Zh(e,i,c),e;const d=wn(n,r,a,s);if(Number.isInteger(o)){Iu.deleteIn(e[c],d);const t=d.slice(0,d.length-1);let n=Iu.getIn(e[c],t)||{};const r=Object.keys(n);n=r.map((e=>n[e])),n.forEach(((n,a)=>{const s=r[a].match(Xh);if(s?.length){const i=parseInt(s[0].match(Jh)[0],10);i>o&&(Iu.deleteIn(e[c],t.concat(r[a])),Iu.setIn(e[c],t.concat(r[a].replace(Qh,`[${i-1}]`)),n))}}))}else Iu.setIn(e[c],d,{});return e})(e,t):((e,t)=>{const{property:n,pageReference:r,category:a,type:s,isListEntry:o,stateObj:i}=t.payload;let{context:c}=t.payload;if(i)return Zh(e,i,c),e;const d=wn(n,r,a,o);a===G.PAGE&&c.includes&&c.includes(Ka.WORKAREA)&&(c=ge(c));const l=Iu.getIn(e[c],d);if(l&&a===G.CASEMESSAGES)Iu.setIn(e[c],wn(n,r,a),"");else if(l&&l.length>0&&Array.isArray(l)){const t=l.filter((e=>e.type!==s));d&&d.length>0&&Iu.setIn(e[c],wn(n,r,a),t)}return e})(e,t)}case Et:{const{messages:n,property:r,pageReference:a,context:s,category:o}=t.payload,i=wn(r,a,o);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&Iu.setIn(e[s],wn(r,a,o),n),e}default:return e}})),(e,t)=>Mh(e,(e=>{if(t.type===bt){const{instruction:n,actions:r,context:a,referenceList:s,listIndex:o,listMoveToIndex:i,content:c={}}=t.payload,d=eu(s);switch(n){case G.LIST_ACTIONS.INSERT:((e,t,n,r,a)=>{Iu.setIn(e[t],[...n,r],a)})(e,a,d,o,c);break;case G.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const s=hu(Iu.getIn(e[t],[...n,r],{}),a);Iu.setIn(e[t],[...n,r],s)})(e,a,d,o,c);break;case G.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const a=Iu.getIn(e[t],n,[]);a.splice(r,1),Iu.setIn(e[t],n,a)})(e,a,d,o);break;case G.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const s=Iu.getIn(e[t],[...n,r],{}),o=Iu.getIn(e[t],n,[]);o.splice(r,1),o.splice(a,0,s),Iu.setIn(e[t],n,o),((e,t,n,r,a)=>{const s=Iu.deepClone(Iu.getIn(e,[`${t}`])),o=Iu.getIn(s,[G.CONTEXT_DATA,G.CASE_INFO.CASE_INFO]);if(!o)return;const i=n.substring(0,n.lastIndexOf(".")),c=n.substring(n.lastIndexOf(".")+1),d=((e,t,n)=>{const r=Iu.getIn(e,[G.CONTEXT_DATA,...n.split(".")]);return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(s,c,i);if(0!==d.length)if(Mn(o,c,r).content[`${c}[${r}]`]){const o={},i=`${n}[${r}]`,c=Iu.getIn(s,[G.CONTEXT_DATA,...i.split(".")]);o[`${n}[${a}]`]=c,Iu.deleteIn(e[t],[G.CONTEXT_DATA,...i.split(".")]),Ln(e,t,d,r,a,n,o)}else Ln(e,t,d,r,a,n)})(e,t,n?.join("."),r,a)})(e,a,d,o,i);break;case G.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=Iu.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:s,listIndex:o}=e;if(r===G.LIST_ACTIONS.SELECT){a[o]=s;const e=n?.join(".");Qn(t,e)}else delete a[o]})),Iu.setIn(e[t],n,a.filter(Boolean))})(e,a,d,r);break;case G.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{Iu.setIn(e[t],n,[])})(e,a,d)}}return e}))],tg=(e=og().data,t)=>t.type===_t?og().data:(eg.forEach((n=>{e=n(e,t)})),e),ng=(e,t=[])=>{t.forEach((t=>{Iu.deleteIn(e,[t])}))},rg=(e,t)=>{const{type:n,payload:r}=t,a=n===tt,{target:s,context:o,semanticURL:i="",root:c,containerItemID:d,childContainers:l,flowName:u,resourceType:p="",key:h="",clearView:g=!1}=r;return c?Iu.setIn(e,[s,"items",d,"view"],c):g&&Iu.deleteIn(e,[s,"items",d,"view"]),o&&Iu.setIn(e,[s,"items",d,"context"],o),u&&Iu.setIn(e,[s,"items",d,"flowName"],u),(!a||a&&h)&&Iu.setIn(e,[s,"items",d,"key"],h.trim()),(!a||a&&i)&&Iu.setIn(e,[s,"items",d,"semanticURL"],i),(!a||a&&p)&&Iu.setIn(e,[s,"items",d,"resourceType"],p),ng(e,l),e},ag=(e=og().containers,t)=>t.type===_t?og().containers:Mh(e,(e=>{switch(t.type){case He:{const{context:n,name:r,type:a,actionMgrID:s}=t.payload,o=`${n}/${r}`;let i=null;return In.resolveActionByID(s,null,!1),e[o]||(i={type:a,accessedOrder:[],items:{}},Iu.setIn(e,[o],i)),e}case st:{const{containerName:n,childContainers:r=[]}=t.payload;return Iu.deleteIn(e,[n]),r.forEach((t=>{Iu.deleteIn(e,[t])})),e}case We:{const{context:n,name:r,actionMgrID:a,childContainers:s}=t.payload,o=`${n}/${r}`;return In.resolveActionByID(a,null,!1),Iu.setIn(e,[o,"accessedOrder"],[]),Iu.setIn(e,[o,"items"],{}),Array.isArray(s)&&s.forEach((t=>{Iu.deleteIn(e,[t])})),e}case qe:{const{target:n,context:r,isInCreateStage:a,isBulkAction:s,semanticURL:o,root:i,containerItemID:c,actionMgrID:d,key:l,flowName:u,resourceType:p,actionName:h,isMinimizable:g,showProgress:f,progressMessage:y,modalOptions:m,resourceStatus:I,isMultiRecordData:E,acTertiary:A,parentContext:_}=t.payload,S=e[n],C=S&&S.type,$=S&&S.accessedOrder||[],b=S&&S.items||{};let P=null;return e[n]&&"single"===C&&$.length>0?rg(e,t):(P={accessedOrder:[...$,c],items:{...b,[c]:{view:i,semanticURL:o,key:l,flowName:u,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:g,...s&&{isBulkAction:s},showProgress:f,progressMessage:y,modalOptions:m,resourceStatus:I,...A&&{acTertiary:A},...E&&{isMultiRecordData:E},..._&&{parentContext:_}}}},In.resolveActionByID(d,null,!1),e[n]=D()(e[n],P),e)}case tt:{const{actionMgrID:n,data:r}=t.payload;let a=e;try{a=rg(e,t),In.resolveActionByID(n,r,!1)}catch{In.rejectActionByID(n,!1)}return a}case rt:return((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:s}=t.payload;let o=e;try{Iu.setIn(e,[a,"items",s,"transientItems"],[]),o=rg(e,t),In.resolveActionByID(n,r,!1)}catch{In.rejectActionByID(n,!1)}return o})(e,t);case et:{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=Iu.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),Iu.setIn(e,[n,"accessedOrder"],t),In.resolveActionByID(a,null,!1)}catch{In.rejectActionByID(a,!1)}return e}case nt:case ze:{const{target:n,containerItemID:r,actionMgrID:a,childContainers:s}=t.payload;try{const t=Iu.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));Iu.setIn(e,[n,"accessedOrder"],t),Iu.deleteIn(e,[n,"items",r]),ng(e,s),In.resolveActionByID(a,null,!1)}catch{In.rejectActionByID(a,!1)}return e}case Ye:{const{transientItemID:n,target:r,contextName:a}=t.payload,s=Iu.getIn(e,[r,"items",a,"transientItems"])??[];return Iu.setIn(e,[r,"items",a,"transientItems"],[...s,n])}case Je:{const{target:n,containerItemID:r}=t.payload;return Iu.deleteIn(e,[n,"items",r,"transientItems"]),e}case Xe:{const{target:n,transientItemID:r,containerItemID:a}=t.payload,s=(Iu.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));return Iu.setIn(e,[n,"items",a,"transientItems"],s)}default:return e}}));let sg={};const og=()=>sg;function ig(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Hd(e),r=function(e,t){return"number"==typeof Bd(e)?e.pop():1/0}(e),a=e;return a.length?1===a.length?Xc(a[0]):function(e){return void 0===e&&(e=1/0),Vd(Fc,e)}(r)(sd(a,n)):zd}const cg=(e,t)=>{if(e.confirmationLinks&&(e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return t=((e,t)=>{const n=[e];return t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const n=e,{uiResources:{actionButtons:r,navigation:a},nextAssignmentInfo:s}=n;if(n.data&&n.data.caseInfo){r&&(n.data.caseInfo.actionButtons=r),a&&(n.data.caseInfo.navigation=a),t&&t[V.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions;const{assignments:s,availableActions:o=[]}=n.data.caseInfo;if(!(s&&Array.isArray(s)&&s.length>0&&s[0].actions&&Array.isArray(s[0].actions))||t&&t[V.STOPMERGEACTIONS]||(s[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||o.push(e)})),n.data.caseInfo.availableActions=o),e.confirmationNote){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}}return t&&t.isCreateDataObject&&(n.data.dataInfo={},n.data.dataInfo.content=n.data.pyPortal,n.uiResources.root.config.context="dataInfo.content",n.uiResources.context_data.dataInfo=n.uiResources.context_data.dataInfo??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data.dataInfo.content??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data?.pyPortal,delete n.data.pyPortal,delete n.key),s&&(n.data.nextAssignmentInfo=s),n},dg={},lg=[(e,t)=>e.pipe(Ud(En,vt),kd((e=>e.payload)),Vd((e=>{const{context:n,caseWideAction:r,contextData:a,caseViewAction:s,interestPage:o,options:i}=e;let c={};const{propertyName:d="",classID:l=""}=i,u=Pa(n,{skipUUID:!1}),p=Iu.getPropertyName(d),h=p?p.split("."):[],g=h.pop(),f=h.join("."),y=[];if(f){const e=Rl(f,l);if(e&&"copy"===e.dataRetrievalType){const e=Iu.getIn(u,`content.content.${f}`)||{};Object.keys(e).length>0&&Object.keys(e).filter((e=>e!==g)).forEach((t=>{delete e[t],y.push(`${f}`)}))}}e.serverPrecedenceFields=y;let m={...u.content,contextData:a};const I=Ha(n);Iu.isEmpty(I)||(m=Ba(I,m)),r?c=fp("refreshCaseData",e):s?(c=fp("refreshCaseView",e),m.interestPage=o):c=fp("refreshAssignmentData",e);const{restApi:E}=c,{reqType:A}=c,_=t.value.data[n]?.caseInfo?.headers;return sd(((e,t)=>{const{context:n}=e;e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag});const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if((e=>fd[e])(r)>0&&dg[r]){const t=[];dg[r].forEach(((n,r)=>{n.url===e.url&&(t.push(r),n.cancelConfig.cancel())})),t.forEach((e=>{dg[r].splice(e,1)}))}const a=$d();return e.signal=a.token,e.cancelConfig=a,dg[r]?dg[r].push(e):dg[r]=[e],_d(e.url,e,n,{cancelContext:r}).then((e=>(delete dg[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete dg[r],e}))})({body:m,reqHeaders:_,context:n,method:A,url:On(e,E)},e)).pipe(kd((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:ba(t.headers)}))),Jd(": Error ocurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),Vd((async e=>{if(e&&e.type===Be)return Ra(e);const{actionConfig:t,response:n,headers:r,actionMgrID:a}=e,{context:s,serverPrecedenceFields:o}=t,i=Qr.getTargetViewContainerName(it),c=Rt(i,s),d={acName:c,context:s},l=cg(n,{[V.STOPMERGEACTIONS]:!0,[V.ACTIONS.DELETEAVIALACTIONS]:!0});l.directUrlUpdation=!1,await Ta(l,t,d);const u=Oa(l,{target:c,context:s});u.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=Ju(Ou,u,{serverPrecedenceFields:o});return fr.registerForServerChanges(),ru(p),In.resolveActionByID(a,u),fr.unRegisterForServerChanges(),[]})))],ug=lg,pg=[e=>e.pipe(Ud(St),Vd((async e=>{const{context:t}=e.payload,n={},r={},a=Object.keys(e.payload.datapages).map((a=>{const s=e.payload.datapages[a];if(s.mode===G.READONLY&&s?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=s?.refreshStrategy||{},n=su()[s.name];if(n&&a in n){const r=n[a],{loadTime:s}=r;if(!Lh.isTimeElapsed(s,e,t))return}}return Lh.getData(s.name,{dataViewParameters:s.dataViewParameters},t).then((e=>{const t=s.mode===G.READONLY?r:n;t[s.name]?t[s.name][a]={pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[s.name]={[a]:{pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const s=[];return Object.keys(n).length&&s.push(Ou({context:t,data:n})),Object.keys(r).length&&s.push(Zu({data:r,context:t})),ru(s),[]})))],hg=pg;class gg{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>n.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{switch(e.data.action){case gg.DISPLAY_DIRTY_POPUP:this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(ea.publish(G.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this));break;case gg.LOAD_PREVIEW:this.loadPreview(e);break;case gg.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case gg.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case gg.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case gg.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case gg.CLOSE_CONTAINER_ACTION:this.closeContainer(e)}}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;r===this.getUniqueId()&&gl({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})};closeContainer=e=>{const{uniqueId:t}=e.data;if(t!==this.getUniqueId())return;const n=gl({isRoot:!0}),r=PCore.getStore().getState().data.app?.pyPortal?.pyPrimaryNavPages;let a;Array.isArray(r)&&r[0]&&(a=r[0]);const s=a?.pyClassName||"Data-Portal",o=a?.pyRuleName||"pyHome";n.getPConnect().getActionsApi().showPage(o,s)};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:a}=e.data;let s=r;r===gg.OPEN_WORK_ITEM&&(s=gg.OPEN_WORK_BY_HANDLE);const o=hp(s,{caseClassName:n},void 0).replace(/{.+?}/,la(t)),i=`${V.APP.APP}${G.FORWARD_SLASH_STRING}${V.PRIMARY}`;(e=>{Ep(e)})({semanticURL:o,directUrlUpdation:!0,options:{acName:i,context:ls(i)}});const c=n.substring(n.lastIndexOf("-")+1),d=t.substring(t.lastIndexOf(" ")+1);(e=>{(e=>{window.document.title=e})(e)})(`${c} (${d}) - ${PCore.getEnvironmentInfo().environmentInfoObject.pxApplication.pyLabel}`),gl({}).getPConnect().getActionsApi().updateRecents(n,d,a,t)};openAssignment=e=>{const{pzInsKey:t,uniqueId:n}=e.data;n===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(t?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle",this.onCreateCallback.call(this,this.openAssignmentParams)),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${V.APP.APP}${G.FORWARD_SLASH_STRING}${V.PRIMARY}`;gl({meta:{},options:{context:ls(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${V.APP.APP}${G.FORWARD_SLASH_STRING}${V.PRIMARY}`;gl({meta:{},options:{context:ls(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),ea.subscribe(V.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),ea.subscribe(V.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{ea.unsubscribeAllWithEventType(V.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),ea.unsubscribeAllWithEventType(V.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:gg.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:gg.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,n)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:gg.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const fg=new gg,yg=e=>{const{containerName:t,isInCreateStage:n}=e;return n?G.MODAL:t||Qr.getTargetViewContainerName(ht)},mg=e=>{const t=Iu.getIn(e,[G.DATA,G.CASE_INFO.CASE_INFO]);return ln(t)&&un(ee.getOperatorIdentifier(),t)},Ig=()=>({registerHeader:(...e)=>hd.registerHeader(...e),unRegisterHeader:(...e)=>hd.unRegisterHeader(...e),getRegisteredHeaders:()=>hd.getRegisteredHeaders()}),Eg=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:s},o)=>{const{restApi:i,reqType:c}=fp(e,n),d={method:c,headers:a,body:t,...s&&{responseType:s}};return r&&(d.signal=r.token),_d(i,d,o)},Ag=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},s)=>(e.startsWith("http:")||e.startsWith("https:")||(e=A()+e),_d(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},s)),_g=e=>Q.doesRestApiExist(e),Sg=()=>$d(),Cg=e=>bd(e),$g=e=>{(e=>{md=e})(e)},bg=()=>Pg,Pg=class{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:a,viewType:s=Ca.PAGE,pageName:o,context:i=G.APP.APP,debugInfo:c,headers:d}=t;let l={};n&&n.content&&(l=n.content);const u={caseTypeID:e,content:{...l,...r},processID:a};return Eg("createWork",{body:u,queryPayload:{caseClassName:e,viewType:s,params:{pageName:o}},headers:{...d,...c&&{...hd.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:u,headers:ba(t.headers,e,d)})))}},{RESOURCE_TYPES:Og}=V,Tg=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:s}=e,o=da(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?Ca.PAGE:n||(!sa(r)&&!sa(a)||s?Ca.PAGE:Ca.FORM)},Ng=(e,t,n,r,a,s,o)=>_d(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...hd.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:s?o:""}),{RESOURCE_TYPES:vg}=V,{RESOURCE_TYPES:Rg}=V;class Dg{constructor(){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0}static _searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const a=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`))].join(G.HASH_DELIMITER),s=Iu.getHashedString(a),o=`${e.dataSource}_${s}`,i=Lh.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(window.sessionStorage.getItem(i));if(t&&Dg._searchResultsCache?.[t]?.[o])n(Dg._searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Dg._searchResultsCache?.persisted?.[o])n(Dg._searchResultsCache.persisted[o]);else{const s=new Dg;s.listType=e.listType,s.dataSource=e.dataSource,e.enablePagination?(s.enablePagination=e.enablePagination,s.pageSize=e.pageSize):s.maxResultsDisplay=e.maxResultsDisplay,s.parameters=e.parameters,s.columns=e.columns,s.matchPosition=e.matchPosition,s.context=t,JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(s.dataSourceMetaData=a.dataSourceMetaData,s.isQueryable=a.isQueryable,s.isInitialised=a.isInitialised,s.associationFilter=a.associationFilter,Dg.initializeCache(t,e,o,s),n(s)):(s.associationFilter=e.associationFilter,s.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,Dg.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)})))}}else if(e.deferDatasource){const r=new Dg;r.listType=e.listType,r.dataSource=e.dataSource,e.enablePagination?(r.enablePagination=e.enablePagination,r.pageSize=e.pageSize):r.maxResultsDisplay=e.maxResultsDisplay,r.dataSourceMetaData=e.dataSourceMetaData,r.parameters=e.parameters,r.columns=e.columns,r.matchPosition=e.matchPosition;const a=PCore.getMetadataUtils().getDataPageMetadata(e.dataSource);r.isQueryable=a.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,window.sessionStorage.setItem(i,JSON.stringify({isQueryable:a.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,Dg.initializeCache(t,e,o,r),n(r)}else{const a=new Dg;a.listType=e.listType,a.dataSource=e.dataSource,e.enablePagination?(a.enablePagination=e.enablePagination,a.pageSize=e.pageSize):a.maxResultsDisplay=e.maxResultsDisplay,a.dataSourceMetaData=e.dataSourceMetaData,a.parameters=e.parameters,a.columns=e.columns,a.matchPosition=e.matchPosition,a.context=t,a.associationFilter=e.associationFilter,a.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,Dg.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static clearContextedCache(e){delete Dg._searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Dg._searchResultsCache[e]&&(Dg._searchResultsCache[e]={}),Dg._searchResultsCache[e][n]=r):(void 0===Dg._searchResultsCache.persisted&&(Dg._searchResultsCache.persisted={}),Dg._searchResultsCache.persisted[n]=r)}fetchMetaData(e){return Lh.getDataViewMetadata(this.dataSource,e,this.associationFilter)}getData(e){if(this.isQueryable){const t=this.buildSchemaForQueryableDP(e);return Bh.getDataAsync(this.dataSource,this.context,t.dataViewParameters,t.paging,t.query)}return this.fetchNonQueryableResults(e)}memoizedGetData(e){const t=e?.toLowerCase();if(this.enablePagination?t in this.cache&&this.pageNumber in this.cache[t]:t in this.cache)return this.enablePagination?this.cache[t][this.pageNumber]:this.cache[t];const n=this.getData(e);return this.enablePagination?(this.cache[t]=this.cache[t]||{},this.cache[t][this.pageNumber]=n):this.cache[t]=n,n}fetchData(e,t){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e)):Promise.reject()}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e){return this.fetchedNQData?new Promise((t=>t({data:this.filterNonQueryableData(e)}))):this.dataSourceMetaData.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()?new Promise(((t,n)=>{const r=this.buildSchemaForNonQueryableDP();Bh.getDataAsync(this.dataSource,this.context,r.dataViewParameters).then((n=>(this.nonQueryableData=n.data?[...n.data]:[],this.fetchedNQData=!0,t({data:this.filterNonQueryableData(e)})))).catch((e=>n(e)))})):null}filterNonQueryableData(e){const t=this.columns.filter((e=>e.useForSearch)).map((e=>e.value));return this.nonQueryableData.reduce(((n,r)=>(Object.keys(r).every((a=>!(t.includes(a)&&r[a]&&this.positionMatches(r[a],e)&&(n.push({...r}),1)))),n)),[])}positionMatches(e,t){switch(this.matchPosition){case"start":return e.toLowerCase().startsWith(t.toLowerCase());case"contains":return e.toLowerCase().includes(t.toLowerCase());case"equals":return e.toLowerCase()===t.toLowerCase();default:return!1}}buildSelect(){const e=[],t=[];return this.columns.forEach((n=>{if(!t.includes(n.value)){t.push(n.value);const r={field:n.value};e.push(r)}})),e}buildFilters(e){let t={};const n={};this.columns.forEach(((t,r)=>{if(t.useForSearch){const a=`F${r}`,s={field:t.value},o={value:e};let i="CONTAINS";"start"===this.matchPosition?i="STARTS_WITH":"equals"===this.matchPosition&&(i="EQ");const c={...!0===Number.isNaN(parseFloat(e))&&{ignoreCase:"true"},lhs:s,rhs:o,comparator:i};n[a]=c}}));const r=Object.keys(n).join(" OR ");return t={filterConditions:n,logic:r},t}buildQuery(e){return e?{select:this.buildSelect(),filter:this.buildFilters(e),distinctResultsOnly:"true"}:{select:this.buildSelect(),distinctResultsOnly:"true"}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e){return{dataViewParameters:this.parameters,query:this.buildQuery(e),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const xg=Dg,{RESOURCE_TYPES:wg}=V,Mg=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r}=t,a=ds(n),s=`${a.includes("root")?G.APP.ROOT:G.APP.APP}/${Ka.MODAL}`;e.push(Ju(Hu,{containerItemID:n,context:a,target:s,skipReleaseLockRequest:r}))},Lg=e=>iu(".openCaseViewAfterCreate",G.CONTEXT_DATA,e)??!0,jg=e=>/^app\/preview_[0-9]*/g.test(e),Ug=(e,t)=>{const n=ge(e);return!jg(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},Fg=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===G.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0),a.push(Ju(ku,{...e,...r})),Iu.setIn(e,"acName",r.target),await Ta(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,s=ds(a);if(ya(a)){const t=Ae(s),a={data:n,caseViewMode:r,context:t};Iu.setIn(a.data,["context_data","caseViewMode"],r),e.push({type:Pt,payload:{context:t}}),e.push(Ju(Ou,a))}})(a,t,e)},kg=async(e,t,n,r,a,s,o,i)=>{const{isCaseWideAction:c,isInCreateStage:d,containerItemID:l}=e,u=ge(e.context),p=pa(a),h=ua(a),g=d&&!p,f=ps(u)[0],y=f?os(f):u,m=aa(l),I=ds(l),E=Object.freeze({target:e.target,containerItemID:l,context:I,containerName:m});g&&!jg(e.context)?await(async(e,t,n,r,a)=>{((e,t,n)=>{if(t.isProcessAction&&(Mg(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?G.APP.ROOT:G.APP.APP}/${Ka.PRIMARY}`,a=xa(r,Ka.PRIMARY),s={insKey:e.ID,className:e.content.classID,context:a,acTargetName:G.PRIMARY,isChild:!0},o={type:we,payload:{...s}};n.push(o)}})(e.data.caseInfo.parentCaseInfo,t,a),n.resourceType=wg.CASE,n.directUrlUpdation=!0,t.isProcessAction||await(async(e,{translatedDXAPIResponse:t,actionInPayload:n},r)=>{const{caseID:a}=n,s=(o=t,Iu.getIn(o,na.NEXT_ASSIGNMENT_INFO_ID,G.EMPTY_STRING));var o;const i=ua(t),{caseViewMode:c,headers:d,semanticURL:l,actionMgrID:u,directUrlUpdation:p,key:h,flowName:g,resourceType:f}=r;(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:a,assignmentId:s,caseType:i}),Mg(e,{...n,skipReleaseLockRequest:!0});const y=`${n?.containerItemID.includes("root")?G.APP.ROOT:G.APP.APP}/${Ka.PRIMARY}`,m=xa(y,Ka.PRIMARY),I=hd.getCoreHeadersFromContext(n.context)||!1,E=Oa(t,{target:y,context:m,containerItemID:m,caseViewMode:c,headers:d,semanticURL:l,key:h,flowName:g,resourceType:f,directUrlUpdation:p,debugInfo:I&&I.debugInfo&&{debugId:I.debugInfo[G.COREHEADER_APP_DEBUG_ID]}});if(fs(y)){const t=au(m),a=ha({data:t}),[,s]=a?a.split(" "):[],o=`You will lose unsaved changes for ${s}. Do you want to continue?`;if(!Lg(n.context))return e;{const{continueExecution:t}=La(y,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,In.rejectActionByID(u),Yd();e.push(Ju(zu,E))}}else e.push(Ju(Mu,E));return t.directUrlUpdation=p,t.semanticURL=l,await Ta(t,{...E,acName:y},{acName:y,context:m}),e})(a,{translatedDXAPIResponse:r,actionInPayload:t},n)})(i,e,t,a,s):Ug(e.context,y)?await(async(e,t,n,r,a,s,o,i,c)=>{const{headers:d}=c;if(e){const l=fs($s(e));let u=!1;const p=$s(n),h=Ja(p),g=os(p);h?.items?.[g]?.key===c?.actionInPayload?.caseID&&(u=!0),Mg(a,{...r,skipReleaseLockRequest:!0});const f=aa(e),y={target:$s(e),containerItemID:e,context:e,containerName:f};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const m=Ae(n),I=au(m),E=au(r.context),A=I?.caseInfo?.ID,_=E?.caseInfo?.ID;if(l&&A===_||!l&&""===o)a.push(Ju(ku,{...t,key:o,resourceType:"",...y}));else if(s){const s=$s(e),i=rs(s,o);if(i)y.target=s,y.context=i,y.containerItemID=i,a.push(Ju(ku,{...t,key:o,resourceType:"",...y}));else{const e=ps(n)[0];r.target=e,r.context=xa(e,G.WORKAREA,n),r.containerItemID=r.context,a.push(Ju(Mu,{...r,...t}));const s=r.containerItemID;a.push(Ju(Gu,{parentContainerTarget:e,containerItemID:s}))}}if(r.target=$s(e),r.containerName=aa(e),r.context=e,r.containerItemID=e,Iu.setIn(t,"acName",y.target),await Ta(i,t),u){const{data:e,caseViewMode:r}=t;n.includes(G.WORKAREA)&&ya(n)&&(n=Ae(n));const s={data:e,caseViewMode:r,context:n};Iu.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:Pt,payload:{context:n}}),a.push(Ju(Ou,s))}if(!s&&t.caseViewMode===G.PERFORM_MODE){const t=((e,t)=>{const n=$s(e);return rs(n,t)})(e,o),n={data:{caseInfo:{headers:d}},context:t};a.push(Ju(Ou,n)),a.push(An(((e,t=!1,n=!1)=>{const r=In.getNextActionMgrId();return{ID:_u.getProperyValue(V.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:_u.getProperyValue(V.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{Mg(a,r);let e=!1;const o=$s(n),i=Ja(o),d=os(o);if(i?.items?.[d]?.key===c?.actionInPayload?.caseID&&(e=!0),s){const e=ps(n)[0];r.target=e,r.context=xa(e,G.WORKAREA,n),r.containerItemID=r.context,a.push(Ju(Mu,{...r,...t}));const s=r.containerItemID;a.push(Ju(Gu,{parentContainerTarget:e,containerItemID:s}))}if(e){const{data:e,caseViewMode:r}=t,s={data:e,caseViewMode:r,context:n};Iu.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:Pt,payload:{context:n}}),a.push(Ju(Ou,s))}}})(y,t,u,e,s,n,r,a,o):c&&!Ug(e.context,y)?(Mg(s,e),((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,s=ge(r),o=ds(s);e.push(Ju(Nu,{containerItemID:s,context:o,container:Ka.PREVIEW,containerName:Ka.PREVIEW,caseId:a,viewName:V.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(s,e,{caseClassName:h})):await Fg(t,e,a,E,s)},{RESOURCE_TYPES:Vg}=V,Gg=e=>{const t={},{routeKey:n,isModalAction:r,caseID:a,context:s,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:d}=fp(i,{ID:a,caseID:a,viewType:Ca.PAGE});return Z.getPreviewMode()&&(t[G.SKIPCOREHEADERS]=!0),sd(_d(c,{method:d,headers:t},s,{includeRemoteSystemIdIfPresent:!!o})).pipe(kd((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:ba(t.headers)})),Jd(": Error ocurred during ajax call at release lock request : ",s))},{RESOURCE_TYPES:Bg}=V,Hg=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let s=[];return Wd(n.payload).pipe(Vd((e=>((e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:s,reqType:o}=fp("save",{assignmentID:n,actionID:r}),{content:i}=Pa(a),c=t.value.data[a]?.caseInfo?.headers;return sd(_d(s,{method:o,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(kd((t=>({response:t.data,actionInPayload:e,headers:ba(t.headers)}))),Jd(": Error ocurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))})(e,r))),Vd((e=>{if(e&&ia(e.type))return Wd(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?G.APP.ROOT:G.APP.APP}/${Ka.PRIMARY}`,n=xa(t,Ka.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:G.PRIMARY,isChild:!0},a={type:we,payload:{...r}};s.push(a)}let t=!1;const{containerItemID:n}=e&&e.actionInPayload,r=ge(n),a=$s(r),o=Ja(a),i=os(a);if(o?.items?.[i]?.key===e?.actionInPayload?.caseID&&(t=!0),t){const t={context:r,data:{...e.response.data}};s.push(Ju(Ou,t)),s.push(Ju(ku,{context:n}))}return e.actionInPayload.RemoteSystemID=B.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,Gg(e.actionInPayload)})),Vd((async e=>{if(e&&ia(e.type)){const{payload:t}=e,n=Ra({...e,...t,actionMgrID:a});return s.push(n),s}const{actionInPayload:n}=e,{context:r,containerName:o}=n,i={target:Rt(o,r),containerItemID:r,context:r};return t||s.push(Ju(Hu,i)),s})),kd((()=>(ru(s),Ea(s,a),t||(s=[]),s))))},{LOCAL_ACTION_TYPE:Wg}=G,{RESOURCE_TYPES:qg}=V,zg=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:s,openActionType:o}=e,{isProcessAction:i}=t,c=i?yt:(e=>{const t=e.localActionType.toLowerCase();return t===Wg.CASE_WIDE||t===Wg.EXPRESS?mt:ft})(e),d=Ca.FORM,{reqType:l}=fp(c,{caseID:a,ID:r,actionID:n,viewType:d});let{restApi:u}=fp(c,{caseID:a,ID:r,actionID:n,viewType:d});return e.actionType=c===mt?G.CASE:G.ASSIGNMENT,u.includes("viewType=")||(u=u.includes("?")?`${u}&viewType=${d}`:`${u}?viewType=${d}`),sd(_d(u,{method:l,headers:{}},s)).pipe(kd((t=>({response:t.data,actionInPayload:e,headers:ba(t.headers)}))),Jd(`: Error ocurred during ajax call at ${o} Epic : `,s))},Yg=(e,t)=>{const{isProcessAction:n}=t,r=n?yt:ft;let a;if(e.openActionType=r,"modal"===ra(r,e)){a=ps(e.contextName)[0]?ps(e.contextName):$s(e.contextName);const n=a?os(a):e.contextName,r=ds(n);return ps(e.contextName)[0]&&e.continueExecution&&Br(r)?sd([wd(e.saveActionPayload)]).pipe(Vd((e=>(e=>{let t,n=0;const r=[],a={value:nu().getState()};return Wd(e).pipe(Ud(xd),Fd((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!s){const e={type:V.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return In.rejectActionByID(n,!0,e),Wd([])}return Hg({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),Vd((n=>{if(1===n.length&&ia(n[0].type)){const{continueExecution:n}=La(a);if(!n)return In.rejectActionByID(e.actionMgrID),zd.pipe(od((()=>Yd()))).toPromise();if(n)return zg(e,t)}return zg(e,t)})),kd((e=>e))):zg(e,t)}return zg(e,t)},Kg=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:s,openActionType:o,doDeleteCaseSummary:i}=r,c=cg(e),d=ra(o,r),l=Rt(d,a);let u,p,h=!1;!ms(l)||ys(l)&&!ns(l,e.data.caseInfo.ID)||oa(d)?(p=fe(d,a),oa(d)&&(p=Ee(a,p)),u=p,h=!0):(u=ys(l)?rs(l,e.data.caseInfo.ID):os(l),p=ds(u));const g={acName:l,target:l,containerName:d,context:p};await Ta(c,r,g);const f=c.uiResources?.root;let y;y=f?G.PERFORM_MODE:G.REVIEW_MODE;const m=Oa(c,{target:l,context:p,containerItemID:u,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:s,isMinimizable:!1,isInCreateStage:oa(d),resourceType:qg.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});f&&ma(m,c),oa(d)&&delete m.doDeleteCaseSummary,r.openActionType===It&&(m.isBulkAction=!0,m.data.caseInfo.actionButtons.main[0].jsAction="submitBulkAction",m.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",m.data.caseInfo.cases=r.selectedList);const I=h?Mu:ku;if(t.push(Ju(I,m)),h){const a=ps(r.contextName),s=rs(a,e.data.caseInfo.ID);if(s){const e={data:{caseInfo:{headers:n}},context:s};t.push(Ju(Ou,e))}}return u!==os(l)&&t.push(Ju(Gu,{target:l,containerItemID:u})),ya(u)&&Va(m,t),m.caseViewMode===G.REVIEW_MODE&&t.push(Ju(Hu,m)),t};var Xg=Array.isArray,Jg=Object.getPrototypeOf,Qg=Object.prototype,Zg=Object.keys;function ef(e){if(1===e.length){var t=e[0];if(Xg(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Jg(r)===Qg){var n=Zg(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var tf=Array.isArray;function nf(e){return kd((function(t){return function(e,t){return tf(t)?e.apply(void 0,hc([],pc(t))):e(t)}(e,t)}))}var rf=new Fp(Mp),af=rf;function sf(e,t){return void 0===e&&(e=0),void 0===t&&(t=rf),e<0&&(e=0),function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=af);var r=-1;return null!=t&&(Gd(t)?n=t:r=t),new Vc((function(t){var a,s=(a=e)instanceof Date&&!isNaN(a)?+e-n.now():e;s<0&&(s=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())}),s)}))}(e,e,t)}function of(e){return Zc((function(t,n){var r=!1,a=null,s=null,o=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=a;a=null,n.next(e)}};t.subscribe(ed(n,(function(t){null==s||s.unsubscribe(),r=!0,a=t,s=ed(n,o,Tc),Xc(e(t)).subscribe(s)}),(function(){o(),n.complete()}),void 0,(function(){a=s=null})))}))}const cf=e=>{const{context:t}=e;let n={...Pa(t).content,contextData:!1};const r=Ha(t);Iu.isEmpty(r)||(n=Ba(r,n));const{restApi:a,reqType:s}=fp("refreshCaseView",e);return n.interestPage=e.interestPage,sd(_d(a,{method:s,body:n},t)).pipe(kd((t=>({actionInPayload:e,response:t.data,headers:ba(t.headers)}))),Jd(": Error ocurred during ajax call : ",t))},df=[e=>{let t=0,n=[],r="",a=!1;return e.pipe(Ud($u),Qd(100),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>{const{context:n}=e,r=yg(e),s=Rt(r,n),{continueExecution:o,removeActionPayload:i}=(e=>fs(e)?{continueExecution:!0,removeActionPayload:{}}:La(e))(s);return a=Aa(e.class),o?(e.isTraditionalUICase=a,((e,t)=>{const{class:n,context:r,viewType:a=Ca.PAGE}=e,{removeActionPayload:s}=t;let o=e?.pageName?e?.pageName:ee.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),sd(Pg.createCase(n,{...e,pageName:o,viewType:a,context:r})).pipe(kd((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:s}))),Jd("Error ocurred during ajax call at createWork Epic : ",r))})(e,{removeActionPayload:i})):(In.rejectActionByID(t),Yd())})),Vd((async e=>{if(e&&e.type===Be)return e.payload.context=js(),n.push(Ra(e)),n;const{actionInPayload:s,response:o,headers:i,removeActionPayload:c}=e;let d;d=!(s.renderInline||ee.getDefaultCasePage()||a)&&mg(o),Iu.setIn(o.data,"caseInfo.isFirstAssignment",!0);const l=yg({...s,isInCreateStage:d}),u=Rt(l,s.context),p=xa(u,l,s.context);if(!oa(l)&&fs(u)){const{continueExecution:e}=La(u);if(!e)return In.rejectActionByID(t),Yd()}if(!(s?.openCaseViewAfterCreate??1)&&!d){const e=Iu.getIn(o.data,"caseInfo.content");r=`${e.pyID} ${se.getLocaleValue("has been created.","Assignment")}`;const t=ga(o),a=ua(o);return(e=>{ea.publish(G.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)})({toastMessage:r}),(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:`${e.pyID}`,assignmentId:t,caseType:a}),n}const h=cg(o);let g=hp("createWork",{caseClassName:ua(h)});g=g.replace(/{.+?}/,la(ha(h))),h.semanticURL=g,((e,t)=>{const n=mg(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t;Iu.setIn(e,["directUrlUpdation"],(!n||a)&&!r)})(h,s);const f={acName:u,context:p};await Ta(h,s,f);const y={target:u,context:p,containerItemID:p,headers:i,semanticURL:g,isInCreateStage:d,isMinimizable:d,caseViewMode:h.confirmationNote?G.REVIEW_MODE:G.PERFORM_MODE,assignmentContext:Iu.getIn(h,"nextAssignmentInfo.context"),nextAssignmentInfo:Iu.getIn(h,"nextAssignmentInfo"),resourceType:V.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo};ma(y,h);const m=Oa(h,y);a&&(m.data.caseInfo.content.coexistenceAction="openAssignment");const I=Da(u,m);return wa(I)&&fa(n,{removeActionPayload:c,target:u}),n.push(I),Fa(n),n})),kd((()=>{const e=_a(),s=ln(Iu.getIn(n[0]?.payload,"data.caseInfo"));return a&&e&&s?fg.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Ga,n):Ga(n),Ea(n,t),r="",n=[],n})))},e=>{let t=0,n=[];const r=[];let a=!1,s=!1;return e.pipe(Ud(Rd),kd((e=>(({actionMgrID:t}=e.payload),{...e.payload,insKey:e.payload.assignmentID}))),Vd((e=>{a=e.isGetNextWork;const{context:n}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Ca.FORM:Tg(e),e.viewType=r;const o=ra(pt,e),i=Rt(o,n),{activate:c,activateContainerActionPayload:d}=Ua(vg.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return Wd({type:et,activateContainerActionPayload:d,actionInPayload:e});const{continueExecution:l,removeActionPayload:u}=d?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:La(i);return l?(s=Aa(e.className),e.isTraditionalUICase=s,((e,t)=>{const n=Tg(e),{headers:r,context:a,assignmentID:s,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:d,caseID:l,jsActionQueryParams:u,isLastStepInCreateStage:p}=e,{restApi:h,reqType:g}=o?fp("getNextWork",{viewType:n}):c?fp("openStage",{caseID:l,stageID:d}):fp(pt,{assignmentID:s,viewType:n}),{removeActionPayload:f}=t,y=ee.getDefaultCasePage();let m,I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),m=y?`${h}?viewType=${n}&pageName=${y}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,u&&Object.keys(u).forEach((e=>{m+=`&${e}=${u[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=ba(t,e.remoteClassName)),t})(e);return sd(Ng(m,g,E,i,a,o,"404")).pipe(kd((e=>ee.isCoexistenceAppOfType(G.APP_TYPE.UIKIT)&&!p?ln(e.data.data.caseInfo)?e:(m=m.replaceAll(I,"pyDetails"),ee.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:m}):e)),Vd((e=>e?.isReloadWithDifferentViewTypeRequired?Ng(m,g,E,i,a,o,"404"):Wd(e))),kd((t=>{const{key:a,flowName:o}=va(s);return{response:{...t.data,key:a,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:ba({...r,...t.headers})}})),Jd("Error ocurred during ajax call at openAssignment Epic : ",a))})(e,{removeActionPayload:u})):(In.rejectActionByID(t),Yd())})),Vd((async e=>{if(e?.type===Be){if(a){const{payload:t}=e,{err:n}=t,a=n.response.status;r.push({status:Number(a)})}return n.push(Ra(e)),n}const{type:t,actionInPayload:o,response:i,viewType:c,headers:d,removeActionPayload:l,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Rd,r=i?.data?.caseInfo?.ID;o.isOpenStage=!0,o.stageID=e,o.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...o,caseID:r,headers:d}};return n.push(a),n}const{context:p,caseViewMode:h,debugInfo:g}=o;let f=((e,t)=>{const n=da(e);let r;r=!ee.getDefaultCasePage()&&ln(n);const{isChild:a,containerName:s}=t,o=a&&r,i=r&&!t.isActionFromToDoList;return o||i?G.MODAL:s||ra(pt,t)})(i,o);s=Aa(i?.data?.caseInfo?.caseTypeID),o.isTraditionalUICase=s,s&&(f=o.containerName);const y=Rt(f,p);if(t===et)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:a,isParallelAssignment:s,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:d=!1}=c,l=ds(a);await Ta({directUrlUpdation:!d,semanticURL:r},c,{acName:i,target:i,context:l}),e.push(Ju(Gu,{containerItemID:a,target:i,isParallelAssignment:s,insKey:o,resourceType:Og.CASE,context:l,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(n,u,{actionInPayload:o,target:y}),Fa(n),n;const m=cg(i);((e,t)=>{const n=da(e),r=ha(e),a=ln(n),{skipBrowserSemanticUrlUpdate:s=!1,viewType:o,isTraditionalUICase:i}=t,c=o===Ca.PAGE&&(!a||i)&&!s,{caseTypeID:d}=n;if(c){const t=hp(ut,{caseClassName:d}).replace(/{.+?}/,la(r));e.semanticURL=t,e.directUrlUpdation=!0}})(m,o);const I=xa(y,f,p),E={acName:y,target:y,context:I};await Ta(m,o,E);const A={target:y,context:I,containerItemID:I,headers:d,isMinimizable:ln(Iu.getIn(m,"data.caseInfo")),doDeleteCaseSummary:o.doDeleteCaseSummary,acTertiary:o.acTertiary,resourceType:V.CASE,debugInfo:g};ma(A,m,{skipFlowNameUpdate:o?.caseViewMode===G.REVIEW_MODE});const _=Oa(m,A);return o.isProcessAction&&(_.data.isProcessAction=o.isProcessAction),s&&(_.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(o,_),((e,t,n,r,a,s,o)=>{fs(t)&&ms(t)?((e,t,n,r,a)=>{Tg(e,t)===Ca.FORM?(n.caseViewMode=r||G.PERFORM_MODE,a.push(Ju(ku,n))):a.push(Ju(zu,n))})(r,a,e,s,n):((e,t,n,r,a)=>{if(fa(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=os(t);let r=null;return n&&(r=Qa(t,n)),r?.key===e&&ys(t)})(r.key,n))r.context=ls(n),r.containerItemID=r.context,e.push(Ju(zu,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=$s(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(Ju(zu,r))}else{const t=$s(r.context),n=rs(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(Ju(zu,r))):e.push(Ju(Mu,r))}})(n,o,t,e,r)})(_,y,n,o,i,h,l),c===Ca.FORM&&ya(_.containerItemID)&&Va(_,n),Fa(n),(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:o.assignmentID,caseKey:_.key}),n})),kd((()=>{const e=t,a=_a(),o=ln(Iu.getIn(n[0]?.payload,"data.caseInfo"));return s&&a&&o?fg.postCreateCaseMessage(n[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,ru,n):ru(n),Ea(n,e,r),n[0]?.payload?.isParallelAssignment&&ru({type:Rd,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n})))},e=>{let t=0,n=[];return e.pipe(Ud("OPEN_WORK_BY_HANDLE"),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>{const{context:n,isChild:r,viewType:a}=e,s=ra(ut,e),o=Rt(s,n);let i,c=!0;if("none"!==a){const e=La(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return In.rejectActionByID(t),Yd();const{activate:d,activateContainerActionPayload:l}=Ua(Rg.CASE,o,e);return d&&!r&&"none"!==a?Wd({type:et,activateContainerActionPayload:l,actionInPayload:e}):((e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:s,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:ee.getDefaultCasePage(),d=fp(ut,{caseID:n,params:{pageName:c}});let{restApi:l}=d;const{reqType:u}=d;return"none"===o&&(l=`${l.split("viewType")[0]}viewType=none`),sd(_d(l,{method:u,headers:{...r,...s&&{...hd.addDebugHeaders(s)}}},a)).pipe(kd((t=>({response:t.data,actionInPayload:e,headers:ba({...r,...t.headers}),removeActionPayload:i}))),Jd("Error ocurred during ajax call at openWorkByHandle Epic : ",a))})(e,{removeActionPayload:i})})),Vd((async e=>{if(e&&ia(e.type))return n.push(Ra(e)),n;const t=au(e?.actionInPayload?.context),r=Aa(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t={data:{...cg(e?.response)?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:Pt,payload:{context:t.context,doDeleteConfirmationDetails:!1}}),r&&(t.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(Ju(Ou,t));const a=$s(e?.actionInPayload?.context),s=aa(e?.actionInPayload?.context),o=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if(ya(e?.actionInPayload?.context)){const t=Oa(e?.response,{...o});Va({...t,isArrayDeepMerge:!0},n)}}}else await(async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:s,response:o,removeActionPayload:i,headers:c}=e,{context:d,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=ra(ut,r),h=Rt(p,d);if(s===et)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:s,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=ra(ut,a),d=Rt(c,s),l=ds(r);await Ta({directUrlUpdation:!o,semanticURL:n},a,{acName:d,containerName:c,target:d,context:l}),e.push(Ju(Gu,{containerItemID:r,target:d,context:l,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const e=xa(h,p,d,{buildNew:!0}),a=cg(o),s=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=ha(e),s=n?r:ua(e);let o=hp(ut,{caseClassName:s});return o=o&&o.replace("{workID}",la(a)),o})(a,r);a.semanticURL=s,a.directUrlUpdation=!l;const g={acName:h,context:e};await Ta(a,r,g);const f=Oa(a,{target:h,context:e,containerItemID:e,semanticURL:s,headers:c,debugInfo:u});f.caseViewMode=G.REVIEW_MODE,f.resourceType=Rg.CASE,n&&(f.data.caseInfo.content.coexistenceAction="openWorkByHandle"),ma(f,a,{skipFlowNameUpdate:!0});const y=Da(h,f);i.containerItemID&&wa(y)&&t.push(Ju(Hu,{containerItemID:i.containerItemID,target:h})),t.push(y)}Fa(t),(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)})({caseKey:r.insKey,actionInContext:d})})(e,n,r);return n})),kd((()=>(ru(n),Ea(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ud("OPEN_LOCAL_ACTION"),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>((e,t)=>Yg(e,t))(e,{actionMgrID:t}))),Vd((async e=>{if(!e)return zd;if(ia(e.type)){const t=Ra(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return Iu.setIn(a,"data.caseInfo.activeActionID",s),Iu.setIn(a.data,G.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&Iu.setIn(a.data,G.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await Kg(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),ea.unsubscribe(G.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,"expressLocalActionSubmit")},ea.subscribe(G.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,"expressLocalActionSubmit"))})(t),n})),kd((()=>(ru(n),Ea(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ud("OPEN_BULK_ACTION"),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=It;const a=ra(It,e),s=Rt(a,n),{continueExecution:o}=La(s);return o?(e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:s="",bulkContextType:o=""}=e,{reqType:i,restApi:c}=fp("openBulkAction",{caseTypeID:a,actionID:t,bulkContextID:s,bulkContextType:o});return sd(_d(c,{method:i},n)).pipe(kd((t=>({response:t.data,actionInPayload:e,headers:ba(t.headers)}))),Jd(`: Error ocurred during ajax call at ${r} Epic : `,n))})(e):(In.rejectActionByID(r),Yd())})(e,{actionMgrID:t}))),Vd((async e=>{if(e&&ia(e.type)){const t=Ra(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return Iu.setIn(a,"data.caseInfo.activeActionID",s),await Kg(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),ea.unsubscribe(G.PUB_SUB_EVENTS.EVENT_BULKACTION,"bulkActionSubmit")},ea.subscribe(G.PUB_SUB_EVENTS.EVENT_BULKACTION,n,"bulkActionSubmit"))})(t),n})),kd((()=>(1===n.length&&ia(n[0].type)?In.rejectActionByID(t):In.resolveActionByID(t),ru(n),n=[],n))))},e=>{let t,n=0,r=[],a="";return e.pipe(Ud("SUBMIT_BULK_ACTION"),Fd((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const e={type:V.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return In.rejectActionByID(n,!0,e),Wd([])}return Wd(e.payload).pipe(Vd((e=>(t=e,(e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:s}=Pa(n,{nonEmptyAndChangedData:!0});let o=5;try{sl.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults")?.find((e=>e.pyClassName===a))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,{reqType:d,restApi:l}=fp("performBulkAction",{actionID:t}),u=[],p=i.length;for(let t=0;t<p;t+=c)s.cases=i.slice(t,t+c),s.cases.length&&u.push(sd(_d(l,{method:d,body:s},n)).pipe(kd((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:ba({...r})}})),Jd("Error ocurred during ajax call at submitbulkaction Epic : ",n)));return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return mc(Bd(e))?e.pop():void 0}(e),r=ef(e),a=r.args,s=r.keys,o=new Vc((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Xc(a[t]).subscribe(ed(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(s?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(s,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(nf(n)):o}(u)})(t)))),Vd((e=>{let n=0,s=0;const o=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),s+=Number(t.failureCount),s&&t.results.map((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),a=`${n} record(s) updated`,(e=>{ea.publish(G.PUB_SUB_EVENTS.EVENT_BULKACTION,e)})({submitResponse:e}),t.target=`${G.APP.APP}/${Ka.MODAL}`,r.push(Ju(Hu,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),s&&r.push(Ju(Bu,{messages:[{type:"error",message:`${s} records failed to update`,errorDetails:o,showHeader:!1}],context:ge(c)||c,category:"HTTP",showHeader:!1})),r})),kd((()=>(In.resolveActionByID(n,a),ru(r),r=[],r))))})))},e=>{let t=0,n=[];return e.pipe(Ud(vd),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>(Gn(e.context),((e,t)=>Yg(e,t))(e,{actionMgrID:t,isProcessAction:!0})))),Vd((async e=>{if(e&&ia(e.type)){const t=Ra(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await Kg(a,n,{headers:r,actionInPayload:t}),n})),kd((()=>(Ga(n),Ea(n,t),n=[],n))))},(e,t)=>{let n=0,r=[],a="",s="";return e.pipe(Ud("FINISH_ASSIGNMENT"),Fd((e=>{const o=ee.isCoexistenceAppOfType(G.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),s=e.payload.context,!vr(s)){const t={type:V.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return In.rejectActionByID(n,!0,t),el.handleDeferredActionCompletion(e.payload.context),Wd([])}return Un({context:s,stateObj:au(s),clearContextMessages:!0}),Wd(e.payload).pipe(Vd((e=>(((e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:s,isModalAction:o}=t;if(s&&o){const t=aa(n),s=Rt(t,r);e.push(Ju(Gu,{containerItemID:n,target:s,actionMgrID:a}))}})(r,e),((e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:s,additionalHeaders:o={},isCaseWideAction:i,outcome:c}=e,{state$:d}=t,l=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r}=e;return t&&r?Ca.PAGE:n||Ca.FORM})(e),u=(e=>{const{isCaseWideAction:t}=e;return t?mt:"finishAssignment"})(e),p={assignmentID:n,actionID:r,caseID:a,viewType:l};let{restApi:h}=fp(u,p),{reqType:g}=fp(u,p);l&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${l}`:`${h}?viewType=${l}`),c&&!h.includes("outcome")&&(h=h.includes("?")?`${h}&outcome=${c}`:`${h}?outcome=${c}`),i&&(g="PATCH"),e.viewType=l;const{content:f,attachmentsExist:y}=Pa(s);e.attachmentsExist=y;const m=d.value.data[s]?.caseInfo?.headers||{},{etag:I}=m,E={"if-match":I,...o};return sd(_d(h,{method:g,body:f,headers:E},s)).pipe(kd((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:ba({...E,...r})}})),Jd("Error ocurred during ajax call at finishAssignment Epic : ",s))})({...e},{state$:t})))),Vd((async e=>{if(e&&e.type===Be){const t=Ra(e);return r.push(t),r}xg.clearContextedCache(s);const{headers:t,actionInPayload:i,response:c}=e,{containerItemID:d,context:l=ds(d),isModalAction:u,isInCreateStage:p}=i,h=$s(d);i.target=h;const g=aa(d),f=Object.freeze({target:i.target,containerItemID:d,context:l,containerName:g});Iu.setIn(c.data,"caseInfo.isFirstAssignment",!1),Iu.setIn(c.data,G.CASE_INFO_IS_LOCAL_ACTION,!1),c?.uiResources?.root?.config?.name&&"page"!==i.viewType&&Iu.setIn(c.data,"caseInfo.content.pyViewName",c?.uiResources?.root?.config?.name),(e=>{ea.publish(G.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)})({submitResponse:c});let y=cg(c,{[V.STOPMERGEACTIONS]:!c.nextAssignmentInfo});const m=ua(y),I=ge(i.context),E=ps(I)[0]?os(ps(I)[0]):I,A=pa(y),_=p&&!A;!u||p||Ug(i.context,E)||(y=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(y,au(d)));const S=Oa(y,{headers:t,actionMgrID:n,directUrlUpdation:!1});let C,$;Ia(S.data,i),S.caseClassName=m,S.resourceType=Vg.ASSIGNMENT,S.headers=t;const b=y?.data?.caseInfo?.assignments?.some((e=>e.ID===i.assignmentID)),P=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(y,i),O=((e,t,n,r,a)=>{let s;const o=$s(t);return s=ys(o)?rs(o,n.data.caseInfo.ID):os(o),r&&e&&cu(null,G.CASE_VIEW_MODE_PROP,s)===G.PERFORM_MODE&&a})(b,E,y,u,P),T=i?.actionID===V.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;y?.data?.nextAssignmentInfo&&!T?(S.caseViewMode=G.PERFORM_MODE,C=ha(y),$=!0):O&&!T?(S.caseViewMode=G.PERFORM_MODE,C=ha(y),S.flowName=" ",S.deleteAssignmentSpecificResources=!1,$=!1):(S.caseViewMode=G.REVIEW_MODE,C="",$=!1);const N=ha(y);ma(S,y,{skipFlowNameUpdate:S?.caseViewMode===G.REVIEW_MODE||O});const v=hp("createWork",{caseClassName:m}).replace(/{.+?}/,la(N));var R;if(y.semanticURL=v,S.semanticURL=v,u?(await kg(i,S,$,C,y,r,e,c),_&&(a=Lg((R=i).context)?"":R.businessID?`${R.businessID} ${se.getLocaleValue("has been created.","Assignment")}`:`${R.workID} ${se.getLocaleValue("has been created.","Assignment")}`)):p&&o&&!A?(ee.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Ka.PRIMARY,targetContainerName:Ka.PRIMARY,viewType:Ca.PAGE,isLastStepInCreateStage:!0,context:n},a={type:Ue,payload:{...r}};t.push(a)})(c,r,ge(l))):await Fg(S,i,y,f,r),el.handleDeferredActionCompletion(s),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:s}=t,o=Ug(t.context,n);ta({caseID:s,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:a,stages:e?.data?.caseInfo?.stages||[]})})(S,i,E),!y?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:ha(e),assignmentID:n?null:r,actionID:n?a:null}})(y,i);(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:d})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===rt));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=Wu({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)})(r,{transientItemID:d,target:h,isModalAction:u}),r})),kd((()=>{const e=r.find((e=>e.type===Be));return e?(el.handleDeferredActionCompletion(s),(e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[G.ERROR_FIELD_IN_PAGE]=e[G.ERROR_FIELD_IN_PAGE].replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[G.ERROR_FIELD_IN_PAGE].slice(1),r=e[G.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(r){let a=t?`caseInfo.content.${t}`:"caseInfo.content";a=a.replace(/\(/g,"[").replace(/\)/g,"]");const s=wn(r,a,G.PROPERTY),o={type:V.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};Dn.mutateField(n,a,s[s.length-1],{messages:[o],type:V.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:s[s.length-1]})}}))})(e),In.rejectActionByID(n)):In.resolveActionByID(n,a),Ga(r),r=[],a="",r})))})))},(e,t)=>{let n=0,r=[];return e.pipe(Ud("NAVIGATE_TO_STEP"),Fd((e=>(({actionMgrID:n}=e.payload),Wd(e.payload).pipe(Vd((e=>(Gn(e.context),((e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:s=ds(a),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?Ca.PAGE:Ca.FORM},{restApi:d,reqType:l}=fp("navigateToStep",c),{content:u}=Pa(s),p=i.value.data[s].caseInfo.headers;return sd(_d(`${d}`,{method:l,body:u,headers:{"if-match":p&&p.etag}},s)).pipe(kd((t=>({response:t.data,actionInPayload:e,headers:ba({...p,...t.headers})}))),Jd("Error ocurred during ajax call at navigateToStep Epic : ",s))})(e,{state$:t})))),Vd((async e=>{if(e&&ia(e.type))return r.push(Ra(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:s,context:o=ds(s),isModalAction:i}=t;xg.clearContextedCache(t.context);const c=$s(s),d=aa(s),l=Object.freeze({target:c,containerItemID:s,context:o,containerName:d}),u=cg(n),p={acName:c,...l};await Ta(u,t,p);const h=Oa(u,{...l,headers:a});h.doDeleteCaseSummary=t.doDeleteCaseSummary,h.resourceType=Bg.ASSIGNMENT,ma(h,u),Ia(h.data,t);const g=u.data.caseInfo.stages;return ta({caseID:ha(u),isModalAction:i,stages:g}),ya(s)&&Va(h,r),r.push(Ju(ku,h)),Fa(r),r})),kd((()=>(ru(r),Ea(r,n),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(Ud("CANCEL_ASSIGNMENT"),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>{const{isModalAction:n}=e;e.context||(e.context=ds(e.containerItemID));const{context:r}=e,a=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?Ka.MODAL:aa(n)})(e),s=Rt(a,r),{continueExecution:o}=La(s);return o?(e.RemoteSystemID=B.getRemoteHeaderByContext(e.context)??void 0,((e,t)=>{const{isModalAction:n}=t;return Gg({routeKey:"cancelAssignment",isModalAction:n,...e})})(e,{isModalAction:n})):(In.rejectActionByID(t),Yd())})),Vd((async e=>{if(e&&e.type===Be)return n.push(Ra(e)),n;const{actionInPayload:r,response:a}=e,{containerItemID:s,isModalAction:o,isInCreateStage:i}=r,c=$s(s),d=ds(s),l={target:o?`${G.APP.APP}/${G.MODAL}`:c,containerItemID:s,caseViewMode:o?G.PERFORM_MODE:G.REVIEW_MODE,context:d,actionMgrID:t,key:ha(a)};return i&&n.push(Ju(ku,l)),!o&&ya(s)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r}=t,a=ge(n),s={context:ds(a),data:{context_data:{caseViewMode:r}}};e.push(Ju(Ou,s))})(n,{childContainerItemID:s,caseViewMode:G.REVIEW_MODE}),l.skipReleaseLockRequest=!0,n.push(Ju(Hu,l)),n})),kd((()=>(ru(n),Ea(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ud(ze,rt),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:s}=e;return t!==r||!n||a||s?Wd([]):Gg(e)})),Vd((e=>(e&&ia(e.type)&&n.push(Ra(e)),n))),kd((()=>(ru(n),Ea(n,t),n=[],n))))},(e,t)=>{let n,r=0;return e.pipe(Ud(xd),Fd((e=>{const{saveOnly:a}=e.payload;return({actionMgrID:r,caseType:n}=e.payload),Hg({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},(e,t)=>{let n,r=0,a=[];return e.pipe(Ud(Dd),kd((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),Vd((e=>e.ignoreCaseDeletion?Wd({actionInPayload:e}):(e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=fp("deleteCaseInCreateStage",{ID:t});return sd(_d(r,{method:a},n)).pipe(kd((t=>({response:t.data,actionInPayload:e,headers:ba(t.headers)}))),Jd(": Error ocurred during ajax call at deleteCaseInCreateStage Epic : ",n))})(e))),Vd((async e=>{if(e&&ia(e.type)){const{payload:t}=e,n=Ra({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:s,isModalAction:o}=n,i=o?Ka.MODAL:Ka.PRIMARY,c=Rt(i,s);if(!o){const e={acName:c,target:c,context:s},r=t.value.containers[c],{semanticURL:a}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await Ta({directUrlUpdation:!0,semanticURL:a},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:G.PRIMARY,isChild:!0},t={type:we,payload:{...e}};a.push(t)}const d={target:c,containerItemID:s,context:s,caseDeleted:!0};return a.push(Ju(Hu,d)),a})),kd((()=>(ru(a),Ea(a,r)===G.PROMISE_VALUE.RESOLVE&&(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)})({caseType:n}),a=[],a))))},e=>e.pipe(Ud(gt),of((()=>sf(100))),kd((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:s,skipReleaseLockRequest:o}=e.payload;return In.resolveActionByID(t),ea.publish(G.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:s,skipReleaseLockRequest:o}),[]}))),e=>e.pipe(Ud(at),of((()=>sf(100))),kd((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,s=Rt(r,n);return In.resolveActionByID(t),ru(Ju(Gu,{containerItemID:a,target:s,doDeleteCaseSummary:!1})),[]}))),e=>{let t=0,n=[],r="";return e.pipe(Ud(Tt),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>cf(e))),Vd((async e=>{if(e&&e.type===Be)return n.push(Ra(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a}=e,s=t.containerName,o=Rt(s,t.context);let i=xa(o,s,t.context);i=Ee(t.context,i);const c=cg(a);c.key=t.ID,c.data.caseInfo.ID=t.ID;const d={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};c.uiResources.context_data.modalView=d;const l=au(t.context)?.context_data?.caseInfo,u=Mn(l,t.targetProperty.slice(1),t.index);c.uiResources.context_data.caseInfo=u;const p={acName:o,context:i};await Ta(c,t,p);const h=Oa(c,{target:o,context:i,containerItemID:i});h.resourceStatus=t.actionType,h.isMultiRecordData=!0,h.parentContext=t.context;const g=Da(o,h);return r=i,n.push(g),Fa(n),{actionsOut:n,actionInPayload:t}})),kd((({actionInPayload:e})=>(ca(n)?In.rejectActionByID(t):In.resolveActionByID(t),ru(n),n=[],e.skipPageInstructions||((e,t,n,r,a)=>{a===G.RESOURCE_STATUS.CREATE&&(fr.isStateMachineExist(e,t,n)||fr.setStateMachine(e,n,t,new qn(n,t,e)),fr.getStateMachine(e,t,n).insert({},r+1,!0,{isDefault:!0}))})(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},e=>{let t,n="",r=[];return e.pipe(Ud(Nt),Fd((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:V.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return In.rejectActionByID(n,!0,e),Wd([])}return Wd(e.payload).pipe(Vd((e=>(t=e,cf(t)))),Vd((async e=>{if(e&&e.type===Be){const t=Ra(e);return r.push(t),r}const{containerItemID:n,context:a}=t;var s,o,i,c;return s=a,o=t.parentContext,i=V.CASE_INFO.CASE_INFO_CONTENT,c=!1,er(s).forEach((e=>{const t=Iu.convertClipboardPageToPageRefNotation(e.target);fr.isStateMachineExist(o,i,t)||fr.setStateMachine(o,t,i,new qn(t,i,o));const n=fr.getStateMachine(o,i,t);switch(e.instruction.toLowerCase()){case"insert":n.insert(e.content,e.listIndex,c,{});break;case"update":n.update(e.content,e.listIndex,c,{});break;case"delete":e.listIndex?n.delete(e.listIndex,c):n.deletePage();break;case"replace":n.replacePage(e.content);break;case"move":n.move(e.listIndex,e.listMoveToIndex);break;case"delete all":n.deleteAll()}})),r.push(Ju(Hu,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),kd((()=>{if(ca(r))In.rejectActionByID(n);else{In.resolveActionByID(n);const{pageReference:r}=e.payload;if(_u.getProperyValue(G.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=_u.getProperyValue(V.CASE_INFO.CASE_INFO_ID,r,t.parentContext),n=_u.getProperyValue(G.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),a=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),s=a.replace(G.CASE_INFO.CASE_INFO_CONTENT,"");Sn(e,n,t.parentContext,s,{})}else bn(t.parentContext,"caseInfo.content",{})}return ru(r),r=[],r})))})))}],lf=df;function uf(){return Zc((function(e,t){e.subscribe(ed(t,Tc))}))}const{RESOURCE_TYPES:pf}=V,hf=[e=>e.pipe(Ud(be),kd((e=>e.payload)),Vd((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID},n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(B.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=B.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=fp("loadView",t);return e.viewContext===pf.PAGE&&({restApi:r,reqType:a}=fp(it,{page:e.viewName,pageClass:e.pageClass})),sd(_d(r,{method:a,headers:n},e.context)).pipe(kd((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:ba(t.headers),rootView:Iu.getIn(r,G.ROOT)}})),Jd(": Error ocurred during ajax call at loadView Epic : ",e.context))})),Vd((async e=>{const t={};if(e?.type===Be)return t.actionsOut=Ra(e),t;try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e,{containerItemID:s,container:o,updateData:i}=n,c=o||Qr.getTargetViewContainerName(it),d=Rt(c,n.context),l=o===Ka.PREVIEW&&i?n.context:xa(d,c,n.context,{buildNew:!!o});n.context=l;const u={acName:d,context:l};let p={};p=o===Ka.PREVIEW?cg(r):cg(r,{[V.STOPMERGEACTIONS]:!0,[V.ACTIONS.DELETEAVIALACTIONS]:!0}),p.directUrlUpdation=!1,await Ta(p,n,u);const h={...n,target:d,context:l,containerItemID:s||l,headers:a},g=Oa(p,h);if(g.resourceType=pf.CASE,o&&!i){g.caseViewMode=G.REVIEW_MODE,g.caseViewMode=G.REVIEW_MODE;const e=$s(g?.context);((e,t,n,r,a)=>{e?(r.actionsOut=[],r.actionsOut.push(Ju(Gu,{target:t,containerItemID:e}))):r.actionsOut=Ju(Mu,{...n,container:a})})(rs(e,g.key),e,g,t,o)}else g.preserveClientChanges=!0,t.actionsOut=[],t.actionsOut.push({type:Pt,payload:{context:l}}),t.actionsOut.push(Ju(Ou,g))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{ea.publish(G.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),kd((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(In.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(Ud(Pe),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>{const{debugInfo:n,context:r,viewName:a,className:s,skipSemanticUrl:o=!1,containerName:i=Qr.getTargetViewContainerName(it)}=e,c=n&&{...hd.addDebugHeaders(n)},d=Rt(i,r);let l="",u={},p=!0;if(!o){if(l=hp(it,{page:a}),d&&l){const{activate:t,activateContainerActionPayload:n}=Ua(pf.PAGE,d,{semanticURL:l});if(t)return Wd({type:et,activateContainerActionPayload:n,actionConfig:e})}if(os(d)&&({continueExecution:p,removeActionPayload:u}=La(d)),!p)return In.rejectActionByID(t),Yd()}const{restApi:h,reqType:g}=fp(it,{page:a,pageClass:s});return sd(_d(h,{method:g,headers:c},r)).pipe(kd((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:l,semanticURL:l},actionConfig:e,headers:ba(t.headers),removeActionPayload:u,skipSemanticUrl:o}})),Jd(": Error ocurred during ajax call at showPage Epic : ",e.context))})),Vd((async e=>{if(e&&e.type===Be)return n.push(Ra(e)),n;const{type:t,actionConfig:r,skipSemanticUrl:a}=e,s=r.containerName||Qr.getTargetViewContainerName(Pe),o=Rt(s,r.context);if(ea.publish(V.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t===et){const{activateContainerActionPayload:{semanticURL:t,containerItemID:a}}=e,s={acName:o,context:ds(a)};await Ta({directUrlUpdation:!0,semanticURL:t},r,s,!0),n.push(Ju(Gu,{target:o,containerItemID:a}))}else{const t=xa(o,s,r.context),{response:i,headers:c={},removeActionPayload:d}=e,l=cg(i,{isCreateDataObject:r.isCreateDataObject});l.directUrlUpdation=!a;const u={acName:o,context:t};await Ta(l,r,u);const p={target:o,context:t,containerItemID:t,headers:c,debugInfo:r.debugInfo},h=Oa(l,p);h.resourceType=V.PAGE,r.isCreateDataObject&&(h.resourceType=V.RESOURCE_TYPES.DATA,h.resourceStatus=V.RESOURCE_STATUS.CREATE,delete h.data.caseInfo);const g=Da(o,h);d.containerItemID&&wa(g)&&n.push(Ju(Hu,{containerItemID:d.containerItemID,target:o})),n.push(g),Fa(n)}return ea.publish(V.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),kd((()=>{In.resolveActionByID(t),ru(n),n=[]})),uf())}],gf=hf,{RESOURCE_TYPES:ff}=V,yf=[e=>{let t,n=0,r=[];return e.pipe(Ud(Oe),Fd((e=>(({actionMgrID:n}=e.payload),Wd(e.payload).pipe(Vd((e=>((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,skipSemanticUrl:o=!1,isDeferLoaded:i=!1}=e;let{containerName:c}=e;c||(c=Qr.getTargetViewContainerName(Pe));const d=Rt(c,n);let l="",u={},p=!1;if(!o){l=hp(ct,{pageName:r,dataViewName:a},s);const{activate:n,activateContainerActionPayload:o}=Ua(ff.PAGE,d,{semanticURL:l});if(n)return Wd({type:et,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:p,removeActionPayload:u}=La(d)),!p)return In.rejectActionByID(t),Yd()}return((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:o,skipSemanticUrl:i}=e,{removeActionPayload:c}=t,{restApi:d,reqType:l,body:u}=fp(ct,{pageName:r,dataContext:a,dataContextParameters:s});return sd(_d(d,{method:l,body:u},n)).pipe(kd((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:ba(t.headers),removeActionPayload:c,skipSemanticUrl:i}))),Jd("Error ocurred during ajax call at showData Epic : ",e.context))})({context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:l,skipSemanticUrl:o,containerName:c,isDeferLoaded:i},{removeActionPayload:u})})(e,n))),Vd((async e=>{if(e&&e.type===Be)return r.push(Ra(e)),r;const{type:n,actionConfig:a,headers:s,response:o,skipSemanticUrl:i}=e;t=Iu.getIn(o,G.ROOT);const{containerName:c}=a,d=Rt(c,a.context);let l;if(a.isDeferLoaded){l=cg(o),l.directUrlUpdation=!i;const t={acName:d,context:a.context};await Ta(l,a,t);const n={target:d,headers:s,context:a.context,containerItemID:e.containerItemID},c=Oa(l,n);return r=Ju(Ou,c),r}if(n===et){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,s={acName:d,context:ds(n)};await Ta({directUrlUpdation:!0,semanticURL:t},a,s,!0),r.push(Ju(Gu,{target:d,containerItemID:n,resourceType:ff.DATA}))}else{const t=xa(d,c,a.context),{removeActionPayload:n}=e;l=cg(o),l.directUrlUpdation=!i;const u={acName:d,context:t};await Ta(l,a,u);const p=Oa(l,{target:d,context:t,containerItemID:t,headers:s});p.resourceType=ff.DATA;const h=Da(d,p);n.containerItemID&&wa(h)&&r.push(Ju(Hu,{containerItemID:n.containerItemID,target:d})),r.push(h),Fa(r)}return r})),kd((()=>(In.resolveActionByID(n,t),ru(r),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(Ud("CREATE_DATA_OBJECT"),Qd(100),Fd((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:V.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return In.rejectActionByID(t,!0,e),Wd([])}return Wd(e.payload).pipe(Vd((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,s={data_view_ID:t},{restApi:o,reqType:i}=fp("createDataObject",s),c=Pa(a);return sd(_d(o,{method:i,headers:r,body:{data:c.content}},a)).pipe(kd((t=>({response:t.data,actionInPayload:e}))),Jd("Error ocurred during ajax call at createDataObject Epic",n))})(e))),Vd((async e=>{if(e&&e.type===Be){const{payload:r}=e,a=Ra({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?Ka.MODAL:Ka.PRIMARY,i={target:Rt(o,a),containerItemID:a,context:a};return n.push(Ju(Hu,i)),n})),kd((()=>(1===n.length&&ia(n[0].type)?In.rejectActionByID(t):In.resolveActionByID(t),ru(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Ud("VIEW_DATA_OBJECT"),Qd(100),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>(e=>{const{dataLookUp:t,context:n,headers:r,viewName:a,requestPayload:s}=e,o={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=fp("readDataObject",o);return sd(_d(i,{method:c,headers:r,body:{dataViewParameters:s}},n)).pipe(kd((t=>({response:t.data,actionInPayload:e}))),Jd("Error ocurred during ajax call at getDataObjectView Epic",n))})(e))),Vd((async e=>{if(e&&e.type===Be){const{payload:r}=e,a=Ra({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:s={}}=e,{containerName:o}=r,i=Rt(o,r.context),c=xa(i,o,r.context),d={acName:i,context:c};await Ta(a,r,d);const l=Oa(a,{target:i,context:c,containerItemID:c,headers:s});return l.resourceType=V.RESOURCE_TYPES.DATA,l.resourceStatus=V.RESOURCE_STATUS.UPDATE,l.key=JSON.stringify(r.requestPayload),n.push(Ju(Mu,l)),n})),kd((()=>(1===n.length&&ia(n[0].type)?In.rejectActionByID(t):In.resolveActionByID(t),ru(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ud("UPDATE_DATA_OBJECT"),Qd(100),Fd((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:V.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return In.rejectActionByID(t,!0,e),Wd([])}return Wd(e.payload).pipe(Vd((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:s}=e,o={data_view_ID:t},{restApi:i,reqType:c}=fp("updateDataObject",o),d=Pa(a);return sd(_d(i,{method:c,headers:r,body:{data:{...d.content,...s},pageInstructions:d.pageInstructions||[]}},a)).pipe(kd((t=>({response:t.data,actionInPayload:e}))),Jd("Error ocurred during ajax call at updateDataObject Epic",n))})(e))),Vd((async e=>{if(e&&e.type===Be){const{payload:r}=e,a=Ra({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?Ka.MODAL:Ka.PRIMARY,i={target:Rt(o,a),containerItemID:a,context:a};return n.push(Ju(Hu,i)),n})),kd((()=>(1===n.length&&ia(n[0].type)?In.rejectActionByID(t):In.resolveActionByID(t),ru(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Ud("DELETE_DATA_OBJECT"),Qd(100),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>(e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:s,reqType:o}=fp("deleteDataObject",a);return sd(_d(s,{method:o},n)).pipe(kd((t=>({response:t.data,actionInPayload:e}))),Jd("Error ocurred during ajax call at deleteDataObject Epic",n))})(e))),Vd((async e=>{if(e&&e.type===Be){const{payload:r}=e,a=Ra({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),kd((()=>(1===n.length&&ia(n[0].type)?In.rejectActionByID(t):In.resolveActionByID(t),ru(n),n=[],n))))},e=>{let t=0,n=[],r={};return e.pipe(Ud(Ve),Qd(100),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>(e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,a={data_view_ID:t},{restApi:s,reqType:o}=fp("getDataObjectActions",a);return sd(_d(s,{method:o,body:{dataViewParameters:n}},r)).pipe(kd((e=>({...e.data}))),Jd("Error ocurred during ajax call at GET data object actions : ",e.context))})(e))),Vd((async e=>e&&e.type===Be?(n.push(Ra(e)),n):(r=e,[]))),kd((()=>(1===n.length&&ia(n[0].type)?In.rejectActionByID(t):In.resolveActionByID(t,r),ru(n),n=[],n))))}],mf=yf;function If(e,t){return void 0===t&&(t=rf),Zc((function(n,r){var a=null,s=null,o=null,i=function(){if(a){a.unsubscribe(),a=null;var e=s;s=null,r.next(e)}};function c(){var n=o+e,s=t.now();if(s<n)return a=this.schedule(void 0,n-s),void r.add(a);i()}n.subscribe(ed(r,(function(n){s=n,o=t.now(),a||(a=t.schedule(c,e),r.add(a))}),(function(){i(),r.complete()}),void 0,(function(){s=a=null})))}))}const{RESOURCE_TYPES:{CASE:Ef,DATA:Af}}=V;let _f=[];const Sf={},Cf=[e=>e.pipe(Ud(Ge),If(200),kd((e=>e.payload)),Vd((e=>{const t=Z.getPreviewMode()&&hd.addDebugHeaders({debugId:Iu.generateUniqueID()});Sf.dataContext=e.payload.dataViewName,Sf.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:s}=e;s=s&&s.indexOf("viewType={viewType}")>0?s.replace("{viewType}","page"):s&&s.indexOf('viewType=""')>0?s.replace('viewType=""','viewType="page"'):s;const o=A()+s,i=e.options.context;let c;const d={},l=e?.payload?.caseClassName;if(B.isRemoteCase(l)){const{RemoteSystemID:e}=B.getRemoteCase(l);d.RemoteSystemID=e}if("POST"===r){let i;switch(c=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`),ka(a)){case Ef:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case Af:i=Sf;break;default:i=c}return sd(_d(o,{method:r,body:i,headers:{...d,...t}},n)).pipe(kd((t=>({response:{...t.data},payload:e,headers:ba(t.headers)}))),Jd(": Error ocurred during ajax call at historyEpic : ",e))}return sd(_d(o,{method:"GET",headers:{...d,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(kd((n=>({response:n.data,payload:e,headers:{...ba(n.headers),...t}}))))})),Vd((async e=>{if(e&&e.type===Be)return Ra(e);const{headers:t={},response:n,payload:r}=e,a=cg(n,{[V.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=r.options.acName,o=fs(s)&&ms(s)?os(s):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:s,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[G.COREHEADER_APP_DEBUG_ID]}};let d="";const l=r?.payload?.page;let u=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(d=hp(ut,{caseName:e.payload.payload.caseName}),d=d&&d.replace("{workID}",e.payload.payload.workID)||"",u=r?.payload?.caseClassName),ea.publish(V.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:l,pageClass:u});const p=Iu.getIn(a,G.LOCALE_REFERENCES);await se.loadLocaleResources(p);const h=Iu.getIn(a,G.COMPONENTS);h&&await Xr(h),zr(a,r.options.actionConfig,!0),ea.publish(V.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:l,pageClass:u});let g=Oa(a,c);return g=((e,t,n)=>{if(e===Sa.CASE){if(t?.caseInfo?.assignments){const{key:e,flowName:r}=va(t.caseInfo.assignments[0].ID);n.key=e,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=G.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(ka(e.payload.routeKey),{...n.data,semanticURL:d,caseViewMode:G.REVIEW_MODE},g),_f.push(Da(s,g)),Fa(_f),_f})),kd((()=>(ru(_f),_f=[],_f))),Jd("Error occured"))],$f=[e=>{let t=0,n=[];return e.pipe(Ud(Te),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a="";n||(a=hp(dt,{insightID:"{insightID}"}),a=a.replace("{insightID}",r));const{restApi:s,reqType:o}=fp(dt,{insightID:r});return sd(_d(s,{method:o},t)).pipe(kd((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),Jd(": Error ocurred during ajax call at showPage Epic : ",e.context))})),Vd((async e=>{if(e&&e.type===Be)return n.push(Ra(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Qr.getTargetViewContainerName(Pe),s=Rt(a,t.context),o=xa(s,a,t.context),{response:i}=e,c=cg(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await Ta(c,t,d,l,u);const p=Oa(c,{target:s,context:o,containerItemID:o});p.resourceType=V.PAGE;const h=Da(s,p);return n.push(h),Fa(n),n})),kd((()=>{In.resolveActionByID(t),ru(n),n=[]})),uf())}],bf=[e=>{let t=0,n=[];return e.pipe(Ud(Ne),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),Vd((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=hp(lt,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:s,reqType:o}=fp(lt,{dashboardID:r});return sd(_d(s,{method:o},t)).pipe(kd((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),Jd(": Error ocurred during ajax call at showPage Epic : ",e.context))})),Vd((async e=>{if(e&&e.type===Be)return n.push(Ra(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Qr.getTargetViewContainerName(Pe),s=Rt(a,t.context),o=xa(s,a,t.context),{response:i}=e,c=cg(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await Ta(c,t,d,l,u);const p=Oa(c,{target:s,context:o,containerItemID:o});p.resourceType=V.PAGE;const h=Da(s,p);return n.push(h)})),kd((()=>{In.resolveActionByID(t),ru(n),n=[]})),uf())}],Pf=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ig.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...ug,...lf,...gf,...Cf,...mf,...hg,(e=>{let t=0;return e.pipe(Ud(_t),kd((e=>(({actionMgrID:t}=e.payload),e.payload))),kd((e=>{const n=nu().getState(),r=og();return Xd()(n,r)&&t>0?In.resolveActionByID(t,{}):In.rejectActionByID(t),[]})),uf())}),...$f,...bf),Of=e=>e.type||(e.messages&&e.messages[0].type)===V.MESSAGES.MESSAGES_TYPE_ERROR,Tf=e=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,property:s,pageReference:o,context:i,referenceList:c}=r;"HTTP"!==a&&n===Et&&Of(r)?((e,t,n)=>{if(yr[e]){const r=Er(Ar(t,n)),a=Sr(e,yr[e].fieldOrder[r],r);a&&(a.isError=!0)}})(i,s,o):"HTTP"!==a&&n===At&&Of(r)&&void 0!==s?$r(i,s,o):"HTTP"!==a&&[qe,tt,ze,rt].includes(n)?_r(i):n===bt&&$r(i,s,c),e(t)},Nf={},vf=e=>{const t=Iu.getIn(Nf,[G.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=Iu.getIn(Nf,[r,t],[]),s=a&&a.length>0&&a.indexOf(e);if(s>-1&&a.splice(s,1),!a||a&&0===a.length){Iu.deleteIn(Nf,[r,t]);const e=Iu.getIn(Nf,[r]);e&&0===Object.keys(e).length&&Iu.deleteIn(Nf,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),Iu.deleteIn(Nf,[G.CONTEXT,e]);const r=Iu.getIn(Nf,[G.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&Iu.deleteIn(Nf,[G.CONTEXT]),n.length>0&&ru(ep({dataPagesToBeRemoved:n}))},Rf=(e={},t)=>{Object.keys(e).forEach((n=>{const r=Iu.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=Iu.getIn(Nf,[G.CONTEXT,n]);if(Iu.getIn(Nf,[e])){const r=Iu.getIn(Nf,[e,t],[]);Iu.setIn(Nf,[e,t],[...new Set([...r,n])])}else Iu.setIn(Nf,[e,t],[n]);r?Iu.setIn(Nf,[G.CONTEXT,n],[...new Set([...r,t])]):Iu.setIn(Nf,[G.CONTEXT,n],[t])})(n,e,t)}))}))},Df=e=>e=>t=>{const{payload:{data:n={},context:r=null,childContainersContexts:a=[]}={},type:s}=t;if(a&&a.length>0&&(s===rt||s===ze)&&a.forEach((e=>{vf(e)})),s===qe||s===Fe||s===Ct){const e=s===Ct?n:n.shared;Rf(e,r)}else s===rt?(vf(r),Rf(n.shared,r)):s===ze&&vf(r);e(t)},xf=class{static cleanCaches(e){Ql.purgeCascadeFields(e),Xl.removeContext(e),xg.clearContextedCache(e),ea.cleanContextSubscribers(e),_r(e),Dn.removeContextTreeNode(e),Vh.clearContext(e),Mr.deRegisterForRefresh(e)}},wf=e=>t=>n=>{const{type:r,payload:{target:a,containerItemID:s,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:d}={}}={}}=n,{PUB_SUB_EVENTS:l}=V;if(r===ze){const{resourceType:t,key:n,context:r}=Iu.getIn(e.getState(),["containers",a,"items",s])||{},o={resourceType:t,key:n,context:r,containerItemID:s};ea.publish(l.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),a===`${V.APP.APP}/${G.PRIMARY}`&&d===G.CONTAINER_TYPE.MULTIPLE&&ea.publish(l.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===rt||r===ze)&&i.forEach((e=>{xf.cleanCaches(e)})),r!==rt&&r!==ze||xf.cleanCaches(o),t(n)},Mf=e=>e=>t=>{const{payload:{context:n=null}={},type:r}=t;!n||r!==qe&&r!==tt&&r!==rt&&r!==ze||(nr(n),Zn(n)),e(t)},Lf=function(e){void 0===e&&(e={});var t,n=new(0,kp.constructor)(kp.schedulerActionCtor),r=new Gp,a=function(a){t=a;var s=new Gp,o=new Gp,i=s.asObservable().pipe(nd(n)),c=new Wp(o.pipe(nd(n)),t.getState());return r.pipe(kd((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),Vd((function(e){return sd(e).pipe(rd(n),nd(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),s.next(n),r}}};return a.run=function(e){r.next(e)},a}(),jf=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Dp;if(null!==nu())yu();else{const n=Rp((e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[G.CONTEXT_DATA]||e[G.CONTEXT_DATA];sg={data:{[G.APP.APP]:{...t,[G.CONTEXT_DATA]:r}},containers:{}}})(e),function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}const r=Object.keys(n);let a;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:Np.INIT}))throw new Error(Pp(12));if(void 0===n(void 0,{type:Np.PROBE_UNKNOWN_ACTION()}))throw new Error(Pp(13))}))}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let s=!1;const o={};for(let a=0;a<r.length;a++){const i=r[a],c=n[i],d=e[i],l=c(d,t);if(void 0===l)throw t&&t.type,new Error(Pp(14));o[i]=l,s=s||l!==d}return s=s||r.length!==Object.keys(e).length,s?o:e}}({data:tg,containers:ag})))(e),t(qp.reduxBatch,function(...e){return t=>(n,r)=>{const a=t(n,r);let s=()=>{throw new Error(Pp(15))};const o={getState:a.getState,dispatch:(e,...t)=>s(e,...t)},i=e.map((e=>e(o)));return s=Dp(...i)(a.dispatch),{...a,dispatch:s}}}(Wr,Tf,Df,Mf,Lf,wf),qp.reduxBatch));Lf.run(Pf),tu(n)}},Uf=new class{constructor(){this.userSettings={}}getNormalizedKey(e){return e?.toString().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e));return Iu.isValidJson(t)||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{const{restApi:e,reqType:t}=fp("getUserSettings");_d(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))};init=()=>{ee.getUserSettings()?this.userSettings=ee.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return Iu.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));const n=fp("updateUserSettings");if(!n)return Promise.reject(new Error("updateUserSettings route is not available"));const{restApi:r,reqType:a}=n;return _d(r,{method:a,body:Iu.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))}},Ff={publishConstellationLoadedEvent:()=>{ea.publish(G.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}},kf=new class{activateContainerItemOnSwitch(e){const t=`${G.APP.APP}/${G.PRIMARY}`,n={target:t,containerItemID:rs(t,e)};gl({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${G.APP.APP}/${G.PRIMARY}`,n={target:t,containerItemID:rs(t,e)};gl({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){gl({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){gl({}).getPConnect().getContainerManager().resetContainers({name:G.PREVIEW,context:G.APP.APP})}isFormDirty(e){const t=`${G.APP.APP}/${G.PRIMARY}`,n=ks(t,e);return gr.isStateModified(n)}getEventUtils(){return Ff}getBroadcastUtils(){return fg}isTraditionalUICase(e){return Aa(e)}},Vf=new class{#c(e,t,n){bp(e),Qr.buildActionTargetMap(t),I(n)}init(e){const t=new class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode||"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping||{},this.envType=e.envType,this.serviceConfig=new class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer||null,this.contextPath=e.contextPath,this.messagingService=e.messagingService||null,this.reAuthUrl=e.reAuthUrl||null}}(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none"}}(e),n={...t.environmentInfo,renderingMode:t.renderingMode};up(t.enableRouting),jf({}),ee.setTheme(t.theme),ee.setCookieComplianceMethod(t.cookieComplianceMethod),lr.updateFieldDefaults(t.fieldDefaults),hd.setDefaultHeaders(t.additionalHeaders),this.#c(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),ne.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),_(t.serviceConfig.googleMapKey),ne.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),se.setTimezone(t.timezone),ee.setEnvironmentInfo(n),ee.setLocale(t.locale),B.setRemoteCaseMapping(t.remoteCaseMapping),Vh.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),Uf.init(),t.initBroadcast&&kf.getBroadcastUtils().init()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=gl({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}}},Gf={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=fp("createViewRuleByID");return _d(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=fp("getViewRuleByID",{ID:e});return _d(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=fp("updateViewRuleByID",{ID:e});return _d(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=fp("deleteViewRuleByID",{ID:e});return _d(n,{method:r},t).then((e=>e.data))}},Bf={"Content-Type":"application/json"},Hf={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return Eg("addCaseFollower",{body:a,queryPayload:r,headers:Bf},n)},deleteCaseFollower:(e,t,n)=>Eg("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Eg("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},Wf={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return Eg("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Eg("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Eg("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},qf="operatorDetails",zf={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=fp(qf,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Eg(qf,{queryPayload:t})}return t?Eg("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Eg(qf,{body:{dataViewParameters:{ID:e}}})}},Yf=async e=>{const t=cg(e),n=Iu.getIn(t,G.COMPONENTS);zr(t,{},!0),await Xr(n)},Kf=(e,t,n)=>_u.resolveView(e,t,n),Xf={"Content-Type":"application/json"},Jf=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,s,o)=>{const{getLocaleValue:i}=se;o||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let d="";o&&(d=s.getValue("pulse.nextPageFirstEntry"));const l={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:9,olderThan:d};for(let e=0;e<a.length;e+=1)a[e].cancel();const u=Sg();return a.push(u),Eg("getFeedMessages",{queryPayload:l,cancelTokenSource:u},s.getContextName()).then((async e=>{if(200===e.status&&e.data){a.pop();const t=[],n={};let c=!1;if(e?.data){if(e?.data?.data?.FeedList){const r=e.data.data.FeedList?.pxResults;Array.isArray(r)&&r?.length>0&&r.forEach(((e,r)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${r}`,t.push(e.ID),n[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),c||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(c=!0)}))}if(c&&await Yf({uiResources:e.data.uiResources}),!r&&(r=[{id:"All",label:i("All","Pulse"),on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let n=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i(e.pyLabel,"Pulse"),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)})),r.find((e=>"All"===e.id)).on=n)}}if(o&&s.getValue("pulse.messageIDs")){let r=s.getValue("pulse.messageIDs"),a=s.getValue("pulse.messages");r=[...r,...t],a={...a,...n},Object.values(a).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),s.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",hideAttachment:e?.data?.hideAttachment||!1}})}else s.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",hideAttachment:e?.data?.hideAttachment||!1}});const d=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:d}}return s.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{Cg(e)||s.reportError(": Error ocurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,a)=>{const s=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return Eg("postFeedMessages",{body:s,headers:Xf},a.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const s=t?.data;if(r){s.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:o,messageIDs:i}}),c}return a.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{a.reportError(": Error ocurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:a=!1})=>{const s=JSON.stringify({message:n});return Eg("editFeedMessage",{queryPayload:{messageID:e},body:s,headers:Xf},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:s}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),s}const{messages:s,caseMentions:o}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:s}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error ocurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,n,r=!1)=>{const a={ID:e?.ID||"",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},s=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(s)?.find((e=>e?.ID===a?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===a?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...a},e=n}else e=[...e,a];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(a.ID)?{...s[a.ID],...a}:a,t={...s,[a.ID]:e};return{messages:t,messageIDs:o.includes(a.ID)?o:[a.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,c11nEnv:a})=>{const s=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Eg(s,{body:o,queryPayload:{pulseContext:e},headers:Xf},a.getContextName()).then((s=>{if(200===s.status)if(r){const r=a.getValue(`pulse.messages.${n}`),s=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const a=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=a-1,r=!1):(e=a+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));a.updateState({pulse:{messages:{[n]:{pxResults:s}}}})}else{const r={...a.getValue(`pulse.messages.${n}`)},s=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=s-1,i=!1):(o=s+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:r}}})}else a.reportError(`likeMessage call failed with status ${s.status}`,s)})).catch((e=>{a.reportError(": Error ocurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n),Eg("deleteFeedMessage",{queryPayload:{messageID:a}},r.getContextName()).then((a=>{if(200===a.status)if(t){const t=r.getValue(`pulse.messages.${e}`),a=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:a}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),a={...r.getValue("pulse.messages")};delete a[e],r.updateState({pulse:{messageIDs:n,messages:a}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error ocurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Eg("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error ocurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:a,listSize:s=5}=e,o={pulseContext:n,searchFor:r,mentionsType:a,listSize:s};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Sg();return this.mentionsTagsCancelTokenSource.push(i),Eg("getMentionSuggestions",{queryPayload:o,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{Cg(e)||t.reportError(": Error ocurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Eg("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error ocurred during ajax call at getMentionTypes API : ",t.response.data)}));getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,a={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const s=Sg();return this.mentionsTagsCancelTokenSource.push(s),Eg("getTagSuggestions",{queryPayload:a,cancelTokenSource:s},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Cg(e)||t.reportError(": Error ocurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},Qf={getTaggedCases:(e,t)=>Eg("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Eg("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return Eg("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error ocurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Eg("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error ocurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>Bh.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error ocurred during ajax call getTagsLandingPageURL API : ",t.response)}))},Zf=(e,t)=>{Ms(t.getContextName(),e.etag),Ls(t.getContextName(),e.etag)},ey={getParticipants:(e,t)=>Eg("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Eg("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Eg("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Eg("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at getParticipant API : ",e.response)})),createParticipant:(e,t,n,r)=>{const a={caseID:e},{content:s}=n,o={content:s,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return Eg("createParticipant",{body:o,queryPayload:a,headers:i},r.getContextName()).then((e=>{Zf(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at createParticipant API : ",e.response)}))},updateParticipant:(e,t,n,r)=>{const{content:a}=n,s={content:a},o={caseID:e,participantID:t},i={"if-match":r.getCaseSummary().headers.etag};return Eg("updateParticipant",{body:s,queryPayload:o,headers:i},r.getContextName()).then((e=>{Zf(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at updateParticipant API : ",e.response)}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return Eg("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((e=>{Zf(e.headers,n)})).catch((e=>{n.reportError(": Error ocurred during ajax call at deleteParticipant API : ",e.response)}))}},ty=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}};function ny(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const ry="create",ay="update",sy="delete";function oy(e,t,n,r){const a=Fl(t);if(a){switch(e){case ry:case ay:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case sy:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const iy={},cy=e=>{const t=Fl(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=ny(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=fp("getUIListPersonalizations",{listID:e});return _d(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:ny(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},dy=(e,t,n)=>{const{restApi:r,reqType:a}=fp("createListPersonalization",{listID:e});return oy(ry,e,t,n),_d(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return iy[t]=n,e}))},ly=(e,t,n)=>{const r=iy[t]||t;oy(ay,e,t,n);const{restApi:a,reqType:s}=fp("updateListPersonalization",{listID:e,personalizationID:r})||{};return _d(a,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},uy=(e,t)=>{const n=iy[t]||t;oy(sy,e,t);const{restApi:r,reqType:a}=fp("deleteListPersonalization",{listID:e,personalizationID:n});return _d(r,{method:a,body:{}}).then((e=>(iy[t]&&delete iy[t],e)))},py=function(e){return e?{createPersonalization:dy.bind(null,e),updatePersonalization:ly.bind(null,e),deletePersonalization:uy.bind(null,e),fetchPersonalizations:cy.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},hy="getDataObjects",gy=["LocalList","RemoteList","PromptList","DataPage"];let fy=null;function yy(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const my={getDataObjects:function(){const e=Lh.getAppCacheKey(hy);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=fp(hy,{}),r=_d(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(fy)return fy;const t=Lh.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=fp("getDataPages",{datapageRequestType:"explorable"});return fy=_d(n,{method:r,datapageRequestType:"explorable"}),fy.then((e=>{fy=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),fy},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=Ul(e);if(t&&t.classID){let e=Vl(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!Iu.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=Dl(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(t.rdFields?.fields??t.rdFields),a=r.size>0||n.size>0;for(const t in e)e[t].type.startsWith("Page")||a&&!(r.size>0&&r.has(t)||n.size>0&&n.has(t))?delete e[t]:e[t]?.datasource&&gy.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType?e[1].fieldType:e[1].isUserReference?"User reference":void 0,category:yy(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n};return xg.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=Lh.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=fp("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=_d(n,{method:r,body:{dataViewParameters:e}});return a.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),a},getFieldsForDataSource:function(e,t,n){if(!t){const t=Ul(e),n=t?.rdFields?.fields??t?.rdFields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=Lh.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const a=Lh.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return a.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),a},getPrimaryFieldsForDataSource:function(e="",t=""){const n=Lh.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=Lh.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getInsightIDs:function(){const{restApi:e,reqType:t}=fp("getInsightIDs");return _d(e,{method:t})},getInsightByID:function(e){const t=kl(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=fp("getInsightByID",n);return _d(r,{method:a})},createInsight:function(e){const{restApi:t,reqType:n}=fp("createInsight");return _d(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=fp("updateInsight",n);return _d(r,{method:a,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=fp("deleteInsight",t);return _d(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=fp("exportToExcel");return _d(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=fp("scheduleInsight",n);return _d(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:s}=fp("updateScheduledInsight",r);return _d(a,{method:s,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=fp("deleteScheduledInsight",n);return _d(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=fp("translateStrings");return _d(t,{method:n,body:JSON.stringify(e)})}},Iy=new class{addRoutes=e=>{return t=e,void Q.addRoutes(t);var t}},Ey=class{static openCase(e,t=V.APP.APP,n={}){return n.renderInline=!0,n.pageName?ee.setDefaultCasePage(n.pageName):(ee.setDefaultCasePage(G.PY_DETAILS),n.pageName=G.PY_DETAILS),n?.disableAssignmentHeader?ee.disableAssignmentHeader(n.disableAssignmentHeader):ee.disableAssignmentHeader(!1),nl.openCase(e,t,G.PRIMARY,n)}static createCase(e,t=V.APP.APP,n={}){return n.renderInline=!0,n.pageName?ee.setDefaultCasePage(n.pageName):(ee.setDefaultCasePage(G.PY_DETAILS),n.pageName=G.PY_DETAILS),n?.disableAssignmentHeader?ee.disableAssignmentHeader(n.disableAssignmentHeader):ee.disableAssignmentHeader(!1),nl.createCase(e,t,G.PRIMARY,n)}static getNextWork(e=V.APP.APP,t={}){return t.renderInline=!0,t.pageName?ee.setDefaultCasePage(t.pageName):(ee.setDefaultCasePage(G.PY_DETAILS),t.pageName=G.PY_DETAILS),t?.disableAssignmentHeader?ee.disableAssignmentHeader(t.disableAssignmentHeader):ee.disableAssignmentHeader(!1),nl.getNextWork(e,G.PRIMARY,t)}static openAssignment(e,t=V.APP.APP,n={}){return n.renderInline=!0,n.pageName?ee.setDefaultCasePage(n.pageName):(ee.setDefaultCasePage(G.PY_DETAILS),n.pageName=G.PY_DETAILS),n?.disableAssignmentHeader?ee.disableAssignmentHeader(n.disableAssignmentHeader):ee.disableAssignmentHeader(!1),nl.openAssignment(e,t,G.PRIMARY,n)}static openPage(e,t,n=V.APP.APP,r={}){const a=Pe;r?.defaultCasePage?ee.setDefaultCasePage(r.defaultCasePage):ee.setDefaultCasePage(G.PY_DETAILS),r?.disableAssignmentHeader?ee.disableAssignmentHeader(r.disableAssignmentHeader):ee.disableAssignmentHeader(!1);const s={viewName:e,className:t,acTargetName:G.PRIMARY,actionMgrID:In.getNextActionMgrId(),context:n},{promise:o}=In.actionManagerPromise(a,s.actionMgrID);return ru({type:a,payload:{...s}}),o}static getCurrentContextAPI(e,t=V.APP.APP){return gl({meta:{config:{}},options:{context:t,pageReference:e,containerName:G.PRIMARY}}).getPConnect()}},Ay={getResolvedSemanticURL:(e,t,n)=>Q.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:ut,ACTION_SHOWDATA:ct,ACTION_SHOWVIEW:it})},_y=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},Sy={setTokens:e=>{Od({tokenInfo:e}),Pd({Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>ea.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>(async()=>new Promise(((e,t)=>{const n={...Id};if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=n.tokenInfo,{revoke:s}=n.endPoints,{client_id:o,client_secret:i}=n,c={"content-type":"application/x-www-form-urlencoded"};i&&(c.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const d=["access_token"];a&&d.push("refresh_token"),d.forEach((async e=>{const t=new URLSearchParams;i||t.append("client_id",o),t.append("token","access_token"===e?r:a),t.append("token_type_hint",e),await fetch(s,{method:"POST",headers:new Headers(c),body:t.toString()})})),Pd({Authorization:null}),Od({tokenInfo:null}),e()})))(),getAuthInstance:e=>cd.init(e),setAuthorizationHeader:e=>{Pd({Authorization:e}),setTimeout((()=>ea.publish("updateSession",{updateStatus:"success"})),0)}},Cy=new class{getDebouncedSubject(e){return(new Gp).pipe(If(e))}};pr.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,a=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${a}(\\x2e${a})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t=se.getLocaleValue("Enter a valid email address","Messages")),t})),pr.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=se.getLocaleValue("Invalid number","Messages")),t})),pr.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?se.getLocaleValue("Cannot be blank","Messages"):null)),pr.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t=se.getLocaleValue("Enter a valid url","Messages")),t}));const $y={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[0135-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};var by={}.constructor;function Py(e){return null!=e&&e.constructor===by}function Oy(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 Ty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ny(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vy(e){var t,n,r,a=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,s=[],o=!0,i=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(s.push(r.value),4!==s.length);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(i)throw a}}return s}}(e)||function(e,t){if(e){if("string"==typeof e)return Ny(e,4);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)?Ny(e,4):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(e)),s=a[0],o=a[1],i=a[2],c=a[3];if("string"!=typeof s)throw new TypeError("A text for parsing must be a string.");if(t=s,o&&"string"!=typeof o){if(!Py(o))throw new Error("Invalid second argument: ".concat(o));i?(n=o,r=i):r=o}else c?(n=i,r=c):(n=void 0,r=i),o&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oy(Object(n),!0).forEach((function(t){Ty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:o},n));return{text:t,options:n,metadata:r}}var Ry="0-90-9٠-٩۰-۹",Dy="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~");function xy(e){return xy="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},xy(e)}function wy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function My(e){var t="function"==typeof Map?new Map:void 0;return My=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ly(e,arguments,Fy(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Uy(r,e)},My(e)}function Ly(e,t,n){return Ly=jy()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&Uy(a,n.prototype),a},Ly.apply(null,arguments)}function jy(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Uy(e,t){return Uy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Uy(e,t)}function Fy(e){return Fy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fy(e)}var ky=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uy(e,t)}(r,e);var t,n=function(e){var t=jy();return function(){var n,r=Fy(e);if(t){var a=Fy(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===xy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wy(e)}(this,n)}}(r);function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),t=n.call(this,e),Object.setPrototypeOf(wy(t),r.prototype),t.name=t.constructor.name,t}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(My(Error));function Vy(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var s=Number(n[a]),o=Number(r[a]);if(s>o)return 1;if(o>s)return-1;if(!isNaN(s)&&isNaN(o))return 1;if(isNaN(s)&&!isNaN(o))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function Gy(e){return Gy="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},Gy(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wy(e,t,n){return t&&Hy(e.prototype,t),n&&Hy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var qy=" ext. ",zy=/^\d+$/,Yy=function(){function e(t){By(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Py(e)||!Py(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Py(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+em(e)+": "+e,"."))}(t),this.metadata=t,nm.call(this,t)}return Wy(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&zy.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Ky(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Ky(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),e}(),Ky=function(){function e(t,n){By(this,e),this.globalMetadataObject=n,this.metadata=t,nm.call(this,n.metadata)}return Wy(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map((function(t){return new Xy(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&Zy(this.types(),e))return new Qy(Zy(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?qy:this.metadata[13]||qy}}]),e}(),Xy=function(){function e(t,n){By(this,e),this._format=t,this.metadata=n}return Wy(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||Jy.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),Jy=/^\(?\$1\)?$/,Qy=function(){function e(t,n){By(this,e),this.type=t,this.metadata=n}return Wy(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function Zy(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}var em=function(e){return Gy(e)};function tm(e,t){if((t=new Yy(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function nm(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===Vy(t,"1.2.0")?this.v2=!0:-1===Vy(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var rm=function(e){return"([".concat(Ry,"]{1,").concat(e,"})")};function am(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="[ \\t]*";return";ext="+rm("20")+"|"+t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+rm("20")+"#?|"+t+"(?:[xx##~~]|int|int)"+n+rm("9")+"#?|[- ]+"+rm("6")+"#|"+r+"(?:,{2}|;)"+n+rm("15")+"#?|"+r+"(?:,)+"+n+rm("9")+"#?"}var sm="[++]{0,1}(?:["+Dy+"]*["+Ry+"]){3,}["+Dy+Ry+"]*",om=new RegExp("^[++]{0,1}(?:["+Dy+"]*["+Ry+"]){1,2}$","i"),im=sm+"(?:"+am()+")?",cm=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+im+"$","i"),dm=new RegExp("(?:"+am()+")$","i"),lm={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function um(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pm(e){for(var t,n="",r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return um(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)?um(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=r()).done;)n+=hm(t.value,n)||"";return n}function hm(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":function(e){return lm[e]}(e)}function gm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fm(e,t){return ym(e,void 0,t)}function ym(e,t,n){var r=n.type(t),a=r&&r.possibleLengths()||n.possibleLengths();if(!a)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!n.type("FIXED_LINE"))return ym(e,"MOBILE",n);var s=n.type("MOBILE");s&&(a=function(e,t){for(var n,r=e.slice(),a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gm(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)?gm(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=a()).done;){var s=n.value;e.indexOf(s)<0&&r.push(s)}return r.sort((function(e,t){return e-t}))}(a,s.possibleLengths()))}else if(t&&!r)return"INVALID_LENGTH";var o=e.length,i=a[0];return i===o?"IS_POSSIBLE":i>o?"TOO_SHORT":a[a.length-1]<o?"TOO_LONG":a.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function mm(e,t){return"IS_POSSIBLE"===fm(e,t)}function Im(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Em(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}var Am=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function _m(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Yy(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Im(r,n.nationalNumberPattern())){if(Sm(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Sm(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Em(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)?Em(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(Am);!(a=s()).done;){var o=a.value;if(Sm(r,o,n))return o}}}}function Sm(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Im(e,t.pattern())}var Cm=/(\$\d)/,$m=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function bm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pm(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 Om(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pm(Object(n),!0).forEach((function(t){Tm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nm={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function vm(e,t,n,r,a){var s=function(e,t){for(var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return bm(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)?bm(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(n=r()).done;){var a=n.value;if(a.leadingDigitsPatterns().length>0){var s=a.leadingDigitsPatterns()[a.leadingDigitsPatterns().length-1];if(0!==t.search(s))continue}if(Im(t,a.pattern()))return a}}(r.formats(),e);return s?function(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,s=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(Cm,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Dy,"]+"),"g")," ").trim()}(s):s}(e,s,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function Rm(e,t,n,r){return t?r(e,t,n):e}function Dm(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 xm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dm(Object(n),!0).forEach((function(t){wm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mm=function(){function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var a=function(e,t){var n,r,a=new Yy(t);return Lm(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),s=a.country,o=a.countryCallingCode;this.country=s,this.countryCallingCode=o,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}var t,n;return t=e,(n=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,n){var r=new Yy(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new Yy(n);return r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,n)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Yy(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return mm(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return e=this,t={v2:!0},n=this.getMetadata(),t=t||{},(n=new Yy(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==_m(e,t,n.metadata):Im(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern());var e,t,n}},{key:"isNonGeographic",value:function(){return new Yy(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return _m(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,n,r){if(n=n?Om(Om({},Nm),n):Nm,r=new Yy(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,s=r.countryCallingCode(),o=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return o?Rm(a=vm(o,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return o?(a=vm(o,null,"INTERNATIONAL",r,n),Rm(a="+".concat(s," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(s);case"E.164":return"+".concat(s).concat(o);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(s).concat(o),ext:e.ext});case"IDD":if(!n.fromCountry)return;var i=function(e,t,n,r,a){if(tm(r,a.metadata)===n){var s=vm(e,t,"NATIONAL",a);return"1"===n?n+" "+s:s}var o=function(e,t,n){var r=new Yy(n);return r.selectNumberingPlan(e,void 0),r.defaultIDDPrefix()?r.defaultIDDPrefix():$m.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,0,a.metadata);if(o)return"".concat(o," ").concat(n," ").concat(vm(e,null,"INTERNATIONAL",a))}(o,e.carrierCode,s,n.fromCountry,r);return Rm(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}(this,e,t?xm(xm({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Lm=function(e){return/^[A-Z]{2}$/.test(e)},jm=new RegExp("(["+Ry+"])");function Um(e,t){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,s,o,i=r.length-1,c=i>0&&r[i];if(t.nationalPrefixTransformRule()&&c)a=e.replace(n,t.nationalPrefixTransformRule()),i>1&&(s=r[1]);else{var d=r[0];a=e.slice(d.length),c&&(s=r[1])}if(c){var l=e.indexOf(r[1]);e.slice(0,l)===t.numberingPlan.nationalPrefix()&&(o=t.numberingPlan.nationalPrefix())}else o=r[0];return{nationalNumber:a,nationalPrefix:o,carrierCode:s}}}return{nationalNumber:e}}(e,t),r=n.carrierCode,a=n.nationalNumber;if(a!==e){if(!function(e,t,n){return!(Im(e,n.nationalNumberPattern())&&!Im(t,n.nationalNumberPattern()))}(e,a,t))return{nationalNumber:e};if(t.possibleLengths()&&!function(e,t){switch(fm(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(a,t))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:r}}function Fm(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}var km="(["+Ry+"]|[\\-\\.\\(\\)]?)",Vm=new RegExp("^\\+"+km+"*["+Ry+"]"+km+"*$","g"),Gm=new RegExp("^(["+Ry+"]+((\\-)*["+Ry+"])*\\.)*[a-zA-Z]+((\\-)*["+Ry+"])*\\.?$","g"),Bm="tel:",Hm=";phone-context=",Wm=new RegExp("[++"+Ry+"]"),qm=new RegExp("[^"+Ry+"#]+$");function zm(e,t,n){if(t=t||{},n=new Yy(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new ky("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=function(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(Hm);if(t<0)return null;var n=t+Hm.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(Vm.test(e)||Gm.test(e))}(a))throw new ky("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="","+"===a.charAt(0)&&(n+=a);var s,o=e.indexOf(Bm);s=o>=0?o+Bm.length:0;var i=e.indexOf(Hm);n+=e.substring(s,i)}var c=n.indexOf(";isub=");if(c>0&&(n=n.substring(0,c)),""!==n)return n}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(e)if(e.length>250){if(n)throw new ky("TOO_LONG")}else{if(!1===t)return e;var r=e.search(Wm);if(!(r<0))return e.slice(r).replace(qm,"")}}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&cm.test(e)}(r))return function(e){return om.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(dm);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(dm),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);return a.ext?a:{number:r}}(e,t.v2,t.extract),a=r.number,s=r.ext,o=r.error;if(!a){if(t.v2){if("TOO_SHORT"===o)throw new ky("TOO_SHORT");throw new ky("NOT_A_NUMBER")}return{}}var i=function(e,t,n,r){var a,s=function(e,t,n,r){if(!e)return{};var a;if("+"!==e[0]){var s=function(e,t,n,r){if(t){var a=new Yy(r);a.selectNumberingPlan(t,n);var s=new RegExp(a.IDDPrefix());if(0===e.search(s)){var o=(e=e.slice(e.match(s)[0].length)).match(jm);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,t,n,r);if(!s||s===e){if(t||n){var o=function(e,t,n,r){var a=t?tm(t,r):n;if(0===e.indexOf(a)){(r=new Yy(r)).selectNumberingPlan(t,n);var s=e.slice(a.length),o=Um(s,r).nationalNumber,i=Um(e,r).nationalNumber;if(!Im(i,r.nationalNumberPattern())&&Im(o,r.nationalNumberPattern())||"TOO_LONG"===fm(i,r))return{countryCallingCode:a,number:s}}return{number:e}}(e,t,n,r),i=o.countryCallingCode,c=o.number;if(i)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:i,number:c}}return{number:e}}a=!0,e="+"+s}if("0"===e[1])return{};r=new Yy(r);for(var d=2;d-1<=3&&d<=e.length;){var l=e.slice(1,d);if(r.hasCallingCode(l))return r.selectNumberingPlan(l),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:l,number:e.slice(d)};d++}return{}}(pm(e),t,n,r.metadata),o=s.countryCallingCodeSource,i=s.countryCallingCode,c=s.number;if(i)r.selectNumberingPlan(i);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),!!t&&(a=t),i=n||tm(t,r.metadata)}if(!c)return{countryCallingCodeSource:o,countryCallingCode:i};var d=Um(pm(c),r),l=d.nationalNumber,u=d.carrierCode,p=function(e,t){var n=t.nationalNumber,r=t.defaultCountry,a=t.metadata,s=a.getCountryCodesForCallingCode(e);return s?1===s.length?s[0]:function(e,t){var n=t.countries,r=t.defaultCountry,a=t.metadata;a=new Yy(a);for(var s,o=[],i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Fm(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)?Fm(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(s=i()).done;){var c=s.value;if(a.country(c),a.leadingDigits()){if(e&&0===e.search(a.leadingDigits()))return c}else if(_m({phone:e,country:c},void 0,a.metadata)){if(!r)return c;if(c===r)return c;o.push(c)}}if(o.length>0)return o[0]}(n,{countries:s,defaultCountry:r,metadata:a.metadata}):void 0}(i,{nationalNumber:l,defaultCountry:t,metadata:r});return p&&(a=p,"001"===p||r.country(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:l,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),c=i.country,d=i.nationalNumber,l=i.countryCallingCode,u=i.countryCallingCodeSource,p=i.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new ky("INVALID_COUNTRY");return{}}if(!d||d.length<2){if(t.v2)throw new ky("TOO_SHORT");return{}}if(d.length>17){if(t.v2)throw new ky("TOO_LONG");return{}}if(t.v2){var h=new Mm(l,d,n.metadata);return c&&(h.country=c),p&&(h.carrierCode=p),s&&(h.ext=s),h.__countryCallingCodeSource=u,h}var g=!!(t.extended?n.hasSelectedNumberingPlan():c)&&Im(d,n.nationalNumberPattern());return t.extended?{country:c,countryCallingCode:l,carrierCode:p,valid:g,possible:!!g||!(!0!==t.extended||!n.possibleLengths()||!mm(d,n)),phone:d,ext:s}:g?function(e,t,n){var r={country:e,phone:t};return n&&(r.ext=n),r}(c,d,s):{}}function Ym(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 Km(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ym(Object(n),!0).forEach((function(t){Xm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ym(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jm(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 Qm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jm(Object(n),!0).forEach((function(t){Zm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eI(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=Qm(Qm({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return zm(e,Km(Km({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof ky))throw e}}function tI(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 nI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tI(Object(n),!0).forEach((function(t){rI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aI(){var e=vy(arguments),t=e.text,n=e.options,r=e.metadata,a=eI(t,n=nI(nI({},n),{},{extract:!1}),r);return a&&a.isPossible()||!1}pr.register("phone",(e=>{let t=null;e&&!/^\+?\d+$/.test(e)&&(t=se.getLocaleValue("Enter a valid phone number","Messages"));const n=e?.startsWith("+");return e&&n&&(function(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push($y),e.apply(this,n)}(aI,arguments)}(e)||(t=se.getLocaleValue("Enter a valid phone number","Messages"))),t}));const sI=(e,t)=>{switch(t){case"invalid":return se.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return se.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};pr.register("datetime",(e=>sI("DateTime",e))),pr.register("date",(e=>sI("Date",e))),pr.register("time",(e=>sI("Time",e)));const oI=new class{createC11nEnv=e=>gl(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>de;getStateManager=()=>d;getActionCreators=()=>l;getStreamObservable=()=>s;getActionProcessor=()=>Cu;getActionHandler=()=>Su;renderApp=(e,t)=>{const n={context:G.APP.APP},r={...Iu.getIn(e,G.ROOT),options:n};jf(e),zr(e,n,!0);const a=this.createC11nEnv({meta:r,isRoot:!0});ea.publish(V.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const r=cg(e),{data:a,uiResources:s={}}=e,o=Iu.getIn(s,G.CONTEXT_DATA);await Ta(r,{},{},!1,!0);const i={...a,[G.CONTEXT_DATA]:o},{root:c}=s;Ps(c,t,i,n)};fetchEndPointResource=(e,t,n)=>{_d(e,{method:"GET"},G.APP.ROOT).then((async e=>{const{data:r,status:a}=e;200===a&&this.updateStoreWithUiRoot(r,t,n)}))};loadComponent=async(e,t,n)=>Xr(n).then((()=>{const n=this.createC11nEnv({meta:e,isRoot:!0});nu()||jf({}),ea.publish(V.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})}));setStaticServerUrl=(e,t,n)=>{ne.initServer(e,t,n)};loadView=async(e,t,n=[])=>{I();const r=cg(e),a=Iu.getIn(r,G.VIEWS),s=Iu.getIn(r,G.NAVIGATIONS),o=Iu.getIn(r,G.COMPONENTS)||[];o.push(...n);const i=Iu.getIn(r,G.STATIC_SERVER_URL),c=Iu.getIn(r,G.APPLICATION_DATA);a&&xl(a),s&&wl(s),(e=>{e&&(dp=e.pyLabel)})(c),i&&ne.initServer(i),await Xr(o,i).then((()=>this.renderApp(r,t)))};initAppShell=(e,t,n)=>{bp(e),Qr.buildActionTargetMap(t),I(n)};initRoutingTable=(e,t)=>{bp(e,!0),I(t)};setAppAlias=e=>{ne.setAppAlias(e)};getHomeRestApi=e=>{const{restApi:t}=gp("home",{portalName:e});return A()+t};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if($p()&&!t){const t=K(),r=Q.processUrl(t,!0),a=Q._getMatchedRouteInRoutingTable(r)||"",s=Q.getRoutingInfo(),o=Q.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=s.routes[a].payload;c=c.replace("{workID}",i),n=Q.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=Q.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return A()+n};loadRootComponent=async(e,t,n=[],r,a,s)=>{const{config:{name:o}={}}=t;nu()||jf({}),s&&(ws(`${G.APP.ROOT}/${o}`),xs().deleteContainerItem(`${G.APP.ROOT}/${o}`)),xs().getContainerItems()?.length>1&&!o?.startsWith("hybrid_")&&"authoring-preview"!==o&&yu(),ru(Ou({data:{},context:G.APP.ROOT}));const i=this.createC11nEnv({meta:t,options:{context:G.APP.ROOT,pageReference:"",target:`${G.APP.ROOT}/${o}`}}),c=i.getPConnect(),d=c.getContextName(),l=c.getContainerName(),u=c.getContainerManager();os(`${d}/${l}`)||"noPortal"===t.config?.renderingMode||u.initializeContainers({type:"single"});const p=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return Xr(p).then((()=>{ea.publish(V.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:i,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:a})}))};loadViewByName=(e,t,n,r)=>{let a=this.getViewRestApi(e,n);a===A()&&(a=this.getHomeRestApi(t)),this.fetchEndPointResource(a,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{(e=>{const{acName:t,context:n,defaultViewLabel:r}=e,a=(e=>{const t=Q.getRoutingInfo(),n=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),a=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return t.routes[n]?n:t.routes[r]?r:t.routes[a]?a:e})(r);(e=>{cp=e})(a),Q.setDefaultRoute(a);const s=fe(t,n),o=Rt(t,n),i={historyAction:sp,pxURLPath:""};let c;const d={acName:o,context:s,actionConfig:{context:s}};if($p()){const e=(e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),a=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&a.set(e,t);const s=new URLSearchParams(a).toString();return s?`${t}?${s}`:t}return e})(z(window.location.pathname+window.location.search));c=Q.getEndPointInfo(e),i.pxURLPath=c.urlPath,void 0!==c.payload?.pageClass&&(c.payload.pageClass=nu()?.getState()?.data?.app?.pyPortal?.classID);const t="showHistory",n={routeEndpoint:c.routeEndpoint,requestType:c.requestType,payload:c.payload,options:d,routeKey:c.routeKey};ru(l[t](Sp(n)))}else c=Q.getEndPointInfo(cp),i.pxURLPath="";Ip(null,!0,{urlPathObjParam:i,infoParam:c,optionsParam:d})})(e)};checkIfSemanticURL=()=>$p();onPCoreReady=e=>{ea.subscribe(V.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};setFieldsDefaultConfigs=e=>{lr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{_(e)};setFetchDefaultHeaders=e=>{Pd(e)};setFetchAuthInfo=e=>{Od(e)};getCaseApi=()=>nl;getMashupApi=()=>Ey;enableAppRouting=e=>{up(e)};initStore=()=>jf({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=gl({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}}};class iI{constructor(){iI.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"24.1.1";onPCoreReady=e=>oI.onPCoreReady(e);getComponentsRegistry=()=>oI.getComponentsRegistry();checkIfSemanticURL=()=>oI.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if($p()){const e=Q.processUrl(K(),!0);return!!Q._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>Iy;getViewResources=()=>p;configureForBrowserBookmark=e=>oI.configureForBrowserBookmark(e);getStore=()=>nu();resetStore=()=>yu();getMessageManager=()=>Hn;getCoexistenceManager=()=>kf;getStoreValue=(e,t,n)=>iu(e,t,n);getContainerUtils=()=>o;getAnnotationUtils=()=>Dr;getFieldUtils=()=>Tn;getFieldDefaultUtils=()=>lr;getAssetLoader=()=>ne;getAttachmentUtils=()=>Al;getViewRuleApi=()=>Gf;getFeedUtils=()=>Jf;getTagUtils=()=>Qf;getStakeholderUtils=()=>ey;getUserApi=()=>zf;getCaseFollowerApi=()=>Hf;getCaseUtils=()=>Zd;getStateUtils=()=>sl;getRelatedCasesApi=()=>Wf;getPersonalizationUtils=py;getDataApi=()=>xg;getDataApiUtils=()=>Lh;getAnalyticsUtils=()=>my;getLocaleUtils=()=>se;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{iI.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{iI.behaviorOverrides[e]=t};getBehaviorOverrides=()=>iI.behaviorOverrides;getBehaviorOverride=e=>iI.behaviorOverrides[e];getAsynchronousUtils=()=>Cy;createPConnect=e=>gl(e);getPubSubUtils=()=>ea;registerComponentCreator=e=>{!function(e){ll=e}(e)};getConstants=()=>Object.freeze(V);getEvents=()=>class{static getCaseEvent=()=>Object.freeze(V.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(V.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(V.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(V.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)};getRestClient=()=>u;getMashupApi=()=>Ey;getEnvironmentInfo=()=>ee;getRuntimeParamsAPI=()=>ty;getSemanticUrlUtils=()=>Ay;getRemoteCaseUtils=()=>B;getNavigationUtils=()=>Uf;registerModule=(e,t)=>class{static registerModule(e,t,n){n[e]=()=>t}}.registerModule(e,t,this);getErrorHandler=()=>_y;getFormUtils=()=>gr;getMessagingServiceManager=()=>Vh;getMetadataUtils=()=>c;getDataPageUtils=()=>Bh;getDataTypeUtils=()=>Md;getCascadeManager=()=>Ql;isDeepEqual=(e,t)=>g()(e,t);getAuthUtils=()=>Sy;getDebugger=()=>Z;getDeferLoadManager=()=>Xl;getExpressionEngine=()=>a;getActionsSequencer=()=>el;getRefreshManager=()=>Mr;getInitialiser=()=>Vf;getBootstrapUtils=()=>oI;getContextTreeManager=()=>Dn}const cI=new iI;n.g.PCore=cI;const dI=cI})();var a=r.Z;export{a as default};
|