@pega/constellationjs 24.2.2 → 25.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +2 -1
  2. package/dist/bootstrap-shell.js +1 -1
  3. package/dist/bootstrap-shell.js.br +0 -0
  4. package/dist/bootstrap-shell.js.gz +0 -0
  5. package/dist/constellation-core-react-native.js +1 -1
  6. package/dist/constellation-core-react-native.js.br +0 -0
  7. package/dist/constellation-core-react-native.js.gz +0 -0
  8. package/dist/constellation-core-react-native.js.map +1 -1
  9. package/dist/constellation-core-web.js +1 -1
  10. package/dist/constellation-core-web.js.br +0 -0
  11. package/dist/constellation-core-web.js.gz +0 -0
  12. package/dist/constellation-core-web.js.map +1 -1
  13. package/dist/constellation-core.63d87cdb.js +2 -0
  14. package/dist/constellation-core.63d87cdb.js.br +0 -0
  15. package/dist/constellation-core.63d87cdb.js.gz +0 -0
  16. package/dist/constellation-core.63d87cdb.js.map +1 -0
  17. package/dist/constellation-core.json +1 -1
  18. package/dist/js/libphonenumber-web.js +2 -0
  19. package/dist/js/libphonenumber-web.js.br +0 -0
  20. package/dist/js/libphonenumber-web.js.gz +0 -0
  21. package/dist/js/libphonenumber-web.js.map +1 -0
  22. package/dist/js/libphonenumber.fd9c5e16.js +2 -0
  23. package/dist/js/libphonenumber.fd9c5e16.js.br +0 -0
  24. package/dist/js/libphonenumber.fd9c5e16.js.gz +0 -0
  25. package/dist/js/libphonenumber.fd9c5e16.js.map +1 -0
  26. package/dist/lib_asset.json +1 -1
  27. package/package.json +1 -1
  28. package/dist/constellation-core.b630c3e1.js +0 -2
  29. package/dist/constellation-core.b630c3e1.js.br +0 -0
  30. package/dist/constellation-core.b630c3e1.js.gz +0 -0
  31. package/dist/constellation-core.b630c3e1.js.map +0 -1
  32. package/dist/js/531-web.js +0 -2
  33. package/dist/js/531-web.js.br +0 -0
  34. package/dist/js/531-web.js.gz +0 -0
  35. package/dist/js/531-web.js.map +0 -1
  36. package/dist/js/531.393debc0.js +0 -2
  37. package/dist/js/531.393debc0.js.br +0 -0
  38. package/dist/js/531.393debc0.js.gz +0 -0
  39. package/dist/js/531.393debc0.js.map +0 -1
@@ -1,2 +1,2 @@
1
- (()=>{var e={851:(e,t,n)=>{"use strict";var r=n(681);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},681:(e,t)=>{"use strict";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 o(){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 s(e){return Array.isArray(e)?e.map((function(e){return s(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:o()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var a=s(e),i=n&&!t;return t||(n=!1,r=!1),i&&o(),a},subscribe:a})}}},52:(e,t,n)=>{e.exports=n(851)},631:(e,t,n)=>{var r="__lodash_hash_undefined__",a=9007199254740991,o="[object Arguments]",s="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=l||d||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var a=e.length,o=n+(r?1:-1);for(;r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}(e,g,n);var r=n-1,a=e.length;for(;++r<a;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,a=e?e.length:0;++r<a;)if(n(t,e[r]))return!0;return!1}function f(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function g(e){return e!=e}function m(e,t){return e.has(t)}var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=u["__core-js_shared__"],_=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",S=E.toString,b=A.hasOwnProperty,N=A.toString,v=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=u.Symbol,T=A.propertyIsEnumerable,$=I.splice,O=P?P.isConcatSpreadable:void 0,R=Math.max,D=G(u,"Map"),x=G(Object,"create");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){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new L;++t<n;)this.add(e[t])}function j(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 U(e,t,n,r){var a,o=-1,s=p,i=!0,c=e.length,l=[],d=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(t,(a=n,function(e){return a(e)}))),r?(s=h,i=!1):t.length>=200&&(s=m,i=!1,t=new F(t));e:for(;++o<c;){var u=e[o],f=n?n(u):u;if(u=r||0!==u?u:0,i&&f==f){for(var g=d;g--;)if(t[g]===f)continue e;l.push(u)}else s(t,f,r)||l.push(u)}return l}function k(e,t,n,r,a){var o=-1,s=e.length;for(n||(n=W),a||(a=[]);++o<s;){var i=e[o];t>0&&n(i)?t>1?k(i,t-1,n,r,a):f(a,i):r||(a[a.length]=i)}return a}function V(e){if(!Q(e)||(t=e,_&&_ in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:c;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(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 G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return V(n)?n:void 0}function W(e){return K(e)||function(e){return X(e)&&b.call(e,"callee")&&(!T.call(e,"callee")||N.call(e)==o)}(e)||!!(O&&e&&e[O])}w.prototype.clear=function(){this.__data__=x?x(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:b.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():$.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return j(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(D||M),string:new w}},L.prototype.delete=function(e){return B(this,e).delete(e)},L.prototype.get=function(e){return B(this,e).get(e)},L.prototype.has=function(e){return B(this,e).has(e)},L.prototype.set=function(e,t){return B(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var H,q,Y=(H=function(e,t){return X(e)?U(e,k(t,1,X,!0)):[]},q=R(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=R(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var a=Array(q+1);++t<q;)a[t]=e[t];return a[q]=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)}(H,this,a)});var K=Array.isArray;function z(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}(e.length)&&!J(e)}function X(e){return function(e){return!!e&&"object"==typeof e}(e)&&z(e)}function J(e){var t=Q(e)?N.call(e):"";return t==s||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=Y},188:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",s="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,d=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=f||g||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=m["__core-js_shared__"],_=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",S=E.toString,b=A.hasOwnProperty,N=A.toString,v=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,T=I.splice,$=k(m,"Map"),O=k(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 F(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:V(n);for(var r=0,a=t.length;null!=e&&r<a;)e=e[B(t[r++])];return r&&r==a?e:void 0}function j(e){if(!H(e)||(t=e,_&&_ in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==o||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}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 k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}x.prototype.clear=function(){this.__data__=O?O(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:b.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r: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($||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 V=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-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],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(G.Cache||M),n}G.Cache=M;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},928:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o=9007199254740991,s="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,E=y||I||Function("return this")();var A,C=Array.prototype,_=Function.prototype,S=Object.prototype,b=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",v=_.toString,P=S.hasOwnProperty,T=S.toString,$=RegExp("^"+v.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=E.Symbol,R=S.propertyIsEnumerable,D=C.splice,x=W(E,"Map"),w=W(Object,"create"),M=O?O.prototype:void 0,L=M?M.toString:void 0;function F(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 j(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 U(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 k(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 V(e,t){return null!=e&&P.call(e,t)}function B(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?$:g;return n.test(function(e){if(null!=e){try{return v.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(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 W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(z(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return u.test(e)||!d.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:z(r=t)?r:q(r);for(var a,i=-1,c=t.length;++i<c;){var l=Y(t[i]);if(!(a=null!=e&&n(e,l)))break;e=e[l]}return a||!!(c=e?e.length:0)&&J(c)&&function(e,t){return t=null==t?o:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(z(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&J(e.length)&&!X(e)}(e)}(e)&&P.call(e,"callee")&&(!R.call(e,"callee")||T.call(e)==s)}(e))}F.prototype.clear=function(){this.__data__=w?w(null):{}},F.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:P.call(t,e)},F.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new F,map:new(x||j),string:new F}},U.prototype.delete=function(e){return G(this,e).delete(e)},U.prototype.get=function(e){return G(this,e).get(e)},U.prototype.has=function(e){return G(this,e).has(e)},U.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=K((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,a){n.push(r?a.replace(f,"$1"):t||e)})),n}));function Y(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-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],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(K.Cache||U),n}K.Cache=U;var z=Array.isArray;function X(e){var t=Q(e)?T.call(e):"";return t==i||t==c}function J(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 ee(e){return"symbol"==typeof e||Z(e)&&T.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,V)}},529:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,a="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",d="[object WeakMap]",u="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,g=h||f||Function("return this")(),m=t&&!t.nodeType&&t,y=m&&e&&!e.nodeType&&e,I=y&&y.exports===m;var E,A,C,_=Function.prototype,S=Object.prototype,b=g["__core-js_shared__"],N=(E=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",v=_.toString,P=S.hasOwnProperty,T=S.toString,$=RegExp("^"+v.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=I?g.Buffer:void 0,R=S.propertyIsEnumerable,D=O?O.isBuffer:void 0,x=(A=Object.keys,C=Object,function(e){return A(C(e))}),w=q(g,"DataView"),M=q(g,"Map"),L=q(g,"Promise"),F=q(g,"Set"),j=q(g,"WeakMap"),U=!R.call({valueOf:1},"valueOf"),k=K(w),V=K(M),B=K(L),G=K(F),W=K(j);function H(e){if(!ee(e)||function(e){return!!N&&N 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)?$:p;return t.test(K(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var Y=function(e){return T.call(e)};function K(e){if(null!=e){try{return v.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function z(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&J(e)}(e)&&P.call(e,"callee")&&(!R.call(e,"callee")||T.call(e)==a)}(w&&Y(new w(new ArrayBuffer(1)))!=u||M&&Y(new M)!=i||L&&Y(L.resolve())!=c||F&&Y(new F)!=l||j&&Y(new j)!=d)&&(Y=function(e){var t=T.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?K(n):void 0;if(r)switch(r){case k:return u;case V:return i;case B:return c;case G:return l;case W:return d}return t});var X=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=D||function(){return!1};function Z(e){var t=ee(e)?T.call(e):"";return t==o||t==s}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(J(e)&&(X(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||z(e)))return!e.length;var t=Y(e);if(t==i||t==l)return!e.size;if(U||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||S)}(e))return!x(e).length;for(var n in e)if(P.call(e,n))return!1;return!0}},216:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=1,o=2,s=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",d="[object Boolean]",u="[object Date]",p="[object Error]",h="[object Function]",f="[object GeneratorFunction]",g="[object Map]",m="[object Number]",y="[object Null]",I="[object Object]",E="[object Promise]",A="[object Proxy]",C="[object RegExp]",_="[object Set]",S="[object String]",b="[object Symbol]",N="[object Undefined]",v="[object WeakMap]",P="[object ArrayBuffer]",T="[object DataView]",$=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[i]=R[c]=R[P]=R[d]=R[T]=R[u]=R[p]=R[h]=R[g]=R[m]=R[I]=R[C]=R[_]=R[S]=R[v]=!1;var D="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,x="object"==typeof self&&self&&self.Object===Object&&self,w=D||x||Function("return this")(),M=t&&!t.nodeType&&t,L=M&&e&&!e.nodeType&&e,F=L&&L.exports===M,j=F&&D.process,U=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=U&&U.isTypedArray;function V(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 B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,Y=Array.prototype,K=Function.prototype,z=Object.prototype,X=w["__core-js_shared__"],J=K.toString,Q=z.hasOwnProperty,Z=(W=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=z.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?w.Buffer:void 0,re=w.Symbol,ae=w.Uint8Array,oe=z.propertyIsEnumerable,se=Y.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,de=(H=Object.keys,q=Object,function(e){return H(q(e))}),ue=Ue(w,"DataView"),pe=Ue(w,"Map"),he=Ue(w,"Promise"),fe=Ue(w,"Set"),ge=Ue(w,"WeakMap"),me=Ue(Object,"create"),ye=Ge(ue),Ie=Ge(pe),Ee=Ge(he),Ae=Ge(fe),Ce=Ge(ge),_e=re?re.prototype:void 0,Se=_e?_e.valueOf:void 0;function be(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 Ne(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 ve(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 Pe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}function Te(e){var t=this.__data__=new Ne(e);this.size=t.size}function $e(e,t){var n=qe(e),r=!n&&He(e),a=!n&&!r&&Ye(e),o=!n&&!r&&!a&&Qe(e),s=n||r||a||o,i=s?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 l in e)!t&&!Q.call(e,l)||s&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Be(l,c))||i.push(l);return i}function Oe(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Re(e){return null==e?void 0===e?N:y:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var a=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return a}(e):function(e){return ee.call(e)}(e)}function De(e){return Je(e)&&Re(e)==i}function xe(e,t,n,r,s){return e===t||(null==e||null==t||!Je(e)&&!Je(t)?e!=e&&t!=t:function(e,t,n,r,s,l){var h=qe(e),f=qe(t),y=h?c:Ve(e),E=f?c:Ve(t),A=(y=y==i?I:y)==I,N=(E=E==i?I:E)==I,v=y==E;if(v&&Ye(e)){if(!Ye(t))return!1;h=!0,A=!1}if(v&&!A)return l||(l=new Te),h||Qe(e)?Le(e,t,n,r,s,l):function(e,t,n,r,s,i,c){switch(n){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!i(new ae(e),new ae(t)));case d:case u:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case C:case S:return e==t+"";case g:var l=B;case _:var h=r&a;if(l||(l=G),e.size!=t.size&&!h)return!1;var f=c.get(e);if(f)return f==t;r|=o,c.set(e,t);var y=Le(l(e),l(t),r,s,i,c);return c.delete(e),y;case b:if(Se)return Se.call(e)==Se.call(t)}return!1}(e,t,y,n,r,s,l);if(!(n&a)){var $=A&&Q.call(e,"__wrapped__"),O=N&&Q.call(t,"__wrapped__");if($||O){var R=$?e.value():e,D=O?t.value():t;return l||(l=new Te),s(R,D,n,r,l)}}if(!v)return!1;return l||(l=new Te),function(e,t,n,r,o,s){var i=n&a,c=Fe(e),l=c.length,d=Fe(t),u=d.length;if(l!=u&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var f=s.get(e);if(f&&s.get(t))return f==t;var g=!0;s.set(e,t),s.set(t,e);var m=i;for(;++p<l;){var y=e[h=c[p]],I=t[h];if(r)var E=i?r(I,y,h,t,e,s):r(y,I,h,e,t,s);if(!(void 0===E?y===I||o(y,I,n,r,s):E)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var A=e.constructor,C=t.constructor;A==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof C&&C instanceof C||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,r,s,l)}(e,t,n,r,xe,s))}function we(e){return!(!Xe(e)||function(e){return!!Z&&Z in e}(e))&&(Ke(e)?te:$).test(Ge(e))}function Me(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||z,t!==r)return de(e);var t,n,r,a=[];for(var o in Object(e))Q.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Le(e,t,n,r,s,i){var c=n&a,l=e.length,d=t.length;if(l!=d&&!(c&&d>l))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,h=!0,f=n&o?new Pe:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var g=e[p],m=t[p];if(r)var y=c?r(m,g,p,t,e,i):r(g,m,p,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(f){if(!V(t,(function(e,t){if(a=t,!f.has(a)&&(g===e||s(g,e,n,r,i)))return f.push(t);var a}))){h=!1;break}}else if(g!==m&&!s(g,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Fe(e){return function(e,t,n){var r=t(e);return qe(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,Ze,ke)}function je(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 Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return we(n)?n:void 0}be.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():se.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return Oe(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ve.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(pe||Ne),string:new be}},ve.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},ve.prototype.get=function(e){return je(this,e).get(e)},ve.prototype.has=function(e){return je(this,e).has(e)},ve.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,r),this},Pe.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new Ne,this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ve(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[a++]=s)}return o}(ce(e),(function(t){return oe.call(e,t)})))}:function(){return[]},Ve=Re;function Be(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(ue&&Ve(new ue(new ArrayBuffer(1)))!=T||pe&&Ve(new pe)!=g||he&&Ve(he.resolve())!=E||fe&&Ve(new fe)!=_||ge&&Ve(new ge)!=v)&&(Ve=function(e){var t=Re(e),n=t==I?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case ye:return T;case Ie:return g;case Ee:return E;case Ae:return _;case Ce:return v}return t});var He=De(function(){return arguments}())?De:function(e){return Je(e)&&Q.call(e,"callee")&&!oe.call(e,"callee")},qe=Array.isArray;var Ye=le||function(){return!1};function Ke(e){if(!Xe(e))return!1;var t=Re(e);return t==h||t==f||t==l||t==A}function ze(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Je(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Je(e)&&ze(e.length)&&!!R[Re(e)]};function Ze(e){return null!=(t=e)&&ze(t.length)&&!Ke(t)?$e(e):Me(e);var t}e.exports=function(e,t){return xe(e,t)}},692:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",d="[object Object]",u="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[o]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[i]=g["[object Map]"]=g["[object Number]"]=g[d]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,C=A&&A.exports===E,_=C&&m.process,S=function(){try{var e=A&&A.require&&A.require("util").types;return e||_&&_.binding&&_.binding("util")}catch(e){}}(),b=S&&S.isTypedArray;var N,v,P,T=Array.prototype,$=Function.prototype,O=Object.prototype,R=I["__core-js_shared__"],D=$.toString,x=O.hasOwnProperty,w=(N=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",M=O.toString,L=D.call(Object),F=RegExp("^"+D.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=C?I.Buffer:void 0,U=I.Symbol,k=I.Uint8Array,V=j?j.allocUnsafe:void 0,B=(v=Object.getPrototypeOf,P=Object,function(e){return v(P(e))}),G=Object.create,W=O.propertyIsEnumerable,H=T.splice,q=U?U.toStringTag:void 0,Y=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),K=j?j.isBuffer:void 0,z=Math.max,X=Date.now,J=Ee(I,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!Re(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(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 te(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 ne(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 re(e){var t=this.__data__=new te(e);this.size=t.size}function ae(e,t){var n=ve(e),r=!n&&Ne(e),a=!n&&!r&&Te(e),o=!n&&!r&&!a&&xe(e),s=n||r||a||o,i=s?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 l in e)!t&&!x.call(e,l)||s&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function oe(e,t,n){(void 0!==n&&!be(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function se(e,t,n){var r=e[t];x.call(e,t)&&be(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(be(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&Y?Y(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return x.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:x.call(t,e)},ee.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},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(J||te),string:new ee}},ne.prototype.delete=function(e){var t=Ie(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return Ie(this,e).get(e)},ne.prototype.has=function(e){return Ie(this,e).has(e)},ne.prototype.set=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,de=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),s=o.length;s--;){var i=o[le?s:++r];if(!1===t(a[i],i,a))break}return e};function ue(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=x.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var a=M.call(e);r&&(t?e[q]=n:delete e[q]);return a}(e):function(e){return M.call(e)}(e)}function pe(e){return De(e)&&ue(e)==o}function he(e){return!(!Re(e)||function(e){return!!w&&w in e}(e))&&($e(e)?F:h).test(function(e){if(null!=e){try{return D.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function fe(e){if(!Re(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ce(e),n=[];for(var r in e)("constructor"!=r||!t&&x.call(e,r))&&n.push(r);return n}function ge(e,t,n,r,a){e!==t&&de(t,(function(o,s){if(a||(a=new re),Re(o))!function(e,t,n,r,a,o,s){var i=_e(e,n),c=_e(t,n),l=s.get(c);if(l)return void oe(e,n,l);var u=o?o(i,c,n+"",e,t,s):void 0,p=void 0===u;if(p){var h=ve(c),f=!h&&Te(c),g=!h&&!f&&xe(c);u=c,h||f||g?ve(i)?u=i:De(A=i)&&Pe(A)?u=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):f?(p=!1,u=function(e,t){if(t)return e.slice();var n=e.length,r=V?V(n):new e.constructor(n);return e.copy(r),r}(c,!0)):g?(p=!1,m=c,y=!0?(I=m.buffer,E=new I.constructor(I.byteLength),new k(E).set(new k(I)),E):m.buffer,u=new m.constructor(y,m.byteOffset,m.length)):u=[]:function(e){if(!De(e)||ue(e)!=d)return!1;var t=B(e);if(null===t)return!0;var n=x.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&D.call(n)==L}(c)||Ne(c)?(u=i,Ne(i)?u=function(e){return function(e,t,n,r){var a=!n;n||(n={});var o=-1,s=t.length;for(;++o<s;){var i=t[o],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),a?ce(n,i,c):se(n,i,c)}return n}(e,we(e))}(i):Re(i)&&!$e(i)||(u=function(e){return"function"!=typeof e.constructor||Ce(e)?{}:Z(B(e))}(c))):p=!1}var m,y,I,E;var A;p&&(s.set(c,u),a(u,c,r,o,s),s.delete(c));oe(e,n,u)}(e,t,s,n,ge,r,a);else{var i=r?r(_e(e,s),o,s+"",e,t,a):void 0;void 0===i&&(i=o),oe(e,s,i)}}),we)}function me(e,t){return Se(function(e,t,n){return t=z(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=z(r.length-t,0),s=Array(o);++a<o;)s[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=n(s),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,t,Fe),e+"")}var ye=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Fe;function Ie(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 Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&f.test(e))&&e>-1&&e%1==0&&e<t}function Ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function _e(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Se=function(e){var t=0,n=0;return function(){var r=X(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ye);function be(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return De(e)&&x.call(e,"callee")&&!W.call(e,"callee")},ve=Array.isArray;function Pe(e){return null!=e&&Oe(e.length)&&!$e(e)}var Te=K||function(){return!1};function $e(e){if(!Re(e))return!1;var t=ue(e);return t==i||t==c||t==s||t==u}function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function De(e){return null!=e&&"object"==typeof e}var xe=b?function(e){return function(t){return e(t)}}(b):function(e){return De(e)&&Oe(e.length)&&!!g[ue(e)]};function we(e){return Pe(e)?ae(e,!0):fe(e)}var Me,Le=(Me=function(e,t,n,r){ge(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(a=Me.length>3&&"function"==typeof a?(r--,a):void 0,o&&function(e,t,n){if(!Re(n))return!1;var r=typeof t;return!!("number"==r?Pe(n)&&Ae(t,n.length):"string"==r&&t in n)&&be(n[t],e)}(t[0],t[1],o)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var s=t[n];s&&Me(e,s,n,a)}return e})));function Fe(e){return e}e.exports=Le},835:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o=9007199254740991,s="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,u=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")();var E,A=Array.prototype,C=Function.prototype,_=Object.prototype,S=I["__core-js_shared__"],b=(E=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=C.toString,v=_.hasOwnProperty,P=_.toString,T=RegExp("^"+N.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=I.Symbol,O=A.splice,R=G(I,"Map"),D=G(Object,"create"),x=$?$.prototype:void 0,w=x?x.toString:void 0;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){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(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 j(e,t,n){var r=e[t];v.call(e,t)&&K(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function U(e,t){for(var n=e.length;n--;)if(K(e[n][0],t))return n;return-1}function k(e){if(!X(e)||(t=e,b&&b in t))return!1;var t,n=function(e){var t=X(e)?P.call(e):"";return t==s||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:f;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t,n,r){if(!X(e))return e;t=function(e,t){if(z(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||J(e))return!0;return d.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return z(e)?e:H(e)}(t);for(var a=-1,o=t.length,s=o-1,i=e;null!=i&&++a<o;){var c=q(t[a]),u=n;if(a!=s){var p=i[c];void 0===(u=r?r(p,c,i):void 0)&&(u=X(p)?p:W(t[a+1])?[]:{})}j(i,c,u),i=i[c]}return e}function B(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 G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||g.test(e))&&e>-1&&e%1==0&&e<t}M.prototype.clear=function(){this.__data__=D?D(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return n===r?void 0:n}return v.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:v.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=D&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return U(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new M,map:new(R||L),string:new M}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(J(e))return w?w.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(p,(function(e,t,r,a){n.push(r?a.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||J(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function Y(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],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(Y.Cache||F),n}function K(e,t){return e===t||e!=e&&t!=t}Y.Cache=F;var z=Array.isArray;function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function J(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&P.call(e)==c}e.exports=function(e,t,n){return null==e?e:V(e,t,n)}},521:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",s="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,d=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=f||g||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=m["__core-js_shared__"],_=(y=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",S=E.toString,b=A.hasOwnProperty,N=A.toString,v=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,T=I.splice,$=V(m,"Map"),O=V(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 F(e){if(!Y(e)||(t=e,_&&_ in t))return!1;var t,n=function(e){var t=Y(e)?N.call(e):"";return t==o||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?v:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:U(t)).length;null!=e&&n<r;)e=e[W(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 o=Array(a);++r<a;)o[r]=e[r+t];return o}(t,0,-1))}(e,t=B(t,e)?[t]:U(t));var n,r,a=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&b.call(e,a))||delete e[a]}function U(e){return q(e)?e:G(e)}function k(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 V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!K(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}x.prototype.clear=function(){this.__data__=O?O(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:b.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r: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($||w),string:new x}},M.prototype.delete=function(e){return k(this,e).delete(e)},M.prototype.get=function(e){return k(this,e).get(e)},M.prototype.has=function(e){return k(this,e).has(e)},M.prototype.set=function(e,t){return k(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(K(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||K(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function H(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],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s),s};return n.cache=new(H.Cache||M),n}H.Cache=M;var q=Array.isArray;function Y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function K(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},953: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=l(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 o=this.gen_table();this.table=o,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=o[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:a,mask:o}=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)&o}}else{t=this.shifted_xor_in;for(let s=0;s<e.length;s++)t=n[255&(t>>r-8+a^e[s])]<<a^t<<8-a&o<<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=l(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=l(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=l(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=l(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,o="";for(let s=0;s<r;s++){let r="";for(let o=0;o<a;o++){let a=e[s<<n|o];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}o+=" "+r+"\n"}return o="[\n"+o.slice(0,-3)+"\n]",o}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class o{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 s extends o{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 o{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 s;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const d={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,o){let s=new t(e,n,r,a,o);return s.calculate.bind(s)},makeBufferConverter:c,models:d,crc1:u,crc6:u,crc8:u,crc10:u,crc16:u,crc24:u,crc32:u,crc32c:u};for(let t in d){let n=d[t];e.exports[t]=n.calculate.bind(n)}},754:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=754,e.exports=t},654:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AsYouType:()=>sa,AsYouTypeCustom:()=>oa,DIGITS:()=>ee,DIGIT_PLACEHOLDER:()=>_r,Metadata:()=>pa,ParseError:()=>C,PhoneNumber:()=>ya,PhoneNumberMatcher:()=>yr,PhoneNumberSearch:()=>Wa,PhoneNumberSearchCustom:()=>Ua,default:()=>xt,findNumbers:()=>ar,findPhoneNumbers:()=>Ba,findPhoneNumbersCustom:()=>ka,findPhoneNumbersInText:()=>ur,format:()=>Sa,formatCustom:()=>_a,formatIncompletePhoneNumber:()=>ma,formatNumber:()=>Sa,formatRFC3966:()=>Me,getCountries:()=>la,getCountryCallingCode:()=>da,getCountryCallingCodeCustom:()=>k,getExampleNumber:()=>fa,getExtPrefix:()=>ua,getNumberType:()=>Ta,getNumberTypeCustom:()=>va,getPhoneCode:()=>da,getPhoneCodeCustom:()=>k,isPossibleNumber:()=>Oa,isPossiblePhoneNumber:()=>Gt,isSupportedCountry:()=>ia,isValidNumber:()=>Da,isValidNumberCustom:()=>Ra,isValidNumberForRegion:()=>wa,isValidPhoneNumber:()=>jt,parse:()=>Ea,parseCustom:()=>Ia,parseDigits:()=>ne,parseIncompletePhoneNumber:()=>oe,parseNumber:()=>Ea,parsePhoneNumber:()=>Pt,parsePhoneNumberCharacter:()=>se,parsePhoneNumberFromString:()=>xt,parsePhoneNumberWithError:()=>Pt,parseRFC3966:()=>we,searchNumbers:()=>sr,searchPhoneNumbers:()=>Ga,searchPhoneNumbersCustom:()=>Va,searchPhoneNumbersInText:()=>mr,validatePhoneNumberLength:()=>Kt});const r={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(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|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]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\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])|[34]\\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-478])\\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]|2[23]"],"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","(?:01\\d|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?: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))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\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-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\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-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|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])|9(?:0[25]|42))[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(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[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-478])\\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]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\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{2})(\\d{4})","$1 $2 $3",["2"],"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"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"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,12],[["(\\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[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|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(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"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])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\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-478])\\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,10,11,12],[["(\\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",["(?:19|[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|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|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|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"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))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\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","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{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]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\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,12],[["(\\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}",[6,7,8,9,10,11]],["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]],["3[2-8]\\d{9,10}",[11,12]],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",["3"],"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-6]|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","(?:[2457]\\d|33|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-467]|5[0-3]|8[0-7]))\\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|7090)\\d{5}|(?: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))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\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",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"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|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"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","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\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","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],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|8\\d\\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[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"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[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|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","(?:[15]\\d|800|92)\\d{7}",[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{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,12],[["(\\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]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d|90)\\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-9]"]]]],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[0-68]))\\d{4}|(?:2742|305[3-9]|472[247-9]|505[2-57-9]|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[0135-79]|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[0-247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|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-9]\\d)\\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,12],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|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\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","7093\\d{5}|(?: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])|7093[5-7])\\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|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"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}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],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,["348[57]\\d{7}",[11]],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}"]]]}};function a(e,t){var n=Array.prototype.slice.call(t);return n.push(r),e.apply(this,n)}var o=2,s=17,i=3,c="0-90-9٠-٩۰-۹",l="  ­​⁠ ",d="".concat("-‐-―−ー-").concat("//").concat("..").concat(l).concat("()()[]\\[\\]").concat("~⁓∼~"),u="++";function p(e){return p="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},p(e)}function h(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 f(e){var t=I();return function(){var n,r=A(e);if(t){var a=A(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}(this,n)}}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var t="function"==typeof Map?new Map:void 0;return m=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 y(e,arguments,A(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),E(r,e)},m(e)}function y(e,t,n){return y=I()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&E(a,n.prototype),a},y.apply(null,arguments)}function I(){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 E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var C=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&&E(e,t)}(o,e);var t,n,r,a=f(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=a.call(this,e),Object.setPrototypeOf(g(t),o.prototype),t.name=t.constructor.name,t}return t=o,n&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(m(Error));function _(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var o=Number(n[a]),s=Number(r[a]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))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}var S={}.constructor;function b(e){return null!=e&&e.constructor===S}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(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 T(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var $=" ext. ",O=/^\d+$/,R=function(){function e(t){v(this,e),F(t),this.metadata=t,B.call(this,t)}return T(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&&O.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new D(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new D(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}(),D=function(){function e(t,n){v(this,e),this.globalMetadataObject=n,this.metadata=t,B.call(this,n.metadata)}return T(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,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new x(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()&&L(this.types(),e))return new M(L(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?$:this.metadata[13]||$}}]),e}(),x=function(){function e(t,n){v(this,e),this._format=t,this.metadata=n}return T(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()||w.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),w=/^\(?\$1\)?$/,M=function(){function e(t,n){v(this,e),this.type=t,this.metadata=n}return T(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 L(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]}}function F(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!b(e)||!b(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(b(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+j(e)+": "+e,"."))}var j=function(e){return N(e)};function U(e,t){return(t=new R(t)).hasCountry(e)?t.country(e).ext():$}function k(e,t){if((t=new R(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function V(e,t){return t.countries.hasOwnProperty(e)}function B(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===_(t,"1.2.0")?this.v2=!0:-1===_(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var G=function(e){return"([".concat(c,"]{1,").concat(e,"})")};function W(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="#?",a="[  \\t]*";return";ext="+G("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+G("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+G("9")+r)+"|"+("[- ]+"+G("6")+"#")+"|"+(a+"(?:,{2}|;)"+n+G("15")+r)+"|"+(a+"(?:,)+"+n+G("9")+r)}var H="["+c+"]{"+o+"}",q="[++]{0,1}(?:["+d+"]*["+c+"]){3,}["+d+c+"]*",Y=new RegExp("^[++]{0,1}(?:["+d+"]*["+c+"]){1,2}$","i"),K=q+"(?:"+W()+")?",z=new RegExp("^"+H+"$|^"+K+"$","i");function X(e){return e.length>=o&&z.test(e)}var J=new RegExp("(?:"+W()+")$","i");function Q(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)return;if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function Z(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 ee={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 te(e){return ee[e]}function ne(e){for(var t,n="",r=Q(e.split(""));!(t=r()).done;){var a=te(t.value);a&&(n+=a)}return n}function re(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)return;if("string"==typeof e)return ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ae(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function ae(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 oe(e){for(var t,n="",r=re(e.split(""));!(t=r()).done;){n+=se(t.value,n)||""}return n}function se(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":te(e)}function ie(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)return;if("string"==typeof e)return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function ce(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 le(e,t){return de(e,void 0,t)}function de(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 de(e,"MOBILE",n);var o=n.type("MOBILE");o&&(a=function(e,t){for(var n,r=e.slice(),a=ie(t);!(n=a()).done;){var o=n.value;e.indexOf(o)<0&&r.push(o)}return r.sort((function(e,t){return e-t}))}(a,o.possibleLengths()))}else if(t&&!r)return"INVALID_LENGTH";var s=e.length,i=a[0];return i===s?"IS_POSSIBLE":i>s?"TOO_SHORT":a[a.length-1]<s?"TOO_LONG":a.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function ue(e,t,n){if(void 0===t&&(t={}),n=new R(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 pe(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.')}function pe(e,t){return"IS_POSSIBLE"===le(e,t)}function he(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function fe(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)return;if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function ge(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 me=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function ye(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new R(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(he(r,n.nationalNumberPattern())){if(Ie(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Ie(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,o=fe(me);!(a=o()).done;){var s=a.value;if(Ie(r,s,n))return s}}}}function Ie(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&he(e,t.pattern()))}function Ee(e,t,n){return t=t||{},(n=new R(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==ye(e,t,n.metadata):he(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}function Ae(e,t,n){var r=new R(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new R(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)})):[]}var Ce=new RegExp("(["+c+"])");function _e(e,t,n,r){if(t){var a=new R(r);a.selectNumberingPlan(t,n);var o=new RegExp(a.IDDPrefix());if(0===e.search(o)){var s=(e=e.slice(e.match(o)[0].length)).match(Ce);if(!(s&&null!=s[1]&&s[1].length>0&&"0"===s[1]))return e}}}function Se(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,o,s,i=r.length-1,c=i>0&&r[i];if(t.nationalPrefixTransformRule()&&c)a=e.replace(n,t.nationalPrefixTransformRule()),i>1&&(o=r[1]);else{var l=r[0];a=e.slice(l.length),c&&(o=r[1])}if(c){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(s=t.numberingPlan.nationalPrefix())}else s=r[0];return{nationalNumber:a,nationalPrefix:s,carrierCode:o}}}return{nationalNumber:e}}function be(e,t){var n=Se(e,t),r=n.carrierCode,a=n.nationalNumber;if(a!==e){if(!function(e,t,n){if(he(e,n.nationalNumberPattern())&&!he(t,n.nationalNumberPattern()))return!1;return!0}(e,a,t))return{nationalNumber:e};if(t.possibleLengths()&&!function(e,t){switch(le(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(a,t))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:r}}function Ne(e,t,n,r){var a=t?k(t,r):n;if(0===e.indexOf(a)){(r=new R(r)).selectNumberingPlan(t,n);var o=e.slice(a.length),s=be(o,r).nationalNumber,i=be(e,r).nationalNumber;if(!he(i,r.nationalNumberPattern())&&he(s,r.nationalNumberPattern())||"TOO_LONG"===le(i,r))return{countryCallingCode:a,number:o}}return{number:e}}function ve(e,t,n,r){if(!e)return{};var a;if("+"!==e[0]){var o=_e(e,t,n,r);if(!o||o===e){if(t||n){var s=Ne(e,t,n,r),c=s.countryCallingCode,l=s.number;if(c)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:c,number:l}}return{number:e}}a=!0,e="+"+o}if("0"===e[1])return{};r=new R(r);for(var d=2;d-1<=i&&d<=e.length;){var u=e.slice(1,d);if(r.hasCallingCode(u))return r.selectNumberingPlan(u),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(d)};d++}return{}}function Pe(e){return e.replace(new RegExp("[".concat(d,"]+"),"g")," ").trim()}var Te=/(\$\d)/;function $e(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,o=(n.carrierCode,n.metadata,e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(Te,t.nationalPrefixFormattingRule()):t.format()));return r?Pe(o):o}var Oe=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Re(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)return;var r,a,o=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){i=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw a}}return o}(e,t)||De(e,t)||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.")}()}function De(e,t){if(e){if("string"==typeof e)return xe(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)?xe(e,t):void 0}}function xe(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 we(e){for(var t,n,r,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=De(e))||t&&e&&"number"==typeof e.length){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=e.replace(/^tel:/,"tel=")).split(";"));!(r=a()).done;){var o=Re(r.value.split("="),2),s=o[0],i=o[1];switch(s){case"tel":t=i;break;case"ext":n=i;break;case"phone-context":"+"===i[0]&&(t=i+t)}}if(!X(t))return{};var c={number:t};return n&&(c.ext=n),c}function Me(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:"")}function Le(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)return;if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function Fe(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 je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Be(e,t,n,r){if(n=n?Ue(Ue({},Ve),n):Ve,r=new R(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,o=r.countryCallingCode(),s=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return s?He(a=Ge(s,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return s?(a=Ge(s,null,"INTERNATIONAL",r,n),He(a="+".concat(o," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(s);case"RFC3966":return Me({number:"+".concat(o).concat(s),ext:e.ext});case"IDD":if(!n.fromCountry)return;var i=function(e,t,n,r,a){var o=k(r,a.metadata);if(o===n){var s=Ge(e,t,"NATIONAL",a);return"1"===n?n+" "+s:s}var i=function(e,t,n){var r=new R(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():Oe.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,a.metadata);if(i)return"".concat(i," ").concat(n," ").concat(Ge(e,null,"INTERNATIONAL",a))}(s,e.carrierCode,o,n.fromCountry,r);return He(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Ge(e,t,n,r,a){var o=We(r.formats(),e);return o?$e(e,o,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function We(e,t){for(var n,r=Le(e);!(n=r()).done;){var a=n.value;if(a.leadingDigitsPatterns().length>0){var o=a.leadingDigitsPatterns()[a.leadingDigitsPatterns().length-1];if(0!==t.search(o))continue}if(he(t,a.pattern()))return a}}function He(e,t,n,r){return t?r(e,t,n):e}function qe(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 Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){Ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ze(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)}}var Xe=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("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("string"==typeof t){if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(b(n)&&b(n.countries)){r=n;var a=t;if(!Qe.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=ve(a,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");F(r);var s=function(e,t){var n,r,a=new R(t);Je(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),i=s.country,c=s.countryCallingCode;this.country=i,this.countryCallingCode=c,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}var t,n,r;return t=e,(n=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Ae(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return ue(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Ee(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new R(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return ye(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Be(this,e,t?Ye(Ye({},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)}}])&&ze(t.prototype,n),r&&ze(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Je=function(e){return/^[A-Z]{2}$/.test(e)};var Qe=/^\+\d+$/;function Ze(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)return;if("string"==typeof e)return et(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return et(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function et(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 tt(e,t){var n=t.countries,r=(t.defaultCountry,t.metadata);r=new R(r);for(var a,o=Ze(n);!(a=o()).done;){var s=a.value;if(r.country(s),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return s}else if(ye({phone:e,country:s},void 0,r.metadata))return s}}var nt=!1;function rt(e,t){var n=t.nationalNumber,r=t.defaultCountry,a=t.metadata;if(nt&&a.isNonGeographicCallingCode(e))return"001";var o=a.getCountryCodesForCallingCode(e);return o?1===o.length?o[0]:tt(n,{countries:o,defaultCountry:r,metadata:a.metadata}):void 0}var at="+",ot="(["+c+"]|[\\-\\.\\(\\)]?)",st=new RegExp("^\\"+at+ot+"*["+c+"]"+ot+"*$","g"),it=new RegExp("^("+("["+c+"]+((\\-)*["+c+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+c+"])*")+"\\.?$","g"),ct="tel:",lt=";phone-context=",dt=";isub=";function ut(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(lt);if(t<0)return null;var n=t+lt.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&&(st.test(e)||it.test(e))}(a))throw new C("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="",a.charAt(0)===at&&(n+=a);var o,s=e.indexOf(ct);o=s>=0?s+ct.length:0;var i=e.indexOf(lt);n+=e.substring(o,i)}var c=n.indexOf(dt);if(c>0&&(n=n.substring(0,c)),""!==n)return n}var pt=250,ht=new RegExp("[++"+c+"]"),ft=new RegExp("[^"+c+"#]+$"),gt=!1;function mt(e,t,n){if(t=t||{},n=new R(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new C("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=ut(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>pt){if(n)throw new C("TOO_LONG");return}if(!1===t)return e;var r=e.search(ht);if(r<0)return;return e.slice(r).replace(ft,"")}(e,n,t)}});if(!r)return{};if(!X(r))return function(e){return Y.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(J);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(J),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);if(a.ext)return a;return{number:r}}(e,t.v2,t.extract),a=r.number,i=r.ext,c=r.error;if(!a){if(t.v2){if("TOO_SHORT"===c)throw new C("TOO_SHORT");throw new C("NOT_A_NUMBER")}return{}}var l=function(e,t,n,r){var a,o=ve(oe(e),t,n,r.metadata),s=o.countryCallingCodeSource,i=o.countryCallingCode,c=o.number;if(i)r.selectNumberingPlan(i);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),t?a=t:gt&&r.isNonGeographicCallingCode(n)&&(a="001"),i=n||k(t,r.metadata)}if(!c)return{countryCallingCodeSource:s,countryCallingCode:i};var l=be(oe(c),r),d=l.nationalNumber,u=l.carrierCode,p=rt(i,{nationalNumber:d,defaultCountry:t,metadata:r});p&&(a=p,"001"===p||r.country(a));return{country:a,countryCallingCode:i,countryCallingCodeSource:s,nationalNumber:d,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),d=l.country,u=l.nationalNumber,p=l.countryCallingCode,h=l.countryCallingCodeSource,f=l.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new C("INVALID_COUNTRY");return{}}if(!u||u.length<o){if(t.v2)throw new C("TOO_SHORT");return{}}if(u.length>s){if(t.v2)throw new C("TOO_LONG");return{}}if(t.v2){var g=new Xe(p,u,n.metadata);return d&&(g.country=d),f&&(g.carrierCode=f),i&&(g.ext=i),g.__countryCallingCodeSource=h,g}var m=!!(t.extended?n.hasSelectedNumberingPlan():d)&&he(u,n.nationalNumberPattern());return t.extended?{country:d,countryCallingCode:p,carrierCode:f,valid:m,possible:!!m||!(!0!==t.extended||!n.possibleLengths()||!pe(u,n)),phone:u,ext:i}:m?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(d,u,i):{}}function yt(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 It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function At(e,t,n){return mt(e,It(It({},t),{},{v2:!0}),n)}function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function St(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)return;var r,a,o=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){i=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(e,t)}(e,t)||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.")}()}function bt(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 Nt(e){var t,n,r,a=St(Array.prototype.slice.call(e),4),o=a[0],s=a[1],i=a[2],c=a[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,s&&"string"!=typeof s){if(!b(s))throw new Error("Invalid second argument: ".concat(s));i?(n=s,r=i):r=s}else c?(n=i,r=c):(n=void 0,r=i),s&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){_t(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:s},n));return{text:t,options:n,metadata:r}}function vt(){var e=Nt(arguments);return At(e.text,e.options,e.metadata)}function Pt(){return a(vt,arguments)}function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(n),!0).forEach((function(t){Ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e,t,n){t&&t.defaultCountry&&!V(t.defaultCountry,n)&&(t=$t($t({},t),{},{defaultCountry:void 0}));try{return At(e,t,n)}catch(e){if(!(e instanceof C))throw e}}function Dt(){var e=Nt(arguments);return Rt(e.text,e.options,e.metadata)}function xt(){return a(Dt,arguments)}function wt(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 Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(t){Lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(){var e=Nt(arguments),t=e.text,n=e.options,r=e.metadata,a=Rt(t,n=Mt(Mt({},n),{},{extract:!1}),r);return a&&a.isValid()||!1}function jt(){return a(Ft,arguments)}function Ut(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 kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bt(){var e=Nt(arguments),t=e.text,n=e.options,r=e.metadata,a=Rt(t,n=kt(kt({},n),{},{extract:!1}),r);return a&&a.isPossible()||!1}function Gt(){return a(Bt,arguments)}function Wt(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 Ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){qt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(){var e=Nt(arguments),t=e.text,n=e.options,r=e.metadata;n=Ht(Ht({},n),{},{extract:!1});try{var a=At(t,n,r);(r=new R(r)).selectNumberingPlan(a.countryCallingCode);var o=le(a.nationalNumber,r);if("IS_POSSIBLE"!==o)return o}catch(e){if(e instanceof C)return e.message;throw e}}function Kt(){return a(Yt,arguments)}function zt(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 Xt(e,t,n){return t&&zt(e.prototype,t),n&&zt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Qt=Xt((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;Jt(this,e),this.key=t,this.value=n,this.next=r,this.prev=a})),Zt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;Jt(this,e),this.size=0,this.limit=t,this.head=null,this.tail=null,this.cache={}}return Xt(e,[{key:"put",value:function(e,t){if(this.ensureLimit(),this.head){var n=new Qt(e,t,this.head);this.head.prev=n,this.head=n}else this.head=this.tail=new Qt(e,t);this.cache[e]=this.head,this.size++}},{key:"get",value:function(e){if(this.cache[e]){var t=this.cache[e].value;return this.remove(e),this.put(e,t),t}console.log("Item not available in cache for key ".concat(e))}},{key:"ensureLimit",value:function(){this.size===this.limit&&this.remove(this.tail.key)}},{key:"remove",value:function(e){var t=this.cache[e];null!==t.prev?t.prev.next=t.next:this.head=t.next,null!==t.next?t.next.prev=t.prev:this.tail=t.prev,delete this.cache[e],this.size--}},{key:"clear",value:function(){this.head=null,this.tail=null,this.size=0,this.cache={}}}]),e}();function en(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)}}var tn=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cache=new Zt(t)}var t,n,r;return t=e,(n=[{key:"getPatternForRegExp",value:function(e){var t=this.cache.get(e);return t||(t=new RegExp("^"+e),this.cache.put(e,t)),t}}])&&en(t.prototype,n),r&&en(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function nn(e,t){if(e<0||t<=0||t<e)throw new TypeError;return"{".concat(e,",").concat(t,"}")}function rn(e,t){var n=t.search(e);return n>=0?t.slice(0,n):t}var an="   ᠎ - \u2028\u2029   ",on="[".concat(an,"]"),sn="[^".concat(an,"]"),cn="[".concat("0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9","]"),ln="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",dn="[".concat(ln,"]"),un=new RegExp(dn),pn="[".concat("$¢-¥֏؋৲৳৻૱௹฿៛₠-₹꠸﷼﹩$¢£¥₩","]"),hn=new RegExp(pn),fn="[".concat("̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ࣾऀ-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣଁ଼ିୁ-ୄ୍ୖୢୣஂீ்ా-ీె-ైొ-్ౕౖౢౣ಼ಿೆೌ್ೢೣു-ൄ്ൢൣ්ි-ුූัิ-ฺ็-๎ັິ-ູົຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᯦᮫ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᷀-ᷦ᷼-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꨩ-ꨮꨱꨲꨵꨶꩃꩌꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︦","]"),gn=new RegExp(fn),mn=new RegExp("[\0-€-ÿĀ-ſḀ-ỿƀ-ɏ̀-ͯ]");function yn(e){return!(!un.test(e)&&!gn.test(e))&&mn.test(e)}function In(e){return"%"===e||hn.test(e)}function En(e,t,n){var r=!0,a=Dt(e,n);if(a||(r=!1,a=Dt(e,{defaultCallingCode:t.countryCallingCode},n)),!a)return"INVALID_NUMBER";if(t.ext){if(a.ext!==t.ext)return"NO_MATCH"}else if(a.ext)return"NO_MATCH";return r&&t.countryCallingCode!==a.countryCallingCode?"NO_MATCH":t.number===a.number?r?"EXACT_MATCH":"NSN_MATCH":0===t.nationalNumber.indexOf(a.nationalNumber)||0===a.nationalNumber.indexOf(t.nationalNumber)?"SHORT_NSN_MATCH":"NO_MATCH"}const An={POSSIBLE:function(e,t){t.candidate,t.metadata;return!0},VALID:function(e,t){var n=t.candidate,r=(t.defaultCountry,t.metadata);return!(!e.isValid()||!Cn(e,n,r))},STRICT_GROUPING:function(e,t){var n=t.candidate,r=t.defaultCountry,a=t.metadata,o=t.regExpCache;return!(!e.isValid()||!Cn(e,n,a)||Sn(e,n)||!_n(e,{defaultCountry:r,metadata:a}))&&bn(e,n,a,vn,o)},EXACT_GROUPING:function(e,t){var n=t.candidate,r=t.defaultCountry,a=t.metadata,o=t.regExpCache;return!(!e.isValid()||!Cn(e,n,a)||Sn(e,n)||!_n(e,{defaultCountry:r,metadata:a}))&&bn(e,n,a,Nn,o)}};function Cn(e,t,n){for(var r=0;r<t.length-1;r++){var a=t.charAt(r);if("x"===a||"X"===a){var o=t.charAt(r+1);if("x"===o||"X"===o){if(r++,"NSN_MATCH"!==En(t.substring(r),e,n))return!1}else{var s=ne(t.substring(r));if(s){if(e.ext!==s)return!1}else if(e.ext)return!1}}}return!0}function _n(e,t){var n=t.defaultCountry,r=t.metadata;if("FROM_DEFAULT_COUNTRY"!==e.__countryCallingCodeSource)return!0;var a=new R(r);a.selectNumberingPlan(e.countryCallingCode);e.country||rt(e.countryCallingCode,{nationalNumber:e.nationalNumber,defaultCountry:n,metadata:a});var o=e.nationalNumber,s=We(a.numberingPlan.formats(),o);return!s.nationalPrefixFormattingRule()||(!!a.numberingPlan.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||(!s.usesNationalPrefix()||Boolean(e.nationalPrefix)))}function Sn(e,t){var n=t.indexOf("/");if(n<0)return!1;var r=t.indexOf("/",n+1);return!(r<0)&&(!("FROM_NUMBER_WITH_PLUS_SIGN"===e.__countryCallingCodeSource||"FROM_NUMBER_WITHOUT_PLUS_SIGN"===e.__countryCallingCodeSource)||ne(t.substring(0,n))!==e.countryCallingCode||t.slice(r+1).indexOf("/")>=0)}function bn(e,t,n,r,a){throw new Error("This part of code hasn't been ported")}function Nn(e,t,n,r){throw new Error("This part of code hasn't been ported")}function vn(e,t,n,r){throw new Error("This part of code hasn't been ported")}var Pn=/[\\/] *x/;function Tn(e){return rn(Pn,e)}var $n=/(?:(?:[0-3]?\d\/[01]?\d)|(?:[01]?\d\/[0-3]?\d))\/(?:[12]\d)?\d{2}/,On=/[12]\d{3}[-/]?[01]\d[-/]?[0-3]\d +[0-2]\d$/,Rn=/^:[0-5]\d/;function Dn(e,t,n){if($n.test(e))return!1;if(On.test(e)){var r=n.slice(t+e.length);if(Rn.test(r))return!1}return!0}var xn="(\\[([",wn=")\\])]",Mn="[^".concat(xn).concat(wn,"]"),Ln="[".concat(xn).concat(u,"]"),Fn=new RegExp("^"+Ln),jn=nn(0,3),Un=new RegExp("^(?:[(\\[([])?(?:"+Mn+"+["+wn+"])?"+Mn+"+(?:["+xn+"]"+Mn+"+["+wn+"])"+jn+Mn+"*$"),kn=/\d{1,5}-+\d{1,5}\s{0,4}\(\d{1,4}/;function Vn(e,t,n,r){if(Un.test(e)&&!kn.test(e)){if("POSSIBLE"!==r){if(t>0&&!Fn.test(e)){var a=n[t-1];if(In(a)||yn(a))return!1}var o=t+e.length;if(o<n.length){var s=n[o];if(In(s)||yn(s))return!1}}return!0}}function Bn(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)return;if("string"==typeof e)return Gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gn(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function Gn(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 Wn(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)}}var Hn=W(),qn=["\\/+(.*)/","(\\([^(]*)","(?:".concat(on,"-|-").concat(on,")").concat(on,"*(.+)"),"[‒-―-]".concat(on,"*(.+)"),"\\.+".concat(on,"*([^.]+)"),"".concat(on,"+(").concat(sn,"+)")],Yn=nn(0,2),Kn=nn(0,4),zn=s+i,Xn=nn(0,zn),Jn="[".concat(d,"]")+Kn,Qn=cn+nn(1,zn),Zn="(?:"+Ln+Jn+")"+Yn+Qn+"(?:"+Jn+Qn+")"+Xn+"(?:"+Hn+")?",er=new RegExp("[^".concat("0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൦-൵๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9").concat(ln,"#]+$")),tr=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,nr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(n={v2:n.v2,defaultCallingCode:n.defaultCallingCode,defaultCountry:n.defaultCountry&&V(n.defaultCountry,r)?n.defaultCountry:void 0,leniency:n.leniency||(n.extended?"POSSIBLE":"VALID"),maxTries:n.maxTries||tr}).leniency)throw new TypeError("`leniency` is required");if("POSSIBLE"!==n.leniency&&"VALID"!==n.leniency)throw new TypeError('Invalid `leniency`: "'.concat(n.leniency,'". Supported values: "POSSIBLE", "VALID".'));if(n.maxTries<0)throw new TypeError("`maxTries` must be `>= 0`");if(this.text=t,this.options=n,this.metadata=r,this.leniency=An[n.leniency],!this.leniency)throw new TypeError('Unknown leniency: "'.concat(n.leniency,'"'));this.maxTries=n.maxTries,this.PATTERN=new RegExp(Zn,"ig"),this.state="NOT_READY",this.searchIndex=0,this.regExpCache=new tn(32)}var t,n,r;return t=e,n=[{key:"find",value:function(){for(var e;this.maxTries>0&&null!==(e=this.PATTERN.exec(this.text));){var t=e[0],n=e.index;if(Dn(t=Tn(t),n,this.text)){var r=this.parseAndVerify(t,n,this.text)||this.extractInnerMatch(t,n,this.text);if(r){if(this.options.v2)return{startsAt:r.startsAt,endsAt:r.endsAt,number:r.phoneNumber};var a=r.phoneNumber,o={startsAt:r.startsAt,endsAt:r.endsAt,phone:a.nationalNumber};return a.country?o.country=a.country:o.countryCallingCode=a.countryCallingCode,a.ext&&(o.ext=a.ext),o}}this.maxTries--}}},{key:"extractInnerMatch",value:function(e,t,n){for(var r,a=Bn(qn);!(r=a()).done;)for(var o=r.value,s=!0,i=void 0,c=new RegExp(o,"g");this.maxTries>0&&null!==(i=c.exec(e));){if(s){var l=rn(er,e.slice(0,i.index)),d=this.parseAndVerify(l,t,n);if(d)return d;this.maxTries--,s=!1}var u=rn(er,i[1]),p=e.indexOf(u,i.index),h=this.parseAndVerify(u,t+p,n);if(h)return h;this.maxTries--}}},{key:"parseAndVerify",value:function(e,t,n){if(Vn(e,t,n,this.options.leniency)){var r=Dt(e,{extended:!0,defaultCountry:this.options.defaultCountry,defaultCallingCode:this.options.defaultCallingCode},this.metadata);if(r&&r.isPossible())return this.leniency(r,{candidate:e,defaultCountry:this.options.defaultCountry,metadata:this.metadata,regExpCache:this.regExpCache})?{startsAt:t,endsAt:t+e.length,phoneNumber:r}:void 0}}},{key:"hasNext",value:function(){return"NOT_READY"===this.state&&(this.lastMatch=this.find(),this.lastMatch?this.state="READY":this.state="DONE"),"READY"===this.state}},{key:"next",value:function(){if(!this.hasNext())throw new Error("No next element");var e=this.lastMatch;return this.lastMatch=null,this.state="NOT_READY",e}}],n&&Wn(t.prototype,n),r&&Wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function rr(){for(var e=Nt(arguments),t=e.text,n=e.options,r=e.metadata,a=new nr(t,n,r),o=[];a.hasNext();)o.push(a.next());return o}function ar(){return a(rr,arguments)}function or(){var e,t,n,r=Nt(arguments),a=r.text,o=r.options,s=r.metadata,i=new nr(a,o,s);return e={},t=Symbol.iterator,n=function(){return{next:function(){return i.hasNext()?{done:!1,value:i.next()}:{done:!0}}}},t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(){return a(or,arguments)}function ir(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 cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(n),!0).forEach((function(t){lr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ir(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dr(){for(var e=Nt(arguments),t=e.text,n=e.options,r=e.metadata,a=new nr(t,cr(cr({},n),{},{v2:!0}),r),o=[];a.hasNext();)o.push(a.next());return o}function ur(){return a(dr,arguments)}function pr(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 hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(n),!0).forEach((function(t){fr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gr(){var e=Nt(arguments),t=e.text,n=e.options,r=e.metadata,a=new nr(t,hr(hr({},n),{},{v2:!0}),r);return fr({},Symbol.iterator,(function(){return{next:function(){return a.hasNext()?{done:!1,value:a.next()}:{done:!0}}}}))}function mr(){return a(gr,arguments)}function yr(e,t){return nr.call(this,e,t,r)}function Ir(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)}}yr.prototype=Object.create(nr.prototype,{}),yr.prototype.constructor=yr;var Er=function(){function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onCountryChange=n,this.onCallingCodeChange=r}var t,n,r;return t=e,(n=[{key:"reset",value:function(e){var t=e.country,n=e.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(t,n)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"update",value:function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];this[r]=e[r]}}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){this.callingCode=e,this.onCallingCodeChange(e,this.country)}},{key:"startInternationalNumber",value:function(e,t){this.international=!0,this.initCountryAndCallingCode(e,t)}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])&&Ir(t.prototype,n),r&&Ir(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ar(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)return;if("string"==typeof e)return Cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cr(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function Cr(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 _r="x",Sr=new RegExp(_r);function br(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function Nr(e,t){return")"===e[t]&&t++,function(e){var t=[],n=0;for(;n<e.length;)"("===e[n]?t.push(n):")"===e[n]&&t.pop(),n++;var r=0,a="";t.push(e.length);for(var o=0,s=t;o<s.length;o++){var i=s[o];a+=e.slice(r,i),r=i+1}return a}(e.slice(0,t))}function vr(e,t,n){var r=n.metadata,a=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,n){var r=n.metadata,a=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode;if(a(t)){var s=Pr(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:r});if(s)return s}return Pr(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:r})}(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:o})}function Pr(e,t,n){var r=n.metadata,a=n.useNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix,s=$e(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:a,metadata:r});if(a||(e.nationalPrefix?s=e.nationalPrefix+o(t)+s:e.complexPrefixBeforeNationalSignificantNumber&&(s=e.complexPrefixBeforeNationalSignificantNumber+" "+s)),function(e,t){return ne(e)===t.getNationalDigits()}(s,e))return s}function Tr(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)}}var $r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],n=t.branches,r=t.instructions;if(n)return{op:"|",args:n.concat([xr(r)])};if(0===r.length)throw new Error("Pattern is required");return 1===r.length?r[0]:r}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Pattern is required");var t=e.match(Dr);if(t){var n=t[1],r=e.slice(0,t.index),a=e.slice(t.index+n.length);switch(n){case"(?:":r&&this.parsePattern(r),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(r&&this.parsePattern(r),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var o=this.getContext().branches;o.push(xr(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:o});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(r&&this.parsePattern(r),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(xr(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":r&&this.parsePattern(r),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:Or(r)});break;default:throw new Error("Unknown operator: ".concat(n))}a&&this.parsePattern(a)}else{if(Rr.test(e))throw new Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}}])&&Tr(t.prototype,n),r&&Tr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Or(e){for(var t=[],n=0;n<e.length;){if("-"===e[n]){if(0===n||n===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var r=e[n-1].charCodeAt(0)+1,a=e[n+1].charCodeAt(0)-1,o=r;o<=a;)t.push(String.fromCharCode(o)),o++}else t.push(e[n]);n++}return t}var Rr=/[\(\)\[\]\?\:\|]/,Dr=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function xr(e){return 1===e.length?e[0]:e}function wr(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)return;if("string"==typeof e)return Mr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mr(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function Mr(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 Lr(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)}}var Fr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.matchTree=(new $r).parse(t)}var t,n,r;return t=e,n=[{key:"match",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!e)throw new Error("String is required");var n=jr(e.split(""),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!n||!n.overflow||t)return n}}],n&&Lr(t.prototype,n),r&&Lr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function jr(e,t,n){if("string"==typeof t){var r=e.join("");return 0===t.indexOf(r)?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:0===r.indexOf(t)?n&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var a=e.slice(),o=0;o<t.length;){var s=jr(a,t[o],n&&o===t.length-1);if(!s)return;if(s.overflow)return s;if(!s.match){if(s.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(s,null,2)))}if(0===(a=a.slice(s.matchedChars.length)).length)return o===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0};o++}return n?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-a.length)}}switch(t.op){case"|":for(var i,c,l=wr(t.args);!(c=l()).done;){var d=jr(e,c.value,n);if(d){if(d.overflow)return d;if(d.match)return{match:!0,matchedChars:d.matchedChars};if(!d.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(d,null,2)));i=!0}}return i?{partialMatch:!0}:void 0;case"[]":for(var u,p=wr(t.args);!(u=p()).done;){var h=u.value;if(e[0]===h)return 1===e.length?{match:!0,matchedChars:e}:n?{overflow:!0}:{match:!0,matchedChars:[h]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function Ur(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)return;if("string"==typeof e)return kr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kr(e,t)}(e))||t&&e&&"number"==typeof e.length){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.")}function kr(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 Vr(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)}}var Br=br("9",15),Gr=/[- ]/,Wr=function(){return/\[([^\[\]])*\]/g},Hr=function(){return/\d(?=[^,}][^,}])/g},qr=new RegExp("["+d+"]*\\$1["+d+"]*(\\$\\d["+d+"]*)*$"),Yr=function(){function e(t){t.state;var n=t.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=n,this.resetFormat()}var t,n,r;return t=e,n=[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var n,r,a=this;if(n=t.nationalSignificantNumber,r=this.metadata,"IS_POSSIBLE"===le(n,r))for(var o,s=Ur(this.matchingFormats);!(o=s()).done;){var i=o.value,c=vr(t,i,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return a.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:function(e){return a.getSeparatorAfterNationalPrefix(e)}});if(c)return this.resetFormat(),this.chosenFormat=i,this.setNationalNumberTemplate(c.replace(/\d/g,_r),t),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(_r),c}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var n=this.chosenFormat,r=this.chooseFormat(t);if(r)return r===n?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,n=e.nationalSignificantNumber,r=e.nationalPrefix,a=e.international,o=n,s=o.length-3;s<0&&(s=0),this.matchingFormats=this.matchingFormats.filter((function(e){return t.formatSuits(e,a,r)&&t.formatMatches(e,o,s)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,n){return!(n&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!n&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,n){var r=e.leadingDigitsPatterns().length;if(0===r)return!0;n=Math.min(n,r-1);var a=e.leadingDigitsPatterns()[n];if(t.length<3)try{return void 0!==new Fr(a).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(a,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){for(var t,n=this,r=function(){var r=t.value;return n.chosenFormat===r?"break":qr.test(n.getFormatFormat(r,e.international))?n.createTemplateForFormat(r,e)?(n.chosenFormat=r,"break"):(n.matchingFormats=n.matchingFormats.filter((function(e){return e!==r})),"continue"):"continue"},a=Ur(this.matchingFormats.slice());!(t=a()).done;){var o=r();if("break"===o)break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var n=this.getTemplateForFormat(e,t);return n?(this.setNationalNumberTemplate(n,t),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(e){return this.isNANP||e&&e.nationalPrefixFormattingRule()&&Gr.test(e.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var n=e.IDDPrefix,r=e.missingPlus;return n?t&&!1===t.spacing?n:n+" ":r?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,n=0,r=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";n<r.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf(_r,t+1),n++;return Nr(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,_r)+br(_r,t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var n=t.nationalSignificantNumber,r=t.international,a=t.nationalPrefix,o=t.complexPrefixBeforeNationalSignificantNumber,s=e.pattern();s=s.replace(Wr(),"\\d").replace(Hr(),"\\d");var i=Br.match(s)[0];if(!(n.length>i.length)){var c=new RegExp("^"+s+"$"),l=n.replace(/\d/g,"9");c.test(l)&&(i=l);var d,u=this.getFormatFormat(e,r);if(this.shouldTryNationalPrefixFormattingRule(e,{international:r,nationalPrefix:a})){var p=u.replace(Te,e.nationalPrefixFormattingRule());if(ne(e.nationalPrefixFormattingRule())===(a||"")+ne("$1")&&(u=p,d=!0,a))for(var h=a.length;h>0;)u=u.replace(/\d/,_r),h--}var f=i.replace(new RegExp(s),u).replace(new RegExp("9","g"),_r);return d||(o?f=br(_r,o.length)+" "+f:a&&(f=br(_r,a.length)+this.getSeparatorAfterNationalPrefix(e)+f)),r&&(f=Pe(f)),f}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,n){for(var r,a=Ar(n.split(""));!(r=a()).done;){var o=r.value;if(e.slice(t+1).search(Sr)<0)return;t=e.search(Sr),e=e.replace(Sr,o)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(t)return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],Nr(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(e,t){var n=t.international,r=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var a=e.usesNationalPrefix();if(a&&r||!a&&!n)return!0}}}],n&&Vr(t.prototype,n),r&&Vr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Kr(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)return;var r,a,o=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){i=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zr(e,t)}(e,t)||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.")}()}function zr(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 Xr(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)}}var Jr=new RegExp("^"+("["+d+c+"]+")+"$","i"),Qr="(?:[++]["+d+c+"]*|["+d+c+"]+)",Zr=new RegExp("[^"+d+c+"]+.*$"),ea=/[^\d\[\]]/,ta=function(){function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,a=t.metadata,o=t.onNationalSignificantNumberChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=a,this.onNationalSignificantNumberChange=o}var t,n,r;return t=e,(n=[{key:"input",value:function(e,t){var n,r=function(e){var t=function(e){var t=function(e){var t,n=e.search(Qr);if(!(n<0))return"+"===(e=e.slice(n))[0]&&(t=!0,e=e.slice(1)),e=e.replace(Zr,""),t&&(e="+"+e),e}(e)||"";return"+"===t[0]?[t.slice(1),!0]:[t]}(e),n=Kr(t,2),r=n[0],a=n[1];return Jr.test(r)||(r=""),[r,a]}(e),a=Kr(r,2),o=a[0],s=a[1],i=ne(o);return s&&(t.digits||(t.startInternationalNumber(),i||(n=!0))),i&&this.inputDigits(i,t),{digits:i,justLeadingPlus:n}}},{key:"inputDigits",value:function(e,t){var n=t.digits,r=n.length<3&&n.length+e.length>=3;if(t.appendDigits(e),r&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),(function(e){return t.update(e)}))}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,n=e.callingCode;return t&&!n}},{key:"extractCountryCallingCode",value:function(e){var t=ve("+"+e.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode,r=t.number;if(n)return e.setCallingCode(n),e.update({nationalSignificantNumber:r}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&ea.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var n=Se(e,this.metadata),r=n.nationalPrefix,a=n.nationalNumber,o=n.carrierCode;if(a!==e)return this.onExtractedNationalNumber(r,o,a,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,n){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,n);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var r=Se(e,this.metadata),a=r.nationalPrefix,o=r.nationalNumber,s=r.carrierCode;if(o!==t)return this.onExtractedNationalNumber(a,s,o,e,n),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,n,r,a){var o,s,i=r.lastIndexOf(n);if(i>=0&&i===r.length-n.length){s=!0;var c=r.slice(0,i);c!==e&&(o=c)}a({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:n,nationalSignificantNumberMatchesInput:s,complexPrefixBeforeNationalSignificantNumber:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,(function(t){return e.update(t)}))||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,n=e.IDDPrefix,r=e.digits;if(e.nationalSignificantNumber,!t&&!n){var a=_e(r,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==a&&a!==r?(e.update({IDDPrefix:r.slice(0,r.length-a.length)}),this.startInternationalNumber(e,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=Ne(e.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode;if(t.number,n)return e.update({missingPlus:!0}),this.startInternationalNumber(e,{country:e.country,callingCode:n}),!0}}},{key:"startInternationalNumber",value:function(e,t){var n=t.country,r=t.callingCode;e.startInternationalNumber(n,r),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),(function(t){return e.update(t)}))}}])&&Xr(t.prototype,n),r&&Xr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function na(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)return;var r,a,o=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){i=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ra(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ra(e,t)}(e,t)||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.")}()}function ra(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 aa(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)}}var oa=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=new R(n);var r=na(this.getCountryAndCallingCode(t),2),a=r[0],o=r[1];this.defaultCountry=a,this.defaultCallingCode=o,this.reset()}var t,n,r;return t=e,(n=[{key:"getCountryAndCallingCode",value:function(e){var t,n;return e&&(b(e)?(t=e.defaultCountry,n=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,n]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),n=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(n){var r;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(r=this.formatter.format(n,this.state)),void 0===r&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var a=this.state.getNationalDigits();a&&(r=this.formatter.format(a,this.state))}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new Er({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,n){e.metadata.selectNumberingPlan(n,t),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new Yr({state:this.state,metadata:this.metadata}),this.parser=new ta({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){var e=this.state.country;return e}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var n=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},r=this.state.callingCode;return n(r?e?"".concat(r," ").concat(e):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.complexPrefixBeforeNationalSignificantNumber,r=e.nationalPrefix,a=t,o=n||r;return o&&(a=o+a),a}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(e?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,_r)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(rt(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,n=e.callingCode,r=e.country,a=e.nationalSignificantNumber;if(t)return this.isInternational()?n?"+"+n+a:"+"+t:r||n?"+"+(r?this.metadata.countryCallingCode():n)+a:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.carrierCode,r=e.callingCode,a=this._getCountry();if(t&&(a||r)){if(a&&a===this.defaultCountry){var o=new R(this.metadata.metadata);o.selectNumberingPlan(a);var s=o.numberingPlan.callingCode(),i=this.metadata.getCountryCodesForCallingCode(s);if(i.length>1){var c=tt(t,{countries:i,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});c&&(a=c)}}var l=new Xe(a||r,t,this.metadata.metadata);return n&&(l.carrierCode=n),l}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])&&aa(t.prototype,n),r&&aa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function sa(e){return oa.call(this,e,r)}function ia(){return a(V,arguments)}function ca(e){return new R(e).getCountries()}function la(){return a(ca,arguments)}function da(){return a(k,arguments)}function ua(){return a(U,arguments)}function pa(){return R.call(this,r)}function ha(e,t,n){if(t[e])return new Xe(e,t[e],n)}function fa(){return a(ha,arguments)}function ga(e,t,n){return n||(n=t,t=void 0),new oa(t,n).input(e)}function ma(){return a(ga,arguments)}function ya(e){return Xe.call(this,e,r)}function Ia(){var e=Nt(arguments);return mt(e.text,e.options,e.metadata)}function Ea(){return a(Ia,arguments)}function Aa(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)return;var r,a,o=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){i=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ca(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ca(e,t)}(e,t)||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.")}()}function Ca(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 _a(){var e=function(e){var t,n,r,a,o=Aa(Array.prototype.slice.call(e),5),s=o[0],i=o[1],c=o[2],l=o[3],d=o[4];if("string"==typeof s)if("string"==typeof c)n=c,d?(r=l,a=d):a=l,t=mt(s,{defaultCountry:i,extended:!0},a);else{if("string"!=typeof i)throw new Error("`format` argument not passed to `formatNumber(number, format)`");n=i,l?(r=c,a=l):a=c,t=mt(s,{extended:!0},a)}else{if(!b(s))throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");t=s,n=i,l?(r=c,a=l):a=c}"International"===n?n="INTERNATIONAL":"National"===n&&(n="NATIONAL");return{input:t,format:n,options:r,metadata:a}}(arguments);return Be(e.input,e.format,e.options,e.metadata)}function Sa(){return a(_a,arguments)}function ba(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)return;var r,a,o=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){i=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Na(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Na(e,t)}(e,t)||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.")}()}function Na(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 va(){var e=Pa(arguments),t=e.input,n=e.options,r=e.metadata;if(t.phone)return ye(t,n,r)}function Pa(e){var t,n,r=ba(Array.prototype.slice.call(e),4),a=r[0],o=r[1],s=r[2],i=r[3],c={};if("string"==typeof a)b(o)?(s?(c=o,n=s):n=o,t=X(a)?mt(a,void 0,n):{}):(i?(c=s,n=i):n=s,t=X(a)?mt(a,{defaultCountry:o},n):{});else{if(!b(a))throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");t=a,s?(c=o,n=s):n=o}return{input:t,options:c,metadata:n}}function Ta(){return a(va,arguments)}function $a(){var e=Pa(arguments),t=e.input,n=e.options,r=e.metadata;return!!(t.phone||n&&n.v2)&&ue(t,n,r)}function Oa(){return a($a,arguments)}function Ra(){var e=Pa(arguments),t=e.input,n=e.options,r=e.metadata;return!!t.phone&&Ee(t,n,r)}function Da(){return a(Ra,arguments)}function xa(e,t,n){if("string"!=typeof e)throw new TypeError("number must be a string");if("string"!=typeof t)throw new TypeError("country must be a string");return function(e,t,n,r){return n=n||{},e.country===t&&Ee(e,n,r)}(X(e)?mt(e,{defaultCountry:t},n):{},t,void 0,n)}function wa(){return a(xa,arguments)}function Ma(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)}}sa.prototype=Object.create(oa.prototype,{}),sa.prototype.constructor=sa,pa.prototype=Object.create(R.prototype,{}),pa.prototype.constructor=pa,ya.prototype=Object.create(Xe.prototype,{}),ya.prototype.constructor=ya;W();var La=new RegExp("^["+l+"]+"),Fa=new RegExp("["+d+"]+$");function ja(e,t,n){void 0===t&&(t={});var r,a,o,s=new Ua(e,t,n);return r={},a=Symbol.iterator,o=function(){return{next:function(){return s.hasNext()?{done:!1,value:s.next()}:{done:!0}}}},a in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o,r}var Ua=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.text=t,this.options=n||{},this.metadata=r,this.state="NOT_READY",this.regexp=new RegExp(K,"ig")}var t,n,r;return t=e,n=[{key:"find",value:function(){var e=this.regexp.exec(this.text);if(e){var t=e[0],n=e.index;t=t.replace(La,""),n+=e[0].length-t.length,t=Tn(t=t.replace(Fa,""));var r=this.parseCandidate(t,n);return r||this.find()}}},{key:"parseCandidate",value:function(e,t){if(Dn(e,t,this.text)&&Vn(e,t,this.text,this.options.extended?"POSSIBLE":"VALID")){var n=mt(e,this.options,this.metadata);if(n.phone)return n.startsAt=t,n.endsAt=t+e.length,n}}},{key:"hasNext",value:function(){return"NOT_READY"===this.state&&(this.last_match=this.find(),this.last_match?this.state="READY":this.state="DONE"),"READY"===this.state}},{key:"next",value:function(){if(!this.hasNext())throw new Error("No next element");var e=this.last_match;return this.last_match=null,this.state="NOT_READY",e}}],n&&Ma(t.prototype,n),r&&Ma(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ka(){var e=Nt(arguments);return function(e,t,n){void 0===t&&(t={});for(var r=new Ua(e,t,n),a=[];r.hasNext();)a.push(r.next());return a}(e.text,e.options,e.metadata)}function Va(){var e=Nt(arguments);return ja(e.text,e.options,e.metadata)}function Ba(){return a(ka,arguments)}function Ga(){return a(Va,arguments)}function Wa(e,t){Ua.call(this,e,t,r)}Wa.prototype=Object.create(Ua.prototype,{}),Wa.prototype.constructor=Wa}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r](o,o.exports,n),o.loaded=!0,o.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),(()=>{"use strict";var e={};n.r(e),n.d(e,{buildContextName:()=>H,buildModalContext:()=>z,buildTransientContextName:()=>q,getContainerIdFromContext:()=>J,getParentContext:()=>X,getParentContextName:()=>W,getTargetFromContext:()=>K,getTransientContext:()=>Y});var t={};n.r(t),n.d(t,{getResolvedTargetName:()=>mt,getRoutingInfo:()=>yt,getSemanticURLFromRoutingInfo:()=>It});var r={};n.r(r),n.d(r,{evaluate:()=>Kt,handleChange:()=>qt,hasDeclareExpression:()=>Ht,updateDeclareExpressions:()=>Yt});var a={};n.r(a),n.d(a,{publishExpressions:()=>Rr,publishResponse:()=>Dr});var o={};n.r(o),n.d(o,{hasBrowserEnv:()=>Co,hasStandardBrowserEnv:()=>So,hasStandardBrowserWebWorkerEnv:()=>bo,navigator:()=>_o,origin:()=>No});var s={};n.r(s),n.d(s,{CONTAINER_NAMES:()=>Zd,CONTAINER_TYPES:()=>Qd,addRootContainerItem:()=>Du,areContainerItemsPresent:()=>ou,clearTransientData:()=>ju,closeContainerItem:()=>Ru,getActiveContainerItemContext:()=>mu,getActiveContainerItemIDFromRoutingInfo:()=>Xu,getActiveContainerItemName:()=>pu,getActiveContext:()=>qu,getChildContainerItems:()=>yu,getChildContainers:()=>Iu,getChildContainersContexts:()=>Eu,getContainerAPI:()=>Vu,getContainerAccessOrder:()=>au,getContainerData:()=>tu,getContainerItemByKey:()=>lu,getContainerItemData:()=>nu,getContainerItemName:()=>iu,getContainerItems:()=>ru,getContainerLimit:()=>bu,getContainerParentContext:()=>zu,getContainerType:()=>uu,getContextByTargetAndKey:()=>Ku,getDataContextName:()=>gu,getFlowContainer:()=>Qu,getLeastRecentlyUsedNonDirtyContainerItemID:()=>$u,getParentContainerItem:()=>Ju,getRootContainerName:()=>Hu,getSuggestionContexts:()=>Au,getTargetFromContainerItemID:()=>Ou,getTransientItems:()=>Mu,hasContainerItems:()=>Su,isContainerDirty:()=>Tu,isContainerInitialized:()=>du,isContainerItemActive:()=>hu,isContainerItemContextBeingUsedInOtherContainers:()=>wu,isContainerItemExists:()=>su,isContainerLimitReached:()=>vu,isContainerMultipleMode:()=>_u,isContainerSingleMode:()=>Cu,purgeTransientData:()=>Uu,removeContainer:()=>Bu,replaceTransientData:()=>Fu,resetContainersPayload:()=>Pu,setContainerLimit:()=>Nu,updateCaseContextEtag:()=>Wu,updateParentLastUpdateTime:()=>Yu,updateRelatedContextEtag:()=>Gu,updateTransientData:()=>Lu});var i={};n.r(i),n.d(i,{getAdditionalInfo:()=>Jp,getDataPageKeys:()=>Kp,getDataPageMetadata:()=>kp,getEmbeddedPropertyMetadata:()=>xp,getFieldParameters:()=>Wp,getFieldsByClassName:()=>Gp,getGenAICoach:()=>qp,getInsight:()=>Bp,getLookUpDataPage:()=>zp,getLookUpDataPageInfo:()=>Xp,getParagraph:()=>Hp,getPersonalizationMetadata:()=>Vp,getPropertyMetadata:()=>Dp,getResolvedFieldMetadata:()=>Qp,getSavableDataPage:()=>Yp,isViewExists:()=>jp,mergeStore:()=>Rp,resolveNavigation:()=>Up,resolveView:()=>Fp,updateNavigationStore:()=>Mp,updateStores:()=>Lp,updateViewStore:()=>wp});var c={};n.r(c),n.d(c,{dispatch:()=>oh,doesContextExist:()=>Eh,getActionType:()=>ph,getContextValue:()=>dh,getDataObject:()=>sh,getReferenceTokens:()=>nh,getSharedDataObject:()=>ih,getStore:()=>ah,getValue:()=>lh,isMergeable:()=>fh,lookupContextValue:()=>uh,mergeDeep:()=>gh,removeItem:()=>hh,replaceValue:()=>yh,resetStore:()=>Ih,setStore:()=>rh,updateValue:()=>mh});var l={};n.r(l),n.d(l,{activateContainerItem:()=>zh,addContainerItem:()=>Uh,addMessages:()=>Xh,addSharedData:()=>sf,addTransientItem:()=>kh,addWork:()=>Mh,clearTransientData:()=>Bh,createWork:()=>$h,error:()=>of,finishAssignment:()=>tf,initContainers:()=>Fh,listAction:()=>lf,loadView:()=>xh,mergeData:()=>Rh,openAssignment:()=>nf,openWorkByHandle:()=>Lh,postProcess:()=>af,purgeTransientData:()=>Wh,removeAllTransientItems:()=>Qh,removeContainerItem:()=>Jh,removeSharedData:()=>cf,removeTransientItem:()=>Zh,replaceContainerItem:()=>ef,replaceTransientData:()=>Gh,resetContainers:()=>jh,resetLoading:()=>Yh,setLoading:()=>qh,setSharedProperty:()=>uf,setStateProperty:()=>pf,showCasePreview:()=>df,showHarness:()=>Dh,showHistory:()=>rf,showPage:()=>wh,upMergeAndRemoveContainerItem:()=>Kh,updateContainerItem:()=>Hh,updateTransientData:()=>Vh});var d={};n.r(d),n.d(d,{doesRestApiExist:()=>Lm,getCancelTokenSource:()=>Fm,getCaseApi:()=>km,getHeaderProcessor:()=>xm,invokeCustomRestApi:()=>Mm,invokeRestApi:()=>wm,isRequestCanceled:()=>jm,registerInterceptor:()=>Um});var u={};n.r(u),n.d(u,{fetchViewResources:()=>pE,updateViewResources:()=>uE});var p=n(216),h=n.n(p);let f,g,m;const y=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)},I=()=>m,E=()=>f.BASEURL,A=e=>fetch(`${f.BASEURL}${f.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),C=e=>{g=e},_=()=>g;var S=n(953),b=n(521),N=n.n(b),v=n(928),P=n.n(v),T=n(188),$=n.n(T),O=n(835),R=n.n(O),D=n(692),x=n.n(D),w=n(529),M=n.n(w);const L=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}},F={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",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails"},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},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"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},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",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",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",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment"},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",ASSIGNMENT:"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_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_LOCALACTION_SUBMISSION:"localActionSubmit",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",SHOW_PAGE_STARTED:"showPageStarted"},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",NOTIFICATION_UPDATED:"notificationUpdated"},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"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer"},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",ASSIGNMENT_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"}},j={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",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_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",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_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"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",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",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",PY_CONFIRM:"pyConfirm",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"},DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...F,EMBED:"EMBED",getProperty:e=>L.map(e)},U="pyRemoteCaseDetails";class k{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>Nh.getProperty(".RemoteSystemID",j.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))};static isTraditionalRemoteCase=(e="")=>"Traditional"===k.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=cp.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID}}const V=k,B={},G=new Map,W=e=>{let t=j.EMPTY_STRING;return t=e&&e.includes(j.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},H=(e,t,n=!1)=>{let r=j.EMPTY_STRING;if(t&&e){let a=`${t}${j.FORWARD_SLASH_STRING}${e}`;const o=tu(a);if(o||t!==j.APP.APP&&t!==j.APP.ROOT)if(o){if(n&&B[a])return r=`${a}${j.UNDERSCORE_STRING}${B[a]}`,r;B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}else r=H(e,W(t));else a=`${t}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}return r},q=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`}return""},Y=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`:q(e,t)}return""},K=e=>{let t=j.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},z=(e,t)=>{if(null===e)return t;const[,n]=t.split(j.FORWARD_SLASH_STRING);return e+j.FORWARD_SLASH_STRING+n},X=e=>{const t=e.indexOf(j.FORWARD_SLASH_STRING),n=e.lastIndexOf(j.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},J=e=>{const t=e.split(j.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+j.FORWARD_SLASH_STRING+t[2]},Q="SET_PROPERTY",Z="REPLACE_PROPERTY",ee="FIELD_CHANGE",te="LOAD_VIEW",ne="SHOW_PAGE",re="SHOW_DATA",ae="SHOW_INSIGHT",oe="SHOW_DASHBOARD",se="SET_LOADING",ie="RESET_LOADING",ce="SET_SHARED_PROPERTY",le="CREATE_WORK",de="OPEN_WORK_BY_HANDLE",ue="UPDATE_DOCUMENT",pe="FINISH_ASSIGNMENT",he="CANCEL_ASSIGNMENT",fe="OPEN_ASSIGNMENT",ge="MERGE_DATA",me="REMOVE_ITEM",ye="GET_DATAOBJECT_ACTIONS",Ie="SHOW_HISTORY",Ee="ERROR",Ae="INIT_CONTAINERS",Ce="RESET_CONTAINERS",_e="ADD_CONTAINER_ITEM",Se="REMOVE_CONTAINER_ITEM",be="ADD_TRANSIENT_ITEM",Ne="UPDATE_TRANSIENT_DATA",ve="REMOVE_TRANSIENT_ITEM",Pe="REMOVE_ALL_TRANSIENT_ITEMS",Te="CLEAR_TRANSIENT_DATA",$e="PURGE_TRANSIENT_DATA",Oe="REPLACE_TRANSIENT_DATA",Re="ACTIVATE_CONTAINER_ITEM",De="UPDATE_CONTAINER_ITEM",xe="UPMERGE_AND_REMOVE_CONTAINER_ITEM",we="REPLACE_CONTAINER_ITEM",Me="ACTIVATE_MODAL_CONTAINER_ITEM",Le="REMOVE_CONTAINER",Fe="ADD_SUGGESTION_CONTEXT",je="showView",Ue="showData",ke="showInsight",Ve="showDashboard",Be="openWorkByHandle",Ge="openAssignment",We="createNewWork",He="SHOW_CANCEL_ALERT",qe="openLocalAction",Ye="openProcessAction",Ke="caseWideActions",ze="openBulkAction",Xe="performBulkAction",Je="ADD_MESSAGES",Qe="CLEAR_MESSAGES",Ze="RESET_STORE",et="FETCH_DATAPAGE",tt="ADD_SHARED_DATA",nt="REMOVE_SHARED_DATA",rt="LIST_ACTION",at="DELETE_CASE_SUMMARY",ot="ALTER_BLOCKING_ACTION_COUNT",st="CREATE_DATA_OBJECT",it="DELETE_DATA_OBJECT",ct="VIEW_DATA_OBJECT",lt="UPDATE_DATA_OBJECT",dt="OPEN_DATA_OBJECT_ACTION",ut="SUBMIT_DATA_OBJECT_ACTION",pt="OPEN_EMBEDDED_DATA_MODAL",ht="SUBMIT_EMBEDDED_DATA_MODAL",ft="FILL_FORM_WITH_AI",gt="openCase",mt=(e,t)=>{if(!e||!t)return null;let n,r=j.EMPTY_STRING;return t&&(r=`${t}${j.FORWARD_SLASH_STRING}${e}`,n=tu(r),n||t.includes("/")?n||(r=mt(e,W(t))):r=`${t}${j.FORWARD_SLASH_STRING}${e}`),r},yt=(e,t)=>{const n=mt(e,t);return n&&tu(n)?tu(n):{}},It=(e,t)=>ip.getSemanticURL(je,{page:e},t);const Et=new class{error=e=>{console.error(e)}};class At{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=Tt[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=Pt[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}=Tt[this._state];this._subParser=new At(this._grammar,e,t)}_endSubExpression(){Tt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,At._setParent(e,this._position)):this._tree=e,this._position=e}}const Ct=At,_t="identifier",St={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},bt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Nt={">":{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"},"&&":St,AND:St,and:St,"||":bt,OR:bt,or:bt,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=[];let n="";return t[0]=this.evaluateAST(e.left),e.left.operationType===_t&&this._context&&(n=this._context.getFieldMetadata(e.left.value.substring(1))?.type??""),t[1]=e.right?this.evaluateAST(e.right,n):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]??"":this._contextTreeNodeContext?Nh.getLitePropertyValue(this._contextTreeNodeContext,e.value):this._context.getValue(e.value)??""},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){return this._grammar[e.operator].evaluate(e.right)}},Pt={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};Ct._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:_t,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Tt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:_t},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Pt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},$t=["binaryOperator","unaryOperator","openParenthesis"],Ot=/^\s*$/,Rt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Dt=/\\\\/,xt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],wt=["[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]+)"],Mt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Lt{constructor(e){this._grammar=e}static _isNegative(e){return $t.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Ot)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(Rt)&&(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(Dt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Lt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[xt.join("|"),e.join("|"),wt.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=Lt._unquote(e):e.match(Mt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(Rt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Lt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Lt._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 Ft=Lt;const jt=class{constructor(e,t){this._grammar={...Nt},this._expression=e,this._ast=null,this._context={},this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new Ft(this._grammar).tokenize(this._expression),t=new Ct(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return vt[e.operationType].call(this,e,t)}},Ut=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new jt(n,t)},kt=e=>!e||e.buildAST(),Vt=(e,t,n)=>!e||e.evaluate(t,n),Bt=(e,t,n)=>{const r=Ut(e,t),a=kt(r);return Vt(a,n)};const Gt=class{static handleExpression(e,t,n,r){const a=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:a}}).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:Nh.getPropertyValue(`${n}.pxObjClass`,null,t)||Nh.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>oh({type:Q,payload:{context:t,reference:n,value:e[n]}})))}},Wt={},Ht=(e,t)=>Wt[t]&&Object.prototype.hasOwnProperty.call(Wt[t],e),qt=e=>{const{context:t}=e;Ht(e.reference,t)&&Gt.handleExpression(e.reference,e.value,Wt[t][e.reference],t)},Yt=(e={})=>{Ch.copy(e,Wt)},Kt=(e,t,n)=>Bt(e,t,n?.pConnect.getPConnect());const zt=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(r)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);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&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]}};const Xt=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={}){Ch.copy(e,this.componentMap)}mergeOverrideMap(e={}){Ch.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const Jt=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const Qt=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),a=-1===r?e:e.substring(0,r),o=Jt.getHandler(a);return o?o(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return Jt.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=Xt.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 o=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,o);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];o.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&&Ch.isString(e)){const t=e.startsWith(j.PROPERTY_ANNOTATION)||e.startsWith(j.ATTACHMENT_ANNOTATION)||e.startsWith(j.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(Ch.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return Ch.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)}},Zt=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},en=(e,t)=>{if(e&&t){const n=Ch.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},tn=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},nn=(e,t)=>{const n=Nh.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Nh.getPropertyValue(F.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===F.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=sh(e);a=t?.context_data?.actionType===j.CASE}return a},rn=e=>dh(null,j.CASE_VIEW_MODE_PROP,e)===j.PERFORM_MODE&&(e.includes(j.WORKAREA)||e.includes(j.MODAL)),an=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},on=(e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,o=a?.filter((e=>e.ID===j.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&o?.length>0?o[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},sn=(e,t,n)=>{let r,a,o,s,i,c,l,d,u;const p=sh(e);return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,a=p.caseInfo.ID,o=p.caseInfo.assignments,s=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,d=p.caseInfo.caseTypeID,u=p.caseInfo.caseTypeName):(r=t.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=t.getValue(F.CASE_INFO.CASE_INFO_ID),o=t.getValue(F.CASE_INFO.ASSIGNMENTS),s=t.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(F.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(F.CASE_INFO.CASE_INFO),l=t.getValue(F.CASE_INFO.BUSINESS_ID),d=t.getValue(F.CASE_INFO.CASE_TYPE_ID),u=t.getValue(F.CASE_INFO.CASE_TYPE_NAME)),{assignmentID:r,caseID:a,assignments:o,localActionID:s,caseActions:i,caseInfo:c,businessID:l,caseTypeID:d,caseTypeName:u}};const cn=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&&oh({type:se,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]&&oh({type:ie,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)}};const ln=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,a="unknown",o,s=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:r,actionPayload:o};return this.actionMgrActions[e]=i,s&&cn.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,r;""===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");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),cn.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),cn.disableLoadingIndicator(r.actionPayload,t)):a=null,a}};class dn{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new dn(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const un=dn;const pn=class{constructor(e,t,n,r={}){this.type=F.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},hn=/(([^.]+)\[\d+\])/g,fn=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(hn);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},gn=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:mn,WHEN:yn,DECLARATIVE_TARGET:In,PAGELIST:En}=j.CONTEXT_TREE_NODE_TYPES;const An=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[mn,new Map],[yn,new Map],[In,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===En){const n=this.references.get(mn);n.set(e,t),this.references.set(mn,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=gn(n.name,e);return-1!==r&&+r>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(mn),a=this.references.get(In);[...r.keys(),...a.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=fn(e);return+n>=t})).forEach((e=>{const t=r.get(e).parent;t?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new un(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),a=r?.get(e);a?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,a){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const o=`${e}.${n}.${r}`,s=new pn(t,n,r,a),i=this.references.get("WHEN");i?.set(o,s)}},{VIEW:Cn,FIELD:_n,CONTEXT:Sn,DECLARATIVE_TARGET:bn,WHEN:Nn}=F.CONTEXT_TREE_NODE_TYPES;const vn=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new An(Sn,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}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}pushChildPageNodeToParentView(e,t,n){const r=e.children;let a=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){a=!0;break}a||r.push(t),t.parent=e}addViewNode(e,t,n,r){const a=this.addContextNode(e).addNode("PAGE",t);let o=null;if(r&&n!==r){o=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else o=a.addNode("VIEW",n);a.addReference(n,o);const s=t.split(".");for(;s.length>0;){s.pop();const n=s.join("."),o=this.getContextNode(e)?.getNode("PAGE",n),i=o?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,a,t);break}}return o}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,a){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const o=this.addContextNode(e),s=o.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,a);return s&&o.addReference(`${t}.${r}`,s),s}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,a){const o=this.getContextNode(e);o?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,a),o?.removeReference(`${t}${r}`,_n,a),o?.removeReference(`${t}${r}`,bn,a)}removeViewNode(e,t,n,r){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),s=o?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=s?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&s?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),s=o?.getReference(n);s?.children.forEach((o=>{"PAGE"===o.type?this.removeViewNode(e,o.name,n,r):o.type===Cn?this.removeChildViewNodes(e,t,o.name,r):(a.removeReference(o.name,_n,o.props.index),a.removeReference(o.name,bn,o.props.index),"PAGELIST"!==o.type&&"Address"!==o.props?.componentName||this.deleteAllListNodes(e,o.name))})),o?.references.delete(n)}deleteAllListNodes(e,t){const n=n=>{const r=this.getContextNode(e),a=r?.references?.get(n);if(a)for(const[e]of a)(e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&r?.references?.get(n)?.delete(e)};n(_n),n(bn)}deleteListNode(e,t,n){const r=r=>{const a=this.getContextNode(e),o=a?.references?.get(r);if(o)for(const[e]of o)e.includes(`${t.join(".")}[${n}]`)&&a?.references?.get(r)?.delete(e)};r(_n),r(bn)}getPageListNode(e,t,n,r){const a=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return a?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(_n,r)}_findViewNode(e,t,n,r){let a=r.addNode("PAGE",t)?.getReference(n);if(a)return a;const o=t.split(".");for(;o.length>0;){o.pop();const e=o.join(".");if(a=r.addNode("PAGE",e)?.getReference(n),a)return a}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,a,o={}){const s=this.addContextNode(e),i=this._findViewNode(e,t,n,s),{isDeclarativeTarget:c}=o;let l;if(l=c?i.addNode(bn,`${t}${r}`,o):i.addNode(_n,`${t}${r}`,o),l){const n=`${t}${r}`;if("Address"===l.props?.componentName&&this.deleteAllListNodes(e,l.name),s.addReference(n,l),l.value=a,l.setPreviousDefaultValue(),l.props.isInsideList){const e=t.substring(0,t.lastIndexOf("["));let n=s.getReference(e,_n);n||(n=i.addNode(_n,e,{}),s.addReference(e,n))}}return l}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),[o,s,i]=fn(t);n.startsWith(".")&&(n=n.substring(1)),s&&this.mutatePageList(e,o,s,{...r,rowIndex:i},!0);const c=a?.getReference(`${t}.${n}`,_n);c&&c instanceof un&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,a){this.getPageListNode(e,t,n,r)?.addEventListener(a)}mutatePageList(e,t,n,r,a=!1){const o=this.getContextNode(e),s=o?.getReference(`${t}.${n}`,_n);s&&s instanceof un&&s.triggerEvent(r,a)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(_n)}getFieldReferenceForProperty(e,t){return this.getContextNode(e)?.references?.get(_n)?.get(t)}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(_n)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(bn)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(_n)?.get(t);r instanceof un&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,_n),n=this.getContextReferencesByType(e,bn);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,_n)?.get(t)||!!this.getContextReferencesByType(e,bn)?.get(t)}addWhenNode(e,t,n,r,a,o){const s=this.getContextNode(e);s?.addWhen(t,n,r,a,o)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(bn)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,a=t.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:a,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(Nn)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,a=e.name,o=e?.props?.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({name:a,pageReference:o,referenceName:n,type:t})})),r}},Pn={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData"},Tn=e=>({type:Pn.REFRESH_DATA,payload:e}),$n={},On=(e,t,n,r,a)=>{if(!(e&&n&&t))return;const o=a.actionMgrID||ln.getNextActionMgrId(),s={ID:e,actionID:t,context:n,caseWideAction:r,options:{...a,actionMgrID:o}};a.isFillFormWithAI?oh((e=>({type:ft,payload:e}))(s)):oh(Tn(s))},Rn=(e,t,n,r,a)=>{if(!(e&&n&&t))return;r&&(r=Ch.convertPageRefToClipboardPageNotation(r));oh(Tn({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r}))},Dn=(e,t,n)=>{$n[t]||($n[t]={}),e&&!$n[t][e]&&($n[t][e]={pageReference:n})},xn=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;const a=Dp(n.propertyName,e.getValue(j.CLASS_ID,n.pageName));return!!a?.isDeclarativeTarget},wn=e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata()?.config?.value;if(n){const r=Dp(Qt.getLeafPropertyName(n),Nh.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=xn(e,r)),n};t.some(r)}else if("object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=xn(e,t[r]),n))break;return n})(e,r?.datasource?.parameters)),t||(t=r?.datasource?.tableType===j.DECISION)}}t&&Dn(e.getCurrentView(),e.getContextName(),e.getPageReference())},Mn=(e,t,n)=>{const r=nn(e,t),a=Nh.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e)?Nh.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e):Nh.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,t,e);let o;o=r?Nh.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,t,e):Nh.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,t,e)?Nh.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,t,e):Nh.getPropertyValue(F.CONTEXT_DATA_ASSIGNMENTID,t,e),On(o,a,e,r,n)},Ln=e=>{const{context:t,pageReference:n}=e,r=(e=>$n[e]&&Object.keys($n[e]).length>0&&rn(e))(t);if(!r)return;if(Nh.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=Nh.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,n,t),r=Nh.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),a=Nh.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,n,t);Rn(e,r,t,a,{})}else Mn(t,n,{})},Fn=(e,t)=>{const{requestType:n}=e;return e?.options?.refreshFor&&"refresh"===n&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},jn=e=>{const t=(e=>{const t=[];return vn.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let a=r.join(".");e&&a&&(a=Ch.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a}))})),t})(e),n=(e=>{const t=[];return vn.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const a=r.split(".");a.shift();let o=a.join(".");e&&o&&(o=Ch.convertPageRefToClipboardPageNotation(o),t.push({name:e,context:o,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}},Un=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),r=t.url?.includes("/refresh?refreshFor="),a=e.url?.endsWith("/refresh")&&!n,o=t.url?.endsWith("/refresh")&&!r;if(a&&o)return e.url===t.url;if(a&&r)return!0;if(n){if(o)return"CANCEL_REFRESH";if(r)return!1}return!1};const kn=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?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}},Vn={CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT],FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.HTTP_MESSAGES],CASE_MESSAGE_PATH:[j.CASEMESSAGES]},Bn=(e="",t="",n,r)=>{let a,o=[];null!==e&&(a=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const s=t&&t.startsWith(".")?t.substr(1):t;if(n===j.PROPERTY&&e||e){o=[j.CONTEXT_DATA,...s.split(".")];for(let e=0;e<a.length-1;e+=1)o.push(a[e]);o.push(j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES,a[a.length-1])}else n===F.PAGE?o=[...Vn.PAGE_MESSAGES_PATH]:n===j.HTTP?o=[...Vn.HTTP_MESSAGES_PATH]:n===j.CASEMESSAGES?o=[...Vn.CASE_MESSAGE_PATH]:r&&(o=[j.CONTEXT_DATA,...s.split(".")]);return o.filter(Boolean)},Gn=(e,t,n)=>{const r={content:{}},a=`${t}[${n}]`,o=Ch.getIn(e?.content,a.split("."));return o&&Ch.setIn(r.content,a.split("."),{...o}),r},Wn=(e,t,n,r,a,o,s={})=>{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=`${o}[${r}]`;s[`${o}[${r+("up"===c?1:-1)}]`]=Ch.getIn(e[t],[j.CONTEXT_DATA,...a.split(".")]),Ch.deleteIn(e[t],[j.CONTEXT_DATA,...a.split(".")])}));const l=Object.keys(s);l.length>0&&l.forEach((n=>{Ch.setIn(e[t],[j.CONTEXT_DATA,...n.split(".")],s[n])}))},Hn=(e,t,n,r,a)=>{const o=Ch.deepClone(Ch.getIn(e,[`${t}`])),s=Ch.getIn(o,[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO]);if(!s)return;const i=n.substring(0,n.lastIndexOf(".")),c=n.substring(n.lastIndexOf(".")+1),l=((e,t,n)=>{const r=Ch.getIn(e,[j.CONTEXT_DATA,...n.split(".")],{});return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(o,c,i);if(0===l.length)return;if(Gn(s,c,r).content[`${c}[${r}]`]){const s={},i=`${n}[${r}]`,c=Ch.getIn(o,[j.CONTEXT_DATA,...i.split(".")]);s[`${n}[${a}]`]=c,Ch.deleteIn(e[t],[j.CONTEXT_DATA,...i.split(".")]),Wn(e,t,l,r,a,n,s)}else Wn(e,t,l,r,a,n)},qn=e=>{const{type:t,property:n,category:r,context:a,pageReference:o}=e;let s;n&&(s=n.slice(1));const i=sh(a);let c=[];const l=Ch.getIn(i,Bn(s,o,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===F.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&vn.mutateField(a,o,n,{messages:[...c],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},Yn=e=>{const{property:t,pageReference:n,category:r,context:a,type:o,isListEntry:s,clearContextMessages:i,deletingIndex:c}=e,l={context:a,type:o};t&&!s?(vn.mutateField(a,n,t,{type:Qe,fieldName:t}),l.property=t,l.pageReference=n):s?(l.pageReference=n,l.isListEntry=s,l.deletingIndex=c):l.category=r,oh(i?{type:Qe,payload:{stateObj:e.stateObj,context:a}}:{type:Qe,payload:l})},Kn=e=>{const{messages:t,property:n,pageReference:r,category:a,context:o}=e,s={messages:t,context:o};n?(s.property=n,s.pageReference=r):s.category=a,oh({type:Je,payload:s})},zn=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===j.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&zn(e[r],t,n)}t.pop()}return n},Xn=(e,t)=>{let n=qn({context:j.APP.ROOT,category:"HTTP"});if(cp.getRenderingMode()===j.EMBED){const e=qn({context:j.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=qn({context:t,category:"HTTP"});n?e&&(n=n.concat(qn({context:t,category:"HTTP"}))):n=qn({context:t,category:"HTTP"})}return n},Jn=e=>{let t=null;t=Iu(e)[0]?pu(Iu(e)[0]):e,t&&Yn({context:t,stateObj:sh(t),clearContextMessages:!0})},Qn={addMessages:Kn,getValidationErrorMessages:e=>{const t=sh(e),n=[],r=Ch.getIn(t,[...Vn.CONTENT_FIELDS_PATH])||{};return zn(r,[],[]).forEach((e=>{const t=Ch.getIn(r,[...e,j.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].forEach((e=>{e.type===j.MESSAGES.MESSAGES_TYPE_ERROR&&(e.fieldLabel?n.push({label:`${e.fieldLabel}:`,description:e.message}):n.push(up.getLocaleValue(e.message,"Messages")))}))}))})),n},getMessages:qn,clearMessages:Yn,getRootContainerHttpMessages:Xn,clearContextMessagesInActiveWorkArea:Jn};const Zn=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 o={instruction:"INSERT",content:{...Ch.unflatten(n)}},s=JSON.parse(JSON.stringify(o));delete s.content.classID;return{instruction:{target:Ch.buildInstructionPageReference(r,e),content:{...s.content},listIndex:t,instruction:"INSERT"},actionPayload:o,displayPropertPayload:a}}};const er=class{static execute(e,t,n,r,a,o,s){const i={instruction:"UPDATE",content:{...Ch.unflatten(r)},isDefault:s},c={content:{...i.content},target:Ch.buildInstructionPageReference(a,t),listIndex:n,instruction:"UPDATE"};return o||oh(lf({...i,listIndex:n-1,context:e,referenceList:`${a}${t}`})),c}};const tr=class{static execute(e,t,n){return{target:Ch.buildInstructionPageReference(n,e),listIndex:t,instruction:"DELETE"}}};const nr=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:Ch.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||oh(lf({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const rr=class{static execute(e,t,n,r){return{target:Ch.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const ar=class{static execute(e,t,n,r){return{content:{...{...Ch.unflatten(n)}},target:Ch.buildInstructionPageReference(r,t),instruction:"REPLACE"}}};const or=class{static execute(e,t){return{target:Ch.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const sr=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const ir=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 sr(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=zc(t),o={};let s=!0;n&&(o[zc(n)]=crypto.randomUUID(),s=!1);const i={[a]:Ch.getIn(e,a),...o};this.update(i,r+1,s,{isDefault:!0})}))})):r.forEach(((e,t)=>{if(n&&!e[zc(n)]){const e={};e[zc(n)]=crypto.randomUUID(),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{isDefault:a=!1,skipPageinstruction:o}=r,s=er.execute(this.contextName,this.target,t,e,this.pageReference,n,a);if(!o){if(this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=gh(Ch.deepClone(n),e,r)}if(this.current?.automatic!==a||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(s),a&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=gh(Ch.deepClone(t),Ch.unflatten(e),r)}}}delete(e,t){const n=tr.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||oh(lf({instruction:"DELETE",listIndex:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:a,actionPayload:o={content:{}},displayPropertPayload:s={}}=Zn.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]=gh(Ch.deepClone(n),e,r)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=a:this.insertNode(a),n||(o.content={...o.content,...s},oh(lf({...o,listIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e){const t=ar.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}deletePage(){const e=or.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=rr.execute(this.target,e,t,this.pageReference);this.insertNode(r),oh(lf({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=nr.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),nr.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=gh(Ch.deepClone(t),e)}},cr={},lr={},dr={},ur=(e,t,n)=>{const r=e.getContextName();cr[r]||(cr[r]={}),cr[r][t]||(cr[r][t]={content:[]}),lr[r]||(lr[r]=[],dr[r]=[]),Yc.isStateMachineExist(r,n,t)||Yc.setStateMachine(r,t,n,new ir(t,n,r))},pr=e=>kn.formatPageReference(e),hr=(e,t)=>{const n=lr[e],r=dr[e],a=zc(t),o=a?.substring(0,a.indexOf("["));r?.indexOf(o)<0&&dr[e].push(o),n?.indexOf(a)<0&&lr[e].push(a)},fr=e=>{delete lr[e]},gr=e=>Yc.buildPageInstructionsByContext(e),mr=e=>Yc.buildPageInstructionsByContext(e,!0),yr=e=>{Yc.clearStateMachines(e),delete cr[e]},Ir=(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]})))},Er=(e,t,n,r,a)=>{const{skipStateUpdate:o=!1}=a||{},s=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),l=pr(i);ur(n,l,c),hr(s,`${i}[${t}]`),Ir(i,c,e,t);const d={instruction:j.LIST_ACTIONS.INSERT,content:{...Ch.unflatten(e)}};delete JSON.parse(JSON.stringify(d)).content.classID;Yc.getStateMachine(s,c,l).insert(e,t+1,o,{})},Ar=(e,t,n=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:o}=r,s=t.getContextName();let i=t.getReferenceList();const c=o||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(F.CONTENT)+F.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=pr(i);ur(t,l,c),hr(s,`${i}[${n}]`),Ir(i,c,e,n);Yc.getStateMachine(s,c,l).update(e,n+1,a,r)},Cr=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},_r=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(Cr(e,n)){const n=Ch.getPropertyName(e),a=n.substr(n.indexOf(".")+1).split(".");if(a.length>1){let e=Ch.getIn(t,a)??"";if(!e){const n=`!P!${a.join(":")}`;e=Ch.getIn(t,n)??""}Ch.setIn(r,a,e)}else{const e=Ch.getIn(t,a)??"";r[a[a.length-1]]=e}}})),r},Sr=(e,t,n,r,a)=>{const o=e.getValue(t)||{};n&&Object.keys(o).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},br=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:o,selectionList:s,required:i}=t.getConfigProps(),c=o===j.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let d=t.getPageReference(),u=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,d,s);const p=t.getRawMetadata();let h=null;const f=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);f&&(u=p?.config?.dataRelationshipContext,h=d.concat(".").concat(u),d=h);const g=((e,t,n)=>e?`${t}${n}`:t)(c,d,s),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,u,h),{datasource:{parameters:y={}}}=m,I={...y};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=Ch.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(I,m,c),c){let n=s;n=pr(n);const r=t.getValue(g)||[];ur(t,n,d);const o=[];let i=r.length;e.forEach((e=>{const t=_r(y,e,u),s={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;s[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=Yc.getStateMachine(l,d,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}o.push({instruction:e.$selected?j.LIST_ACTIONS.SELECT:j.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...s}})})),oh(lf({instruction:j.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${d}.${u}`,actions:o}))}else{const n=_r(I,e[0],u);Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],f?{contextPageReference:d}:{}),t.getActionsApi().triggerFieldChange(`.${u}.${e}`,n[e])}))}Sr(t,g,i,c,u),r()})),Nr=e=>{if(!e)return!1;const t=mr(e);return Array.isArray(t)&&t.length>0};const vr=(e,t,n={})=>{const{skipStateUpdate:r=!1}=n,a=e.getPageReference(),o=pr(t);ur(e,t,a);Yc.getStateMachine(e.getContextName(),a,o).deleteAll(r)},Pr=e=>({insert:(t,n,r,a)=>Er(t,n,e,r,a),update:(t,n,r)=>Ar(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r={})=>{const a=n.getPageReference(),{stateMachineTarget:o}=Yc.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),`${a}${e}`.endsWith("]"));if(!o){let e=a.substring(0,a.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&ur(n,t,e)}Yc.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(),o=n||t.getPageReference(),s=`${o+a}[${e}]`,i=pr(a);Yn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:s,context:r,isListEntry:!0,deletingIndex:e}),ur(t,i,o),hr(r,`${a}[${e}]`),Yc.getStateMachine(r,o,i).delete(e+1);const c=Yc.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((e=>{e.includes(`${o}${i}`)&&e!==`${o}${i}`&&(c[e]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),o=n.getPageReference(),s=pr(a);ur(n,s,o),hr(r,`${a}[${t}]`),Yc.getStateMachine(r,o,s).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>br(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let o=t.getPageReference();const s=n===j.LIST_SELECTION_MODE.MULTI;let i=s?r.substring(1):o.substring(o.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=o.concat(".").concat(i),o=l);const d=s?`${o}${r}`:o;let u=t.getValue(d)||[];if(Array.isArray(u)||(u=[u]),e)return Promise.resolve(u);const{datasource:{parameters:p={}}={}}=s?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return u.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return Cr(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(),o=t,s=`${a}${t}`;return new Promise((t=>{let i=o;i=pr(i),ur(e,i,a),Yc.getStateMachine(r,a,i).deleteAll(),Sr(e,s,n,!0,o),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:o,referenceList:s}=e.getComponentConfig();let i;if(r===j.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===o&&s&&(i=e.getStateProps().referenceList),i){i=pr(i);const r=Yc.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const a=e.getContextName(),o=e.getPageReference(),s=pr(t);ur(e,s,o),Yc.getStateMachine(a,o,s).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n)=>vr(e,t,n),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),a=e.getContextName();ur(e,t,r),hr(a,Ch.buildInstructionPageReference(r,t)),Yc.getStateMachine(a,r,t).replacePage(n)})(e,t,n),deletePage:t=>((e,t)=>{const n=e.getPageReference(),r=e.getContextName();ur(e,t,n),hr(r,Ch.buildInstructionPageReference(n,t)),Yc.getStateMachine(r,n,t).deletePage()})(e,t)});const Tr=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?Ch.mergeDeep(e,this.fieldDefaults):Ch.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 $r{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,a,o){const{required:s,value:i}=o;let c=null;if(!("true"!==s&&!0!==s)){let s=r;switch(e){case"radiobuttons":s=i;break;case"attachment":{const e=n?.replace(F.CASE_INFO.CASE_INFO_CONTENT,"").replace(F.DATA_INFO.DATA_INFO_CONTENT,"");s=(lh(`.attachmentsList${e}.${t?.replace(".","")}`,"context_data",a)||[]).filter((e=>!e.delete)),0===s?.length&&(s="");break}case"checkbox":s&&"false"!==s||(s="");break;default:"string"==typeof s&&(s=s.trim())}c=this.getValidator("required")(s),$r.messageDispatcher(t,n,a,c,kn.getFieldLabel(o))}return c}validateType(e,t,n,r,a,o){let s=null;const i={pageReference:n,context:a,property:t,target:o?.target,required:o?.required};let c=Tr.getDefaultsforType(o?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(s=this.getValidator(e)(r,i),""!==r&&$r.messageDispatcher(t,n,a,s,o?.label));const l=o?.validationType;return c=l&&Tr.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(s=this.getValidator(l)(r,i),$r.messageDispatcher(t,n,a,s,o?.label)),s}validate(e,t,n,r={}){const{context:a,disabled:o,readOnly:s,pageReference:i,skipRequiredValidation:c}=r;let l=null;return o||s||(c||(l=this.validateRequired(e,t,i,n,a,r)),l||(l=this.validateType(e,t,i,n,a,r))),{message:l}}static messageDispatcher(e,t,n,r,a){if(r){const o=[];o.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),Kn({messages:o,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const Or=new $r,Rr=(e,t)=>{e.DeclareExpressions&&Yt({[t.context]:e.DeclareExpressions})},Dr=(e,t,n=!1)=>{const r=Ch.getIn(e,j.RESOURCES);r&&((e=>{e&&Lp(e)})(r),Rr(r,t)),n||Rf({...e,options:t})},xr="text/javascript";const wr=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="",this.imageBlobUrlCache={},this.svcLocaleErrorCache=new Map}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?.endsWith("/")?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=cp.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r);let o=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(o=this.loadAndCustomerComponentsConfig(t));const s=this.fetchSDKComponent(t),i=[];if(await Promise.all([a,o,s]).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,o=r.reduce(((e,r)=>(t===r.name&&n===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(o).length>0?{...e,alternateDesignSystemConfig:{...o}}: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((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}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(!0===n.skipLoadCustomerComponents&&a?.data?.components?.length>0&&(a.data.components=a.data.components.filter((e=>void 0===e.componentKey))),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()}getSvcImageUrl(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return void 0===this.imageBlobUrlCache[t]&&(this.imageBlobUrlCache[t]=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()),this.imageBlobUrlCache[t]}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`,r=`${this.appStaticUrl}::${this.appAlias}::${e}::${t}`;return!0===this.svcLocaleErrorCache.get(r)?Promise.resolve(null):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>400===e.status||404===e.status?(this.svcLocaleErrorCache.set(r,!0),null):e)).catch((()=>null))}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}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}`,{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:xr})),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:xr})),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;const n=(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);"script"===t?(a.onload=()=>{n(e)},a.onerror=()=>{r(e)},a.type=xr,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)}));return t=e?this.loaderObj[e]:n,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),o=a?.tenant_id,{restApi:s,reqType:i}=Sf("getAssetsFromIsolations",{isolationID:o,assetPath:e})||{},c=`${this.appStaticUrl}${s}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},Mr="component-loader",Lr={},Fr=async(e,t)=>{const n=wr.getLoader(),r=t||wr.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(wr.getLoader(Mr))return wr.getLoader(Mr)(e,r);const a=[];return e.forEach((e=>{if(Lr[e])return;const t=Xt.getComponent(e);if(!t){const t=`${wr.getConstellationServiceUrl()}/v860/${wr.getAppAlias()}/component/${e}.js`;return void a.push(n(t,wr.getTypes.SCRIPT))}(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;a.push(n(t,wr.getTypes.SCRIPT))}));(t.styles||[]).forEach((e=>{a.push(n(r+e,wr.getTypes.STYLE))})),Lr[e]=!0})),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 Ur=jr;const kr=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const Vr=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,o=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(o=a),a+=1})),-1!==o&&r.splice(o,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,a){this.subscribers[e]=this.subscribers[e]||[];let o=!1;if(a&&this.subscribers[e].forEach((e=>{o=e.id===t&&e.contextName===r})),!o){const a=new kr(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}))}};const Br=class{static subscribe(e,t,n,r=!1,a="app"){Vr.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Vr.publish(e,t)}static unsubscribe(e,t,n="app"){Vr.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Vr.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Vr.clearContext(e)}},Gr=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Wr={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${j.DATA}.${j.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${j.DATA}.${j.CASE_INFO.ASSIGNMENT_ID}`},Hr=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||Ur.getTargetViewContainerName(e)},qr=e=>{const t=e.lastIndexOf(j.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(t,n)},Yr=e=>e===Zd.WORKAREA,Kr=e=>e===Zd.MODAL,zr=e=>e===Ee,Xr=e=>e&&e.find((e=>e.type===Ee)),Jr=e=>Ch.getIn(e,Wr.CASE_INFO,{}),Qr=e=>e?e.split(" ").pop():void 0,Zr=e=>Ch.getIn(e,Wr.CASE_CLASS_NAME,j.EMPTY_STRING),ea=e=>{const t=Jr(e);return Zt(t)&&en(cp.getOperatorIdentifier(),t)},ta=e=>Ch.getIn(e,Wr.CASE_INFO_ID,j.EMPTY_STRING),na=e=>Ch.getIn(e,Wr.CASE_FIRST_ASSIGNMENT_ID,j.EMPTY_STRING),ra=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(af(Jh,{containerItemID:t,context:a||gu(t),target:r}))}},aa=e=>{const t=ah();if(!e)return!1;const n=W(e),r=Ou(n),a=Ou(e);if(!r||!a)return!1;const o=nu(r,n),s=nu(a,e);if(!o||!s)return!1;const{key:i}=o||{};let{key:c}=s||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},oa=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=ta(t);Ch.setIn(e,"key",a);const o=Zt(Jr(t));if(!r&&(e=>{const t=Ch.getIn(e,Wr.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=na(t),[,r]=n.split("!");s={assignmentID:n,isInCreateStage:o},Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,s),Ch.setIn(e,"flowName",r)}var s},sa=(e,t)=>{const{attachmentsExist:n}=t;n&&Ch.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),Ch.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},ia=(e,t,n)=>{let r=j.PROMISE_VALUE.RESOLVE;return Xr(e)?(r=j.PROMISE_VALUE.REJECT,n?ln.rejectActionByID(t,!0,n):ln.rejectActionByID(t)):ln.resolveActionByID(t),r},ca=e=>{const t=cp.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},la=()=>"true"===cp?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,da=(e,t)=>{const n=Zr(e?.response),r=Jr(e?.response),{caseTypeID:a}=r,o=cp.getFeatureMap();(o?.deferUpdateCaseSummaryView??!Object.hasOwn(o,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&jp(j.CASESUMMARY_VIEW_NAME,a)&&((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r){const{caseClassName:o,skipAssignmentsUpdate:s}=n,i=W(r),c=Ou(i),l=c&&tu(c),d=c&&pu(c),u=K(i);d&&l?.items?.[d]?.key===t?.caseID&&e.push(af(xh,{containerItemID:i,context:i,container:u,containerName:u,caseId:a,viewName:F.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:i},caseClassName:o,...void 0!==s&&{skipAssignmentsUpdate:s}}))}})(t,e?.actionInPayload,{caseClassName:n,skipAssignmentsUpdate:!0})},ua=e=>sh(e)?.context_data?.caseViewMode;function pa(e,t){return function(){return e.apply(t,arguments)}}const{toString:ha}=Object.prototype,{getPrototypeOf:fa}=Object,{iterator:ga,toStringTag:ma}=Symbol,ya=(Ia=Object.create(null),e=>{const t=ha.call(e);return Ia[t]||(Ia[t]=t.slice(8,-1).toLowerCase())});var Ia;const Ea=e=>(e=e.toLowerCase(),t=>ya(t)===e),Aa=e=>t=>typeof t===e,{isArray:Ca}=Array,_a=Aa("undefined");const Sa=Ea("ArrayBuffer");const ba=Aa("string"),Na=Aa("function"),va=Aa("number"),Pa=e=>null!==e&&"object"==typeof e,Ta=e=>{if("object"!==ya(e))return!1;const t=fa(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||ma in e||ga in e)},$a=Ea("Date"),Oa=Ea("File"),Ra=Ea("Blob"),Da=Ea("FileList"),xa=Ea("URLSearchParams"),[wa,Ma,La,Fa]=["ReadableStream","Request","Response","Headers"].map(Ea);function ja(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),Ca(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),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function Ua(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 ka="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Va=e=>!_a(e)&&e!==ka;const Ba=(Ga="undefined"!=typeof Uint8Array&&fa(Uint8Array),e=>Ga&&e instanceof Ga);var Ga;const Wa=Ea("HTMLFormElement"),Ha=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qa=Ea("RegExp"),Ya=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ja(n,((n,a)=>{let o;!1!==(o=t(n,a,e))&&(r[a]=o||n)})),Object.defineProperties(e,r)};const Ka=Ea("AsyncFunction"),za=(Xa="function"==typeof setImmediate,Ja=Na(ka.postMessage),Xa?setImmediate:Ja?(Qa=`axios@${Math.random()}`,Za=[],ka.addEventListener("message",(({source:e,data:t})=>{e===ka&&t===Qa&&Za.length&&Za.shift()()}),!1),e=>{Za.push(e),ka.postMessage(Qa,"*")}):e=>setTimeout(e));var Xa,Ja,Qa,Za;const eo="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ka):"undefined"!=typeof process&&process.nextTick||za,to={isArray:Ca,isArrayBuffer:Sa,isBuffer:function(e){return null!==e&&!_a(e)&&null!==e.constructor&&!_a(e.constructor)&&Na(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Na(e.append)&&("formdata"===(t=ya(e))||"object"===t&&Na(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Sa(e.buffer),t},isString:ba,isNumber:va,isBoolean:e=>!0===e||!1===e,isObject:Pa,isPlainObject:Ta,isReadableStream:wa,isRequest:Ma,isResponse:La,isHeaders:Fa,isUndefined:_a,isDate:$a,isFile:Oa,isBlob:Ra,isRegExp:qa,isFunction:Na,isStream:e=>Pa(e)&&Na(e.pipe),isURLSearchParams:xa,isTypedArray:Ba,isFileList:Da,forEach:ja,merge:function e(){const{caseless:t}=Va(this)&&this||{},n={},r=(r,a)=>{const o=t&&Ua(n,a)||a;Ta(n[o])&&Ta(r)?n[o]=e(n[o],r):Ta(r)?n[o]=e({},r):Ca(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ja(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(ja(t,((t,r)=>{n&&Na(t)?e[r]=pa(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,o,s;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],r&&!r(s,e,t)||i[s]||(t[s]=e[s],i[s]=!0);e=!1!==n&&fa(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ya,kindOfTest:Ea,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(Ca(e))return e;let t=e.length;if(!va(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ga]).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:Wa,hasOwnProperty:Ha,hasOwnProp:Ha,reduceDescriptors:Ya,freezeMethods:e=>{Ya(e,((t,n)=>{if(Na(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Na(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 Ca(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:Ua,global:ka,isContextDefined:Va,isSpecCompliantForm:function(e){return!!(e&&Na(e.append)&&"FormData"===e[ma]&&e[ga])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Pa(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=Ca(e)?[]:{};return ja(e,((e,t)=>{const o=n(e,r+1);!_a(o)&&(a[t]=o)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:Ka,isThenable:e=>e&&(Pa(e)||Na(e))&&Na(e.then)&&Na(e.catch),setImmediate:za,asap:eo,isIterable:e=>null!=e&&Na(e[ga])};function no(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,this.status=a.status?a.status:null)}to.inherits(no,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:to.toJSONObject(this.config),code:this.code,status:this.status}}});const ro=no.prototype,ao={};["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=>{ao[e]={value:e}})),Object.defineProperties(no,ao),Object.defineProperty(ro,"isAxiosError",{value:!0}),no.from=(e,t,n,r,a,o)=>{const s=Object.create(ro);return to.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),no.call(s,e.message,t,n,r,a),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const oo=no;function so(e){return to.isPlainObject(e)||to.isArray(e)}function io(e){return to.endsWith(e,"[]")?e.slice(0,-2):e}function co(e,t,n){return e?e.concat(t).map((function(e,t){return e=io(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const lo=to.toFlatObject(to,{},null,(function(e){return/^is[A-Z]/.test(e)}));const uo=function(e,t,n){if(!to.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=to.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!to.isUndefined(t[e])}))).metaTokens,a=n.visitor||l,o=n.dots,s=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&to.isSpecCompliantForm(t);if(!to.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(to.isDate(e))return e.toISOString();if(to.isBoolean(e))return e.toString();if(!i&&to.isBlob(e))throw new oo("Blob is not supported. Use a Buffer instead.");return to.isArrayBuffer(e)||to.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,a){let i=e;if(e&&!a&&"object"==typeof e)if(to.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(to.isArray(e)&&function(e){return to.isArray(e)&&!e.some(so)}(e)||(to.isFileList(e)||to.endsWith(n,"[]"))&&(i=to.toArray(e)))return n=io(n),i.forEach((function(e,r){!to.isUndefined(e)&&null!==e&&t.append(!0===s?co([n],r,o):null===s?n:n+"[]",c(e))})),!1;return!!so(e)||(t.append(co(a,n,o),c(e)),!1)}const d=[],u=Object.assign(lo,{defaultVisitor:l,convertValue:c,isVisitable:so});if(!to.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!to.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),to.forEach(n,(function(n,o){!0===(!(to.isUndefined(n)||null===n)&&a.call(t,n,to.isString(o)?o.trim():o,r,u))&&e(n,r?r.concat(o):[o])})),d.pop()}}(e),t};function po(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ho(e,t){this._pairs=[],e&&uo(e,this,t)}const fo=ho.prototype;fo.append=function(e,t){this._pairs.push([e,t])},fo.toString=function(e){const t=e?function(t){return e.call(this,t,po)}:po;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const go=ho;function mo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yo(e,t,n){if(!t)return e;const r=n&&n.encode||mo;to.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let o;if(o=a?a(t,n):to.isURLSearchParams(t)?t.toString():new go(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const Io=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){to.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Eo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ao={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:go,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Co="undefined"!=typeof window&&"undefined"!=typeof document,_o="object"==typeof navigator&&navigator||void 0,So=Co&&(!_o||["ReactNative","NativeScript","NS"].indexOf(_o.product)<0),bo="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,No=Co&&window.location.href||"http://localhost",vo={...o,...Ao};const Po=function(e){function t(e,n,r,a){let o=e[a++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),i=a>=e.length;if(o=!o&&to.isArray(r)?r.length:o,i)return to.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&to.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],a)&&to.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}(r[o])),!s}if(to.isFormData(e)&&to.isFunction(e.entries)){const n={};return to.forEachEntry(e,((e,r)=>{t(function(e){return to.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const To={transitional:Eo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=to.isObject(e);a&&to.isHTMLForm(e)&&(e=new FormData(e));if(to.isFormData(e))return r?JSON.stringify(Po(e)):e;if(to.isArrayBuffer(e)||to.isBuffer(e)||to.isStream(e)||to.isFile(e)||to.isBlob(e)||to.isReadableStream(e))return e;if(to.isArrayBufferView(e))return e.buffer;if(to.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return uo(e,new vo.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return vo.isNode&&to.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=to.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return uo(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(to.isString(e))try{return(t||JSON.parse)(e),to.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||To.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(to.isResponse(e)||to.isReadableStream(e))return e;if(e&&to.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 oo.from(e,oo.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:vo.classes.FormData,Blob:vo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};to.forEach(["delete","get","head","post","put","patch"],(e=>{To.headers[e]={}}));const $o=To,Oo=to.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"]),Ro=Symbol("internals");function Do(e){return e&&String(e).trim().toLowerCase()}function xo(e){return!1===e||null==e?e:to.isArray(e)?e.map(xo):String(e)}function wo(e,t,n,r,a){return to.isFunction(r)?r.call(this,t,n):(a&&(t=n),to.isString(t)?to.isString(r)?-1!==t.indexOf(r):to.isRegExp(r)?r.test(t):void 0:void 0)}class Mo{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=Do(t);if(!a)throw new Error("header name must be a non-empty string");const o=to.findKey(r,a);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=xo(e))}const o=(e,t)=>to.forEach(e,((e,n)=>a(e,n,t)));if(to.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(to.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((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]&&Oo[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(to.isObject(e)&&to.isIterable(e)){let n,r,a={};for(const t of e){if(!to.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[r=t[0]]=(n=a[r])?to.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=Do(e)){const n=to.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(to.isFunction(t))return t.call(this,e,n);if(to.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Do(e)){const n=to.findKey(this,e);return!(!n||void 0===this[n]||t&&!wo(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=Do(e)){const a=to.findKey(n,e);!a||t&&!wo(0,n[a],a,t)||(delete n[a],r=!0)}}return to.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&&!wo(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return to.forEach(this,((r,a)=>{const o=to.findKey(n,a);if(o)return t[o]=xo(r),void delete t[a];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();s!==a&&delete t[a],t[s]=xo(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return to.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&to.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")}getSetCookie(){return this.get("set-cookie")||[]}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[Ro]=this[Ro]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Do(e);t[r]||(!function(e,t){const n=to.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 to.isArray(e)?e.forEach(r):r(e),this}}Mo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),to.reduceDescriptors(Mo.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),to.freezeMethods(Mo);const Lo=Mo;function Fo(e,t){const n=this||$o,r=t||n,a=Lo.from(r.headers);let o=r.data;return to.forEach(e,(function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)})),a.normalize(),o}function jo(e){return!(!e||!e.__CANCEL__)}function Uo(e,t,n){oo.call(this,null==e?"canceled":e,oo.ERR_CANCELED,t,n),this.name="CanceledError"}to.inherits(Uo,oo,{__CANCEL__:!0});const ko=Uo;function Vo(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new oo("Request failed with status code "+n.status,[oo.ERR_BAD_REQUEST,oo.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Bo=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,o=0,s=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[s];a||(a=c),n[o]=i,r[o]=c;let d=s,u=0;for(;d!==o;)u+=n[d++],d%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=l&&c-l;return p?Math.round(1e3*u/p):void 0}};const Go=function(e,t){let n,r,a=0,o=1e3/t;const s=(t,o=Date.now())=>{a=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=o?s(e,t):(n=e,r||(r=setTimeout((()=>{r=null,s(n)}),o-i)))},()=>n&&s(n)]},Wo=(e,t,n=3)=>{let r=0;const a=Bo(50,250);return Go((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,i=o-r,c=a(i);r=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:i,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},Ho=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qo=e=>(...t)=>to.asap((()=>e(...t))),Yo=vo.hasStandardBrowserEnv?(Ko=new URL(vo.origin),zo=vo.navigator&&/(msie|trident)/i.test(vo.navigator.userAgent),e=>(e=new URL(e,vo.origin),Ko.protocol===e.protocol&&Ko.host===e.host&&(zo||Ko.port===e.port))):()=>!0;var Ko,zo;const Xo=vo.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const s=[e+"="+encodeURIComponent(t)];to.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),to.isString(r)&&s.push("path="+r),to.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.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 Jo(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Qo=e=>e instanceof Lo?{...e}:e;function Zo(e,t){t=t||{};const n={};function r(e,t,n,r){return to.isPlainObject(e)&&to.isPlainObject(t)?to.merge.call({caseless:r},e,t):to.isPlainObject(t)?to.merge({},t):to.isArray(t)?t.slice():t}function a(e,t,n,a){return to.isUndefined(t)?to.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function o(e,t){if(!to.isUndefined(t))return r(void 0,t)}function s(e,t){return to.isUndefined(t)?to.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,a,o){return o in t?r(n,a):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(e,t,n)=>a(Qo(e),Qo(t),0,!0)};return to.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=c[r]||a,s=o(e[r],t[r],r);to.isUndefined(s)&&o!==i||(n[r]=s)})),n}const es=e=>{const t=Zo({},e);let n,{data:r,withXSRFToken:a,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;if(t.headers=i=Lo.from(i),t.url=yo(Jo(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),to.isFormData(r))if(vo.hasStandardBrowserEnv||vo.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(vo.hasStandardBrowserEnv&&(a&&to.isFunction(a)&&(a=a(t)),a||!1!==a&&Yo(t.url))){const e=o&&s&&Xo.read(s);e&&i.set(o,e)}return t},ts="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=es(e);let a=r.data;const o=Lo.from(r.headers).normalize();let s,i,c,l,d,{responseType:u,onUploadProgress:p,onDownloadProgress:h}=r;function f(){l&&l(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=Lo.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Vo((function(e){t(e),f()}),(function(e){n(e),f()}),{data:u&&"text"!==u&&"json"!==u?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new oo("Request aborted",oo.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new oo("Network Error",oo.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||Eo;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new oo(t,a.clarifyTimeoutError?oo.ETIMEDOUT:oo.ECONNABORTED,e,g)),g=null},void 0===a&&o.setContentType(null),"setRequestHeader"in g&&to.forEach(o.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),to.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),u&&"json"!==u&&(g.responseType=r.responseType),h&&([c,d]=Wo(h,!0),g.addEventListener("progress",c)),p&&g.upload&&([i,l]=Wo(p),g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{g&&(n(!t||t.type?new ko(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===vo.protocols.indexOf(y)?n(new oo("Unsupported protocol "+y+":",oo.ERR_BAD_REQUEST,e)):g.send(a||null)}))},ns=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const a=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof oo?t:new ko(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,a(new oo(`timeout ${t} of ms exceeded`,oo.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=()=>to.asap(s),i}},rs=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},as=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},os=(e,t,n,r)=>{const a=async function*(e,t){for await(const n of as(e))yield*rs(n,t)}(e,t);let o,s=0,i=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let o=r.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},ss="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,is=ss&&"function"==typeof ReadableStream,cs=ss&&("function"==typeof TextEncoder?(ls=new TextEncoder,e=>ls.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ls;const ds=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},us=is&&ds((()=>{let e=!1;const t=new Request(vo.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),ps=is&&ds((()=>to.isReadableStream(new Response("").body))),hs={stream:ps&&(e=>e.body)};var fs;ss&&(fs=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!hs[e]&&(hs[e]=to.isFunction(fs[e])?t=>t[e]():(t,n)=>{throw new oo(`Response type '${e}' is not supported`,oo.ERR_NOT_SUPPORT,n)})})));const gs=async(e,t)=>{const n=to.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(to.isBlob(e))return e.size;if(to.isSpecCompliantForm(e)){const t=new Request(vo.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return to.isArrayBufferView(e)||to.isArrayBuffer(e)?e.byteLength:(to.isURLSearchParams(e)&&(e+=""),to.isString(e)?(await cs(e)).byteLength:void 0)})(t):n},ms={http:null,xhr:ts,fetch:ss&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:o,timeout:s,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:d,withCredentials:u="same-origin",fetchOptions:p}=es(e);l=l?(l+"").toLowerCase():"text";let h,f=ns([a,o&&o.toAbortSignal()],s);const g=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let m;try{if(c&&us&&"get"!==n&&"head"!==n&&0!==(m=await gs(d,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(to.isFormData(r)&&(e=n.headers.get("content-type"))&&d.setContentType(e),n.body){const[e,t]=Ho(m,Wo(qo(c)));r=os(n.body,65536,e,t)}}to.isString(u)||(u=u?"include":"omit");const a="credentials"in Request.prototype;h=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:a?u:void 0});let o=await fetch(h,p);const s=ps&&("stream"===l||"response"===l);if(ps&&(i||s&&g)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=to.toFiniteNumber(o.headers.get("content-length")),[n,r]=i&&Ho(t,Wo(qo(i),!0))||[];o=new Response(os(o.body,65536,n,(()=>{r&&r(),g&&g()})),e)}l=l||"text";let y=await hs[to.findKey(hs,l)||"text"](o,e);return!s&&g&&g(),await new Promise(((t,n)=>{Vo(t,n,{data:y,headers:Lo.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:h})}))}catch(t){if(g&&g(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new oo("Network Error",oo.ERR_NETWORK,e,h),{cause:t.cause||t});throw oo.from(t,t&&t.code,e,h)}})};to.forEach(ms,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ys=e=>`- ${e}`,Is=e=>to.isFunction(e)||null===e||!1===e,Es=e=>{e=to.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!Is(n)&&(r=ms[(t=String(n)).toLowerCase()],void 0===r))throw new oo(`Unknown adapter '${t}'`);if(r)break;a[t||"#"+o]=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(ys).join("\n"):" "+ys(e[0]):"as no adapter specified";throw new oo("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function As(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ko(null,e)}function Cs(e){As(e),e.headers=Lo.from(e.headers),e.data=Fo.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Es(e.adapter||$o.adapter)(e).then((function(t){return As(e),t.data=Fo.call(e,e.transformResponse,t),t.headers=Lo.from(t.headers),t}),(function(t){return jo(t)||(As(e),t&&t.response&&(t.response.data=Fo.call(e,e.transformResponse,t.response),t.response.headers=Lo.from(t.response.headers))),Promise.reject(t)}))}const _s="1.10.0",Ss={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ss[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const bs={};Ss.transitional=function(e,t,n){function r(e,t){return"[Axios v"+_s+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,o)=>{if(!1===e)throw new oo(r(a," has been removed"+(t?" in "+t:"")),oo.ERR_DEPRECATED);return t&&!bs[a]&&(bs[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,o)}},Ss.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Ns={assertOptions:function(e,t,n){if("object"!=typeof e)throw new oo("options must be an object",oo.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new oo("option "+o+" must be "+n,oo.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new oo("Unknown option "+o,oo.ERR_BAD_OPTION)}},validators:Ss},vs=Ns.validators;class Ps{constructor(e){this.defaults=e||{},this.interceptors={request:new Io,response:new Io}}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=Zo(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&Ns.assertOptions(n,{silentJSONParsing:vs.transitional(vs.boolean),forcedJSONParsing:vs.transitional(vs.boolean),clarifyTimeoutError:vs.transitional(vs.boolean)},!1),null!=r&&(to.isFunction(r)?t.paramsSerializer={serialize:r}:Ns.assertOptions(r,{encode:vs.function,serialize:vs.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ns.assertOptions(t,{baseUrl:vs.spelling("baseURL"),withXsrfToken:vs.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&to.merge(a.common,a[t.method]);a&&to.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=Lo.concat(o,a);const s=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!i){const e=[Cs.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=s.length;let p=t;for(u=0;u<d;){const e=s[u++],t=s[u++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Cs.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return yo(Jo((e=Zo(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}to.forEach(["delete","get","head","options"],(function(e){Ps.prototype[e]=function(t,n){return this.request(Zo(n||{},{method:e,url:t,data:(n||{}).data}))}})),to.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(Zo(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ps.prototype[e]=t(),Ps.prototype[e+"Form"]=t(!0)}));const Ts=Ps;class $s{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 ko(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)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new $s((function(t){e=t})),cancel:e}}}const Os=$s;const Rs={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(Rs).forEach((([e,t])=>{Rs[t]=e}));const Ds=Rs;const xs=function e(t){const n=new Ts(t),r=pa(Ts.prototype.request,n);return to.extend(r,Ts.prototype,n,{allOwnKeys:!0}),to.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Zo(t,n))},r}($o);xs.Axios=Ts,xs.CanceledError=ko,xs.CancelToken=Os,xs.isCancel=jo,xs.VERSION=_s,xs.toFormData=uo,xs.AxiosError=oo,xs.Cancel=xs.CanceledError,xs.all=function(e){return Promise.all(e)},xs.spread=function(e){return function(t){return e.apply(null,t)}},xs.isAxiosError=function(e){return to.isObject(e)&&!0===e.isAxiosError},xs.mergeConfig=Zo,xs.AxiosHeaders=Lo,xs.formToJSON=e=>Po(to.isHTMLForm(e)?new FormData(e):e),xs.getAdapter=Es,xs.HttpStatusCode=Ds,xs.default=xs;const ws=xs;function Ms(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 Ls=Ms((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var Fs=function(e,t){return Fs=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])},Fs(e,t)};function js(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}Fs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Us(e,t,n,r){return new(n||(n=Promise))((function(a,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function i(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((r=r.apply(e,t||[])).next())}))}function ks(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=i(0),s.throw=i(1),s.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=o.trys,(a=a.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])}}}Object.create;function Vs(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 Bs(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return s}function Gs(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;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 Ws(e){return this instanceof Ws?(this.v=e,this):new Ws(e)}function Hs(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){a[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||i(e,t)}))},t&&(r[e]=t(r[e])))}function i(e,t){try{(n=a[e](t)).value instanceof Ws?Promise.resolve(n.value.v).then(c,l):d(o[0][2],n)}catch(e){d(o[0][3],e)}var n}function c(e){i("next",e)}function l(e){i("throw",e)}function d(e,t){e(t),o.shift(),o.length&&i(o[0][0],o[0][1])}}function qs(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Vs(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)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ys=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Ks(e){return"function"==typeof e}function zs(e){return Ks(null==e?void 0:e.then)}var Xs=Ms((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 Js(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Qs=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=Vs(o),i=s.next();!i.done;i=s.next()){i.value.remove(this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(Ks(c))try{c()}catch(e){a=e instanceof Xs?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=Vs(l),u=d.next();!u.done;u=d.next()){var p=u.value;try{ti(p)}catch(e){a=null!=a?a:[],e instanceof Xs?a=Gs(Gs([],Bs(a)),Bs(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}if(a)throw new Xs(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ti(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)&&Js(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Js(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),Zs=Qs.EMPTY;function ei(e){return e instanceof Qs||e&&"closed"in e&&Ks(e.remove)&&Ks(e.add)&&Ks(e.unsubscribe)}function ti(e){Ks(e)?e():e.unsubscribe()}var ni={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ri={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=ri.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,Gs([e,t],Bs(n))):setTimeout.apply(void 0,Gs([e,t],Bs(n)))},clearTimeout:function(e){var t=ri.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ai(e){ri.setTimeout((function(){var t=ni.onUnhandledError;if(!t)throw e;t(e)}))}function oi(){}var si=ii("C",void 0,void 0);function ii(e,t,n){return{kind:e,value:t,error:n}}var ci=null;function li(e){if(ni.useDeprecatedSynchronousErrorHandling){var t=!ci;if(t&&(ci={errorThrown:!1,error:null}),e(),t){var n=ci,r=n.errorThrown,a=n.error;if(ci=null,r)throw a}}else e()}var di=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,ei(t)&&t.add(n)):n.destination=yi,n}return js(t,e),t.create=function(e,t,n){return new fi(e,t,n)},t.prototype.next=function(e){this.isStopped?mi(function(e){return ii("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?mi(ii("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?mi(si,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}(Qs),ui=Function.prototype.bind;function pi(e,t){return ui.call(e,t)}var hi=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){gi(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){gi(e)}else gi(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){gi(e)}},e}(),fi=function(e){function t(t,n,r){var a,o,s=e.call(this)||this;Ks(t)||!t?a={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&ni.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},a={next:t.next&&pi(t.next,o),error:t.error&&pi(t.error,o),complete:t.complete&&pi(t.complete,o)}):a=t;return s.destination=new hi(a),s}return js(t,e),t}(di);function gi(e){var t;ni.useDeprecatedSynchronousErrorHandling?(t=e,ni.useDeprecatedSynchronousErrorHandling&&ci&&(ci.errorThrown=!0,ci.error=t)):ai(e)}function mi(e,t){var n=ni.onStoppedNotification;n&&ri.setTimeout((function(){return n(e,t)}))}var yi={closed:!0,next:oi,error:function(e){throw e},complete:oi},Ii="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ei(e){return e}function Ai(e){return 0===e.length?Ei:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Ci=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,o=(r=e)&&r instanceof di||function(e){return e&&Ks(e.next)&&Ks(e.error)&&Ks(e.complete)}(r)&&ei(r)?e:new fi(e,t,n);return li((function(){var e=a,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?a._subscribe(o):a._trySubscribe(o))})),o},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=_i(t))((function(t,r){var a=new fi({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[Ii]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ai(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=_i(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 _i(e){var t;return null!==(t=null!=e?e:ni.Promise)&&void 0!==t?t:Promise}function Si(e){return Ks(e[Ii])}function bi(e){return Symbol.asyncIterator&&Ks(null==e?void 0:e[Symbol.asyncIterator])}function Ni(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 vi="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Pi(e){return Ks(null==e?void 0:e[vi])}function Ti(e){return Hs(this,arguments,(function(){var t,n,r;return ks(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,Ws(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,Ws(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Ws(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 $i(e){return Ks(null==e?void 0:e.getReader)}function Oi(e){if(e instanceof Ci)return e;if(null!=e){if(Si(e))return a=e,new Ci((function(e){var t=a[Ii]();if(Ks(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Ys(e))return r=e,new Ci((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(zs(e))return n=e,new Ci((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,ai)}));if(bi(e))return Ri(e);if(Pi(e))return t=e,new Ci((function(e){var n,r;try{for(var a=Vs(t),o=a.next();!o.done;o=a.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}e.complete()}));if($i(e))return Ri(Ti(e))}var t,n,r,a;throw Ni(e)}function Ri(e){return new Ci((function(t){(function(e,t){var n,r,a,o;return Us(this,void 0,void 0,(function(){var s,i;return ks(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=qs(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(s=r.value,t.next(s),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&&(o=n.return)?[4,o.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 Di(e,t,n,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var o=t.schedule((function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(o),!a)return o}function xi(e){return function(t){if(function(e){return Ks(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 wi(e,t,n,r,a){return new Mi(e,t,n,r,a)}var Mi=function(e){function t(t,n,r,a,o,s){var i=e.call(this,t)||this;return i.onFinalize=o,i.shouldUnsubscribe=s,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 js(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}(di);function Li(e,t){return void 0===t&&(t=0),xi((function(n,r){n.subscribe(wi(r,(function(n){return Di(r,e,(function(){return r.next(n)}),t)}),(function(){return Di(r,e,(function(){return r.complete()}),t)}),(function(n){return Di(r,e,(function(){return r.error(n)}),t)})))}))}function Fi(e,t){return void 0===t&&(t=0),xi((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function ji(e,t){if(!e)throw new Error("Iterable cannot be null");return new Ci((function(n){Di(n,t,(function(){var r=e[Symbol.asyncIterator]();Di(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Ui(e,t){if(null!=e){if(Si(e))return function(e,t){return Oi(e).pipe(Fi(t),Li(t))}(e,t);if(Ys(e))return function(e,t){return new Ci((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(zs(e))return function(e,t){return Oi(e).pipe(Fi(t),Li(t))}(e,t);if(bi(e))return ji(e,t);if(Pi(e))return function(e,t){return new Ci((function(n){var r;return Di(n,t,(function(){r=e[vi](),Di(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 Ks(null==r?void 0:r.return)&&r.return()}}))}(e,t);if($i(e))return function(e,t){return ji(Ti(e),t)}(e,t)}throw Ni(e)}function ki(e,t){return t?Ui(e,t):Oi(e)}function Vi(e,t,n){var r=Ks(e)||t||n?{next:e,error:t,complete:n}:e;return r?xi((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe(wi(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)})))})):Ei}class Bi{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Bi(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):yc(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Ic()}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,o=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints.authorize,s=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:ip.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const l=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",d=new Uint8Array(64);window.crypto?.getRandomValues(d),this.config.codeVerifier=this.base64UrlSafeEncode(d),this.updateConfig(this.config,!1);const u=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${o}?client_id=${r}&response_type=code&redirect_uri=${a}&scope=openid${u}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${s}&enable_psyncId=true${l}`))?.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,o=this.config.tokenUri?this.config.tokenUri:this.config.endPoints.token,{codeVerifier:s}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),d=new URLSearchParams;return d.append("client_id",n),r&&d.append("client_secret",r),d.append("grant_type","authorization_code"),d.append("code",l),d.append("redirect_uri",a),d.append("code_verifier",s),this.config?.secureCookie&&d.append("send_token_as_cookie","true"),dc(o,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:d.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),this.config?.secureCookie?gc({pzCTkn:e?.csrf}):(mc({tokenInfo:e}),gc({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 Gi=Bi,Wi=async()=>new Promise((async(e,t)=>{const n=Ec();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=n.tokenInfo,{revoke:o}=n.endPoints,{client_id:s,client_secret:i,secureCookie:c}=n,l={"content-type":"application/x-www-form-urlencoded"};i&&(l.authorization=`Basic ${window.btoa(`${s}:${i}`)}`);const d=new URLSearchParams;i||d.append("client_id",s),c&&d.append("send_token_as_cookie","true");const u=a?"refresh_token":"access_token",p="access_token"===u?r:a;!c&&p&&d.append("token",p),d.append("token_type_hint",u),await dc(o,{method:"POST",headers:new Headers(l),credentials:c?"include":"omit",body:d.toString(),withoutDefaultHeaders:!0}),gc({Authorization:null}),mc({tokenInfo:null}),e()})),Hi=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Gi(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(I()?`${I()}`:"/?reAuth=true");return t},qi=(e,t)=>{Hi(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};Br.publish(F.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},Yi=e=>{let t="",n={},r={},a=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const o=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(a=!1),o.append("client_id",e.client_id),o.append("grant_type","refresh_token"),e.clientSecret&&o.append("client_secret",e.clientSecret),e.secureCookie&&o.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&o.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};mc({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?gc({pzCTkn:n?.csrf}):gc({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:a}=e;a&&"function"==typeof a&&a(n)},failure:t=>{if(e.popupReauth)return qi(t,e);Br.publish(F.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:qi};return{url:t,config:n,callback:r,isRefreshTokenPresent:a}},Ki=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),zi=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}},Xi=(e,t,n)=>{const{config:r}=e,{url:a,config:o,callback:s,isRefreshTokenPresent:i}=Yi(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=uc(r.url,r,c,t);return i?dc(a,o).then((e=>(t.setUpdateSessionStatus(!1),s?.success?.(e,r),Br.publish("updateSession",{updateStatus:"success"}),l.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&Ki(e.config.url,n)?(s?.failure?.(r.url,n),l):Promise.reject(e))):(s?.failure?.(r.url,n),l)},Ji=(e,t,n,r)=>{if(e.config&&Ki(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(Br.unsubscribeAllWithEventType(nc),t.setUpdateSessionStatus(!0),"custom"===n?.authType){Br.publish(F.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=zi(e);return uc(n,r,a,t)}return Xi(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=zi(e);return dc(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==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[F.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[F.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=e.config.headers.context;return Kn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Qi=class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const Zi=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])}};const ec=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new Zi(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};const tc=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{[j.COREHEADER_APP_DEBUG_ID]:e.debugId,[j.COREHEADER_APP_DEBUG_LEVELS]:ec.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Nh.getProperty(j.COREHEADERS,"",e);return t?{...t,debugInfo:ec.getPreviewMode()&&{...t.debugInfo,[j.COREHEADER_APP_DEBUG_LEVELS]:ec.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(j.SKIPCOREHEADERS))return void delete e[j.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&&V.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}};const nc="updateSession",rc={},ac=new Qi,oc=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(Br.unsubscribe(F.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{Br.publish(F.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),Br.subscribe(F.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let sc={},ic={},cc={},lc="";const dc=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:o=n,includeRemoteSystemIdIfPresent:s=!0}=r;lc=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,withoutDefaultHeaders:l=!1,...d}=t,{Authorization:u,pzCTkn:p,...h}=t.headers||{};l||tc.injectCoreAdditionalHeaders(h,t.body,n,{includeRemoteSystemIdIfPresent:s}),o&&rc[o]>=0?rc[o]+=1:o&&void 0===rc[o]&&(rc[o]=1);let f=l?{...h}:{...tc.getDefaultHeaders(),...tc.getRegisteredHeaders(),...h,context:n};if(e&&Ki(e,ic)&&ac.getUpdateSessionStatus()||!ac.getUpdateSessionStatus()){Ki(e,ic)&&"OAuth2.0"===ic?.authType&&(f={...h});const{restApi:t}=ip.doesRestApiExist("Logout")&&ip.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&oc.setTimerID(oc.resetInactiveTimeout(oc.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,a){var o,s=!1;e.subscribe({next:function(e){o=e,s=!0},error:a,complete:function(){s?r(o):n?r(t.defaultValue):a(new Ls)}})}))}(ki(ws({context:n,...d,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},headers:f,withCredentials:(g=ic,!("OAuth2.0"!==g?.authType||!g.secureCookie)||!("custom"!==g?.authType||!g.customCookies)||void 0)})).pipe(Vi((()=>{const e=tc.getCoreHeadersFromContext(f.context);var t;e&&(t={...e},Br.publish(j.PUB_SUB_EVENTS.FETCH_SUCCESS,t))}))))}var g;return uc(e,t,n,ac)},uc=(e,t,n,r)=>new Promise(((a,o)=>{Br.subscribe(nc,(s=>{r.setUpdateSessionStatus(!s.updateStatus),"success"===s.updateStatus?dc(e,t,n).then((e=>a(e))).catch((e=>o(e))):o(s.updateStatus.error)}),nc)})),pc=e=>{rc[e]>0&&(rc[e]-=1,0===rc[e]&&delete rc[e])};ws.interceptors.request.use((e=>(sc.request&&(e=sc.request(e)),e)),(e=>Promise.reject(e))),ws.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"))),Kn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(qn({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&Yn({type:"error",category:"HTTP",context:e.config.headers.context}),qn({type:"error",category:e.config.headers.context===j.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&Yn({type:"error",category:"PAGE",context:e.config.headers.context})),pc(e.config.headers.context)),sc.response&&(e=sc.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&pc(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config&&Ki(e.config.url,ic)||Br.subscribe(nc,(e=>{ac.setUpdateSessionStatus(!e.updateStatus)}),nc),Ji(e,ac,ic,e.response&&e.response.status&&e.response.status===Number(lc)?lc:null))));const hc=()=>ws.CancelToken.source(),fc=e=>ws.isCancel(e),gc=e=>{tc.setDefaultHeaders(e)},mc=e=>{ic={...ic,...e}},yc=e=>{cc={...cc,...e}},Ic=()=>({...cc}),Ec=()=>({...ic});const Ac=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=tu(t);if(n){const r=pu(t),{items:a={}}=n;return!(!r||!a[r]||a[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=bf("loadView",n);return dc(r,{method:a},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=bf(Ke,n);return dc(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:o}=bf(Ke,a),s=t[e];return dc(`${o}?viewType=form`,{method:"PATCH",body:{content:{...s}},headers:{"if-match":n}},r)};static getCaseMessages=e=>sh(e)?.caseMessages;static getPropertiesToReplace=e=>(rl(e)||[]).filter((e=>!e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>Ch.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>V.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>V.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n}},{RESOURCE_TYPES:Cc}=F,_c={PAGE:"page",FORM:"form"},Sc={[Cc.CASE]:[We,Be,Ge],[Cc.PAGE]:[je,ke],[Cc.DATA]:[Ue]},bc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a:t&&V.isRemoteCase(t)&&(r.RemoteSystemID=V.getRemoteHeader(t)),r},Nc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:a=!0,isTransientContext:o=!1,includeDisabledFields:s=!1}=t;let i={};i=al(e,{isTransientContext:o,includeDisabledFields:s}),n&&(delete i?.caseInfo?.content,o&&(i={}));const c=Il(e,!1);!o&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const a=sh(t),o=$()(a,F.CASE_INFO.CASE_INFO_CLASSID),s=Dp(n,o);("True-False"===s?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(i,e);const l=x()(c,i);let d={},u=!1;({content:d,attachmentsExist:u}=((e,t)=>{let n={},r=!1;return(e||t?.caseInfo)&&(n=e?{...t}:{...t?.caseInfo},t?.caseInfo?.attachments&&(r=!0)),{content:n,attachmentsExist:r}})(o,l));const p=[...gr(e)];a&&p.forEach((e=>{delete e.content?.EmbedListUUID__})),d.pageInstructions=p;return(lr[e]||[]).forEach((e=>{if(d?.content){const t=e?.replace(j.CASE_INFO.CASE_INFO_CONTENT,"");Ch.deleteIn(d.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))}})),!o&&l?.dataInfo?(d={...l.dataInfo,pageInstructions:d.pageInstructions},{content:d}):{content:d,attachmentsExist:u}},vc=(e,t)=>{let n,r,a={};const o=Ch.getIn(e,j.UI_RESOURCES),s=Ch.getIn(e,"confirmationNote");o?(n=Ch.getIn(e,j.UI_RESOURCES_CONTEXT_DATA),r=Ch.getIn(e,j.ROOT),a=Ch.getIn(e,j.ACTION_BUTTONS)):s&&(r={});const{data:i={},Errors:c,semanticURL:l,key:d,flowName:u}=e,p=Ch.getIn(e,"nextAssignmentInfo",null),h=Ch.getIn(e,"nextAssignmentInfo.context",""),f=Ch.getIn(e,"confirmationLinks",null),{isInCreateStage:g,openCaseViewAfterCreate:m,debugInfo:y}=t;return{data:{...i,key:d,flowName:u,coreHeaders:y&&{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:y.debugId}},caseInfo:{...i.caseInfo,actionButtons:a,headers:t.headers},[j.CONTEXT_DATA]:g?{...i[j.CONTEXT_DATA],...n,openCaseViewAfterCreate:m,errors:c}:{...i[j.CONTEXT_DATA],...n,errors:c}},semanticURL:l,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:f,key:d,root:r,...t}},Pc=async(e,t,n,r=!1,a=!1)=>{const o=Ch.getIn(e,j.LOCALE_REFERENCES);await up.loadLocaleResources(o);const s=Ch.getIn(e,j.COMPONENTS);if(s)try{await Fr(s)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Rf({...e,options:i,directUrlUpdation:!0}):Dr(e,i,a)},Tc=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},$c=e=>{if(e){const[,t]=e.split("!");return{key:Tc(e),flowName:t}}return{}},Oc=(e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&e[j.ERROR_FIELD_IN_PAGE]):{const a=`${e[j.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),o=`${a}${e[j.ERROR_IN_PAGE_IDENTIFIER]}`,s=Ch.deepClone(e);s[j.ERROR_FIELD_IN_PAGE]=a,t.includes(o.slice(1))||t.includes(o.substring(o.indexOf(".")+1,o.indexOf("[")))?r.push(s):n.push(e);break}case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&!e[j.ERROR_FIELD_IN_PAGE]):{const a=e[j.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}},Rc=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,o=n&&n.response?n.response.data:"",s=sl(r);return a&&ln.rejectActionByID(a,!0,n),af(of,"Error action triggered",o,r,s)},Dc=(e,t)=>Cu(e)&&Su(e)?af(ef,t):af(Uh,t),xc=(e,t,n=j.APP.APP,r={})=>{let a=null;const{buildNew:o=!0}=r;return Cu(e)?a=Su(e)?pu(e):H(t,n):_u(e)&&(Su(e)&&!o?a=mu(e):Su(e)&&!o||(a=H(t,n))),a},wc=e=>e&&e.type===_e,Mc=e=>{let t=!1;const n=Eu(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&Sl(r)){t=!0;break}}return t},Lc=(e,t={})=>{let n=!1,r=!1,a={},o=!0,s=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:d=!1}=t;if(Cu(e)){const t=pu(e);if(!t)return{continueExecution:o,removeActionPayload:a};const r=gu(t);Sl(r)&&(n=!0),d||n||(n=Mc(t))}else if(_u(e)&&vu(e)){let t=$u(e);t||(t=pu(e),r=!0),a.containerItemID=t,a.context=gu(t)}if(n){const e=l||ml;s=window.confirm(up.getLocaleValue(e,"Messages"))}if(!s&&n&&(a={},o=!1),r){const e=up.getLocaleValue(yl,"Messages");c?i=window.confirm(e):(window.alert(e),o=!1)}return!i&&r&&(a={},o=!1),{continueExecution:o,removeActionPayload:a}},Fc=(e,t)=>{let n=!1;const r=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT),{insKey:a,isParallelCall:o,skipFlowNameCheck:s}=t;if(!a)return{};const[,i]=a.split("!")||"",c=s?a:Tc(a),l=iu(e,c);let d={},u=!1;if(l&&!r&&((e,t)=>{const n=nu(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,d=nu(e,l),!s)){let e=d?.flowName;const t=qr(l),r=yu(l);if(r.length){const n=mt(t,r[0]);e=nu(n,r[0])?.flowName}else n=e===i;(e!==i||o)&&(u=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:u,containerItemID:l,semanticURL:d.semanticURL,insKey:a}}},jc=(e,t,n)=>e===Cc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=iu(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===Cc.ASSIGNMENT?Fc(t,{...n,type:e}):e===Cc.CASE?Fc(t,{...n,skipFlowNameCheck:!0,type:e}):{},Uc=(e=[])=>{Su(`${j.APP.APP}/${j.PREVIEW}`)&&e.push(af(jh,Pu({context:F.APP.APP,name:j.PREVIEW})))},kc=e=>{let t;for(const n of Object.keys(Sc))if(Sc[n].includes(e)){t=n;break}return t},Vc=(e,t)=>{const{data:n={},context:r,caseViewMode:a}=e,o={data:{...n},caseViewMode:a,context:W(r)};Ch.deleteIn(o.data,"shared"),Ch.setIn(o.data,["context_data","caseViewMode"],a),t.push({type:at,payload:{context:o.context}}),t.push(af(Rh,o))},Bc=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=Ch.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=Ch.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:Ch.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:Ch.getIn(t,["payload","context"]),context:Ch.getIn(t,["payload","context"])},r={type:he,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),oh(e),e=e.filter((e=>e.type!==he))}const a=((e,t,n)=>({assignmentID:e,vcName:j.PRIMARY,targetContainerName:Ch.getIn(t,["payload","target"]),context:Ch.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);Cu(a.targetContainerName)||t?.payload?.containerName!==j.WORKAREA||(a.isMultiDoc=!0,e=[]);const o={type:fe,payload:{...a}};e.push(o),oh(e)}else oh(e)}},Gc=(e,t)=>x()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),Wc=e=>{let t={},n=zu(e);for(;n;){const e=Nc(n);t=Gc(e.content,t),n=zu(n)}return t};class Hc{static getChanges(e){return{...Il(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t||{},{content:a}=Nc(e,{isTransientContext:n,includeDisabledFields:r});return a}static isStateModified(e){return Sl(e)||Nr(e)||!(!e||!Al(e))}static isFormValid(e,t){return ol(e,t)}static clearChangedProperties(e){return yr(e),fr(e),Nl(e)}static getEditableFields(e){return il(e)}static setCustomValidator(e,t){Or.register(e,t)}static isPropertyEditable(e,t){return Hc.getEditableFields(e).some((e=>e.name===t))}}const qc=Hc;const Yc=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]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}setStateMachine(e,t,n,r){const a=`${n}${t}`,{stateMachine:o}=this.getStateMachineObjByPath(a,e,!0),s=(t,n,r=!1)=>{const a=r?this.states:this.unConnectedStates;a[e]||(a[e]={}),a[e][t]||(a[e][t]={}),a[e][t]=n};if(o&&o.targetPageReference!==r.targetPageReference)return o.addChild(r),void s(a,r);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(a)){const t=e.substring(0,a.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],r.addChild(n),s(t,n)})),this.states[e][a]=r):s(a,r,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((a=>{const o=vn.getContextReferences(e)?.get(a),s=n[a];if(o){const e=s.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}})),Ch.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,"");n.root=null,n.current=null;const r=this.getUnConnectedStateMachines(e)||{};Object.keys(r).forEach((e=>{e.includes(t)&&delete r[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:o,index:s}=this.getStateMachineObjByPath(t,e,r);if(!o)return!1;let[,i]=t.split(o);if(!i)return!1;null!==s&&([,i]=i.split(/^\[\d+\]/gm));const c={[zc(i)]:n},l=this.getStateMachine(e,"",o);return null!==s?l.update(c,Number(s)+1,a.skipStateUpdate??!0,a):l.updatePage(Ch.unflatten(c)),!0}registerForServerChanges(){eh.registerForListChanges(((e,t,n)=>{setTimeout((()=>{const r="].";if(!t.includes(".classID")&&qc.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(r)){const a=t.substring(0,t.lastIndexOf("[")),o=qc.getEditableFields(e);if(["multiselect","checkbox"].includes(o.find((e=>e.name===a))?.type)){const o=vn.getContextReferences(e),s=o?.get(a),i=t.substring(t.lastIndexOf(r)+2);s?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}),0)}))}unRegisterForServerChanges(){eh.unRegisterForListChanges()}},Kc={},zc=e=>e.startsWith(".")?e.substring(1):e,Xc=e=>{delete Kc[e]},Jc=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=Nh.resolveContextTreeNodeProps(e),a=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.disabled),o="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),s=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||s)&&!o&&a},Qc=(e,t,n,r,a)=>{let o=(lh(`.attachmentsList.${t?.replace(".","")}`,"context_data",n)||[]).filter((e=>`${r.pageReference}.${e.label}`===a));return o=Ch.buildAttachmentsFormData(o),o.length>0&&(e=[...e,...o]),e},Zc=(e,t,n,r,a)=>(Yc.executeStateMachine(e,r,Nh.getLitePropertyValue(n,t))||a.push(r),a),el=e=>{const t=e.pageReference?.replace(F.CASE_INFO.CASE_INFO_CONTENT,"")?.replace(F.DATA_INFO.DATA_INFO_CONTENT,"");return"Attachment"===e.componentName&&""!==t},tl=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:a=!0}=n;return(!r||r&&!a)&&!Array.isArray(Nh.getLitePropertyValue(t,e))&&"Address"!==t.componentName},nl=(e,t={})=>{let n=[],r=[];const a=[],o=vn.getContextReferences(e);if(!o)return{formInputs:n,attachments:r,formPageFields:a};if(({attachmentList:r,editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let a=[],o=[];for(const[s,i]of e){const e=Nh.resolveContextTreeNodeProps(i.props),c=e.propertyName;if(Jc(i.props,{includeDisabledFields:r})){const r=el(e);"Attachment"!==e.componentName||r?!r&&tl(s,e,n)&&(a=Zc(t,c,e,s,a)):o=Qc(o,c,t,e,s)}}return{attachmentList:o,editableFormFieldsReferenceList:a}})(o,e,t)),Kc[e])for(const t in Kc[e].fieldOrder)Object.hasOwn(Kc[e].fieldOrder,t)&&a.push(t);return{formInputs:n,attachments:r,formPageFields:a}},rl=e=>{let t=[];const n=vn.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Jc(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},al=(e,t={})=>{const n={},r=sh(e),{ignoreFieldsInsideList:a=!0,isTransientContext:o=!1,includeDisabledFields:s=!1}=t;if(o||r?.caseInfo?.content){const{formInputs:t,attachments:i,formPageFields:c}=nl(e,{ignoreFieldsInsideList:a,includeDisabledFields:s});i&&i.length>0&&Ch.buildObject("caseInfo.attachments",n,i),((e,t,n)=>{e.forEach((e=>{let r=Ch.getIn(t,e);"object"==typeof r&&(r=Ch.deepClone(r),delete r?.classID),Ch.buildObject(e,n,r)}))})(c,r,n),t&&t.length>0?t.forEach((e=>{Ch.buildObject(e,n,Ch.getIn(r,e))})):o||Ch.buildObject(F.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!o&&r?.dataInfo?.content){const{formInputs:t}=nl(e,{ignoreFieldsInsideList:a});t.forEach((e=>{Ch.buildObject(e,n,Ch.getIn(r,e))}))}return n},ol=(e,t)=>{const n=vn.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,a]of n){const n=Nh.resolveContextTreeNodeProps(a.props);if(Jc(a.props)&&(!t||e.includes(t))){const e=Or.validate(n.componentName?.toLowerCase(),n.propertyName,Nh.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},sl=(e,t=!1)=>{const n=vn.getContextReferences(e),r=[];if(n)for(const[e,a]of n){if(!1!==Nh.resolveContextTreeNodeProps(a.props).visibility){const n=8,a=t?e:e.substring(e.indexOf("content")+n);r.push(a)}}return r},il=e=>{const t=[],n=vn.getContextReferences(e);if(n)for(const[e,r]of n){const n=Nh.resolveContextTreeNodeProps(r.props);Jc(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};const cl=class{static getPropertyName(e){return Qt.getPropertyName(e)}static isProperty(e){return Qt.isProperty(e)}static getLeafPropertyName(e){return Qt.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};const ll=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}};class dl{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 o=r.split("/").join(j.HASH_DELIMITER),s=Ch.getHashedString(o);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[a]?.[n]){this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===s))||this.propChangeRefreshMap[a][n].push({uniqueHash:s,callback:t})}else dl.initializeRefreshCache(this.propChangeRefreshMap,a,n,s,t);else if(this.refreshMap?.[a]?.[`${e}-${n}`]){this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===s))||this.refreshMap[a][`${e}-${n}`].push({uniqueHash:s,callback:t})}else dl.initializeRefreshCache(this.refreshMap,a,`${e}-${n}`,s,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 ul=new dl,{APP:pl}=j;let hl={},fl={},gl={};const ml="You will lose unsaved changes. Do you want to continue?",yl="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",Il=(e=pl.APP,t,n)=>{let r=[],a=[];t||(r=sl(e,!0)),n||(a=(e=>{const t=vn.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===Nh.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const o={};((e,t)=>{const n=fl[t]||{};Object.keys(n).forEach((t=>{Object.hasOwn(n,t)&&Ch.buildObject(t,e,n[t].value)}))})(o,e);const s=hl[e]||{};return Object.keys(s).forEach((e=>{const n=!t&&r.includes(e)||t;Object.prototype.hasOwnProperty.call(s,e)&&n&&!a.includes(e)&&Ch.buildObject(e,o,s[e].value)})),o},El=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete hl[t]?.[n],delete fl[t]?.[n]},Al=e=>gl[e],Cl=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:a}=t,o=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[o]?e[o].previousValue=lh(t.reference,null,n):(e[o]={initialValue:r||lh(t.reference,null,n)},e[o].previousValue=e[o].initialValue),e[o].value=t.value,a&&e[o].value===e[o].initialValue&&El(t)},_l=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;vn.isFieldExists(n,r)||(fl[n]=fl[n]||{},Cl(fl[n],t)),hl[n]=hl[n]||{},Cl(hl[n],t)},Sl=e=>{const t=mr(e)||{};return e&&hl[e]&&Object.keys(hl[e]).some((t=>hl[e][t].initialValue!==hl[e][t].value))||Object.keys(t).length>0},bl=(e,t)=>{if(!e||!t)return!1;const n=hl[e]&&hl[e][t];return!!n&&n.previousValue!==n.value},Nl=e=>{e&&hl[e]?(hl[e]={},fl[e]={}):"all"===e&&(hl={},fl={},gl={}),gl[e]&&(gl[e]=!1)},vl=()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ee&&(qt(r),(e=>{const{context:t,pageReference:n,value:r,reference:a}=e;eh.triggerCascade(t,a,r);const o=zt.getDependencies(t,a),s=eh.getResetDependencies(t,a),i={context:t,datapages:{}};[...o,...s].forEach((e=>{const n=Ch.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=n.split("."),r=`.${e.pop()}`,a=e.join(".");Yc.getStateMachine(t,a,r).deleteAll()}else ll.isPageInstruction(n)&&Yc.executeStateMachine(t,n,""),oh({type:Q,payload:{reference:n,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}})})),o.forEach((r=>{let a=n;r.startsWith(n)||(a="");const o=r.replace(`${a}`,"").split(".").filter((e=>!!e));o.pop();const s=o.join("."),c=lh(`.${s}`,a,t)?.classID||e.classID,l=Dp(r.split(".").pop(),c),{datasource:d}=l,u={};let p=[];d.parameters.forEach((e=>{e?.value?(u[e.name]=cl.isProperty(e.value)?lh(`.${Ch.getFullPropertyReference([s,Ch.getPropertyName(e.value)])}`,a,t):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(j.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(j.NULL_STRING))})),p=d.name.concat(j.UNDERSCORE_STRING,Ch.getHashedString(p.join(j.HASH_DELIMITER)));const{name:h}=d,f=kp(h);i.datapages[p]={mode:d.mode,propertyName:r,name:d.name,dataViewParameters:u,refreshStrategy:f?.refreshStrategy}})),o.length&&oh({type:et,payload:i})})(r),(bl(r.context,r.reference)||Nr(r.context))&&Ln(r),ul.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===rt&&!r?.isDefault){const{context:e,referenceList:t}=r;Ln({context:e,pageReference:t})}if(n===Q||n===Z){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:o=!1}=r;vn.updateFieldNodeValue(a,e,r.value),ll.isPageInstruction(e)||o?o||(gl[`${a}`]=!0):_l(t),(r.removePropertyFromChangedList||n)&&El(r)}if(n===Te||n===$e){const{transientItemID:e,data:t}=r;Ch.iterateLeafNodes(t,(t=>{El({context:e,value:"",reference:t.join(".")})}))}if(n&&[De,Se,we,Pe].includes(n)){Nl(r.context),eh.purgeResetDependencies(r.context),(a=r.context)&&$n[a]&&delete $n[a];(r.childContainersContexts||[]).forEach((e=>{Nl(e)}));(r.transientItems||[]).forEach((e=>{Nl(e)}))}var a;e(t)};const Pl=new class{getCoreheaders(e){const t=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,n=pu(t),r=gu(n),a=Nh.getProperty(j.COREHEADERS,"",r);if(a&&e in a)return a[e]}};const Tl=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,a=vn.getContextReferences(e)?.get(`${t}${r}`)?.props;return a?Nh.resolveContextTreeNodeProps(a):a})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:a}=Or.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return a?{status:!1,message:a}:{status:!0}}},$l="OPEN_PROCESS_ACTION",Ol="OPEN_ASSIGNMENT",Rl="DELETE_CASE_IN_CREATE_STAGE",Dl="SAVE_AND_CLOSE",xl=e=>({type:Dl,payload:e});const wl=class{static getSavableDataPage(e){return Yp(e)}static getLookUpDataPage(e){return zp(e)}static getLookUpDataPageInfo(e){return Xp(e)}static getDataPageKeys(e){return Kp(e)}};const Ml=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=ln.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return ln.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=Ae,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:j.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:o}=this.containerManagerPromise(t),s={...r,...e,actionMgrID:a};return oh(Fh(s)),o}addContainerItem(e){const t=_e,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r||{};let o;a&&([o]=a);const s=n.getContextName(),i=n.getContainerName(),c=H(i,s,e?.containerType===j.CONTAINER_TYPE.SINGLE),l=mt(i,s),d={root:{...o,config:{...o?.config,context:o?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:l,containerName:i};e=JSON.parse(JSON.stringify(e)),[j.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...d,...e,actionMgrID:u};return oh(Uh(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=De,n={context:gu(e.containerItemID),target:Ou(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return oh(Hh(o)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=Re,n={target:Ou(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return oh(zh(o)),a}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Se,n={context:gu(e.containerItemID),target:Ou(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return oh(Jh(o)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=Ce,n=Pu(e),{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...n,...e,actionMgrID:r};return oh(jh(o)),a}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=Y(t,r),o=Mu(r);return a&&o.includes(a)||oh(kh({transientItemID:a,contextName:r,target:Ou(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!Mu(r).includes(t))return;oh(Vh({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(!Mu(t).includes(a))return;oh(Zh({target:n,containerItemID:r,transientItemID:a}))}}createContainerPConnect(e,t,n,r=!1){Xd.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Su(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return du(e,t)}};var Ll=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Fl(){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 Ll(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(Ll(t.type,e[n]))return!0;return!1},xi((function(e,t){var a=0;e.subscribe(wi(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function jl(e,t){return xi((function(n,r){var a=null,o=0,s=!1,i=function(){return s&&!a&&r.complete()};n.subscribe(wi(r,(function(n){null==a||a.unsubscribe();var s=0,c=o++;Oi(e(n,c)).subscribe(a=wi(r,(function(e){return r.next(t?t(n,e,c,s++):e)}),(function(){a=null,i()})))}),(function(){s=!0,i()})))}))}function Ul(e,t){return xi((function(n,r){var a=0;n.subscribe(wi(r,(function(n){r.next(e.call(t,n,a++))})))}))}function kl(e,t,n){return void 0===n&&(n=1/0),Ks(t)?kl((function(n,r){return Ul((function(e,a){return t(n,e,r,a)}))(Oi(e(n,r)))}),n):("number"==typeof t&&(n=t),xi((function(t,r){return function(e,t,n,r,a,o,s,i){var c=[],l=0,d=0,u=!1,p=function(){!u||c.length||l||t.complete()},h=function(e){return l<r?f(e):c.push(e)},f=function(e){o&&t.next(e),l++;var i=!1;Oi(n(e,d++)).subscribe(wi(t,(function(e){null==a||a(e),o?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();s?Di(t,s,(function(){return f(e)})):f(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(wi(t,h,(function(){u=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function Vl(e){return e&&Ks(e.schedule)}function Bl(e){return e[e.length-1]}function Gl(e){return Vl(Bl(e))?e.pop():void 0}function Wl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ki(e,Gl(e))}function Hl(e){return xi((function(t,n){var r,a=null,o=!1;a=t.subscribe(wi(n,void 0,void 0,(function(s){r=Oi(e(s,Hl(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):o=!0}))),o&&(a.unsubscribe(),a=null,r.subscribe(n))}))}var ql=new Ci((function(e){return e.complete()}));function Yl(e){return e?function(e){return new Ci((function(t){return e.schedule((function(){return t.complete()}))}))}(e):ql}const Kl=(e,t,n)=>Hl((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),Wl(of(e,r,t,null,n))))),zl=(e,t)=>n=>new Ci((r=>{let a={},o=0;return n.pipe(kl((n=>{const r=Date.now();let s;return s=t||h(),s&&s(n,a)&&r-o<e?Yl():(a=n,o=r,Wl(n))}))).subscribe(r)})),Xl=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,o={data_view_ID:t},{restApi:s,reqType:i}=bf("createDataObject",o),{content:c}=Nc(a);return ki(dc(s,{method:i,headers:r,body:{data:c.content}},a)).pipe(Ul((t=>({response:t.data,actionInPayload:e}))),Kl("Error occurred during ajax call at createDataObject Epic",n))},Jl=e=>{const{dataLookUp:t,context:n,headers:r,viewName:a,requestPayload:o}=e,s={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=bf("readDataObject",s);return ki(dc(i,{method:c,headers:r,body:{dataViewParameters:o}},n)).pipe(Ul((t=>({response:t.data,actionInPayload:e}))),Kl("Error occurred during ajax call at getDataObjectView Epic",n))},Ql=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:o}=e,s={data_view_ID:t},{restApi:i,reqType:c}=bf("updateDataObject",s),{content:l}=Nc(a);return ki(dc(i,{method:c,headers:r,body:{data:{...l.content,...o},pageInstructions:l.pageInstructions||[]}},a)).pipe(Ul((t=>({response:t.data,actionInPayload:e}))),Kl("Error occurred during ajax call at updateDataObject Epic",n))},Zl=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:a,dataViewParameters:o}=e,s={data_view_ID:t,action_ID:a},{restApi:i,reqType:c}=bf("openDataObjectAction",s);return ki(dc(i,{method:c,headers:r,body:{dataViewParameters:o}},n)).pipe(Ul((t=>({response:t.data,actionInPayload:e}))),Kl("Error occurred during ajax call at getDataObjectView Epic",n))},ed=e=>{const{savableDatapage:t,context:n,headers:r,actionID:a,keys:o,containerItemID:s}=e,i={data_view_ID:t,action_ID:a},{restApi:c,reqType:l}=bf("submitDataObjectAction",i),{content:d}=Nc(s);return ki(dc(c,{method:l,headers:r,body:{data:{...d?.content,...o},pageInstructions:d?.pageInstructions||[]}},n)).pipe(Ul((t=>({response:t.data,actionInPayload:e}))),Kl("Error occurred during ajax call at getDataObjectView Epic",n))};const td=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,a){const o={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=o}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;Rn(e,r,t,a,{})}}},nd="postDataViewMetadata",rd={getData:(e,t,n,r)=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:o,signal:s,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=bf("getListData",a);return dc(c,{method:l,body:t,...s&&{signal:s},...o&&{skipClearErrorMessages:o}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:a,reqType:o}=bf("getListDataCount",r);return dc(a,{method:o,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const a=!!n,o=!!r,s=ip.doesRestApiExist(nd),i=(a||o)&&s?nd:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:d}=bf(i,c);if(s){if(a)return dc(l,{method:d,body:{associationFilter:n}},t);if(o)return dc(l,{method:d,body:{propertyFilter:r}},t)}return dc(l,{method:d},t)},getDataObjectView:(e,t,n,r,a={})=>{const{skipClearErrorMessages:o,signal:s,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:d,reqType:u}=bf("readDataObject",c);return dc(d,{method:u,body:l,...s&&{signal:s},...o&&{skipClearErrorMessages:o}},r,i)},getCaseEditMetadata:(e,t)=>Ac.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Ac.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Ac.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:a,listClass:o,viewName:s,viewClassName:i}=e,c={viewName:s,viewClassName:i},{restApi:l,reqType:d}=bf("moveListRecords",c);return dc(l,{method:d,body:{content:{sourceID:n,destinationID:r,context:a,listClass:o}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===j.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===j.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Iu("root").find((e=>e.includes("authoring-preview")))?`${j.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${wr.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=cp.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const ad=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const od=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 o={matcher:"PRESENCE",criteria:{userId:e}};return ud.subscribe(o,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],ud.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)}))}))}};var sd=n(631),id=n.n(sd);const cd=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===id()(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};ud.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]}};const ld=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new cd("CASE",t)}return this.subscriptions[e]}};class dd{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new od;static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=wr.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{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(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),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=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=wr.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 received 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&&Ch.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 received 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}`,o=new ad(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(o,a),a):(this.inProgressSubscriptions.push({messageSubscriber:o,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=>ld.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:wr.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(wr.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 occurred 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 ud=dd;const pd=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 o=a-r;for(;o<a;o+=1){if(!this.records[o])return this.maxRecords===o?t:[];t.push(this.records[o])}return t}return this.records}mergeRecords(e,t){if(t){const{pageNumber:n,pageSize:r}=t,a=n*r;let o=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[o],o+=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=gh(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const hd=new class{constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";getData(e,t,n,r){const a=this.generateHash(e,t,r);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=kp(e);let a=[];r||(a=Object.keys(t||{}).map((e=>({name:e}))));let o="",s=e;const i=[];return(r?.parameters||a).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??j.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(j.HASH_DELIMITER)&&(o=Ch.getHashedString(i.join(j.HASH_DELIMITER)),s=e+j.UNDERSCORE_STRING+o),s}async getDataAsync(e,t,n={},r,a,o={}){if(this.subscribeToMessageService(e),o.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,a)||o.invalidateCache){const s=await this.fetchData(e,n,r,a,t,o),i=s?.data?.data??[];return{...s.data,data:i,pageNumber:s?.data?.pageNumber,pageSize:s?.data?.pageSize,queryStats:s?.data?.queryStats,status:s?.status}}const s=this.getData(e,n,r,a);if(s.length>0)return Promise.resolve({data:s});const i=await this.fetchData(e,n,r,a,t,o);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={}){this.subscribeToMessageService(e);const a=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][a]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][a]);delete this.dataStore[e][a],this._removeDataStoreMetaEntry(e,n,a)}const{restApi:o,reqType:s}=bf(j.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:s},c=o&&n&&0===Object.keys(n).length?o.split("?")[0]:o;return dc(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[a]:t.data},this._addDataStoreMetaEntry(e,n,a)),t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const a=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const o=this.dataPageSubscribers[n];o[a]??={};const s=o[a];return!s[e]&&(s[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&Ch.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}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 pd;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const a=this.dataStoreMeta[e];a[r]??=[];const o=a[r];o.includes(n)||o.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,a){const o=this.generateHash(e,t,r),s=a?.data?.data;if(!s||0===s.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][o]||(this.dataStore[e][o]=new pd);const i=this.dataStore[e][o];return i.mergeRecords(s,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,o),i.getRecords(n)}async fetchData(e,t,n,r,a,o){const{additionalApiParams:{useExtendedTimeout:s=!1,includeTotalCount:i=!1}={},...c}=o,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),s&&(l.useExtendedTimeout=!0),n&&(l.paging=n),r&&(l.query=r),rd.getData(e,l,a,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToUpdate(e,t,n,r,a,o){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},o&&!this.subscribers[e].callback?.[o]&&(this.subscribers[e].callback[o]=a),this.subscribeToCascadeUpdates(e,t,n,r,o)}unsubscribe(e,t,n,r,a){delete this.subscribers[e]?.callback?.[a],t&&t.length>0&&eh.unRegisterFields(n,r,t,a)}subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&eh.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}};ud.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:a=""}=n,o=this.subscribers[r];this.markDataInstanceDirty(r,""===a?null:JSON.parse(a)),t&&this._executeDataPageSubscriptions(e),!t&&o?.callback&&Object.keys(o.callback).forEach((t=>{o.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,a=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(a){const t=[];t.push(this.generateHash(n,a,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=kp(e);return"reloadOncePerInteraction"===t?.refreshStrategy?.type}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}};const fd=class{constructor(e,t,n,r,a=100,o=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=a,this.maxsize=o,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,r,a=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),a&&!a.dataViewCallMap[t]?(this.combiner(a,e),a.dataViewCallMap[t]={promise:n,resolve:r}):a?n=a.dataViewCallMap[t].promise:(a={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(a.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(a):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const gd=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,a,o,s){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new fd(t,n,a,r,o,s)),this.bufferedDataQueues[e]}},md=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,yd=e=>e.map((e=>e.field)),Id=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let a=(t.query?.filter).logic;const o=Object.keys(n).length;md(n,r)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),n.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const s=`F${o+t}`;n[s]=r[e],a=a.replace(e,s)})),(e.query?.filter).logic+=` OR ${a}`);const s=yd(e.query?.select);yd(t.query?.select).forEach((t=>{s.includes(t)||(e.query?.select).push({field:t})}))},Ed=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!Ch.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Ad=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:a}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:a(e,n)})}))},Cd=e=>({combiner:Id,comparator:Ed,separator:Ad,...e}),_d=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Sd{constructor(e,t){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,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}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}`)),e.matchPosition,e.maxResultsDisplay].join(j.HASH_DELIMITER),o=Ch.getHashedString(a),s=`${e.dataSource}_${o}`,i=rd.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(window.sessionStorage.getItem(i));if(t&&Sd.searchResultsCache?.[t]?.[s])n(Sd.searchResultsCache[t][s]);else if("form"!==e.cacheLifeSpan&&Sd.searchResultsCache?.persisted?.[s])n(Sd.searchResultsCache.persisted[s]);else{const o=new Sd(e,t);JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(o.dataSourceMetaData=a.dataSourceMetaData,o.isQueryable=a.isQueryable,o.isInitialised=a.isInitialised,o.associationFilter=a.associationFilter,Sd.initializeCache(t,e,s,o),n(o)):(o.associationFilter=e.associationFilter,o.propertyFilter=e.propertyFilter,o.fetchMetaData(t).then((r=>{_d(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),o.isQueryable=r.data.isQueryable,o.dataSourceMetaData=r.data,o.isInitialised=!0,Sd.initializeCache(t,e,s,o),n(o)})).catch((e=>{o.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&kp(e.dataSource)){const r=new Sd(e,t),a=kp(e.dataSource);r.isQueryable=!!a?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,_d(i,JSON.stringify({isQueryable:a?.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,Sd.initializeCache(t,e,s,r),n(r)}else{const a=new Sd(e,t);a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{_d(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,Sd.initializeCache(t,e,s,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new gd;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Cd(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Sd.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Sd.searchResultsCache[e]&&(Sd.searchResultsCache[e]={}),Sd.searchResultsCache[e][n]=r):(void 0===Sd.searchResultsCache.persisted&&(Sd.searchResultsCache.persisted={}),Sd.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return rd.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Sd.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>hd.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Sd.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return hd.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return hd.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress)return this.fetchNQDataPromise?.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData?.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=hd.getDataAsync(this.dataSource,this.context,n.dataViewParameters),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,a)=>(Object.keys(a).every((o=>!(r?.includes(o)&&a[o]&&this.positionMatches(`${a[o]}`,e,n))||(t.push({...a}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,a=r?e.toLowerCase():e,o=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return a.startsWith(o);case"contains":return a.includes(o);case"equals":return a===o;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,a={};let o=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const s=`F${o}`;o+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const d={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:l};a[s]=d}}));const s=Object.keys(a).join(" OR ");return{filterConditions:a,logic:s}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...rd.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...rd.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const bd=Sd;const Nd=class{static cleanCaches(e){eh.purgeCascadeFields(e),td.removeContext(e),bd.clearContextedCache(e),Br.cleanContextSubscribers(e),Xc(e),vn.removeContextTreeNode(e),ud.clearContext(e),ul.deRegisterForRefresh(e)}},vd="GET_DESCENDANTS";const Pd=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 o=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(o)n.push({type:ge,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();o=!o,n.push({type:ge,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:o}}}}),n.push(t)}}oh(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=sh(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 o=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!o&&(r<=0?(n.push(e),o=!o):a.push(e),n.unshift({type:ge,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:o}}}}),oh(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=sh(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(oh({type:ge,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){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return sh(e)?(oh({type:ot,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...sh(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(oh({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=sh(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&Ch.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),oh({type:ge,payload:{context:e,data:{...n}}}),cn.disableLoadingIndicator({context:e})}}},Td=(e,t)=>{const n={},r=wl.getLookUpDataPage(e),a=wl.getDataPageKeys(r);if(a)for(const e of a)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:a}},$d=(e,t)=>{const n=wl.getSavableDataPage(e),r=wl.getDataPageKeys(n);return r?.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]})),{keys:t,dataPageID:n,dataPageKeys:r}},Od=e=>{Br.publish(F.PUB_SUB_EVENTS.EVENT_CANCEL,e)},Rd=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const Dd=class{constructor(e){this.c11nEnv=e}MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";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.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(j.MODAL),a=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),l=t?void 0:ol(this.c11nEnv.getContextName()),d=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Ph.buildActionObject({context:n,containerItemID:e,assignmentID:o,actionID:s,caseID:a,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:d,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,a,o="";o=t&&null!==t.actionMgrID?t.actionMgrID||"":ln.getNextActionMgrId();const s=new Promise(((e,t)=>{r=e,a=t}));if(!r||!a)throw new Error("resolveFn or rejectFn is not defined.");return ln.register(o,s,r,a,e,t,n),{actionMgrID:o,promise:s}};showDataObjectCreateView(e,t=F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Ph.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ne,{promise:a}=this.actionsApiPromise(r,n);return oh({type:r,payload:{...n,containerName:F.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(!Sl(t)){return new Ml(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=He,r=Ph.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&t.includes(j.MODAL);oh({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:o}=this.actionsApiPromise(n,r);return o.then((()=>{Od({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=ah()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const r=wl.getSavableDataPage(n),a=st,o=!!e&&e.includes(j.MODAL),s=Ph.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(a,s);return oh({type:"CREATE_DATA_OBJECT",payload:{...s,isModalAction:o,isFormValid:ol(e)}}),i}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=it,r=wl.getSavableDataPage(e),a=wl.getDataPageKeys(r),o={};if(a)for(const e of a)o[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const s=Ph.buildActionObject({dataViewName:r,dataViewParameters:o},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,s);return oh({type:"DELETE_DATA_OBJECT",payload:{...s}}),i}getDataObjectView(e,t,n={viewName:""}){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(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const r=ct,{dataPageID:a,dataViewParameters:o}=Td(e,t),s=Ph.buildActionObject({dataLookUp:a,keyProperties:t,requestPayload:o,viewName:n.viewName||F.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:j.MODAL},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,s);return oh({type:"VIEW_DATA_OBJECT",payload:{...s}}),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}=ah()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const{dataPageID:a,keys:o}=$d(r,t),s=lt,i=e&&e.includes(j.MODAL),c=Ph.buildActionObject({containerItemID:e,dataPageID:a,key:o},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return oh({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:ol(e)}}),l}openDataObjectAction(e,t,n,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(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const a=dt,{dataViewParameters:o,dataPageID:s,dataPageKeys:i}=Td(e,t),c=Ph.buildActionObject({actionID:n,actionName:r,dataViewParameters:o,lookupDatapage:s,containerName:j.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return oh({type:a,payload:{...c}}),l}submitDataObjectAction(e,t,n){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:r}=ah()?.getState()||{},a=r[e]?.dataInfo?.content?.classID;if(!a)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const o=Ju(e),s=Ou(o),i=nu(s,o)||{},{resourceType:c="",key:l=""}=i,d=ut,{dataPageID:u,keys:p}=$d(a,t),h=Ph.buildActionObject({containerItemID:e,actionID:n,resourceType:c,key:l,keys:p,savableDatapage:u,containerName:j.MODAL,context:e},this.c11nEnv);h.context=e;const{promise:f}=this.actionsApiPromise(d,h);return oh({type:d,payload:{...h,isFormValid:ol(e)}}),f}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},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?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{};let r=le;const a=Ph.buildActionObject({class:e,flowType:"pyStartCase",containerName:j.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,a);if(t.channelName&&(a.headers=a.headers||{},a.headers[j.X_ORIGIN_CHANNEL]=t.channelName),V.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:o}=V.getRemoteCase(e);if(a.className=e,a.class=t,a.headers=a.headers||{},a.headers.RemoteSystemID=n,V.isTraditionalRemoteCase(e)){const n={className:e,name:o,action:"createWork",remoteClassName:t};r=this.setTraditionalRemoteCaseParams(a,n)}}return ec.getPreviewMode()&&(a.debugInfo={debugId:Ch.generateUniqueID()}),oh({type:r,payload:{...a}}),o}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=V.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=U,e.gadgetId=t.gadgetId??Ac.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ne}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=ye,r=Ph.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,r);return oh({type:n,payload:{...r}}),a}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),r=Ph.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:a}=this.actionsApiPromise("GET_DESCENDANTS",r),o=(s={...r,context:n},{type:vd,payload:s});var s;return oh(o),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?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||j.PRIMARY,containerName:n.targetContainer||j.PRIMARY};let a=de;const o=Ph.buildActionObject(r,this.c11nEnv),{promise:s}=this.actionsApiPromise(a,o);return n.channelName&&(o.headers=o.headers||{},o.headers[j.X_ORIGIN_CHANNEL]=n.channelName),o.className=t,V.isRemoteCase(t)&&(a=this.setRemoteCaseParamsForOpenCase(o,t,n.remoteCaseMeta)??a),ec.getPreviewMode()&&![j.WORKAREA].includes(n.targetContainer)&&(o.debugInfo={debugId:Ch.generateUniqueID()}),oh({type:a,payload:{...n,...o}}),s}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:a,name:o}=V.getRemoteCase(t);if(e.headers=e.headers||{},e.headers.RemoteSystemID=r,e.isRemoteCase=!0,e.remoteCaseClass=t,V.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:o,action:gt,remoteClassName:a};return this.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){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?.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=j.PRIMARY,r.isChild=n.isChild);let a=Ol;const o=Ph.buildActionObject(r,this.c11nEnv),{promise:s}=this.actionsApiPromise(a,o);if(n.channelName&&(o.headers=o.headers||{},o.headers[j.X_ORIGIN_CHANNEL]=n.channelName),V.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:s}=V.getRemoteCase(t);if(o.headers=o.headers||{},o.headers.RemoteSystemID=r,V.isTraditionalRemoteCase(t)){o.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:s,action:"openAssignment",remoteClassName:e};a=this.setTraditionalRemoteCaseParams(o,r)}}o.className=t,o.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),ec.getPreviewMode()&&![j.WORKAREA].includes(n.containerName)&&(o.debugInfo={debugId:Ch.generateUniqueID()});const i={context:o.context||n.context,containerName:o.containerName||n.containerName,targetContainerName:o.containerName||n.containerName,viewType:o.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return oh({type:a,payload:{...o,...i}}),s}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){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=gu(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=vn.getContextReferences(e);if(t)for(const[,e]of t)if(Nh.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:up.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return Kn({messages:e,context:r,category:F.PAGE}),Promise.reject({type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=pe,o=t?.isTriggeredFromDifferentContext,{caseID:s,assignments:i,localActionID:c,caseActions:l,caseInfo:d,businessID:u,caseTypeID:p,caseTypeName:h}=sn(e,this.c11nEnv,{isTriggeredFromDifferentContext:o}),f=Zt(d);let g,m=!1;if(l){const e=l.find((e=>e.ID===c));m="Case"===e?.type}else g=sh(n);let{assignmentID:y}=sn(e,this.c11nEnv,{isTriggeredFromDifferentContext:o});g?.context_data?.actionType&&(m=g.context_data.actionType===j.CASE,y=y||g.context_data.assignmentID);const I=on(i,y,c),[E,A]=s.split(" "),C={class:E,actionID:I,assignmentID:y,caseID:s,workID:A,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:m,doDeleteCaseSummary:!0,isInCreateStage:f,businessID:u,caseTypeID:p,caseTypeName:h};e?.includes(j.MODAL)&&(C.containerName=j.MODAL,C.isModalAction=!0),C.outcome=t.outcomeID,C.jsActionQueryParams=t.jsActionQueryParams,d?.isLocalAction&&(C.viewType=_c.FORM);const _=Ph.buildActionObject(C,this.c11nEnv),{promise:S}=this.actionsApiPromise(a,_);return _.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||sh(n).context_data.isProcessAction,Pd.executeOrQueueDeferredAction({type:a,payload:{..._,context:n}}),S}getNextWork(){const e=Ol,t=Ph.buildActionObject({containerName:j.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return oh({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Ol,n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Ph.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),s={type:t,payload:{...a,caseID:n,headers:r}};return oh(s),o}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(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(j.MODAL)&&(a.containerName=j.MODAL,a.isModalAction=!0);const o=Ph.buildActionObject(a,this.c11nEnv),{promise:s}=this.actionsApiPromise(t,o),i=gu(e);return oh({type:t,payload:{...o,context:i,cases:n,actionID:r,isFormValid:ol(i),classID:this.c11nEnv.getCurrentClassID()}}),s}submitBulkActionAsync(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_ASYNC",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:e.includes(j.MODAL)?j.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(j.MODAL)},o=Ph.buildActionObject(a,this.c11nEnv),{promise:s}=this.actionsApiPromise(t,o),i=gu(e);return oh({type:t,payload:{...o,context:i,cases:n,actionID:r,isFormValid:ol(i),classID:this.c11nEnv.getCurrentClassID()}}),s}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,runningMode:r}=t,a=t.type,o={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:a,runningMode:r,...t},s="OPEN_BULK_ACTION",i=Ph.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(s,i);return oh({type:s,payload:{...i}}),c}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=Se,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${j.APP.APP}/${j.MODAL}`,caseViewMode:j.PERFORM_MODE,deleteContext:!0};oh({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)):(oh({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.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)):(oh({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.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(F.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.DUPLICATE,context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return oh([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:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.IGNORE,context:e}},n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return oh([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=t.caseID||this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,Rd(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=t.type,o={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},s="OPEN_LOCAL_ACTION",i=Ph.buildActionObject(o,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:l}=this.actionsApiPromise(s,i),d=Iu(c)[0];let u=!1;const p=V.getRemoteHeaderByContext(c);let h;if(p&&(i.headers={},i.headers.RemoteSystemID=p),!d)return h=c,oh({type:s,payload:{...i,contextName:c,continueExecution:u}}),l;h=pu(d);const f=tu(d);if(f?.accessedOrder.forEach((e=>{n===f.items[e].key&&(u=!0,h=f.items[e].context)})),!u||h&&"review"===ah()?.getState()?.data[h]?.context_data?.caseViewMode)return oh({type:s,payload:{...i,contextName:c,continueExecution:u}}),l;const g=h,m=g&&g.includes(j.MODAL),y=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),I=sh(h),E=I?.caseInfo?.assignments?I.caseInfo.assignments[0]?.actions[0]?.ID:void 0,A=this.c11nEnv.getContainerName(),C=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=Ph.buildActionObject({context:g,containerItemID:h,assignmentID:y,actionID:E,caseID:n,containerName:A,caseType:C,isModalAction:m,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=h;const b=gu(h),N=this.c11nEnv.getCaseSummary(),v=Zt(N),P=Ph.buildActionObject({caseID:n,containerItemID:h,cancelContext:b},this.c11nEnv);let T={};return m?(P.acTargetName=j.MODAL,P.isInCreateStage=v,P.isModalAction=m,T={...P}):T={...P,acName:mt(this.c11nEnv.getContainerName(),P.context)},oh({type:s,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:T,continueExecution:u}}),l}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,Rd(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,a=t.type,o={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},s=$l,i=Ph.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(s,i);return oh({type:s,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(F.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=Zt(this.c11nEnv.getCaseSummary()),o={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a};t&&t.includes(j.MODAL)&&(o.acTargetName=j.MODAL);const s=Ph.buildActionObject(o,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,s),c=gu(t);return oh({type:n,payload:{...s,containerItemID:t,context:c}}),i}cancelAssignment(e,t){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:n}=F,r=he,a=gu(e),o=e&&e.includes(j.MODAL),s=this.c11nEnv.getCaseSummary(),i=Zt(s),c=this.c11nEnv.getValue(n.CASE_INFO_ID),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),d=Ph.buildActionObject({caseID:c,containerItemID:e,context:a},this.c11nEnv);let u={};o?(d.acTargetName=j.MODAL,d.isInCreateStage=i,d.isModalAction=o,u={...d}):u={...d,acName:mt(this.c11nEnv.getContainerName(),d.context)};const{promise:p}=this.actionsApiPromise(r,d);return oh({type:r,payload:u}),p.then((()=>{t||Od({caseID:c,assignmentID:l,context:this.c11nEnv.getContextName()})}))}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}=F,n=e,r=He,a=e&&e.includes(j.MODAL),o=this.c11nEnv.getValue(t.CASE_INFO_ID),s=Ph.buildActionObject({caseID:o,containerItemID:e,context:n},this.c11nEnv);if(!Sl(n)){return new Ml(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{Od({caseID:o,context:this.c11nEnv.getContextName()})}))}oh({type:r,payload:{...s,isModalAction:a}});const{promise:i}=this.actionsApiPromise(r,s);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}=F,n=He,r=e,a=r&&r.includes(j.MODAL),o=this.c11nEnv.getCaseSummary(),s=Zt(o),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Ph.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),d=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(c.isProcessAction=l,s&&(a||d)&&!tn(o)){const t=this.c11nEnv.getValue(j.CASE_INFO.IS_FIRST_ASSIGNMENT),i=Sl(r);if(this.shouldDeleteCaseInCreateStage(i,t,d))return this.deleteCaseInCreateStage(e);oh({type:n,payload:{...c,isModalAction:a,isChildCase:an(o),isInCreateStage:s}})}const{promise:u}=this.actionsApiPromise(n,c);return u.then((()=>{}))}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=Dl,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return oh(xl(n)),r}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=Dl,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return oh(xl(n)),r}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=Rl,r=e,a=r&&r.includes(j.MODAL),o=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),i=Ph.buildActionObject({caseID:o,caseType:s,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(F.CASE_INFO.PARENTCASEINFO);i.isProcessAction=c,i.parentCaseInfo=l;const d=`${j.APP.APP}/${Zd.PRIMARY}`,u=xc(d,Zd.PRIMARY);i.parentContext=u,a&&(i.targetName=j.MODAL,i.containerName=Zd.MODAL,i.isModalAction=a),oh((e=>({type:Rl,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{Od({caseID:o,context:this.c11nEnv.getContextName()})}))}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}=ip.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return dc(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:a}=ip.getRestEndPoint("updateRecents")||{},o=`${E()}${a}`;return dc(o,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=ip.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return dc(t,{method:"GET",headers:{}}).then((e=>(Object.keys(vn.rootNodes).forEach((e=>{Nd.cleanCaches(e)})),vn.rootNodes={},sessionStorage.clear(),Ih(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return dc(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:Zd.PREVIEW,containerName:Zd.PREVIEW,context:F.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:Zd.PREVIEW,containerName:Zd.PREVIEW,context:F.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=Ph.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const a=te,{promise:o}=this.actionsApiPromise(a,r,!1);return oh({type:a,payload:{...r}}),o}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));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const r=Ph.buildActionObject({viewName:e,className:t},this.c11nEnv),a=ne,{promise:o}=this.actionsApiPromise(a,r);return ec.getPreviewMode()&&(r.debugInfo={debugId:Ch.generateUniqueID()}),oh({type:a,payload:{...r,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),o}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Ph.buildActionObject({},this.c11nEnv),r=ae,{promise:a}=this.actionsApiPromise(r,n);return oh({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=Ph.buildActionObject({},this.c11nEnv),r=oe,{promise:a}=this.actionsApiPromise(r,n);return oh({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=Ph.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),o=re;r?.containerName||(r.containerName=Ur.getTargetViewContainerName(o));const{promise:s}=this.actionsApiPromise(o,a);return oh({type:o,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),s}changeHandler(e,t){Ph.changeHandler(e,t)}eventHandler(e,t){Ph.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),o=Nh.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let s=this.c11nEnv.getValue(j.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),s=lh(`.${i.join(".")}.classID`,a,r)),e=Ch.trimDotForProperty(e),oh({type:ee,payload:{reference:o,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:s}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:o="",isListEntry:s=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName();let l=this.c11nEnv.getPageReference();const d=o?.startsWith(l)?o.replace(l,""):o;l=o||l;const u=Nh.getContextPath(l,e);let p=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(d?`${d}${e}`:e,t,{isArrayDeepMerge:a}),this.c11nEnv.isBulkAction()&&(p=!0),e||(e=this.c11nEnv.getStateProps().value),Yn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:l,context:c,isListEntry:s}),oh({type:Q,payload:{reference:u,value:t,context:c,isArrayDeepMerge:a,skipDirtyValidation:i,...p&&{isStrictTracking:p},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=Me,{context:n}=e,r=n&&n.includes(j.MODAL),a=Ph.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=j.MODAL,a.isModalAction=r),oh({type:t,payload:a});const{promise:o}=this.actionsApiPromise(t,a);return o}refreshCaseView(e,t,n,r={}){const{promise:a,actionMgrID:o}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:s,propertyName:i,preserveClientChanges:c,classID:l,context:d,optionalPayload:u}=r,p={actionMgrID:o,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,optionalPayload:u};r.refreshFor&&(p.refreshFor=r?.refreshFor),r.skipDataMerge&&(p.skipDataMerge=r?.skipDataMerge);const h=d||this.c11nEnv.getContextName(),f=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&s&&(((e,t)=>rn(e)&&!nn(e,t))(h,f)||nn(h,f))?Mn(h,n,p):Rn(e,t,h,n,p),a}openEmbeddedDataModal(e,t,n,r,a,o){const s=pt,i=t.getCaseInfo().getKey(),c=`${t.getPageReference().replace(F.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,l={targetProperty:n,index:r,viewID:e,ID:i,actionType:a,interestPage:Ch.convertPageRefToClipboardPageNotation(c),heading:o},d=Ph.buildActionObject(l,this.c11nEnv),{promise:u}=this.actionsApiPromise(s,d);if(cp.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=Qt.trimAnnotation(e.config.value),r=Dp(n.startsWith(".")?n.replace(".",""):n,e.config.classID);if(r?.isDeclarativeTarget){const e=t.getPageReference();vn.addFieldNode(t.getContextName(),e+c,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:e+c})}}))}return oh({type:s,payload:{...d,containerName:F.MODAL,skipSemanticUrl:!0}}),u}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=ht,n=this.c11nEnv.getPageReference().replace(F.CASE_INFO.CASE_INFO_CONTENT,""),r=gu(e),a={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:ol(r),interestPage:Ch.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isModalAction:!1,target:this.c11nEnv.getTarget()};e&&e.includes(j.MODAL)&&(a.containerName=j.MODAL,a.isModalAction=!0);const o=Ph.buildActionObject(a,this.c11nEnv),{promise:s}=this.actionsApiPromise(t,o);if(Sl(r)){const[e,t,n]=fn(this.c11nEnv.getPageReference());vn.mutatePageList(this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),e,t,{type:Qe,rowIndex:n}),oh({type:Qe,payload:{pageReference:this.c11nEnv.getPageReference(),context:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isListEntry:!0}})}return Pd.executeOrQueueDeferredAction({type:t,payload:{...o,context:r}}),s}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=gu(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(ft);return Mn(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}};const xd=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=bf("getCaseStages",n);return(await dc(r,{method:a},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_TYPE_ID)}getAvailableProcesses(){return this.c11nEnv.getValue(j.CASE_INFO.AVAILABLEPROCESSES)}getKey(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(j.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(j.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO);return Zt(e)}isLocalAction(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO);return tn(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===j.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=nu(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===j.VIEW?a?.name:null}(e&&e.startsWith(j.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(j.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),t=W(this.c11nEnv.getContextName());let n;t&&(n=sh(t));const r=n?.caseInfo?.availableActions,a=sh(this.c11nEnv.getContextName()),o=a?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:o}return o}return this.c11nEnv.getValue(j.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(j.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),t=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENT_LABEL),n=this.c11nEnv.getValue(j.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 o=[...n,...a];let s=JSON.parse(JSON.stringify(o));return e&&!this.isPerform()&&(s=s.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),s}getActiveCaseActionName(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(j.CASE_INFO.GETNEXTWORK)}},{RESOURCE_TYPES:wd}=F;const Md=class{static openCase(e,t,n,r={}){const a={insKey:e,acTargetName:n,actionMgrID:ln.getNextActionMgrId(),context:t,...r},o=de;r&&r.channelName&&(a.headers={},a.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:s}=ln.actionManagerPromise(o,a.actionMgrID);return oh({type:o,payload:a}),s}static openAssignment(e,t,n,r={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:ln.getNextActionMgrId(),context:t,...r},o=fe;r&&r.channelName&&(a.headers={},a.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:s}=ln.actionManagerPromise(o,a.actionMgrID);return oh({type:o,payload:{...a}}),s}static createCase(e,t,n,r={}){const a=le,o={class:e,acTargetName:n,actionMgrID:ln.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(o.headers={},o.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:s}=ln.actionManagerPromise(a,o.actionMgrID);return oh({type:a,payload:{...o}}),s}static getNextWork(e,t,n={}){const r=fe,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:ln.getNextActionMgrId(),context:e,...n},{promise:o}=ln.actionManagerPromise(r,a.actionMgrID);return oh({type:r,payload:{...a}}),o}static getOpenedCaseItems(e){const t=[],n=tu(e);if(n){const{items:r={}}=n,a=Object.keys(r),o=pu(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===wd.CASE||r[n].resourceType===wd.ASSIGNMENT)){const{key:a="",context:s}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),l=lh(".caseTypeID",j.CASE_INFO.CASE_INFO,s),d=o===n;t.push({...i,key:a,workID:a,caseID:c,className:l,context:s,containerItemID:n,target:e,active:d})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:r,reqType:a}=bf(Be,n),o={},s=V.getRemoteHeaderFromSourceClass(t??"");return s&&(o.RemoteSystemID=s),dc(r,{method:a,headers:o})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=bf("getBulkActions"),r=e.map((e=>({ID:e}))),a=r.length,o=a/5,s={},i=[];for(let e=0;e<a;e+=o)s.cases=r.slice(e,e+o),s.cases.length&&i.push(dc(t,{method:n,body:s}));const c=await Promise.all(i);let l=[];for(let e=0;e<c.length;e+=1)0!==e?l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID))))):l=c[e].data.availableActions;return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:r}=bf("getCaseBulkActions",t),a=await dc(n,{method:r});let o=[];return a.data?.availableActions?.length&&(o=a.data.availableActions),o}};class Ld{constructor(e){Ld._instance=this,this.context=`${e}/${j.SUGGESTION}`,ah()?.getState().data?.[this.context]||oh({type:Fe,payload:{context:this.context,data:{}}})}getField(e){return lh(e,"",this.context)}setField(e,t){oh({type:Q,payload:{reference:e,value:t,context:this.context}})}removeField(e){oh({type:me,payload:{reference:e,context:this.context}})}setState(e){oh(Rh({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Fd=Ld;const jd=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=ih();return n?Ch.getIn(n,t):null}static setSharedState(e,t){e&&oh(uf({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:o}=r;if(!e||!t)return;oh(pf({context:e,reference:o?`${o}.${t}`:t,value:n,isArrayDeepMerge:a}))}static getSuggestionsContext(e){return new Fd(e)}};const Ud=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Nh.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Nh.getContextPath(this.datasource,this.index);return this.index+=1,Kd({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class kd{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,Kd({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Vd=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new Ud(e,e.context||"",t);if(n){const n=uh(`${t.context}.${j.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new Ud(e.children[0],n||e.context,t)}return e?.children?new kd(e.children,t):void 0};class Bd{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=>cl.isProperty(e))).map((e=>cl.getPropertyName(e)))}}const Gd=new Bd;let Wd;Object.freeze(Gd);const Hd=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],o=Qt.trimAnnotation(a);if("string"!=typeof o&&"string"!=typeof a||!(Ch.isValidAnnotation(a)&&Ch.isPropertyRef(o)||a.startsWith("@W ")||a.startsWith("@E ")||a.startsWith("@ATTACHMENT "))){if(Array.isArray(o))o.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),Hd(e,t[r][n],a)}));else if(o&&"object"==typeof o&&"exp"!==o.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},Hd(o,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=o}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},qd=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...Ch.deepClone(t.inheritedProps)]};class Yd{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,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=Ch.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&qd(this._inheritedConfig,t?.config),Hd(this._rawConfig,this._stateProps),this._isState=!Ch.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=Ch.isExpressionExist(this._rawConfig.config),this._isWhenExist=Ch.isWhenExist(this._rawConfig.config),this._isValidatorExist=Or.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=F.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let o=this.options.pageReference;if(this.options.pageReference&&(o=Qt.handleAnnotation(this.options.pageReference,this)),this._pageReference=Nh.getContextPath(o||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&Ch.isWhenExist({visibility:this.meta?.config?.visibility})&&Dn(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=Nh.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=Qt.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=Ch.isExpressionExist(e),this._isWhenExist=Ch.isWhenExist(e),this._isValidatorExist=Or.isValidatorExist(e)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&(this.viewName=Qt.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&wn(this)}}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=Qt.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=Qt.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:a,disabled:o,visibility:s,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const d="Address"===this._type&&this._rawConfig?.config?.associatedView?Qt.trimAnnotation(this._rawConfig.config.associatedView):"",u=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Qt.trimAnnotation(t),label:u?.startsWith("@")?Qt.handleAnnotation(u,this,void 0):u,required:r,readOnly:a,disabled:o,visibility:s||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};vn.addFieldNode(this._contextName,this._pageReference,(d||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value"))vn.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",Qt.trimAnnotation(this.getPropertyName()),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;vn.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&this.viewName&&vn.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&vn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&vn.addViewNode(this._contextName,this._pageReference,Qt.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&vn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=Ch.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===j.VIEW)t=j.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=j.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=Qt.isProperty(n)?Qt.trimAnnotation(n):""}e&&n.forEach((n=>{vn.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==j.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,readOnly:r,disabled:a,visibility:o,validationType:s,selectionMode:i,selectionList:c,selectionKey:l,referenceList:d,renderMode:u,caption:p}=this.getRawConfigProps(),h=t||p;let f=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(f=this.getSelfReferencingDatapageKeys()),vn.addPageListNode(this._contextName,this._pageReference,this.viewName??"",Qt.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Qt.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?Qt.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:a,visibility:o||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:s,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:u,referenceList:d,selectionKey:l,index:this.index,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?f:void 0});const g=this.getValue(Qt.trimAnnotation(this.getPropertyName()),this._pageReference)||[];vn.updatePageListNode(this._contextName,this._pageReference,Qt.trimAnnotation(this.getPropertyName()),g.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}setXRayInfo(e){Ch.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){Ch.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new xd(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getCaseInfo().getClassName();return e?`CASE!${e}`.toUpperCase():null}getListActions(){return Pr(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;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Nh.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[j.CONTAINERS.ROOT_CONTAINER,j.CONTAINERS.VIEW_CONTAINER,j.CONTAINERS.FLOW_CONTAINER,j.CONTAINERS.MODAL_VIEW_CONTAINER,j.CONTAINERS.PREVIEW_VIEW_CONTAINER,j.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=Zd.PRIMARY,name:r,routingInfo:a}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===a)&&r?r:this.options.containerName||n}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=c?.getStore()?.getState()?.data[`${this.getContextName()}/${j.SUGGESTION}`],n=this.getStateProps()?.value,r=Nh.getContextPath(this.getPageReference(),n),a=t?jd.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Tr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),Ch.resolveStringBooleans(e)}getRawConfigProps(){const e={...Tr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Nh.resolveProps(e,t,this),Qt.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Hd(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===j.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===j.MODAL_VIEW_CONTAINER||t===j.CASE_CREATE_STAGE){const t=pu(`${j.APP.APP}/${this.getContainerName()}`),n=qn({context:t,category:F.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||Qt.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=qn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_ERROR}),r=qn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_INFO});n&&n[0]&&(e.validatemessage=n.map((e=>up.getLocaleValue(e.message.replace(/\.$/,""),"Messages"))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=j.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status),r&&r[0]&&(e.infoMessage=r[0].message,e.status=j.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===j.ROOT_CONTAINER){const t=Xn(r,pu(`${j.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages;const n=jd.getSharedState("isLoggedOut");e.isLoggedOut=n,this._stateProps.isLoggedOut=n;const a=qn({context:j.APP.ROOT,category:"PAGE"});e.pageMessages=a,this._stateProps.pageMessages=e.pageMessages}if(t===j.HYBRID_VIEW_CONTAINER){const t=qn({context:j.APP.APP,category:j.HTTP});e.httpMessages=t,this._stateProps.httpMessages=t}if(t===j.APP_SHELL&&e.portalDocMode===j.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Md.getOpenedCaseItems(`${F.APP.APP}/${j.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===j.APP_SHELL){const t=j.APP.APP,n=pu(`${t}/${this.getContainerName()}`),r=[...qn({context:t,category:"PAGE"})||[],...qn({context:n,category:"PAGE"})||[]],a=r.length>0?r:void 0;e.pageMessages=a,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===j.SCALARLIST&&(this._stateProps.value=e.value),t===j.APP_SHELL||t===j.MODAL_VIEW_CONTAINER||t===j.CASE_CREATE_STAGE||n.template===j.CASE_PREVIEW){let t=qn({context:j.APP.APP,category:"HTTP"});const n=qn({context:pu(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(qn({context:pu(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=qn({context:pu(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>e.message)):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((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===j.VIEW_CONTAINER||t===j.FLOW_CONTAINER||t===j.MODAL_VIEW_CONTAINER||t===j.PREVIEW_VIEW_CONTAINER||t===j.ROOT_CONTAINER){if(e.routingInfo=yt(this.getContainerName(),this._contextName),t===j.ROOT_CONTAINER&&(e.rootConfig=Bd.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===j.FLOW_CONTAINER){const t=qn({context:this.getContextName(),category:j.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=Iu(n)[0];if(r){const t=pu(r),n=c?.getStore()?.getState()?.data;n&&t&&(e.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime);const a=qn({context:t,category:F.PAGE}),o=qn({context:t,category:"HTTP"});e.httpMessages=o,e.pageMessages=a,this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,o?.forEach((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(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===j.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===j.CASE_VIEW||n.template===j.CASE_PREVIEW||n.template===j.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===j.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e),this.updateContextTree()}isReadOnlyField(e,t){const n=cl.isPropertyInternal(t),r=e.datasource,a=this.getComponentConfig().isSearchField,{isClassKey:o,isSpecial:s,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==j.ASSOCIATED;return!a&&(i||n||!r&&(o||s)&&c)}getPropertyDetails(e,t,n){return e===j.ASSOCIATED?{propertyValue:t,propertyAnnotation:j.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:j.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,this.isReadOnlyField(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig(),{propertyValue:a,propertyAnnotation:o}=this.getPropertyDetails(r,n,t);if(a&&"string"==typeof a&&(a.includes(o)||a.includes(j.ATTACHMENT_ANNOTATION))){const t=Qt.getPropertyName(a),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=Jp(`${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(j.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(Dp(e,t),e)}return this.resolvePropertyMetadata(Dp(t.pop(),this.getValue(`.${t.join(".")}${j.CLASS_ID}`)),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(Dp(n,this.getValue(`${t.join(".")}${j.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(j.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[F.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(F.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>nn(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()[F.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[F.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 Tl(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 this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?Qt.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||Qt.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||"string"==typeof this._readOnly&&Qt.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;if(!1===this.getConfigProps().requiresVisibleChildren)return!0;const t=e.getConfigProps(),n={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=e._type&&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()))}getChildrenIterator(){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 sh(e||this.getContextName())}getImagePath(e){return`${wr.getConstellationServiceUrl()}/v860/${wr.getAppAlias()}/image/${e}?org=${ip.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=Vd(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,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null}),t=[];for(;e?.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!e||!0!==Bd.allowedComponetsForBulkProcessing[e]&&!0!==Bd.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e?.resetIndex(),t}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),a=this?.getMetadata();let o=null;if(a){const e=a?.type;e&&!["View","Region"].includes(e)&&(o=e)}return up.getLocaleValue(e,t,r,o)}getLocalizedValueForFieldLabel(e,t,n){const r=n||this.getLocaleRuleName(),a=this?.getMetadata();let o=null;const s=cp.getLocale();if(a){const t=a?.type,n=["View","Region"],r=a?.config?.label??a?.config?.caption;if("en-US"!==s&&r?.startsWith(j.FIELD_LABEL_ANNOTATION)){const t=r.split(`${j.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),a=n?.pop();let s=`${a}`;const i=this.getFieldMetadata(s),c=i?.classID||this.getValue(`.${n?.join(".")}${j.CLASS_ID}`),l=i?.definedOnClassID;return s=`${l||c}.${s}`,up.getLocaleValue(e,s,up.FIELD_LABELS_BUNDLE_KEY,o)}t&&!n.includes(t)&&(o=t)}return up.getLocaleValue(e,t,r,o)}getLocalizedParagraphValue(e){const t=Hp(e,this.getCurrentClassID()),n=t?.definedOnClassID;return up.getParagraphLocaleValue(n||this.getCurrentClassID(),e)||t?.content}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?Nh.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${j.SUGGESTION}`):Nh.getPropertyValue(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)})),qd(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Nh.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,a={}){let o,s;const{isArrayDeepMerge:i}=a;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(o=!0,t||(s=!0)),oh({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...o&&{isStrictTracking:o},...s&&{removePropertyFromChangedList:s}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(ll.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;hl[t]=hl[t]||{},hl[t][r]||(hl[t][r]={initialValue:lh(r,null,t)}),hl[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return dh(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(j.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=j.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),oh(Rh({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;oh({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){oh(of(e,t||{},n))}getComponent(){return Wd({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=uh(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,t,this._contextName);a=Nh.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=Qt.handleAnnotation(e,this),a=Nh.getContextPath(this._pageReference,e)||""}return Wd(Kd({meta:e,index:this.index,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 Nh.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(j.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,Kd({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 Ml(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new Dd(this)),this._actionsApi}getActionManager(){return ln}doesContextExist(e){return Eh(e??this.getContextName())}getGoogleMapsAPIKey(){return _()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=sh(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?Yn({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?Yn({type:"error",...e}):(Yn({type:"error",...e,context:j.APP.APP}),Yn({type:"error",...e,context:pu(`${j.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return uh(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=zc(t);Kc[e]?Kc[e].fieldOrder[r]=n:Kc[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();vr(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e+=1)Er(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=jd.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Nh.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=Nh.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,jd.getSuggestionsContext(this.getContextName()).removeField(n)}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:r={}}={}}=n||{};return Object.values(r).forEach((n=>{const[,r]=n.split("."),a=t?.split(".").pop();r===a&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}}function Kd(e){const t=new Yd(e);return{getPConnect:()=>t}}function zd(e){Wd=e}const Xd=class{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:a,items:o}=e;if(a&&o){const e=a[a.length-1];if(o[e]?.view&&Object.keys(o[e].view).length>0){const a=o[e],s=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=a,{viewName:l,viewContext:d}=this.processRootViewDetails(i,a,t);if(!l)return null;return Kd({meta:i,options:{context:c,pageReference:d||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===Zd.WORKAREA||n===Zd.MODAL||l===j.CREATE_DETAILS_VIEW_NAME,target:s}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:a}={}}=e,{context:o}=t;let s=a,i=r;const c=cl.isProperty(a),l=cl.isProperty(r);if(l){const e=cl.getPropertyName(r);i=lh(`.${e}`,e.startsWith(".")?n:"",o)}if(i||(i=n),c){const e=cl.getPropertyName(a);s=lh(`.${e}`,i,o)}return c&&l&&""!==s&&(s=a,i=r),{viewName:s,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=pu(e),o=nu(e,t);o&&({key:r,flowName:a}=o)}t.addContainerItem({semanticURL:"",key:r,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}},Jd={defaultLimit:16},Qd={SINGLE:"single",MULTIPLE:"multiple"},Zd={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},eu=()=>ah()?.getState()?.containers,tu=e=>e?ah()?.getState().containers[e]:(Et.error("getContainerData: target is the required parameter"),null),nu=(e,t)=>{if(!e||!t)return null;const n=eu(),r=n?.[e];return r&&r.items&&r.items[t]||null},ru=e=>e?ah()?.getState().containers[e]?.items:(Et.error("getContainerItems: target is the required parameter"),null),au=e=>e?ah()?.getState().containers[e]?.accessedOrder||[]:(Et.error("getContainerAccessOrder: target is the required parameter"),[]),ou=e=>e?au(e)?.length>0||!1:(Et.error("areContainerItemsPresent: target is the required parameter"),!1),su=(e,t,n)=>{if(!e||!t)return Et.error("isContainerItemExists: target and key are required parameters"),!1;const r=eu(),a=r?.[e],o=a&&a.items||null,s=n||((e,t)=>e===t);if(t&&o)for(const e in o)if(s(t,o[e].key))return!0;return!1},iu=(e,t,n)=>{if(!e||!t)return Et.error("getContainerItemName: target and key are required parameters"),null;const r=eu(),a=r?.[e],o=a&&a.items||null,s=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&o)for(const e in o)if(s(t,o[e].key))return e;return null},cu=(e,t)=>{if(e&&t)for(const a of Object.keys(t))if(n=e,r=t[a].key,n?.toLowerCase()===r?.toLowerCase())return t[a];var n,r;return null},lu=e=>{if(!e)return Et.error("getContainerItemByKey: key is required parameter"),null;const t=eu()??{};for(const n of Object.keys(t))if(t[n]){const r=t[n].items??null,a=cu(e,r);if(a)return a}return null},du=(e,t)=>{if(!e||!t)return Et.error("isContainerInitialized: context and name are required parameters"),!1;const n=eu();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},uu=(e,t)=>{if(!e||!t)return Et.error("getContainerType: context and name are required parameters"),null;const n=eu(),r=n?.[`${e}/${t}`];return r&&r.type},pu=e=>{if(!e)return Et.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=eu();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},hu=(e,t,n)=>{if(!e||!t)return Et.error("isContainerItemActive: target and key are required parameters"),!1;const r=iu(e,t,n);return!!r&&r===pu(e)},fu=(e,t)=>{let n=null;const r=eu();for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&r[a].items){const o=r[a].items[e];if(n=o?o[t]:null,n)break}return n},gu=e=>e?fu(e,"context"):(Et.error("getDataContextName: containerItemName is required parameters"),null),mu=e=>{if(!e)return Et.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=eu();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,o=a&&a.length>0?a[a.length-1]:null;t=gu(o)}return t},yu=e=>{if(!e)return Et.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=eu(),o=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=o(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Iu=e=>{if(!e)return Et.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=eu();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},Eu=e=>{if(!e)return Et.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=eu();for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e){(au(r)||[]).forEach((n=>{gu(n)!==e&&t.push(gu(n))}))}return t},Au=e=>{const t=[...Eu(e),e],n=[],r=ah()?.getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${j.SUGGESTION}`)&&n.push(`${e}/${j.SUGGESTION}`)})),n},Cu=e=>e?e&&tu(e)&&tu(e).type===Qd.SINGLE:(Et.error("isContainerSingleMode: target is required parameters"),null),_u=e=>e?e&&tu(e)&&tu(e).type===Qd.MULTIPLE:(Et.error("isContainerMultipleMode: target is required parameters"),null),Su=e=>e?tu(e)&&tu(e).items&&Object.keys(tu(e)?.items).length>0||!1:(Et.error("hasContainerItems: target is required parameters"),!1),bu=e=>e&&Jd[e]?Jd[e]:Jd.defaultLimit,Nu=(e,t=Jd.defaultLimit)=>{e?Jd[e]=t:Et.error("setContainerLimit: target is required parameter")},vu=e=>{if(!e)return Et.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=tu(e),{items:r={}}=n,a=Object.keys(r),o=bu(e);return a&&a.length>0&&a.length>=o&&(t=!0),t},Pu=e=>{if(!e||!e.name||!e.context)return Et.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=tu(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=Iu(`${j.APP.APP}/${j.PREVIEW}`),o=Eu(`${j.APP.APP}/${j.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...o],childContainers:a}},Tu=e=>{if(!e)return Et.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=gu(e);return Sl(t)||Mc(e)},$u=e=>{if(!e)return Et.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=tu(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!Tu(n)){t=n;break}}return t},Ou=e=>{if(!e)return Et.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=ah()?.getState()||{};for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(0,n)},Ru=(e,t={})=>{if(!e)return Et.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Ou(e),r=gu(e),{skipDirtyCheck:a}=t;let o=!0,s=[];if(Tu(e)&&!a&&(o=window.confirm(up.getLocaleValue(ml,"Messages"))),o){const{accessedOrder:t=[],items:a={},type:o}=tu(n);s=t.filter((t=>t!==e));const i=s[s.length-1],c=a[i]||{},{semanticURL:l=j.FORWARD_SLASH_STRING,context:d}=c;s.length>0&&l&&l!==j.FORWARD_SLASH_STRING?Rf({directUrlUpdation:!0,semanticURL:l,options:{containerItemID:i,context:d}}):Rf({directUrlUpdation:!0,semanticURL:j.FORWARD_SLASH_STRING,options:{}});oh(Jh({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:s,containerType:o}}))}return Promise.resolve({newAccessedOrder:s,removeItem:o})},Du=(e,t,n,r)=>{const a="root",o=H(t,a,!0),s=mt(t,a),i={data:n,context:r?"app":o},c=[Uh({root:e,containerItemID:o,context:r?"app":o,target:s,containerName:t})];c.push(Rh(i)),oh(c)},xu=(e,t,n)=>{let r=au(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1){if(gu(r[e])===n){a=!0;break}}return a},wu=e=>{if(!e)return Et.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=eu(),n=gu(e),r=t?Object.keys(t):[];let a=!1;for(let t=0;t<r.length&&(a=xu(r[t],e,n),!a);t+=1);return a},Mu=e=>{Array.isArray(e)||(e=[e]);const t=eu()||{};return e.map((e=>{const n=Ou(e);return Ch.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},Lu=e=>{const{transientItemID:t,data:n,options:r}=e,a=Ch.deepClone(ah()?.getState().data[t]);r?.reset&&Ch.iterateLeafNodes(a,(e=>{"classID"!==e[e.length-1]&&Ch.setIn(a,e,"")})),oh(Vh({transientItemID:t,data:Ch.mergeDeep(n,a)}))},Fu=e=>{const{transientItemID:t,data:n}=e;oh(Gh({transientItemID:t,data:n}))},ju=e=>{const t=Ch.deepClone(ah()?.getState().data[e]);Ch.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&Ch.setIn(t,e,"")})),oh(Bh({transientItemID:e,data:t}))},Uu=e=>{const t=Ch.deepClone(ah()?.getState().data[e]);Ch.iterateLeafNodes(t,(e=>Ch.setIn(t,e,""))),oh(Wh({transientItemID:e,data:t}))};class ku{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 Vu=()=>ku,Bu=e=>{const t={containerName:e};t.childContainers=Iu(e),oh({type:Le,payload:t})},Gu=(e,t)=>{const n=yu(e),{key:r}=nu(Ou(e),e),a=[];n.forEach((e=>{const{key:n}=nu(Ou(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Ou(e),context:e};a.push({type:ge,payload:n})}})),a.length&&oh(a)},Wu=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Ou(e),context:e};n.push({type:ge,payload:r}),n.length&&oh(n)},Hu=()=>cp.isPortalLoaded?"app":"root",qu=()=>Pl,Yu=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Ou(e),context:e};oh({type:ge,payload:n})},Ku=(e,t)=>{const n=iu(e,t),r=iu(`${n}/workarea`,t);return gu(r)},zu=e=>e?fu(e,"parentContext"):(Et.error("getContainerParentContext: containerItemName is required parameters"),null),Xu=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},Ju=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},Qu=()=>Xd,Zu=/{(.*?)}/i,ep=/{(.*?)}/g,tp=e=>null!==e.match(Zu),np=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),rp=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`}},ap=()=>np(window.location.pathname),op=(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)}};const sp=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&&(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=>{tp(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=()=>np(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>np(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,""),np(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:o,endPoint:s,params:i}=this.appRoutesMeta?.[r].restApi||{},c={...a},{caseClassName:l,caseID:d}=c;if(V.isRemoteCase(l)){const{RemoteClassGroup:e,RemoteSystemID:t}=V.getRemoteCase(l);c.caseID=d?.replace(l,e?.toUpperCase()),c.RemoteSystemID=t}const u={routeKey:r,requestType:o,routeEndpoint:s,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;if(tp(r)){const e=r.match(ep);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}))}const o=Of(a),s=new URL(o);return this.isDefaultPortal()||this.getPortalName()&&!s.searchParams.toString().includes("portal=")&&s.searchParams.append("portal",this.getPortalName()),s.toString()}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:a}=e;if(a&&!r)return;const o=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(Qr(t))),s=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,i={semanticURL:o,directUrlUpdation:!0,options:{acName:s,context:mu(s)}};$f(i);const c=r.substring(r.lastIndexOf("-")+1),l=t.substring(t.lastIndexOf(" ")+1),d=cp.environmentInfoObject?.pxApplication?.pyLabel;jf(`${c} (${l}) - ${d}`)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},a=r?.split("/").length,o=r?.split("/"),s=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return o?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===s.length)return this._getQueryParamsResolvedURL(s[0],n);if(0===Object.keys(t).length)return"";const i=s.find((e=>{const r=this.appRoutes[e].payload,a={...n};delete a.dataViewName,delete a.dataContext;const o=r.dataViewKeys||r.dataContextParameters||{},s=Object.keys(t).every((e=>t[e]===r[e]));return!!s&&(Ch.isEmpty(o)||Ch.isEmpty(a)?s:Object.keys(a).every((e=>Object.prototype.hasOwnProperty.call(o,e))))}));return i?this._getQueryParamsResolvedURL(i,n):s.includes("cases/{id}")&&n?.id?"cases/{id}":""}_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 o=new URLSearchParams(a),s={};for(const[r,a]of o.entries())if("string"==typeof a&&tp(a)){const o=this._getDynamicKeyName(a);s[r]=n?t[o]||e[o.toLowerCase()]:t[o]}else"string"==typeof a&&(s[r]=a);return`${r}?${new URLSearchParams(s).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?.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const o=a.match(ep);if(o)for(let e=0;e<o.length;e+=1){const n=o[e].replace("{","").replace("}",""),r=new RegExp(o[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,o]=t.includes("?")?t.split("?"):[t],[s,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),l=s.split("/"),d={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],tp(l[e])){d[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const u=this._getQueryParamsObject(i),p=this._getQueryParamsObject(o),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in u)tp(u[e])?d[e]=p[e]||h[e.toLowerCase()]:d[e]=u[e];let f;o&&(f=this._getQueryParamsResolvedURL(n,p,!0));const g=this._resolvePayload(e,d,n);return{...this._resolveRouteEndPoint(g,n),urlPath:f||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!tp(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(ep);for(let a=0;a<t.length;a+=1){const o=t[a],s=this._getDynamicKeyName(o);if(void 0!==e.payload[s]){const t=e.payload[s];n=n.replace(o,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${s}} in routeEndpoint- ${s} 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&&tp(a)){const e=a.match(ep);for(let n=0;n<e.length;n+=1){const r=e[n],o=this._getDynamicKeyName(r);if(void 0!==t[o]){const e=t[o];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in payload- {${o}} 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],o=t.split("/");if(o.length!==r.length)return!1;let s=0;for(s=0;s<o.length;s+=1){const e=o[s].toLowerCase();if(!tp(e)&&e!==r[s]&&rp(e)!==r[s])return!1}if(a){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(a.toLowerCase()),r=new Set,o=new Set,s=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())o.add(e);if(o.size!==r.size)return!1;for(const n of r){if(!o.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!s.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{op(e,t,"warning"),op("Error in Generated Routing Table",null,"error"),op("Back | Forward for this page may NOT work as intended",null,"warning"),op("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},ip=sp;const cp=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",this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||Ch.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1}}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 ip.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(j.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(){ec.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}getAvailableLocalePacks(){return this.environmentInfoObject?.pyAvailableLocalePacks?.map((e=>e.pyLabel))||[]}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}};const lp=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),o=e.substring(r,a+1),[s,i]=this.getKeyAndValue(o);this.addKeyToMap(s,i),n+=`${o.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),o=e.substring(r,a+1);n+=this.keyMap[o],t=a+1}return n}};class dp{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";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[dp.#e(t)]=n};getLocaleForRule(e=this.#t()){return this.localeStore[dp.#e(e)]}resetLocaleStore=()=>{this.localeStore={}};#n(e){return e?dp.#e(e):this.#t()}#r(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}#a(e,t){return t!==this.FIELD_LABELS_BUNDLE_KEY?e?`${e}.fields`:"fields":e}getLocaleValue(e,t,n,r){n=this.#n(n);const a=this.#r(e);a&&(e=lp.formatLocaleKey(e));const o=this.#o(e,n,t,r);return"Messages.fields"===(t=this.#a(t,n))&&"string"==typeof e?this.getLocalizedErrorMessage(o,e)||e:a?lp.replaceWithValue(o[e]||e):o[e]||e}#o(e,t,n,r){t!==this.FIELD_LABELS_BUNDLE_KEY&&(n=n?`${n}.fields`:"fields");let a=this.localeStore[t.toUpperCase()],o=a?Ch.getIn(a,n,{}):{};return!o[e]&&r&&(a=this.localeStore[this.#t().toUpperCase()],o=a?Ch.getIn(a,`${r}.${n}`,{}):{}),o}#t(){return void 0===cp.getFeatureMap()?.localizationVersion?this.GENERIC_BUNDLE_KEY:this.GENERIC_BUNDLE_KEY_LP}getParagraphLocaleValue(e,t){const n=`${e}!${j.PARAGRAPH}!${t}`,r=this.localeStore[n.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):null}getPortalLocaleReference(e){return e?`PORTAL!${e}`.toUpperCase():`PORTAL!${cp.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return cp.getFeatureMap().localizationVersion||1}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=cp.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[dp.#e(e)]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:wr.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&&null!==e.value){const a=r[t];let o;try{o=await e.value.json()}catch{o=null}o&&n.push({localeRuleKey:a.localeRuleKey,jsonData:o})}})))}return n}async loadLocaleResources(e){const t=cp.getUseLocale(),n=cp.getBaseLocale();if(cp&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await this.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}matchPatternWithText(e,t){let n=t;const r=[];for(let t=0;t<e.length;){const a=e[t];if(0!==a.length){const e=n.indexOf(a);if(-1===e)return null;if(t>0){const t=n.slice(0,e);r.push(t)}n=n.slice(e+a.length)}t+=1}return n&&r.push(n),r}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const r of Object.keys(e)){const a=r.split(/\{\d+\}/),o=this.matchPatternWithText(a,t);if(o){const t=e[r];if(n=this.replacePlaceHolders(o,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=cp.getLocale();return this.availableLangPacks?.length||(this.availableLangPacks=cp.getAvailableLocalePacks()),e&&this.availableLangPacks.includes(e)}static#e(e){if(!e)return e;const t=e.indexOf("!CASE!");return-1===t?e:`CASE!${e.substring(0,t)}`}getCaseTypeLocaleReferences(){return cp.getCaseTypeList().map((e=>`${e.pyWorkTypeImplementationClassName}!CASE!${e.pyWorkTypeName}`.toUpperCase()))}}const up=new dp;let pp;const hp=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=pp.getValue(t);return pp.registerAdditionalProps({[t]:`@P ${t}`}),e}}};const fp=class{static getParagraphStream(e,t){return((e,t)=>{pp=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,hp);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}};Jt.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),Jt.registerHandler("@P",((e,t,n)=>t?t.getValue(e):Nh.getLitePropertyValue(n))),Jt.registerHandler("@E",((e,t,n)=>{try{const r=Ut(e),a=kt(r);return Vt(a,t,n)}catch(e){}return!0})),Jt.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:a}=n??{};r=dh(t,`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,a)}return!0===r||"true"===r})),Jt.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let a="",o="";const s=t.getPageReference();if(e.startsWith(".")){a=`${s}.${e.substring(1)}`;const r=e.split(".").filter((e=>!!e));r.length>1&&(r.pop(),o=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===j.READONLY,l=n?.datasource?.name||"",d=t.getComponentConfig();if(d&&d.deferDatasource&&(d.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:d.datasourceMetadata}),i===j.DATA_PAGE))return null;if(i===j.DECISION||i===j.RULE_REFERENCE)return function(e,t){const n=Qt.getPropertyName(e?.propertyForDisplayText??""),r=Qt.getPropertyName(e?.propertyForValue??""),a=t.getContextDataValue(`.${j.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return a?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==j.DATA_PAGE)return n?.datasource?.records;const u=Qt.getPropertyName(n?.datasource?.propertyForDisplayText),p=Qt.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],f=t.getContextName(),g=[];if(h.forEach((e=>{if(Qt.isProperty(e?.value)){let t=lh(`.${Ch.getFullPropertyReference([o,Qt.getPropertyName(e.value)])}`,s,f);g.push(Ch.getFullPropertyReference([s,o,Qt.getPropertyName(e?.value)])),null!=t&&""!==t||(t=j.NULL_STRING),r.push(t)}else r.push(e?.value||j.NULL_STRING)})),f){const e=zt.getContextObjectByName(f)||{};g.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),zt.addContextName(f,e)}const m=function(e,t,n,r){let a="",o=n;if(t.join(j.HASH_DELIMITER)&&(a=Ch.getHashedString(t.join(j.HASH_DELIMITER)),o=n+j.UNDERSCORE_STRING+a),r){const e=ih(),t=e?e[n]?.[o]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const s=(e.getDataObject()[n]||{})[o]||{};return Array.isArray(s?.pxResults)?s.pxResults:[]}(t,r,l,c);return m.map((e=>({key:e[p]||e[`.${p}`],value:e[u]||e[`.${u}`]})))})),Jt.registerHandler("@ROUTING_INFO",((e,t)=>yt(t.getContainerName(),t.getContextName()))),Jt.registerHandler("@ENV",((e,t)=>{switch(e){case j.ENV_INFO_KEYS.APPLICATION_NAME:return cp.getApplicationName();case j.ENV_INFO_KEYS.ACCESS_GROUP:return cp.getAccessGroup();case j.ENV_INFO_KEYS.USER_NAME:return cp.getOperatorName();case j.ENV_INFO_KEYS.USER_ID:return cp.getOperatorIdentifier();case j.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(cp.getApplicationLabel()||"");case j.ENV_INFO_KEYS.USER_IMAGE:return cp.getOperatorImageInsKey();case j.ENV_INFO_KEYS.LOCALE:return cp.getUseLocale();case j.ENV_INFO_KEYS.TIMEZONE:return cp.getTimeZone();case j.ENV_INFO_KEYS.WORK_GROUP:return cp.getOperatorWorkGroup();default:return e}})),Jt.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],o=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=Qt.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=Qt.getPropertyName(e[t]);r[t]=n[a]})),o.push(r)})),o}return[]})),Jt.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 o=e.split(".").filter((e=>!!e));if(o.length>1&&(o.pop(),a=`.${o.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:o,value:s}=n;r.name=o,"string"==typeof s&&s.startsWith("@P")?r.value=`@P ${a}${s.substring(3)}`:r.value=s,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),Jt.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||Nh.getLitePropertyValue(n,e),a=t?.getReferencedUser(r)||Nh.getReferencedUser(r,n);return{userId:r,userName:a?a.UserName:null}})),Jt.registerHandler("@ACTIVE_CASES",((e,t)=>Md.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),Jt.registerHandler("@LR",(e=>e)),Jt.registerHandler("@CASE",((e,t)=>e===j.ID?t.getCaseInfo().getKey():e)),Jt.registerHandler("@SHARED",(e=>jd.getSharedState(e))),Jt.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?fp.getParagraphStream(n,t):null})),Jt.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("]"));if(!t)return null;const{useCustomContext:o}=t;let s;return Ch.isEmpty(o)?s=t.getValue(`.${n}`):(s=o,s=Ch.getIn(s,n)),s&&r.length>0?(a&&(s=s.filter((e=>Bt(a,e)))),s.map((e=>Ch.getIn(e,r)))):null})),Jt.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),Jt.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const gp="downloadAttachment",mp={},yp=e=>{const t=hc();return mp[e]=t,t},Ip=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},Ep=e=>{let t,n,r,a;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,a=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:Ip(e.pyMimeFileExtension||e.MimeType)},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:a,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.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null)}}},Ap={uploadAttachment:(e,t,n,r)=>{const a=new FormData;a.append("appendUniqueIdToFileName",!0),a.append("file",e);const{restApi:o,reqType:s}=bf("uploadAttachment",{});return dc(o,{method:s,headers:{"Content-Type":"multipart/form-data"},body:a,onUploadProgress:t,signal:yp(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(fc,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete mp[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,a.signal=yp(n).token}const{restApi:o,reqType:s}=bf("linkCaseAttachment",{caseID:e});return dc(o,{...a,body:{attachments:t},method:s},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=bf("getCaseAttachments",{caseID:e,includeThumbnail:n});return dc(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=bf("getAttachmentCategories",{caseID:e,type:t});return dc(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=bf(gp,{attachmentID:e});return dc(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=bf("editAttachment",{attachmentID:e});return dc(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=bf("deleteAttachment",{attachmentID:e});return dc(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=bf("downloadDocument",{documentID:e});return dc(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=bf("deleteDocument",{caseID:e,documentID:t});return dc(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 occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{mp[e]&&(mp[e].cancel(),delete mp[e])},buildFilePropsFromResponse:Ep,getAttachmentURL:e=>{const{restApi:t}=bf(gp,{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=>Ep(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(Ep)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t}}};Jt.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):Nh.getLitePropertyValue(n),Ap.prepareAttachmentData(r)})),Jt.registerHandler("@FL",((e,t)=>t.getLocalizedValueForFieldLabel(t.getFieldMetadata(e)?.label))),Jt.registerHandler("@GENAICOACH",((e,t)=>qp(e,t.getCurrentClassID()))),Jt.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),a=t.getPageReference();ul.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",a,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:!0}),`${a}${e}`,`${r}/${a}`,r)}));const Cp={},_p={},Sp={},bp={},Np={},vp={},Pp={},Tp={},$p={},Op={},Rp=(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})):Ch.copy(e,t)},Dp=(e,t="")=>{if(!e)return null;const n=bp[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()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r},xp=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const o=Dp(e,t);return r.length&&(a=r.join(".")),{...o,embeddedType:n,category:a}}const[a,...o]=e.split("."),s=Dp(a,t);return s&&r.push(s.label),xp(o.join("."),s?.pageClass,s?.type,r)},wp=e=>{Rp(e,_p)},Mp=e=>{Rp(e,Sp)},Lp=e=>{if(e.views&&Rp(e.views,_p),e.navigations&&Rp(e.navigations,Sp),e.personalizations&&Rp(e.personalizations,vp),e.insights&&Rp(e.insights,Pp),e.paragraphs&&Rp(e.paragraphs,Cp),e.dataTypes&&Rp(e.dataTypes,Tp),e.datapages&&Rp(e.datapages,$p),e.genAICoaches&&Rp(e.genAICoaches,Op),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=>{Np[e]=t[e]}))}Rp(e.fields,bp)},Fp=e=>_p[e],jp=(e,t)=>{const n=_p[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},Up=e=>Sp[e],kp=e=>e in Np?Np[e]:null,Vp=e=>e in vp?vp[e]:null,Bp=e=>e in Pp?Pp[e]:null,Gp=e=>{const t={};return Object.keys(bp).forEach((n=>{const r=bp[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=Ch.deepClone(a))})),t},Wp=(e,t)=>{const n=Dp(e,t)?.datasource?.parameters;return n?Ch.deepClone(n):null},Hp=(e,t)=>{let n=null;const r=Cp[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Ch.deepClone(n):null},qp=(e,t)=>{let n=null;const r=Op[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Ch.deepClone(n):null},Yp=e=>{if(e in Tp){const{savableDataPage:t}=Tp[e];return t}return null},Kp=e=>{const t=$p[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:a}=t;if(r)return a.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const o=Tp[n];return o?o.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},zp=e=>{if(e in Tp){const{lookupDataPage:t}=Tp[e];return t}return null},Xp=e=>{if(Object.prototype.hasOwnProperty.call(Tp,e)){const{lookupDataPageInfo:t}=Tp[e];return t}return null},Jp=(e,t)=>{const n=e.split("."),r=n.pop(),a=new Yd({options:{pageReference:`${n.join(".")}`,context:t}}),o=Dp(r,a.getCurrentClassID())?.additionalInformation;if(!o?.includes("@PARAGRAPH"))return o;const s=Qt.trimAnnotation(o),i=a.getCurrentClassID(),c=Hp(s,i),l=c?.definedOnClassID,d=up.getParagraphLocaleValue(l||i,s);return d?fp.getParagraphStream(d,a):c?.content?fp.getParagraphStream(c.content,a):null},Qp=(e,t)=>{const n=e.split("."),r=n.pop(),a=new Yd({options:{pageReference:`${n.join(".")}`,context:t}}),o=Dp(r,a.getCurrentClassID()),s={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(o,s),s};class Zp{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,o="singleRecord"){if(!e||!n||!r?.length)return;const s=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=Ch.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===s))||e.push({propertyName:s,mode:o})}else i[t]=[{propertyName:s,mode:o}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,a){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,s=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=Ch.getFullPropertyReference([i,t]),t in s){const e=s[t];Ch.removeExistingDependentProperty(e,o)}}})),Object.keys(s).length>0&&(this.cascadeResetSubscribers[e]=s)}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 o=this.cascadeSubscribers[e][`${t}${n}`];if(!o[a]){o[a]=r;const s=lh(n,t,e);o.previousValue="object"==typeof s?null:s}}))}registerListField(e,t,n,r,a){const o=Zp._getFieldsForList(e,t,n);o.length>0&&(this.registerFields(e,t,o,r,a),td.enableCascade(e))}unRegisterListField(e,t,n,r){const a=Zp._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=Dp(n,lh("classID",t,e));return a&&!Array.isArray(a)&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(Qt.isProperty(e)){const t=Qt.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((o=>{const s=this.cascadeSubscribers[e][t];"previousValue"!==o&&s.previousValue!==n&&(a=!0,r?r.add(s[o]):s[o](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=lh(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=lh(t,"",e);n(e,t,r)}))}))}_updateChangedProperties(e,t,n,r,a,o,s){if(e!==t){const e=r.lastIndexOf("."),t=r.substring(0,e),i=r.substring(e),c=Qn.getMessages({type:"error",property:i,context:a,pageReference:t});if(c?.length>0&&s.push(r),!n)return;o.push(r)}}_getServerProperties(e,t,n,r,a,o){if("object"!=typeof e){a.push(n.replace(/\.(\d+)/g,"[$1]"));let s=!0;0!==this.listChangeSubscribers.length&&Ch.isValidPageListProperty(n)||(s=!1),n=n.replace(/\.(\d+)/g,"[$1]");const i=lh(n,"",t);if(void 0===i&&!e&&0!==e)return;return void this._updateChangedProperties(i,e,s,n,t,r,o)}const s=Object.keys(e??{});for(let i=0,c=s.length;i<c;i+=1){const c=s[i],l=`${n}.${c}`;this._getServerProperties(e[c],t,l,r,a,o)}}getServerProperties(e,t,n=j.CASE_INFO.CASE_INFO_CONTENT){const r=[],a=[],o=[],s=Ch.getIn(e,n);return s&&t?(this._getServerProperties(s,t,n,r,o,a),{changedListProperty:r,leafProperty:o,changedPropertyWithError:a}):{changedListProperty:r,leafProperty:o,changedPropertyWithError:a}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const eh=new Zp;let th=null;const nh=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),rh=e=>{th=e},ah=()=>th,oh=e=>{if(!e)return;let t=[],n=[],r=[];Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:r}=eh.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),ah()?.dispatch(e),Array.isArray(e)||"MERGE_DATA"!==e.type||(r.forEach((t=>{const n=t.lastIndexOf("."),r=t.substring(0,n),a=t.substring(n);Qn.clearMessages({type:"error",property:a,pageReference:r,context:e.payload.context});const o=vn.getFieldReferenceForProperty(e.payload.context,t),s=Nh.resolveContextTreeNodeProps(o.props);Or.validate(s.componentName?.toLowerCase(),s.propertyName,Nh.getLitePropertyValue(s,s.propertyName),s)})),eh.handleServerChanges(e.payload.context,t,n))},sh=e=>ah()?.getState().data?.[e],ih=()=>ah()?.getState().data[j.SHARED],ch=(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,o=nh(a);return Ch.getIn(n,o)},lh=(e,t,n)=>ch(e,t,sh(n)),dh=(e,t,n)=>ch(t,e?`${j.CONTEXT_DATA}.${e}`:`${j.CONTEXT_DATA}`,sh(n)),uh=(e,t,n)=>((e,t,n)=>{const r=nh(`${t}.${n}`);return Ch.getIn(e,r)})(sh(n),`${j.CONTEXT_DATA}.${e}`,t),ph=e=>{const{context:t}=e,n=ah()?.getState().data[t];if(n)return ue;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?_e:ue},hh=(e,t)=>{const n=nh(t);return Ch.deleteIn(e,n)},fh=e=>!Array.isArray(e)&&"object"==typeof e,gh=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:a=[]}=n;Array.isArray(e)&&!t&&(t=[]),Array.isArray(a)&&a.length>0&&a.forEach((t=>{Ch.setIn(e,t,{})}));const o=(e,t)=>{if(fh(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return x()(e,t,o);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return x()(e,t,o);{const n=t.length;if(void 0===r&&n===e.length)return x()(e,t,o)}}return""===t&&e&&"object"==typeof e?e:t};return o(e,t)},mh=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:a}=r,o=nh(t);if("object"==typeof n){const t=gh(Ch.getIn(e,o),n,{isArrayDeepMerge:a});return Ch.setIn(e,o,t)}return Ch.setIn(e,o,n)},yh=(e,t,n)=>{const r=nh(t);return Ch.setIn(e,r,n)},Ih=()=>{const e=Ze,{promise:t,actionMgrID:n}=ln.actionManagerPromise(e);return oh({type:e,payload:{actionMgrID:n}}),t},Eh=e=>{const t=ah()?.getState();return!!t?.data?.[e]};class Ah{static mergeDeep(e,t){return x()(t,e)}static hasIn(e,t){return P()(e,t)}static getIn(e,t,n){return $()(e,t,n)}static setIn(e,t,n){return R()(e,t,n)}static deleteIn(e,t){return N()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return M()(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||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const r=new Set;for(const a in e)t.includes(a)&&"string"==typeof e[a]&&e[a]?.startsWith("@W ")&&(n=Qt.trimAnnotation(e[a]),r.add(n));return"multirecordlist"===e?.type&&"Editable"===e?.renderMode&&Object.keys(e?.allowActions??{}).forEach((t=>{"string"==typeof e?.allowActions[t]&&e.allowActions[t]?.startsWith("@W ")&&(n=Qt.trimAnnotation(e.allowActions[t]),r.add(n))})),[...r]}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;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return 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)?[]:{}),gh(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 h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&Ah.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("."):""}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([a,o])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(o)?o.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof o?n(o,r):t(r.slice(),o),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 crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let a;r.reduce(((e,t,o)=>(a=e[t]?e[t]:Number.isNaN(Number(r[o+1]))?r.length-1===o?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{Ah.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;Ah.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").replace(j.DATA_INFO.DATA_INFO_CONTENT,"");return kn.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}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&ln.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];n="string"==typeof r?"true"===r||"false"!==r&&r:r,e[t]=n})),e}static isValidPageListProperty(e){return!!e&&/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/.test(e)}}const Ch=Ah,_h=j.SUMMARY_OF_LISTS,Sh=j.SUMMARY_OF_WHEN_CONDITIONS;class bh{static updateData(e){Object.keys(e).forEach((t=>{oh(Rh({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{oh(Rh({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Sh}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return Up([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=Fp([this.resolveName(e,t)]);let a=[];if(Array.isArray(r)&&r.length>0){if(t&&r.length>1){if(n||(n=t.getValue(j.CLASS_ID)),!n)return;a=r.filter((e=>e[j.CLASSID]===n))}return 0===a.length?r[0]:a[0]}return r}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=Qt.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=Qt.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:t.startsWith(".")?e+t:`${t}`:e}static getRuleClass(e,t,n){let r;return t?r=t.startsWith(j.CLASS_ANNOTATION)?t.split(j.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:o,name:s,context:i}=n||{},c=this.getRuleClass(t,i,n);return"navigation"===a?r=this.resolveNavigation(o||s,t):"view"===a?r=this.resolveView(o||s,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:s,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return lh(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=uh(`${t}.${_h}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getPropertyValue(e,t,n){return e=Qt.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=bh.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:r,hasSuggestions:a,pageReference:o,context:s}=e;let i=t||r;return n?(i=i?.startsWith?.(".")?i.substring(1):i,i?.split?.(".").reduce(((e,t)=>e?.[t]??void 0),n)):a?bh.getPropertyValue(i,o,`${s}/${j.SUGGESTION}`):bh.getPropertyValue(i,o,s)}static _handlePropString(e,t,n,r,a){n.startsWith("@")?e[t]=Qt.handleAnnotation(n,r,a):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const a=e[r];"string"==typeof a?this._handlePropString(e,r,a,t,n):Array.isArray(a)?a.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof a&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(Ch.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(Ch.mergeDeep(e,t),this._resolveProps(t,void 0,e),Ch.resolveStringBooleans(t)):t}static resolveClassID(e,t,n){const r=Qt.trimAnnotation(e);let a;for(a=r.startsWith(".")?`${t}${r}`:`${r}`;a;){const e=lh(j.CLASS_ID,a,n);if(e)return e;a=a.substring(0,a.lastIndexOf("."))}return null}}const Nh=bh;const vh=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const Ph=class{static#s=[];static#i=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=vh.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#c=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const a=e[r],o={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#s.push(o)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===cp.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=ln.getNextActionMgrId(),n};static#l=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};Nh.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#d())};static#d=()=>{if(!this.#i){if(0===this.#s.length)return;const e=this.#s.shift();this.#l(e),e.config&&"true"===e.config.parallel&&this.#s.length>0&&this.#d()}};static#u=()=>{this.#d()};static#p=(e,t,n)=>{this.#c(e,t,n),this.#u()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Nh.getContextPath(t,n)};static#h(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:a,actions:o}=n[r];if(o){const n=this.getActionHandlers(o,a,t);n&&n.length>0&&this.#p(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();Yn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===cp.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||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,o=this.getFullRef(e);oh({type:Q,payload:{reference:o,value:a,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||oh({type:ee,payload:{reference:o,pageReference:e.getPageReference(),value:a,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const o=a[e],s=t[e];oh({type:Q,payload:{reference:Nh.getContextPath(n,o),value:s,context:r}}),oh({type:ee,payload:{reference:Nh.getContextPath(n,o),value:s,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,o=this.getFullRef(e),s=e.getContextName();n.clearMessages&&Yn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:s}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&oh({type:ee,payload:{reference:o,pageReference:e.getPageReference(),value:r,context:s,propertyName:e.getComponentConfig().value,classID:e.getValue(j.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.#h(e,n)};static pause=()=>{this.#i=!0};static resume=()=>{this.#i=!1,this.#d()};static isQueueEmpty=()=>0===this.#s.length;static clearQueue=()=>{this.#s=[]};static getActionsQueue=()=>this.#s;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Th="CREATE_WORK",$h=e=>({type:Th,payload:e});const Oh=(e,t,n,r="")=>{const a=[];Object.keys(e).forEach((o=>{"object"==typeof e[o]&&o.includes("[")?function(e,t,n,r,a,o){const s=r.substring(0,r.indexOf("[")),i=r.substring(r.indexOf("[")+1,r.indexOf("]"));Array.isArray(t[s])&&(t[s]?.splice(+i,1,e[r]),o.push(s),n.add(`${a}.${r}`))}(e,t,n,o,r,a):e[o]&&"object"==typeof e[o]?(t[o]||(t[o]=Array.isArray(e[o])?[]:{}),Oh(e[o],t[o],n,`${r}.${o}`)):t[o]=e[o]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,a)},Rh=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[]}=t,{context:a,data:o,isArrayDeepMerge:s,preserveClientChanges:i=!1}=e,c=Il(a,!0);((e,t={})=>{const n=Yc.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{Ch.buildObject(e,t,n[e])}))})(a,c);const l=sh(a);let d={};if(l&&o){d=JSON.parse(JSON.stringify(l));const e=JSON.parse(JSON.stringify(o)),t=new Set;Oh(c,d,t),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=Ch.trimDotForProperty(e);const[a,o,s]=fn(e);a&&o&&s&&!r.has(`${a}.${o}`)&&((Ch.getIn(n,`${a}.${o}`)||[]).forEach(((e,n)=>{n!==+s&&Ch.setIn(t,`${a}.${o}[${n}]`,e)})),r.add(`${a}.${o}`))}))})(t,d,e)}!function(e,t){const n=Ch.getIn(e,j.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=Ch.getIn(t,j.REFERENCED_USERS,{}),void Ch.setIn(e,j.REFERENCED_USERS,{...r,...n});r=Ch.getIn(t,j.REFERENCED_USERS,[]);const a=new Map;for(const e of[...r,...n])if(a.has(e.UserID)){const t=a.get(e.UserID);a.set(e.UserID,{...t,...e})}else a.set(e.UserID,e);n.length=0;for(const e of a.values())n.push(e)}}(o,l);const u={caseInfo:{content:{...d?.caseInfo?.content}}};let p=o;return i?(n.forEach((e=>{Ch.deleteIn(u,`caseInfo.content.${e}`)})),p=gh(o,u,{isArrayDeepMerge:!s})):((e,t)=>{const n=hl[e]||{};Object.keys(n).forEach((e=>{Ch.hasIn(t,e)&&(n[e].value=Ch.getIn(t,e))}));let r=Yc.getStateMachinesByContext(e)||{};r={...r,...Yc.getUnConnectedStateMachines(e)||{}},Object.keys(r).forEach((n=>{if(Ch.hasIn(t,n)){const r=Ch.getIn(t,n);r&&Array.isArray(r)&&0===r.length&&Yc.setStateMachineEmpty(e,n)}}))})(a,o),{type:ge,payload:{...e,data:p,...r.length>0?{propertiesToReplace:r}:null}}},Dh=e=>({type:"SHOW_HARNESS",payload:e}),xh=e=>({type:te,payload:e}),wh=e=>({type:ne,payload:e}),Mh=e=>({type:"ADD_WORK",payload:e}),Lh=e=>({type:de,payload:e}),Fh=e=>({type:Ae,payload:e}),jh=e=>({type:Ce,payload:e}),Uh=e=>({type:_e,payload:e}),kh=e=>({type:be,payload:e}),Vh=e=>({type:Ne,payload:e}),Bh=e=>({type:Te,payload:e}),Gh=e=>({type:Oe,payload:e}),Wh=e=>({type:$e,payload:e}),Hh=e=>{const{containerItemID:t}=e;return e.suggestionContexts=Au(t),{type:De,payload:e}},qh=e=>{const{context:t}=e;return{type:se,payload:{context:t}}},Yh=e=>{const{context:t}=e;return{type:ie,payload:{context:t}}},Kh=e=>({type:xe,payload:e}),zh=e=>({type:Re,payload:e}),Xh=e=>({type:Je,payload:e}),Jh=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=gu(n)),e.context=r,e.deleteContext=!wu(n),e.childContainers=Iu(n),e.childContainersContexts=Eu(n),e.transientItems=Mu([...e.childContainersContexts,n]),e.suggestionContexts=Au(n),n===t&&(e.caseID=lh(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=lh(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Se,payload:e}},Qh=e=>{const{containerItemID:t}=e;return e.transientItems=Mu([...Eu(t),t]),{type:Pe,payload:e}},Zh=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:ve,payload:e}},ef=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=gu(n)),e.context=r,e.childContainers=Iu(n),e.childContainersContexts=Eu(n),e.transientItems=Mu([...e.childContainersContexts,n]),e.suggestionContexts=Au(n),n===t&&(e.caseID=lh(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=lh(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:we,payload:e}},tf=e=>({type:pe,payload:e}),nf=e=>({type:fe,payload:e}),rf=e=>({type:Ie,payload:e}),af=(e,...t)=>(Ph.resume(),e(...t)),of=(e,t,n,r,a)=>({type:Ee,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),sf=e=>({type:tt,payload:e}),cf=e=>({type:nt,payload:e}),lf=e=>({type:rt,payload:e}),df=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),uf=e=>({type:ce,payload:e}),pf=e=>({type:Q,payload:e}),hf="add",ff="replace",gf=["portal","noPortal","preview","debug","devtool"];let mf="",yf="Home",If="",Ef=!0;const Af=e=>(Ef=e,Ef),Cf=()=>Ef,_f=(e,t,n)=>ip.getSemanticURL(e,t,n),Sf=(e,t)=>ip.getRestEndPoint(e,t),bf=(e,t)=>{let n=E();const r=Sf(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):{}},Nf=(e,t,n)=>{const{root:r,resources:a}=e,{views:o}=a,{config:s}=r,i=hf;let c="";if(n)c=n;else{const e=o[s.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const l=c.match(ep);if(l){const e=Ch.getIn(t,s.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},vf=(e,t,n)=>{let r,a;r=np(t)?`${e}/${t}`:e;const o=np(n.pxURLPath);o&&(r=`${r}/${o}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const s=r.split("/"),i=s[s.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==yf.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!ip.isDefaultPortal()){const e=ip.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)&&gf.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},Pf=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r},a=!1)=>{let o,s,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(a)o=t,s=n,i=r;else{const{uiResources:n,data:r}=e;({options:i}=e),o=t&&t.pxURLPath&&tp(t.pxURLPath)?Nf(n,r,t.pxURLPath):t||Nf(n,r),s=ip.getEndPointInfo(o.pxURLPath),o.pxURLPath=s.urlPath}const c=vf(mf,ip.getApplicationPath(),o),{title:l}=((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:ip.getApplicationName()),n===`${mf}/${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]}`}})(If,ip.getApplicationPath(),c),d=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(s,{...i,title:l});o.historyAction===hf?((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")}})(d,l,c):o.historyAction===ff&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(d,l,c)},Tf=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:hf,pxURLPath:""},t.pxURLPath=e.semanticURL),Pf(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},$f=e=>{Tf(e)},Of=e=>{const t={pxURLPath:e};return vf(mf,ip.getApplicationPath(),t)},Rf=e=>{const{uiResources:t}=e;Cf()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,a=t.config,o=a.type,s=a.name;if("VIEW"===o.toUpperCase()){const e=r[s];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))&&Tf(e)},Df=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},xf=(e,t,n)=>{const{caseClassName:r,workID:a}=e.payload,{containerName:o,context:s}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:d}=V.getRemoteCase(r),u={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:gt,viewName:U,gadgetId:Ac.getUniqueGadgetId(),context:n??s,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${a}`,containerName:o,name:d};oh(l.showPage(u))},wf=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&(V.isTraditionalRemoteCase(t.payload?.caseClassName)?xf({...t},t.options):oh(l.showHistory(Df(t))))},Mf=()=>ip.getApplicationPath()!==ap(),Lf=e=>{const{acName:t,context:n,defaultViewLabel:r}=e,a=(e=>{const t=ip.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=>{yf=e})(a),ip.setDefaultRoute(a);const o=H(t,n),s=mt(t,n),i="true"===cp.getIsExtraCallRequiredForDefaultHome(),c={historyAction:ff,pxURLPath:""};let d;const u={acName:s,context:o,actionConfig:{context:o}};if(i||!i&&Mf()){const t=(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 o=new URLSearchParams(a).toString();return o?`${t}?${o}`:t}return e})(np(window.location.pathname+window.location.search));d=ip.getEndPointInfo(t),c.pxURLPath=d.urlPath,void 0!==d.payload?.pageClass&&(d.payload.pageClass=ah()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:d.routeEndpoint,requestType:d.requestType,payload:d.payload,options:u,routeKey:d.routeKey};V.isTraditionalRemoteCase(d?.payload?.caseClassName)?xf(r,e,u.context):oh(l[n](Df(r)))}else d=ip.getEndPointInfo(yf),c.pxURLPath="";Pf(null,{urlPathObjParam:c,infoParam:d,optionsParam:u},!0)},Ff=(e,t=!1)=>{var n;mf=e.domain,!1===t&&Cf()&&(n=wf,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),ip.init(e,yf)},jf=e=>{(e=>{window.document.title=e})(e)};function Uf(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 kf=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Vf=()=>Math.random().toString(36).substring(7).split("").join("."),Bf={INIT:`@@redux/INIT${Vf()}`,REPLACE:`@@redux/REPLACE${Vf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Vf()}`};function Gf(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 Wf(e,t,n){if("function"!=typeof e)throw new Error(Uf(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Uf(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Uf(1));return n(Wf)(e,t)}let r=e,a=t,o=new Map,s=o,i=0,c=!1;function l(){s===o&&(s=new Map,o.forEach(((e,t)=>{s.set(t,e)})))}function d(){if(c)throw new Error(Uf(3));return a}function u(e){if("function"!=typeof e)throw new Error(Uf(4));if(c)throw new Error(Uf(5));let t=!0;l();const n=i++;return s.set(n,e),function(){if(t){if(c)throw new Error(Uf(6));t=!1,l(),s.delete(n),o=null}}}function p(e){if(!Gf(e))throw new Error(Uf(7));if(void 0===e.type)throw new Error(Uf(8));if("string"!=typeof e.type)throw new Error(Uf(17));if(c)throw new Error(Uf(9));try{c=!0,a=r(a,e)}finally{c=!1}return(o=s).forEach((e=>{e()})),e}p({type:Bf.INIT});return{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Uf(10));r=e,p({type:Bf.REPLACE})},[kf]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Uf(11));function n(){const e=t;e.next&&e.next(d())}n();return{unsubscribe:e(n)}},[kf](){return this}}}}}function Hf(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];0,"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:Bf.INIT}))throw new Error(Uf(12));if(void 0===n(void 0,{type:Bf.PROBE_UNKNOWN_ACTION()}))throw new Error(Uf(13))}))}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const s={};for(let a=0;a<r.length;a++){const i=r[a],c=n[i],l=e[i],d=c(l,t);if(void 0===d){t&&t.type;throw new Error(Uf(14))}s[i]=d,o=o||d!==l}return o=o||r.length!==Object.keys(e).length,o?s:e}}function qf(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var Yf=function(e){function t(t,n){return e.call(this)||this}return js(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Qs),Kf={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=Kf.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,Gs([e,t],Bs(n))):setInterval.apply(void 0,Gs([e,t],Bs(n)))},clearInterval:function(e){var t=Kf.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},zf=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 js(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),Kf.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&&Kf.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,Js(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Yf),Xf=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return js(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}(zf),Jf={now:function(){return(Jf.delegate||Date).now()},delegate:void 0},Qf=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=Jf.now,e}(),Zf=function(e){function t(t,n){void 0===n&&(n=Qf.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return js(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}(Qf),eg=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return js(t,e),t}(Zf))(Xf),tg=Ms((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),ng=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 js(t,e),t.prototype.lift=function(e){var t=new rg(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new tg},t.prototype.next=function(e){var t=this;li((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=Vs(t.currentObservers),o=a.next();!o.done;o=a.next()){o.value.next(e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;li((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;li((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,o=n.observers;return r||a?Zs:(this.currentObservers=null,o.push(e),new Qs((function(){t.currentObservers=null,Js(o,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 Ci;return e.source=this,e},t.create=function(e,t){return new rg(e,t)},t}(Ci),rg=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return js(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:Zs},t}(ng),ag=function(e,t){return ag=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])},ag(e,t)};Object.create;Object.create;var og=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 ng,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}ag(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Ci);var sg=n(52),ig=Symbol.for("immer-nothing"),cg=Symbol.for("immer-draftable"),lg=Symbol.for("immer-state");function dg(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ug=Object.getPrototypeOf;function pg(e){return!!e&&!!e[lg]}function hg(e){return!!e&&(gg(e)||Array.isArray(e)||!!e[cg]||!!e.constructor?.[cg]||Ag(e)||Cg(e))}var fg=Object.prototype.constructor.toString();function gg(e){if(!e||"object"!=typeof e)return!1;const t=ug(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)===fg}function mg(e,t){0===yg(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function yg(e){const t=e[lg];return t?t.type_:Array.isArray(e)?1:Ag(e)?2:Cg(e)?3:0}function Ig(e,t){return 2===yg(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Eg(e,t,n){const r=yg(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Ag(e){return e instanceof Map}function Cg(e){return e instanceof Set}function _g(e){return e.copy_||e.base_}function Sg(e,t){if(Ag(e))return new Map(e);if(Cg(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=gg(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[lg];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const a=n[r],o=t[a];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(ug(e),t)}{const t=ug(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function bg(e,t=!1){return vg(e)||pg(e)||!hg(e)||(yg(e)>1&&(e.set=e.add=e.clear=e.delete=Ng),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>bg(t,!0)))),e}function Ng(){dg(2)}function vg(e){return Object.isFrozen(e)}var Pg,Tg={};function $g(e){const t=Tg[e];return t||dg(0),t}function Og(){return Pg}function Rg(e,t){t&&($g("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Dg(e){xg(e),e.drafts_.forEach(Mg),e.drafts_=null}function xg(e){e===Pg&&(Pg=e.parent_)}function wg(e){return Pg={drafts_:[],parent_:Pg,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Mg(e){const t=e[lg];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Lg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[lg].modified_&&(Dg(t),dg(4)),hg(e)&&(e=Fg(t,e),t.parent_||Ug(t,e)),t.patches_&&$g("Patches").generateReplacementPatches_(n[lg].base_,e,t.patches_,t.inversePatches_)):e=Fg(t,n,[]),Dg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ig?e:void 0}function Fg(e,t,n){if(vg(t))return t;const r=t[lg];if(!r)return mg(t,((a,o)=>jg(e,r,t,a,o,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Ug(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let a=t,o=!1;3===r.type_&&(a=new Set(t),t.clear(),o=!0),mg(a,((a,s)=>jg(e,r,t,a,s,n,o))),Ug(e,t,!1),n&&e.patches_&&$g("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function jg(e,t,n,r,a,o,s){if(pg(a)){const s=Fg(e,a,o&&t&&3!==t.type_&&!Ig(t.assigned_,r)?o.concat(r):void 0);if(Eg(n,r,s),!pg(s))return;e.canAutoFreeze_=!1}else s&&n.add(a);if(hg(a)&&!vg(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fg(e,a),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||Ug(e,a)}}function Ug(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&bg(t,n)}var kg={get(e,t){if(t===lg)return e;const n=_g(e);if(!Ig(n,t))return function(e,t,n){const r=Gg(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_||!hg(r)?r:r===Bg(e.base_,t)?(Hg(e),e.copy_[t]=qg(r,e)):r},has:(e,t)=>t in _g(e),ownKeys:e=>Reflect.ownKeys(_g(e)),set(e,t,n){const r=Gg(_g(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Bg(_g(e),t),s=r?.[lg];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((a=n)===(o=r)?0!==a||1/a==1/o:a!=a&&o!=o)&&(void 0!==n||Ig(e.base_,t)))return!0;Hg(e),Wg(e)}var a,o;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!==Bg(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Hg(e),Wg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=_g(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){dg(11)},getPrototypeOf:e=>ug(e.base_),setPrototypeOf(){dg(12)}},Vg={};function Bg(e,t){const n=e[lg];return(n?_g(n):e)[t]}function Gg(e,t){if(!(t in e))return;let n=ug(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=ug(n)}}function Wg(e){e.modified_||(e.modified_=!0,e.parent_&&Wg(e.parent_))}function Hg(e){e.copy_||(e.copy_=Sg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}mg(kg,((e,t)=>{Vg[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Vg.deleteProperty=function(e,t){return Vg.set.call(this,e,t,void 0)},Vg.set=function(e,t,n){return kg.set.call(this,e[0],t,n,e[0])};function qg(e,t){const n=Ag(e)?$g("MapSet").proxyMap_(e,t):Cg(e)?$g("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Og(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,o=kg;n&&(a=[r],o=Vg);const{revoke:s,proxy:i}=Proxy.revocable(a,o);return r.draft_=i,r.revoke_=s,i}(e,t);return(t?t.scope_:Og()).drafts_.push(n),n}function Yg(e){if(!hg(e)||vg(e))return e;const t=e[lg];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Sg(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Sg(e,!0);return mg(n,((e,t)=>{Eg(n,e,Yg(t))})),t&&(t.finalized_=!1),n}var Kg=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&&dg(6),void 0!==n&&"function"!=typeof n&&dg(7),hg(e)){const a=wg(this),o=qg(e,void 0);let s=!0;try{r=t(o),s=!1}finally{s?Dg(a):xg(a)}return Rg(a,n),Lg(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===ig&&(r=void 0),this.autoFreeze_&&bg(r,!0),n){const t=[],a=[];$g("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}dg(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){hg(e)||dg(8),pg(e)&&(e=function(e){pg(e)||dg(10);return Yg(e)}(e));const t=wg(this),n=qg(e,void 0);return n[lg].isManual_=!0,xg(t),n}finishDraft(e,t){const n=e&&e[lg];n&&n.isManual_||dg(9);const{scope_:r}=n;return Rg(r,t),Lg(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=$g("Patches").applyPatches_;return pg(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},zg=Kg.produce;Kg.produceWithPatches.bind(Kg),Kg.setAutoFreeze.bind(Kg),Kg.setUseStrictShallowCopy.bind(Kg),Kg.applyPatches.bind(Kg),Kg.createDraft.bind(Kg),Kg.finishDraft.bind(Kg);const Xg=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{hd.updateDataPageStore(t),Object.keys(t).forEach((n=>{Ch.getIn(e,[j.SHARED,n])?Object.keys(t[n]).forEach((r=>{Ch.setIn(e,[j.SHARED,n,r],t[n][r])})):Ch.setIn(e,[j.SHARED,n],t[n])}))})(e,n),r&&Ch.deleteIn(e,[r,"shared"])},Jg=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:j.PERFORM_MODE),containerName:o}=t;o!==Zd.WORKAREA&&a&&Ch.setIn(e,[r,"context_data","caseViewMode"],a)},Qg=(e,t)=>{const{context:n}=t;Ch.setIn(e,[n,"context_data","actionType"],t.actionType),Ch.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},Zg=(e,t=[])=>{t.forEach((t=>Ch.deleteIn(e,t)))},em=(e,t=[])=>{t.forEach((t=>Ch.deleteIn(e,t)))},tm=(e,t=[])=>{t.forEach((t=>{Ch.deleteIn(e,t)}))},nm=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;Ch.deleteIn(e,[t,"nextAssignmentInfo"]),Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableActions"]),Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableProcesses"]),Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"activeActionID"]),Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"assignments"]),Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"childCases"]),a&&(Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"confirmationLinks"]),Ch.deleteIn(e,[t,"caseMessages"])),r&&(Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"actionButtons"]),Ch.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"navigation"]))},rm=/\[(\d+)\]$/gi,am=/(\d+)/gi,om=/\[.\]$/gi,sm=(e,t,n,r=[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT])=>{const a=Ch.getIn(t,r);if(a){const t=zn(a,[],[]);for(const a of t)Ch.setIn(e[n],[...r,...a],{})}},im=(e,t,n,r)=>{const{property:a,pageReference:o,category:s,type:i}=r.payload,c=Ch.getIn(e[t],n);if(c&&s===j.CASEMESSAGES)Ch.setIn(e[t],Bn(a,o,s),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&Ch.setIn(e[t],Bn(a,o,s),r)}};const cm=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[j.ERROR_FIELD_IN_PAGE].slice(1),a=n[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(a){let o=r?`caseInfo.content.${r}`:"caseInfo.content";o=o.replace(/\(/g,"[").replace(/\)/g,"]");const s=Bn(a,o,j.PROPERTY),i=Ch.getIn(e[t],`${o}.classID`),c=Dp(a,i),l={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...c?.label&&{fieldLabel:c.label}},d=Ch.getIn(e[t],s,[]);if(Ch.isContains(d,l))return;Ch.setIn(e[t],s,[...d,l])}})(e,t,n)}))};function lm(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:o,pageErrors:s}=Oc(n.errorDetails,r);if(Ch.setIn(e,[a,...Vn.FIELD_MESSAGES_PATH],{}),Ch.setIn(e,[a,...Vn.PAGE_MESSAGES_PATH],[]),o.forEach((t=>{if(t[j.ERROR_FIELD_IN_PAGE]){const n=t[j.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),o=Bn(r,t,j.PROPERTY);Ch.setIn(e,[a,...o],[])}}})),o.length>0&&cm(e,a,o),s.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(s);e[a]||(a=j.APP.APP),Ch.setIn(e,[a,...Vn.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(Zd.WORKAREA)&&(a=W(a)),Ch.deleteIn(e,[a,...Vn.PAGE_MESSAGES_PATH]);return e}const dm=[(e,t)=>zg(e,(e=>{switch(t.type){case ge:{const{propertiesToReplace:n=[]}=t.payload;return e[t.payload.context]=gh(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n]}),Jg(e,t.payload,!0),Xg(e,t.payload),e}case Q:{const{context:n,reference:r,value:a,isArrayDeepMerge:o}=t.payload;return mh(e[n],r,a,{isArrayDeepMerge:o}),e}case Z:{const{context:n,reference:r,value:a}=t.payload;return yh(e[n],r,a),e}case me:return hh(e[t.payload.context],t.payload.reference),e;case se:return Ch.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case ie:return Ch.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case tt:{const{data:n}=t.payload;return Xg(e,{data:{shared:n}}),e}case nt:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;Ch.deleteIn(e.shared,[n,r]);const a=Ch.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&Ch.deleteIn(e.shared,[n])})),e}case ot:{const n=Ch.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?Ch.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):Ch.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),(e,t)=>zg(e||{},(e=>{switch(t.type){case _e:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&nm(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,Jg(e,t.payload),Qg(e,t.payload),Xg(e,t.payload),((e,t)=>{const{context:n}=t;Ch.deleteIn(e,[n,"context_data","blocking_action_counter"]),Ch.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload),e}case De:{t.payload.doDeleteCaseSummary&&nm(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;return!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=gh(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=gh(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&Qg(e,t.payload),Jg(e,t.payload),Xg(e,t.payload),em(e,t.payload.suggestionContexts),e}case Se:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&Ch.deleteIn(e,[r]),Ch.deleteIn(e,[n])})(e,t.payload),tm(e,n),Zg(e,t.payload.transientItems),em(e,t.payload.suggestionContexts),e}case Ce:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{Ch.deleteIn(e,[t])})):Ch.deleteIn(e,[n]),e}case xe:{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:o}=t.payload;return nm(e,t.payload.context),Jg(e,t.payload),e[n]=gh(e[n],e[r]),e[n]=gh(e[n],a),Ch.deleteIn(e,[r]),tm(e,o),Xg(e,t.payload),e}case we:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}}=t;let{payload:{data:o}}=t;const s=Ch.getIn(e[n],"pulse");let i=Ch.getIn(e[n],"OperatorID"),c=Ch.getIn(e[n],"pxRequestor");return c&&o.pxRequestor&&(c=Ch.mergeDeep(c,o.pxRequestor)),i&&o.OperatorID&&(i=Ch.mergeDeep(i,o.OperatorID)),!r&&s&&(o=mh(o,"pulse",s),o=mh(o,"OperatorID",i),o=mh(o,"pxRequestor",c)),Ch.setIn(e,n,o),Jg(e,t.payload),Xg(e,t.payload),tm(e,a),Zg(e,t.payload.transientItems),em(e,t.payload.suggestionContexts),e}case at:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return nm(e,n,{doDeleteConfirmationDetails:r}),e}case be:{const{transientItemID:n,data:r}=t.payload;return Ch.setIn(e,n,r)}case ve:case Pe:{const{transientItems:n}=t.payload;return n.forEach((t=>Ch.deleteIn(e,t))),e}case Ne:case Te:{const{transientItemID:n,data:r}=t.payload;return gh(Ch.getIn(e,n),r),e}case $e:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&Ch.deleteIn(e,[n,t]);return e}case Oe:{const{transientItemID:n,data:r}=t.payload;return Ch.deleteIn(e,n),Ch.setIn(e,n,r)}case ce:{const{key:n,value:r}=t.payload;return Ch.setIn(e,`${j.SHARED}.${n}`,r),e}case Fe:{const{context:n,data:r}=t.payload;return Ch.setIn(e,n,r)}default:return e}})),(e,t)=>zg(e||mm().data,(e=>{switch(t.type){case Ee:return t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?lm(e,t):e;case De:{const{context:n}=t.payload,r=[n,...Vn.FIELD_MESSAGES_PATH],a=[n,...Vn.PAGE_MESSAGES_PATH];if(Ch.setIn(e,r,{}),Ch.setIn(e,a,[]),n&&n.includes(Zd.WORKAREA)){const t=[X(n),...Vn.PAGE_MESSAGES_PATH];Ch.setIn(e,t,[])}return e}case Qe:{const{isListEntry:n}=t.payload;return n?((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:o,deletingIndex:s,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return sm(e,i,c),e;const l=Bn(n,r,a,o);if(Number.isInteger(s)){Ch.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=Ch.getIn(e[c],t)||{};const r=Object.keys(n);n=r.map((e=>n[e])),n.forEach(((n,a)=>{const o=r[a].match(rm);if(o?.length){const i=parseInt(o[0].match(am)[0],10);i>s&&(Ch.deleteIn(e[c],t.concat(r[a])),Ch.setIn(e[c],t.concat(r[a].replace(om,`[${i-1}]`)),n))}}))}else Ch.setIn(e[c],l,{});return e})(e,t):((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:o,stateObj:s}=t.payload,{context:i}=t.payload;let c=i;if(s)return sm(e,s,i),e;const l=Bn(n,r,a,o);return a===j.PAGE&&i?.includes(Zd.WORKAREA)&&(c=W(i)),im(e,c,l,t),im(e,i,l,t),e})(e,t)}case Je:{const{messages:n,property:r,pageReference:a,context:o,category:s}=t.payload,i=Bn(r,a,s);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&Ch.setIn(e[o],Bn(r,a,s),n),e}default:return e}})),(e,t)=>zg(e,(e=>{if(t.type===rt){const{instruction:n,actions:r,context:a,referenceList:o,listIndex:s,listMoveToIndex:i,content:c={}}=t.payload,l=nh(o);switch(n){case j.LIST_ACTIONS.INSERT:((e,t,n,r,a)=>{Ch.setIn(e[t],[...n,r],a)})(e,a,l,s,c);break;case j.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const o=gh(Ch.getIn(e[t],[...n,r],{}),a);Ch.setIn(e[t],[...n,r],o)})(e,a,l,s,c);break;case j.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const a=Ch.getIn(e[t],n,[]);a.splice(r,1),Ch.setIn(e[t],n,a),vn.deleteListNode(t,n,a.length)})(e,a,l,s);break;case j.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const o=Ch.getIn(e[t],[...n,r],{}),s=Ch.getIn(e[t],n,[]);s.splice(r,1),s.splice(a,0,o),Ch.setIn(e[t],n,s),Hn(e,t,n?.join("."),r,a)})(e,a,l,s,i);break;case j.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=Ch.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:o,listIndex:s}=e;if(r===j.LIST_ACTIONS.SELECT){a[s]=o;const e=n?.join(".");hr(t,e)}else delete a[s]})),Ch.setIn(e[t],n,a.filter(Boolean))})(e,a,l,r);break;case j.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{Ch.setIn(e[t],n,[])})(e,a,l)}}return e}))],um=(e,t)=>(e||(e=mm().data),t.type===Ze?mm().data:(dm.forEach((n=>{e=n(e,t)})),e)),pm=(e,t=[])=>{t.forEach((t=>{Ch.deleteIn(e,[t])}))},hm=(e,t)=>{const{type:n,payload:r}=t,a=n===De,{target:o,context:s,semanticURL:i="",root:c,containerItemID:l,childContainers:d,flowName:u,resourceType:p="",key:h="",clearView:f=!1}=r;return c?Ch.setIn(e,[o,"items",l,"view"],c):f&&Ch.deleteIn(e,[o,"items",l,"view"]),s&&Ch.setIn(e,[o,"items",l,"context"],s),u&&Ch.setIn(e,[o,"items",l,"flowName"],u),(!a||a&&h)&&Ch.setIn(e,[o,"items",l,"key"],h.trim()),((e,t,n,r)=>{""===e&&Ch.deleteIn(t,[n,"items",r,"key"])})(h,e,o,l),(!a||a&&i)&&Ch.setIn(e,[o,"items",l,"semanticURL"],i),(!a||a&&p)&&Ch.setIn(e,[o,"items",l,"resourceType"],p),pm(e,d),e},fm=(e,t)=>(e||(e=mm().containers),t.type===Ze?mm().containers:zg(e,(e=>{switch(t.type){case Ae:{const{context:n,name:r,type:a,actionMgrID:o}=t.payload,s=`${n}/${r}`;let i=null;return ln.resolveActionByID(o,null,!1),e[s]?e:(i={type:a,accessedOrder:[],items:{}},Ch.setIn(e,[s],i),e)}case Le:{const{containerName:n,childContainers:r=[]}=t.payload;return Ch.deleteIn(e,[n]),r.forEach((t=>{Ch.deleteIn(e,[t])})),e}case Ce:{const{context:n,name:r,actionMgrID:a,childContainers:o}=t.payload,s=`${n}/${r}`;return ln.resolveActionByID(a,null,!1),Ch.setIn(e,[s,"accessedOrder"],[]),Ch.setIn(e,[s,"items"],{}),Array.isArray(o)&&o.forEach((t=>{Ch.deleteIn(e,[t])})),e}case _e:{const{target:n,context:r,isInCreateStage:a,isBulkAction:o,semanticURL:s,root:i,containerItemID:c,actionMgrID:l,key:d,flowName:u,resourceType:p,actionName:h,isMinimizable:f,showProgress:g,progressMessage:m,modalOptions:y,resourceStatus:I,actionID:E,isMultiRecordData:A,acTertiary:C,parentContext:_,heading:S,isTraditionalRemoteCase:b}=t.payload,N=e[n],v=N&&N.type,P=N&&N.accessedOrder||[],T=N&&N.items||{};let $=null;return e[n]&&"single"===v&&P.length>0?hm(e,t):($={accessedOrder:[...P,c],items:{...T,[c]:{view:i,semanticURL:s,key:d,flowName:u,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:f,...o&&{isBulkAction:o},showProgress:g,progressMessage:m,modalOptions:y,isTraditionalRemoteCase:b,resourceStatus:I,...E&&{actionID:E},...C&&{acTertiary:C},...A&&{isMultiRecordData:A},..._&&{parentContext:_},heading:S}}},ln.resolveActionByID(l,null,!1),e[n]=x()(e[n],$),e)}case De:{const{actionMgrID:n,data:r}=t.payload;let a=e;try{a=hm(e,t),ln.resolveActionByID(n,r,!1)}catch{ln.rejectActionByID(n,!1)}return a}case we:return((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:o}=t.payload;let s=e;try{const i=e&&e[a]?.type;let c=e&&e[a]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,o]:c.includes(o)?c:[...c,o],Ch.setIn(e,[a,"items",o,"transientItems"],[]),Ch.setIn(e,[a,"accessedOrder"],c),s=hm(e,t),ln.resolveActionByID(n,r,!1)}catch{ln.rejectActionByID(n,!1)}return s})(e,t);case Re:{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=Ch.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),Ch.setIn(e,[n,"accessedOrder"],t),ln.resolveActionByID(a,null,!1)}catch{ln.rejectActionByID(a,!1)}return e}case xe:case Se:{const{target:n,containerItemID:r,actionMgrID:a,childContainers:o}=t.payload;try{const t=Ch.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));Ch.setIn(e,[n,"accessedOrder"],t),Ch.deleteIn(e,[n,"items",r]),pm(e,o),ln.resolveActionByID(a,null,!1)}catch{ln.rejectActionByID(a,!1)}return e}case be:{const{transientItemID:n,target:r,contextName:a}=t.payload,o=Ch.getIn(e,[r,"items",a,"transientItems"])??[];return Ch.setIn(e,[r,"items",a,"transientItems"],[...o,n])}case Pe:{const{target:n,containerItemID:r}=t.payload;return Ch.deleteIn(e,[n,"items",r,"transientItems"]),e}case ve:{const{target:n,transientItemID:r,containerItemID:a}=t.payload,o=(Ch.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));return Ch.setIn(e,[n,"items",a,"transientItems"],o)}default:return e}})));let gm={};const mm=()=>gm,ym=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[j.CONTEXT_DATA]||e[j.CONTEXT_DATA];gm={data:{[j.APP.APP]:{...t,[j.CONTEXT_DATA]:r}},containers:{}}})(e),Hf({data:um,containers:fm}));function Im(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Gl(e),r=function(e,t){return"number"==typeof Bl(e)?e.pop():t}(e,1/0),a=e;return a.length?1===a.length?Oi(a[0]):function(e){return void 0===e&&(e=1/0),kl(Ei,e)}(r)(ki(a,n)):ql}const Em=(e,t)=>{e.data=e.data??{};const{assignments:n,availableActions:r=[]}=e.data.caseInfo??{};if(n&&Array.isArray(n)&&n.length>0&&n[0].actions&&Array.isArray(n[0].actions)&&!t?.stopMergeActions){n[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||r.push(e)})),e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.availableActions=r}},Am=(e,t)=>{if(e.confirmationLinks&&(e.data=e.data??{},e.data.caseInfo=e.data.caseInfo??{},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=t.data??{},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:o}=n;if(n.data&&n.data.caseInfo&&(r&&(n.data.caseInfo.actionButtons=r),a&&(n.data.caseInfo.navigation=a),t&&t[F.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions,Em(n,t),e.confirmationNote)){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}return t&&t.isCreateDataObject&&(n.data=n.data??{},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),o&&(n.data=n.data??{},n.data.nextAssignmentInfo=o),n},Cm={},{VIEW:_m,FIELD:Sm}=j.CONTEXT_TREE_NODE_TYPES,bm=e=>rc[e]>0&&Cm[e],Nm=[(e,t)=>e.pipe(Fl(Pn.REFRESH_DATA,ft),Ul((e=>e.payload)),kl((e=>{const{context:n,contextData:r,options:a}=e,{propertyName:o="",classID:s=""}=a,i=Nc(n,{skipUUID:!1});let c=[],l=[],d=!1;cp.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:c=[],whens:l=[]}=jn(n)),d=l.some((e=>e.type===_m))):d=!0;const u=l.filter((e=>e.type===Sm)),p=Ch.getPropertyName(o),h=p?p.split("."):[],f=h.pop(),g=h.join("."),m=[];if(g){const e=Dp(g,s);if(e&&"copy"===e.dataRetrievalType){const e=Ch.getIn(i,`content.content.${g}`)||{};if(Object.keys(e).length>0){Object.keys(e).filter((e=>e!==f)).forEach((t=>{delete e[t],m.push(`${g}`)}))}}}e.serverPrecedenceFields=m;let y={...i.content,contextData:r};const I=Wc(n);Ch.isEmpty(I)||(y=Gc(I,y));const E=((e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:a,fieldsWithWhen:o,isViewsWithWhen:s,interestPage:i,options:c}=e;let l={};const{optionalPayload:d}=c;d&&(t.content={...d});let u={...t},p=Pn.REFRESH;return r?(l=bf(Pn.REFRESH_CASE_VIEW,e),u={...u,interestPage:i}):s&&n?l=bf(Pn.REFRESH_CASE_DATA,e):s&&!n?l=bf(Pn.REFRESH_ASSIGNMENT_DATA,e):(a.length>0||o.length>0)&&(u={...u,calculations:{fields:a,whens:o}},l=bf(n?Pn.RECALCULATE_CASE_DATA:Pn.RECALCULATE_ASSIGNMENT_DATA,e),p=Pn.RECALCULATE),{restAPI:l,requestBody:u,requestType:p}})({...e,fieldsWithDeclarativeTargets:c,fieldsWithWhen:u,isViewsWithWhen:d},y);Pd.registerBlockingAction(n).catch((()=>{}));const{restAPI:A,requestBody:C,requestType:_}=E;(e={...e,requestType:_}).requestType=_;const{reqType:S,restApi:b}=A,N=t.value.data[n]?.caseInfo?.headers;return ki(((e,t)=>{const{context:n}=e;(e=>{e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag})})(e);const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if(bm(r)){const t=[];for(let n=0;n<Cm[r].length;){const a=Cm[r][n],o=Un(a,e);if("CANCEL_REFRESH"===o){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===o&&(t.push(n),a.cancelConfig?.cancel()),n+=1}t.forEach((e=>{Cm[r].splice(e,1)}))}const a=hc();return e.signal=a.token,e.cancelConfig=a,Cm[r]?Cm[r].push(e):Cm[r]=[e],dc(e.url,e,n,{cancelContext:r}).then((e=>(delete Cm[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete Cm[r],e}))})({reqHeaders:N,context:n,method:S,body:C,url:Fn(e,b)},e)).pipe(Ul((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:bc(t.headers)}))),Kl(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),kl((async e=>{if(e&&e.type===Ee)return Pd.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),Rc(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:a,serverPrecedenceFields:o,requestType:s}=t,i=Ur.getTargetViewContainerName(je),c=mt(i,a),l={acName:c,context:a},d=Am(n,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0});d.directUrlUpdation=!1,s===Pn.REFRESH&&await Pc(d,t,l);const u=vc(d,{target:c,context:a});t.options?.skipDataMerge&&u.data?.caseInfo?.content&&(u.data.caseInfo.content={}),u.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=Ac.getPropertiesToReplace(a),h=af(Rh,u,{serverPrecedenceFields:o,propertiesToReplace:p});return Yc.registerForServerChanges(),oh(h),ln.resolveActionByID(r,u),Yc.unRegisterForServerChanges(),Pd.deRegisterBlockingAction(a).catch((()=>{})),[]})))],vm=[e=>e.pipe(Fl(et),kl((async e=>{const{context:t}=e.payload,n={},r={},a=Object.keys(e.payload.datapages).map((a=>{const o=e.payload.datapages[a];if(o.mode===j.READONLY&&o?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=o?.refreshStrategy||{},n=ih()[o.name];if(n&&a in n){const r=n[a],{loadTime:o}=r;if(!rd.isTimeElapsed(o,e,t))return}}return rd.getData(o.name,{dataViewParameters:o.dataViewParameters},t).then((e=>{const t=o.mode===j.READONLY?r:n;t[o.name]?t[o.name][a]={pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[o.name]={[a]:{pxResults:e.data.data,parameters:o.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const o=[];return Object.keys(n).length&&o.push(Rh({context:t,data:n})),Object.keys(r).length&&o.push(sf({data:r,context:t})),oh(o),[]})))];class Pm{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 Pm.DISPLAY_DIRTY_POPUP:this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(Br.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this));break;case Pm.LOAD_PREVIEW:this.loadPreview(e);break;case Pm.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case Pm.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case Pm.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case Pm.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case Pm.CLOSE_CONTAINER_ACTION:this.closeContainer(e)}}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){Kd({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=Kd({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",a=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(a,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:a}=e.data;let o=r;r===Pm.OPEN_WORK_ITEM&&(o=Pm.OPEN_WORK_BY_HANDLE),ip.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:o});Kd({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),a,t)};openAssignment=e=>{const{pzInsKey:t,uniqueId:n}=e.data;n===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(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=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;Kd({meta:{},options:{context:mu(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;Kd({meta:{},options:{context:mu(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),Br.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),Br.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{Br.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),Br.unsubscribeAllWithEventType(F.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:Pm.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:Pm.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:Pm.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const Tm=new Pm,$m="nextAssignmentInfo",Om="nextAssignmentInfo.context",Rm=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||Ur.getTargetViewContainerName(We)},Dm=e=>{const t=Ch.getIn(e,[j.DATA,j.CASE_INFO.CASE_INFO]);return Zt(t)&&en(cp.getOperatorIdentifier(),t)},xm=()=>({registerHeader:(...e)=>tc.registerHeader(...e),unRegisterHeader:(...e)=>tc.unRegisterHeader(...e),getRegisteredHeaders:()=>tc.getRegisteredHeaders()}),wm=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:o},s,i)=>{const{restApi:c,reqType:l}=bf(e,n),d={method:l,headers:a,body:t,...o&&{responseType:o}};return r&&(d.signal=r.token),dc(c,d,s,i??{})},Mm=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},o)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return dc(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},o)},Lm=e=>ip.doesRestApiExist(e),Fm=()=>hc(),jm=e=>fc(e),Um=e=>{sc=e},km=()=>Vm;const Vm=class{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:a,viewType:o=_c.PAGE,pageName:s,context:i=j.APP.APP,debugInfo:c,headers:l}=t;let d={};n&&n.content&&(d=n.content);const u={caseTypeID:e,content:{...d,...r},processID:a};return wm("createWork",{body:u,queryPayload:{caseClassName:e,viewType:o,params:{pageName:s}},headers:{...l,...c&&{...tc.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:u,headers:bc(t.headers,e,l)})))}},Bm=(e,t)=>{const{class:n,context:r,viewType:a=_c.PAGE}=e,{removeActionPayload:o}=t;let s=e?.pageName?e?.pageName:cp.getDefaultCasePage();return e.isTraditionalUICase&&(s="pyDetails"),ki(Vm.createCase(n,{...e,pageName:s,viewType:a,context:r})).pipe(Ul((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:o}))),Kl("Error occurred during ajax call at createWork Epic : ",r))},Gm=e=>{Br.publish(j.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},Wm=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},Hm=e=>{let t=0,n=[],r="",a=!1;return e.pipe(Fl(Th),zl(100),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:n}=e,r=Rm(e),o=mt(r,n),{continueExecution:s,removeActionPayload:i}=(e=>Cu(e)?{continueExecution:!0,removeActionPayload:{}}:Lc(e))(o);return a=ca(e.class),s?(e.isTraditionalUICase=a,Bm(e,{removeActionPayload:i})):(ln.rejectActionByID(t),Yl())})),kl((async e=>{if(e&&e.type===Ee)return e.payload.context=Hu(),n.push(Rc(e)),n;const{actionInPayload:o,response:s,headers:i,removeActionPayload:c}=e;let l;l=!(o.renderInline||cp.getDefaultCasePage()||a)&&Dm(s),Ch.setIn(s.data,F.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const d=Rm({...o,isInCreateStage:l}),u=mt(d,o.context),p=xc(u,d,o.context);if(!Kr(d)&&Cu(u)){const{continueExecution:e}=Lc(u);if(!e)return ln.rejectActionByID(t),Yl()}if(!(o?.openCaseViewAfterCreate??!0)&&!l){const e=Ch.getIn(s.data,F.CASE_INFO.CASE_INFO_CONTENT);r=`${e.pyID} ${up.getLocaleValue("has been created.","Assignment")}`;const t=na(s),a=Zr(s);return Gm({toastMessage:r}),Wm({caseId:`${e.pyID}`,assignmentId:t,caseType:a}),n}const h=Am(s);let f=_f("createWork",{caseClassName:Zr(h)});f=f.replace(/{.+?}/,String(Qr(ta(h)))),h.semanticURL=f,((e,t)=>{const n=Dm(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t;Ch.setIn(e,["directUrlUpdation"],(!n||a)&&!r)})(h,o);const g={acName:u,context:p},m=ua(p);await Pc(h,o,g);const y={target:u,context:p,containerItemID:p,headers:i,semanticURL:f,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,currentCaseViewMode:m,assignmentContext:Ch.getIn(h,Om),nextAssignmentInfo:Ch.getIn(h,$m),resourceType:F.CASE,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};oa(y,h);const I=vc(h,y);a&&(I.data.caseInfo.content.coexistenceAction="openAssignment");const E=Dc(u,I);return wc(E)&&ra(n,{removeActionPayload:c,target:u}),n.push(E),Uc(n),n})),Ul((()=>{const e=la(),o=Zt(Ch.getIn(n[0]?.payload,"data.caseInfo"));return a&&e&&o?Tm.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Bc,n):Bc(n),ia(n,t),r="",n=[],n})))},{RESOURCE_TYPES:qm}=F,Ym=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:o}=e,s=Jr(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})(s)&&e?.stageID===s.stageID?_c.PAGE:n||(!Yr(r)&&!Yr(a)||o?_c.PAGE:_c.FORM)},Km=(e,t,n,r,a)=>{if(ra(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=pu(t);let r=null;return n&&(r=nu(t,n)),r?.key===e&&_u(t)})(r.key,n))r.context=mu(n),r.containerItemID=r.context,e.push(af(ef,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=Ou(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(af(ef,r))}else{const t=Ou(r.context),n=iu(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(af(ef,r))):e.push(af(Uh,r))}},zm=(e,t,n,r,a,o,s)=>{Cu(t)&&Su(t)?((e,t,n,r,a)=>{Ym(e,t)===_c.FORM?(n.caseViewMode=r||j.PERFORM_MODE,a.push(af(Hh,n))):a.push(af(ef,n))})(r,a,e,o,n):Km(n,s,t,e,r)},Xm=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:a,isGetNextWork:o,doNotMergeMessagesForStatusCode:s})=>dc(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...tc.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:o?s:""}),Jm=(e,t)=>{const n=Ym(e),{headers:r,context:a,assignmentID:o,isGetNextWork:s,debugInfo:i,isOpenStage:c,stageID:l,caseID:d,jsActionQueryParams:u,isLastStepInCreateStage:p}=e,{restApi:h,reqType:f}=s?bf("getNextWork",{viewType:n}):c?bf("openStage",{caseID:d,stageID:l}):bf(Ge,{assignmentID:o,viewType:n}),{removeActionPayload:g}=t,m=cp.getDefaultCasePage();let y="",I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),y=m?`${h}?viewType=${n}&pageName=${m}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,u&&Object.keys(u).forEach((e=>{y+=`&${e}=${u[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=bc(t,e.remoteClassName)),t})(e);return ki(Xm({restUrl:y,reqType:f,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:s,doNotMergeMessagesForStatusCode:"404"})).pipe(Ul((e=>{if(cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT)&&!p){return Zt(e.data.data.caseInfo)?e:(y=y.replaceAll(I,"pyDetails"),cp.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:y})}return e})),kl((e=>e?.isReloadWithDifferentViewTypeRequired?Xm({restUrl:y,reqType:f,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:s,doNotMergeMessagesForStatusCode:"404"}):Wl(e))),Ul((t=>{const{key:a,flowName:s}=$c(o);return{response:{...t.data,key:a,flowName:s},actionInPayload:e,viewType:n,removeActionPayload:g,headers:bc({...r,...t.headers})}})),Kl("Error occurred during ajax call at openAssignment Epic : ",a))},{RESOURCE_TYPES:Qm}=F,Zm=e=>{const t="Browser"===cp.getRuntime();let n=0,r=[];const a=[];let o=!1,s=!1;return e.pipe(Fl(Ol),Ul((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),kl((e=>{o=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?_c.FORM:Ym(e),e.viewType=r;const a=Hr(Ge,e),i=mt(a,t),{activate:c,activateContainerActionPayload:l}=jc(Qm.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return Wl({type:Re,activateContainerActionPayload:l,actionInPayload:e});const d=pu(i);let u;u=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:d?Lc(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=u;return p?(s=ca(e.className),e.isTraditionalUICase=s,Jm(e,{removeActionPayload:h})):(ln.rejectActionByID(n),Yl())})),kl((async e=>{if(e?.type===Ee){if(o){const{payload:t}=e,{err:n}=t,r=n.response.status;a.push({status:Number(r)})}return r.push(Rc(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:l,removeActionPayload:d,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Ol,a=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const o={type:t,payload:{...n,caseID:a,headers:l}};return r.push(o),r}const{context:p,caseViewMode:h,debugInfo:f}=n;let g=((e,t)=>{const n=Jr(e);let r;r=!cp.getDefaultCasePage()&&Zt(n);const{isChild:a,containerName:o}=t,s=a&&r,i=r&&!t.isActionFromToDoList;return s||i?j.MODAL:o||Hr(Ge,t)})(i,n);s=ca(i?.data?.caseInfo?.caseTypeID),n.isTraditionalUICase=s,s&&(g=n.containerName);const m=mt(g,p);if(t===Re)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:a,isParallelAssignment:o,insKey:s}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,d=gu(a);await Pc({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:d}),e.push(af(zh,{containerItemID:a,target:i,isParallelAssignment:o,insKey:s,resourceType:qm.CASE,context:d,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,u,{actionInPayload:n,target:m}),Uc(r),r;const y=i?.data?.caseInfo?.content,I=i?.uiResources?.root?.config?.name,E=i?.uiResources?.root?.config?.context;y&&!y.pyViewName&&I&&"page"!==n.viewType&&(Ch.setIn(y,"pyViewName",I),Ch.setIn(y,"pyViewContext",E));const A=Am(i);((e,t)=>{const n=Jr(e),r=ta(e),a=Zt(n),{skipBrowserSemanticUrlUpdate:o=!1,viewType:s,isTraditionalUICase:i}=t,c=s===_c.PAGE&&(!a||i)&&!o,{caseTypeID:l}=n;if(c){const t=_f(Be,{caseClassName:l}).replace(/{.+?}/,String(Qr(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(A,n);const C=xc(m,g,p),_={acName:m,target:m,context:C};await Pc(A,n,_);const S={target:m,context:C,containerItemID:C,headers:l,parentContext:W(n?.context),isMinimizable:Zt(Ch.getIn(A,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:F.CASE,debugInfo:f};oa(S,A,{skipFlowNameUpdate:n?.caseViewMode===j.REVIEW_MODE});const b=vc(A,S);var N;return n.isProcessAction&&(b.data.isProcessAction=n.isProcessAction),s&&(b.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,b),zm(b,m,r,n,i,h,d),c===_c.FORM&&aa(b.containerItemID)&&Vc(b,r),Uc(r),N={actionInContext:p,assignmentID:n.assignmentID,caseKey:b.key},Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,N),r})),Ul((()=>{const e=n,t=la(),o=Zt(Ch.getIn(r[0]?.payload,"data.caseInfo"));return s&&t&&o?Tm.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,oh,r):oh(r),ia(r,e,a),r[0]?.payload?.isParallelAssignment&&oh({type:Ol,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},ey=(e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:o,viewType:s}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:cp.getDefaultCasePage(),l=bf(Be,{caseID:n,params:{pageName:c}});let{restApi:d}=l;const{reqType:u}=l;return"none"===s&&(d=`${d?.split("viewType")[0]}viewType=none`),ki(dc(d,{method:u,headers:{...r,...o&&{...tc.addDebugHeaders(o)}}},a)).pipe(Ul((t=>({response:t.data,actionInPayload:e,headers:bc({...r,...t.headers}),removeActionPayload:i}))),Kl("Error occurred during ajax call at openWorkByHandle Epic : ",a))},ty="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:ny}=F,ry=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:o,response:s,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:d,debugInfo:u}=r,p=Hr(Be,r),h=mt(p,l);if(o===Re)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:o,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:i}}=t,c=Hr(Be,a),l=mt(c,o),d=gu(r);await Pc({directUrlUpdation:!s,semanticURL:n},a,{acName:l,containerName:c,target:l,context:d}),e.push(af(zh,{containerItemID:r,target:l,context:d,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const a=xc(h,p,l,{buildNew:!0}),o=Am(s),f=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=ta(e),o=n?r:Zr(e);let s=_f(Be,{caseClassName:o},{id:t?.insKey});return s=s?.replace("{workID}",String(Qr(a)))?.replace("{id}",t?.insKey),s})(o,r);o.semanticURL=f,o.directUrlUpdation=!d;const g={acName:h,context:a};await Pc(o,r,g);const m=vc(o,{target:h,context:a,containerItemID:a,semanticURL:f,headers:c,debugInfo:u});m.caseViewMode=j.REVIEW_MODE,m.resourceType=ny.CASE,n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle"),oa(m,o,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=ua(e?.actionInPayload?.context);const y=Dc(h,m);i.containerItemID&&wc(y)&&t.push(af(Jh,{containerItemID:i.containerItemID,target:h})),t.push(y)}Uc(t);const f=r.insKey;var g;g={caseKey:f,actionInContext:l},Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,g)},ay=e=>{let t=0,n=[];return e.pipe(Fl(ty),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:n,isChild:r,viewType:a}=e,o=Hr(Be,e),s=mt(o,n);let i,c=!0;if("none"!==a){const e=Lc(s);c=e.continueExecution,i=e.removeActionPayload}if(!c)return ln.rejectActionByID(t),Yl();const{activate:l,activateContainerActionPayload:d}=jc(ny.CASE,s,e);return l&&!r&&"none"!==a?Wl({type:Re,activateContainerActionPayload:d,actionInPayload:e}):ey(e,{removeActionPayload:i})})),kl((async e=>{if(e&&zr(e.type))return n.push(Rc(e)),n;const t=sh(e?.actionInPayload?.context),r=ca(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Am(e?.response),a={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:at,payload:{context:a.context,doDeleteConfirmationDetails:!1}}),r&&a.data.caseInfo?.content&&(a.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(af(Rh,a));const o=Ou(e?.actionInPayload?.context),s=qr(e?.actionInPayload?.context),i=Object.freeze({target:o,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if(aa(e?.actionInPayload?.context)){const t=vc(e?.response,{...i});Vc({...t,isArrayDeepMerge:!0},n)}}}else await ry(e,n,r);return n})),Ul((()=>(oh(n),ia(n,t),n=[],n))))},oy="FINISH_ASSIGNMENT",{RESOURCE_TYPES:sy}=F,iy=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:o}=t,s=gu(n),i=`${s?.includes("root")?j.APP.ROOT:j.APP.APP}/${Zd.MODAL}`;e.push(af(Jh,{containerItemID:n,context:s,target:i,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:o}))},cy=e=>lh(".openCaseViewAfterCreate",j.CONTEXT_DATA,e)??!0,ly=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r,a)=>{const{caseID:o}=n,s=(i=t,Ch.getIn(i,Wr.NEXT_ASSIGNMENT_INFO_ID,j.EMPTY_STRING));var i;const c=Zr(t),{caseViewMode:l,headers:d,semanticURL:u,actionMgrID:p,directUrlUpdation:h,key:f,flowName:g,resourceType:m}=r;a&&Object.assign(a,{caseId:o,assignmentId:s,caseType:c}),iy(e,{...n,skipReleaseLockRequest:!0});const y=`${n?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${Zd.PRIMARY}`,I=xc(y,Zd.PRIMARY),E=tc.getCoreHeadersFromContext(n.context)||!1,A=vc(t,{target:y,context:I,containerItemID:I,caseViewMode:l,headers:d,semanticURL:u,key:f,flowName:g,resourceType:m,directUrlUpdation:h,debugInfo:E&&E.debugInfo&&{debugId:E.debugInfo[j.COREHEADER_APP_DEBUG_ID]}});if(Cu(y)){const t=sh(I),a=ta({data:t}),[,o]=a?a.split(" "):[],s=`You will lose unsaved changes for ${o}. Do you want to continue?`;if(!cy(n.context))return e;{const{continueExecution:t}=Lc(y,{dirtyMessage:s});if(!t)return r.directUrlUpdation=!1,ln.rejectActionByID(p),Yl();A.currentCaseViewMode=ua(A?.context),e.push(af(ef,A))}}else e.push(af(Uh,A));return t.directUrlUpdation=h,t.semanticURL=u,await Pc(t,{...A,acName:y},{acName:y,context:I}),e},dy=e=>/^app\/preview_[0-9]*/g.test(e),uy=(e,t)=>{const n=W(e);return!dy(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},py=async(e,t,n,r,a,o,s,i,c)=>{const{headers:l}=c;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=sh(e),r=c?.response?.data?.caseInfo?.assignments??[],a=n?.caseInfo?.assignments??[],o=ua(e)===j.PERFORM_MODE,s=r[0]?.ID!==a[0]?.ID,i=r.length>0&&a.length>0;o&&s&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(r,a[0]?.ID))}const d=Cu(Ou(e));let u=!1;const p=Ou(n),h=tu(p),f=pu(p);f&&h?.items?.[f]?.key===c?.actionInPayload?.caseID&&(u=!0),iy(a,{...r,skipReleaseLockRequest:!0});const g=qr(e),m={target:Ou(e),containerItemID:e,context:e,containerName:g};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const y=X(n),I=sh(y),E=sh(r.context),A=I?.caseInfo?.ID,C=E?.caseInfo?.ID,_=sh(e)?.caseInfo?.ID;if(d&&A===C||!d&&(""===s||"review"===t.caseViewMode||!o&&t.root&&0===Object.keys(t.root).length&&_===t.data?.caseInfo?.ID))(void 0===t?.data?.caseInfo?.content||void 0!==t.data.caseInfo.content&&"object"==typeof t.data.caseInfo.content&&0===Object.keys(t.data.caseInfo.content).length)&&(t.root=void 0,delete t.data?.caseMessages),a.push(af(Hh,{...t,key:s,resourceType:"",...m}));else if(o){const o=Ou(e),i=iu(o,s);if(i)m.target=o,m.context=i,m.containerItemID=i,a.push(af(Hh,{...t,key:s,resourceType:"",...m}));else{const e=Iu(n)[0];if(r.target=e,r.context=xc(e,j.WORKAREA,n),r?.context){r.containerItemID=r.context,a.push(af(Uh,{...r,...t}));const n=r.containerItemID;a.push(af(zh,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=Ou(e),r.containerName=qr(e),r.context=e,r.containerItemID=e,Ch.setIn(t,"acName",m.target),await Pc(i,t),u){const{data:e,caseViewMode:r}=t;n.includes(j.WORKAREA)&&aa(n)&&(n=X(n));const o={data:e,caseViewMode:r,context:n};Ch.setIn(o.data,["context_data","caseViewMode"],r),a.push({type:at,payload:{context:n}}),a.push(af(Rh,o))}if(!o&&t.caseViewMode===j.PERFORM_MODE){const t=((e,t)=>{const n=Ou(e);return iu(n,t)})(e,s),n={data:{caseInfo:{headers:l}},context:t};a.push(af(Rh,n)),a.push(Tn(((e,t=!1,n=!1)=>{const r=ln.getNextActionMgrId();return{ID:Nh.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Nh.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{iy(a,r);let e=!1;const s=Ou(n),i=tu(s),l=pu(s);if(l&&i?.items?.[l]?.key===c?.actionInPayload?.caseID&&(e=!0),o){const e=Iu(n)[0];r.target=e,r.context=xc(e,j.WORKAREA,n),r.containerItemID=r.context,a.push(af(Uh,{...r,...t}));const o=r.containerItemID;a.push(af(zh,{parentContainerTarget:e,containerItemID:o}))}if(e){const{data:e,caseViewMode:r}=t,o={data:e,caseViewMode:r,context:n};Ch.setIn(o.data,["context_data","caseViewMode"],r),a.push({type:at,payload:{context:n}}),a.push(af(Rh,o))}}},hy=async(e,t,n,r,a,o)=>{((e,t,n)=>{if(t.isProcessAction&&(iy(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${Zd.PRIMARY}`,a=xc(r,Zd.PRIMARY),o={insKey:e.ID,className:e.content.classID,context:a,acTargetName:j.PRIMARY,isChild:!0},s={type:de,payload:{...o}};n.push(s)}})(e.data.caseInfo.parentCaseInfo,t,a);const s=e?.data?.caseInfo?.parentCaseInfo?.ID;if(s){const n=Ou(t?.context),r=nu(n,t?.context)?.parentContext,a=Ou(r);t?.isProcessAction&&su(a,s)&&Yu(r,e?.data?.caseInfo?.lastUpdateTime)}n.resourceType=sy.CASE,n.directUrlUpdation=!0,t.isProcessAction||await ly(a,{translatedDXAPIResponse:r,actionInPayload:t},n,o)},fy=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===j.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:o}=t,s=Ac.getPropertiesToReplace(o);a.push(af(Hh,{...e,...r,propertiesToReplace:s})),Ch.setIn(e,"acName",r.target),await Pc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,o=gu(a);if(o&&aa(a)){const t=X(o),s={data:n,caseViewMode:r,context:t};Ch.setIn(s.data,["context_data","caseViewMode"],r),e.push({type:at,payload:{context:t}});const i=Ac.getPropertiesToReplace(a);e.push(af(Rh,s,{propertiesToReplace:i}))}})(a,t,e)},gy=async(e,t,n,r,a,o,s,i,c)=>{const{isCaseWideAction:l,isInCreateStage:d,containerItemID:u}=e,p=W(e.context),h=ea(a),f=Zr(a),g=d&&!h&&!l,m=Iu(p)[0],y=m?pu(m):p,I=qr(u),E=gu(u),A=Object.freeze({target:e.target,containerItemID:u,context:E,containerName:I});g&&!dy(e.context)?await hy(i,e,t,a,o,c):uy(e.context,y)?await py(y,t,p,e,o,n,r,a,s):l&&!uy(e.context,y)?(iy(o,e),((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,o=W(r),s=gu(o);e.push(af(xh,{containerItemID:o,context:s,container:Zd.PREVIEW,containerName:Zd.PREVIEW,caseId:a,viewName:F.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(o,e,{caseClassName:f})):await fy(t,e,a,A,o)},my=(e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:o,additionalHeaders:s={},isCaseWideAction:i,outcome:c,jsActionQueryParams:l}=e,{state$:d}=t,u=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:a}=e;return t&&r&&!a?_c.PAGE:n||_c.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?Ke:"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:a,viewType:u};let{restApi:f}=bf(p,h),{reqType:g}=bf(p,h);u&&!f?.includes("viewType=")&&(f=f?.includes("?")?`${f}&viewType=${u}`:`${f}?viewType=${u}`),c&&!f?.includes("outcome")&&(f=f?.includes("?")?`${f}&outcome=${c}`:`${f}?outcome=${c}`),f=((e,t)=>(e&&Object.keys(e).forEach((n=>{t+=`&${n}=${e[n]}`})),t))(l,f),i&&(g="PATCH"),e.viewType=u;const{content:m,attachmentsExist:y}=Nc(o);e.attachmentsExist=y;const I=d.value.data[o]?.caseInfo?.headers||{},{etag:E}=I,A={"if-match":E,...s};return ki(dc(f,{method:g,body:m,headers:A},o)).pipe(Ul((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:bc({...A,...r})}})),Kl("Error occurred during ajax call at finishAssignment Epic : ",o))},{RESOURCE_TYPES:yy}=F,Iy=(e,t)=>{let n=0,r=[],a={},o="",s={},i=!1,c=!1;return e.pipe(Fl(oy),jl((e=>{const l=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),o=e.payload.context,Yn({context:o,stateObj:sh(o),clearContextMessages:!0}),!ol(o)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,t),Pd.handleDeferredActionCompletion(e.payload.context),Wl([])}return Wl(e.payload).pipe(kl((e=>{((e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:o,isModalAction:s}=t;if(o&&s){const t=qr(n),o=mt(t,r);e.push(af(zh,{containerItemID:n,target:o,actionMgrID:a}))}})(r,e);const n={...e};return my(n,{state$:t})})),kl((async e=>{if(e&&e.type===Ee){(e=>{const t=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],n=e?.payload?.err?.response?.status;if(Array.isArray(t)&&t.length>0&&424===n){t.forEach((e=>{e.isErrorButton=!0}));const n=e.payload.context,r=sh(n),a=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(t,r?.caseInfo?.actionButtons?.secondary||[]),o={data:{caseInfo:{actionButtons:{secondary:a}}},target:Ou(n),context:n};oh({type:ge,payload:o})}})(e);const t=Rc(e);return r.push(t),r}bd.clearContextedCache(o);const{headers:t,actionInPayload:d,response:u}=e,{containerItemID:p,context:h=gu(p),isModalAction:f,isInCreateStage:g}=d;i=d.isCaseWideAction,c=d.isProcessAction;const m=Ou(p);d.target=m;const y=qr(p),I=Object.freeze({target:d.target,containerItemID:p,context:h,containerName:y});var E;Ch.setIn(u.data,j.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),Ch.setIn(u.data,j.CASE_INFO_IS_LOCAL_ACTION,!1),u?.uiResources?.root?.config?.name&&"page"!==d.viewType&&Ch.setIn(u.data,j.CASE_INFO.VIEW_NAME,u?.uiResources?.root?.config?.name),E={submitResponse:u},Br.publish(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,E);let A=Am(u,{[F.STOPMERGEACTIONS]:!u.nextAssignmentInfo});const C=Zr(A),_=W(d.context),S=Iu(_)[0]?pu(Iu(_)[0]):_,b=ea(A),N=g&&!b;!f||g||uy(d.context,S)||(A=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(A,sh(p)));const v=vc(A,{headers:t,actionMgrID:n,directUrlUpdation:!1});let P,T;sa(v.data,d),v.caseClassName=C,v.resourceType=yy.ASSIGNMENT,v.headers=t;const $=A?.data?.caseInfo?.assignments?.some((e=>e.ID===d.assignmentID)),O=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(A,d),R=((e,t,n,r,a)=>{let o;const s=Ou(t);return o=_u(s)?iu(s,n.data?.caseInfo?.ID):pu(s),r&&e&&dh(null,j.CASE_VIEW_MODE_PROP,o)===j.PERFORM_MODE&&a})($,S,A,f,O),D=d?.actionID===F.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(A?.data?.nextAssignmentInfo&&!D)v.caseViewMode=j.PERFORM_MODE,P=ta(A),T=!0;else if(R&&!D)v.caseViewMode=j.PERFORM_MODE,P=ta(A),v.flowName=" ",v.deleteAssignmentSpecificResources=!1,T=!1;else{v.caseViewMode=j.REVIEW_MODE;const e=Cu(Ou(S));P=A?.confirmationNote&&A?.uiResources?.root?.config?.name===j.PY_CONFIRM&&!e?ta(A):"",T=!1}const x=ta(A);oa(v,A,{skipFlowNameUpdate:v?.caseViewMode===j.REVIEW_MODE||R});const w=_f("createWork",{caseClassName:C}).replace(/{.+?}/,String(Qr(x)));if(A.semanticURL=w,v.semanticURL=w,f?(await gy(d,v,T,P,A,r,e,u,s),N&&(a=(e=>{if(!cy(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}})(d))):g&&l&&!b?(cp.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Zd.PRIMARY,targetContainerName:Zd.PRIMARY,viewType:_c.PAGE,isLastStepInCreateStage:!0,context:n},a={type:fe,payload:{...r}};t.push(a)})(u,r,W(h))):await fy(v,d,A,I,r),da(e,r),Pd.handleDeferredActionCompletion(o),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:o}=t,s=uy(t.context,n),i=e?.data?.caseInfo?.stages||[],c=e?.data?.caseInfo?.stageID;Gr({caseID:o,isModalAction:r,isModalLaunchedFromPrimaryValue:s,isCaseWideAction:a,stages:i,stageID:c})})(v,d,S),!A?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:ta(e),assignmentID:n?null:r,actionID:n?a:null}})(A,d);(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:p})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===we));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=Qh({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)})(r,{transientItemID:p,target:m,isModalAction:f}),r})),Ul((()=>{const e=r.find((e=>e.type===Ee));var t;return e?(Pd.handleDeferredActionCompletion(o),(e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[j.ERROR_FIELD_IN_PAGE]=e[j.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[j.ERROR_FIELD_IN_PAGE].slice(1),r=e[j.ERROR_IN_PAGE_IDENTIFIER],a=r.startsWith(".")?r.slice(1):r;if(a){let o=t?`caseInfo.content.${t}`:"caseInfo.content";o=o.replace(/\(/g,"[").replace(/\)/g,"]");const s=Bn(a,o,j.PROPERTY),i={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};vn.mutateField(n,o,s[s.length-1],{messages:[i],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:r})}}))})(e),ln.rejectActionByID(n)):ln.resolveActionByID(n,a),s?.caseId&&(t=s,Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)),Bc(r),(i||c)&&(e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0}),r=[],a={},s={},r})))})))},Ey="CANCEL_ASSIGNMENT",Ay=e=>{const t={},{routeKey:n,isModalAction:r,caseID:a,context:o,RemoteSystemID:s}=e;s&&(t.RemoteSystemID=s);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=bf(i,{ID:a,caseID:a,viewType:_c.PAGE});return ec.getPreviewMode()&&(t[j.SKIPCOREHEADERS]=!0),ki(dc(c,{method:l,headers:t},o,{includeRemoteSystemIdIfPresent:!!s})).pipe(Ul((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:bc(t.headers)})),Kl(": Error occurred during ajax call at release lock request : ",o))},Cy=(e,t)=>{const{isModalAction:n}=t;return Ay({routeKey:"cancelAssignment",isModalAction:n,...e})},_y=e=>{let t=0,n=[];return e.pipe(Fl(Ey),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{isModalAction:n}=e;e.context||(e.context=gu(e.containerItemID));const{context:r}=e,a=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?Zd.MODAL:qr(n)})(e),o=mt(a,r),{continueExecution:s}=Lc(o);return s?(e.RemoteSystemID=V.getRemoteHeaderByContext(e.context)??void 0,Cy(e,{isModalAction:n})):(ln.rejectActionByID(t),Yl())})),kl((async e=>{if(e&&e.type===Ee)return n.push(Rc(e)),n;const{actionInPayload:r,response:a}=e,{containerItemID:o,isModalAction:s,isInCreateStage:i}=r,c=Ou(o),l=gu(o),d={target:s?`${j.APP.APP}/${j.MODAL}`:c,containerItemID:o,caseViewMode:s?j.PERFORM_MODE:j.REVIEW_MODE,context:l,actionMgrID:t,key:ta(a),skipReleaseLockRequest:!1};return i&&n.push(af(Hh,d)),!s&&aa(o)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:a}=t,o=W(n),s={context:gu(o),data:{referencedUsers:a,context_data:{caseViewMode:r}}};s.data={...t.response.data,...s.data},e.push(af(Rh,s))})(n,{childContainerItemID:o,caseViewMode:j.REVIEW_MODE,referencedUsers:a?.data.referencedUsers,response:a}),d.skipReleaseLockRequest=!0,n.push(af(Jh,d)),n})),Ul((()=>(oh(n),ia(n,t),n=[],n))))},Sy="NAVIGATE_TO_STEP",by=(e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:o=gu(a),isInCreateStage:s}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:s?_c.PAGE:_c.FORM},{restApi:l,reqType:d}=bf("navigateToStep",c),{content:u}=Nc(o),p=i.value.data[o].caseInfo.headers;return ki(dc(`${l}`,{method:d,body:u,headers:{"if-match":p&&p.etag}},o)).pipe(Ul((t=>({response:t.data,actionInPayload:e,headers:bc({...p,...t.headers})}))),Kl("Error occurred during ajax call at navigateToStep Epic : ",o))},{RESOURCE_TYPES:Ny}=F,vy=(e,t)=>{let n=0,r=[];return e.pipe(Fl(Sy),jl((e=>(({actionMgrID:n}=e.payload),Wl(e.payload).pipe(kl((e=>(Jn(e.context),by(e,{state$:t})))),kl((async e=>{if(e&&zr(e.type))return r.push(Rc(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:o,context:s=gu(o),isModalAction:i}=t;bd.clearContextedCache(t.context);const c=Ou(o),l=qr(o),d=Object.freeze({target:c,containerItemID:o,context:s,containerName:l}),u=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name,h=n?.uiResources?.root?.config?.context;u&&!u.pyViewName&&p&&"page"!==t.viewType&&(Ch.setIn(u,"pyViewName",p),Ch.setIn(u,"pyViewContext",h));const f=Am(n),g={acName:c,...d};await Pc(f,t,g);const m=vc(f,{...d,headers:a});n?.nextAssignmentInfo||(m.caseViewMode=j.REVIEW_MODE),m.doDeleteCaseSummary=t.doDeleteCaseSummary,m.resourceType=Ny.ASSIGNMENT,oa(m,f),sa(m.data,t);const y=f.data?.caseInfo?.stages,I=f.data?.caseInfo?.stageID;return Gr({caseID:ta(f),isModalAction:i,stages:y,stageID:I}),aa(o)&&Vc(m,r),r.push(af(Hh,m)),Uc(r),r})),Ul((()=>(oh(r),ia(r,n),r=[],r))))))))},Py=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=bf("deleteCaseInCreateStage",{ID:t});return ki(dc(r,{method:a},n)).pipe(Ul((t=>({response:t.data,actionInPayload:e,headers:bc(t.headers)}))),Kl(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},Ty=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},$y=(e,t)=>{let n,r=0,a=[];return e.pipe(Fl(Rl),Ul((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),kl((e=>e.ignoreCaseDeletion?Wl({actionInPayload:e}):Py(e))),kl((async e=>{if(e&&zr(e.type)){const{payload:t}=e,n=Rc({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:o,isModalAction:s}=n,i=s?Zd.MODAL:Zd.PRIMARY,c=mt(i,o);if(!s&&c){const e={acName:c,target:c,context:o},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 Pc({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:j.PRIMARY,isChild:!0},t={type:de,payload:{...e}};a.push(t)}const l={target:c,containerItemID:o,context:o,caseDeleted:!0};return a.push(af(Jh,l)),a})),Ul((()=>(oh(a),ia(a,r)===j.PROMISE_VALUE.RESOLVE&&Ty({caseType:n}),a=[],a))))},Oy=(e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:o,reqType:s}=bf("save",{assignmentID:n,actionID:r}),{content:i}=Nc(a),c=t.value.data[a]?.caseInfo?.headers;return ki(dc(o,{method:s,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(Ul((t=>({response:t.data,actionInPayload:e,headers:bc(t.headers)}))),Kl(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))},Ry=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let o=[];return Wl(n.payload).pipe(kl((e=>Oy(e,r))),kl((e=>{if(e&&zr(e.type))return Wl(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${Zd.PRIMARY}`,n=xc(t,Zd.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:j.PRIMARY,isChild:!0},a={type:de,payload:{...r}};o.push(a)}const{containerItemID:t}=e&&e.actionInPayload,r=W(t),a=Ou(r),s=tu(a),i=Iu(r)[0]?pu(Iu(r)[0]):r,c=pu(a);n.payload.canUpdateAvailableActions&&Em(e.response);if(i&&o.push(af(Rh,{context:i,data:{caseInfo:{headers:e.headers}}})),s?.items?.[c]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},a=Ac.getPropertiesToReplace(t);o.push(af(Rh,n,{propertiesToReplace:a})),o.push(af(Hh,{context:t}))}return da(e,o),e.actionInPayload.RemoteSystemID=V.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,Ay(e.actionInPayload)})),kl((async n=>{if(n&&zr(n.type)){const{payload:t}=n,r=Rc({...n,...t,actionMgrID:a});o.push(r);const s=e.action.payload.modalLoadingContainer;if(s){const e=s.context,{context_data:t}=sh(e)||{};t?.isLoading&&Ru(e)}return o}const{actionInPayload:r}=n,{context:s,containerName:i}=r,c={target:mt(i,s),containerItemID:s,context:s};return t||o.push(af(Jh,c)),o})),Ul((()=>(oh(o),ia(o,a),t||(o=[]),o))))},Dy=(e,t)=>{let n,r=0;return e.pipe(Fl(Dl),jl((e=>{const{saveOnly:a}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return Ry({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},xy=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",Br.unsubscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",Br.subscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:wy}=j,{RESOURCE_TYPES:My}=F,Ly=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:o,openActionType:s,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,d=l?Ye:(e=>{const t=e.localActionType.toLowerCase();return t===wy.CASE_WIDE||t===wy.EXPRESS?Ke:qe})(e),u=_c.FORM,{reqType:p}=bf(d,{caseID:a,ID:r,actionID:n,viewType:u});let{restApi:h}=bf(d,{caseID:a,ID:r,actionID:n,viewType:u});e.actionType=d===Ke?j.CASE:j.ASSIGNMENT,h&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${u}`:`${h}?viewType=${u}`);const f=i?.context??o;return ki(dc(h,{method:p,headers:c},f)).pipe(Ul((t=>({response:t.data,actionInPayload:e,headers:bc(t.headers)}))),Kl(`: Error occurred during ajax call at ${s} Epic : `,f))},Fy=(e,t)=>{const{isProcessAction:n}=t,r=n?Ye:qe;e.openActionType=r;let a;if("modal"===Hr(r,e)){a=Iu(e.contextName)[0]?Iu(e.contextName):Ou(e.contextName);const n=a?pu(a):e.contextName,r=gu(n),o=Hr(e.openActionType,e),s=mt(o,e.context),i=z(e.context,H(o,e.context));if(oh(Uh({target:s,context:i,containerItemID:i,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}}})),oh(qh({context:i})),e.modalLoadingContainer={target:s,context:i},!Iu(e.contextName)[0])return Ly(e,t);if(!e.continueExecution)return Ly(e,t);if(!Sl(r))return Ly(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return ki([xl(e.saveActionPayload)]).pipe(kl((e=>(e=>{let t,n=0;const r=[],a={value:ah()?.getState()};return Wl(e).pipe(Fl(Dl),jl((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),Wl([])}return Ry({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),kl((n=>{if(1===n.length&&zr(n[0].type)){const{continueExecution:n}=Lc(a);if(!n)return ln.rejectActionByID(e.actionMgrID),ql.pipe(Vi((()=>Yl()))).toPromise();if(n)return Ly(e,t)}return Ly(e,t)})),Ul((e=>e)))}return Ly(e,t)},jy=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:o,openActionType:s,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Am(e),d=Hr(s,r),u=c?.target??mt(d,a);let p,h,f=!1;!Su(u)||_u(u)&&!su(u,e.data.caseInfo.ID)?(h=H(d,a),Kr(d)&&(h=z(a,h)),p=h,f=!0):(p=_u(u)?iu(u,e.data.caseInfo.ID):pu(u),h=gu(p));const g={acName:u,target:u,containerName:d,context:h};await Pc(l,r,g),(void 0===l?.data?.caseInfo?.content||void 0!==l.data.caseInfo.content&&"object"==typeof l.data.caseInfo.content&&0===Object.keys(l.data.caseInfo.content).length)&&delete l.data?.caseMessages;const m=l.uiResources?.root;let y;y=m?j.PERFORM_MODE:j.REVIEW_MODE;const I=vc(l,{target:u,context:h,containerItemID:p,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:o,isMinimizable:!1,isInCreateStage:Kr(d),resourceType:My.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});m&&oa(I,l),Kr(d)&&delete I.doDeleteCaseSummary,r.openActionType===ze&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=r.selectedList);const E=f?Uh:Hh;if(I.data.context_data.isProcessAction=r.isProcessAction,t.push(af(E,I)),f||t.push(af(Yh,I)),f){const a=Iu(r.contextName),o=iu(a,e.data.caseInfo.ID);if(o){const e={data:{caseInfo:{headers:n}},context:o};t.push(af(Rh,e))}}return p!==pu(u)&&t.push(af(zh,{target:u,containerItemID:p})),aa(p)&&!c?.context&&Vc(I,t),I.caseViewMode===j.REVIEW_MODE&&t.push(af(Jh,I)),t},Uy="OPEN_LOCAL_ACTION",ky=(e,t)=>Fy(e,t),Vy=e=>{let t=0,n=[];return e.pipe(Fl(Uy),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>ky(e,{actionMgrID:t}))),kl((async e=>{if(!e)return ql;if(zr(e.type)){const t=Rc(e);n.push(t);const{context_data:r}=sh(e.payload.context)||{};return r?.isLoading&&n.push(af(Yh,e.payload)),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return Ch.setIn(a,"data.caseInfo.activeActionID",o),Ch.setIn(a.data,j.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&Ch.setIn(a.data,j.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await jy(a,n,{headers:r,actionInPayload:t}),xy(t),n})),Ul((()=>(oh(n),ia(n,t),n=[],n))))},By=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:o="",bulkContextType:s=""}=e,i=ze,{reqType:c,restApi:l}=bf(i,{caseTypeID:a,actionID:t,bulkContextID:o,bulkContextType:s});return ki(dc(l,{method:c},n)).pipe(Ul((t=>({response:t.data,actionInPayload:e,headers:bc(t.headers)}))),Kl(`: Error occurred during ajax call at ${r} Epic : `,n))},Gy=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",Br.unsubscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",Br.subscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},Wy="OPEN_BULK_ACTION",Hy=e=>{let t=0,n=[];return e.pipe(Fl(Wy),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=ze;const a=Hr(ze,e),o=mt(a,n),{continueExecution:s}=Lc(o);return s?By(e):(ln.rejectActionByID(r),Yl())})(e,{actionMgrID:t}))),kl((async e=>{if(e&&zr(e.type)){const t=Rc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:o}=t;return Ch.setIn(a,"data.caseInfo.activeActionID",o),await jy(a,n,{headers:r,actionInPayload:t}),Gy(t),n})),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],n))))};var qy=Array.isArray,Yy=Object.getPrototypeOf,Ky=Object.prototype,zy=Object.keys;function Xy(e){if(1===e.length){var t=e[0];if(qy(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Yy(r)===Ky){var n=zy(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var Jy=Array.isArray;function Qy(e){return Ul((function(t){return function(e,t){return Jy(t)?e.apply(void 0,Gs([],Bs(t))):e(t)}(e,t)}))}function Zy(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return Ks(Bl(e))?e.pop():void 0}(e),r=Xy(e),a=r.args,o=r.keys,s=new Ci((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,s=t,i=function(t){var i=!1;Oi(a[t]).subscribe(wi(e,(function(e){i||(i=!0,s--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(s||e.next(o?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(o,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?s.pipe(Qy(n)):s}const eI=e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:o}=Nc(n,{nonEmptyAndChangedData:!0});let s=5;try{const e=jd.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===a))?.pyList.split(",").includes(t)&&(s=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/s,l=Xe,{reqType:d,restApi:u}=bf(l,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)o.cases=i.slice(t,t+c),o.cases.length&&p.push(ki(dc(u,{method:d,body:o},n)).pipe(Ul((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:bc({...r})}})),Kl("Error occurred during ajax call at submitbulkaction Epic : ",n)));return Zy(p)},tI=e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},nI="SUBMIT_BULK_ACTION",rI=e=>{let t,n=0,r=[],a="";return e.pipe(Fl(nI),jl((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),Wl([])}return Wl(e.payload).pipe(kl((e=>(t=e,eI(t)))),kl((e=>{let n=0,o=0;const s=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),o+=Number(t.failureCount),o&&t.results.map((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{s.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),a=`${n} record(s) updated`,tI({submitResponse:e}),t.target=`${j.APP.APP}/${Zd.MODAL}`,r.push(af(Jh,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),o&&r.push(af(Xh,{messages:[{type:"error",message:1===o?"1 record failed to update":`${o} records failed to update`,errorDetails:s,showHeader:!1}],context:W(c)||c,category:"HTTP",showHeader:!1})),r})),Ul((()=>(ln.resolveActionByID(n,a),oh(r),r=[],r))))})))},aI=e=>{const{actionID:t,context:n,cases:r}=e,{content:a}=Nc(n,{nonEmptyAndChangedData:!0});a.cases=r.map((e=>({ID:e})));const o=Xe,{reqType:s,restApi:i}=bf(o,{actionID:t,runningMode:"async"});return ki(dc(i,{method:s,body:a},n)).pipe(Ul((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:bc({...r})}})),Kl("Error occurred during ajax call at submitbulkaction Epic : ",n))},oI=e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},sI="SUBMIT_BULK_ACTION_ASYNC",iI=e=>{let t,n=0,r=[],a="";return e.pipe(Fl(sI),jl((e=>{const{isFormValid:o}=e.payload;if(({actionMgrID:n}=e.payload),!o){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),Wl([])}return Wl(e.payload).pipe(jl((e=>(t=e,aI(t)))),Ul((e=>{const n=[],{containerItemID:o,context:s}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),a="Processing bulk actions",oI({submitResponse:i}),t.target=`${j.APP.APP}/${Zd.MODAL}`,r.push(af(Jh,{containerItemID:o,context:s,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(af(Xh,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:W(s)||s,category:"HTTP",showHeader:!1})),r})),Ul((()=>(ln.resolveActionByID(n,a),oh(r),r=[],r))))})))},cI=(e,t)=>Fy(e,t),lI=e=>{let t=0,n=[];return e.pipe(Fl($l),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>(Jn(e.context),cI(e,{actionMgrID:t,isProcessAction:!0})))),kl((async e=>{if(e&&zr(e.type)){const t=Rc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await jy(a,n,{headers:r,actionInPayload:t}),n})),Ul((()=>(Bc(n),ia(n,t),n=[],n))))},dI=e=>{let t=0,n=[];return e.pipe(Fl(Se,we),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:o,currentCaseViewMode:s,isProcessAction:i,isInCreateStage:c}=e,l=s===j.PERFORM_MODE,d=n&&l;return i&&c?Ay(e):t!==r||a||o||!d?t?.includes(j.MODAL)&&ua(Ju(t))===j.REVIEW_MODE?Ay(e):Wl([]):Ay(e)})),kl((e=>(e&&zr(e.type)&&n.push(Rc(e)),n))),Ul((()=>(oh(n),ia(n,t),n=[],n))))};var uI=new Zf(zf),pI=uI;function hI(e,t,n){void 0===e&&(e=0),void 0===n&&(n=pI);var r=-1;return null!=t&&(Vl(t)?n=t:r=t),new Ci((function(t){var a,o=(a=e)instanceof Date&&!isNaN(a)?+e-n.now():e;o<0&&(o=0);var s=0;return n.schedule((function(){t.closed||(t.next(s++),0<=r?this.schedule(void 0,r):t.complete())}),o)}))}function fI(e,t){return void 0===e&&(e=0),void 0===t&&(t=uI),e<0&&(e=0),hI(e,e,t)}function gI(e){return xi((function(t,n){var r=!1,a=null,o=null,s=function(){if(null==o||o.unsubscribe(),o=null,r){r=!1;var e=a;a=null,n.next(e)}};t.subscribe(wi(n,(function(t){null==o||o.unsubscribe(),r=!0,a=t,o=wi(n,s,oi),Oi(e(t)).subscribe(o)}),(function(){s(),n.complete()}),void 0,(function(){a=o=null})))}))}const mI=(e,t,n,r,a)=>{if(a!==j.RESOURCE_STATUS.CREATE)return;Yc.isStateMachineExist(e,t,n)||Yc.setStateMachine(e,n,t,new ir(n,t,e));Yc.getStateMachine(e,t,n).insert({},r+1,!0,{isDefault:!0})},yI=e=>{const{context:t}=e;let n={...Nc(t).content,contextData:!1};const r=Wc(t);Ch.isEmpty(r)||(n=Gc(r,n));const{restApi:a,reqType:o}=bf("refreshCaseView",e);return n.interestPage=e.interestPage,ki(dc(a,{method:o,body:n},t)).pipe(Ul((t=>({actionInPayload:e,response:t.data,headers:bc(t.headers)}))),Kl(": Error occurred during ajax call : ",t))},II=e=>{let t=0,n=[],r="";return e.pipe(Fl(pt),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>yI(e))),kl((async e=>{if(e&&e.type===Ee)return n.push(Rc(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a}=e,o=t.containerName,s=mt(o,t.context);let i=xc(s,o,t.context);i=z(t.context,i);const c=Am(a);c.key=t.ID,c.data?.caseInfo&&(c.data.caseInfo.ID=t.ID);const l={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};c.uiResources.context_data.modalView=l;const d=sh(t.context)?.context_data?.caseInfo,u=`${t.pageReference}${t.targetProperty}`,p=Gn(d,u.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").slice(1),t.index);c.uiResources.context_data.caseInfo={...c.uiResources.context_data.caseInfo,content:Ch.mergeDeep(c.uiResources.context_data.caseInfo?.content,p?.content)};const h=Nh.getProperty(".RemoteSystemID",j.CASE_INFO.HEADERS,t.context),f={acName:s,context:i};await Pc(c,t,f);const g={target:s,context:i,containerItemID:i};h&&(g.headers={RemoteSystemID:h});const m=vc(c,g);m.resourceStatus=t.actionType,m.isMultiRecordData=!0,m.parentContext=t.context,m.heading=t.heading;const y=Dc(s,m);return r=i,n.push(y),Uc(n),{actionsOut:n,actionInPayload:t}})),Ul((({actionInPayload:e})=>(Xr(n)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],e.skipPageInstructions||mI(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},EI=e=>{let t,n="",r=[];return e.pipe(Fl(ht),jl((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,t),Pd.handleDeferredActionCompletion(e.payload.context),Wl([])}return Wl(e.payload).pipe(kl((e=>(t=e,yI(t)))),kl((async e=>{if(e&&e.type===Ee){const t=Rc(e);return r.push(t),r}const{containerItemID:n,context:a}=t;var o,s,i,c;return o=a,s=t.parentContext,i=F.CASE_INFO.CASE_INFO_CONTENT,c=!1,gr(o).forEach((e=>{const t=Ch.convertClipboardPageToPageRefNotation(e.target);Yc.isStateMachineExist(s,i,t)||Yc.setStateMachine(s,t,i,new ir(t,i,s));const n=Yc.getStateMachine(s,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(af(Jh,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),Ul((()=>{if(Xr(r))ln.rejectActionByID(n),Pd.handleDeferredActionCompletion(t.context);else{ln.resolveActionByID(n),Pd.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(Nh.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Nh.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,r,t.parentContext),n=Nh.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),a=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),o=a.replace(j.CASE_INFO.CASE_INFO_CONTENT,"");Rn(e,n,t.parentContext,o,{})}else Mn(t.parentContext,j.CASE_INFO.CASE_INFO_CONTENT,{})}return oh(r),r=[],r})))})))},AI=e=>{const{caseID:t,headers:n,debugInfo:r,context:a}=e,o=bf("getDescendants",{caseID:t}),{restApi:s}=o,{reqType:i}=o;return ki(dc(s,{method:i,headers:{...n,...r&&{...tc.addDebugHeaders(r)}}},a)).pipe(Ul((t=>({actionInPayload:e,response:t.data,headers:bc({...n,...t.headers})}))),Kl("Error ocurred during ajax call at getDescendants Epic : ",a))},CI=e=>{let t=0,n=[];return e.pipe(Fl(vd),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>AI(e))),kl((async e=>{if(e&&zr(e.type))return n.push(Rc(e)),n;const{actionInPayload:t,response:r}=e,a={};Ch.setIn(a,"caseInfo.childCases",r?.childCases);const o={data:a,context:t?.context};return n.push(af(Rh,o)),n})),Ul((()=>(oh(n),ia(n,t),n=[],n))))},_I=[Hm,Zm,ay,Vy,Hy,rI,iI,lI,Iy,vy,_y,dI,Dy,$y,e=>e.pipe(Fl(He),gI((()=>fI(100))),Ul((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:o,skipReleaseLockRequest:s,isInCreateStage:i}=e.payload;return ln.resolveActionByID(t),Br.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:o,skipReleaseLockRequest:s,isInCreateStage:i}),[]}))),e=>e.pipe(Fl(Me),gI((()=>fI(100))),Ul((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,o=mt(r,n);return ln.resolveActionByID(t),oh(af(zh,{containerItemID:a,target:o,doDeleteCaseSummary:!1})),[]}))),II,EI,CI];function SI(){return xi((function(e,t){e.subscribe(wi(t,oi))}))}const{RESOURCE_TYPES:bI}=F,NI=[e=>e.pipe(Fl(te),Ul((e=>e.payload)),kl((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===Zd.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=mt(Zd.PREVIEW,e.context),n=xc(t,Zd.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);oh(Uh({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:j.REVIEW_MODE,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(V.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=V.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=bf("loadView",t);return e.viewContext===bI.PAGE&&({restApi:r,reqType:a}=bf(je,{page:e.viewName,pageClass:e.pageClass})),ki(dc(r,{method:a,headers:n},e.context)).pipe(Ul((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:bc(t.headers),rootView:Ch.getIn(r,j.ROOT)}})),Kl(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),kl((async e=>{const t={};if(e?.type===Ee){if(t.actionsOut=Rc(e),e?.payload?.context?.includes(Zd.PREVIEW)){const n={...sh(e.payload.context),caseInfo:{progress:!1,error:!0}},r=mt(Zd.PREVIEW,e.payload.context);t.actionsOut=af(Hh,{key:n.key,target:r,containerName:Zd.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete r?.data?.caseInfo?.assignments,delete r?.data?.caseInfo?.availableActions,delete r?.data?.caseInfo?.availableProcesses);const{containerItemID:o,containerName:s}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,a=t||Ur.getTargetViewContainerName(je),o=r?.target??mt(a,e.context);return{target:o,context:r?.context??(t===Zd.PREVIEW&&n?e.context:xc(o,a,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let d={};d=Am(r),d.directUrlUpdation=!1,await Pc(d,n,l);const u={...n,target:i,context:c,containerItemID:o||c,headers:a},p=vc(d,u);if(p.resourceType=bI.CASE,s&&!p.updateData){p.caseViewMode=j.REVIEW_MODE;const e=Ou(p?.context);((e,t,n,r,a)=>{e&&a===Zd.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=af(Hh,{...n,containerName:a})):e?(r.actionsOut=[],r.actionsOut.push(af(zh,{target:t,containerItemID:e}))):r.actionsOut=af(Uh,{...n,containerName:a})})(iu(e,p.key),e,p,t,s)}else p.preserveClientChanges=!0,t.actionsOut=[],s===Zd.PREVIEW&&t.actionsOut.push({type:at,payload:{context:c}}),t.actionsOut.push(af(Rh,p))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),Ul((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(ln.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(Fl(ne),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:a,className:o,skipSemanticUrl:s=!1,containerName:i=Ur.getTargetViewContainerName(je)}=e,c=n&&{...tc.addDebugHeaders(n)},l=mt(i,r);let d="",u={},p=!0;if(!s){if(d=_f(je,{page:a}),l&&d){const{activate:t,activateContainerActionPayload:n}=jc(bI.PAGE,l,{semanticURL:d});if(t)return Wl({type:Re,activateContainerActionPayload:n,actionConfig:e})}if(pu(l)&&({continueExecution:p,removeActionPayload:u}=Lc(l)),!p)return ln.rejectActionByID(t),Yl()}const{restApi:h,reqType:f}=bf(je,{page:a,pageClass:o});return ki(dc(h,{method:f,headers:c},r)).pipe(Ul((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:d,semanticURL:d},actionConfig:e,headers:bc(t.headers),removeActionPayload:u,skipSemanticUrl:s}})),Kl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),kl((async e=>{if(e&&e.type===Ee)return n.push(Rc(e)),n;let{type:t}=e;const{actionConfig:r,skipSemanticUrl:a}=e,o=r.containerName||Ur.getTargetViewContainerName(ne),s=mt(o,r.context);Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:i,updatedType:c}=((e,t,n,r)=>{let a={},o=e;if(n.isTraditionalRemoteCase){a={...n};const e=iu(r,a.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},o=Re)}return{remoteCasePayload:a,updatedType:o}})(t,e,r,s);if(t=c??t,t===Re){const{activateContainerActionPayload:{semanticURL:t,containerItemID:a}}=e,o={acName:s,context:gu(a)};r.isTraditionalRemoteCase||await Pc({directUrlUpdation:!0,semanticURL:t},r,o,!0),n.push(af(zh,{target:s,containerItemID:a}))}else{const t=xc(s,o,r.context),{response:c,headers:l={},removeActionPayload:d}=e,u=Am(c,{isCreateDataObject:r.isCreateDataObject});u.directUrlUpdation=!a;const p={acName:s,context:t},h=ua(t);await Pc(u,r,p);const f={target:s,context:t,containerItemID:t,headers:l,debugInfo:r.debugInfo,currentCaseViewMode:h},g=vc(u,f);g.resourceType=F.PAGE,r.isCreateDataObject&&(g.resourceType=F.RESOURCE_TYPES.DATA,g.resourceStatus=F.RESOURCE_STATUS.CREATE,delete g.data.caseInfo),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=F.CASE,n.key=Ac.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:Qr(Ac.getRemoteCaseKey(t.assignmentID,t.insKey))}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(r,i,g),g.data??={},g.data.traditionalGadgetId=Ac.getUniqueGadgetId();const m=Dc(s,g);d.containerItemID&&wc(m)&&n.push(af(Jh,{containerItemID:d.containerItemID,target:s})),n.push(m),Uc(n)}return Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),Ul((()=>{ln.resolveActionByID(t),oh(n),n=[]})),SI())}];const vI=(e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:s,skipSemanticUrl:i,RemoteSystemID:c}=e,{removeActionPayload:l}=t,{restApi:d,reqType:u,body:p}=bf(Ue,{pageName:r,dataContext:a,dataContextParameters:o}),h={};return h.RemoteSystemID=c,ki(dc(d,{method:u,headers:h,body:p},n)).pipe(Ul((t=>({response:{...t.data,key:s,semanticURL:s},actionConfig:e,headers:bc(t.headers),removeActionPayload:l,skipSemanticUrl:i}))),Kl("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:PI}=F,TI=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:o,reqType:s}=bf("deleteDataObject",a);return ki(dc(o,{method:s},n)).pipe(Ul((t=>({response:t.data,actionInPayload:e}))),Kl("Error occurred during ajax call at deleteDataObject Epic",n))},$I=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,a={data_view_ID:t},{restApi:o,reqType:s}=bf("getDataObjectActions",a);return ki(dc(o,{method:s,body:{dataViewParameters:n}},r)).pipe(Ul((e=>({...e.data}))),Kl("Error occurred during ajax call at GET data object actions : ",e.context))},OI=[e=>{let t,n=0,r=[];return e.pipe(Fl(re),(a=e=>(({actionMgrID:n}=e.payload),Wl(e.payload).pipe(kl((e=>((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:o,skipSemanticUrl:s=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:d,RemoteSystemID:u}=e,p=mt(d,n);let h="",f={},g=!1;if(!s){h=_f(Ue,{pageName:r,dataViewName:a},o);const{activate:n,activateContainerActionPayload:s}=jc(PI.PAGE,p,{semanticURL:h});if(n)return Wl({type:Re,activateContainerActionPayload:s,actionConfig:e});if(({continueExecution:g,removeActionPayload:f}=Lc(p)),!g)return ln.rejectActionByID(t),Yl()}return vI({context:n,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:h,skipSemanticUrl:s,containerName:d,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:u},{removeActionPayload:f})})(e,n))),kl((async e=>{if(e&&e.type===Ee)return r.push(Rc(e)),r;const{type:n,actionConfig:a,headers:o,response:s,skipSemanticUrl:i}=e;t=Ch.getIn(s,j.ROOT);const{containerName:c,parentAction:l,resourceType:d}=a,u=mt(c,a.context);let p;const h=ua(a?.context);if(a.isDeferLoaded){p=Am(s),p.directUrlUpdation=!i;const t={acName:u,context:a.context};await Pc(p,a,t);const n={target:u,headers:o,context:a.context,containerItemID:e.containerItemID},c=vc(p,n);return r=af(Rh,c),r}if(n===Re){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,o={acName:u,context:gu(n)};await Pc({directUrlUpdation:!0,semanticURL:t},a,o,!0),r.push(af(zh,{target:u,containerItemID:n,resourceType:PI.DATA}))}else if("DATA"===d&&l===ut){const{context:e}=a,t=s?.data,n={context:e,data:t};r.push(af(Rh,n))}else{const t=xc(u,c,a.context),{removeActionPayload:n}=e;p=Am(s),p.directUrlUpdation=!i;const l={acName:u,context:t};await Pc(p,a,l);const d=vc(p,{target:u,context:t,containerItemID:t,headers:o,currentCaseViewMode:h});d.resourceType=PI.DATA;const f=Dc(u,d);n.containerItemID&&wc(f)&&r.push(af(Jh,{containerItemID:n.containerItemID,target:u})),Uc(r),r.push(f)}return r})),Ul((()=>(ln.resolveActionByID(n,t),oh(r),r=[],r))))),Ks(o)?kl(a,o,1):kl(a,1)));var a,o},e=>{let t=0,n=[];return e.pipe(Fl(st),zl(100),jl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),Wl([])}return Wl(e.payload).pipe(kl((e=>Xl(e))),kl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Rc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:o}=r,s=o?Zd.MODAL:Zd.PRIMARY,i={target:mt(s,a),containerItemID:a,context:a};return n.push(af(Jh,i)),n})),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Fl(ct),zl(100),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>Jl(e))),kl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Rc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s}=r,i=mt(s,r.context),c=xc(i,s,r.context),l={acName:i,context:c};await Pc(a,r,l);const d=vc(a,{target:i,context:c,containerItemID:c,headers:o});return d.resourceType=F.RESOURCE_TYPES.DATA,d.resourceStatus=F.RESOURCE_STATUS.UPDATE,d.key=JSON.stringify(r.requestPayload),n.push(af(Uh,d)),n})),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Fl(lt),zl(100),jl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),Wl([])}return Wl(e.payload).pipe(kl((e=>Ql(e))),kl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Rc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:o}=r,s=o?Zd.MODAL:Zd.PRIMARY,i={target:mt(s,a),containerItemID:a,context:a};return n.push(af(Jh,i)),n})),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Fl(it),zl(100),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>TI(e))),kl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Rc({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],n))))},e=>{let t=0,n=[];let r={};return e.pipe(Fl(ye),zl(100),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>$I(e))),kl((async e=>e&&e.type===Ee?(n.push(Rc(e)),n):(r=e,[]))),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t,r),oh(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Fl(dt),zl(100),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>Zl(e))),kl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Rc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,actionID:i,context:c,actionName:l}=r,d=mt(s,r.context);let u=H(s,c);u=z(c,u);const p={target:d,context:u,containerItemID:u,headers:o,resourceType:F.RESOURCE_TYPES.DATA,resourceStatus:F.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l},h={acName:d,context:c};await Pc(a,r,h);const f=vc(a,p);return n.push(af(Uh,f)),n})),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Fl(ut),zl(100),jl((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const a=e.payload.context;if(!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),Wl([])}return Yn({context:a,stateObj:sh(a),clearContextMessages:!0}),Wl(e.payload).pipe(kl((e=>ed(e))),kl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Rc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:o={}}=e,{containerName:s,containerItemID:i,resourceType:c,key:l}=r,d=mt(s,r.context),u={acName:d,context:r.context};await Pc(a,r,u);const p={key:l,target:d,resourceType:c,containerItemID:i,headers:o,context:r.context};return n=((e,t,n,r)=>{const{resourceType:a,key:o,containerItemID:s}=r,i=vc(n,t);i.resourceType=a||F.RESOURCE_TYPES.DATA;const c=X(s);e.push(af(Jh,i));const l=lh(".dataContext","dataInfo",c),d=lh(".dataContextParameters","dataInfo",c),u={context:c,skipSemanticUrl:!0,resourceType:a,parentAction:ut,dataContext:l,dataContextParameters:d},p=l&&d&&_f(Ue,{pageName:j.PY_DETAILS,dataViewName:l},d)||"";if(s?.includes(j.PREVIEW)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DATA_PREVIEW,container:j.PREVIEW,containerName:j.PREVIEW,...u}};e.push(t)}else if(a!==j.PAGE&&o===p&&s?.includes(j.PRIMARY)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DETAILS,containerName:"",...u}};e.push(t)}return e})(n,p,a,{key:l,resourceType:c,containerItemID:i}),n})),Ul((()=>(1===n.length&&zr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),oh(n),n=[],n))))})))}];function RI(e,t){return void 0===t&&(t=uI),xi((function(n,r){var a=null,o=null,s=null,i=function(){if(a){a.unsubscribe(),a=null;var e=o;o=null,r.next(e)}};function c(){var n=s+e,o=t.now();if(o<n)return a=this.schedule(void 0,n-o),void r.add(a);i()}n.subscribe(wi(r,(function(n){o=n,s=t.now(),a||(a=t.schedule(c,e),r.add(a))}),(function(){i(),r.complete()}),void 0,(function(){o=a=null})))}))}const{RESOURCE_TYPES:{CASE:DI,DATA:xI}}=F;let wI=[],MI=!1;const LI={},FI=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 Im.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}(...Nm,..._I,...NI,...[e=>e.pipe(Fl(Ie),RI(200),Ul((e=>e.payload)),kl((e=>{MI=!1,Br.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{MI=!0}));const t=ec.getPreviewMode()&&tc.addDebugHeaders({debugId:Ch.generateUniqueID()});LI.dataContext=e.payload.dataViewName,LI.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:o}=e;o=o&&o.indexOf("viewType={viewType}")>0?o.replace("{viewType}","page"):o&&o.indexOf('viewType=""')>0?o.replace('viewType=""','viewType="page"'):o;const s=E()+o,i=e.options.context;let c;const l={},d=e?.payload?.caseClassName;if(V.isRemoteCase(d)){const{RemoteSystemID:e}=V.getRemoteCase(d);l.RemoteSystemID=e}if("POST"===r){c=e.payload,o.indexOf("viewType=")<0&&(o=`${o}?viewType=page`);let i;switch(kc(a)){case DI:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case xI:i=LI;break;default:i=c}return ki(dc(s,{method:r,body:i,headers:{...l,...t}},n)).pipe(Ul((t=>({response:{...t.data},payload:e,headers:bc(t.headers)}))),Kl(": Error occurred during ajax call at historyEpic : ",e))}return ki(dc(s,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(Ul((n=>({response:n.data,payload:e,headers:{...bc(n.headers),...t}}))))})),kl((async e=>{if(MI)return wI;if(Br.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{MI=!0})),e&&e.type===Ee)return Rc(e);const{headers:t={},response:n,payload:r}=e,a=Am(n,{[F.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),o=r.options.acName,s=Cu(o)&&Su(o)?pu(o):e.payload.options.context,i=s;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:o,context:s,containerItemID:i,headers:t,debugInfo:{debugId:t[j.COREHEADER_APP_DEBUG_ID]}};let l="";const d=r?.payload?.page;let u=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(l=_f(Be,{caseName:e.payload.payload.caseName}),l=l&&l.replace("{workID}",e.payload.payload.workID)||"",u=r?.payload?.caseClassName),Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:d,pageClass:u});const p=Ch.getIn(a,j.LOCALE_REFERENCES);await up.loadLocaleResources(p);const h=Ch.getIn(a,j.COMPONENTS);h&&await Fr(h),Dr(a,r.options.actionConfig,!0),Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:d,pageClass:u});let f=vc(a,c);return f=((e,t,n)=>{if(e===Cc.CASE){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=$c(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=j.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(kc(e.payload.routeKey),{...n.data,semanticURL:l,caseViewMode:j.REVIEW_MODE},f),wI.push(Dc(o,f)),Uc(wI),wI})),Ul((()=>(MI||oh(wI),wI=[],MI=!1,wI))),Kl("Error occurred"))],...OI,...vm,...[e=>{let t=0;return e.pipe(Fl(Ze),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),Ul((()=>{const e=ah()?.getState(),n=mm();return h()(e,n)&&t>0?ln.resolveActionByID(t,{}):ln.rejectActionByID(t),[]})),SI())}],...[e=>{let t=0,n=[];return e.pipe(Fl(ae),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a,o="";n||(o=_f(ke,{insightID:"{insightID}"}),o=o.replace("{insightID}",r),a=ip.getEndPointInfo(o));const{restApi:s,reqType:i}=bf(ke,{...a?.payload||[],insightID:r});return ki(dc(s,{method:i},t)).pipe(Ul((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:o,semanticURL:o},actionConfig:e,skipSemanticUrl:n}})),Kl(": Error occurred during ajax call at showPage Epic : ",e.context))})),kl((async e=>{if(e&&e.type===Ee)return n.push(Rc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Ur.getTargetViewContainerName(ne),o=mt(a,t.context),s=xc(o,a,t.context),{response:i}=e,c=Am(i);c.directUrlUpdation=!r;const l={acName:o,context:s},d=!r,u=r;await Pc(c,t,l,d,u);const p=vc(c,{target:o,context:s,containerItemID:s});p.resourceType=F.PAGE;const h=Dc(o,p);return n.push(h),Uc(n),n})),Ul((()=>{ln.resolveActionByID(t),oh(n),n=[]})),SI())}],...[e=>{let t=0,n=[];return e.pipe(Fl(oe),Ul((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=_f(Ve,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:o,reqType:s}=bf(Ve,{dashboardID:r});return ki(dc(o,{method:s},t)).pipe(Ul((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}})),Kl(": Error occurred during ajax call at showPage Epic : ",e.context))})),kl((async e=>{if(e&&e.type===Ee)return n.push(Rc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=Ur.getTargetViewContainerName(ne),o=mt(a,t.context),s=xc(o,a,t.context),{response:i}=e,c=Am(i);c.directUrlUpdation=!r;const l={acName:o,context:s},d=!r,u=r;await Pc(c,t,l,d,u);const p=vc(c,{target:o,context:s,containerItemID:s});p.resourceType=F.PAGE;const h=Dc(o,p);return n.push(h)})),Ul((()=>{ln.resolveActionByID(t),oh(n),n=[]})),SI())}]),jI=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,context:o,transientItemID:s}=r;"HTTP"!==a&&[_e,De,Se,we,Ne,Oe].includes(n)&&(Xc(o||s),vn.removeContextTreeNode(o||s)),e(t)},UI={},kI=e=>{const t=Ch.getIn(UI,[j.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=Ch.getIn(UI,[r,t],[]),o=a&&a.length>0&&a.indexOf(e);if(o>-1&&a.splice(o,1),!a||a&&0===a.length){Ch.deleteIn(UI,[r,t]);const e=Ch.getIn(UI,[r]);e&&0===Object.keys(e).length&&Ch.deleteIn(UI,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),Ch.deleteIn(UI,[j.CONTEXT,e]);const r=Ch.getIn(UI,[j.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&Ch.deleteIn(UI,[j.CONTEXT]),n.length>0&&oh(cf({dataPagesToBeRemoved:n}))},VI=(e={},t)=>{Object.keys(e).forEach((n=>{const r=Ch.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=Ch.getIn(UI,[j.CONTEXT,n]);if(Ch.getIn(UI,[e])){const r=Ch.getIn(UI,[e,t],[]);Ch.setIn(UI,[e,t],[...new Set([...r,n])])}else Ch.setIn(UI,[e,t],[n]);r?Ch.setIn(UI,[j.CONTEXT,n],[...new Set([...r,t])]):Ch.setIn(UI,[j.CONTEXT,n],[t])})(n,e,t)}))}))},BI=()=>e=>t=>{const{payload:{data:n={},context:r=null,childContainersContexts:a=[]}={},type:o}=t;if(a&&a.length>0&&(o===we||o===Se)&&a.forEach((e=>{kI(e)})),o===_e||o===ge||o===tt){const e=o===tt?n:n.shared;VI(e,r)}else o===we?(kI(r),VI(n.shared,r)):o===Se&&kI(r);e(t)},GI=e=>t=>n=>{const{type:r,payload:{target:a,containerItemID:o,context:s,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={}}={}}=n,{PUB_SUB_EVENTS:d}=F;if(r===Se){const{resourceType:t,key:n,context:r}=Ch.getIn(e.getState(),["containers",a,"items",o])||{},s={resourceType:t,key:n,context:r,containerItemID:o};Br.publish(d.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,s),a===`${F.APP.APP}/${j.PRIMARY}`&&l===j.CONTAINER_TYPE.MULTIPLE&&Br.publish(d.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===we||r===Se)&&i.forEach((e=>{Nd.cleanCaches(e)})),r!==we&&r!==Se||Nd.cleanCaches(s),t(n)},WI=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null}={},type:a}=t;!n||a!==_e&&a!==De&&a!==we&&a!==Se||(yr(n),fr(n)),r&&a===Te&&(yr(r),fr(r)),e(t)},HI=function(e){void 0===e&&(e={});var t,n=new(0,eg.constructor)(eg.schedulerActionCtor),r=new ng,a=function(a){t=a;var o=new ng,s=new ng,i=o.asObservable().pipe(Li(n)),c=new og(s.pipe(Li(n)),t.getState());return r.pipe(Ul((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})),kl((function(e){return ki(e).pipe(Fi(n),Li(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return s.next(t.getState()),o.next(n),r}}};return a.run=function(e){r.next(e)},a}(),qI=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||qf;if(null!==ah())Ih();else{const n=Wf(ym(e),t(sg.reduxBatch,function(...e){return t=>(n,r)=>{const a=t(n,r);let o=()=>{throw new Error(Uf(15))};const s={getState:a.getState,dispatch:(e,...t)=>o(e,...t)},i=e.map((e=>e(s)));return o=qf(...i)(a.dispatch),{...a,dispatch:o}}}(vl,jI,BI,WI,HI,GI),sg.reduxBatch));HI.run(FI),rh(n)}};const YI=new class{#f;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#f=!1}getNormalizedKey(e){return e?.toString().trim().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)),n=t?Ch.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(Lm("getUserSettings")){const{restApi:e,reqType:t}=bf("getUserSettings");dc(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=()=>{cp.getUserSettings()?this.userSettings=cp.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 Ch.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"));let n;if(!Lm("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=bf("updateUserSettings");const{restApi:r,reqType:a}=n;return dc(r,{method:a,body:Ch.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)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#f){this.#f=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};Br.subscribe(j.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}},KI={publishConstellationLoadedEvent:()=>{Br.publish(j.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const zI=new class{activateContainerItemOnSwitch(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:iu(t,e)};Kd({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:iu(t,e)};Kd({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=Kd({meta:{type:"PreviewViewContainer",config:{name:j.PREVIEW}},options:{context:j.APP.APP,target:"root/hybrid_preview"}}),r=n.getPConnect().getContainerManager();r.resetContainers({name:j.PRIMARY,context:j.APP.APP}),du(j.APP.APP,j.PREVIEW)||r.initializeContainers({type:"multiple",name:j.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){Kd({}).getPConnect().getContainerManager().resetContainers({name:j.PREVIEW,context:j.APP.APP})}isFormDirty(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n=Ku(t,e);return qc.isStateModified(n)}getEventUtils(){return KI}getBroadcastUtils(){return Tm}isTraditionalUICase(e){return ca(e)}};const XI=class{static openCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Md.openCase(e,t,j.PRIMARY,n)}static createCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Md.createCase(e,t,j.PRIMARY,n)}static getNextWork(e=F.APP.APP,t={}){return t.renderInline=!0,t.pageName?cp.setDefaultCasePage(t.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),t.pageName=j.PY_DETAILS),t?.disableAssignmentHeader?cp.disableAssignmentHeader(t.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Md.getNextWork(e,j.PRIMARY,t)}static openAssignment(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Md.openAssignment(e,t,j.PRIMARY,n)}static openPage(e,t,n=F.APP.APP,r={}){const a=ne;r?.defaultCasePage?cp.setDefaultCasePage(r.defaultCasePage):cp.setDefaultCasePage(j.PY_DETAILS),r?.disableAssignmentHeader?cp.disableAssignmentHeader(r.disableAssignmentHeader):cp.disableAssignmentHeader(!1);const o={viewName:e,className:t,acTargetName:j.PRIMARY,actionMgrID:ln.getNextActionMgrId(),context:n},{promise:s}=ln.actionManagerPromise(a,o.actionMgrID);return oh({type:a,payload:{...o}}),s}static getCurrentContextAPI(e,t=F.APP.APP){return Kd({meta:{config:{}},options:{context:t,pageReference:e,containerName:j.PRIMARY}}).getPConnect()}};const JI=new class{createC11nEnv=e=>Kd(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>Xt;getStateManager=()=>c;getActionCreators=()=>l;getStreamObservable=()=>a;getActionProcessor=()=>Ph;getActionHandler=()=>vh;renderApp=(e,t)=>{const n={context:j.APP.APP},r={...Ch.getIn(e,j.ROOT),options:n};qI(e),Dr(e,n,!0);const a=this.createC11nEnv({meta:r,isRoot:!0});Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const r=Am(e),{data:a,uiResources:o={}}=e,s=Ch.getIn(o,j.CONTEXT_DATA);await Pc(r,{},{},!1,!0);const i={...a,[j.CONTEXT_DATA]:s},{root:c}=o;Du(c,t,i,n)};fetchEndPointResource=(e,t,n)=>{dc(e,{method:"GET"},j.APP.ROOT).then((async e=>{const{data:r,status:a}=e;200===a&&this.updateStoreWithUiRoot(r,t,n)}))};loadComponent=async(e,t,n)=>Fr(n).then((()=>{const n=this.createC11nEnv({meta:e,isRoot:!0});ah()||qI({}),Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})}));setStaticServerUrl=(e,t,n)=>{wr.initServer(e,t,n)};loadView=async(e,t,n=[])=>{y();const r=Am(e),a=Ch.getIn(r,j.VIEWS),o=Ch.getIn(r,j.NAVIGATIONS),s=Ch.getIn(r,j.COMPONENTS)||[];s.push(...n);const i=Ch.getIn(r,j.STATIC_SERVER_URL),c=Ch.getIn(r,j.APPLICATION_DATA);a&&wp(a),o&&Mp(o),(e=>{e&&(If=e.pyLabel)})(c),i&&wr.initServer(i),await Fr(s,i).then((()=>this.renderApp(r,t)))};initAppShell=(e,t,n)=>{Ff(e),Ur.buildActionTargetMap(t),y(n)};initRoutingTable=(e,t)=>{Ff(e,!0),y(t)};setAppAlias=e=>{wr.setAppAlias(e)};getHomeRestApi=e=>{const{restApi:t}=Sf("home",{portalName:e});return E()+t};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(Mf()&&!t){const t=ap(),r=ip.processUrl(t,!0),a=ip._getMatchedRouteInRoutingTable(r)||"",o=ip.getRoutingInfo(),s=ip.processUrl(t,!1).split("/"),i=s[s.length-1];let{caseID:c}=o&&o.routes[a].payload;c=c.replace("{workID}",i),n=ip.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=ip.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,a,o)=>{const{config:{name:s}={}}=t;ah()||qI({}),o&&(Bu(`${j.APP.ROOT}/${s}`),Vu().deleteContainerItem(`${j.APP.ROOT}/${s}`)),Vu().getContainerItems()?.length>1&&!s?.startsWith("hybrid_")&&"authoring-preview"!==s&&Ih(),oh(Rh({data:{},context:j.APP.ROOT}));const i=this.createC11nEnv({meta:t,options:{context:j.APP.ROOT,pageReference:"",target:`${j.APP.ROOT}/${s}`}}),c=i.getPConnect(),l=c.getContextName(),d=c.getContainerName(),u=c.getContainerManager();pu(`${l}/${d}`)||"noPortal"===t.config?.renderingMode||u.initializeContainers({type:"single"});const p=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return Fr(p).then((()=>{Br.publish(F.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===E()&&(a=this.getHomeRestApi(t)),this.fetchEndPointResource(a,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{Lf(e)};checkIfSemanticURL=()=>Mf();onPCoreReady=e=>{Br.subscribe(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{Br.subscribe(F.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Tr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{C(e)};setFetchDefaultHeaders=e=>{gc(e)};setFetchAuthInfo=e=>{mc(e)};getCaseApi=()=>Md;getMashupApi=()=>XI;enableAppRouting=e=>{Af(e)};initStore=()=>qI({});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=Kd({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}}}};const QI=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]}};const ZI=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}};const eE=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 ZI(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false"}},tE=async()=>{const e=cp.getLocale(),t=cp.getFeatureMap().localizationVersion||1;let n;if("en-US"!==e)try{let r;2===t?r=[e]:(r=[up.GENERIC_BUNDLE_KEY,up.MESSAGE_BUNDLE_KEY,up.FIELD_LABELS_BUNDLE_KEY,...up.getCaseTypeLocaleReferences()],n=await up.isCurrentLocalePackAvailable());const a=r.map((async r=>{2===t?await(async e=>{const t=cp.getFeatureMap().availableLanguagePacks||[];if(!e||!t.includes(e))return void console.warn(`current locale ${e} is not supported by application.`);const n={locale:e},r=await wm("getLocalizationPack",{queryPayload:n});if((201===r.status||200===r.status)&&r.data){const e=r.data;Object.keys(e).forEach((t=>{up.setLocaleForRule(e[t],t)}))}})(r):n&&await(async(e,t)=>{const n=await wr.getSvcLocale(t,`${e}.json`);if(n?.ok&&e){const t=await n.json();up.setLocaleForRule(t,e)}})(r,e)}));await Promise.allSettled(a)}catch(e){console.warn(e)}},nE="@P .viewConfig";let rE=0;const aE=new class{#g(e,t,n){Ff(e),Ur.buildActionTargetMap(t),y(n)}init(e){const t=new eE(e),n={...t.environmentInfo,renderingMode:t.renderingMode};Af(t.enableRouting),qI({}),cp.setTheme(t.theme),cp.setCookieComplianceMethod(t.cookieComplianceMethod),cp.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Tr.updateFieldDefaults(t.fieldDefaults),tc.setDefaultHeaders(t.additionalHeaders),this.#g(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),wr.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),C(t.serviceConfig.googleMapKey),wr.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),up.setTimezone(t.timezone),cp.setEnvironmentInfo(n),cp.setLocale(t.locale),V.setRemoteCaseMapping(t.remoteCaseMapping),ud.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),YI.init(),t.initBroadcast&&zI.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=Kd({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}}};importReactRoot=async()=>{const e=[];return JI.getComponentsRegistry().getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.setAttribute("async",t),a.onload=n(),a.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(a)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,a)=>{const o=new URLSearchParams(t);let s=!1;"true"===n&&(s=!0);let i=null,c=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1])}else s=!1;let l=r;i&&(l=`${l}/${i}`),c&&(l=`${l}/${c}`),s&&(o.has("noPortal")||o.append("noPortal","true"),c&&a&&o.append("view",a));const d=o.toString();return l+=d?`?${d}`:"",l};initCoreConfig=e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:a,noPortal:o,noHistory:s,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:d=!0,dynamicSemanticUrl:u=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:f}=e,{appAlias:g,contextPath:m}=n;let y=window.location.origin;const I={};if(void 0!==l&&(y=l),m&&(y=`${y}${m}`),g&&"LAUNCHPAD"!==h&&(y=`${y}/${g}`),e.restServerConfig=y,!0===u){const e=this.buildSemanticUrl(r,a,o,y,i);!s&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),I.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==d&&(I.dynamicLoadComponents=!1);let E=null;if(g){const e=g.indexOf("/app/");E=e>=0?g.substring(e+1):g}if(Object.keys(I).length>0&&window.PCore.setBehaviorOverrides(I),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===cp.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),f?.cspNonce&&(window.__webpack_nonce__=f.cspNonce),this.init(e)};launchViewByName=(e,t,n,r,a,o,s,i)=>{rE+=1;const c=i||`mashup${rE}`,l={type:"RootContainer",config:{viewConfig:nE,renderingMode:"view",name:c}};JI.loadRootComponent(e,l,a,o,s).then((()=>JI.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,a,o,s)=>{rE+=1;const i="hybrid"===s?`hybrid_${rE}`:s;rE+=1;const c=i||`mashup${rE}`,l={type:"RootContainer",config:{viewConfig:nE,renderingMode:"portal",name:c}};QI.setRuntimeParams(r),JI.loadRootComponent(e,l,n,a,o).then((()=>JI.updateStoreWithUiRoot(t,c)))};launchPortal=(e,t,n,r=[])=>{rE+=1;const a=n||`portal${rE}`,o={type:"RootContainer",config:{viewConfig:nE,renderingMode:"portal",skeleton:"LoadingComponent",name:a}};r.push(o.config.skeleton),cp.isPortalLoaded=!0,JI.loadRootComponent(e,o,r).then((()=>JI.loadPortalView(t,a)))};launchMashup=(e,t=!0)=>{const r={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}JI.loadRootComponent(e,r,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&n(754)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:a,isAlternateDesignSystemEnabled:o,alternateDesignSystemName:s}=e;this.initCoreConfig(e);const i=async()=>(await this.importReactRoot(),r&&await wr.importCustomComponentMap(r),"true"===o&&"other"!==s&&await this.importDesignSystemComponentMap(n,a,s),t&&t(),!0);return new Promise(((e,t)=>{tE().then((async()=>{const t=JI.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await i()):Br.subscribe("component-map-loaded",(async()=>{e(await i())}))})).catch((e=>{t(e)}))}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess")};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")}},oE={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=bf("createViewRuleByID");return dc(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=bf("getViewRuleByID",{ID:e});return dc(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=bf("updateViewRuleByID",{ID:e});return dc(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=bf("deleteViewRuleByID",{ID:e});return dc(n,{method:r},t).then((e=>e.data))}},sE={"Content-Type":"application/json"},iE={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return wm("addCaseFollower",{body:a,queryPayload:r,headers:sE},n)},deleteCaseFollower:(e,t,n)=>wm("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>wm("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},cE={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return wm("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>wm("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>wm("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},lE="operatorDetails",dE={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=bf(lE,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return wm(lE,{queryPayload:t})}return t?wm("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):wm(lE,{body:{dataViewParameters:{ID:e}}})}},uE=async e=>{const t=Am(e),n=Ch.getIn(t,j.COMPONENTS);Dr(t,{},!0);const r=Ch.getIn(t,j.LOCALE_REFERENCES);await up.loadLocaleResources(r||[]),await Fr(n)},pE=(e,t,n)=>Nh.resolveView(e,t,n),hE={"Content-Type":"application/json"};const fE=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,o,s)=>{const{getLocaleValue:i}=up;s||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";s&&(l=o.getValue("pulse.pageLastEntry"));const d={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<a.length;e+=1)a[e].cancel();const u=Fm();return a.push(u),wm("getFeedMessages",{queryPayload:d,cancelTokenSource:u},o.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 uE({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(s&&o.getValue("pulse.messageIDs")){let r=o.getValue("pulse.messageIDs"),a=o.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)}))})),o.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}})}else o.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}});const l=[...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:l}}return o.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{jm(e)||o.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,a)=>{const o=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return wm("postFeedMessages",{body:o,headers:hE},a.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const o=t?.data;if(r){o.parentMessageID=e;const{pxResults:t,caseMentions:s}=this.buildMessageObject(o,r,a,n.length>0);return a.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),s}const{messages:s,messageIDs:i,caseMentions:c}=this.buildMessageObject(o,r,a,n.length>0);return a.updateState({pulse:{messages:s,messageIDs:i}}),c}return a.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{a.reportError(": Error occurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:a=!1})=>{const o=JSON.stringify({message:n});return wm("editFeedMessage",{queryPayload:{messageID:e},body:o,headers:hE},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:o}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),o}const{messages:o,caseMentions:s}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:o}}),s}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error occurred 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"},o=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(o)?.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 s=n.getValue("pulse.messageIDs");if(s){const e=s.includes(a.ID)?{...o[a.ID],...a}:a,t={...o,[a.ID]:e};return{messages:t,messageIDs:s.includes(a.ID)?s:[a.ID,...s],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 o=t?"unlikeFeedMessages":"likeFeedMessages",s=JSON.stringify({ContextClass:e});wm(o,{body:s,queryPayload:{pulseContext:e},headers:hE},a.getContextName()).then((o=>{if(200===o.status)if(r){const r=a.getValue(`pulse.messages.${n}`),o=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:o}}}})}else{const r={...a.getValue(`pulse.messages.${n}`)},o=r.pyLikes?r.pyLikes.pxLikeCount:0;let s=0,i=!1;t?(s=o-1,i=!1):(s=o+1,i=!0),r.pyLikes={pxLikeCount:s,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:r}}})}else a.reportError(`likeMessage call failed with status ${o.status}`,o)})).catch((e=>{a.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n);wm("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 occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>wm("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error occurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:a,listSize:o=5}=e,s={pulseContext:n,searchFor:r,mentionsType:a,listSize:o};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Fm();return this.mentionsTagsCancelTokenSource.push(i),wm("getMentionSuggestions",{queryPayload:s,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=>{jm(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>wm("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error occurred 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 o=Fm();return this.mentionsTagsCancelTokenSource.push(o),wm("getTagSuggestions",{queryPayload:a,cancelTokenSource:o},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=>{jm(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},gE={getTaggedCases:(e,t)=>wm("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>wm("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return wm("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>wm("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>hd.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},mE=(e,t)=>{Gu(t.getContextName(),e.etag),Wu(t.getContextName(),e.etag)},yE={getParticipants:(e,t)=>wm("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>wm("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>wm("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>wm("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,r)=>{const a={caseID:e},o={...n,participantRoleID:t},s={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{wm("createParticipant",{body:o,queryPayload:a,headers:s},r.getContextName()).then((t=>{mE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at createParticipant API : ",e.response),t(e.response)}))}))},updateParticipant:async(e,t,n,r)=>{const a={caseID:e,participantID:t},o={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{wm("updateParticipant",{body:n,queryPayload:a,headers:o},r.getContextName()).then((t=>{mE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at updateParticipant API : ",e.response),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{wm("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((t=>{mE(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function IE(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const EE="create",AE="update",CE="delete";function _E(e,t,n,r){const a=Vp(t);if(a){switch(e){case EE:case AE:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case CE:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const SE={},bE=e=>{const t=Vp(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=IE(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=bf("getUIListPersonalizations",{listID:e});return dc(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:IE(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},NE=(e,t,n)=>{const{restApi:r,reqType:a}=bf("createListPersonalization",{listID:e});return _E(EE,e,t,n),dc(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return SE[t]=n,e}))},vE=(e,t,n)=>{const r=SE[t]||t;_E(AE,e,t,n);const{restApi:a,reqType:o}=bf("updateListPersonalization",{listID:e,personalizationID:r})||{};return dc(a,{method:o,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},PE=(e,t)=>{const n=SE[t]||t;_E(CE,e,t);const{restApi:r,reqType:a}=bf("deleteListPersonalization",{listID:e,personalizationID:n});return dc(r,{method:a,body:{}}).then((e=>(SE[t]&&delete SE[t],e)))};const TE=function(e){return e?{createPersonalization:NE.bind(null,e),updatePersonalization:vE.bind(null,e),deletePersonalization:PE.bind(null,e),fetchPersonalizations:bE.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},$E="getDataObjects",OE="getInsightByID",RE=["LocalList","RemoteList","PromptList","DataPage"];let DE=null;const xE={},wE=e=>rd.getAppCacheKey(`PrimaryFields-${e}`);function ME(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 LE={getDataObjects:function(){const e=rd.getAppCacheKey($E);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=bf($E,{}),r=dc(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(DE)return DE;const t=rd.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=bf("getDataPages",{datapageRequestType:"explorable"});return DE=dc(n,{method:r,datapageRequestType:"explorable"}),DE.then((e=>{DE=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),DE},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=kp(e);if(t&&t.classID){let e=Gp(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!Ch.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=xp(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields),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&&RE.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:ME(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return bd.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=rd.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}=bf("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=dc(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=kp(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=rd.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const a=rd.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=rd.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=rd.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:a,classesToFetch:o,isTopLevelClassPresent:s,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let a=!1;const o=[],s=[];return e&&s.push(e),t&&t.length>0&&s.push(...t),s.forEach((t=>{const s=wE(t);window.sessionStorage.getItem(s)||(xE[t]?r.push(xE[t]):(n.push(t),t===e?a=!0:o.push(t)))})),{allClasses:s,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:a,joinedClassesToFetch:o}}(e,n);return o.length&&a.push((async(e,t,n,r)=>{const a=rd.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=wE(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete xE[e]}))}));return e.forEach((e=>{xE[e]=a})),a})(o,s?e:void 0,s?t:void 0,i.length>0?i:void 0)),Promise.allSettled(a).then((()=>{const e={};return r.forEach((t=>{const n=wE(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(window.sessionStorage.getItem(n))}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=bf("getInsightIDs");return dc(e,{method:t})},getInsightByID:function(e){const t=Bp(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=bf(OE,n);return dc(r,{method:a})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=bf(OE,t);return dc(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=bf("createInsight");return dc(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=bf("updateInsight",n),o=t.UpdateDateTime;return dc(r,{method:a,body:JSON.stringify(t),headers:{"if-match":o,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=bf("deleteInsight",t);return dc(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=bf("exportToExcel");return dc(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=bf("exportToCSV");return dc(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=bf("scheduleInsight",n);return dc(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:o}=bf("updateScheduledInsight",r);return dc(a,{method:o,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=bf("deleteScheduledInsight",n);return dc(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=bf("translateStrings");return dc(t,{method:n,body:JSON.stringify(e)})}};const FE=new class{addRoutes=e=>{return t=e,void ip.addRoutes(t);var t}};const jE=class{static registerModule(e,t,n){n[e]=()=>t}};const UE=class{static getCaseEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)},kE={getResolvedSemanticURL:(e,t,n)=>ip.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:Be,ACTION_SHOWDATA:Ue,ACTION_SHOWVIEW:je}),updateSemanticURLAndDocumentTitle:e=>ip.updateSemanticURLAndDocumentTitle(e)};const VE=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},BE={setTokens:e=>{mc({tokenInfo:e}),gc(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>Br.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Wi(),getAuthInstance:e=>Gi.init(e),setAuthorizationHeader:e=>{gc({Authorization:e}),setTimeout((()=>Br.publish("updateSession",{updateStatus:"success"})),0)}};const GE=new class{getDebouncedSubject(e){return(new ng).pipe(RI(e))}};Or.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=up.getLocaleValue("Enter a valid email address","Messages")),t})),Or.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=up.getLocaleValue("Invalid number","Messages")),t})),Or.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?up.getLocaleValue("Cannot be blank","Messages"):null)),Or.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=up.getLocaleValue("Enter a valid url","Messages")),t})),setTimeout((()=>{const e=up.getLocaleValue("Enter a valid phone number","Messages");Promise.resolve().then(n.bind(n,654)).then((({parsePhoneNumberFromString:t})=>{Or.register("phone",(n=>{let r=null;n&&!/^\+?\d+$/.test(n)&&(r=e);const a=n?.startsWith("+");if(n&&a){const a=t(n);a?.isPossible()&&n===a?.number||(r=e)}return r}))}))}),j.PRIORITY.TRIVIAL);const WE=(e,t)=>{switch(t){case"invalid":return up.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return up.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};Or.register("datetime",(e=>WE("DateTime",e))),Or.register("date",(e=>WE("Date",e))),Or.register("time",(e=>WE("Time",e))),Or.register("attachment",((e,t)=>(lh(`.attachmentsList${t.pageReference?.replace("caseInfo.content","")}${t.property}`,"context_data",t.context)||[]).some((e=>e.props?.error))?up.getLocaleValue("Error with one or more files"):null));const HE={createConversation:(e,t,n,r=[])=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=Fm();r.push(a);const o={assistantID:t},s=JSON.stringify({contextID:e});return wm("createConversation",{body:s,cancelTokenSource:a,queryPayload:o},n).then((e=>(r.pop(),e)))},sendMessage:(e,t,n,r)=>{const a={assistantID:e,conversationID:t},o=JSON.stringify({request:n});return wm("sendMessage",{body:o,queryPayload:a},r)}};const qE=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=cp.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class YE{constructor(){YE.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"24.2.2";onPCoreReady=e=>JI.onPCoreReady(e);onPCoreCleanup=e=>JI.onPCoreCleanup(e);getComponentsRegistry=()=>JI.getComponentsRegistry();checkIfSemanticURL=()=>JI.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(Mf()){const e=ip.processUrl(ap(),!0);return!!ip._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>FE;getViewResources=()=>u;configureForBrowserBookmark=e=>JI.configureForBrowserBookmark(e);getStore=()=>ah();resetStore=()=>Ih();getMessageManager=()=>Qn;getCoexistenceManager=()=>zI;getStoreValue=(e,t,n)=>lh(e,t,n);getContainerUtils=()=>s;getAnnotationUtils=()=>cl;getFieldUtils=()=>kn;getFieldDefaultUtils=()=>Tr;getAssetLoader=()=>wr;getAttachmentUtils=()=>Ap;getViewRuleApi=()=>oE;getFeedUtils=()=>fE;getTagUtils=()=>gE;getGenAIAssistantUtils=()=>HE;getStakeholderUtils=()=>yE;getUserApi=()=>dE;getCaseFollowerApi=()=>iE;getCaseUtils=()=>Ac;getStateUtils=()=>jd;getRelatedCasesApi=()=>cE;getPersonalizationUtils=TE;getDataApi=()=>bd;getDataApiUtils=()=>rd;getAnalyticsUtils=()=>LE;getLocaleUtils=()=>up;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{YE.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{YE.behaviorOverrides[e]=t};getBehaviorOverrides=()=>YE.behaviorOverrides;getBehaviorOverride=e=>YE.behaviorOverrides[e];getAsynchronousUtils=()=>GE;createPConnect=e=>Kd(e);getPubSubUtils=()=>Br;registerComponentCreator=e=>{zd(e)};getConstants=()=>Object.freeze(F);getEvents=()=>UE;getRestClient=()=>d;getMashupApi=()=>XI;getEnvironmentInfo=()=>cp;getRuntimeParamsAPI=()=>QI;getSemanticUrlUtils=()=>kE;getRemoteCaseUtils=()=>V;getNavigationUtils=()=>YI;registerModule=(e,t)=>jE.registerModule(e,t,this);getErrorHandler=()=>VE;getFormUtils=()=>qc;getMessagingServiceManager=()=>ud;getMetadataUtils=()=>i;getDataPageUtils=()=>hd;getDataTypeUtils=()=>wl;getCascadeManager=()=>eh;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>BE;getDebugger=()=>ec;getDeferLoadManager=()=>td;getExpressionEngine=()=>r;getActionsSequencer=()=>Pd;getRefreshManager=()=>ul;getInitialiser=()=>aE;getAllStateMachines=(e,t,n)=>t&&n?Yc.getAllStateMachines(e,t,n):Yc.getAllStateMachinesByContext(e);getBootstrapUtils=()=>JI;getContextTreeManager=()=>vn;getAccessPrivilege=()=>qE.getInstance()}const KE=new YE;n.g.PCore=KE})()})();
1
+ (()=>{var e={188:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,s="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,l=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,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")();var m,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=y["__core-js_shared__"],_=(m=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",S=E.toString,N=A.hasOwnProperty,T=A.toString,b=RegExp("^"+S.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=y.Symbol,P=I.splice,D=k(y,"Map"),R=k(Object,"create"),$=O?O.prototype:void 0,v=$?$.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 F(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return d.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:V(n);for(var r=0,a=t.length;null!=e&&r<a;)e=e[B(t[r++])];return r&&r==a?e:void 0}function j(e){if(!H(e)||(t=e,_&&_ in t))return!1;var t,n=function(e){var t=H(e)?T.call(e):"";return t==s||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}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 k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}x.prototype.clear=function(){this.__data__=R?R(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(R){var n=t[e];return n===r?void 0:n}return N.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return R?void 0!==t[e]:N.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=R&&void 0===t?r: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():P.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(D||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 V=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return v?v.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-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 W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&T.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},216:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=1,s=2,o=9007199254740991,i="[object Arguments]",c="[object Array]",d="[object AsyncFunction]",l="[object Boolean]",u="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",y="[object Number]",m="[object Null]",I="[object Object]",E="[object Promise]",A="[object Proxy]",C="[object RegExp]",_="[object Set]",S="[object String]",N="[object Symbol]",T="[object Undefined]",b="[object WeakMap]",O="[object ArrayBuffer]",P="[object DataView]",D=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$[i]=$[c]=$[O]=$[l]=$[P]=$[u]=$[p]=$[h]=$[f]=$[y]=$[I]=$[C]=$[_]=$[S]=$[b]=!1;var v="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,x="object"==typeof self&&self&&self.Object===Object&&self,w=v||x||Function("return this")(),M=t&&!t.nodeType&&t,L=M&&e&&!e.nodeType&&e,F=L&&L.exports===M,j=F&&v.process,U=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=U&&U.isTypedArray;function V(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 B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,J=w["__core-js_shared__"],X=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?w.Buffer:void 0,re=w.Symbol,ae=w.Uint8Array,se=K.propertyIsEnumerable,oe=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,de=ne?ne.isBuffer:void 0,le=(H=Object.keys,q=Object,function(e){return H(q(e))}),ue=Ue(w,"DataView"),pe=Ue(w,"Map"),he=Ue(w,"Promise"),ge=Ue(w,"Set"),fe=Ue(w,"WeakMap"),ye=Ue(Object,"create"),me=Ge(ue),Ie=Ge(pe),Ee=Ge(he),Ae=Ge(ge),Ce=Ge(fe),_e=re?re.prototype:void 0,Se=_e?_e.valueOf:void 0;function Ne(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 Te(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 be(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 Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new be;++t<n;)this.add(e[t])}function Pe(e){var t=this.__data__=new Te(e);this.size=t.size}function De(e,t){var n=qe(e),r=!n&&He(e),a=!n&&!r&&ze(e),s=!n&&!r&&!a&&Qe(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)!t&&!Q.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Be(d,c))||i.push(d);return i}function Re(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function $e(e){return null==e?void 0===e?T:m:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var a=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return a}(e):function(e){return ee.call(e)}(e)}function ve(e){return Xe(e)&&$e(e)==i}function xe(e,t,n,r,o){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,r,o,d){var h=qe(e),g=qe(t),m=h?c:Ve(e),E=g?c:Ve(t),A=(m=m==i?I:m)==I,T=(E=E==i?I:E)==I,b=m==E;if(b&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(b&&!A)return d||(d=new Pe),h||Qe(e)?Le(e,t,n,r,o,d):function(e,t,n,r,o,i,c){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!i(new ae(e),new ae(t)));case l:case u:case y:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case C:case S:return e==t+"";case f:var d=B;case _:var h=r&a;if(d||(d=G),e.size!=t.size&&!h)return!1;var g=c.get(e);if(g)return g==t;r|=s,c.set(e,t);var m=Le(d(e),d(t),r,o,i,c);return c.delete(e),m;case N:if(Se)return Se.call(e)==Se.call(t)}return!1}(e,t,m,n,r,o,d);if(!(n&a)){var D=A&&Q.call(e,"__wrapped__"),R=T&&Q.call(t,"__wrapped__");if(D||R){var $=D?e.value():e,v=R?t.value():t;return d||(d=new Pe),o($,v,n,r,d)}}if(!b)return!1;return d||(d=new Pe),function(e,t,n,r,s,o){var i=n&a,c=Fe(e),d=c.length,l=Fe(t),u=l.length;if(d!=u&&!i)return!1;var p=d;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var g=o.get(e);if(g&&o.get(t))return g==t;var f=!0;o.set(e,t),o.set(t,e);var y=i;for(;++p<d;){var m=e[h=c[p]],I=t[h];if(r)var E=i?r(I,m,h,t,e,o):r(m,I,h,e,t,o);if(!(void 0===E?m===I||s(m,I,n,r,o):E)){f=!1;break}y||(y="constructor"==h)}if(f&&!y){var A=e.constructor,C=t.constructor;A==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof C&&C instanceof C||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,d)}(e,t,n,r,xe,o))}function we(e){return!(!Je(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:D).test(Ge(e))}function Me(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return le(e);var t,n,r,a=[];for(var s in Object(e))Q.call(e,s)&&"constructor"!=s&&a.push(s);return a}function Le(e,t,n,r,o,i){var c=n&a,d=e.length,l=t.length;if(d!=l&&!(c&&l>d))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,h=!0,g=n&s?new Oe:void 0;for(i.set(e,t),i.set(t,e);++p<d;){var f=e[p],y=t[p];if(r)var m=c?r(y,f,p,t,e,i):r(f,y,p,e,t,i);if(void 0!==m){if(m)continue;h=!1;break}if(g){if(!V(t,(function(e,t){if(a=t,!g.has(a)&&(f===e||o(f,e,n,r,i)))return g.push(t);var a}))){h=!1;break}}else if(f!==y&&!o(f,y,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Fe(e){return function(e,t,n){var r=t(e);return qe(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,Ze,ke)}function je(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 Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return we(n)?n:void 0}Ne.prototype.clear=function(){this.__data__=ye?ye(null):{},this.size=0},Ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ne.prototype.get=function(e){var t=this.__data__;if(ye){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Ne.prototype.has=function(e){var t=this.__data__;return ye?void 0!==t[e]:Q.call(t,e)},Ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ye&&void 0===t?r:t,this},Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=Re(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Te.prototype.get=function(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]},Te.prototype.has=function(e){return Re(this.__data__,e)>-1},Te.prototype.set=function(e,t){var n=this.__data__,r=Re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new Ne,map:new(pe||Te),string:new Ne}},be.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return je(this,e).get(e)},be.prototype.has=function(e){return je(this,e).has(e)},be.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Oe.prototype.add=Oe.prototype.push=function(e){return this.__data__.set(e,r),this},Oe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Te,this.size=0},Pe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Te){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?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,n,e)&&(s[a++]=o)}return s}(ce(e),(function(t){return se.call(e,t)})))}:function(){return[]},Ve=$e;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(ue&&Ve(new ue(new ArrayBuffer(1)))!=P||pe&&Ve(new pe)!=f||he&&Ve(he.resolve())!=E||ge&&Ve(new ge)!=_||fe&&Ve(new fe)!=b)&&(Ve=function(e){var t=$e(e),n=t==I?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case me:return P;case Ie:return f;case Ee:return E;case Ae:return _;case Ce:return b}return t});var He=ve(function(){return arguments}())?ve:function(e){return Xe(e)&&Q.call(e,"callee")&&!se.call(e,"callee")},qe=Array.isArray;var ze=de||function(){return!1};function Ye(e){if(!Je(e))return!1;var t=$e(e);return t==h||t==g||t==d||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Xe(e)&&Ke(e.length)&&!!$[$e(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?De(e):Me(e);var t}e.exports=function(e,t){return xe(e,t)}},458:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=458,e.exports=t},521:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,s="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,l=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,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")();var m,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=y["__core-js_shared__"],_=(m=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",S=E.toString,N=A.hasOwnProperty,T=A.toString,b=RegExp("^"+S.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=y.Symbol,P=I.splice,D=V(y,"Map"),R=V(Object,"create"),$=O?O.prototype:void 0,v=$?$.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 F(e){if(!z(e)||(t=e,_&&_ in t))return!1;var t,n=function(e){var t=z(e)?T.call(e):"";return t==s||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:U(t)).length;null!=e&&n<r;)e=e[W(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=B(t,e)?[t]:U(t));var n,r,a=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&N.call(e,a))||delete e[a]}function U(e){return q(e)?e:G(e)}function k(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 V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(d.test(e)||!c.test(e)||null!=t&&e in Object(t))}x.prototype.clear=function(){this.__data__=R?R(null):{}},x.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},x.prototype.get=function(e){var t=this.__data__;if(R){var n=t[e];return n===r?void 0:n}return N.call(t,e)?t[e]:void 0},x.prototype.has=function(e){var t=this.__data__;return R?void 0!==t[e]:N.call(t,e)},x.prototype.set=function(e,t){return this.__data__[e]=R&&void 0===t?r: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():P.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(D||w),string:new x}},M.prototype.delete=function(e){return k(this,e).delete(e)},M.prototype.get=function(e){return k(this,e).get(e)},M.prototype.has=function(e){return k(this,e).has(e)},M.prototype.set=function(e,t){return k(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return v?v.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(u,(function(e,t,r,a){n.push(r?a.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function H(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(H.Cache||M),n}H.Cache=M;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&T.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},529:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,a="[object Arguments]",s="[object Function]",o="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",d="[object Set]",l="[object WeakMap]",u="[object DataView]",p=/^\[object .+?Constructor\]$/,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=t&&!t.nodeType&&t,m=y&&e&&!e.nodeType&&e,I=m&&m.exports===y;var E,A,C,_=Function.prototype,S=Object.prototype,N=f["__core-js_shared__"],T=(E=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",b=_.toString,O=S.hasOwnProperty,P=S.toString,D=RegExp("^"+b.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=I?f.Buffer:void 0,$=S.propertyIsEnumerable,v=R?R.isBuffer:void 0,x=(A=Object.keys,C=Object,function(e){return A(C(e))}),w=q(f,"DataView"),M=q(f,"Map"),L=q(f,"Promise"),F=q(f,"Set"),j=q(f,"WeakMap"),U=!$.call({valueOf:1},"valueOf"),k=Y(w),V=Y(M),B=Y(L),G=Y(F),W=Y(j);function H(e){if(!ee(e)||function(e){return!!T&&T 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)?D:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return P.call(e)};function Y(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&X(e)}(e)&&O.call(e,"callee")&&(!$.call(e,"callee")||P.call(e)==a)}(w&&z(new w(new ArrayBuffer(1)))!=u||M&&z(new M)!=i||L&&z(L.resolve())!=c||F&&z(new F)!=d||j&&z(new j)!=l)&&(z=function(e){var t=P.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case k:return u;case V:return i;case B:return c;case G:return d;case W:return l}return t});var J=Array.isArray;function X(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=v||function(){return!1};function Z(e){var t=ee(e)?P.call(e):"";return t==s||t==o}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(X(e)&&(J(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==d)return!e.size;if(U||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||S)}(e))return!x(e).length;for(var n in e)if(O.call(e,n))return!1;return!0}},631:(e,t,n)=>{var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,u=d||l||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var a=e.length,s=n+(r?1:-1);for(;r?s--:++s<a;)if(t(e[s],s,e))return s;return-1}(e,f,n);var r=n-1,a=e.length;for(;++r<a;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,a=e?e.length:0;++r<a;)if(n(t,e[r]))return!0;return!1}function g(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function f(e){return e!=e}function y(e,t){return e.has(t)}var m,I=Array.prototype,E=Function.prototype,A=Object.prototype,C=u["__core-js_shared__"],_=(m=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",S=E.toString,N=A.hasOwnProperty,T=A.toString,b=RegExp("^"+S.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=u.Symbol,P=A.propertyIsEnumerable,D=I.splice,R=O?O.isConcatSpreadable:void 0,$=Math.max,v=G(u,"Map"),x=G(Object,"create");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){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new L;++t<n;)this.add(e[t])}function j(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 U(e,t,n,r){var a,s=-1,o=p,i=!0,c=e.length,d=[],l=t.length;if(!c)return d;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(t,(a=n,function(e){return a(e)}))),r?(o=h,i=!1):t.length>=200&&(o=y,i=!1,t=new F(t));e:for(;++s<c;){var u=e[s],g=n?n(u):u;if(u=r||0!==u?u:0,i&&g==g){for(var f=l;f--;)if(t[f]===g)continue e;d.push(u)}else o(t,g,r)||d.push(u)}return d}function k(e,t,n,r,a){var s=-1,o=e.length;for(n||(n=W),a||(a=[]);++s<o;){var i=e[s];t>0&&n(i)?t>1?k(i,t-1,n,r,a):g(a,i):r||(a[a.length]=i)}return a}function V(e){if(!Q(e)||(t=e,_&&_ in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:c;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(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 G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return V(n)?n:void 0}function W(e){return Y(e)||function(e){return J(e)&&N.call(e,"callee")&&(!P.call(e,"callee")||T.call(e)==s)}(e)||!!(R&&e&&e[R])}w.prototype.clear=function(){this.__data__=x?x(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return N.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:N.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return j(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(v||M),string:new w}},L.prototype.delete=function(e){return B(this,e).delete(e)},L.prototype.get=function(e){return B(this,e).get(e)},L.prototype.has=function(e){return B(this,e).has(e)},L.prototype.set=function(e,t){return B(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return J(e)?U(e,k(t,1,J,!0)):[]},q=$(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=$(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var a=Array(q+1);++t<q;)a[t]=e[t];return a[q]=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)}(H,this,a)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}(e.length)&&!X(e)}function J(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function X(e){var t=Q(e)?T.call(e):"";return t==o||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},692:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",d="[object Null]",l="[object Object]",u="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[s]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[i]=f["[object Map]"]=f["[object Number]"]=f[l]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,I=y||m||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,C=A&&A.exports===E,_=C&&y.process,S=function(){try{var e=A&&A.require&&A.require("util").types;return e||_&&_.binding&&_.binding("util")}catch(e){}}(),N=S&&S.isTypedArray;var T,b,O,P=Array.prototype,D=Function.prototype,R=Object.prototype,$=I["__core-js_shared__"],v=D.toString,x=R.hasOwnProperty,w=(T=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",M=R.toString,L=v.call(Object),F=RegExp("^"+v.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=C?I.Buffer:void 0,U=I.Symbol,k=I.Uint8Array,V=j?j.allocUnsafe:void 0,B=(b=Object.getPrototypeOf,O=Object,function(e){return b(O(e))}),G=Object.create,W=R.propertyIsEnumerable,H=P.splice,q=U?U.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,J=Date.now,X=Ee(I,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!$e(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(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 te(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 ne(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 re(e){var t=this.__data__=new te(e);this.size=t.size}function ae(e,t){var n=be(e),r=!n&&Te(e),a=!n&&!r&&Pe(e),s=!n&&!r&&!a&&xe(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)!t&&!x.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Ae(d,c))||i.push(d);return i}function se(e,t,n){(void 0!==n&&!Ne(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function oe(e,t,n){var r=e[t];x.call(e,t)&&Ne(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(Ne(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return x.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:x.call(t,e)},ee.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},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(X||te),string:new ee}},ne.prototype.delete=function(e){var t=Ie(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return Ie(this,e).get(e)},ne.prototype.has=function(e){return Ie(this,e).has(e)},ne.prototype.set=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!X||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var de,le=function(e,t,n){for(var r=-1,a=Object(e),s=n(e),o=s.length;o--;){var i=s[de?o:++r];if(!1===t(a[i],i,a))break}return e};function ue(e){return null==e?void 0===e?p:d:q&&q in Object(e)?function(e){var t=x.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var a=M.call(e);r&&(t?e[q]=n:delete e[q]);return a}(e):function(e){return M.call(e)}(e)}function pe(e){return ve(e)&&ue(e)==s}function he(e){return!(!$e(e)||function(e){return!!w&&w in e}(e))&&(De(e)?F:h).test(function(e){if(null!=e){try{return v.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!$e(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ce(e),n=[];for(var r in e)("constructor"!=r||!t&&x.call(e,r))&&n.push(r);return n}function fe(e,t,n,r,a){e!==t&&le(t,(function(s,o){if(a||(a=new re),$e(s))!function(e,t,n,r,a,s,o){var i=_e(e,n),c=_e(t,n),d=o.get(c);if(d)return void se(e,n,d);var u=s?s(i,c,n+"",e,t,o):void 0,p=void 0===u;if(p){var h=be(c),g=!h&&Pe(c),f=!h&&!g&&xe(c);u=c,h||g||f?be(i)?u=i:ve(A=i)&&Oe(A)?u=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):g?(p=!1,u=function(e,t){if(t)return e.slice();var n=e.length,r=V?V(n):new e.constructor(n);return e.copy(r),r}(c,!0)):f?(p=!1,y=c,m=!0?(I=y.buffer,E=new I.constructor(I.byteLength),new k(E).set(new k(I)),E):y.buffer,u=new y.constructor(m,y.byteOffset,y.length)):u=[]:function(e){if(!ve(e)||ue(e)!=l)return!1;var t=B(e);if(null===t)return!0;var n=x.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&v.call(n)==L}(c)||Te(c)?(u=i,Te(i)?u=function(e){return function(e,t,n,r){var a=!n;n||(n={});var s=-1,o=t.length;for(;++s<o;){var i=t[s],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),a?ce(n,i,c):oe(n,i,c)}return n}(e,we(e))}(i):$e(i)&&!De(i)||(u=function(e){return"function"!=typeof e.constructor||Ce(e)?{}:Z(B(e))}(c))):p=!1}var y,m,I,E;var A;p&&(o.set(c,u),a(u,c,r,s,o),o.delete(c));se(e,n,u)}(e,t,o,n,fe,r,a);else{var i=r?r(_e(e,o),s,o+"",e,t,a):void 0;void 0===i&&(i=s),se(e,o,i)}}),we)}function ye(e,t){return Se(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,s=K(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,t,Fe),e+"")}var me=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Fe;function Ie(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 Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&g.test(e))&&e>-1&&e%1==0&&e<t}function Ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||R)}function _e(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Se=function(e){var t=0,n=0;return function(){var r=J(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(me);function Ne(e,t){return e===t||e!=e&&t!=t}var Te=pe(function(){return arguments}())?pe:function(e){return ve(e)&&x.call(e,"callee")&&!W.call(e,"callee")},be=Array.isArray;function Oe(e){return null!=e&&Re(e.length)&&!De(e)}var Pe=Y||function(){return!1};function De(e){if(!$e(e))return!1;var t=ue(e);return t==i||t==c||t==o||t==u}function Re(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function $e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ve(e){return null!=e&&"object"==typeof e}var xe=N?function(e){return function(t){return e(t)}}(N):function(e){return ve(e)&&Re(e.length)&&!!f[ue(e)]};function we(e){return Oe(e)?ae(e,!0):ge(e)}var Me,Le=(Me=function(e,t,n,r){fe(e,t,n,r)},ye((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=Me.length>3&&"function"==typeof a?(r--,a):void 0,s&&function(e,t,n){if(!$e(n))return!1;var r=typeof t;return!!("number"==r?Oe(n)&&Ae(t,n.length):"string"==r&&t in n)&&Ne(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&&Me(e,o,n,a)}return e})));function Fe(e){return e}e.exports=Le},835:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,s=9007199254740991,o="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,I=y||m||Function("return this")();var E,A=Array.prototype,C=Function.prototype,_=Object.prototype,S=I["__core-js_shared__"],N=(E=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",T=C.toString,b=_.hasOwnProperty,O=_.toString,P=RegExp("^"+T.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=I.Symbol,R=A.splice,$=G(I,"Map"),v=G(Object,"create"),x=D?D.prototype:void 0,w=x?x.toString:void 0;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){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(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 j(e,t,n){var r=e[t];b.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function U(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function k(e){if(!J(e)||(t=e,N&&N in t))return!1;var t,n=function(e){var t=J(e)?O.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:g;return n.test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t,n,r){if(!J(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||X(e))return!0;return l.test(e)||!d.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var a=-1,s=t.length,o=s-1,i=e;null!=i&&++a<s;){var c=q(t[a]),u=n;if(a!=o){var p=i[c];void 0===(u=r?r(p,c,i):void 0)&&(u=J(p)?p:W(t[a+1])?[]:{})}j(i,c,u),i=i[c]}return e}function B(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 G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}M.prototype.clear=function(){this.__data__=v?v(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return n===r?void 0:n}return b.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:b.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return U(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new M,map:new($||L),string:new M}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(X(e))return w?w.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(p,(function(e,t,r,a){n.push(r?a.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||X(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function z(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(z.Cache||F),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=F;var K=Array.isArray;function J(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function X(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&O.call(e)==c}e.exports=function(e,t,n){return null==e?e:V(e,t,n)}},866:(e,t,n)=>{"use strict";n.d(t,{parsePhoneNumberFromString:()=>ct});const r={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(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|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]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\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])|[34]\\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-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|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]|2[23]"],"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|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-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","(?:01\\d|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?: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))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\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-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\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","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],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-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|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])|9(?:0[25]|42))[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(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[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-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|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]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\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{2})(\\d{4})","$1 $2 $3",["2"],"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"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"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,12],[["(\\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{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\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(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[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[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|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(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|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(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"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])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\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-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|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,10,11,12],[["(\\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]|3[13])"],"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",["(?:19|[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|180020",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|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|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|180020","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|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"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))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\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","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{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-589]\\d{7}",[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]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\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|180020","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,11}|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,12],[["(\\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",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|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[2356]|[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]],["3[2-8]\\d{9,10}",[11,12]],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|180020","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|427|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",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-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",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"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",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,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,"33622|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",["3"],"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-6]|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","(?:[2457]\\d|33|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|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|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-8]|5[0-5]|8[0-7]))\\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|7090)\\d{5}|(?: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))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\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",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"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|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"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","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\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","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],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|8\\d\\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[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"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[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|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,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"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","(?:[15]\\d|800|92)\\d{7}",[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{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,12],[["(\\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]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\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-9]"]]]],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-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"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|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-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)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|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[013-79]|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-57-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-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|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-3589]|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}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\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-9]\\d)\\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,12],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|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\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","7093\\d{5}|(?: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])|7093[5-7])\\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|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"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}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],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,["348[57]\\d{7}",[11]],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 a={}.constructor;function s(e){return null!=e&&e.constructor===a}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(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 c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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,i=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){d=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(d)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.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)?l(e,t):void 0}}(e,t)||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.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t,n,r,a=d(Array.prototype.slice.call(e),4),o=a[0],l=a[1],u=a[2],p=a[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,l&&"string"!=typeof l){if(!s(l))throw new Error("Invalid second argument: ".concat(l));u?(n=l,r=u):r=l}else p?(n=u,r=p):(n=void 0,r=u),l&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:l},n));return{text:t,options:n,metadata:r}}var p=2,h=17,g=3,f="0-90-9٠-٩۰-۹",y="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function m(e){return m="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},m(e)}function I(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,E(r.key),r)}}function E(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==m(t)?t:t+""}function A(e,t,n){return t=N(t),function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],N(e).constructor):t.apply(e,n))}function C(e){var t="function"==typeof Map?new Map:void 0;return C=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;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,n)}function n(){return function(e,t,n){if(_())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&S(a,n.prototype),a}(e,arguments,N(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),S(n,e)},C(e)}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}var T=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=A(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return 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&&S(e,t)}(t,e),n=t,r&&I(n.prototype,r),a&&I(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a}(C(Error));function b(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 O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(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 R(e,t,n){return t&&D(e.prototype,t),n&&D(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $(e){var t=function(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==O(t)?t:t+""}var v=" ext. ",x=/^\d+$/,w=function(){return R((function e(t){P(this,e),k(t),this.metadata=t,G.call(this,t)}),[{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&&x.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new M(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new M(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}}])}(),M=function(){return R((function e(t,n){P(this,e),this.globalMetadataObject=n,this.metadata=t,G.call(this,n.metadata)}),[{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,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new L(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()&&U(this.types(),e))return new j(U(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?v:this.metadata[13]||v}}])}(),L=function(){return R((function e(t,n){P(this,e),this._format=t,this.metadata=n}),[{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()||F.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),F=/^\(?\$1\)?$/,j=function(){return R((function e(t,n){P(this,e),this.type=t,this.metadata=n}),[{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()}}])}();function U(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]}}function k(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!s(e)||!s(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(s(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+V(e)+": "+e,"."))}var V=function(e){return O(e)};function B(e,t){if((t=new w(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function G(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===b(t,"1.2.0")?this.v2=!0:-1===b(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var W=function(e){return"([".concat(f,"]{1,").concat(e,"})")};function H(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="#?",a="[  \\t]*";return";ext="+W("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+W("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+W("9")+r)+"|"+("[- ]+"+W("6")+"#")+"|"+(a+"(?:,{2}|;)"+n+W("15")+r)+"|"+(a+"(?:,)+"+n+W("9")+r)}var q="["+f+"]{"+p+"}",z="[++]{0,1}(?:["+y+"]*["+f+"]){3,}["+y+f+"]*",Y=new RegExp("^[++]{0,1}(?:["+y+"]*["+f+"]){1,2}$","i"),K=z+"(?:"+H()+")?",J=new RegExp("^"+q+"$|^"+K+"$","i");var X=new RegExp("(?:"+H()+")$","i");var Q={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 Z(e){return Q[e]}function ee(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 te(e,t);var n={}.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)?te(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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.")}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ne(e){for(var t,n="",r=ee(e.split(""));!(t=r()).done;){n+=re(t.value,n)||""}return n}function re(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":Z(e)}function ae(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 se(e,t);var n={}.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)?se(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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.")}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oe(e,t,n){return ie(e,t,void 0,n)}function ie(e,t,n,r){t&&(r=new w(r.metadata)).selectNumberingPlan(t);var a=r.type(n),s=a&&a.possibleLengths()||r.possibleLengths();if(!s)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===n){if(!r.type("FIXED_LINE"))return ie(e,t,"MOBILE",r);var o=r.type("MOBILE");o&&(s=function(e,t){for(var n,r=e.slice(),a=ae(t);!(n=a()).done;){var s=n.value;e.indexOf(s)<0&&r.push(s)}return r.sort((function(e,t){return e-t}))}(s,o.possibleLengths()))}else if(n&&!a)return"INVALID_LENGTH";var i=e.length,c=s[0];return c===i?"IS_POSSIBLE":c>i?"TOO_SHORT":s[s.length-1]<i?"TOO_LONG":s.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function ce(e,t,n){return"IS_POSSIBLE"===oe(e,t,n)}function de(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function le(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 ue(e,t);var n={}.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)?ue(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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.")}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pe=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function he(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new w(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(de(r,n.nationalNumberPattern())){if(ge(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?ge(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,s=le(pe);!(a=s()).done;){var o=a.value;if(ge(r,o,n))return o}}}}function ge(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&de(e,t.pattern()))}function fe(e,t,n){var r=new w(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new w(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)})):[]}var ye=new RegExp("(["+f+"])");function me(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 Ie(e,t);var n={}.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)?Ie(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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.")}function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ee=!1;function Ae(e,t){var n=t.nationalNumber,r=t.metadata;if(Ee&&r.isNonGeographicCallingCode(e))return"001";var a=r.getCountryCodesForCallingCode(e);return a?1===a.length?a[0]:function(e,t){var n=t.countries,r=t.metadata;r=new w(r);for(var a,s=me(n);!(a=s()).done;){var o=a.value;if(r.selectNumberingPlan(o),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return o}else if(he({phone:e,country:o},void 0,r.metadata))return o}}(n,{countries:a,metadata:r.metadata}):void 0}function Ce(e,t,n){var r=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,n),a=r.carrierCode,s=r.nationalNumber;if(s!==e){if(!function(e,t,n){if(de(e,n.nationalNumberPattern())&&!de(t,n.nationalNumberPattern()))return!1;return!0}(e,s,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=Ae(n.numberingPlan.callingCode(),{nationalNumber:s,metadata:n})),!function(e,t,n){switch(oe(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(s,t,n)))return{nationalNumber:e}}return{nationalNumber:s,carrierCode:a}}function _e(e,t,n,r,a){if(!e)return{};var s;if("+"!==e[0]){var o=function(e,t,n,r){if(t){var a=new w(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(ye);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,t||n,r,a);if(!o||o===e){if(t||n||r){var i=function(e,t,n,r,a){var s=t||n?B(t||n,a):r;if(0===e.indexOf(s)){(a=new w(a)).selectNumberingPlan(t||n,s);var o=e.slice(s.length),i=Ce(o,t,a).nationalNumber,c=Ce(e,t,a).nationalNumber;if(!de(c,a.nationalNumberPattern())&&de(i,a.nationalNumberPattern())||"TOO_LONG"===oe(c,t,a))return{countryCallingCode:s,number:o}}return{number:e}}(e,t,n,r,a),c=i.countryCallingCode,d=i.number;if(c)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:c,number:d}}return{number:e}}s=!0,e="+"+o}if("0"===e[1])return{};a=new w(a);for(var l=2;l-1<=g&&l<=e.length;){var u=e.slice(1,l);if(a.hasCallingCode(u))return a.selectNumberingPlan(u),{countryCallingCodeSource:s?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(l)};l++}return{}}var Se=/(\$\d)/;function Ne(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,s=(n.carrierCode,n.metadata,e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(Se,t.nationalPrefixFormattingRule()):t.format()));return r?function(e){return e.replace(new RegExp("[".concat(y,"]+"),"g")," ").trim()}(s):s}var Te=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var be={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Oe(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var a in n[e])n[0][a]=n[e][a];e++}return n[0]}({},be,n):be,r=new w(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(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?De(a=Pe(o,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return o?(a=Pe(o,null,"INTERNATIONAL",r,n),De(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){var s=B(r,a.metadata);if(s===n){var o=Pe(e,t,"NATIONAL",a);return"1"===n?n+" "+o:o}var i=function(e,t,n){var r=new w(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():Te.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,a.metadata);if(i)return"".concat(i," ").concat(n," ").concat(Pe(e,null,"INTERNATIONAL",a))}(o,e.carrierCode,s,n.fromCountry,r);return De(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Pe(e,t,n,r,a){var s,o,i=(s=r.formats(),o=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(s,(function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==o.search(t))return!1}return de(o,e.pattern())})));return i?Ne(e,i,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function De(e,t,n,r){return t?r(e,t,n):e}function Re(e){return Re="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},Re(e)}function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(n),!0).forEach((function(t){xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xe(e,t,n){return(t=Me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(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,Me(r.key),r)}}function Me(e){var t=function(e,t){if("object"!=Re(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Re(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Re(t)?t:t+""}var Le=function(){return e=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("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(s(n)&&s(n.countries)){r=n;var a=t;if(!je.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=_e(a,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");k(r);var i=function(e,t){var n,r,a=new w(t);return Fe(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),c=i.country,d=i.countryCallingCode;this.country=c,this.countryCallingCode=d,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},(t=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:fe(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new w(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.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return ce(e.phone||e.nationalNumber,e.country,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 w(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==he(e,t,n.metadata):de(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern());var e,t,n}},{key:"isNonGeographic",value:function(){return new w(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return he(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Oe(this,e,t?ve(ve({},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)}}])&&we(e.prototype,t),n&&we(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),Fe=function(e){return/^[A-Z]{2}$/.test(e)};var je=/^\+\d+$/,Ue="+",ke="(["+f+"]|[\\-\\.\\(\\)]?)",Ve=new RegExp("^\\"+Ue+ke+"*["+f+"]"+ke+"*$","g"),Be=new RegExp("^("+("["+f+"]+((\\-)*["+f+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+f+"])*")+"\\.?$","g"),Ge="tel:",We=";phone-context=",He=";isub=";function qe(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(We);if(t<0)return null;var n=t+We.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&&(Ve.test(e)||Be.test(e))}(a))throw new T("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="",a.charAt(0)===Ue&&(n+=a);var s,o=e.indexOf(Ge);s=o>=0?o+Ge.length:0;var i=e.indexOf(We);n+=e.substring(s,i)}var c=n.indexOf(He);if(c>0&&(n=n.substring(0,c)),""!==n)return n}var ze=250,Ye=new RegExp("[++"+f+"]"),Ke=new RegExp("[^"+f+"#]+$"),Je=!1;function Xe(e,t,n){if(t=t||{},n=new w(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new T("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=qe(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>ze){if(n)throw new T("TOO_LONG");return}if(!1===t)return e;var r=e.search(Ye);if(r<0)return;return e.slice(r).replace(Ke,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=p&&J.test(e)}(r))return function(e){return Y.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(X);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(X),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);if(a.ext)return a;return{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 T("TOO_SHORT");throw new T("NOT_A_NUMBER")}return{}}var i=function(e,t,n,r){var a,s=_e(ne(e),void 0,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:Je&&r.isNonGeographicCallingCode(n)&&(a="001"),i=n||B(t,r.metadata)}if(!c)return{countryCallingCodeSource:o,countryCallingCode:i};var d=Ce(ne(c),a,r),l=d.nationalNumber,u=d.carrierCode,p=Ae(i,{nationalNumber:l,metadata:r});p&&(a=p,"001"===p||r.selectNumberingPlan(a));return{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,g=i.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new T("INVALID_COUNTRY");return{}}if(!d||d.length<p){if(t.v2)throw new T("TOO_SHORT");return{}}if(d.length>h){if(t.v2)throw new T("TOO_LONG");return{}}if(t.v2){var f=new Le(l,d,n.metadata);return c&&(f.country=c),g&&(f.carrierCode=g),s&&(f.ext=s),f.__countryCallingCodeSource=u,f}var y=!!(t.extended?n.hasSelectedNumberingPlan():c)&&de(d,n.nationalNumberPattern());return t.extended?{country:c,countryCallingCode:l,carrierCode:g,valid:y,possible:!!y||!(!0!==t.extended||!n.possibleLengths()||!ce(d,c,n)),phone:d,ext:s}:y?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(c,d,s):{}}function Qe(e){return Qe="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},Qe(e)}function Ze(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 et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e){return nt="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},nt(e)}function rt(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 at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){st(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function st(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=nt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ot(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=at(at({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return Xe(e,et(et({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof T))throw e}}function it(){var e=u(arguments);return ot(e.text,e.options,e.metadata)}function ct(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(r),e.apply(this,n)}(it,arguments)}},928:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,s=9007199254740991,o="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",d="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,y=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,E=m||I||Function("return this")();var A,C=Array.prototype,_=Function.prototype,S=Object.prototype,N=E["__core-js_shared__"],T=(A=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",b=_.toString,O=S.hasOwnProperty,P=S.toString,D=RegExp("^"+b.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=E.Symbol,$=S.propertyIsEnumerable,v=C.splice,x=W(E,"Map"),w=W(Object,"create"),M=R?R.prototype:void 0,L=M?M.toString:void 0;function F(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 j(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 U(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 k(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 V(e,t){return null!=e&&O.call(e,t)}function B(e){if(!Q(e)||(t=e,T&&T in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?D:f;return n.test(function(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(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 W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return u.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var a,i=-1,c=t.length;++i<c;){var d=z(t[i]);if(!(a=null!=e&&n(e,d)))break;e=e[d]}return a||!!(c=e?e.length:0)&&X(c)&&function(e,t){return t=null==t?s:t,!!t&&("number"==typeof e||y.test(e))&&e>-1&&e%1==0&&e<t}(d,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&X(e.length)&&!J(e)}(e)}(e)&&O.call(e,"callee")&&(!$.call(e,"callee")||P.call(e)==o)}(e))}F.prototype.clear=function(){this.__data__=w?w(null):{}},F.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:O.call(t,e)},F.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():v.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new F,map:new(x||j),string:new F}},U.prototype.delete=function(e){return G(this,e).delete(e)},U.prototype.get=function(e){return G(this,e).get(e)},U.prototype.has=function(e){return G(this,e).has(e)},U.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,a){n.push(r?a.replace(g,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function Y(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(Y.Cache||U),n}Y.Cache=U;var K=Array.isArray;function J(e){var t=Q(e)?P.call(e):"";return t==i||t==c}function X(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&P.call(e)==d}e.exports=function(e,t){return null!=e&&H(e,t,V)}},953: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),(()=>{"use strict";var e={};n.r(e),n.d(e,{buildContextName:()=>H,buildModalContext:()=>K,buildTransientContextName:()=>q,getContainerIdFromContext:()=>X,getParentContext:()=>J,getParentContextName:()=>W,getTargetFromContext:()=>Y,getTransientContext:()=>z});var t={};n.r(t),n.d(t,{getResolvedTargetName:()=>Ot,getRoutingInfo:()=>Pt,getSemanticURLFromRoutingInfo:()=>Dt});var r={};n.r(r),n.d(r,{evaluate:()=>sn,handleChange:()=>rn,hasDeclareExpression:()=>nn,updateDeclareExpressions:()=>an});var a={};n.r(a),n.d(a,{hasBrowserEnv:()=>Ar,hasStandardBrowserEnv:()=>_r,hasStandardBrowserWebWorkerEnv:()=>Sr,navigator:()=>Cr,origin:()=>Nr});var s={};n.r(s),n.d(s,{publishExpressions:()=>Fi,publishResponse:()=>ji});var o={};n.r(o),n.d(o,{doesRestApiExist:()=>Wi,getCancelTokenSource:()=>Hi,getCaseApi:()=>Yi,getHeaderProcessor:()=>Vi,invokeCustomRestApi:()=>Gi,invokeRestApi:()=>Bi,isRequestCanceled:()=>qi,registerInterceptor:()=>zi});var i={};n.r(i),n.d(i,{fetchViewResources:()=>Cu,updateViewResources:()=>Au});var c={};n.r(c),n.d(c,{CONTAINER_NAMES:()=>gp,CONTAINER_TYPES:()=>hp,addRootContainerItem:()=>Yp,areContainerItemsPresent:()=>Cp,clearTransientData:()=>eh,closeContainerItem:()=>zp,getActiveContainerItemContext:()=>vp,getActiveContainerItemIDFromRoutingInfo:()=>ph,getActiveContainerItemName:()=>Pp,getActiveContext:()=>ch,getChildContainerItems:()=>xp,getChildContainers:()=>wp,getChildContainersContexts:()=>Mp,getContainerAPI:()=>rh,getContainerAccessOrder:()=>Ap,getContainerData:()=>mp,getContainerItemByKey:()=>Tp,getContainerItemData:()=>Ip,getContainerItemName:()=>Sp,getContainerItems:()=>Ep,getContainerLimit:()=>kp,getContainerParentContext:()=>uh,getContainerType:()=>Op,getContextByTargetAndKey:()=>lh,getDataContextName:()=>$p,getFlowContainer:()=>gh,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Hp,getParentContainerItem:()=>hh,getRootContainerName:()=>ih,getSuggestionContexts:()=>Lp,getTargetFromContainerItemID:()=>qp,getTransientItems:()=>Xp,hasContainerItems:()=>Up,isContainerDirty:()=>Wp,isContainerInitialized:()=>bp,isContainerItemActive:()=>Dp,isContainerItemContextBeingUsedInOtherContainers:()=>Jp,isContainerItemExists:()=>_p,isContainerLimitReached:()=>Bp,isContainerMultipleMode:()=>jp,isContainerSingleMode:()=>Fp,purgeTransientData:()=>th,removeContainer:()=>ah,replaceTransientData:()=>Zp,resetContainersPayload:()=>Gp,setContainerLimit:()=>Vp,updateCaseContextEtag:()=>oh,updateParentLastUpdateTime:()=>dh,updateRelatedContextEtag:()=>sh,updateTransientData:()=>Qp});var d={};n.r(d),n.d(d,{getAIAgent:()=>dg,getAdditionalInfo:()=>gg,getDataPageKeys:()=>ug,getDataPageMetadata:()=>ng,getEmbeddedPropertyMetadata:()=>Kh,getFieldParameters:()=>og,getFieldsByClassName:()=>sg,getGenAICoach:()=>cg,getInsight:()=>ag,getLocaleUtilsForLanguage:()=>zh,getLocalizationServiceFromStore:()=>Yh,getLookUpDataPage:()=>pg,getLookUpDataPageInfo:()=>hg,getParagraph:()=>ig,getPersonalizationMetadata:()=>rg,getPropertyMetadata:()=>qh,getResolvedFieldMetadata:()=>fg,getSavableDataPage:()=>lg,isViewExists:()=>eg,mergeStore:()=>Hh,resolveNavigation:()=>tg,resolveView:()=>Zh,updateNavigationStore:()=>Xh,updateStores:()=>Qh,updateViewStore:()=>Jh});var l={};n.r(l),n.d(l,{dispatch:()=>_g,doesContextExist:()=>Lg,getActionType:()=>Dg,getContextValue:()=>Og,getDataObject:()=>Sg,getReferenceTokens:()=>Eg,getSharedDataObject:()=>Ng,getStore:()=>Cg,getValue:()=>bg,isMergeable:()=>$g,lookupContextValue:()=>Pg,mergeDeep:()=>vg,removeItem:()=>Rg,replaceValue:()=>wg,resetStore:()=>Mg,setStore:()=>Ag,updateValue:()=>xg});var u={};n.r(u),n.d(u,{activateContainerItem:()=>hf,addContainerItem:()=>nf,addMessages:()=>gf,addSharedData:()=>Nf,addTransientItem:()=>rf,addWork:()=>Qg,clearTransientData:()=>sf,createWork:()=>qg,error:()=>Sf,finishAssignment:()=>Ef,initContainers:()=>ef,listAction:()=>bf,loadView:()=>Jg,mergeData:()=>Yg,openAssignment:()=>Af,openWorkByHandle:()=>Zg,postProcess:()=>_f,purgeTransientData:()=>cf,removeAllTransientItems:()=>yf,removeContainerItem:()=>ff,removeSharedData:()=>Tf,removeTransientItem:()=>mf,replaceContainerItem:()=>If,replaceTransientData:()=>of,resetContainers:()=>tf,resetLoading:()=>uf,setLoading:()=>lf,setSharedProperty:()=>Pf,setStateProperty:()=>Df,showCasePreview:()=>Of,showHarness:()=>Kg,showHistory:()=>Cf,showPage:()=>Xg,upMergeAndRemoveContainerItem:()=>pf,updateContainerItem:()=>df,updateTransientData:()=>af});var p=n(216),h=n.n(p);let g,f,y;const m=e=>{e&&(g=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},g.BASEURL=e.server,g.ACTIONURL=e["action-end-point"],g.DATAURL=e["data-end-point"],y=e.reAuthUrl)},I=()=>y,E=()=>g.BASEURL,A=e=>fetch(`${g.BASEURL}${g.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),C=e=>{f=e},_=()=>f;var S=n(953),N=n(521),T=n.n(N),b=n(928),O=n.n(b),P=n(188),D=n.n(P),R=n(835),$=n.n(R),v=n(692),x=n.n(v),w=n(529),M=n.n(w);const L=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}transformObjectToCase(e){let t,n=!1;try{const n=this.replaceToCase(JSON.stringify(e));t=JSON.parse(n)}catch(e){console.error("not a Valid JSON",e),n=!0}return n?e:t}transformCaseData(e){const t=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...t?.content}}},uiResources:{...n}}}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}replaceToCase(e){return e.replace("objectInfo","caseInfo").replace("objectTypeName","caseTypeName").replace("objectTypeID","caseTypeID")}},F={APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",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",OBJECT:"OBJECT"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails",OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:"SubscriptView"},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},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"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},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",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content"},OBJECT_INFO:{OBJECT_INFO:"objectInfo",OBJECT_INFO_ID:"objectInfo.ID",OBJECT_INFO_CONTENT:"objectInfo.content",ACTIVE_ACTION_ID:"objectInfo.activeActionID",OBJECT_INFO_CONTENT_CLASS_ID:"objectInfo.content.classID"},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_INFO_CLASSNAME:"caseInfo.className",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",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},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",ASSIGNMENT:"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_UNMOUNT_APP:"unmountApp",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_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},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",GET_NEXT_WORK:"getNextWork",SAVE_ASSIGNMENT_COMPLETE:"saveAssignmentComplete"},WORK_EVENTS:{WORK_DELETED:"workDeleted"},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",FETCH_FAILURE:"fetchFailure",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer",PEGA_EMBED_CUSTOM:"pegaEmbedCustom",SUGGESTION_PROCESSED:"suggestion_processed",ERROR_ON_FINISH_ASSIGNMENT:"errorOnFinishAssignment",URL_NAVIGATION:"urlNavigation"},ERROR_TYPE:{CLIENT:"client",SERVER:"server"},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",ASSIGNMENT_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"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},ACTION:"action",CONTEXT_DATA_MODAL_VIEW:{CONTEXT_DATA_MODAL_VIEW:"context_data.modalView",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",EDIT_TYPE:"context_data.modalView.editType",ACTION_ID:"context_data.modalView.actionID"}},j={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID:"hybrid",HYBRID_VIEW_CONTAINER:"HybridViewContainer",HYRBID_ROOT_CONTAINERNAME:"hybridRootContainerName",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",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_DYNAMIC_WHENS:"summary_of_dynamic_whens__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",CUSTOM_ERROR:"custom error",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",EMBED:"EMBED",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",ON_REFRESH_START:"onRefreshStart",ON_REFRESH_ERROR:"onRefreshError",ON_REFRESH_COMPLETE:"onRefreshComplete",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",OBJECT_INFO_IS_LOCAL_ACTION:"objectInfo.isObjectWideAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",UI_RESOURCES_ROOT_CONTEXT:"uiResources.root.config.context",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",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",PARAGRAPH_ANNOTATION:"@PARAGRAPH",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",PY_CONFIRM:"pyConfirm",LIST_ACTIONS:{ADD:"ADD",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT",REPLACE:"REPLACE",DELETEPAGE:"DELETEPAGE"},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",EMBEDDED_DATA_MODAL:{SHOW_ROW:"showRow",SUBMIT_ROW:"submitRow",EDIT_TYPE:"editType",ACTION_NAME:"actionName",REFRESH_CONDITIONS:"caseInfo.refreshConditions"},LOCALIZATION_V2:2,DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...F,getProperty:e=>L.map(e)},U="pyRemoteCaseDetails";class k{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>Bg.getProperty(".RemoteSystemID",j.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))};static isTraditionalRemoteCase=(e="")=>"Traditional"===k.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=Ph.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const V=k,B={},G=new Map,W=e=>{let t=j.EMPTY_STRING;return t=e&&e.includes(j.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},H=(e,t,n=!1)=>{let r=j.EMPTY_STRING;if(t&&e){let a=`${t}${j.FORWARD_SLASH_STRING}${e}`;const s=mp(a);if(s||t!==j.APP.APP&&t!==j.APP.ROOT)if(s){if(n&&B[a])return r=`${a}${j.UNDERSCORE_STRING}${B[a]}`,r;B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}else r=H(e,W(t));else a=`${t}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,B[a]?B[a]+=1:B[a]=1,r=`${a}${j.UNDERSCORE_STRING}${B[a]}`}return r},q=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`}return""},z=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`:q(e,t)}return""},Y=e=>{let t=j.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},K=(e,t)=>{if(null===e)return t;const[,n]=t.split(j.FORWARD_SLASH_STRING);return e+j.FORWARD_SLASH_STRING+n},J=e=>{const t=e.indexOf(j.FORWARD_SLASH_STRING),n=e.lastIndexOf(j.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},X=e=>{const t=e.split(j.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+j.FORWARD_SLASH_STRING+t[2]},Q="SET_PROPERTY",Z="REPLACE_PROPERTY",ee="FIELD_CHANGE",te="LOAD_VIEW",ne="SHOW_PAGE",re="SHOW_DATA",ae="SHOW_INSIGHT",se="SHOW_DASHBOARD",oe="SET_LOADING",ie="RESET_LOADING",ce="SET_SHARED_PROPERTY",de="CREATE_WORK",le="OPEN_WORK_BY_HANDLE",ue="UPDATE_DOCUMENT",pe="FINISH_ASSIGNMENT",he="CANCEL_ASSIGNMENT",ge="OPEN_ASSIGNMENT",fe="MERGE_DATA",ye="REMOVE_ITEM",me="GET_DATAOBJECT_ACTIONS",Ie="SHOW_HISTORY",Ee="ERROR",Ae="INIT_CONTAINERS",Ce="RESET_CONTAINERS",_e="ADD_CONTAINER_ITEM",Se="REMOVE_CONTAINER_ITEM",Ne="ADD_TRANSIENT_ITEM",Te="UPDATE_TRANSIENT_DATA",be="REMOVE_TRANSIENT_ITEM",Oe="REMOVE_ALL_TRANSIENT_ITEMS",Pe="CLEAR_TRANSIENT_DATA",De="PURGE_TRANSIENT_DATA",Re="REPLACE_TRANSIENT_DATA",$e="ACTIVATE_CONTAINER_ITEM",ve="UPDATE_CONTAINER_ITEM",xe="UPMERGE_AND_REMOVE_CONTAINER_ITEM",we="REPLACE_CONTAINER_ITEM",Me="ACTIVATE_MODAL_CONTAINER_ITEM",Le="REMOVE_CONTAINER",Fe="ADD_SUGGESTION_CONTEXT",je="showView",Ue="showData",ke="showInsight",Ve="showDashboard",Be="openWorkByHandle",Ge="openAssignment",We="createNewWork",He="SHOW_CANCEL_ALERT",qe="deleteCaseInCreateStage",ze="openLocalAction",Ye="openProcessAction",Ke="caseWideActions",Je="openBulkAction",Xe="performBulkAction",Qe="launchAssignment",Ze="ADD_MESSAGES",et="CLEAR_MESSAGES",tt="RESET_STORE",nt="FETCH_DATAPAGE",rt="ADD_SHARED_DATA",at="REMOVE_SHARED_DATA",st="LIST_ACTION",ot="DELETE_CASE_SUMMARY",it="ALTER_BLOCKING_ACTION_COUNT",ct="CREATE_DATA_OBJECT",dt="DELETE_DATA_OBJECT",lt="VIEW_DATA_OBJECT",ut="UPDATE_DATA_OBJECT",pt="OPEN_DATA_OBJECT_ACTION",ht="SUBMIT_DATA_OBJECT_ACTION",gt="OPEN_EMBEDDED_DATA_MODAL",ft="SUBMIT_EMBEDDED_DATA_MODAL",yt="SUBMIT_SUBSCRIPT",mt="FILL_FORM_WITH_AI",It="createWork",Et="openAssignment",At="openCase",Ct="OPEN_OBJECT_ACTION",_t="EXECUTE_OBJECT_WIDE_ACTION",St="createObject",Nt="getObject",Tt="getObjectWideAction",bt="createExternalObject",Ot=(e,t)=>{if(!e||!t)return null;let n,r=j.EMPTY_STRING;return t&&(r=`${t}${j.FORWARD_SLASH_STRING}${e}`,n=mp(r),n||t.includes("/")?n||(r=Ot(e,W(t))):r=`${t}${j.FORWARD_SLASH_STRING}${e}`),r},Pt=(e,t)=>{const n=Ot(e,t);return n&&mp(n)?mp(n):{}},Dt=(e,t)=>Oh.getSemanticURL(je,{page:e},t);class Rt{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._exprStr=t||"",this._endState=n||{},this._subParser=null}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=jt[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=Ft[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}=jt[this._state];this._subParser=new Rt(this._grammar,e,t)}_endSubExpression(){jt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,Rt._setParent(e,this._position)):this._tree=e,this._position=e}}const $t=Rt,vt="identifier",xt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},wt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Mt={">":{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"},"&&":xt,AND:xt,and:xt,"||":wt,OR:wt,or:wt,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)}},Lt={BinaryExpression:function(e){const t=[];let n="";const r=e.right,a=e.operator,s=e.left;if(t[0]=this.evaluateAST(s),s.operationType===vt&&this._context){const e=s.value;n=this._context.getFieldMetadata(e.substring(1))?.type??""}t[1]=r?this.evaluateAST(r,n):"";return(0,this._grammar[a].evaluate)(t[0],t[1])},identifier:function(e){return this._localDataObject?jg.getIn(this._localDataObject,e.value?e.value.substring(1).split("."):[])??"":this._contextTreeNodeContext?Bg.getLitePropertyValue(this._contextTreeNodeContext,e.value)??"":this._context.getValue(e.value)??""},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){const t=e.operator,n=e.right;return(0,this._grammar[t].evaluate)(n)}},Ft={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;const r=n?n.operator:null,a=r?this._grammar[r]:null,s=a?a.precedence:null;if(s&&t)for(;n?.operator&&s>=t;)this._position=n,n=n._parent;const o={operationType:"BinaryExpression",operator:e.value,left:this._position};$t._setParent(this._position,o),this._position=n,this.setPositionInAST(o)},identifier:function(e){const t={operationType:vt,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},jt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:vt},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Ft.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Ut=["binaryOperator","unaryOperator","openParenthesis"],kt=/^\s*$/,Vt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Bt=/\\\\/,Gt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Wt=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[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]+)"],Ht=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class qt{constructor(e){this._grammar=e}static _isNegative(e){return Ut.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(kt)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(Vt)&&(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(Bt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>qt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[Gt.join("|"),e.join("|"),Wt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e.trim()))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return e.startsWith('"')||e.startsWith("'")?t.value=qt._unquote(e):e.match(Ht)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(Vt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)qt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&qt._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 zt=qt;const Yt=class{constructor(e,t){this._grammar={...Mt},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new zt(this._grammar).tokenize(this._expression),t=new $t(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return Zt(e.operationType,Lt)&&Lt[e.operationType].call(this,e,t)}},Kt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new Yt(n,t)},Jt=e=>!e||e.buildAST(),Xt=(e,t,n)=>!e||e.evaluate(t,n),Qt=(e,t,n)=>{const r=Kt(e,t),a=Jt(r);return Xt(a,n)},Zt=(e,t)=>e in t;const en=class{static handleExpression(e,t,n,r){const a=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:a}}).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:Bg.getPropertyValue(`${n}.pxObjClass`,null,t)||Bg.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>_g({type:Q,payload:{context:t,reference:n,value:e[n]}})))}},tn={},nn=(e,t)=>tn[t]&&Object.hasOwn(tn[t],e),rn=e=>{const{context:t}=e;nn(e.reference,t)&&en.handleExpression(e.reference,e.value,tn[t][e.reference],t)},an=(e={})=>{jg.copy(e,tn)},sn=(e,t,n)=>Qt(e,t,n?.pConnect.getPConnect());const on=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(r)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);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&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]}};const cn=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={}){jg.copy(e,this.componentMap)}mergeOverrideMap(e={}){jg.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const dn=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const ln=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),a=-1===r?e:e.substring(0,r),s=dn.getHandler(a);return s?s(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return dn.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=cn.getComponent(t.type);if(!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&&jg.isString(e)){const t=e.startsWith(j.PROPERTY_ANNOTATION)||e.startsWith(j.ATTACHMENT_ANNOTATION)||e.startsWith(j.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(jg.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return jg.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)}};function un(e,t){return function(){return e.apply(t,arguments)}}const{toString:pn}=Object.prototype,{getPrototypeOf:hn}=Object,{iterator:gn,toStringTag:fn}=Symbol,yn=(mn=Object.create(null),e=>{const t=pn.call(e);return mn[t]||(mn[t]=t.slice(8,-1).toLowerCase())});var mn;const In=e=>(e=e.toLowerCase(),t=>yn(t)===e),En=e=>t=>typeof t===e,{isArray:An}=Array,Cn=En("undefined");function _n(e){return null!==e&&!Cn(e)&&null!==e.constructor&&!Cn(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sn=In("ArrayBuffer");const Nn=En("string"),Tn=En("function"),bn=En("number"),On=e=>null!==e&&"object"==typeof e,Pn=e=>{if("object"!==yn(e))return!1;const t=hn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||fn in e||gn in e)},Dn=In("Date"),Rn=In("File"),$n=In("Blob"),vn=In("FileList"),xn=In("URLSearchParams"),[wn,Mn,Ln,Fn]=["ReadableStream","Request","Response","Headers"].map(In);function jn(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),An(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(_n(e))return;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 Un(e,t){if(_n(e))return null;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 kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Vn=e=>!Cn(e)&&e!==kn;const Bn=(Gn="undefined"!=typeof Uint8Array&&hn(Uint8Array),e=>Gn&&e instanceof Gn);var Gn;const Wn=In("HTMLFormElement"),Hn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qn=In("RegExp"),zn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jn(n,((n,a)=>{let s;!1!==(s=t(n,a,e))&&(r[a]=s||n)})),Object.defineProperties(e,r)};const Yn=In("AsyncFunction"),Kn=(Jn="function"==typeof setImmediate,Xn=Tn(kn.postMessage),Jn?setImmediate:Xn?(Qn=`axios@${Math.random()}`,Zn=[],kn.addEventListener("message",(({source:e,data:t})=>{e===kn&&t===Qn&&Zn.length&&Zn.shift()()}),!1),e=>{Zn.push(e),kn.postMessage(Qn,"*")}):e=>setTimeout(e));var Jn,Xn,Qn,Zn;const er="undefined"!=typeof queueMicrotask?queueMicrotask.bind(kn):"undefined"!=typeof process&&process.nextTick||Kn,tr={isArray:An,isArrayBuffer:Sn,isBuffer:_n,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Tn(e.append)&&("formdata"===(t=yn(e))||"object"===t&&Tn(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Sn(e.buffer),t},isString:Nn,isNumber:bn,isBoolean:e=>!0===e||!1===e,isObject:On,isPlainObject:Pn,isEmptyObject:e=>{if(!On(e)||_n(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:wn,isRequest:Mn,isResponse:Ln,isHeaders:Fn,isUndefined:Cn,isDate:Dn,isFile:Rn,isBlob:$n,isRegExp:qn,isFunction:Tn,isStream:e=>On(e)&&Tn(e.pipe),isURLSearchParams:xn,isTypedArray:Bn,isFileList:vn,forEach:jn,merge:function e(){const{caseless:t,skipUndefined:n}=Vn(this)&&this||{},r={},a=(a,s)=>{const o=t&&Un(r,s)||s;Pn(r[o])&&Pn(a)?r[o]=e(r[o],a):Pn(a)?r[o]=e({},a):An(a)?r[o]=a.slice():n&&Cn(a)||(r[o]=a)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&jn(arguments[e],a);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(jn(t,((t,r)=>{n&&Tn(t)?e[r]=un(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&&hn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:yn,kindOfTest:In,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(An(e))return e;let t=e.length;if(!bn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[gn]).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:Wn,hasOwnProperty:Hn,hasOwnProp:Hn,reduceDescriptors:zn,freezeMethods:e=>{zn(e,((t,n)=>{if(Tn(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Tn(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 An(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:Un,global:kn,isContextDefined:Vn,isSpecCompliantForm:function(e){return!!(e&&Tn(e.append)&&"FormData"===e[fn]&&e[gn])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(On(e)){if(t.indexOf(e)>=0)return;if(_n(e))return e;if(!("toJSON"in e)){t[r]=e;const a=An(e)?[]:{};return jn(e,((e,t)=>{const s=n(e,r+1);!Cn(s)&&(a[t]=s)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:Yn,isThenable:e=>e&&(On(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),setImmediate:Kn,asap:er,isIterable:e=>null!=e&&Tn(e[gn])};function nr(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,this.status=a.status?a.status:null)}tr.inherits(nr,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:tr.toJSONObject(this.config),code:this.code,status:this.status}}});const rr=nr.prototype,ar={};["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=>{ar[e]={value:e}})),Object.defineProperties(nr,ar),Object.defineProperty(rr,"isAxiosError",{value:!0}),nr.from=(e,t,n,r,a,s)=>{const o=Object.create(rr);tr.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e));const i=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return nr.call(o,i,c,n,r,a),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const sr=nr;function or(e){return tr.isPlainObject(e)||tr.isArray(e)}function ir(e){return tr.endsWith(e,"[]")?e.slice(0,-2):e}function cr(e,t,n){return e?e.concat(t).map((function(e,t){return e=ir(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const dr=tr.toFlatObject(tr,{},null,(function(e){return/^is[A-Z]/.test(e)}));const lr=function(e,t,n){if(!tr.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=tr.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!tr.isUndefined(t[e])}))).metaTokens,a=n.visitor||d,s=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&tr.isSpecCompliantForm(t);if(!tr.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(tr.isDate(e))return e.toISOString();if(tr.isBoolean(e))return e.toString();if(!i&&tr.isBlob(e))throw new sr("Blob is not supported. Use a Buffer instead.");return tr.isArrayBuffer(e)||tr.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(tr.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(tr.isArray(e)&&function(e){return tr.isArray(e)&&!e.some(or)}(e)||(tr.isFileList(e)||tr.endsWith(n,"[]"))&&(i=tr.toArray(e)))return n=ir(n),i.forEach((function(e,r){!tr.isUndefined(e)&&null!==e&&t.append(!0===o?cr([n],r,s):null===o?n:n+"[]",c(e))})),!1;return!!or(e)||(t.append(cr(a,n,s),c(e)),!1)}const l=[],u=Object.assign(dr,{defaultVisitor:d,convertValue:c,isVisitable:or});if(!tr.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!tr.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),tr.forEach(n,(function(n,s){!0===(!(tr.isUndefined(n)||null===n)&&a.call(t,n,tr.isString(s)?s.trim():s,r,u))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t};function ur(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function pr(e,t){this._pairs=[],e&&lr(e,this,t)}const hr=pr.prototype;hr.append=function(e,t){this._pairs.push([e,t])},hr.toString=function(e){const t=e?function(t){return e.call(this,t,ur)}:ur;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const gr=pr;function fr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function yr(e,t,n){if(!t)return e;const r=n&&n.encode||fr;tr.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let s;if(s=a?a(t,n):tr.isURLSearchParams(t)?t.toString():new gr(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const mr=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){tr.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ir={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Er={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:gr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ar="undefined"!=typeof window&&"undefined"!=typeof document,Cr="object"==typeof navigator&&navigator||void 0,_r=Ar&&(!Cr||["ReactNative","NativeScript","NS"].indexOf(Cr.product)<0),Sr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Nr=Ar&&window.location.href||"http://localhost",Tr={...a,...Er};const br=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;if(s=!s&&tr.isArray(r)?r.length:s,i)return tr.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o;r[s]&&tr.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],a)&&tr.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(tr.isFormData(e)&&tr.isFunction(e.entries)){const n={};return tr.forEachEntry(e,((e,r)=>{t(function(e){return tr.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Or={transitional:Ir,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=tr.isObject(e);a&&tr.isHTMLForm(e)&&(e=new FormData(e));if(tr.isFormData(e))return r?JSON.stringify(br(e)):e;if(tr.isArrayBuffer(e)||tr.isBuffer(e)||tr.isStream(e)||tr.isFile(e)||tr.isBlob(e)||tr.isReadableStream(e))return e;if(tr.isArrayBufferView(e))return e.buffer;if(tr.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 lr(e,new Tr.classes.URLSearchParams,{visitor:function(e,t,n,r){return Tr.isNode&&tr.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=tr.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return lr(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(tr.isString(e))try{return(t||JSON.parse)(e),tr.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Or.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(tr.isResponse(e)||tr.isReadableStream(e))return e;if(e&&tr.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw sr.from(e,sr.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:Tr.classes.FormData,Blob:Tr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};tr.forEach(["delete","get","head","post","put","patch"],(e=>{Or.headers[e]={}}));const Pr=Or,Dr=tr.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"]),Rr=Symbol("internals");function $r(e){return e&&String(e).trim().toLowerCase()}function vr(e){return!1===e||null==e?e:tr.isArray(e)?e.map(vr):String(e)}function xr(e,t,n,r,a){return tr.isFunction(r)?r.call(this,t,n):(a&&(t=n),tr.isString(t)?tr.isString(r)?-1!==t.indexOf(r):tr.isRegExp(r)?r.test(t):void 0:void 0)}class wr{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=$r(t);if(!a)throw new Error("header name must be a non-empty string");const s=tr.findKey(r,a);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=vr(e))}const s=(e,t)=>tr.forEach(e,((e,n)=>a(e,n,t)));if(tr.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(tr.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]&&Dr[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(tr.isObject(e)&&tr.isIterable(e)){let n,r,a={};for(const t of e){if(!tr.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[r=t[0]]=(n=a[r])?tr.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=$r(e)){const n=tr.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(tr.isFunction(t))return t.call(this,e,n);if(tr.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=$r(e)){const n=tr.findKey(this,e);return!(!n||void 0===this[n]||t&&!xr(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=$r(e)){const a=tr.findKey(n,e);!a||t&&!xr(0,n[a],a,t)||(delete n[a],r=!0)}}return tr.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&&!xr(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return tr.forEach(this,((r,a)=>{const s=tr.findKey(n,a);if(s)return t[s]=vr(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]=vr(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return tr.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&tr.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")}getSetCookie(){return this.get("set-cookie")||[]}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[Rr]=this[Rr]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=$r(e);t[r]||(!function(e,t){const n=tr.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 tr.isArray(e)?e.forEach(r):r(e),this}}wr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),tr.reduceDescriptors(wr.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),tr.freezeMethods(wr);const Mr=wr;function Lr(e,t){const n=this||Pr,r=t||n,a=Mr.from(r.headers);let s=r.data;return tr.forEach(e,(function(e){s=e.call(n,s,a.normalize(),t?t.status:void 0)})),a.normalize(),s}function Fr(e){return!(!e||!e.__CANCEL__)}function jr(e,t,n){sr.call(this,null==e?"canceled":e,sr.ERR_CANCELED,t,n),this.name="CanceledError"}tr.inherits(jr,sr,{__CANCEL__:!0});const Ur=jr;function kr(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new sr("Request failed with status code "+n.status,[sr.ERR_BAD_REQUEST,sr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Vr=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}};const Br=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(...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)]},Gr=(e,t,n=3)=>{let r=0;const a=Vr(50,250);return Br((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)},Wr=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Hr=e=>(...t)=>tr.asap((()=>e(...t))),qr=Tr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Tr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Tr.origin),Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent)):()=>!0,zr=Tr.hasStandardBrowserEnv?{write(e,t,n,r,a,s){const o=[e+"="+encodeURIComponent(t)];tr.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),tr.isString(r)&&o.push("path="+r),tr.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 Yr(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Kr=e=>e instanceof Mr?{...e}:e;function Jr(e,t){t=t||{};const n={};function r(e,t,n,r){return tr.isPlainObject(e)&&tr.isPlainObject(t)?tr.merge.call({caseless:r},e,t):tr.isPlainObject(t)?tr.merge({},t):tr.isArray(t)?t.slice():t}function a(e,t,n,a){return tr.isUndefined(t)?tr.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function s(e,t){if(!tr.isUndefined(t))return r(void 0,t)}function o(e,t){return tr.isUndefined(t)?tr.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,n)=>a(Kr(e),Kr(t),0,!0)};return tr.forEach(Object.keys({...e,...t}),(function(r){const s=c[r]||a,o=s(e[r],t[r],r);tr.isUndefined(o)&&s!==i||(n[r]=o)})),n}const Xr=e=>{const t=Jr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:s,headers:o,auth:i}=t;if(t.headers=o=Mr.from(o),t.url=yr(Yr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&o.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),tr.isFormData(n))if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(tr.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)}))}if(Tr.hasStandardBrowserEnv&&(r&&tr.isFunction(r)&&(r=r(t)),r||!1!==r&&qr(t.url))){const e=a&&s&&zr.read(s);e&&o.set(a,e)}return t},Qr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Xr(e);let a=r.data;const s=Mr.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=Mr.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());kr((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 sr("Request aborted",sr.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const r=t&&t.message?t.message:"Network Error",a=new sr(r,sr.ERR_NETWORK,e,f);a.event=t||null,n(a),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||Ir;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new sr(t,a.clarifyTimeoutError?sr.ETIMEDOUT:sr.ECONNABORTED,e,f)),f=null},void 0===a&&s.setContentType(null),"setRequestHeader"in f&&tr.forEach(s.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),tr.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),u&&"json"!==u&&(f.responseType=r.responseType),h&&([c,l]=Gr(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,d]=Gr(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Ur(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===Tr.protocols.indexOf(m)?n(new sr("Unsupported protocol "+m+":",sr.ERR_BAD_REQUEST,e)):f.send(a||null)}))},Zr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){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 sr?t:new Ur(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,a(new sr(`timeout ${t} of ms exceeded`,sr.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=()=>tr.asap(o),i}},ea=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},ta=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},na=(e,t,n,r)=>{const a=async function*(e,t){for await(const n of ta(e))yield*ea(n,t)}(e,t);let s,o=0,i=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},{isFunction:ra}=tr,aa=(({Request:e,Response:t})=>({Request:e,Response:t}))(tr.global),{ReadableStream:sa,TextEncoder:oa}=tr.global,ia=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ca=e=>{e=tr.merge.call({skipUndefined:!0},aa,e);const{fetch:t,Request:n,Response:r}=e,a=t?ra(t):"function"==typeof fetch,s=ra(n),o=ra(r);if(!a)return!1;const i=a&&ra(sa),c=a&&("function"==typeof oa?(d=new oa,e=>d.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var d;const l=s&&i&&ia((()=>{let e=!1;const t=new n(Tr.origin,{body:new sa,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),u=o&&i&&ia((()=>tr.isReadableStream(new r("").body))),p={stream:u&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!p[e]&&(p[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new sr(`Response type '${e}' is not supported`,sr.ERR_NOT_SUPPORT,n)})}));const h=async(e,t)=>{const r=tr.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(tr.isBlob(e))return e.size;if(tr.isSpecCompliantForm(e)){const t=new n(Tr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return tr.isArrayBufferView(e)||tr.isArrayBuffer(e)?e.byteLength:(tr.isURLSearchParams(e)&&(e+=""),tr.isString(e)?(await c(e)).byteLength:void 0)})(t):r};return async e=>{let{url:a,method:o,data:i,signal:c,cancelToken:d,timeout:g,onDownloadProgress:f,onUploadProgress:y,responseType:m,headers:I,withCredentials:E="same-origin",fetchOptions:A}=Xr(e),C=t||fetch;m=m?(m+"").toLowerCase():"text";let _=Zr([c,d&&d.toAbortSignal()],g),S=null;const N=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let T;try{if(y&&l&&"get"!==o&&"head"!==o&&0!==(T=await h(I,i))){let e,t=new n(a,{method:"POST",body:i,duplex:"half"});if(tr.isFormData(i)&&(e=t.headers.get("content-type"))&&I.setContentType(e),t.body){const[e,n]=Wr(T,Gr(Hr(y)));i=na(t.body,65536,e,n)}}tr.isString(E)||(E=E?"include":"omit");const t=s&&"credentials"in n.prototype,c={...A,signal:_,method:o.toUpperCase(),headers:I.normalize().toJSON(),body:i,duplex:"half",credentials:t?E:void 0};S=s&&new n(a,c);let d=await(s?C(S,A):C(a,c));const g=u&&("stream"===m||"response"===m);if(u&&(f||g&&N)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=d[t]}));const t=tr.toFiniteNumber(d.headers.get("content-length")),[n,a]=f&&Wr(t,Gr(Hr(f),!0))||[];d=new r(na(d.body,65536,n,(()=>{a&&a(),N&&N()})),e)}m=m||"text";let b=await p[tr.findKey(p,m)||"text"](d,e);return!g&&N&&N(),await new Promise(((t,n)=>{kr(t,n,{data:b,headers:Mr.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:S})}))}catch(t){if(N&&N(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new sr("Network Error",sr.ERR_NETWORK,e,S),{cause:t.cause||t});throw sr.from(t,t&&t.code,e,S)}}},da=new Map,la=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:a}=t,s=[r,a,n];let o,i,c=s.length,d=da;for(;c--;)o=s[c],i=d.get(o),void 0===i&&d.set(o,i=c?new Map:ca(t)),d=i;return i},ua=(la(),{http:null,xhr:Qr,fetch:{get:la}});tr.forEach(ua,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const pa=e=>`- ${e}`,ha=e=>tr.isFunction(e)||null===e||!1===e,ga=(e,t)=>{e=tr.isArray(e)?e:[e];const{length:n}=e;let r,a;const s={};for(let o=0;o<n;o++){let n;if(r=e[o],a=r,!ha(r)&&(a=ua[(n=String(r)).toLowerCase()],void 0===a))throw new sr(`Unknown adapter '${n}'`);if(a&&(tr.isFunction(a)||(a=a.get(t))))break;s[n||"#"+o]=a}if(!a){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(pa).join("\n"):" "+pa(e[0]):"as no adapter specified";throw new sr("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a};function fa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ur(null,e)}function ya(e){fa(e),e.headers=Mr.from(e.headers),e.data=Lr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ga(e.adapter||Pr.adapter,e)(e).then((function(t){return fa(e),t.data=Lr.call(e,e.transformResponse,t),t.headers=Mr.from(t.headers),t}),(function(t){return Fr(t)||(fa(e),t&&t.response&&(t.response.data=Lr.call(e,e.transformResponse,t.response),t.response.headers=Mr.from(t.response.headers))),Promise.reject(t)}))}const ma="1.12.2",Ia={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ia[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ea={};Ia.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ma+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,s)=>{if(!1===e)throw new sr(r(a," has been removed"+(t?" in "+t:"")),sr.ERR_DEPRECATED);return t&&!Ea[a]&&(Ea[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)}},Ia.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Aa={assertOptions:function(e,t,n){if("object"!=typeof e)throw new sr("options must be an object",sr.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 sr("option "+s+" must be "+n,sr.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new sr("Unknown option "+s,sr.ERR_BAD_OPTION)}},validators:Ia},Ca=Aa.validators;class _a{constructor(e){this.defaults=e||{},this.interceptors={request:new mr,response:new mr}}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=Jr(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&Aa.assertOptions(n,{silentJSONParsing:Ca.transitional(Ca.boolean),forcedJSONParsing:Ca.transitional(Ca.boolean),clarifyTimeoutError:Ca.transitional(Ca.boolean)},!1),null!=r&&(tr.isFunction(r)?t.paramsSerializer={serialize:r}:Aa.assertOptions(r,{encode:Ca.function,serialize:Ca.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Aa.assertOptions(t,{baseUrl:Ca.spelling("baseURL"),withXsrfToken:Ca.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&tr.merge(a.common,a[t.method]);a&&tr.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=Mr.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=[ya.bind(this),void 0];for(e.unshift(...o),e.push(...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<l;){const e=o[u++],t=o[u++];try{p=e(p)}catch(e){t.call(this,e);break}}try{d=ya.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 yr(Yr((e=Jr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}tr.forEach(["delete","get","head","options"],(function(e){_a.prototype[e]=function(t,n){return this.request(Jr(n||{},{method:e,url:t,data:(n||{}).data}))}})),tr.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(Jr(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}_a.prototype[e]=t(),_a.prototype[e+"Form"]=t(!0)}));const Sa=_a;class Na{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 Ur(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)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Na((function(t){e=t})),cancel:e}}}const Ta=Na;const ba={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(ba).forEach((([e,t])=>{ba[t]=e}));const Oa=ba;const Pa=function e(t){const n=new Sa(t),r=un(Sa.prototype.request,n);return tr.extend(r,Sa.prototype,n,{allOwnKeys:!0}),tr.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Jr(t,n))},r}(Pr);Pa.Axios=Sa,Pa.CanceledError=Ur,Pa.CancelToken=Ta,Pa.isCancel=Fr,Pa.VERSION=ma,Pa.toFormData=lr,Pa.AxiosError=sr,Pa.Cancel=Pa.CanceledError,Pa.all=function(e){return Promise.all(e)},Pa.spread=function(e){return function(t){return e.apply(null,t)}},Pa.isAxiosError=function(e){return tr.isObject(e)&&!0===e.isAxiosError},Pa.mergeConfig=Jr,Pa.AxiosHeaders=Mr,Pa.formToJSON=e=>br(tr.isHTMLForm(e)?new FormData(e):e),Pa.getAdapter=ga,Pa.HttpStatusCode=Oa,Pa.default=Pa;const Da=Pa;function Ra(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 $a=Ra((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var va=function(e,t){return va=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])},va(e,t)};function xa(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}va(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function wa(e,t,n,r){return new(n||(n=Promise))((function(a,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function i(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function Ma(e,t){var n,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(s=0)),s;)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 s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}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])}}}Object.create;function La(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 Fa(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 ja(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 Ua(e){return this instanceof Ua?(this.v=e,this):new Ua(e)}function ka(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,d)}})),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){a[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||i(e,t)}))},t&&(r[e]=t(r[e])))}function i(e,t){try{(n=a[e](t)).value instanceof Ua?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])}}function Va(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=La(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)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ba=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Ga(e){return"function"==typeof e}function Wa(e){return Ga(null==e?void 0:e.then)}var Ha=Ra((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 qa(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var za=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=La(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(Ga(c))try{c()}catch(e){a=e instanceof Ha?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var l=La(d),u=l.next();!u.done;u=l.next()){var p=u.value;try{Ja(p)}catch(e){a=null!=a?a:[],e instanceof Ha?a=ja(ja([],Fa(a)),Fa(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 Ha(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Ja(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)&&qa(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&qa(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Ya=za.EMPTY;function Ka(e){return e instanceof za||e&&"closed"in e&&Ga(e.remove)&&Ga(e.add)&&Ga(e.unsubscribe)}function Ja(e){Ga(e)?e():e.unsubscribe()}var Xa={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Qa={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=Qa.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,ja([e,t],Fa(n))):setTimeout.apply(void 0,ja([e,t],Fa(n)))},clearTimeout:function(e){var t=Qa.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Za(e){Qa.setTimeout((function(){var t=Xa.onUnhandledError;if(!t)throw e;t(e)}))}function es(){}var ts=ns("C",void 0,void 0);function ns(e,t,n){return{kind:e,value:t,error:n}}var rs=null;function as(e){if(Xa.useDeprecatedSynchronousErrorHandling){var t=!rs;if(t&&(rs={errorThrown:!1,error:null}),e(),t){var n=rs,r=n.errorThrown,a=n.error;if(rs=null,r)throw a}}else e()}var ss=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Ka(t)&&t.add(n)):n.destination=ps,n}return xa(t,e),t.create=function(e,t,n){return new ds(e,t,n)},t.prototype.next=function(e){this.isStopped?us(function(e){return ns("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?us(ns("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?us(ts,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}(za),os=Function.prototype.bind;function is(e,t){return os.call(e,t)}var cs=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){ls(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ls(e)}else ls(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ls(e)}},e}(),ds=function(e){function t(t,n,r){var a,s,o=e.call(this)||this;Ga(t)||!t?a={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&Xa.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},a={next:t.next&&is(t.next,s),error:t.error&&is(t.error,s),complete:t.complete&&is(t.complete,s)}):a=t;return o.destination=new cs(a),o}return xa(t,e),t}(ss);function ls(e){var t;Xa.useDeprecatedSynchronousErrorHandling?(t=e,Xa.useDeprecatedSynchronousErrorHandling&&rs&&(rs.errorThrown=!0,rs.error=t)):Za(e)}function us(e,t){var n=Xa.onStoppedNotification;n&&Qa.setTimeout((function(){return n(e,t)}))}var ps={closed:!0,next:es,error:function(e){throw e},complete:es},hs="function"==typeof Symbol&&Symbol.observable||"@@observable";function gs(e){return e}function fs(e){return 0===e.length?gs:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var ys=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 ss||function(e){return e&&Ga(e.next)&&Ga(e.error)&&Ga(e.complete)}(r)&&Ka(r)?e:new ds(e,t,n);return as((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=ms(t))((function(t,r){var a=new ds({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[hs]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fs(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=ms(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 ms(e){var t;return null!==(t=null!=e?e:Xa.Promise)&&void 0!==t?t:Promise}function Is(e){return Ga(e[hs])}function Es(e){return Symbol.asyncIterator&&Ga(null==e?void 0:e[Symbol.asyncIterator])}function As(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 Cs="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function _s(e){return Ga(null==e?void 0:e[Cs])}function Ss(e){return ka(this,arguments,(function(){var t,n,r;return Ma(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,Ua(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,Ua(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Ua(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 Ns(e){return Ga(null==e?void 0:e.getReader)}function Ts(e){if(e instanceof ys)return e;if(null!=e){if(Is(e))return a=e,new ys((function(e){var t=a[hs]();if(Ga(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Ba(e))return r=e,new ys((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(Wa(e))return n=e,new ys((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,Za)}));if(Es(e))return bs(e);if(_s(e))return t=e,new ys((function(e){var n,r;try{for(var a=La(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(Ns(e))return bs(Ss(e))}var t,n,r,a;throw As(e)}function bs(e){return new ys((function(t){(function(e,t){var n,r,a,s;return wa(this,void 0,void 0,(function(){var o,i;return Ma(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Va(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 Os(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 Ps(e){return function(t){if(function(e){return Ga(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 Ds(e,t,n,r,a){return new Rs(e,t,n,r,a)}var Rs=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 xa(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}(ss);function $s(e,t){return void 0===t&&(t=0),Ps((function(n,r){n.subscribe(Ds(r,(function(n){return Os(r,e,(function(){return r.next(n)}),t)}),(function(){return Os(r,e,(function(){return r.complete()}),t)}),(function(n){return Os(r,e,(function(){return r.error(n)}),t)})))}))}function vs(e,t){return void 0===t&&(t=0),Ps((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function xs(e,t){if(!e)throw new Error("Iterable cannot be null");return new ys((function(n){Os(n,t,(function(){var r=e[Symbol.asyncIterator]();Os(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function ws(e,t){if(null!=e){if(Is(e))return function(e,t){return Ts(e).pipe(vs(t),$s(t))}(e,t);if(Ba(e))return function(e,t){return new ys((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(Wa(e))return function(e,t){return Ts(e).pipe(vs(t),$s(t))}(e,t);if(Es(e))return xs(e,t);if(_s(e))return function(e,t){return new ys((function(n){var r;return Os(n,t,(function(){r=e[Cs](),Os(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 Ga(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Ns(e))return function(e,t){return xs(Ss(e),t)}(e,t)}throw As(e)}function Ms(e,t){return t?ws(e,t):Ts(e)}function Ls(e,t,n){var r=Ga(e)||t||n?{next:e,error:t,complete:n}:e;return r?Ps((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe(Ds(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)})))})):gs}function Fs(e){return Ps((function(t,n){var r,a=null,s=!1;a=t.subscribe(Ds(n,void 0,void 0,(function(o){r=Ts(e(o,Fs(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):s=!0}))),s&&(a.unsubscribe(),a=null,r.subscribe(n))}))}class js{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new js(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const Us=js;const ks=class{constructor(e,t,n,r={}){this.type=F.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},Vs=/(([^.]+)\[\d+\])/g,Bs=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(Vs);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},Gs=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:Ws,WHEN:Hs,DECLARATIVE_TARGET:qs,PAGELIST:zs}=j.CONTEXT_TREE_NODE_TYPES;const Ys=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[Ws,new Map],[Hs,new Map],[qs,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===zs){const n=this.references.get(Ws);n.set(e,t),this.references.set(Ws,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=Gs(n.name,e);return-1!==r&&+r>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(Ws),a=this.references.get(qs);[...r.keys(),...a.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=Bs(e);return+n>=t})).forEach((e=>{const t=r.get(e),n=t?.parent;n?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new Us(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),a=r?.get(e);a?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,a){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const s=`${e}.${n}.${r}`,o=new ks(t,n,r,a),i=this.references.get("WHEN");i?.set(s,o)}},{VIEW:Ks,FIELD:Js,CONTEXT:Xs,DECLARATIVE_TARGET:Qs,WHEN:Zs}=F.CONTEXT_TREE_NODE_TYPES;const eo=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new Ys(Xs,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}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}pushChildPageNodeToParentView(e,t,n){const r=e.children;let a=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){a=!0;break}a||r.push(t),t.parent=e}addViewNode(e,t,n,r){const a=this.addContextNode(e).addNode("PAGE",t);let s=null;if(r&&n!==r){s=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else s=a.addNode("VIEW",n);a.addReference(n,s);const o=t.split(".");for(;o.length>0;){o.pop();const n=o.join("."),s=this.getContextNode(e)?.getNode("PAGE",n),i=s?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,a,t);break}}return s}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,a){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const s=this.addContextNode(e),o=s.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,a);return o&&s.addReference(`${t}.${r}`,o),o}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,a){const s=this.getContextNode(e);s?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,a),s?.removeReference(`${t}${r}`,Js,a),s?.removeReference(`${t}${r}`,Qs,a)}removeViewNode(e,t,n,r){const a=this.getContextNode(e),s=a?.getNode("PAGE",t),o=s?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=o?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&o?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const a=this.getContextNode(e),s=a?.getNode("PAGE",t),o=s?.getReference(n);o?.children.forEach((s=>{"PAGE"===s.type?this.removeViewNode(e,s.name,n,r):s.type===Ks?this.removeChildViewNodes(e,t,s.name,r):(a.removeReference(s.name,Js,s.props.index),a.removeReference(s.name,Qs,s.props.index),"PAGELIST"!==s.type&&"Address"!==s.props?.componentName||this.deleteAllListNodes(e,s.name))})),s?.references.delete(n)}deleteAllListNodes(e,t,n=!0){const r=r=>{const a=this.getContextNode(e),s=a?.references?.get(r);if(s)for(const[e]of s)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&a?.references?.get(r)?.delete(e)};r(Js),r(Qs)}deleteListNode(e,t,n){const r=r=>{const a=this.getContextNode(e),s=a?.references?.get(r);if(s)for(const[e]of s)e.includes(`${t.join(".")}[${n}]`)&&a?.references?.get(r)?.delete(e)};r(Js),r(Qs)}getPageListNode(e,t,n,r){const a=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return a?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(Js,r)}_findViewNode(e,t,n,r){let a=r.addNode("PAGE",t)?.getReference(n);if(a)return a;const s=t.split(".");for(;s.length>0;){s.pop();const e=s.join(".");if(a=r.addNode("PAGE",e)?.getReference(n),a)return a}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,a,s={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),c=this.createFieldNode(i,t,r,s);return c&&this.updateFieldNode(o,i,c,e,t,r,a),c}createFieldNode(e,t,n,r){const{isDeclarativeTarget:a}=r;return a?e.addNode(Qs,`${t}${n}`,r):e.addNode(Js,`${t}${n}`,r)}updateFieldNode(e,t,n,r,a,s,o){const i=`${a}${s}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(r,n.name),e.addReference(i,n),n.value=o,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,r,a,s)}handleFieldInsideList(e,t,n,r,a){const s=qp(n),o=Ip(s,n)||{},i=`${r}${a}`;let c=null;if(o?.subscriptFieldName||o?.isPageGroup)c=r.substring(0,r.lastIndexOf(`.${o?.index??""}`))||i.substring(0,i.lastIndexOf(`.${o?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=r.substring(0,r.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let r=e.getReference(n,Js);r||(r=t.addNode(Js,n,{}),e.addReference(n,r))}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]=Bs(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,s,o,{...r,rowIndex:i});const c=a?.getReference(`${t}.${n}`,Js);c&&c instanceof Us&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,a){this.getPageListNode(e,t,n,r)?.addEventListener(a)}mutatePageList(e,t,n,r,a=!1){const s=this.getContextNode(e),o=s?.getReference(`${t}.${n}`,Js);o&&o instanceof Us&&o.triggerEvent(r,a)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(Js)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(Js)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(Qs)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(Js)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(Qs)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(Js)?.get(t);r instanceof Us&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,Js),n=this.getContextReferencesByType(e,Qs);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,Js)?.get(t)||!!this.getContextReferencesByType(e,Qs)?.get(t)}addWhenNode(e,t,n,r,a,s){const o=this.getContextNode(e);o?.addWhen(t,n,r,a,s)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(Qs)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,a=t.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:a,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(Zs)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,a=e.name,s=e?.props?.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({name:a,pageReference:s,referenceName:n,type:t})})),r}},to={CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT],FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.HTTP_MESSAGES],CASE_MESSAGE_PATH:[j.CASEMESSAGES]},no=(e="",t="",n,r)=>{let a=[],s=[];null!==e&&(s=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===j.PROPERTY&&e||e){a=[j.CONTEXT_DATA,...o.split(".")];for(let e=0;e<s.length-1;e+=1)a.push(s[e]);a.push(j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES,s[s.length-1])}else n===F.PAGE?a=[...to.PAGE_MESSAGES_PATH]:n===j.HTTP?a=[...to.HTTP_MESSAGES_PATH]:n===j.CASEMESSAGES?a=[...to.CASE_MESSAGE_PATH]:r&&(a=[j.CONTEXT_DATA,...o.split(".")]);return a.filter(Boolean)},ro=(e,t,n)=>{const r={content:{}},a=`${t.split(".").slice(2).join(".")}[${n}]`,s=jg.getIn(e?.content,a.split("."));return s&&jg.setIn(r.content,a.split("."),{...s}),r},ao=(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)}]`]=jg.getIn(e[t],[j.CONTEXT_DATA,...a.split(".")]),jg.deleteIn(e[t],[j.CONTEXT_DATA,...a.split(".")])}));const d=Object.keys(o);d.length>0&&d.forEach((n=>{jg.setIn(e[t],[j.CONTEXT_DATA,...n.split(".")],o[n])}))},so=(e,t,n,r,a)=>{const s=jg.deepClone(jg.getIn(e,[`${t}`])),o=jg.getIn(s,[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO]);if(!o)return;const i=(e=>{const t=[];let n=0;for(;n<e.length;)n+1<e.length&&!Number.isNaN(parseInt(e[n+1],10))?(t.push(`${e[n]}[${e[n+1]}]`),n+=2):(t.push(e[n]),n+=1);return t.join(".")})(n.split(".")),c=i.substring(0,i.lastIndexOf(".")),d=((e,t,n)=>{const r=jg.getIn(e,[j.CONTEXT_DATA,...n.split(".")],{});return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(s,i.substring(i.lastIndexOf(".")+1),c);if(0===d.length)return;const l=ro(o,i,r).content;if(l&&Object.keys(l).length>0){const n={},o=`${i}[${r}]`,c=jg.getIn(s,[j.CONTEXT_DATA,...o.split(".")]);n[`${i}[${a}]`]=c,jg.deleteIn(e[t],[j.CONTEXT_DATA,...o.split(".")]),ao(e,t,d,r,a,i,n)}else ao(e,t,d,r,a,i)},oo=e=>{const{type:t,property:n,category:r,context:a,pageReference:s}=e;let o;n&&(o=n.slice(1));const i=Sg(a);let c=[];const d=jg.getIn(i,no(o,s,r));return t&&"all"!==t?(d&&Array.isArray(d)&&d.length>0&&(c=d.filter((e=>e.type===t))),t===F.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&eo.mutateField(a,s,n,{messages:[...c],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):d},io=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?(eo.mutateField(a,n,t,{type:et,fieldName:t}),d.property=t,d.pageReference=n):o?(d.pageReference=n,d.isListEntry=o,d.deletingIndex=c):d.category=r,_g(i?{type:et,payload:{stateObj:e.stateObj,context:a}}:{type:et,payload:d})},co=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,_g({type:Ze,payload:o})},lo=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===j.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&lo(e[r],t,n)}t.pop()}return n},uo=(e,t)=>{let n=oo({context:j.APP.ROOT,category:"HTTP"});if(Ph.getRenderingMode()===j.EMBED){const e=oo({context:j.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=oo({context:t,category:"HTTP"});n?e&&(n=n.concat(oo({context:t,category:"HTTP"}))):n=oo({context:t,category:"HTTP"})}return n},po=e=>{let t=null;t=wp(e)[0]?Pp(wp(e)[0]):e,t&&io({context:t,stateObj:Sg(t),clearContextMessages:!0})},ho=e=>(jg.getIn(Sg(e),to.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===j.CUSTOM_ERROR)),go={addMessages:co,getValidationErrorMessages:(e,t)=>{const n=Sg(e),r=(e=>{let t=to.CONTENT_FIELDS_PATH;e?.objectInfo?t=Dd.isObjectCaseType(e?.objectInfo?.objectTypeID)?to.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=to.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),a=jg.getIn(n,[...r])||{},s=[];return lo(a,[],[]).forEach((e=>{const n=jg.getIn(a,[...e,j.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===j.MESSAGES.MESSAGES_TYPE_ERROR){const n=t?.getLocalizedMessage(e.message)??e.message;e.fieldLabel?s.push({label:`${e.fieldLabel}:`,description:n}):s.push(n)}}))}))})),s},getMessages:oo,clearMessages:io,getRootContainerHttpMessages:uo,clearContextMessagesInActiveWorkArea:po,clearContextMessages:e=>{const{context:t}=e;_g({type:et,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:ho},fo=go;const yo=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const mo=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})),-1!==s&&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 yo(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}))}};const Io=class{static subscribe(e,t,n,r=!1,a="app"){mo.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){mo.publish(e,t)}static unsubscribe(e,t,n="app"){mo.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){mo.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){mo.clearContext(e)}};const Eo=new class{#e;#t;constructor(){this.#e="true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}toggleXRay(e){console.warn("The toggleXRay method is deprecated. Please use the toggleInspector method going forward."),e&&!this.inspectorEnabled&&this.toggleInspector(),!e&&this.inspectorEnabled&&this.toggleInspector()}get inspectorEnabled(){return this.#e}get inspectorShowAll(){return this.#t}toggleInspector(){const e="true"===localStorage.getItem("inspectorFlag");this.#e=!e,localStorage.setItem("inspectorFlag",this.#e.toString()),Io.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,Io.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0;metric=1"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0;metric=1"};getDebugLevels=()=>this.debugLevels};class Ao{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Ao(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Ko(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Jo()}async buildAuthorizeUrl(e){e=e||window.btoa(window.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:Oh.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo?.session_index;let d="";t?d=`&session_index=${t}`:`${c}`?d=`&UserIdentifier=${c}`:n&&(d=`&Password=${window.atob(n)}`);const 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=e.indexOf("/",t+2);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 n&&l.append("client_id",n),r&&l.append("client_secret",r),l.append("grant_type","authorization_code"),l.append("code",d),a&&l.append("redirect_uri",a),o&&l.append("code_verifier",o),this.config?.secureCookie&&l.append("send_token_as_cookie","true"),Bo(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),this.config?.secureCookie?zo({pzCTkn:e?.csrf}):(Yo({tokenInfo:e}),zo({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 Co=Ao,_o=async()=>new Promise((async(e,t)=>{const n=Xo();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,secureCookie:c,serverType:d}=n,l="launchpad"===d,u={"content-type":"application/x-www-form-urlencoded"};i&&!l&&(u.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const p=new URLSearchParams;i?l&&(p.append("client_id",o),p.append("client_secret",i)):p.append("client_id",o),c&&p.append("send_token_as_cookie","true");const h=a?"refresh_token":"access_token",g="access_token"===h?r:a;!c&&g&&p.append("token",g),p.append("token_type_hint",h),s&&await Bo(s,{method:"POST",headers:new Headers(u),credentials:c?"include":"omit",body:p.toString(),withoutDefaultHeaders:!0}),zo({Authorization:null}),Yo({tokenInfo:null}),e()})),So=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Co(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(I()?`${I()}`:"/?reAuth=true");return t},No=(e,t)=>{So(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};Io.publish(F.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},To=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"),e.clientSecret&&s.append("client_secret",e.clientSecret),e.secureCookie&&s.append("send_token_as_cookie","true"),e.tokenInfo?.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=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};Yo({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?zo({pzCTkn:n?.csrf}):zo({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:a}=e;a&&"function"==typeof a&&a(n)},failure:t=>{if(e.popupReauth)return No(t,e);Io.publish(F.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:No};return{url:t,config:n,callback:r,isRefreshTokenPresent:a}},bo=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Oo=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}},Po=(e,t,n)=>{const{config:r}=e,{url:a,config:s,callback:o,isRefreshTokenPresent:i}=To(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const d=Go(r.url,r,c,t);return i?Bo(a,s).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),Io.publish("updateSession",{updateStatus:"success"}),Io.publish("OnUpdateSession",{}),d.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&bo(e.config.url,n)?(o?.failure?.(r.url,n),d):Promise.reject(e))):(o?.failure?.(r.url,n),d)},Do=(e,t,n,r)=>{if(e.config&&bo(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(Io.unsubscribeAllWithEventType(xo),t.setUpdateSessionStatus(!0),"custom"===n?.authType){Io.publish(F.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=Oo(e);return Go(n,r,a,t)}return Po(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=Oo(e);return Bo(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==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[F.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[F.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=e.config.headers.context;return co({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Ro=class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const $o=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{[j.COREHEADER_APP_DEBUG_ID]:e.debugId,[j.COREHEADER_APP_DEBUG_LEVELS]:Eo.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Bg.getProperty(j.COREHEADERS,"",e);return t?{...t,debugInfo:Eo.getPreviewMode()&&{...t.debugInfo,[j.COREHEADER_APP_DEBUG_LEVELS]:Eo.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(j.SKIPCOREHEADERS))return void delete e[j.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&&V.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},vo=$o;const xo="updateSession",wo={},Mo=new Ro,Lo=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(Io.unsubscribe(F.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{Io.publish(F.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),Io.subscribe(F.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let Fo={},jo={},Uo={},ko="";const Vo=e=>{Fo=e},Bo=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:s=n,includeRemoteSystemIdIfPresent:o=!0}=r;ko=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,pzCTkn:p,...h}=t.headers||{};d||vo.injectCoreAdditionalHeaders(h,t.body,n,{includeRemoteSystemIdIfPresent:o}),s&&wo[s]>=0?wo[s]+=1:s&&void 0===wo[s]&&(wo[s]=1);let g=d?{...h}:{...vo.getDefaultHeaders(),...vo.getRegisteredHeaders(),...h,context:n};if(e&&bo(e,jo)&&Mo.getUpdateSessionStatus()||!Mo.getUpdateSessionStatus()){bo(e,jo)&&"OAuth2.0"===jo?.authType&&(g={...h});const{restApi:t}=Oh.doesRestApiExist("Logout")&&Oh.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&Lo.setTimerID(Lo.resetInactiveTimeout(Lo.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,a){var s,o=!1;e.subscribe({next:function(e){s=e,o=!0},error:a,complete:function(){o?r(s):n?r(t.defaultValue):a(new $a)}})}))}(Ms(Da({context:n,...l,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},headers:g,withCredentials:(f=jo,!("OAuth2.0"!==f?.authType||!f.secureCookie)||!("custom"!==f?.authType||!f.customCookies)||void 0)})).pipe(Ls((()=>{const e=vo.getCoreHeadersFromContext(g.context);e&&(e=>{Io.publish(j.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})})),Fs((e=>{const t=g,n=!!t?.[j.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:t?.[j.COREHEADER_APP_DEBUG_ID],[j.COREHEADER_APP_DEBUG_LEVELS]:Eo.getDebugLevels()}}:vo.getCoreHeadersFromContext(g.context);throw n&&(e=>{Io.publish(j.PUB_SUB_EVENTS.FETCH_FAILURE,e)})({...n,error:e}),e}))))}var f;return Go(e,t,n,Mo)},Go=(e,t,n,r)=>new Promise(((a,s)=>{Io.subscribe(xo,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?Bo(e,t,n).then((e=>a(e))).catch((e=>s(e))):s(o.updateStatus.error)}),xo)})),Wo=e=>{wo[e]>0&&(wo[e]-=1,0===wo[e]&&delete wo[e])};Da.interceptors.request.use((e=>(Fo.request&&(e=Fo.request(e)),e)),(e=>Promise.reject(e))),Da.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"))),co({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(oo({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&io({type:"error",category:"HTTP",context:e.config.headers.context}),oo({type:"error",category:e.config.headers.context===j.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&io({type:"error",category:"PAGE",context:e.config.headers.context})),Wo(e.config.headers.context)),Fo.response&&(e=Fo.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&Wo(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config&&bo(e.config.url,jo)||Io.subscribe(xo,(e=>{Mo.setUpdateSessionStatus(!e.updateStatus)}),xo),Do(e,Mo,jo,e.response&&e.response.status&&e.response.status===Number(ko)?ko:null))));const Ho=()=>Da.CancelToken.source(),qo=e=>Da.isCancel(e),zo=e=>{vo.setDefaultHeaders(e)},Yo=e=>{jo={...jo,...e}},Ko=e=>{Uo={...Uo,...e}},Jo=()=>({...Uo}),Xo=()=>({...jo});const Qo=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 formatePageReferenceToArrayIndex(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);if(!Number.isNaN(a)){const r=a-1;return`${e.substring(0,t)}[${r}]${e.substring(n+1)}`}}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}};const Zo=class{static execute(e,t,n,r){const a={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{a[e]=n[e],delete n[e]})),delete n.nonFormProperties);const s={instruction:"string"==typeof t?"ADD":"INSERT",content:{...jg.unflatten(n)}},o=JSON.parse(JSON.stringify(s));delete o.content.classID;return{instruction:{target:jg.buildInstructionPageReference(r,e),content:{...o.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:s,displayPropertPayload:a}}};const ei=class{static execute(e,t,n,r,a,s,o,i){const c={instruction:"UPDATE",content:{...jg.unflatten(r)},isDefault:i},d={content:{...c.content},target:jg.buildInstructionPageReference(a,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return s||_g(bf({...c,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${a}${t}`,skipDirtyValidation:o})),d}};const ti=class{static execute(e,t,n){return{target:jg.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const ni=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:jg.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||_g(bf({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const ri=class{static execute(e,t,n,r){return{target:jg.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const ai=class{static execute(e,t,n){const r={instruction:"REPLACE",content:{...jg.unflatten(t)}};return{instruction:{target:jg.buildInstructionPageReference(n,e),content:{...r.content},instruction:"REPLACE"},actionPayload:r}}};const si=class{static execute(e,t){return{target:jg.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const oi=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const ii=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 oi(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)||[];if(Array.isArray(r)){if(t)return void r.forEach(((e,r)=>{t.forEach((t=>{const a=md(t),s={};let o=!0;n&&(s[md(n)]=crypto.randomUUID(),o=!1);const i={[a]:jg.getIn(e,a),...s};this.update(i,r+1,o,{isDefault:!0,skipDirtyValidation:!0})}))}));r.forEach(((e,t)=>{if(n&&!e[md(n)]){const e={};e[md(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&r&&"object"==typeof r&&!Array.isArray(r)&&Object.keys(r).length>0&&this.processObjectRows(r,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((r=>{const a=e[r];t.forEach((e=>{const t=md(e),s={};let o=!0;n&&(s[md(n)]=crypto.randomUUID(),o=!1);const i={[`${t}`]:jg.getIn(a,t),...s};this.update(i,r,o,{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{isDefault:a=!1,skipPageinstruction:s,skipDirtyValidation:o=!1}=r,i=ei.execute(this.contextName,this.target,t,e,this.pageReference,n,o,a);if(!s){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=vg(jg.deepClone(n),e,r)}if(this.current?.automatic!==a||this.current?.instruction?.groupIndex!==t&&this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(i),a&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=vg(jg.deepClone(t),jg.unflatten(e),r)}}}delete(e,t){const n=ti.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||_g(bf({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:a,actionPayload:s={content:{}},displayPropertPayload:o={}}=Zo.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList("string"==typeof t?t:t-1),!i){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=vg(jg.deepClone(n),e,r)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=a:this.insertNode(a),n||(s.content={...s.content,...o},_g(bf({...s,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:r.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e,t){const{instruction:n,actionPayload:r}=ai.execute(this.target,e,this.pageReference);this.insertNode(n),t||_g(bf({...r,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}deletePage(e){const t=si.execute(this.target,this.pageReference);this.insertNode(t),e||_g(bf({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}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=ri.execute(this.target,e,t,this.pageReference);this.insertNode(r),_g(bf({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=ni.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),ni.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=vg(jg.deepClone(t),e)}},ci={},di={},li={},ui=(e,t,n)=>{ci[e]||(ci[e]={}),ci[e][t]||(ci[e][t]={content:[]}),di[e]||(di[e]=[],li[e]=[]),fd.isStateMachineExist(e,n,t)||fd.setStateMachine(e,t,n,new ii(t,n,e))},pi=e=>Qo.formatPageReference(e),hi=(e,t)=>{const n=di[e],r=li[e],a=md(t),s=a?.substring(0,a.indexOf("["));r?.indexOf(s)<0&&li[e].push(s),n?.indexOf(a)<0&&di[e].push(a)},gi=e=>{delete di[e]},fi=e=>fd.buildPageInstructionsByContext(e),yi=e=>{fd.clearStateMachines(e),delete ci[e]},mi=(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]})))},Ii=(e,t,n,r,a)=>{const{skipStateUpdate:s=!1,insertIfEmpty:o=!1}=a||{},i=n.getContextName(),c=n.getReferenceList(),d=r||n.getPageReference(),l=pi(c);ui(i,l,d),hi(i,`${c}[${t}]`),mi(c,d,e,t);const u={instruction:j.LIST_ACTIONS.INSERT,content:{...jg.unflatten(e)}};delete JSON.parse(JSON.stringify(u)).content.classID;const p=fd.getStateMachine(i,d,l);o&&p?.root||p.insert(e,t+1,s,{c11nEnv:n})},Ei=(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(F.CONTENT)+F.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const d=pi(i);ui(o,d,c),hi(o,`${i}[${n}]`),mi(i,c,e,n);fd.getStateMachine(o,c,d).update(e,n+1,a,r)},Ai=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Ci=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(Ai(e,n)){const n=jg.getPropertyName(e),a=n.substr(n.indexOf(".")+1).split(".");if(a.length>1){let e=jg.getIn(t,a)??"";if(!e){const n=`!P!${a.join(":")}`;e=jg.getIn(t,n)??""}jg.setIn(r,a,e)}else{const e=jg.getIn(t,a)??"";r[a[a.length-1]]=e}}})),r},_i=(e,t,n,r,a)=>{const s=e.getValue(t)||{};n&&Object.keys(s).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},Si=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:s,selectionList:o,required:i}=t.getConfigProps(),c=s===j.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=>{const n=jg.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(I,y,c),c){let n=o;n=pi(n);const r=t.getValue(f)||[];ui(t.getContextName(),n,l);const s=[];let i=r.length;e.forEach((e=>{const t=Ci(m,e,u),o={};if(Object.hasOwn(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=fd.getStateMachine(d,l,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}s.push({instruction:e.$selected?j.LIST_ACTIONS.SELECT:j.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),_g(bf({instruction:j.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:d,referenceList:`${l}.${u}`,actions:s}))}else{const n=Ci(I,e[0],u);Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],g?{contextPageReference:l}:{}),t.getActionsApi().triggerFieldChange(`.${u}.${e}`,n[e])}))}_i(t,f,i,c,u),r()})),Ni=e=>{if(!e)return!1;const t=(n=e,fd.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const Ti=(e,t,n={})=>{const{skipStateUpdate:r=!1}=n,a=e.getPageReference(),s=pi(t);ui(e.getContextName(),t,a);fd.getStateMachine(e.getContextName(),a,s).deleteAll(r)},bi=e=>({insert:(t,n,r,a)=>Ii(t,n,e,r,a),update:(t,n,r)=>Ei(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r={})=>{const a=n.getPageReference(),{stateMachineTarget:s}=fd.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),`${a}${e}`.endsWith("]"));if(!s){let e=a.substring(0,a.lastIndexOf("["));e||(e=a.substring(0,a.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&ui(n.getContextName(),t,e)}fd.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:a=!1}=r||{},s=t.getContextName(),o=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+o}[${e}]`,d=pi(o);io({type:F.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:s,isListEntry:!0,deletingIndex:e}),ui(s,d,i),hi(s,`${o}[${e}]`);const l=fd.getStateMachine(s,i,d);"string"==typeof e?l.delete(e,a):l.delete(e+1,a);const u=fd.getUnConnectedStateMachines(s)||{};Object.keys(u).forEach((e=>{e.includes(`${i}${d}`)&&e!==`${i}${d}`&&(u[e]=null)}))})(t,e,n,r),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),s=n.getPageReference(),o=pi(a);ui(r,o,s),eo.deleteAllListNodes(r,`${s}${o}`,!1),hi(r,`${a}[${t}]`),fd.getStateMachine(r,s,o).move(e+1,t+1);const i=fd.getUnConnectedStateMachines(r)||{};Object.keys(i)?.forEach((e=>{e.includes(`${s}${o}`)&&e!==`${s}${o}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Si(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let s=t.getPageReference();const o=n===j.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 Ai(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=pi(i),ui(r,i,a),fd.getStateMachine(r,a,i).deleteAll(),_i(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===j.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===s&&o&&(i=e.getStateProps().referenceList),i){i=pi(i);const r=fd.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=pi(t);ui(a,o,s),fd.getStateMachine(a,s,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n)=>Ti(e,t,n),replacePage:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:a=!1}=r||{},s=e.getPageReference(),o=e.getContextName();ui(o,t,s),hi(o,jg.buildInstructionPageReference(s,t)),fd.getStateMachine(o,s,t).replacePage(n,a)})(e,t,n,r),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:r=!1}=n||{},a=e.getPageReference(),s=e.getContextName();ui(s,t,a),hi(s,jg.buildInstructionPageReference(a,t)),fd.getStateMachine(s,a,t).deletePage(r)})(e,t,n)});const Oi=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?jg.mergeDeep(e,this.fieldDefaults):jg.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},"object"==typeof this.fieldDefaults[e]&&null!==this.fieldDefaults[e]&&(this.fieldDefaults[e][t]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},Pi="downloadAttachment",Di={},Ri=e=>{const t=Ho();return Di[e]=t,t},$i=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},vi=e=>{let t,n,r,a;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,a=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:$i(e.pyMimeFileExtension||e.MimeType),error:e.error||null,thumbnail:e.thumbnail||null},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:a,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.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null),localAttachment:!!e.localAttachment}}},xi=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,"pyCount"))n=!0,t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>vi(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(vi)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},wi={uploadAttachment:(e,t,n,r)=>{const a=new FormData;a.append("appendUniqueIdToFileName","true"),a.append("file",e);const{restApi:s,reqType:o}=Vf("uploadAttachment",{});return Bo(s,{method:o,headers:{"Content-Type":"multipart/form-data"},body:a,onUploadProgress:t,signal:Ri(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(qo,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete Di[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(a.signal=Ri(n).token)}const{restApi:s,reqType:o}=Vf("linkCaseAttachment",{caseID:e});return Bo(s,{...a,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=Vf("getCaseAttachments",{caseID:e,includeThumbnail:n});return Bo(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=Vf("getAttachmentCategories",{caseID:e,type:t});return Bo(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Vf(Pi,{attachmentID:e});return Bo(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Vf("editAttachment",{attachmentID:e});return Bo(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=Vf("deleteAttachment",{attachmentID:e});return Bo(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=Vf("downloadDocument",{documentID:e});return Bo(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=Vf("deleteDocument",{caseID:e,documentID:t});return Bo(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 occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{Di[e]&&(Di[e].cancel(),delete Di[e])},buildFilePropsFromResponse:vi,getAttachmentURL:e=>{const{restApi:t}=Vf(Pi,{attachmentID:e});return t},prepareAttachmentData:xi,validateAttachments:(e,t)=>{let n=e;if("object"==typeof t&&"attachments"in t){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=xi(t);0===e.length&&(n="")}return n}};class Mi{constructor(){this.validators={}}static messageDispatcher(e,t,n,r,a){if(r){const s=[];s.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),co({messages:s,property:e,pageReference:t,context:n})}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,a,s){const{required:o,value:i}=s;let c=null;if(!("true"!==o&&!0!==o)){let o=r;switch(e){case"radiobuttons":o=i;break;case"attachment":o=wi.validateAttachments(r,i);break;case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),Mi.messageDispatcher(t,n,a,c,Qo.getFieldLabel(s))}return c}validateType(e,t,n,r,a,s){let o=null;const i={pageReference:n,context:a,property:t,target:s?.target,required:s?.required};let c=Oi.getDefaultsforType(s?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(r,i),(""!==r||Oi.getDefaultsforType(s?.componentName||"")?.showErrorWhenEmpty)&&Mi.messageDispatcher(t,n,a,o,s?.label));const d=s?.validationType;return c=d&&Oi.getDefaultsforType(d)?.["client-validations"],!1!==c&&d&&this.getValidator(d)&&(o=this.getValidator(d)(r,i),Mi.messageDispatcher(t,n,a,o,s?.label)),o}validate(e,t,n,r={}){const{context:a,disabled:s,readOnly:o,pageReference:i,skipRequiredValidation:c}=r;let d=null;return s||o||(c||(d=this.validateRequired(e,t,i,n,a,r)),d||(d=this.validateType(e,t,i,n,a,r))),{message:d}}isValidatorExist(e){return!!e.validatetype}}const Li=new Mi,Fi=(e,t)=>{e.DeclareExpressions&&t.context&&an({[t.context]:e.DeclareExpressions})},ji=(e,t,n=!1)=>{const r=jg.getIn(e,j.RESOURCES);r&&((e=>{e&&Qh(e)})(r),Fi(r,t)),n||Yf({...e,options:t})};class Ui{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:a,viewType:s=Gc.PAGE,pageName:o,context:i=j.APP.APP,debugInfo:c,headers:d,retrieveActionViewForNewObject:l=!1}=t;let u={};n&&n.content&&(u=n.content);const{content:p,pageInstructions:h}=Ui.getExternalObjectContent(e,l,i);let g={[Ui.getKeyBasedOnWorkType(e)]:e,content:{...u,...r,...Dd.isExternalObject(e)&&!l&&{...p}}};g={...g,...Dd.isExternalObject(e)&&!l&&{pageInstructions:h},...!Dd.isObjectCaseType(e)&&{processID:a}};const f=Ui.getObjectTypeViewPayload(l,e);return Bi(Dd.getRouteKeyForCreateWork(e,l),{body:g,queryPayload:{...f,caseClassName:e,viewType:s,params:{pageName:o}},headers:{...d,...c&&{...vo.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:g,headers:Hc(t.headers,e,d)})))}static getObjectTypeViewPayload=(e,t)=>e?{objectTypeID:t,actionID:"Create"}:{};static getExternalObjectContent=(e,t,n)=>{if(Dd.isExternalObject(e)&&!t){const e=qc(n,{isExternalObject:!0}),{content:t,pageInstructions:r}=e.content;return{content:t,pageInstructions:r}}return{}};static getKeyBasedOnWorkType=e=>Dd.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const ki=Ui,Vi=()=>({registerHeader:(...e)=>vo.registerHeader(...e),unRegisterHeader:(...e)=>vo.unRegisterHeader(...e),getRegisteredHeaders:()=>vo.getRegisteredHeaders()}),Bi=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:s},o,i)=>{const{restApi:c,reqType:d}=Vf(e,n),l={method:d,headers:a,body:t,...s&&{responseType:s}};return r&&(l.signal=r.token),Bo(c,l,o,i??{})},Gi=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},s)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return Bo(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},s)},Wi=e=>Oh.doesRestApiExist(e),Hi=()=>Ho(),qi=e=>qo(e),zi=e=>{Vo(e)},Yi=()=>ki,Ki="getCustomComponent",Ji="text/javascript";const Xi=new class{getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}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?.endsWith("/")?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=Ph.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r);let s=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(s=this.loadAndCustomerComponentsConfig(t,e));const o=[],i=Ph.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([a,s]),[n,r]=t,i=[];for(const t of r)!0===t.isSdkOverridden?e.push(t.componentDefinition):i.push(t.componentDefinition);const c=this.mergeComponentList([n,i,e]);o.push(...c)}else{const e=this.fetchSDKComponent(t);await Promise.all([a,s,e]).then((e=>{const t=this.mergeComponentList(e);o.push(...t)}))}if(n.alternateDesignSystemURL&&1===o.length){const r=await this.getSvcComponentsConfigADS(e,t,n);o[0].alternateDesignSystemConfig=r}return{data:{components:o}}}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((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e,t){let n=null;const r=Ph.environmentInfoObject?.pyInfinityStaticService;if(r){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync("D_pzGetComponentsConfig","",e).then((e=>e.data.map((e=>({componentDefinition:JSON.parse(e.pxComponentDefinition),isSdkOverridden:void 0!==e.pyIsSDKOverridden&&e.pyIsSDKOverridden})))))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((e=>t.includes(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(!0===n.skipLoadCustomerComponents&&a?.data?.components?.length>0&&(a.data.components=a.data.components.filter((e=>void 0===e.componentKey))),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()}getSvcImageUrl(e){const t=Ph.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:r,callUrl:a}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[a]||(this.imageBlobUrlCache[a]=this.fetchImage(n,r,a,t)),this.imageBlobUrlCache[a]}buildImageRequest(e,t){let n,r="getBinaryFile",a=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^\s!]+)!.*\/OPERATORIMAGES\//i,s=e.match(t);s&&s[1]?(r="getOperatorImage",n={user_ID:s[1].toLowerCase()}):n={fileID:e},a=Vf(r,n)?.restApi||a}return{callUrlKey:r,queryPayload:n,callUrl:a}}fetchImage(e,t,n,r){return r?Bi(e,{queryPayload:t}).then((e=>{const t=this.decodeBase64ToByteArray(e.data),n=new Blob([t]);return window.URL.createObjectURL(n)})).catch((e=>{throw console.error("Error fetching image:",e),e})):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e+=1)r[e]=t.charCodeAt(e);return r}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}`}})}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}async getSvcComponent(e){try{const t=Ph.environmentInfoObject?.pyInfinityStaticService;if(t){const t=Ph.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?jg.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`;return(await Bi(Ki,{queryPayload:{componentName:r}})).data}const n=Ph.environmentInfoObject?.pyC11nDXCBDevURL,r=n?`${n}/index.js`:`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,a=await fetch(r,n?{}:{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!a.ok)throw new Error(a.statusText);return await a.text()}catch(e){throw console.error("Error fetching service component:",e),e}}async importCustomComponentMap(e){try{const t=Ph.environmentInfoObject?.pyInfinityStaticService,n=Ph.environmentInfoObject?.pyC11nDXCBDevURL;let r=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(n){r=`${n.replace(/\/+$/,"")}/index.js`}if(t&&!n){const t=Ph.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?jg.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`,a=await Bi(Ki,{queryPayload:{componentName:r}});return void this.appendCustomScriptToHead(a.data)}if(t||n){const e=document.createElement("script");return e.src=r,e.type="text/javascript",e.onerror=()=>console.error("Error while appending custom component map"),void document.head.appendChild(e)}const a=n?{}:{headers:{Authorization:`Bearer ${this.b2sJWT}`}},s=await fetch(r,a);s.ok||console.error("Error while fetching custom component map");const o=await s.text();this.setCCV2LibId(e),this.appendCustomScriptToHead(o)}catch(e){console.error("Exception while appending custom component map:",e)}}async appendCustomScriptToHead(e){try{const t=document.createElement("script");t.src=window.URL.createObjectURL(new Blob([e],{type:Ji})),t.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(t)}catch(e){console.error("Exception appendCustomScriptToHead:",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:Ji})),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;const n=(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);if("script"===t){const t=a;t.onload=()=>{n(e)},t.onerror=()=>{r(e)},t.type=Ji,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=a;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(a)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,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),s=a?.tenant_id,{restApi:o,reqType:i}=kf("getAssetsFromIsolations",{isolationID:s,assetPath:e})||{},c=`${this.appStaticUrl}${o}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},Qi="component-loader",Zi={},ec=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=Xi.getLoader(),r=t||Xi.staticServerURL;if(Xi.getLoader(Qi))return Xi.getLoader(Qi)(e,r);const a=new Set(Object.keys(Zi)),s=e.flatMap((e=>{if(a.has(e))return[];const t=cn.getComponent(e);if(!t){const t=`${Xi.getConstellationServiceUrl()}/v860/${Xi.getAppAlias()}/component/${e}.js`;return a.add(e),[n(t,Xi.getTypes.SCRIPT)]}const s=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${r}${e}`,Xi.getTypes.SCRIPT))),o=(t.styles||[]).map((e=>n(`${r}${e}`,Xi.getTypes.STYLE)));return a.add(e),[...s,...o]}));return Promise.all(s.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))};const tc=new class{#n;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#n=!1}getNormalizedKey(e){return e?.toString().trim().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)),n=t?jg.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(Wi("getUserSettings")){const{restApi:e,reqType:t}=Vf("getUserSettings");Bo(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=()=>{Ph.getUserSettings()?this.userSettings=Ph.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 jg.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"));let n;if(!Wi("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=Vf("updateUserSettings");const{restApi:r,reqType:a}=n;return Bo(r,{method:a,body:jg.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)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#n){this.#n=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};Io.subscribe(j.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}getURLParam(e,t){let n=new URL(window.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!Ph.shouldUseURLParams())return;const r=new URL(window.location.href);if(t=n?btoa(t):t,r.searchParams.get(e)===t)return;r.searchParams.set(e,t);window.history.pushState({type:"ui-navigation"},"",r)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const nc=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&&_g({type:oe,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]&&_g({type:ie,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)}};const rc=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&&nc.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,r;""===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");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),nc.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),nc.disableLoadingIndicator(r.actionPayload,t)):a=null,a}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=V.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=U,e.gadgetId=t.gadgetId??Dd.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ne}};class ac{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 sc=ac,oc=(e,t,n)=>Oh.getResolvedSemanticURL(e,t,n),ic={getResolvedSemanticURL:oc,getActions:()=>({ACTION_OPENWORKBYHANDLE:Be,ACTION_SHOWDATA:Ue,ACTION_SHOWVIEW:je,ACTION_GETOBJECT:Nt,ACTION_SHOWINSIGHT:ke,ACTION_SHOWDASHBOARD:Ve}),updateSemanticURLAndDocumentTitle:e=>Oh.updateSemanticURLAndDocumentTitle(e),getSemanticURLForToaster:(e,t,n=!1)=>oc(n?Nt:Be,{caseClassName:e},{[n?"objectID":"workID"]:t})},cc={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${j.DATA}.${j.CASE_INFO.BUSINESS_ID}`},dc=e=>jg.getIn(e,j.getProperty(cc.CASE_CLASS_NAME),j.EMPTY_STRING),lc=e=>jg.getIn(e,j.getProperty(cc.CASE_INFO_ID),j.EMPTY_STRING),uc=(e,t)=>{const n=lc(t);jg.setIn(e,"key",n)},pc=e=>jg.getIn(e,j.getProperty(cc.CASE_INFO),{}),hc=e=>{const t=Cg();if(!e)return!1;const n=W(e),r=qp(n),a=qp(e);if(!r||!a)return!1;const s=Ip(r,n),o=Ip(a,e);if(!s||!o)return!1;const{key:i}=s;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.objectInfo?.ID),i&&c&&i===c},gc=e=>{const t=lc(e),n=jg.getIn(e,j.getProperty(cc.BUSINESS_ID),j.EMPTY_STRING),r=t.toLowerCase().includes(n.toLowerCase())?n:t,a=dc(e);return{businessID:n,caseType:a,resolvedURL:ic.getSemanticURLForToaster(a,r,Dd.isObjectCaseType(a))}},fc=e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},yc=e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},mc=e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)},Ic={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${j.DATA}.${j.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${j.DATA}.${j.CASE_INFO.ASSIGNMENT_ID}`},Ec=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||sc.getTargetViewContainerName(e)},Ac=e=>{const t=e.lastIndexOf(j.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(t,n)},Cc=e=>e===gp.WORKAREA,_c=e=>e===gp.MODAL,Sc=e=>e===$e,Nc=e=>e===Ee,Tc=e=>e&&e.find((e=>e.type===Ee)),bc=e=>jg.getIn(e,Ic.CASE_INFO,{}),Oc=e=>e?e.split(" ").pop():void 0,Pc=e=>jg.getIn(e,Ic.CASE_CLASS_NAME,j.EMPTY_STRING),Dc=(e,t=!1)=>{const n=t?pc(e):bc(e);return $d(n)&&vd(Ph.getOperatorIdentifier(),n)},Rc=e=>jg.getIn(e,Ic.CASE_INFO_ID,j.EMPTY_STRING),$c=e=>jg.getIn(e,Ic.CASE_FIRST_ASSIGNMENT_ID,j.EMPTY_STRING),vc=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(_f(ff,{containerItemID:t,context:a||$p(t),target:r}))}},xc=e=>{const t=Cg();if(!e)return!1;const n=W(e),r=qp(n),a=qp(e);if(!r||!a)return!1;const s=Ip(r,n),o=Ip(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},wc=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=Rc(t);jg.setIn(e,"key",a);const s=$d(bc(t));if(!r&&(e=>{const t=jg.getIn(e,Ic.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=$c(t),[,r]=n.split("!");(e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:s}),jg.setIn(e,"flowName",r)}},Mc=(e,t)=>{const{attachmentsExist:n}=t;n&&jg.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),jg.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Lc=(e,t,n)=>{let r=j.PROMISE_VALUE.RESOLVE;return Tc(e)?(r=j.PROMISE_VALUE.REJECT,n?rc.rejectActionByID(t,!0,n):rc.rejectActionByID(t)):rc.resolveActionByID(t),r},Fc=e=>{const t=Ph.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},jc=()=>"true"===Ph?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,Uc=(e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r){const{caseClassName:s,skipAssignmentsUpdate:o}=n,i=W(r),c=qp(i),d=c&&mp(c),l=c&&Pp(c),u=Y(i);l&&d?.items?.[l]?.key===t?.caseID&&e.push(_f(Jg,{containerItemID:i,context:i,container:u,containerName:u,caseId:a,viewName:F.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:i},caseClassName:s,...void 0!==o&&{skipAssignmentsUpdate:o}}))}},kc=(e,t)=>{const n=Pc(e?.response),r=bc(e?.response),{caseTypeID:a}=r,s=Ph.getFeatureMap();(s?.deferUpdateCaseSummaryView??!Object.hasOwn(s,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&eg(j.CASESUMMARY_VIEW_NAME,a)&&Uc(t,e?.actionInPayload,{caseClassName:n,skipAssignmentsUpdate:!0})},Vc=e=>Sg(e)?.context_data?.caseViewMode,{RESOURCE_TYPES:Bc}=F,Gc={PAGE:"page",FORM:"form"},Wc={[Bc.CASE]:[We,Be,Ge],[Bc.OBJECT]:[St,Nt,bt],[Bc.PAGE]:[je,ke],[Bc.DATA]:[Ue],ASSIGNMENT:[Qe]},Hc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||a:t&&V.isRemoteCase(t)&&(r.RemoteSystemID=V.getRemoteHeader(t)),r},qc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:a=!0,isTransientContext:s=!1,includeDisabledFields:o=!1,isObjectWideAction:i,isExternalObject:c}=t;let d={};d=Nd(e,{isTransientContext:s,includeDisabledFields:o,isObjectWideAction:i,isExternalObject:c}),n&&(delete d?.caseInfo?.content,s&&(d={}));const l=tp(e,!1);!s&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const a=Sg(t),s=D()(a,F.CASE_INFO.CASE_INFO_CLASSID),o=qh(n,s);("True-False"===o?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(d,e);const u=x()(l,d);let p={};({content:p}=((e,t,n=!1,r=!1)=>{let a={};const s=n||r?t?.objectInfo:t?.caseInfo;return(e||s)&&(a=e?{...t}:{...s}),{content:a}})(s,u,i,c));const h=[...fi(e)];a&&h.forEach((e=>{delete e.content?.EmbedListUUID__})),p.pageInstructions=h;if((di[e]||[]).forEach((e=>{if(p?.content){const t=e?.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");jg.deleteIn(p.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))}})),!s&&u?.dataInfo)return p={...u.dataInfo,pageInstructions:p.pageInstructions},{content:p};const g=bg(".pzAdditionalPayload",j.CASE_INFO.CASE_INFO_CONTENT,e);return p.content&&g&&(p.content.pzAdditionalPayload=g),{content:p}},zc=(e,t)=>{let n,r,a={};const s=jg.getIn(e,j.UI_RESOURCES),o=jg.getIn(e,"confirmationNote");s?(n=jg.getIn(e,j.UI_RESOURCES_CONTEXT_DATA),r=jg.getIn(e,j.ROOT),a=jg.getIn(e,j.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,flowName:d}=e;let{semanticURL:l,key:u}=e;const p=i?.objectInfo?.ID;p&&(u=u||p,l=l||`objects/${p}`);const h=jg.getIn(e,"nextAssignmentInfo",null),g=jg.getIn(e,"nextAssignmentInfo.context",""),f=jg.getIn(e,"confirmationLinks",null),{isInCreateStage:y,openCaseViewAfterCreate:m,debugInfo:I,isExternalObjectCreationFlow:E}=t;return{data:{...i,key:u,flowName:d,coreHeaders:I&&{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:I.debugId}},[j.getProperty(j.CASE_INFO.CASE_INFO)]:{...i[j.getProperty(j.CASE_INFO.CASE_INFO)],actionButtons:a,headers:t.headers},[j.CONTEXT_DATA]:y?{...i[j.CONTEXT_DATA],...n,openCaseViewAfterCreate:m,errors:c,isExternalObjectCreationFlow:E}:{...i[j.CONTEXT_DATA],...n,errors:c}},semanticURL:l,nextAssignmentInfo:h,assignmentContext:g,confirmationLinks:f,key:u,root:r,...t}},Yc=async(e,t,n,r=!1,a=!1)=>{const s=jg.getIn(e,j.LOCALE_REFERENCES);await $h.loadLocaleResources(s);const o=jg.getIn(e,j.COMPONENTS);if(o)try{await ec(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Yf({...e,options:i,directUrlUpdation:!0}):ji(e,i,a)},Kc=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},Jc=e=>{if(e){const[,t]=e.split("!");return{key:Kc(e),flowName:t}}return{}},Xc=(e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&e[j.ERROR_FIELD_IN_PAGE]):{const a=`${e[j.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),s=`${a}${e[j.ERROR_IN_PAGE_IDENTIFIER]}`,o=jg.deepClone(e);o[j.ERROR_FIELD_IN_PAGE]=a,t.includes(s.slice(1))||t.includes(s.substring(s.indexOf(".")+1,s.indexOf("[")))||t.includes(s.substring(s.indexOf(".")+1,s.indexOf("(")))?r.push(o):n.push(e);break}case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&!e[j.ERROR_FIELD_IN_PAGE]):{const a=e[j.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}},Qc=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,s=n&&n.response?n.response.data:"",o=bd(r);return a&&rc.rejectActionByID(a,!0,n),_f(Sf,"Error action triggered",s,r,o)},Zc=(e,t)=>Fp(e)&&Up(e)?_f(If,t):_f(nf,t),ed=(e,t,n=j.APP.APP,r={})=>{let a=null;const{buildNew:s=!0}=r;return Fp(e)?a=Up(e)?Pp(e):H(t,n):jp(e)&&(Up(e)&&!s?a=vp(e):Up(e)&&!s||(a=H(t,n))),a},td=e=>e&&e.type===_e,nd=e=>{let t=!1;const n=Mp(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&ip(r)){t=!0;break}}return t},rd=(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(Fp(e)){const t=Pp(e);if(!t)return{continueExecution:s,removeActionPayload:a};const r=$p(t);ip(r)&&(n=!0),l||n||(n=nd(t))}else if(jp(e)&&Bp(e)){let t=Hp(e);t||(t=Pp(e),r=!0),a.containerItemID=t,a.context=$p(t)}if(n){const e=d||Zu;o=window.confirm($h.getLocaleValue(e,"Messages"))}if(!o&&n&&(a={},s=!1),r){const e=$h.getLocaleValue(ep,"Messages");c?i=window.confirm(e):(window.alert(e),s=!1)}return!i&&r&&(a={},s=!1),{continueExecution:s,removeActionPayload:a}},ad=(e,t)=>{let n=!1;const r=Ph.isCoexistenceAppOfType(j.APP_TYPE.UIKIT),{insKey:a,isParallelCall:s,skipFlowNameCheck:o}=t;if(!a)return{};const[,i]=a.split("!")||"",c=o?a:Kc(a),d=Sp(e,c);let l={},u=!1;if(d&&!r&&((e,t)=>{const n=Ip(e,t);return n?.resourceType})(e,d)===t?.type&&(n=!0,l=Ip(e,d),!o)){let e=l?.flowName;const t=Ac(d),r=xp(d);if(r.length){const n=Ot(t,r[0]);e=Ip(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}}},sd=(e,t,n)=>e===Bc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=Sp(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===Bc.ASSIGNMENT?ad(t,{...n,type:e}):e===Bc.CASE||e===Bc.OBJECT?ad(t,{...n,skipFlowNameCheck:!0,type:e}):{},od=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),id=(e=[])=>{Up(`${j.APP.APP}/${j.PREVIEW}`)&&e.push(_f(tf,Gp({context:F.APP.APP,name:j.PREVIEW})))},cd=e=>{let t;for(const n of Object.keys(Wc))if(Wc[n].includes(e)){t=n;break}return t},dd=(e,t,n="")=>{const{data:r={},context:a,caseViewMode:s}=e,o={data:{...r},caseViewMode:s,context:W(a)};jg.deleteIn(o.data,"shared"),jg.setIn(o.data,["context_data","caseViewMode"],s),t.push({type:ot,payload:{context:o.context}});const i=n&&![F.CASE_INFO.CASE_INFO_CONTENT,F.DATA_INFO.DATA_INFO_CONTENT].includes(n);t.push(_f(Yg,{...o,...i&&{uiRootReference:n}}))},ld=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=jg.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=jg.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:jg.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:jg.getIn(t,["payload","context"]),context:jg.getIn(t,["payload","context"])},r={type:he,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),_g(e),e=e.filter((e=>e.type!==he))}const a=((e,t,n)=>({assignmentID:e,vcName:j.PRIMARY,targetContainerName:jg.getIn(t,["payload","target"]),context:jg.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);Fp(a.targetContainerName)||t?.payload?.containerName!==j.WORKAREA||(a.isMultiDoc=!0,e=[]);const s={type:ge,payload:{...a}};e.push(s),_g(e)}else _g(e)}},ud=(e,t)=>x()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),pd=e=>{let t={},n=uh(e);for(;n;){const e=qc(n);t=ud(e.content,t),n=uh(n)}return t};class hd{static getChanges(e){return{...tp(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t||{},{content:a}=qc(e,{isTransientContext:n,includeDisabledFields:r});return a}static isStateModified(e){return ip(e)}static isFormValid(e,t){return Td(e,t)}static clearChangedProperties(e){return yi(e),gi(e),dp(e)}static getEditableFields(e){return Od(e)}static setCustomValidator(e,t){Li.register(e,t)}static isPropertyEditable(e,t){return hd.getEditableFields(e).some((e=>e.name===t))}}const gd=hd;const fd=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}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,!0),o=(t,n,r=!1)=>{const a=r?this.states:this.unConnectedStates;a[e]||(a[e]={}),a[e][t]||(a[e][t]={}),a[e][t]=n};if(s&&s.targetPageReference!==r.targetPageReference)return s.addChild(r),void o(a,r);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(a)){const t=e.substring(0,a.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],r.addChild(n),o(t,n)})),this.states[e][a]=r):o(a,r,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((a=>{const s=eo.getContextReferences(e)?.get(a),o=s&&Bg.resolveContextTreeNodeProps(s.props)||{},i=n[a];if(s&&!0!==o.readOnly){const e=i.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}})),jg.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,""),r=eo.getFieldReferenceForProperty(e,t);if("Multiselect"===r?.props?.componentName&&n?.current?.instruction?.instruction===j.LIST_ACTIONS.DELETE_ALL)return;n.root=null,n.current=null;const a=this.getUnConnectedStateMachines(e)||{};Object.keys(a).forEach((e=>{e.includes(t)&&delete a[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const r=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&r&&ui(t,r,n)}getStateMachineObjByPath(e,t,n,r=!1){const a=/\[\d+\]$/gm,s=e;let o;for(;e&&!this.isStateMachineExist(t,"",e);){const i=qp(t),c=Ip(i,t)||{},d=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(o=null,n&&e.endsWith("]")){if(o=e.match(a),o=o?.[o.length-1]?.substring(1,o[o.length-1].length-1),[e]=e.split(a),!r&&!this.isStateMachineExist(t,"",e)){this.createStateMachine(s,t);break}}else{if(c?.index&&e.includes(c.index)&&d){const t=e.split(".");o=t[3],e=t.slice(0,3).join(".");break}e=e.substring(0,e.lastIndexOf("."))}}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:o}:{}}executeStateMachine(e,t,n,r=!0,a={}){const{stateMachineTarget:s,index:o}=this.getStateMachineObjByPath(t,e,r);if(!s)return!1;const i=qp(e),c=Ip(i,e)||{};let[,d]=t.split(s);if(!d)return!1;const l=c?.subscriptFieldName&&t.includes(c?.index)||c?.isPageGroup;null!==o&&([,d]=l?d.split(/(?=\.\w+)/):d.split(/^\[\d+\]/gm));const u={[md(d)]:n},p=this.getStateMachine(e,"",s);if(null!==o)if(l){const t=fi(e);"CREATE"===c?.resourceStatus&&t.forEach((e=>{"UPDATE"!==e.instruction||e.groupIndex!==c.index||e.content[c.subscriptFieldName]||p.update({[c.subscriptFieldName]:c.index},o,a.skipStateUpdate??!0,a)})),p?.update(u,o,a.skipStateUpdate??!0,a)}else p?.update(u,Number(o)+1,a.skipStateUpdate??!0,a);else p?.updatePage(jg.unflatten(u));return!0}registerForServerChanges(){mg.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){mg.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const r="].";if(!t.includes(".classID")&&gd.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(r)){const a=t.substring(0,t.lastIndexOf("[")),s=gd.getEditableFields(e);if(["multiselect","checkbox"].includes(s.find((e=>e.name===a))?.type)){const s=eo.getContextReferences(e),o=s?.get(a),i=t.substring(t.lastIndexOf(r)+2);o?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){mg.unRegisterForListChanges()}},yd={},md=e=>e.startsWith(".")?e.substring(1):e,Id=e=>{delete yd[e]},Ed=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=Bg.resolveContextTreeNodeProps(e),a=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.disabled),s="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),o=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||o)&&!s&&a},Ad=(e,t,n,r,a)=>(fd.executeStateMachine(e,r,Bg.getLitePropertyValue(n,t))||a.push(r),a),Cd=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:a=!0}=n;return(!r||r&&!a)&&!Array.isArray(Bg.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},_d=(e,t={})=>{let n=[];const r=[],a=eo.getContextReferences(e);return a?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let a=[];for(const[s,o]of e){const e=Bg.resolveContextTreeNodeProps(o.props),i=e.propertyName;Ed(o.props,{includeDisabledFields:r})&&Cd(s,e,n)&&(a=Ad(t,i,e,s,a))}return{editableFormFieldsReferenceList:a}})(a,e,t)),yd[e]&&r.push(...Object.keys(yd[e].fieldOrder??{})),{formInputs:n,formPageFields:r}):{formInputs:n,formPageFields:r}},Sd=e=>{let t=[];const n=eo.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Ed(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},Nd=(e,t={})=>{const n={},r=Sg(e),{ignoreFieldsInsideList:a=!0,isTransientContext:s=!1,includeDisabledFields:o=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,d=((e,t,n)=>e||t?n?.objectInfo:n?.caseInfo)(i,c,r);if(s||d){const{formInputs:t,formPageFields:i}=_d(e,{ignoreFieldsInsideList:a,includeDisabledFields:o});((e,t,n)=>{e.forEach((e=>{let r=jg.getIn(t,e);"object"==typeof r&&(r=jg.deepClone(r),delete r?.classID),jg.buildObject(e,n,r)}))})(i,r,n),t&&t.length>0?t.forEach((e=>{jg.buildObject(e,n,jg.getIn(r,e))})):s||jg.buildObject(F.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!s&&r?.dataInfo?.content){const{formInputs:t}=_d(e,{ignoreFieldsInsideList:a});t.forEach((e=>{jg.buildObject(e,n,jg.getIn(r,e))}))}return n},Td=(e,t)=>{const n=eo.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,a]of n){const n=Bg.resolveContextTreeNodeProps(a.props);if(Ed(a.props)&&(!t||e.includes(t))){const e=Li.validate(n.componentName?.toLowerCase(),n.propertyName,Bg.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},bd=(e,t=!1)=>{const n=eo.getContextReferences(e),r=[];if(n)for(const[e,a]of n){if(!1!==Bg.resolveContextTreeNodeProps(a.props).visibility){const n=8,a=t?e:e.substring(e.indexOf("content")+n);r.push(a)}}return r},Od=e=>{const t=[],n=eo.getContextReferences(e);if(n)for(const[e,r]of n){const n=Bg.resolveContextTreeNodeProps(r.props);Ed(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class Pd{static isCaseActive(e,t){if(!e||!t)return!1;const n=mp(t);if(n){const r=Pp(t),{items:a={}}=n;return!(!r||!a[r]||a[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=Vf("loadView",n);return Bo(r,{method:a},t)};static isExternalCaseType=e=>{const t=Ph.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e));return!!t};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=Vf(Ke,n);return Bo(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:s}=Vf(Ke,a),o=t[e];return Bo(`${s}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>Sg(e)?.caseMessages;static getPropertiesToReplace=e=>(Sd(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(Sd(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>jg.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>V.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>V.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{const t=Ph.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=Ph.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&t[0].DisplayMandatoryInputsForObject};static getRouteKeyForCreateWork=(e,t=!1)=>Pd.isExternalObject(e)&&t?"retrieveActionViewForNewObject":Pd.isObjectCaseType(e)?St:It}const Dd=Pd,Rd=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},$d=e=>{if(Dd.isObjectCaseType(String(e?.objectTypeID))&&!Rd(e))return!0;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},vd=(e,t)=>{if(e&&t){const n=jg.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},xd=(e,t)=>{const n=Bg.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Bg.getPropertyValue(F.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===F.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=Sg(e);a=t?.context_data?.actionType===j.CASE}return a},wd=e=>Og(null,j.CASE_VIEW_MODE_PROP,e)===j.PERFORM_MODE&&(e.includes(j.WORKAREA)||e.includes(j.MODAL)),Md=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},Ld=(e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,s=a?.filter((e=>e.ID===j.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},Fd=(e,t,n)=>{let r,a,s,o,i,c,d,l,u;const p=Sg(e),h=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID;return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,a=p.caseInfo.ID,s=p.caseInfo.assignments,o=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,d=p.caseInfo.businessID,l=p.caseInfo.caseTypeID,u=p.caseInfo.caseTypeName):p?.objectInfo&&Dd.isObjectCaseType(h)?(a=p.objectInfo.ID,o=p.objectInfo.activeActionID,i=p.objectInfo.availableActions,c=p.objectInfo,d=p.objectInfo.businessID,l=p.objectInfo.objectTypeID,u=p.objectInfo.objectTypeName):(r=t.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID)),a=t.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),s=t.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENTS)),o=t.getValue(j.getProperty(F.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(j.getProperty(F.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(j.getProperty(F.CASE_INFO.CASE_INFO)),d=t.getValue(j.getProperty(F.CASE_INFO.BUSINESS_ID)),l=t.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),u=t.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:r,caseID:a,assignments:s,localActionID:o,caseActions:i,caseInfo:c,businessID:d,caseTypeID:l,caseTypeName:u}},jd=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),r=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{r.append(t,String(e[t]))})),n.search=r.toString(),n.toString()}return t},Ud=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],r=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===r){n.forEach((e=>{e.isErrorButton=!0}));const r=e.payload.context,a=Sg(r),s=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,a?.caseInfo?.actionButtons?.secondary||[]),o={data:{["dataObject"===t?F.DATA_INFO.DATA_INFO:F.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:s}}},target:qp(r),context:r};_g({type:fe,payload:o})}};const kd=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,a=eo.getContextReferences(e)?.get(`${t}${r}`)?.props;return a?Bg.resolveContextTreeNodeProps(a):a})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:a}=Li.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return a?{status:!1,message:a}:{status:!0}}},Vd="OPEN_PROCESS_ACTION",Bd="OPEN_ASSIGNMENT",Gd="DELETE_CASE_IN_CREATE_STAGE",Wd="SAVE_AND_CLOSE",Hd=e=>({type:Wd,payload:e}),qd="DELETE_WORK";const zd=class{static getSavableDataPage(e){return lg(e)}static getLookUpDataPage(e){return pg(e)}static getLookUpDataPageInfo(e){return hg(e)}static getDataPageKeys(e){return ug(e)}};const Yd=class{static getPropertyName(e){return ln.getPropertyName(e)}static isProperty(e){return ln.isProperty(e)}static getLeafPropertyName(e){return ln.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class Kd{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);if(!d)return null;return $u({meta:i,options:{context:c,pageReference:l||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===gp.WORKAREA||n===gp.MODAL||d===j.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:a}={}}=e,{context:s}=t;let o=a,i=r;const c=Yd.isProperty(a),d=Yd.isProperty(r);if(d){const e=Yd.getPropertyName(r);i=bg(`.${e}`,e.startsWith(".")?n:"",s)}if(i||(i=n),c){const e=Yd.getPropertyName(a);o=bg(`.${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=Pp(e),s=Ip(e,t);s&&({key:r,flowName:a}=s)}t.addContainerItem({semanticURL:"",key:r,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{const t=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${t}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(j.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),r=t.find((e=>e.ID===n));return r?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);if(n&&t){const e=n.find((e=>e.ID===t));return"Case"===e?.type}return!1};static getChildCaseAssignments=e=>{const t=e.getValue(j.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:r})=>{const a=e.map((e=>({...e,caseName:t,caseTypeID:r})));n=n.concat(a)})),n};static hasAssignments=e=>{const t=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=Kd.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||Kd.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return Kd.hasNotificationMessages(t)||!Kd.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:r}=t;return r&&(!Kd.isCaseWideLocalAction(n)||Kd.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ASSIGNMENT_LABEL),r=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],a=Kd.getChildCaseAssignments(e)||[];let s=JSON.parse(JSON.stringify(a));s=s.map((e=>(e.isChild=!0,e)));const o=[...r,...s];let i=JSON.parse(JSON.stringify(o));return t&&!Kd.showTodo(e)&&(i=i.map((t=>(t.name=Kd.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const Jd=Kd;const Xd=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=rc.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return rc.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=Ae,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:j.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:s}=this.containerManagerPromise(t),o={...r,...e,actionMgrID:a};return _g(ef(o)),s}addContainerItem(e){const t=_e,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r||{};let s;Array.isArray(a)&&a.length>0&&([s]=a);const o=n.getContextName(),i=n.getContainerName(),c=H(i,o,e?.containerType===j.CONTAINER_TYPE.SINGLE),d=Ot(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)),[j.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...l,...e,actionMgrID:u};return _g(nf(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=ve,n={context:$p(e.containerItemID),target:qp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return _g(df(s)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=$e,n={target:qp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return _g(hf(s)),a}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Se,n={context:$p(e.containerItemID),target:qp(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return _g(ff(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=Ce,n=Gp(e),{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return _g(tf(s)),a}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=z(t,r),s=Xp(r);return a&&s.includes(a)||_g(rf({transientItemID:a,contextName:r,target:qp(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!Xp(r).includes(t))return;_g(af({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(!Xp(t).includes(a))return;_g(mf({target:n,containerItemID:r,transientItemID:a}))}}createContainerPConnect(e,t,n,r=!1){Jd.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Up(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return bp(e,t)}};var Qd=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Zd(){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 Qd(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(Qd(t.type,e[n]))return!0;return!1},Ps((function(e,t){var a=0;e.subscribe(Ds(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function el(e,t){return Ps((function(n,r){var a=null,s=0,o=!1,i=function(){return o&&!a&&r.complete()};n.subscribe(Ds(r,(function(n){null==a||a.unsubscribe();var o=0,c=s++;Ts(e(n,c)).subscribe(a=Ds(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){a=null,i()})))}),(function(){o=!0,i()})))}))}function tl(e,t){return Ps((function(n,r){var a=0;n.subscribe(Ds(r,(function(n){r.next(e.call(t,n,a++))})))}))}function nl(e,t,n){return void 0===n&&(n=1/0),Ga(t)?nl((function(n,r){return tl((function(e,a){return t(n,e,r,a)}))(Ts(e(n,r)))}),n):("number"==typeof t&&(n=t),Ps((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){return d<r?g(e):c.push(e)},g=function(e){s&&t.next(e),d++;var i=!1;Ts(n(e,l++)).subscribe(Ds(t,(function(e){null==a||a(e),s?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{d--;for(var e=function(){var e=c.shift();o?Os(t,o,(function(){return g(e)})):g(e)};c.length&&d<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Ds(t,h,(function(){u=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function rl(e){return e&&Ga(e.schedule)}function al(e){return e[e.length-1]}function sl(e){return rl(al(e))?e.pop():void 0}function ol(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ms(e,sl(e))}var il=new ys((function(e){return e.complete()}));function cl(e){return e?function(e){return new ys((function(t){return e.schedule((function(){return t.complete()}))}))}(e):il}const dl=(e,t,n)=>Fs((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),ol(Sf(e,r,t,null,n))))),ll=(e,t)=>n=>new ys((r=>{let a={},s=0;return n.pipe(nl((n=>{const r=Date.now();let o;return o=t||h(),o&&o(n,a)&&r-s<e?cl():(a=n,s=r,ol(n))}))).subscribe(r)})),ul=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,s={data_view_ID:t},{restApi:o,reqType:i}=Vf("createDataObject",s),{content:c}=qc(a);return Ms(Bo(o,{method:i,headers:r,body:{data:c.content,pageInstructions:c?.pageInstructions}},a)).pipe(tl((t=>({response:t.data,actionInPayload:e}))),dl("Error occurred during ajax call at createDataObject Epic",n))},pl=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}=Vf("readDataObject",o);return Ms(Bo(i,{method:c,headers:r,body:{dataViewParameters:s}},n)).pipe(tl((t=>({response:t.data,headers:Hc(t.headers),actionInPayload:e}))),dl("Error occurred during ajax call at getDataObjectView Epic",n))},hl=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:s}=e,o={data_view_ID:t},{restApi:i,reqType:c}=Vf("updateDataObject",o),{content:d}=qc(a);return Ms(Bo(i,{method:c,headers:{...r,"if-match":e?.etag},body:{data:{...d.content,...s},pageInstructions:d.pageInstructions||[]}},a)).pipe(tl((t=>({response:t.data,actionInPayload:e}))),dl("Error occurred during ajax call at updateDataObject Epic",n))},gl=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:a,dataViewParameters:s}=e,o={data_view_ID:t,action_ID:a},{restApi:i,reqType:c}=Vf("openDataObjectAction",o);return Ms(Bo(i,{method:c,headers:r,body:{dataViewParameters:s}},n)).pipe(tl((t=>({response:t.data,headers:Hc(t.headers),actionInPayload:e}))),dl("Error occurred during ajax call at getDataObjectView Epic",n))},fl=e=>{const{savableDatapage:t,context:n,headers:r,actionID:a,keys:s,containerItemID:o,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:a};let{restApi:d}=Vf("submitDataObjectAction",c);const{reqType:l}=Vf("submitDataObjectAction",c),{content:u}=qc(o);return d=jd(i,d),Ms(Bo(d,{method:l,headers:{...r,"if-match":e?.etag},body:{data:{...u?.content,...s},pageInstructions:u?.pageInstructions||[]}},n)).pipe(tl((t=>({response:t.data,actionInPayload:e}))),dl("Error occurred during ajax call at getDataObjectView Epic",n))};const yl=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;Lu(e,r,t,a,{})}}},ml="postDataViewMetadata",Il={getData:(e,t,n,r)=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:d}=Vf("getListData",a);return Bo(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}=Vf("getListDataCount",r);return Bo(a,{method:s,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const a=!!n,s=!!r,o=Oh.doesRestApiExist(ml),i=(a||s)&&o?ml:"getDataViewMetadata",c={dataViewName:e},{restApi:d,reqType:l}=Vf(i,c);if(o){if(a)return Bo(d,{method:l,body:{associationFilter:n}},t);if(s)return Bo(d,{method:l,body:{propertyFilter:r}},t)}return Bo(d,{method:l},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}=Vf("readDataObject",c);return Bo(l,{method:u,body:d,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},r,i)},getCaseEditMetadata:(e,t)=>Dd.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Dd.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Dd.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}=Vf("moveListRecords",c);return Bo(d,{method:l,body:{content:{sourceID:n,destinationID:r,context:a,listClass:s}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===j.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===j.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==wp("root").find((e=>e.includes("authoring-preview")))?`${j.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${Xi.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=Ph.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const El=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const Al=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 Ol.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],Ol.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)}))}))}};var Cl=n(631),_l=n.n(Cl);const Sl=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===_l()(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};Ol.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]}};const Nl=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new Sl("CASE",t)}return this.subscriptions[e]}};const Tl=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){const t=e.split("."),n=t.pop()||"";return{pageReference:t.join("."),propertyName:n}}static publishCaseValuesUpdate(e,t){const n=`${t.actionInContext}/workarea`;Object.entries(e.message).forEach((([e,t])=>{const r=vp(n)||"",a=this.transformReference(e),{pageReference:s,propertyName:o}=this.extractReferenceParts(a);e.match(/\.\w+\[\d+\]\.\w+/)&&fd.executeStateMachine(r,a,t,!0,{skipStateUpdate:!0});_g([{type:Q,payload:{reference:a,value:t,context:r}},{type:ee,payload:{reference:a,value:t,context:r,pageReference:s,propertyName:o}}])}))}};class bl{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new Al;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=Xi.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{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(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),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=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=Xi.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){const t=bl.agentSubscribeIdMap.get(e.assignmentID);bl.unsubscribe(t??""),bl.agentSubscribeIdMap.delete(e.assignmentID)}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=bl.subscribe(t,(t=>{Tl.publishCaseValuesUpdate(t,e)}));bl.agentSubscribeIdMap.set(e.assignmentID,n)}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 received 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&&jg.isEqual(a.filter.criteria,n)&&a.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){Io.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,bl.subscribeAgentMessageCaseValues),Io.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,bl.unsubscribeAgentMessageCaseValues),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 received 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 El(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=>Nl.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:Xi.b2sJWT}};Bi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(Xi.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 occurred 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 Ol=bl;const Pl=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){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(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){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=vg(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const Dl=new class{SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t,n,r){const a=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][a]){const t=this.dataStore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},r,a,s={}){if(this.subscribeToMessageService(e),s.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(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 Promise.resolve({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={}){this.subscribeToMessageService(e);const a=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][a]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][a]);delete this.dataStore[e][a],this._removeDataStoreMetaEntry(e,n,a)}const{restApi:s,reqType:o}=Vf(j.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o},c=s&&n&&0===Object.keys(n).length?s.split("?")[0]:s;return Bo(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[a]:t.data},this._addDataStoreMetaEntry(e,n,a)),t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const a=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const s=this.dataPageSubscribers[n];s[a]??={};const o=s[a];return!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&jg.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}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 Pl;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const a=this.dataStoreMeta[e];a[r]??=[];const s=a[r];s.includes(n)||s.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,a){const s=this.generateHash(e,t,r),o=a?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][s]||(this.dataStore[e][s]=new Pl);const i=this.dataStore[e][s];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,s),i.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}subscribeToUpdate(e,t,n,r,a,s){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},s&&!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&&mg.unRegisterFields(n,r,t,a)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:a=""}=n,s=this.subscribers[r];this.markDataInstanceDirty(r,""===a?null:JSON.parse(a)),t&&this._executeDataPageSubscriptions(e),!t&&s?.callback&&Object.keys(s.callback).forEach((t=>{s.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r?.push(this.generateHash(e,null)),r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,a=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(a){const t=[];t.push(this.generateHash(n,a,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=ng(e);return"reloadOncePerInteraction"===t?.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const r=ng(e);let a=[];r||(a=Object.keys(t||{}).map((e=>({name:e}))));let s="",o=e;const i=[];return(r?.parameters||a).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??j.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(j.HASH_DELIMITER)&&(s=jg.getHashedString(i.join(j.HASH_DELIMITER)),o=e+j.UNDERSCORE_STRING+s),o}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),Il.getData(e,d,a,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&mg.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}};Ol.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const Rl=class{constructor(e,t,n,r,a=100,s=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=a,this.maxsize=s,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,r,a=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),a&&!a.dataViewCallMap[t]?(this.combiner(a,e),a.dataViewCallMap[t]={promise:n,resolve:r}):a?n=a.dataViewCallMap[t].promise:(a={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(a.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(a):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const $l=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,a,s,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new Rl(t,n,a,r,s,o)),this.bufferedDataQueues[e]}},vl=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,xl=e=>e.map((e=>e.field)),wl=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let a=(t.query?.filter).logic;const s=Object.keys(n).length;vl(n,r)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),n.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const o=`F${s+t}`;n[o]=r[e],a=a.replace(e,o)})),(e.query?.filter).logic+=` OR ${a}`);const o=xl(e.query?.select);xl(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},Ml=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!jg.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Ll=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:a}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:a(e,n)})}))},Fl=e=>({combiner:wl,comparator:Ml,separator:Ll,...e}),jl=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Ul{constructor(e,t){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,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}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}`)),e.matchPosition,e.maxResultsDisplay].join(j.HASH_DELIMITER),s=jg.getHashedString(a),o=`${e.dataSource}_${s}`,i=Il.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(`${window.sessionStorage.getItem(i)}`);if(t&&Ul.searchResultsCache?.[t]?.[o])n(Ul.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Ul.searchResultsCache?.persisted?.[o])n(Ul.searchResultsCache.persisted[o]);else{const s=new Ul(e,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,Ul.initializeCache(t,e,o,s),n(s)):(s.associationFilter=e.associationFilter,s.propertyFilter=e.propertyFilter,s.fetchMetaData(t).then((r=>{jl(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,Ul.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&ng(e.dataSource)){const r=new Ul(e,t),a=ng(e.dataSource);r.isQueryable=!!a?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,jl(i,JSON.stringify({isQueryable:a?.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,Ul.initializeCache(t,e,o,r),n(r)}else{const a=new Ul(e,t);a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{jl(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,Ul.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new $l;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Fl(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Ul.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Ul.searchResultsCache[e]&&(Ul.searchResultsCache[e]={}),Ul.searchResultsCache[e][n]=r):(void 0===Ul.searchResultsCache.persisted&&(Ul.searchResultsCache.persisted={}),Ul.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return Il.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Ul.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>Dl.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Ul.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return Dl.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return Dl.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!Lg(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&"list"===this.dataSourceMetaData.structure?.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=Dl.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,a)=>(Object.keys(a).every((s=>!(r?.includes(s)&&a[s]&&this.positionMatches(`${a[s]}`,e,n))||(t.push({...a}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,a=r?e.toLowerCase():e,s=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return a.startsWith(s);case"contains":return a.includes(s);case"equals":return a===s;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,a={};let s=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const o=`F${s}`;s+=1;const i={field:t.value},c={value:e};let d="CONTAINS";"start"===n?d="STARTS_WITH":"equals"===n&&(d="EQ");const l={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:d};a[o]=l}}));const o=Object.keys(a).join(" OR ");return{filterConditions:a,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...Il.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...Il.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const kl=Ul;class Vl{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){n=jg.convertClipboardPageToPageRefNotation(n);const s=r.split("/").join(j.HASH_DELIMITER),o=jg.getHashedString(s);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[a]?.[n]){this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[a][n].push({uniqueHash:o,callback:t})}else Vl.initializeRefreshCache(this.propChangeRefreshMap,a,n,o,t);else if(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})}else Vl.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 Bl=new Vl;const Gl=class{static cleanCaches(e){mg.purgeCascadeFields(e),yl.removeContext(e),kl.clearContextedCache(e),Io.cleanContextSubscribers(e),Id(e),eo.removeContextTreeNode(e),Ol.clearContext(e),Bl.deRegisterForRefresh(e)}},Wl="GET_DESCENDANTS",Hl={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData",REFRESH_EXTERNAL_OBJECT:"refreshExternalObjectData"};const ql=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]}};const zl=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({type:fe,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),t&&n.push(t)}}_g(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=Sg(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}}}}),_g(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=Sg(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(_g({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){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return Sg(e)?(_g({type:it,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...Sg(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(_g({type:it,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=Sg(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&jg.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),_g({type:fe,payload:{context:e,data:{...n}}}),nc.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Sg(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},Yl=(e,t)=>{const n={},r=zd.getLookUpDataPage(e),a=zd.getDataPageKeys(r);if(a)for(const e of a)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:a}},Kl=(e,t)=>{const n=zd.getSavableDataPage(e),r=zd.getDataPageKeys(n);return r?.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]})),{keys:t,dataPageID:n,dataPageKeys:r}},Jl=e=>{Io.publish(F.PUB_SUB_EVENTS.EVENT_CANCEL,e)},Xl=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const Ql=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";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.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(j.MODAL),a=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),d=t?void 0:Td(this.c11nEnv.getContextName()),l=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Wg.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="";s=t&&null!==t.actionMgrID?t.actionMgrID||"":rc.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,a=t}));if(!r||!a)throw new Error("resolveFn or rejectFn is not defined.");return rc.register(s,o,r,a,e,t,n),{actionMgrID:s,promise:o}};showDataObjectCreateView(e,t=F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Wg.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ne,{promise:a}=this.actionsApiPromise(r,n);return _g({type:r,payload:{...n,containerName:F.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(!ip(t)){return new Xd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=He,r=Wg.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&t.includes(j.MODAL);_g({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:s}=this.actionsApiPromise(n,r);return s.then((()=>{Jl({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=Cg()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));if(Zh(F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const r=zd.getSavableDataPage(n),a=ct,s=!!e&&e.includes(j.MODAL),o=Wg.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(a,o);return _g({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:s,isFormValid:Td(e)}}),i}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=dt,r=zd.getSavableDataPage(e),a=zd.getDataPageKeys(r),s={};if(a)for(const e of a)s[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Wg.buildActionObject({dataViewName:r,dataViewParameters:s},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return _g({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:"",readOnly:!1,actionName:""}){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(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const r=lt,{dataPageID:a,dataViewParameters:s}=Yl(e,t),o=Wg.buildActionObject({dataLookUp:a,keyProperties:t,requestPayload:s,viewName:n.viewName||F.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:j.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return _g({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}=Cg()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const{dataPageID:a,keys:s}=Kl(r,t),o=ut,i=e&&e.includes(j.MODAL),c=Wg.buildActionObject({containerItemID:e,dataPageID:a,key:s},this.c11nEnv),d=n[e]?.caseInfo?.headers?.etag,{promise:l}=this.actionsApiPromise(o,c);return _g({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:Td(e),etag:d}}),l}openDataObjectAction(e,t,n,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(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const a=pt,{dataViewParameters:s,dataPageID:o,dataPageKeys:i}=Yl(e,t),c=Wg.buildActionObject({actionID:n,actionName:r,dataViewParameters:s,lookupDatapage:o,containerName:j.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:d}=this.actionsApiPromise(a,c);return _g({type:a,payload:{...c}}),d}submitDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:a}=Cg()?.getState()||{},s=a[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const o=r?.jsActionQueryParams,i=hh(e),c=qp(i),d=Ip(c,i)||{},{resourceType:l="",key:u=""}=d,p=ht,{dataPageID:h,keys:g}=Kl(s,t),f=Wg.buildActionObject({containerItemID:e,actionID:n,resourceType:l,key:u,keys:g,savableDatapage:h,containerName:j.MODAL,context:e,jsActionQueryParams:o},this.c11nEnv);f.context=e;const y=a[e]?.caseInfo?.headers?.etag,{promise:m}=this.actionsApiPromise(p,f);return _g({type:p,payload:{...f,isFormValid:Td(e),etag:y}}),m}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},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?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase",t);const{dockable:n=!1}=t?.modalOptions||{};let r=((e,t)=>Dd.isExternalObject(e)&&!t?"CREATE_EXTERNAL_OBJECT":Dd.isObjectCaseType(e)?"CREATE_OBJECT":de)(e,bg(".isExternalObjectCreationFlow","context_data",this.c11nEnv.getContextName()));const a=Wg.buildActionObject({class:e,flowType:"pyStartCase",containerName:j.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,a);if(a.headers={...a.headers},t.channelName?a.headers[j.X_ORIGIN_CHANNEL]=t.channelName:Ph.isWSSPortal()&&(a.headers[j.X_ORIGIN_CHANNEL]="WSS"),V.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:s}=V.getRemoteCase(e);if(a.className=e,a.class=t,rc.setRemoteCaseHeaderByContext(a,n),V.isTraditionalRemoteCase(e)){const n={className:e,name:s,action:It,remoteClassName:t};r=rc.setTraditionalRemoteCaseParams(a,n)}}if(Eo.getPreviewMode()){a.debugInfo={debugId:jg.generateUniqueID()};const e=vo.getCoreHeadersFromContext(a?.context||""),t=String(e?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]||"");t&&r!==de&&(a.debugInfo={debugId:t})}return _g({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=me,r=Wg.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,r);return _g({type:n,payload:{...r}}),a}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),r=Wg.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:a}=this.actionsApiPromise("GET_DESCENDANTS",r),s=(o={...r,context:n},{type:Wl,payload:o});var o;return _g(s),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?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||j.PRIMARY,containerName:n.targetContainer||j.PRIMARY};let a=Dd.isObjectCaseType(t)?"GET_OBJECT":le;const s=Wg.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);return s.headers={...s.headers},n.channelName?s.headers[j.X_ORIGIN_CHANNEL]=n.channelName:Ph.isWSSPortal()&&(s.headers[j.X_ORIGIN_CHANNEL]="WSS"),s.className=t,V.isRemoteCase(t)&&(a=this.setRemoteCaseParamsForOpenCase(s,t,n.remoteCaseMeta)??a),Eo.getPreviewMode()&&![j.WORKAREA].includes(n.targetContainer)&&(s.debugInfo={debugId:jg.generateUniqueID()}),_g({type:a,payload:{...n,...s}}),o}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:a,name:s}=V.getRemoteCase(t);if(rc.setRemoteCaseHeaderByContext(e,r),e.isRemoteCase=!0,e.remoteCaseClass=t,V.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:s,action:At,remoteClassName:a};return rc.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){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?.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=j.PRIMARY,r.isChild=n.isChild);let a=Bd;const s=Wg.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(s.headers=s.headers||{},n.channelName?s.headers[j.X_ORIGIN_CHANNEL]=n.channelName:Ph.isWSSPortal()&&(s.headers[j.X_ORIGIN_CHANNEL]="WSS"),V.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:o}=V.getRemoteCase(t);if(rc.setRemoteCaseHeaderByContext(s,r),V.isTraditionalRemoteCase(t)){s.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:o,action:Et,remoteClassName:e};a=rc.setTraditionalRemoteCaseParams(s,r)}}s.className=t,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Eo.getPreviewMode()&&![j.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:jg.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 _g({type:a,payload:{...s,...i}}),o}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){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=$p(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=eo.getContextReferences(e);if(t)for(const[,e]of t)if(Bg.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return co({messages:e,context:r,category:F.PAGE}),Promise.reject({type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=t?.isTriggeredFromDifferentContext,{caseID:s,assignments:o,localActionID:i,caseActions:c,caseInfo:d,businessID:l,caseTypeID:u,caseTypeName:p}=Fd(e,this.c11nEnv,{isTriggeredFromDifferentContext:a}),h=$d(d);let g,f=!1;if(c){const e=c.find((e=>e.ID===i));f="Case"===e?.type}else g=Sg(n);let{assignmentID:y}=Fd(e,this.c11nEnv,{isTriggeredFromDifferentContext:a});g?.context_data?.actionType&&(f=g.context_data.actionType===j.CASE,y=y||g.context_data.assignmentID);const m=((e,t,n,r)=>{let a;return a=e?Ld(e,t,n):r||"Create",a})(o,y,i,d?.activeActionID),[I,E]=s.split(" "),A={class:I,actionID:m,assignmentID:y,caseID:s,workID:E,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:f,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:l,caseTypeID:u,caseTypeName:p};e?.includes(j.MODAL)&&(A.containerName=j.MODAL,A.isModalAction=!0),A.outcome=t.outcomeID,A.jsActionQueryParams=t.jsActionQueryParams,d?.isLocalAction&&(A.viewType=Gc.FORM);const C=((e,t)=>Dd.isObjectCaseType(e)||t?_t:pe)(u,d?.isObjectWideAction),_=Wg.buildActionObject(A,this.c11nEnv),{promise:S}=this.actionsApiPromise(C,_);return _.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||Sg(n).context_data.isProcessAction,_.headers??={},Ph.isWSSPortal()&&(_.headers[j.X_ORIGIN_CHANNEL]="WSS"),zl.executeOrQueueDeferredAction({type:C,payload:{..._,context:n}}),S}getNextWork(){if("HYBRID"===Ph.getRenderingMode())return Io.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:Ph.getOperatorIdentifier()}),Promise.resolve();const e=Bd,t=Wg.buildActionObject({containerName:j.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return _g({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Bd,n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Wg.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 _g(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(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(j.MODAL)&&(a.containerName=j.MODAL,a.isModalAction=!0);const s=Wg.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s),i=$p(e);return _g({type:t,payload:{...s,context:i,cases:n,actionID:r,isFormValid:Td(i),classID:this.c11nEnv.getCurrentClassID()}}),o}submitBulkActionAsync(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_ASYNC",n=this.c11nEnv.getValue(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:e.includes(j.MODAL)?j.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(j.MODAL)},s=Wg.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s),i=$p(e);return _g({type:t,payload:{...s,context:i,cases:n,actionID:r,isFormValid:Td(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"));if(window.pms?.plugins?.c11n?.openBulkAction){const{callbacks:n}=t;return t.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,t).then((e=>{"cancel"===e?n?.cancel?.():n?.submit?.()}))}const{selectedList:n,runningMode:r}=t,a=t.type,s={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:a,runningMode:r,...t},o="OPEN_BULK_ACTION",i=Wg.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return _g({type:o,payload:{...i}}),c}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));return new Xd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(_g({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.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)):(_g({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.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(F.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.DUPLICATE,context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return _g([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:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.IGNORE,context:e}},n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return _g([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,Xl(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=t.type,s={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},o=(e=>"Object"===e.type||Dd.isObjectCaseType(e?.caseClassName||"")||window.location.href.includes("/objects/")?Ct:"OPEN_LOCAL_ACTION")(t),i=Wg.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);if(o===Ct)return _g({type:o,payload:{...i}}),c;const d=this.c11nEnv.getContextName(),l=wp(d)[0];let u=!1;const p=V.getRemoteHeaderByContext(d);let h;if(rc.setRemoteCaseHeaderByContext(i,p),!l)return h=d,_g({type:o,payload:{...i,contextName:d,continueExecution:u}}),c;h=Pp(l);const g=mp(l);if(g?.accessedOrder.forEach((e=>{n===g.items[e].key&&(u=!0,h=g.items[e].context)})),!u||h&&"review"===Cg()?.getState()?.data[h]?.context_data?.caseViewMode)return _g({type:o,payload:{...i,contextName:d,continueExecution:u}}),c;const f=h,y=f&&f.includes(j.MODAL),m=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),I=Sg(h),E=I?.caseInfo?.assignments?I.caseInfo.assignments[0]?.actions[0]?.ID:void 0,A=this.c11nEnv.getContainerName(),C=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=Wg.buildActionObject({context:f,containerItemID:h,assignmentID:m,actionID:E,caseID:n,containerName:A,caseType:C,isModalAction:y,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=h;const N=$p(h),T=this.c11nEnv.getCaseSummary(),b=$d(T),O=Wg.buildActionObject({caseID:n,containerItemID:h,cancelContext:N},this.c11nEnv);let P={};return y?(O.acTargetName=j.MODAL,O.isInCreateStage=b,O.isModalAction=y,P={...O}):P={...O,acName:Ot(this.c11nEnv.getContainerName(),O.context)},_g({type:o,payload:{...i,contextName:d,saveActionPayload:S,cancelActionPayload:P,continueExecution:u}}),c}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,Xl(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,a=t.type,s={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},o=Vd,i=Wg.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return _g({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(F.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),a=$d(this.c11nEnv.getCaseSummary()),s=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),o={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a,caseID:s};t&&t.includes(j.MODAL)&&(o.acTargetName=j.MODAL);const i=Wg.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),d=$p(t);return _g({type:n,payload:{...i,containerItemID:t,context:d}}),c}cancelAssignment(e,t){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:n}=F,r=he,a=$p(e),s=e&&e.includes(j.MODAL),o=this.c11nEnv.getCaseSummary(),i=$d(o),c=this.c11nEnv.getValue(j.getProperty(n.CASE_INFO_ID)),d=this.c11nEnv.getValue(n.ASSIGNMENT_ID),l=Wg.buildActionObject({caseID:c,containerItemID:e,context:a},this.c11nEnv);let u={};s?(l.acTargetName=j.MODAL,l.isInCreateStage=i,l.isModalAction=s,u={...l}):u={...l,acName:Ot(this.c11nEnv.getContainerName(),l.context)};const{promise:p}=this.actionsApiPromise(r,l);return _g({type:r,payload:u}),p.then((()=>{t||Jl({caseID:c,assignmentID:d,context:this.c11nEnv.getContextName()})}))}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}=F,n=e,r=He,a=e&&e.includes(j.MODAL),s=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Wg.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!ip(n)){return new Xd(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{Jl({caseID:s,context:this.c11nEnv.getContextName()})}))}_g({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}=F,n=He,r=e,a=r&&r.includes(j.MODAL),s=this.c11nEnv.getCaseSummary(),o=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID)),i=$d(s),c=this.c11nEnv.getValue(j.getProperty(t.CASE_INFO_ID)),d=Wg.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=Ph.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(d.isProcessAction=l,i&&(a||u)&&!Rd(s)){const t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=ip(r);if(this.shouldDeleteCaseInCreateStage(c,t,u)){const t=!0===Boolean(Dd.isExternalObject(o));return this.deleteCaseInCreateStage(e,t)}_g({type:n,payload:{...d,isModalAction:a,isChildCase:Md(s),isInCreateStage:i}})}const{promise:p}=this.actionsApiPromise(n,d);return p.then((()=>{}))}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=Wd,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return zl.executeOrQueueDeferredAction(Hd(n)),r}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=Wd,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return _g(Hd(n)),r}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=Gd,r=e,a=r&&r.includes(j.MODAL),s=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),i=Wg.buildActionObject({caseID:s,caseType:o,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),d=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=d;const l=`${j.APP.APP}/${gp.PRIMARY}`,u=ed(l,gp.PRIMARY);i.parentContext=u,a&&(i.targetName=j.MODAL,i.containerName=gp.MODAL,i.isModalAction=a),_g((e=>({type:Gd,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{Jl({caseID:s,context:this.c11nEnv.getContextName()})}))}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}=Oh.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return Bo(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:a}=Oh.getRestEndPoint("updateRecents")||{},s=`${E()}${a}`;return Bo(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=Oh.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return Bo(t,{method:"GET",headers:{}}).then((e=>(Object.keys(eo.rootNodes).forEach((e=>{Gl.cleanCaches(e)})),eo.rootNodes={},sessionStorage.clear(),Mg(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Bo(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:gp.PREVIEW,containerName:gp.PREVIEW,context:F.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:gp.PREVIEW,containerName:gp.PREVIEW,context:F.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=Wg.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const a=te,{promise:s}=this.actionsApiPromise(a,r,!1);return _g({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));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const r=Wg.buildActionObject({viewName:e,className:t},this.c11nEnv),a=ne,{promise:s}=this.actionsApiPromise(a,r);return Eo.getPreviewMode()&&(r.debugInfo={debugId:jg.generateUniqueID()}),_g({type:a,payload:{...r,...n,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=Wg.buildActionObject({},this.c11nEnv),r=ae,{promise:a}=this.actionsApiPromise(r,n);return _g({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=Wg.buildActionObject({},this.c11nEnv),r=se,{promise:a}=this.actionsApiPromise(r,n);return _g({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=Wg.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:V.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),s=re;r?.containerName||(r.containerName="HYBRID"===Ph.getRenderingMode()?ql.getRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME):sc.getTargetViewContainerName(s));const{promise:o}=this.actionsApiPromise(s,a);return _g({type:s,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Wg.changeHandler(e,t)}eventHandler(e,t){Wg.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,r={skipDirtyValidation:!1}){const a=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),o=Bg.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,r);let i=this.c11nEnv.getValue(j.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=bg(`.${c.join(".")}.classID`,s,a)),e=jg.trimDotForProperty(e),_g({type:ee,payload:{reference:o,value:t,context:a,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:s="",isListEntry:o=!1,skipDirtyValidation:i=!1,associatedProperty:c}=n,d=this.c11nEnv.getContextName();let l=this.c11nEnv.getPageReference();const u=s?.startsWith(l)?s.replace(l,""):s;l=s||l;const p=Bg.getContextPath(l,e);let h=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(u?`${u}${e}`:e,t,{isArrayDeepMerge:a,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),io({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:l,context:d,isListEntry:o}),_g({type:Q,payload:{reference:p,value:t,context:d,isArrayDeepMerge:a,skipDirtyValidation:i,...h&&{isStrictTracking:h},...r&&{removePropertyFromChangedList:r},...c&&{associatedProperty:`${l}${c}`}}})}activateModalContainerItem(e){const t=Me,{context:n}=e,r=n&&n.includes(j.MODAL),a=Wg.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=j.MODAL,a.isModalAction=r),_g({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,context:l,optionalPayload:u,isArrayDeepMerge:p}=r,h={actionMgrID:s,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:d,isArrayDeepMerge:p,optionalPayload:u};r.refreshFor&&(h.refreshFor=r?.refreshFor),r.resetForm&&(h.resetForm=r?.resetForm);const g=l||this.c11nEnv.getContextName(),f=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>wd(e)&&!xd(e,t))(g,f)||xd(g,f))?Gu(g,n,h):Lu(e,t,g,n,h),a}refreshEmbeddedDataWithAction(e,t,n,r,a,s,o,i,c={}){const{promise:d}=this.actionsApiPromise(Hl.REFRESH_DATA),l=this.c11nEnv.getContextName();return Fu(e,t,n,l,r||this.c11nEnv.getPageReference(),a,s,o,i,c),d}openEmbeddedDataModal(e,t,n,r,a,s,o,i){const c=gt;let d=t.getCaseInfo().getKey();const l=t.getValue(F.CASE_INFO.IS_LOCAL_ACTION),u=t.getValue(F.CASE_INFO.ASSIGNMENT_ID),p=((e,t,n)=>n||t!==j.ACTION?e.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):e.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID))(t,o,l),h=t.getPageReference();let g="string"==typeof r?`${t.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${r}`:`${t.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${r}]`;h.startsWith(F.OBJECT_INFO.OBJECT_INFO)&&!d&&(d=t.getCaseInfo().getObjectKey(),g=`${t.getPageReference().replace(F.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${r}]`);const f={targetProperty:n,index:r,viewID:e,ID:d,actionType:a,interestPage:jg.convertPageRefToClipboardPageNotation(g),heading:s,editType:o,interestPageActionID:o===j.ACTION?i:void 0,actionID:p,isLocalAction:l,operationFlag:j.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof r,assignmentID:l||o!==j.ACTION?void 0:u},y=Wg.buildActionObject(f,this.c11nEnv);if(o===j.ACTION){const e=jg.getETag(y.context);y.headers={"If-Match":e}}const{promise:m}=this.actionsApiPromise(c,y);if(Ph.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=ln.trimAnnotation(e.config.value),r=qh(n.startsWith(".")?n.replace(".",""):n,e.config.classID);r?.isDeclarativeTarget&&eo.addFieldNode(t.getContextName(),h+g,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:h+g})}))}return _g({type:c,payload:{...y,containerName:F.MODAL,skipSemanticUrl:!0}}),m}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=ft;let n=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID));const r=this.c11nEnv.getValue(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID));let a=this.c11nEnv.getPageReference().replace(j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),"");const s=$p(e),o=this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:d,actionID:l,viewName:u,parentContext:p}=o;a.startsWith(F.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(F.OBJECT_INFO.OBJECT_INFO_ID),a=this.c11nEnv.getPageReference().replace(F.OBJECT_INFO.OBJECT_INFO_CONTENT,""));const h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:u,isFormValid:Td(s),interestPage:jg.convertPageRefToClipboardPageNotation(a),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:l,operationFlag:j.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:d,assignmentID:r};e&&e.includes(j.MODAL)&&(h.containerName=j.MODAL,h.isModalAction=!0);const g=Wg.buildActionObject(h,this.c11nEnv);if(c===j.ACTION){const e=jg.getETag(g.context);g.headers={"If-Match":e}}const{promise:f}=this.actionsApiPromise(t,g);if(ip(s)){const[e,t,n]=Bs(this.c11nEnv.getPageReference());eo.mutatePageList(p,e,t,{type:et,rowIndex:n}),_g({type:et,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return zl.executeOrQueueDeferredAction({type:t,payload:{...g,context:s}}),f}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=$p(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(mt);return Gu(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}handleSubscript(e,t){if(!Zh(F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=yt,r=Wg.buildActionObject({containerItemID:e},t);_g({type:n,payload:{...r,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Td(e),context:e}});const{promise:a}=this.actionsApiPromise(n,r);return a}showSubscriptCreateView(e,t,n,r=F.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const a=Wg.buildActionObject({viewName:r,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),s=ne,{promise:o}=this.actionsApiPromise(s,a);return _g({type:s,payload:{...a,containerName:F.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),o}deleteWork(e,t){if(!e)return Promise.reject(new Error("workId is required parameter"));const n=Dd.isExternalCaseType(t),r=Wg.buildActionObject({workId:e,caseTypeID:t,isExternalCase:n},this.c11nEnv),{promise:a}=this.actionsApiPromise("DELETE_WORK",r);var s;return _g((s={...r},{type:qd,payload:s})),a}};const Zl=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=Vf("getCaseStages",n);return(await Bo(r,{method:a},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return $d(e)}isLocalAction(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return Rd(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===j.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=Ip(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===j.VIEW?a?.name:null}(e&&e.startsWith(j.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.VIEW_NAME)))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes("pyViewContext")){const t=e.caseInfo?.content??{},r=t.pyViewContext;if(""===r)return n.caseInfo.content;if("string"==typeof r&&r.includes("(")&&r.includes(")")){const e=r.substring(1,r.indexOf("(")),n=parseInt(r.substring(r.indexOf("(")+1,r.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n]}}const r=t.split(/[.[\]]/).filter((e=>e));for(const e of r)if("object"==typeof n&&null!==n&&e in n)n=n[e];else{if(!Array.isArray(n)||Number.isNaN(Number(e)))return;n=n[parseInt(e,10)-1]}return n}getCurrentAssignmentViewClassName(){const e=this.c11nEnv.getTarget(),t=this.c11nEnv.getContextName(),n=Ip(e,t),{config:r}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),a=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO)),s=r?.type===j.VIEW?r.context:null;if(s){const e=this.getValueByPath({caseInfo:a},s);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(j.getProperty(j.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=W(this.c11nEnv.getContextName());let n;t&&(n=Sg(t));const r=n?.caseInfo?.availableActions,a=Sg(this.c11nEnv.getContextName()),s=a?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:s}return s}return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(j.getProperty(j.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(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO);return Rd(e)}},{RESOURCE_TYPES:eu}=F;const tu=class{static openCase(e,t,n,r={}){const a={insKey:e,acTargetName:n,actionMgrID:rc.getNextActionMgrId(),context:t,...r},s=le;r&&r.channelName?a.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:Ph.isWSSPortal()&&(a.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=rc.actionManagerPromise(s,a.actionMgrID);return _g({type:s,payload:a}),o}static openAssignment(e,t,n,r={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:rc.getNextActionMgrId(),context:t,...r},s=ge;r&&r.channelName?a.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:Ph.isWSSPortal()&&(a.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=rc.actionManagerPromise(s,a.actionMgrID);return _g({type:s,payload:{...a}}),o}static createCase(e,t,n,r={}){const a=de,s={class:e,acTargetName:n,actionMgrID:rc.getNextActionMgrId(),context:t,...r};r&&r.channelName?s.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:Ph.isWSSPortal()&&(s.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=rc.actionManagerPromise(a,s.actionMgrID);return _g({type:a,payload:{...s}}),o}static getNextWork(e,t,n={}){const r=ge,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:rc.getNextActionMgrId(),context:e,...n},{promise:s}=rc.actionManagerPromise(r,a.actionMgrID);return _g({type:r,payload:{...a}}),s}static getOpenedCaseItems(e){const t=[],n=mp(e);if(n){const{items:r={}}=n,a=Object.keys(r),s=Pp(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===eu.CASE||r[n].resourceType===eu.ASSIGNMENT||r[n].resourceType===eu.OBJECT)){const{key:a="",context:o}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),d=bg(".caseTypeID",j.CASE_INFO.CASE_INFO,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,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:r,reqType:a}=Vf(Be,n),s={},o=V.getRemoteHeaderFromSourceClass(t??"");return o&&(s.RemoteSystemID=o),Bo(r,{method:a,headers:s})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=Vf("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(Bo(t,{method:n,body:o}));const c=await Promise.all(i);let d=[];for(let e=0;e<c.length;e+=1)0===e?d=c[e].data.availableActions:d.length&&(d=d.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID)))));return d};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:r}=Vf("getCaseBulkActions",t),a=await Bo(n,{method:r});let s=[];return a.data?.availableActions?.length&&(s=a.data.availableActions),s}};class nu{constructor(e){nu._instance=this,this.context=`${e}/${j.SUGGESTION}`,Cg()?.getState().data?.[this.context]||_g({type:Fe,payload:{context:this.context,data:{}}})}getField(e){return bg(e,"",this.context)}setField(e,t){_g({type:Q,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){_g({type:ye,payload:{reference:e,context:this.context,...t}}),Io.publish(j.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){_g(Yg({context:this.context,data:e,isArrayDeepMerge:!0}))}}const ru=nu;const au=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=Ng();return n?jg.getIn(n,t):null}static setSharedState(e,t){e&&_g(Pf({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:s,removePropertyFromChangedList:o=!1}=r;if(!e||!t)return;_g(Df({context:e,reference:s?`${s}.${t}`:t,value:n,isArrayDeepMerge:a,removePropertyFromChangedList:o}))}static getSuggestionsContext(e){return new ru(e)}static triggerRefresh(e,t){Wu({context:e,pageReference:t})}};let su;const ou=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=su.getValue(t);return su.registerAdditionalProps({[t]:`@P ${t}`}),e}}};class iu{static getParagraphStream(e,t){return((e,t)=>{su=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,ou);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}static isDecisionParagraph(e,t){const n=ig(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),r=ig(e,n);let a;if(r?.useDecision){const n=r.dynamicContents.length;for(let s=0;s<n-1;s+=1)if(Bg.resolveWhen(r.dynamicContents[s].when,t)){a=r.dynamicContents[s],e=`${e}#${a.when}`;break}a||(a=r.dynamicContents.pop())}else a=r;const s=r?.definedOnClassID,o=$h.getParagraphLocaleValue(s||n,e);return o?iu.getParagraphStream(o,t):a?.content?iu.getParagraphStream(a.content,t):null}}const cu=iu;class du{constructor(e){this.fieldType=e}applyFallback(e){const t=Oi.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class lu{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new du(e);default:return}}}const uu="DATAPAGE",pu="VIEW",hu="FIELD",gu="PARAGRAPH",fu=(e,t,n,r)=>{const a=[pu,hu,gu],s=[uu,gu];(!t||a.includes(e)&&!n)&&console.warn(`Invalid parameters for locale reference: type=${e}, id=${t}, scope=${n}, path=${r}`);const o=s.includes(e)&&r?`#${r}`:"",i=e===uu?"@BASECLASS":n;return e===uu||a.includes(e)?`${i}!${e}!${t}${o}`.toUpperCase():`${e}!${t}${o}`.toUpperCase()};class yu{static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";lookupList=[];constructor(e,t){this.localeReference=t,this.locale=e}getLocalizedText(e,t){const n=zh(this.locale),r=this.#r(e,this.localeReference?n.localeStore[`${this.localeReference.toUpperCase()}`]:{})||this.#r(e,n.localeStore[yu.COMMON_LABELS])||this.#r(e,n.localeStore[yu.COMPONENT_FIELDS])||this.#a(e)||e;return(t?this.#s(r,t):r)||e}getLocalizedMessage(e,t){const n=zh(this.locale).localeStore[yu.MESSAGES]??{},r=this.#r(e,n)??e;return(t?this.#s(r,t):r)||e}getLocalizedDataPage(e,t,n,r){if(!t||!n||!e)return e;const a=fu(uu,t,void 0,n),s=zh(this.locale),o=this.#r(e,s.localeStore[a])??this.#r(e,s.localeStore[yu.COMMON_LABELS])??this.#a(e)??e;return(r?this.#s(o,r):o)||e}#s(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#a(e){if(0===this.lookupList.length)return;const t=zh(this.locale);for(const n of this.lookupList){const r=this.#r(e,t.localeStore[n]);if(r)return r}}#r(e,t){if(null==e||!t)return;const n=t[e]??t[e];return"string"==typeof n?n:void 0}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const mu=e=>L.getNeedsMapping()||e?.info===F.OBJECT_INFO.OBJECT_INFO?F.OBJECT_INFO.OBJECT_INFO:F.CASE_INFO.CASE_INFO,Iu=(e,t)=>{const n=mu(t);e.data=e.data??{};const{assignments:r,availableActions:a=[]}=e.data[n]??{};if(r&&Array.isArray(r)&&r.length>0&&r[0].actions&&Array.isArray(r[0].actions)&&!t?.stopMergeActions){r[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||a.push(e)})),e.data[n]=e.data[n]??{},e.data[n].availableActions=a}},Eu=(e,t)=>{const n=mu(t);if(e.confirmationLinks&&(e.data=e.data??{},e.data[n]=e.data[n]??{},e.data[n].confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return Iu(t),t=((e,t)=>{const n=[e];return t.data=t.data??{},t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const r=e,{uiResources:{actionButtons:a,navigation:s},nextAssignmentInfo:o}=r;if(r.data&&r.data[n]&&(a&&(r.data[n].actionButtons=a),s&&(r.data[n].navigation=s),t&&t[F.ACTIONS.DELETEAVIALACTIONS]&&delete r.data[n].availableActions,Iu(r,t),e.confirmationNote)){const{confirmationNote:e}=r,t=[e];r.data.caseMessages=t}return t&&t.isCreateDataObject&&(r.data=r.data??{},r.data.dataInfo={},r.data.dataInfo.content=r.data.pyPortal,r.uiResources.root.config.context="dataInfo.content",r.uiResources.context_data.dataInfo=r.uiResources.context_data.dataInfo??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data.dataInfo.content??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data?.pyPortal,delete r.data.pyPortal,delete r.key),o&&(r.data=r.data??{},r.data.nextAssignmentInfo=o),r},Au=async e=>{const t=Eu(e),n=jg.getIn(t,j.COMPONENTS);ji(t,{},!0);const r=jg.getIn(t,j.LOCALE_REFERENCES);await $h.loadLocaleResources(r||[]),await ec(n)},Cu=(e,t,n)=>Bg.resolveView(e,t,n);const _u=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Bg.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Bg.getContextPath(this.datasource,this.index);return this.index+=1,$u({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Su{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,$u({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Nu=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new _u(e,e.context||"",t);if(n){const n=Pg(`${t.context}.${j.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new _u(e.children[0],n||e.context,t)}return e?.children?new Su(e.children,t):void 0};class Tu{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=>Yd.isProperty(e))).map((e=>Yd.getPropertyName(e)))}}const bu=new Tu;let Ou;Object.freeze(bu);const Pu=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],s=ln.trimAnnotation(a);if("string"!=typeof s&&"string"!=typeof a||!(jg.isValidAnnotation(a)&&jg.isPropertyRef(s)||a.startsWith("@W ")||a.startsWith("@DW ")||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({}),Pu(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]||{},Pu(s,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=s}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Du=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...jg.deepClone(t.inheritedProps)]};class Ru{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._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=jg.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&Du(this._inheritedConfig,t?.config),this.meta?.config?.value&&"string"==typeof this.meta?.config?.value&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=Qo.formatePageReferenceToArrayIndex(this.meta.config.value)),Pu(this._rawConfig,this._stateProps),this._isState=!jg.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=jg.isExpressionExist(this._rawConfig.config),this._isWhenExist=jg.isWhenExist(this._rawConfig.config),this._isValidatorExist=Li.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=F.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let s=this.options.pageReference;this.options.pageReference&&(s=ln.handleAnnotation(this.options.pageReference,this)),this._pageReference=Bg.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const o="reference"===this._type&&jg.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=Bg.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=ln.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=jg.isExpressionExist(e),this._isWhenExist=jg.isWhenExist(e),this._isValidatorExist=Li.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&(this.viewName=ln.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&Vu(this)}(o||i||c)&&ju(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(j.PARAGRAPH_ANNOTATION)){const r=ln.trimAnnotation(t);n=cu.isDecisionParagraph(r,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=ln.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=ln.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:a,disabled:s,visibility:o,validationType:i,caption:c,allowMultiple:d}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const l="Address"===this._type&&this._rawConfig?.config?.associatedView?ln.trimAnnotation(this._rawConfig.config.associatedView):"",u=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:ln.trimAnnotation(t),label:u?.startsWith("@")?ln.handleAnnotation(u,this,void 0):u,required:r,readOnly:a,disabled:s,visibility:o||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:d,isDeclarativeTarget:this.isDeclarativeTarget()};eo.addFieldNode(this._contextName,this._pageReference,(l||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)eo.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",ln.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)eo.removeViewNode(this._contextName,this._pageReference,ln.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;eo.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&this.viewName&&eo.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&eo.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&eo.addViewNode(this._contextName,this._pageReference,ln.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&eo.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=jg.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===j.VIEW)t=j.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=j.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=ln.isProperty(n)?ln.trimAnnotation(n):""}e&&n.forEach((n=>{eo.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==j.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,readOnly:r,disabled:a,visibility:s,validationType:o,selectionMode:i,selectionList:c,selectionKey:d,referenceList:l,renderMode:u,caption:p}=this.getRawConfigProps(),h=t||p;let g=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(g=this.getSelfReferencingDatapageKeys()),eo.addPageListNode(this._contextName,this._pageReference,this.viewName??"",ln.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:ln.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?ln.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:a,visibility:s||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:o,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:u,referenceList:l,selectionKey:d,index:this.index,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?g:void 0});const f=this.getValue(ln.trimAnnotation(this.getPropertyName()),this._pageReference)||[];eo.updatePageListNode(this._contextName,this._pageReference,ln.trimAnnotation(this.getPropertyName()),f.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){jg.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=Cu(t,this,e);if(!n)return;const r=this.getRawMetadata()?.config?.referenceList;if(!r)return;let a={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(a=n.config.parameters);const s=jg.generateDataPageHashWithParameters(a,r,this),o=Ng(),i=o?o[r]?.[s]:{};return Array.isArray(i?.pxResults)?i.pxResults:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new Zl(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID));return $h.getCaseLocaleReference(e)}getListActions(){return bi(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}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;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Bg.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[j.CONTAINERS.ROOT_CONTAINER,j.CONTAINERS.VIEW_CONTAINER,j.CONTAINERS.FLOW_CONTAINER,j.CONTAINERS.MODAL_VIEW_CONTAINER,j.CONTAINERS.PREVIEW_VIEW_CONTAINER,j.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=gp.PRIMARY,name:r,routingInfo:a}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===a)&&r?r:this.options.containerName||n}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=l?.getStore()?.getState()?.data[`${this.getContextName()}/${j.SUGGESTION}`],n=this.getStateProps()?.value,r=Bg.getContextPath(this.getPageReference(),n),a=t?au.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Oi.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=lu.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),jg.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),r=Ph.getLocale()??"en-US",a=new yu(r,n),s=this.getCaseLocaleReference();return s&&a.setLookupList([s]),a}getRawConfigProps(){const e={...Oi.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Bg.resolveProps(e,t,this),ln.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Pu(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=e=>e?.map((e=>({...e,message:this.getLocalizationService()?.getLocalizedMessage(e.message)??e.message}))),n=this.getComponentName(),r=this.getComponentConfig(),a=n===j.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE){const n=Pp(`${j.APP.APP}/${this.getContainerName()}`),r=oo({context:n,category:F.PAGE});e.pageMessages=t(r),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||ln.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=oo({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_ERROR}),r=oo({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_INFO});n&&n[0]&&(e.validatemessage=n.map((e=>this.getLocalizationService().getLocalizedMessage(e.message).replace(/\.$/,""))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=j.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status),r&&r[0]&&(e.infoMessage=r[0].message,e.status=j.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===j.ROOT_CONTAINER){const n=uo(a,Pp(`${j.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const r=au.getSharedState("isLoggedOut");e.isLoggedOut=r,this._stateProps.isLoggedOut=r;const s=oo({context:j.APP.ROOT,category:"PAGE"});e.pageMessages=t(s),this._stateProps.pageMessages=e.pageMessages}if(n===j.HYBRID_VIEW_CONTAINER){const n=oo({context:j.APP.APP,category:j.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===j.APP_SHELL&&e.portalDocMode===j.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=tu.getOpenedCaseItems(`${F.APP.APP}/${j.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===j.APP_SHELL){const n=j.APP.APP,r=Pp(`${n}/${this.getContainerName()}`),a=[...oo({context:n,category:"PAGE"})||[],...oo({context:r,category:"PAGE"})||[]],s=a.length>0?a:void 0;e.pageMessages=s&&t(s),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===j.SCALARLIST&&(this._stateProps.value=e.value),n===j.APP_SHELL||n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE||r.template===j.CASE_PREVIEW){let t=oo({context:j.APP.APP,category:"HTTP"});const n=oo({context:Pp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(oo({context:Pp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=oo({context:Pp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>this.getLocalizationService().getLocalizedMessage(e.message))):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((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(n===j.VIEW_CONTAINER||n===j.FLOW_CONTAINER||n===j.MODAL_VIEW_CONTAINER||n===j.PREVIEW_VIEW_CONTAINER||n===j.ROOT_CONTAINER){if(e.routingInfo=Pt(this.getContainerName(),this._contextName),n===j.ROOT_CONTAINER&&(e.rootConfig=Tu.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===j.FLOW_CONTAINER){const n=oo({context:this.getContextName(),category:j.CASEMESSAGES}),r=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const a=wp(r)[0];if(a){const n=Pp(a),r=l?.getStore()?.getState()?.data;r&&n&&(e.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime);const s=oo({context:n,category:F.PAGE}),o=oo({context:n,category:"HTTP"});e.httpMessages=t(o),e.pageMessages=t(s),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,o?.forEach((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(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===j.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 r.template===j.CASE_VIEW||r.template===j.SELF_SERVICE_CASE_VIEW||r.template===j.CASE_PREVIEW||r.template===j.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===j.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);const s=this.getInheritedProps()?.shouldAutoRefresh;s&&this.meta?.config?.value?.includes("@P")&&void 0===this.meta.config._autoRefresh_&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.updateContextTree()}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig(),{propertyValue:a,propertyAnnotation:s}=this.getPropertyDetails(r,n,t);if(a&&"string"==typeof a&&(a.includes(s)||a.includes(j.ATTACHMENT_ANNOTATION))){const t=ln.getPropertyName(a),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=gg(`${this._pageReference}.${t}`,this._contextName);return e?.additionalInformation&&this.setStateProps({additionalInformation:n}),(n||null===n)&&(e.additionalInformation=n),e}resolvePageClass(e){const t=this.getValue(j.CASE_INFO.CASE_INFO_CLASSID);if(!t)return;const n=e.split(".").slice(0,-1);let r=t;for(const e of n){const t=qh(e,r);if(!t)return;if(r=Array.isArray(t)?t[0]?.pageClass:t.pageClass,!r)return}return r}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(j.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(qh(e,t),e)}const n=t.pop(),r=t.join(".")?".":"";let a=this.getValue(`${r}${t.join(".")}${j.CLASS_ID}`);return a||(a=this.resolvePageClass(e)),this.resolvePropertyMetadata(qh(n,a),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(qh(n,this.getValue(`${t.join(".")}${j.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(j.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[j.getProperty(F.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(j.getProperty(F.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>xd(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()[F.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[F.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 kd(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 this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?ln.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||ln.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||ln.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(e=[]){const t="reference"===this._type&&!!this.getReferencedView(),n=t?this.getReferencedViewPConnect().getPConnect():this;if(t){const t=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(t))return!1;e.push(t)}if(!1===this.getConfigProps().visibility)return!1;if(!1===n.getConfigProps().requiresVisibleChildren||!1===this.getConfigProps().requiresVisibleChildren)return!0;const r=n.getConfigProps(),a={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let s=n._type&&a.includeTypes.includes(n._type)&&!a.excludeTemplates.includes(r.template);if(!!r.highlightedData&&r.highlightedData.length&&r.showHighlightedData&&(s=!1),!s)return!0;const o=n.getChildren();return!!o&&o.some((t=>t.getPConnect().getComputedVisibility(e)))}getChildrenIterator(){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 Sg(e||this.getContextName())}getImagePath(e){return`${Xi.getConstellationServiceUrl()}/v860/${Xi.getAppAlias()}/image/${e}?org=${Oh.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=this.options?.inheritedProps?.find((e=>"shouldAutoRefresh"===e?.prop));e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);const t=Nu(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,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#o(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),a=r&&t?`${r}#${t}`:r,s=this.getLocalizationService(a).getLocalizedText(e);return s===e?this.getLocalizationService().getLocalizedText(e):s}getLocalizedValueForFieldLabel(e){e.startsWith(".")&&(e=e.substring(1));const t=this.getFieldMetadata(e)?.label,n=this.getLocaleRuleName(),r=this?.getMetadata();let a=null;if(r){const n=r?.type,s=["View","Region"];let o=r?.config?.label||r?.config?.caption?`@FL ${e}`:null;const i=Array.isArray(r?.config?.inheritedProps)?r.config.inheritedProps.find((e=>"label"===e.prop)):null;if(!o&&i&&(o=i.value),o?.startsWith(j.FIELD_LABEL_ANNOTATION)){const e=this.#i(o);return $h.getLocaleValue(t,void 0,e,a)}n&&!s.includes(n)&&(a=n)}return this.getLocalizationService(n).getLocalizedText(t)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return e=e?.replace(/\((\d+)\)/g,((e,t)=>`[${parseInt(t,10)-1}]`)),this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?Bg.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${j.SUGGESTION}`):Bg.getPropertyValue(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)})),Du(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Bg.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)),_g({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){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};op(n)}getContextDataValue(e,t){return Og(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(j.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=j.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),_g(Yg({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;_g({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){_g(Sf(e,t||{},n,t?.formFields))}getComponent(){return Ou({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=Pg(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,t,this._contextName);a=Bg.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=ln.handleAnnotation(e,this),a=Bg.getContextPath(this._pageReference,e)||""}return Ou($u({meta:e,index:this.index,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},useCustomContext:this.useCustomContext}),r)}getReferencedView(){if(this.meta)return Bg.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(j.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find((e=>"shouldAutoRefresh"===e.prop));return n&&!t?.inheritedProps?.some((e=>"shouldAutoRefresh"===e.prop))&&t?.inheritedProps?.push(n),delete t?.name,delete t?.type,$u({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 Xd(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new Ql(this)),this._actionsApi}getActionManager(){return rc}doesContextExist(e){return Lg(e??this.getContextName())}getGoogleMapsAPIKey(){return _()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=Sg(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?io({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?io({type:"error",...e}):(io({type:"error",...e,context:j.APP.APP}),io({type:"error",...e,context:Pp(`${j.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Pg(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=md(t);yd[e]?yd[e].fieldOrder[r]=n:yd[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();Ti(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e+=1)Ii(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=au.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Bg.getContextPath(this.getPageReference(),n),a=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(r,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Bg.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,au.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const r=on.getDependencies(this._contextName,n);r?.forEach((e=>{au.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:r={}}={}}=n||{};return Object.values(r).forEach((n=>{const[,r]=n.split("."),a=t?.split(".").pop();r===a&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(e,t){const n=Yd.isPropertyInternal(t),r=e.datasource,a=this.getComponentConfig().isSearchField,{isClassKey:s,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==j.ASSOCIATED;return!a&&(i||n||!r&&(s||o)&&c)}getPropertyDetails(e,t,n){return e===j.ASSOCIATED?{propertyValue:t,propertyAnnotation:j.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:j.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),this.isReadOnlyField(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#o(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===Tu.allowedComponetsForBulkProcessing[t]||!0===Tu.allowedComponetsForBulkProcessing[t]?.[n])}#i(e){const t=e.split(`${j.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),r=n?.pop();let a=`${r}`;const s=this.getFieldMetadata(a),o=s?.classID||this.getValue(`.${n?.join(".")}${j.CLASS_ID}`),i=s?.definedOnClassID;return a=`${i||o}!FIELD!${a}`,a}}function $u(e){const t=new Ru(e);return{getPConnect:()=>t}}function vu(e){Ou=e}const xu=e=>({type:Hl.REFRESH_DATA,payload:e}),wu={},Mu=(e,t,n,r,a,s,o,i)=>{if(!(e&&r&&t))return;const c=i.actionMgrID||rc.getNextActionMgrId(),d={ID:e,actionID:t,objectTypeID:n,context:r,caseWideAction:a,isObjectType:s,isExternalObject:o,options:{...i,actionMgrID:c}};i.isFillFormWithAI?_g((e=>({type:mt,payload:e}))(d)):_g(xu(d))},Lu=(e,t,n,r,a)=>{if(!(e&&n&&t))return;r&&(r=jg.convertPageRefToClipboardPageNotation(r));_g(xu({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r}))},Fu=(e,t,n,r,a,s,o,i,c,d={})=>{if(!((e||t)&&r&&n&&a))return;a&&(a=jg.convertPageRefToClipboardPageNotation(a));const l={ID:o||c!==j.ACTION?e:t,actionID:n,context:r,options:d,interestPage:a,interestPageActionID:s,isLocalAction:o,isMultiRecordData:i,editType:c};_g(xu(l))},ju=(e,t,n)=>{wu[t]||(wu[t]={}),e&&!wu[t][e]&&(wu[t][e]={pageReference:n})},Uu=(e,t,n)=>{const r={pageName:(a=t.substring(t.lastIndexOf(" ")+1)).substring(0,a.lastIndexOf(".")),propertyName:a.substring(a.lastIndexOf(".")+1)};var a;const s=qh(r.propertyName,n||e.getValue(j.CLASS_ID,r.pageName));return!!s?.isDeclarativeTarget},ku=(e,t)=>{const n=e.getRawMetadata()?.config?.value;let r=!1;if(n){const a=qh(ln.getLeafPropertyName(n),t||Bg.resolveClassID(n,e.getPageReference(),e.getContextName()));if(r=!!a?.isDeclarativeTarget,!r&&a?.additionalInformation){const e=ln.trimAnnotation(a?.additionalInformation);r=cu.isDecisionParagraph(e,a.classID)}!r&&a?.datasource?.parameters&&(r=((e,t,n)=>{let r=!1;if(Array.isArray(t)){const a=t=>{const a=t.value;return a.startsWith("@P")&&(r=Uu(e,a,n)),r};t.some(a)}else if("object"==typeof t)for(const a of Object.keys(t))if(t[a].startsWith("@P")&&(r=Uu(e,t[a],n),r))break;return r})(e,a?.datasource?.parameters,t)),r||(r=a?.datasource?.tableType===j.DECISION)}return r},Vu=e=>{(e.isWhenExist()||ku(e))&&ju(e.getCurrentView(),e.getContextName(),e.getPageReference())},Bu=e=>{if(!e)return!1;const t=Cg()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return Dd.isObjectCaseType(n)},Gu=(e,t,n)=>{const r=xd(e,t),a=Dd.isObjectCaseType(n?.classID)||t.startsWith(j.OBJECT_INFO.OBJECT_INFO);let s,o,i="",c=!1;const d=n=>Bg.getPropertyValue(n,t,e)||"";if(a&&Bu(e))i=d(F.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),c=Dd.isExternalObject(i),n.isObjectWideAction=!0,s=d(F.OBJECT_INFO.ACTIVE_ACTION_ID)||j.VIEW_NAMES.OBJECT_CREATE_VIEW,o=d(j.getProperty(F.CASE_INFO.CASE_INFO_ID))||i;else if(s=d(F.CASE_INFO.ACTIVE_ACTION_ID)||d(F.CASE_INFO.ASSIGNMENTACTION_ID),r)o=d(j.getProperty(F.CASE_INFO.CASE_INFO_ID));else{o=d(j.getProperty(F.CASE_INFO.ASSIGNMENT_ID))||d(j.getProperty(F.CONTEXT_DATA_ASSIGNMENTID))}Mu(o,s,i,e,r,a,c,n)},Wu=e=>{const{context:t,pageReference:n}=e,r=(e=>wu[e]&&Object.keys(wu[e]).length>0&&wd(e))(t);if(!r)return;const a=Bg.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:s,editType:o}=a||{};if(s){const e=Bg.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,n,t),r=Bg.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:d,isLocalAction:l,viewName:u}=a;o===j.ACTION?Fu(e,r,d,t,i,c,l,s,o):Lu(e,u,t,i,{})}else Gu(t,n,{})},Hu=(e,t)=>{const{requestType:n}=e;if(e?.options?.refreshFor&&"refresh"===n){t+=`?refreshFor=${e.options.refreshFor.replace(/\[(\d+)\]/g,((e,t)=>`(${parseInt(t,10)+1})`))}`}return e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},qu=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),r=t.url?.includes("/refresh?refreshFor="),a=e.url?.endsWith("/refresh")&&!n,s=t.url?.endsWith("/refresh")&&!r;if(a&&s)return e.url===t.url;if(a&&r)return!0;if(n){if(s)return"CANCEL_REFRESH";if(r)return!1}return!1},zu=e=>{const t=(e=>{const t=[];return eo.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let a=r.join(".");e&&a&&(a=jg.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a}))})),t})(e),n=(e=>{const t=[];return eo.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const a=r.split(".");a.shift();let s=a.join(".");e&&s&&(s=jg.convertPageRefToClipboardPageNotation(s),t.push({name:e,context:s,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const Yu=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},{APP:Ku}=j;let Ju={},Xu={},Qu={};const Zu="You will lose unsaved changes. Do you want to continue?",ep="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",tp=(e=Ku.APP,t,n)=>{let r=[],a=[];t||(r=bd(e,!0)),n||(a=(e=>{const t=eo.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===Bg.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const s={};((e,t,n)=>{const r=Xu[t]||{};Object.keys(r).forEach((t=>{const a=r[t].associatedProperty;Object.hasOwn(r,t)&&(void 0===a||n.includes(a))&&jg.buildObject(t,e,r[t].value)}))})(s,e,r);const o=Ju[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&r.includes(e)||t;Object.hasOwn(o,e)&&n&&!a.includes(e)&&jg.buildObject(e,s,o[e].value)})),s},np=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete Ju[t]?.[n],delete Xu[t]?.[n]},rp=e=>e&&Qu[e],ap=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:a,associatedProperty:s}=t,o=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[o]?e[o].previousValue=bg(t.reference,null,n):(e[o]={initialValue:r||bg(t.reference,null,n)},e[o].previousValue=e[o].initialValue),e[o].value=t.value,s&&(e[o].associatedProperty=s),a&&e[o].value===e[o].initialValue&&np(t)},sp=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;eo.isFieldExists(n,r)||(Xu[n]=Xu[n]||{},ap(Xu[n],t)),Ju[n]=Ju[n]||{},ap(Ju[n],t)},op=({value:e,context:t,reference:n})=>{const r=qp(t),a=Ip(r,t)||{};if(Yu.isPageInstruction(n)||a?.subscriptFieldName)return;const s=n?.startsWith(".")?n?.substr(1):n;Ju[t]=Ju[t]||{};Ju[t][s]||(Ju[t][s]={initialValue:bg(s,null,t)}),Ju[t][s].value=e},ip=e=>e&&Ju[e]&&Object.keys(Ju[e]).some((t=>Ju[e][t].initialValue!==Ju[e][t].value))||!!rp(e),cp=(e,t)=>{if(!e||!t)return!1;const n=Ju[e]&&Ju[e][t];return!!n&&n.previousValue!==n.value},dp=e=>{e&&Ju[e]?(Ju[e]={},Xu[e]={}):"all"===e&&(Ju={},Xu={},Qu={}),Qu[e]&&(Qu[e]=!1)},lp={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ee&&(rn(r),(e=>{const{context:t,pageReference:n,value:r,reference:a}=e;mg.triggerCascade(t,a,r);const s=on.getDependencies(t,a),o=mg.getResetDependencies(t,a),i={context:t,datapages:{}};[...s,...o].forEach((e=>{const n=jg.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=n.split("."),r=`.${e.pop()}`,a=e.join(".");fd.getStateMachine(t,a,r).deleteAll()}else Yu.isPageInstruction(n)&&fd.executeStateMachine(t,n,""),_g({type:Q,payload:{reference:n,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}})})),s.forEach((r=>{let a=n;r.startsWith(n)||(a="");const s=r.replace(`${a}`,"").split(".").filter((e=>!!e));s.pop();const o=s.join("."),c=bg(`.${o}`,a,t)?.classID||e.classID,d=qh(r.split(".").pop(),c),{datasource:l}=d,u={},p=[];l.parameters.forEach((e=>{e?.value?(u[e.name]=Yd.isProperty(e.value)?bg(`.${jg.getFullPropertyReference([o,jg.getPropertyName(e.value)])}`,a,t):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(j.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(j.NULL_STRING))}));const h=l.name.concat(j.UNDERSCORE_STRING,jg.getHashedString(p.join(j.HASH_DELIMITER))),{name:g}=l,f=ng(g);i.datapages[h]={mode:l.mode,propertyName:r,name:l.name,dataViewParameters:u,refreshStrategy:f?.refreshStrategy}})),s.length&&_g({type:nt,payload:i})})(r),setTimeout((()=>{(cp(r.context,r.reference)||Ni(r.context))&&Wu(r),Bl.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)}),0)),n===st&&!r?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:a,instruction:s,skipDirtyValidation:o=!1}=r;0===a&&"INSERT"===s&&n&&(e=>{let t=!1;const n=e?.getRawMetadata()?.config;n?.type&&"multirecordlist"===n.type&&n?.contextClass&&(t=function e(t,n){for(const r of n){const n=$u({meta:r}).getPConnect();if(n.isWhenExist()||ku(n,t))return!0;if(r.children&&e(t,r.children))return!0}return!1}(n.contextClass,n.children??[])),t&&ju(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),Wu({context:e,pageReference:t}),o||(Qu[`${e}`]=!0)}if(n===Q||n===Z){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:s=!1}=r;eo.updateFieldNodeValue(a,e,r.value),Yu.isPageInstruction(e)||s?s||(Qu[`${a}`]=!0):sp(t),(r.removePropertyFromChangedList||n)&&np(r)}if(n===Pe||n===De){const{transientItemID:e,data:t}=r;jg.iterateLeafNodes(t,(t=>{np({context:e,value:"",reference:t.join(".")})}))}if(n&&[ve,Se,we,Oe].includes(n)){dp(r.context),mg.purgeResetDependencies(r.context),(e=>{e&&wu[e]&&delete wu[e]})(r.context);(r.childContainersContexts||[]).forEach((e=>{dp(e)}));(r.transientItems||[]).forEach((e=>{dp(e)}))}e(t)},getChanges:tp,recordChange:sp,isDirty:()=>Object.keys(Ju).some((e=>ip(e))),isPropertyDirty:cp,isContextDirty:ip,resetChangedProperties:dp,deleteRecordedChange:np,isComplexObjectMerged:rp};const up=new class{getCoreheaders(e){const t=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,n=Pp(t),r=$p(n),a=Bg.getProperty(j.COREHEADERS,"",r);if(a&&e in a)return a[e]}},pp={defaultLimit:16},hp={SINGLE:"single",MULTIPLE:"multiple"},gp={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},fp=()=>Cg()?.getState()?.containers;function yp(e){return"string"==typeof e&&""!==e.trim()}const mp=e=>yp(e)?Cg()?.getState().containers[e]:null,Ip=(e,t)=>{if(!yp(e)||!yp(t))return null;const n=fp(),r=n?.[e];return r&&r.items&&r.items[t]||null},Ep=e=>yp(e)?Cg()?.getState().containers[e]?.items:null,Ap=e=>yp(e)&&Cg()?.getState().containers[e]?.accessedOrder||[],Cp=e=>yp(e)&&Ap(e)?.length>0||!1,_p=(e,t,n)=>{if(!yp(e)||!yp(t))return!1;const r=fp(),a=r?.[e],s=a&&a.items||null,o=n||((e,t)=>e===t);if(t&&s)for(const e of Object.keys(s))if(o(t,s[e].key))return!0;return!1},Sp=(e,t,n)=>{if(!yp(e)||!yp(t))return null;const r=fp(),a=r?.[e],s=a&&a.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&s)for(const e of Object.keys(s))if(o(t,s[e].key))return e;return null},Np=(e,t)=>{if(e&&t)for(const a of Object.keys(t))if(n=e,r=t[a].key,n?.toLowerCase()===r?.toLowerCase())return t[a];var n,r;return null},Tp=e=>{if(!yp(e))return null;const t=fp()??{};for(const n of Object.keys(t))if(t[n]){const r=t[n].items??null,a=Np(e,r);if(a)return a}return null},bp=(e,t)=>{if(!yp(e)||!yp(t))return!1;const n=fp();return n&&Object.hasOwn(n,`${e}/${t}`)},Op=(e,t)=>{if(!yp(e)||!yp(t))return null;const n=fp(),r=n?.[`${e}/${t}`];return r&&r.type},Pp=e=>{if(!yp(e))return null;let t=null;const n=fp();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},Dp=(e,t,n)=>{if(!yp(e)||!yp(t))return!1;const r=Sp(e,t,n);return!!r&&r===Pp(e)},Rp=(e,t)=>{let n=null;const r=fp();if(!r)return null;for(const a of Object.keys(r))if(r[a].items){const s=r[a].items[e];if(n=s?s[t]:null,n)break}return n},$p=e=>yp(e)?Rp(e,"context"):null,vp=e=>{if(!yp(e))return null;let t=null;const n=fp();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,s=a&&a.length>0?a[a.length-1]:null;t=$p(s)}return t},xp=e=>{if(!yp(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=fp();if(!a)return[];const 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 of Object.keys(a))if(a[e].items){const t=s(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},wp=e=>{if(!yp(e))return[];const t=[],n=fp();if(!n)return[];for(const r of Object.keys(n))r.startsWith(e)&&r!==e&&t.push(r);return t},Mp=e=>{if(!yp(e))return[];const t=[],n=fp();if(!n)return[];for(const r of Object.keys(n))if(r.startsWith(e)&&r!==e){(Ap(r)||[]).forEach((n=>{$p(n)!==e&&t.push($p(n))}))}return t},Lp=e=>{const t=[...Mp(e),e],n=[],r=Cg()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(r,`${e}/${j.SUGGESTION}`)&&n.push(`${e}/${j.SUGGESTION}`)})),n},Fp=e=>yp(e)?e&&mp(e)&&mp(e).type===hp.SINGLE:null,jp=e=>yp(e)?e&&mp(e)&&mp(e).type===hp.MULTIPLE:null,Up=e=>yp(e)&&mp(e)&&mp(e).items&&Object.keys(mp(e)?.items).length>0||!1,kp=e=>e&&pp[e]?pp[e]:pp.defaultLimit,Vp=(e,t=pp.defaultLimit)=>{yp(e)&&(pp[e]=t)},Bp=e=>{if(!yp(e))return!1;let t=!1;const n=mp(e),{items:r={}}=n,a=Object.keys(r),s=kp(e);return a&&a.length>0&&a.length>=s&&(t=!0),t},Gp=e=>{if(!e||!yp(e.name)||!yp(e.context))return null;const t=e?.name,n=mp(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=wp(`${j.APP.APP}/${j.PREVIEW}`),s=Mp(`${j.APP.APP}/${j.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...s],childContainers:a}},Wp=e=>{if(!yp(e))return!1;const t=$p(e);return ip(t)||nd(e)},Hp=e=>{if(!yp(e))return null;let t;const n=mp(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!Wp(n)){t=n;break}}return t},qp=e=>{if(!yp(e))return null;const{containers:t}=Cg()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.slice(0,n)},zp=(e,t={})=>{if(!yp(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=qp(e),r=$p(e),{skipDirtyCheck:a}=t;let s=!0,o=[];if(Wp(e)&&!a&&(s=window.confirm($h.getLocaleValue(Zu,"Messages"))),s){const{accessedOrder:t=[],items:a={},type:s}=mp(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=a[i]||{},{semanticURL:d=j.FORWARD_SLASH_STRING,context:l}=c;o.length>0&&d&&d!==j.FORWARD_SLASH_STRING?Yf({directUrlUpdation:!0,semanticURL:d,options:{containerItemID:i,context:l}}):Yf({directUrlUpdation:!0,semanticURL:j.FORWARD_SLASH_STRING,options:{}});_g(ff({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:s}}))}return Promise.resolve({newAccessedOrder:o,removeItem:s})},Yp=(e,t,n,r)=>{const a="root",s=H(t,a,!0),o=Ot(t,a),i={data:n,context:r?"app":s},c=[nf({root:e,containerItemID:s,context:r?"app":s,target:o,containerName:t})];c.push(Yg(i)),_g(c)},Kp=(e,t,n)=>{let r=Ap(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1){if($p(r[e])===n){a=!0;break}}return a},Jp=e=>{if(!yp(e))return!1;const t=fp(),n=$p(e),r=t?Object.keys(t):[];let a=!1;for(let t=0;t<r.length&&(a=Kp(r[t],e,n),!a);t+=1);return a},Xp=e=>{Array.isArray(e)||(e=[e]);const t=fp()||{};return e.map((e=>{const n=qp(e);return jg.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},Qp=e=>{const{transientItemID:t,data:n,options:r}=e,a=jg.deepClone(Cg()?.getState().data[t]);r?.reset&&jg.iterateLeafNodes(a,(e=>{"classID"!==e[e.length-1]&&jg.setIn(a,e,"")})),_g(af({transientItemID:t,data:jg.mergeDeep(n,a)}))},Zp=e=>{const{transientItemID:t,data:n}=e;_g(of({transientItemID:t,data:n}))},eh=e=>{const t=jg.deepClone(Cg()?.getState().data[e]);jg.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&jg.setIn(t,e,"")})),_g(sf({transientItemID:e,data:t}))},th=e=>{const t=jg.deepClone(Cg()?.getState().data[e]);jg.iterateLeafNodes(t,(e=>jg.setIn(t,e,""))),_g(cf({transientItemID:e,data:t}))};class nh{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 rh=()=>nh,ah=e=>{const t={containerName:e};t.childContainers=wp(e),_g({type:Le,payload:t})},sh=(e,t)=>{const n=xp(e),{key:r}=Ip(qp(e),e),a=[];n.forEach((e=>{const{key:n}=Ip(qp(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:qp(e),context:e};a.push({type:fe,payload:n})}})),a.length&&_g(a)},oh=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:qp(e),context:e};n.push({type:fe,payload:r}),n.length&&_g(n)},ih=()=>Ph.isPortalLoaded?"app":"root",ch=()=>up,dh=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:qp(e),context:e};_g({type:fe,payload:n})},lh=(e,t)=>{const n=Sp(e,t),r=Sp(`${n}/workarea`,t);return $p(r)},uh=e=>yp(e)?Rp(e,"parentContext"):null,ph=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},hh=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},gh=()=>Jd,fh=/{(.*?)}/i,yh=/{(.*?)}/g,mh=e=>null!==e.match(fh),Ih=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),Eh=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`}},Ah=()=>Ih(window.location.pathname),Ch=()=>Ih(window.location.pathname+window.location.search),_h=(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)}},Sh=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&&"activeTab"!==e&&a.set(e,t);const s=new URLSearchParams(a).toString();return s?`${t}?${s}`:t}return e},Nh=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),r=n.indexOf("assignments"),a=n.slice(r-2).join("/"),s=n[n.length-1],o=kf(Ge,{assignmentID:s});return{routeEndpoint:o?.restApi,requestType:o?.reqType,payload:{assignmentID:s},options:t,routeKey:Qe,urlPath:a}})(e,t):Oh.getEndPointInfo(e),Th=()=>{const e=Ph.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const bh=new class{staticRoutesList=[];constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",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.defaultClassName="",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&&(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};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((t=>{mh(t)?this.dynamicRoutesList?.push(t):this.staticRoutesList?.push({[t]:e[t]})}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>Ih(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Ih(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,"")).startsWith("/")&&Th()&&"PREVIEW"!==Ph.getRenderingMode()&&this.setDefaultClassName(""),Ih(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))})),e}getRouteDetails(e,t){if(!t)return this.appRoutes[e];let n="",r={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.values(this.appRoutes).forEach((t=>{t.payload?.page===e?(n=t.routeKey,r={...t.payload}):this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,r={...this.appRoutes[e].payload})})),{routeKey:n,payload:r}}transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!V.isRemoteCase(t))return e;const{RemoteClassGroup:r,RemoteSystemID:a}=V.getRemoteCase(t);return{...e,caseID:n?.replace(t,r?.toUpperCase()),RemoteSystemID:a}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=Th();let n=this.processUrl(e,!0),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);r||(n=this.processUrl(this.defaultViewUrlPath,!t),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:a,payload:s}=this.getRouteDetails(r,t);if(!this.appRoutesMeta?.[a]?.restApi)return null;const{reqType:o,endPoint:i,params:c}=this.appRoutesMeta[a].restApi,d={routeKey:a,requestType:o,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(s)}};return this._resolveRoute(d,this.processUrl(e,!1),r)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let a=r;if(mh(r)){const e=r.match(yh);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}))}const s=zf(a),o=new URL(s);return this.isDefaultPortal()||this.getPortalName()&&!o.searchParams.toString().includes("portal=")&&o.searchParams.append("portal",this.getPortalName()),o.toString()}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:a}=e;if(a&&!r)return;const s=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(Oc(t))),o=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,i={semanticURL:s,directUrlUpdation:!0,options:{acName:o,context:vp(o)}};qf(i);const c=r.substring(r.lastIndexOf("-")+1),d=t.substring(t.lastIndexOf(" ")+1),l=Ph.environmentInfoObject?.pxApplication?.pyLabel;ty(`${c} (${d}) - ${l}`)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},a=r?.split("/").length,s=r?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const 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&&(jg.isEmpty(s)||jg.isEmpty(a)?o:Object.keys(a).every((e=>Object.hasOwn(s,e))))}));return i?this._getQueryParamsResolvedURL(i,n):o.includes("cases/{id}")&&n?.id?"cases/{id}":""}_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&&mh(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?.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const s=a.match(yh);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)if(r[e]=d[e],mh(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 of Object.keys(u))mh(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(!mh(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(yh);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 of Object.keys(e)){let a=e[r];if("string"==typeof a&&mh(a)){const e=a.match(yh);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,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let r=this._findMatchedRouteInStaticList(n,t);return void 0!==r?r:(r=this._findMatchedRouteInDynamicList(e),void 0!==r?r:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),r=t?.toLowerCase();if(Th()){const e=this._findMatchingRouteByClass(n,r);if(!e)return;const t=Object.values(e)[0],a=t?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,r])=>{if(!r)return!1;const a=r.payload?.page?.toLowerCase(),s=r.payload?.pageClass?.toLowerCase(),o=a===e||n.toLowerCase()===e;return t?o&&s===t:o}))))};_findInStaticList=e=>{if(!this.staticRoutesList)return;const t=this.staticRoutesList.find((t=>Object.keys(t)[0].toLowerCase()===e));return t?Object.keys(t)[0]:void 0};_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(!mh(e)&&e!==r[o]&&Eh(e)!==r[o])return!1}if(a){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(a.toLowerCase()),r=new Set,s=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())s.add(e);if(s.size!==r.size)return!1;for(const n of r){if(!s.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!o.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{_h(e,t,"warning"),_h("Error in Generated Routing Table",null,"error"),_h("Back | Forward for this page may NOT work as intended",null,"warning"),_h("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},Oh=bh;const Ph=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",this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||jg.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1}}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 Oh.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}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===j.PORTAL_TYPE.WSS}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(j.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}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){Eo.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}getLocalizationVersion(){const e=this.getFeatureMap().pyLocalizationVersion,t=this.getFeatureMap().localizationVersion;return void 0!==t?t:void 0!==e?parseInt(e,10):1}getLocalizationBundles(e=this.locale){const t=this.environmentInfoObject?.pyLanguagePacks||[];return(t.find((t=>t.pyLangCode===e))?.pyBundles??t.find((e=>e.pyLangCode===j.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}};const Dh=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 Rh{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";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,r=t.toUpperCase();r.startsWith("@BASECLASS!DATAPAGE!")&&r.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${r}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===r?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,r)};updateLocaleStore=(e,t)=>{const n=e.fields||e,r=this.localeStore[t];r?jg.mergeDeep(n,r):n&&"object"==typeof n&&(this.localeStore[t]=n)};sanitizeLocaleField=(e,t)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(t.toUpperCase())&&Object.entries(e).forEach((([,e])=>{null!==e&&"object"==typeof e&&"fields"in e&&this.updateLocaleStore(e,t)})),this.updateLocaleStore(e,t)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,r){const a=this.#c(n,t),s=this.#d(e);s&&(e=Dh.formatLocaleKey(e));const o=a?this.localeStore[a.toUpperCase()]??{}:{},i=r?this.localeStore[r.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(o,e)||e:s?Dh.replaceWithValue(o[e]||i[e]||e):o[e]||i[e]||e}#c(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${j.PARAGRAPH}!${t}`,r=this.localeStore[n.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):null}getPortalLocaleReference(e){return 2!==Ph.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${Ph.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=Ph.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:Xi.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){if(Ph.getLocalizationVersion()===j.LOCALIZATION_V2)return;const t=Ph.getUseLocale(),n=Ph.getBaseLocale();if(Ph&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await this.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}matchPatternWithText(e,t){let n=t;const r=[];for(let t=0;t<e.length;){const a=e[t];if(0!==a.length){const e=n.indexOf(a);if(-1===e)return null;if(t>0){const t=n.slice(0,e);r.push(t)}n=n.slice(e+a.length)}t+=1}return n&&r.push(n),r}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const r of Object.keys(e)){const a=r.split(/\{\d+\}/),s=this.matchPatternWithText(a,t);if(s){const t=e[r];if(n=this.replacePlaceHolders(s,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=Ph.getLocale();return this.availableLangPacks||(this.availableLangPacks=await Xi.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#d(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const $h=new Rh;dn.registerHandler("@L",((e,t)=>t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e))),dn.registerHandler("@P",((e,t,n)=>t?t.getValue(e):Bg.getLitePropertyValue(n))),dn.registerHandler("@E",((e,t,n)=>{try{const r=Kt(e),a=Jt(r);return Xt(a,t,n)}catch(e){}return!0})),dn.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:a}=n??{};r=Og(t,`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,a)}return!0===r||"true"===r})),dn.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.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===j.READONLY,d=n?.datasource?.name||"",l=t.getComponentConfig();if(l&&l.deferDatasource&&(l.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:l.datasourceMetadata}),i===j.DATA_PAGE))return null;if(i===j.DECISION||i===j.RULE_REFERENCE)return function(e,t){const n=ln.getPropertyName(e?.propertyForDisplayText??""),r=ln.getPropertyName(e?.propertyForValue??""),a=t.getContextDataValue(`.${j.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return a?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==j.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const u=ln.getPropertyName(n?.datasource?.propertyForDisplayText),p=ln.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(ln.isProperty(e?.value)){let t=bg(`.${jg.getFullPropertyReference([s,ln.getPropertyName(e.value)])}`,o,g);f.push(jg.getFullPropertyReference([o,s,ln.getPropertyName(e?.value)])),null!=t&&""!==t||(t=j.NULL_STRING),r.push(t)}else r.push(e?.value||j.NULL_STRING)})),g){const e=on.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),on.addContextName(g,e)}const y=function(e,t,n,r){let a="",s=n;if(t.join(j.HASH_DELIMITER)&&(a=jg.getHashedString(t.join(j.HASH_DELIMITER)),s=n+j.UNDERSCORE_STRING+a),r){const e=Ng(),t=e?e[n]?.[s]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=e.getDataObject(),i=(o?.[n]||{})[s]||{};return Array.isArray(i?.pxResults)?i.pxResults:[]}(t,r,d,c),m=t.getLocalizationService();return y.map((e=>{let t=e[u]||e[`.${u}`];var n;return"string"==typeof t&&(n=t,t=m.getLocalizedDataPage(n,d,u)),{key:e[p]||e[`.${p}`],value:t}}))})),dn.registerHandler("@ROUTING_INFO",((e,t)=>Pt(t.getContainerName(),t.getContextName()))),dn.registerHandler("@ENV",((e,t)=>{switch(e){case j.ENV_INFO_KEYS.APPLICATION_NAME:return Ph.getApplicationName();case j.ENV_INFO_KEYS.ACCESS_GROUP:return Ph.getAccessGroup();case j.ENV_INFO_KEYS.USER_NAME:return Ph.getOperatorName();case j.ENV_INFO_KEYS.USER_ID:return Ph.getOperatorIdentifier();case j.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService("APP!APPLICATION").getLocalizedText(Ph.getApplicationLabel()||"");case j.ENV_INFO_KEYS.USER_IMAGE:return Ph.getOperatorImageInsKey();case j.ENV_INFO_KEYS.LOCALE:return Ph.getUseLocale();case j.ENV_INFO_KEYS.TIMEZONE:return Ph.getTimeZone();case j.ENV_INFO_KEYS.WORK_GROUP:return Ph.getOperatorWorkGroup();default:return e}})),dn.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],r=t.getComponentConfig(),a=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t,filterDownloadedFields:s}=r[a],o=[];return n.forEach((n=>{const r={};t||s?Object.keys(n).forEach((e=>{const t=ln.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=ln.getPropertyName(e[t]);r[t]=n[a]})),o.push(r)})),o}return[]})),dn.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})),dn.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||Bg.getLitePropertyValue(n,e),a=t?.getReferencedUser(r)||Bg.getReferencedUser(r,n);return{userId:r,userName:a?a.UserName:null}})),dn.registerHandler("@ACTIVE_CASES",((e,t)=>tu.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),dn.registerHandler("@LR",(e=>e)),dn.registerHandler("@CASE",((e,t)=>e===j.ID?t.getCaseInfo().getKey():e)),dn.registerHandler("@SHARED",(e=>au.getSharedState(e))),dn.registerHandler("@PARAGRAPH",((e,t)=>cu.processParagraph(e,t))),dn.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("]"));if(!t)return null;const{useCustomContext:s}=t;let o;return jg.isEmpty(s)?o=t.getValue(`.${n}`):(o=s,o=jg.getIn(o,n)),o&&r.length>0?(a&&(o=o.filter((e=>Qt(a,e)))),o.map((e=>jg.getIn(e,r)))):null})),dn.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),dn.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),dn.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):Bg.getLitePropertyValue(n),wi.prepareAttachmentData(r)})),dn.registerHandler("@FL",((e,t)=>t.getLocalizedValueForFieldLabel(e))),dn.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),dn.registerHandler("@GENAICOACH",((e,t)=>cg(e,t.getCurrentClassID()))),dn.registerHandler("@AIAGENT",((e,t)=>{const n=dg(e,t.getCurrentClassID());if(n)return n;const r=t.getComponentConfig();if(r){const n=r?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const r={label:n.label};t.resolveConfigProps({label:n.label},r);const a=r.label;return{insName:`${n.ruleNamespace}__${e}`,label:t.getLocalizedValue(a),type:"agent"}}}return null})),dn.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),a=t.getPageReference();Bl.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",a,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${a.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${a}${e}`,`${r}/${a}`,r)})),dn.registerHandler("@DW",((e,t,n)=>{let r;const a=`${j.CONTEXT_DATA}.${j.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(t)r=t.getValue(a);else{const{context:e}=n??{};r=bg(a,null,e)}return!0===r||"true"===r}));const vh={},xh={},wh={},Mh={},Lh={},Fh={},jh={},Uh={},kh={},Vh={},Bh={},Gh={},Wh={},Hh=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],a=t[n];a?((e,t,n,r)=>{const a=Array.isArray(n)?n:[n];(Array.isArray(r)?r:[r]).forEach((e=>{const t=a.findIndex((t=>t.classID===e.classID));if(-1===t)a.push(e);else{const n={isDeclarativeTarget:!1},r={...a[t],...n,...e};a[t]=r}})),t[e]=1===a.length?a[0]:a})(n,t,a,r):t[n]=r})):jg.copy(e,t)},qh=(e,t="")=>{if(!e)return null;const n=Mh[e];if(!n)return null;if(!t)return jg.deepClone(n);let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r?jg.deepClone(r):null},zh=e=>(Gh[e]||(Gh[e]=new Rh),Gh[e]),Yh=(e,t)=>(Wh[e]||(Wh[e]=t()),Wh[e]),Kh=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const s=qh(e,t);return r.length&&(a=r.join(".")),{...s,embeddedType:n,category:a}}const[a,...s]=e.split("."),o=qh(a,t);return o&&r.push(o.label),Kh(s.join("."),o?.pageClass,o?.type,r)},Jh=e=>{Hh(e,xh)},Xh=e=>{Hh(e,wh)},Qh=e=>{(e=>{e.views&&Hh(e.views,xh),e.navigations&&Hh(e.navigations,wh),e.personalizations&&Hh(e.personalizations,Fh),e.insights&&Hh(e.insights,jh),e.paragraphs&&Hh(e.paragraphs,vh),e.dataTypes&&Hh(e.dataTypes,Uh),e.datapages&&Hh(e.datapages,kh),e.genAICoaches&&Hh(e.genAICoaches,Vh),e.AIAgents&&Hh(e.AIAgents,Bh)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const r=t[n];if(Array.isArray(r)){if(r.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const r=fu(hu,n,t.definedOnClassID??t.classID);t.localeReference=r})),1===r.length){const[e]=r;t[n]=e}}else e.datapages&&r?.datasource&&"DataPage"===r.datasource.tableType&&(r.datasource.mode=e.datapages[r.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{Lh[e]=t[e]})),Hh(e.fields,Mh)},Zh=e=>xh[e],eg=(e,t)=>{const n=xh[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},tg=e=>wh[e],ng=e=>e in Lh?Lh[e]:null,rg=e=>e in Fh?Fh[e]:null,ag=e=>e in jh?jh[e]:null,sg=e=>{const t={};return Object.keys(Mh).forEach((n=>{const r=Mh[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=jg.deepClone(a))})),t},og=(e,t)=>{const n=qh(e,t),r=n?.datasource?.parameters;return r?jg.deepClone(r):null},ig=(e,t)=>{let n=null;const r=vh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?jg.deepClone(n):null},cg=(e,t)=>{let n=null;const r=Vh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?jg.deepClone(n):null},dg=(e,t)=>{let n=null;const r=Bh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?jg.deepClone(n):null},lg=e=>{if(e in Uh){const{savableDataPage:t}=Uh[e];return t}return null},ug=e=>{const t=kh[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:a}=t;if(r)return a.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const s=Uh[n];return s?s.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},pg=e=>{if(e in Uh){const{lookupDataPage:t}=Uh[e];return t}return null},hg=e=>{if(Object.hasOwn(Uh,e)){const{lookupDataPageInfo:t}=Uh[e];return t}return null},gg=(e,t)=>{const n=e.split("."),r=n.pop(),a=new Ru({options:{pageReference:`${n.join(".")}`,context:t}}),s=qh(r,a.getCurrentClassID())?.additionalInformation;if(!s?.includes("@PARAGRAPH"))return s;const o=ln.trimAnnotation(s);return cu.processParagraph(o,a)},fg=(e,t)=>{const n=e.split("."),r=n.pop(),a=new Ru({options:{pageReference:`${n.join(".")}`,context:t}}),s=qh(r,a.getCurrentClassID()),o={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(s,o),o};class yg{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,s="singleRecord"){if(!e||!n||!r?.length)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=jg.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)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=jg.getFullPropertyReference([i,t]),t in o){const e=o[t];jg.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=bg(n,t,e);s.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,a){const s=yg._getFieldsForList(e,t,n);s.length>0&&(this.registerFields(e,t,s,r,a),yl.enableCascade(e))}unRegisterListField(e,t,n,r){const a=yg._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=qh(n,bg("classID",t,e));return a&&!Array.isArray(a)&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(ln.isProperty(e)){const t=ln.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=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=bg(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=bg(t,"",e);n(e,t,r)}))}))}_updateChangedProperties(e,t,n,r,a,s,o,i){const c=n&&i.some((e=>r.startsWith(e)));if(e!==t||c){const e=r.lastIndexOf("."),t=r.substring(0,e),i=r.substring(e),c=fo.getMessages({type:"error",property:i,context:a,pageReference:t});if(c?.length>0&&o.push(r),!n)return;s.push(r)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&jg.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,r,a,s,o){if("object"!=typeof e){a.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=bg(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,r,s,o)}const i=Object.keys(e??{});for(let c=0,d=i.length;c<d;c+=1){const d=i[c],l=`${n}.${d}`;if(Array.isArray(e[d])){const n=bg(l,"",t);n&&n?.length===e[d].length||o.push(l)}this._getServerProperties(e[d],t,l,r,a,s,o)}}getServerProperties(e,t,n=j.CASE_INFO.CASE_INFO_CONTENT){const r=[],a=[],s=[],o=jg.getIn(e,n);return o&&t?(this._getServerProperties(o,t,n,r,s,a,[]),{changedListProperty:r,leafProperty:s,changedPropertyWithError:a}):{changedListProperty:r,leafProperty:s,changedPropertyWithError:a}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const mg=new yg;let Ig=null;const Eg=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),Ag=e=>{Ig=e},Cg=()=>Ig,_g=e=>{if(!e)return;let t=[],n=[],r=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:r}=mg.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),Ig?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(r.length&&!e.payload.skipValidation){r.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{fo.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const r=eo.getFieldReferenceForProperty(e.payload.context,`${n}${t}`),a=Bg.resolveContextTreeNodeProps(r.props);Li.validate(a.componentName?.toLowerCase(),a.propertyName,Bg.getLitePropertyValue(a,a.propertyName),a)}))}mg.handleServerChanges(e.payload.context,t,n)}},Sg=e=>Cg()?.getState().data?.[e],Ng=()=>Cg()?.getState().data[j.SHARED],Tg=(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=Eg(a);return jg.getIn(n,s)},bg=(e,t,n)=>Tg(e,t,Sg(n)),Og=(e,t,n)=>Tg(t,e?`${j.CONTEXT_DATA}.${e}`:`${j.CONTEXT_DATA}`,Sg(n)),Pg=(e,t,n)=>((e,t,n)=>{const r=Eg(`${t}.${n}`);return jg.getIn(e,r)})(Sg(n),`${j.CONTEXT_DATA}.${e}`,t),Dg=e=>{const{context:t}=e,n=Cg()?.getState().data[t];if(n)return ue;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?_e:ue},Rg=(e,t)=>{const n=Eg(t);return jg.deleteIn(e,n)},$g=e=>!Array.isArray(e)&&"object"==typeof e,vg=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:a=[],propertiesToReArrange:s=[]}=n;Array.isArray(e)&&!t&&(t=[]),Array.isArray(a)&&a.length>0&&a.forEach((t=>{t.allowMultiple?t.allowMultiple&&!s.includes(t.path)&&jg.setIn(e,t.path,[]):jg.setIn(e,t.path,{})})),s.length>0&&jg.rearrangeProperties(s,e);const o=(e,t)=>{if($g(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return x()(e,t,o);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return x()(e,t,o);{const n=t.length;if(void 0===r&&n===e.length)return x()(e,t,o)}}return""===t&&e&&"object"==typeof e?e:t};return o(e,t)},xg=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:a}=r,s=Eg(t);if("object"==typeof n){const t=vg(jg.getIn(e,s),n,{isArrayDeepMerge:a});return jg.setIn(e,s,t)}return jg.setIn(e,s,n)},wg=(e,t,n)=>{const r=Eg(t);return jg.setIn(e,r,n)},Mg=()=>{const e=tt,{promise:t,actionMgrID:n}=rc.actionManagerPromise(e);return _g({type:e,payload:{actionMgrID:n}}),t},Lg=e=>{const t=Cg()?.getState();return!!t?.data?.[e]};class Fg{static mergeDeep(e,t){return x()(t,e)}static hasIn(e,t){return O()(e,t)}static getIn(e,t,n){return D()(e,t,n)}static setIn(e,t,n){return $()(e,t,n)}static deleteIn(e,t){return T()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return M()(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||!e.includes("."))return!1;for(let t=0;t<e.length;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 of Object.keys(e)){const a=e[r];a&&"object"==typeof a&&!Array.isArray(a)?n=Fg.isWhenExist(a):t.includes(r)&&"string"==typeof a&&a?.startsWith("@W ")&&(n=!0)}return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const r=new Set;if(e&&Object.keys(e).forEach((a=>{const s=e[a];t.includes(a)&&"string"==typeof s&&s.startsWith("@W ")&&(n=ln.trimAnnotation(s),r.add(n))})),"multirecordlist"===e?.type&&"Editable"===e?.renderMode){const t=e?.allowActions??{};Object.keys(t).forEach((e=>{"string"==typeof t[e]&&t[e]?.startsWith("@W ")&&(n=ln.trimAnnotation(t[e]),r.add(n))}))}return[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r of Object.keys(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;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return 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)?[]:{}),vg(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 h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&Fg.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("."):""}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 crypto.randomUUID()}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){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{Fg.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;Fg.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(j.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(j.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").replace(j.DATA_INFO.DATA_INFO_CONTENT,"");return Qo.formatPageReference(n)}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}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&rc.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];"string"==typeof r?n="true"===r||"false"!==r&&r:"object"==typeof r?(n=r,Fg.convertObjectWithStringToBoolean(r)):n=r,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=Fg.getIn(t,e);if(!n)return;const r=Object.hasOwn(n,"pyCount");if(r&&(n=n.pxResults),!n)return;const a=n.filter((e=>!e.error)),s=n.filter((e=>e.error));Fg.setIn(t,r?`${e}.pxResults`:e,[...a,...s])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],r=n.findIndex((e=>e.startsWith("workarea"))),a=n.findIndex((e=>e.startsWith("modal")));return-1!==r?t=n.slice(0,r+1).join("/"):-1!==a&&(t=n.slice(0,a+1).join("/")),Cg()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return Fg.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const r=[];let a="";const s=n.getPageReference(),o=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let a=ln.isProperty(n)?bg(`.${ln.getPropertyName(n)}`,s,o):n;null!=a&&""!==a||(a=j.NULL_STRING),r.push(a)}));let i=t;const c=r.join(j.HASH_DELIMITER);return c&&(a=Fg.getHashedString(c),i=t+j.UNDERSCORE_STRING+a),i}static parsePegaDateTimeToTimestamp(e){if(!e)return null;const t=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!t)return null;const[,n,r,a,s,o,i,c]=t.map(Number);return new Date(n,r-1,a,s,o,i,c).getTime()}static containsEncodedPattern=e=>/%[0-9A-Fa-f]{2}/.test(e)}const jg=Fg,Ug=j.SUMMARY_OF_LISTS,kg=j.SUMMARY_OF_WHEN_CONDITIONS;class Vg{static updateData(e){Object.keys(e).forEach((t=>{_g(Yg({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{_g(Yg({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${kg}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return tg("string"==typeof n?n:"")}static resolveView(e,t,n=""){const r=Zh(this.resolveName(e,t));let a=[];if(Array.isArray(r)&&r.length>0){if(t&&r.length>1){if(n||(n=t.getValue(j.CLASS_ID)||""),!n)return;a=r.filter((e=>e[j.CLASSID]===n))}return 0===a.length?r[0]:a[0]}return r}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=ln.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=ln.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&Number.isInteger(t)?`${e}[${t}]`:"string"==typeof t&&t.startsWith(".")?e+t:t:e}static getRuleClass(e,t,n){let r;if(t)r=t.startsWith(j.CLASS_ANNOTATION)?t.split(j.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName());else if(n?.authorContext){const t=e.getFieldMetadata(n.authorContext);if(t){r="manual"===t.dataRetrievalType?t.classID:t.pageClass}r||(r=n.ruleClass)}return 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 t&&(t._ruleClass=c),"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 bg(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=Pg(`${t}.${Ug}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getPropertyValue(e,t,n){return e=ln.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=Vg.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:r,hasSuggestions:a,pageReference:s,context:o}=e;let i=t||r||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):a&&i===r?Vg.getPropertyValue(i,s,o?`${o}/${j.SUGGESTION}`:void 0):Vg.getPropertyValue(i,s,o||void 0)}static _handlePropString(e,t,n,r,a){n.startsWith("@")?e[t]=ln.handleAnnotation(n,r,a):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const a=e[r];"string"==typeof a?this._handlePropString(e,r,a,t,n):Array.isArray(a)?a.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof a&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(jg.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(jg.mergeDeep(e,t),this._resolveProps(t,void 0,e),jg.resolveStringBooleans(t)):t}static resolveClassID(e,t,n){const r=ln.trimAnnotation(e);let a;for(a=r.startsWith(".")?`${t}${r}`:`${r}`;a;){const e=bg(j.CLASS_ID,a,n);if(e)return e;a=a.substring(0,a.lastIndexOf("."))}return null}}const Bg=Vg;const Gg=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const Wg=class{static#l=[];static#u=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=Gg.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#p=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const a=e[r],s={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#l.push(s)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===Ph.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=rc.getNextActionMgrId(),n};static#h=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};Bg.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#g())};static#g=()=>{if(!this.#u){if(0===this.#l.length)return;const e=this.#l.shift();this.#h(e),e.config&&"true"===e.config.parallel&&this.#l.length>0&&this.#g()}};static#f=()=>{this.#g()};static#y=(e,t,n)=>{this.#p(e,t,n),this.#f()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Bg.getContextPath(t,n)};static#m(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.#y(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();io({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===Ph.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||null!==t.value&&void 0===t.prop){let n,{target:a}=t;null===a&&t&&t.auxiliaryTarget&&(a=t.auxiliaryTarget),n=void 0===a?t.value:"value"in a?a.value:a.innerText;const s=this.getFullRef(e);_g({type:Q,payload:{reference:s,value:n,context:r}}),void 0!==a&&this.isEditable(a)&&!this.isNonKeyInput(a)||_g({type:ee,payload:{reference:s,pageReference:e.getPageReference(),value:n,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const s=a[e],o=t[e];_g({type:Q,payload:{reference:Bg.getContextPath(n,s),value:o,context:r}}),_g({type:ee,payload:{reference:Bg.getContextPath(n,s),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,s=this.getFullRef(e),o=e.getContextName();n.clearMessages&&io({type:F.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)||_g({type:ee,payload:{reference:s,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(j.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.#m(e,n)};static pause=()=>{this.#u=!0};static resume=()=>{this.#u=!1,this.#g()};static isQueueEmpty=()=>0===this.#l.length;static clearQueue=()=>{this.#l=[]};static getActionsQueue=()=>this.#l;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Hg="CREATE_WORK",qg=e=>({type:Hg,payload:e});const zg=(e,t,n,r,a="")=>{const s=[];Object.keys(e).forEach((o=>{"object"==typeof e[o]&&o.includes("[")?function(e,t,n,r,a,s,o){const i=r.substring(0,r.indexOf("[")),c=r.substring(r.indexOf("[")+1,r.indexOf("]"));let d=t[i];const l=`${jg.trimDotForProperty(a)}.${i}`;o.includes(l)&&Object.hasOwn(d,"pyCount")&&(d=d.pxResults),Array.isArray(d)&&(d?.splice(+c,1,e[r]),s.push(i),n.add(`${a}.${r}`))}(e,t,n,o,a,s,r):e[o]&&"object"==typeof e[o]?(t[o]||(t[o]=Array.isArray(e[o])?[]:{}),zg(e[o],t[o],n,r,`${a}.${o}`)):t[o]=e[o]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,s)},Yg=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[],propertiesToReArrange:a=[]}=t,{context:s,data:o,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,d=tp(s,!0),l=Sg(s);let u={};if(l&&o){u=JSON.parse(JSON.stringify(l));const e=JSON.parse(JSON.stringify(o));a.length>0&&jg.rearrangeProperties(a,u);const t=new Set;zg(d,u,t,a),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=jg.trimDotForProperty(e);const[a,s,o]=Bs(e);if(a&&s&&o&&!r.has(`${a}.${s}`)){const e=jg.getIn(n,`${a}.${s}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+o&&jg.setIn(t,`${a}.${s}[${n}]`,e)})),r.add(`${a}.${s}`)}}))})(t,u,e)}!function(e,t){const n=jg.getIn(e,j.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=jg.getIn(t,j.REFERENCED_USERS,{}),void jg.setIn(e,j.REFERENCED_USERS,{...r,...n});r=jg.getIn(t,j.REFERENCED_USERS,[]);const a=new Map;for(const e of[...r,...n])if(a.has(e.UserID)){const t=a.get(e.UserID);a.set(e.UserID,{...t,...e})}else a.set(e.UserID,e);n.length=0;for(const e of a.values())n.push(e)}}(o,l);const p=jg.getIn(e?.data,j.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),h=Dd.isExternalObject(p),g=h?{[j.OBJECT_INFO.OBJECT_INFO]:{[j.CONTENT]:{...u[j.OBJECT_INFO.OBJECT_INFO]?.[j.CONTENT]}}}:{[j.CASE_INFO.CASE_INFO]:{[j.CONTENT]:{...u[j.CASE_INFO.CASE_INFO]?.[j.CONTENT]}}},f=h?j.OBJECT_INFO.OBJECT_INFO_CONTENT:j.CASE_INFO.CASE_INFO_CONTENT;let y=o;return c?(n.forEach((e=>{const t=`${f}.${e}`;jg.deleteIn(g,t)})),y=vg(o,g,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=Ju[e]||{};Object.keys(n).forEach((e=>{jg.hasIn(t,e)&&(n[e].value=jg.getIn(t,e))}));let r=fd.getStateMachinesByContext(e)||{};r={...r,...fd.getUnConnectedStateMachines(e)||{}},Object.keys(r).forEach((n=>{if(jg.hasIn(t,n)){const r=jg.getIn(t,n);r&&Array.isArray(r)&&0===r.length&&fd.setStateMachineEmpty(e,n)}}))})(s,o),{type:fe,payload:{...e,data:y,...r.length>0?{propertiesToReplace:r}:null,...a.length>0?{propertiesToReArrange:a}:null}}},Kg=e=>({type:"SHOW_HARNESS",payload:e}),Jg=e=>({type:te,payload:e}),Xg=e=>({type:ne,payload:e}),Qg=e=>({type:"ADD_WORK",payload:e}),Zg=e=>({type:le,payload:e}),ef=e=>({type:Ae,payload:e}),tf=e=>({type:Ce,payload:e}),nf=e=>({type:_e,payload:e}),rf=e=>({type:Ne,payload:e}),af=e=>({type:Te,payload:e}),sf=e=>({type:Pe,payload:e}),of=e=>({type:Re,payload:e}),cf=e=>({type:De,payload:e}),df=e=>{const{containerItemID:t}=e;e.suggestionContexts=Lp(t);const n=e?.data?.caseInfo?.content,r=Object.keys(n||{}).length>0;return e.propertiesToReplace=r?Dd.getPropertiesToReplace(t):[],{type:ve,payload:e}},lf=e=>{const{context:t}=e;return{type:oe,payload:{context:t}}},uf=e=>{const{context:t}=e;return{type:ie,payload:{context:t}}},pf=e=>({type:xe,payload:e}),hf=e=>({type:$e,payload:e}),gf=e=>({type:Ze,payload:e}),ff=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=$p(n)),e.context=r,e.deleteContext=!Jp(n),e.childContainers=wp(n),e.childContainersContexts=Mp(n),e.transientItems=Xp([...e.childContainersContexts,n]),e.suggestionContexts=Lp(n),n===t&&(e.caseID=bg(j.CASE_INFO.CASE_INFO_ID,"",t)||bg(j.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=bg(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Se,payload:e}},yf=e=>{const{containerItemID:t}=e;return e.transientItems=Xp([...Mp(t),t]),{type:Oe,payload:e}},mf=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:be,payload:e}},If=e=>{const{context:t,containerItemID:n}=e;let r=t;if(r||(r=$p(n)),e.context=r,e.childContainers=wp(n),e.childContainersContexts=Mp(n),e.transientItems=Xp([...e.childContainersContexts,n]),e.suggestionContexts=Lp(n),n===t){e.caseID=bg(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=bg(j.CASE_INFO.REMOTESYSTEMID,"",t);const n=bg(j.CASE_INFO.CASE_INFO_CLASSNAME,"",t);V.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:we,payload:e}},Ef=e=>({type:pe,payload:e}),Af=e=>({type:ge,payload:e}),Cf=e=>({type:Ie,payload:e}),_f=(e,...t)=>(Wg.resume(),e(...t)),Sf=(e,t,n,r,a)=>({type:Ee,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),Nf=e=>({type:rt,payload:e}),Tf=e=>({type:at,payload:e}),bf=e=>({type:st,payload:e}),Of=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),Pf=e=>({type:ce,payload:e}),Df=e=>({type:Q,payload:e}),Rf="add",$f="replace",vf=["portal","noPortal","preview","debug","devtool","activeTab"];let xf="",wf="Home",Mf="",Lf=!0;const Ff=e=>(Lf=e,Lf),jf=()=>Lf,Uf=(e,t,n)=>Oh.getSemanticURL(e,t,n),kf=(e,t)=>Oh.getRestEndPoint(e,t),Vf=(e,t)=>{let n=E();const r=kf(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):{}},Bf=(e,t,n)=>{const{root:r,resources:a}=e,{views:s}=a,{config:o}=r,i=Rf;let c="";if(n)c=n;else{const e=s[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const d=c.match(yh);if(d){const e=jg.getIn(t,o.context);c=c.replace(d[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},Gf=(e,t,n)=>{let r,a;r=Ih(t)?`${e}/${t}`:e;const s=Ih(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(Th()?(r=((e,t,n,r,a)=>{const s=Oh.getStaticRoutePage(),o=wf?.toLowerCase(),i=s?.toLowerCase(),c=r?.toLowerCase();return i!==o&&c!==o||a.has("noPortal")?e:`${t}/${n}`})(r,e,t,i,c),Oh.setStaticRoutePage("")):i.toLowerCase()!==wf.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!Oh.isDefaultPortal()){const e=Oh.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)&&vf.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},Wf=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r,queryParam:a},s=!1)=>{let o,i,c;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(s)o=t,i=n,c=r;else{const{uiResources:n,data:r}=e;({options:c}=e),o=t&&t.pxURLPath&&mh(t.pxURLPath)?Bf(n,r,t.pxURLPath):t||Bf(n,r),i=Oh.getEndPointInfo(o.pxURLPath),o.pxURLPath=i.urlPath}let d=Gf(xf,Oh.getApplicationPath(),o);const{title:l}=((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:Oh.getApplicationName()),n===`${xf}/${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]}`}})(Mf,Oh.getApplicationPath(),d),u=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(i,{...c,title:l});o?.historyAction===Rf?((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")}})(u,l,d):o?.historyAction===$f&&(a&&(d+=`?${a}`),((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(u,l,d))},Hf=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:Rf,pxURLPath:""},t.pxURLPath=e.semanticURL),Wf(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},qf=e=>{Hf(e)},zf=e=>{const t={pxURLPath:e};return Gf(xf,Oh.getApplicationPath(),t)},Yf=e=>{const{uiResources:t}=e;jf()&&(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))&&Hf(e)},Kf=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},Jf=(e,t,n)=>{const{caseClassName:r,workID:a}=e.payload,{containerName:s,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:d}=V.getRemoteCase(r),l={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:At,viewName:U,gadgetId:Dd.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${a}`,containerName:s,name:d};_g(u.showPage(l))},Xf=e=>{const t=(e=>"ui-navigation"===e.state?.type?(Io.publish(F.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);t&&(V.isTraditionalRemoteCase(t.payload?.caseClassName)?Jf({...t},t.options):_g(u.showHistory(Kf(t))))},Qf=()=>Oh.getApplicationPath()!==Ah(),Zf=e=>{const{acName:t,context:n,defaultViewLabel:r,ruleName:a,className:s}=e,o=((e,t)=>{const n=Oh.getRoutingInfo();if(Th()&&Object.values(n?.routes).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const r=e.split(" ").join(""),a=e.split(" ").join("-").toLowerCase(),s=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return n?.routes[r]?r:n?.routes[a]?a:n?.routes[s]?s:e})(a||r,s);(e=>{wf=e})(o),Oh.setDefaultRoute(o),Oh.setDefaultClassName(s);const i=H(t,n),c=Ot(t,n),d="true"===Ph.getIsExtraCallRequiredForDefaultHome(),l={historyAction:$f,pxURLPath:""};let p,h=null;const g={acName:c,context:i,actionConfig:{context:i}};if(d||!d&&Qf()){const t=Sh(Ch());Ph.shouldUseURLParams()&&(h=t.includes("?")?t.split("?")[1]:null),p=Nh(t,g),l.pxURLPath=p.urlPath,void 0!==p.payload?.pageClass&&(p.payload.pageClass=Cg()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:g,routeKey:p.routeKey};V.isTraditionalRemoteCase(p?.payload?.caseClassName)?Jf(r,e,g.context):_g(u[n](Kf(r)))}else p=Oh.getEndPointInfo(wf),l.pxURLPath="";Wf(null,{urlPathObjParam:l,infoParam:p,optionsParam:g,queryParam:h},!0)},ey=(e,t=!1)=>{var n;xf=e.domain,!1===t&&jf()&&(n=Xf,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),Oh.init(e,wf)},ty=e=>{(e=>{window.document.title=e})(e)};function ny(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 ry=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),ay=()=>Math.random().toString(36).substring(7).split("").join("."),sy={INIT:`@@redux/INIT${ay()}`,REPLACE:`@@redux/REPLACE${ay()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ay()}`};function oy(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 iy(e,t,n){if("function"!=typeof e)throw new Error(ny(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(ny(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(ny(1));return n(iy)(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(ny(3));return a}function u(e){if("function"!=typeof e)throw new Error(ny(4));if(c)throw new Error(ny(5));let t=!0;d();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(ny(6));t=!1,d(),o.delete(n),s=null}}}function p(e){if(!oy(e))throw new Error(ny(7));if(void 0===e.type)throw new Error(ny(8));if("string"!=typeof e.type)throw new Error(ny(17));if(c)throw new Error(ny(9));try{c=!0,a=r(a,e)}finally{c=!1}return(s=o).forEach((e=>{e()})),e}p({type:sy.INIT});return{dispatch:p,subscribe:u,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(ny(10));r=e,p({type:sy.REPLACE})},[ry]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(ny(11));function n(){const e=t;e.next&&e.next(l())}n();return{unsubscribe:e(n)}},[ry](){return this}}}}}function cy(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];0,"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:sy.INIT}))throw new Error(ny(12));if(void 0===n(void 0,{type:sy.PROBE_UNKNOWN_ACTION()}))throw new Error(ny(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){t&&t.type;throw new Error(ny(14))}o[i]=l,s=s||l!==d}return s=s||r.length!==Object.keys(e).length,s?o:e}}function dy(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function ly(e){return({dispatch:t,getState:n})=>r=>a=>"function"==typeof a?a(t,n,e):r(a)}var uy=ly(),py=ly,hy=Symbol.for("immer-nothing"),gy=Symbol.for("immer-draftable"),fy=Symbol.for("immer-state");function yy(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var my=Object.getPrototypeOf;function Iy(e){return!!e&&!!e[fy]}function Ey(e){return!!e&&(Cy(e)||Array.isArray(e)||!!e[gy]||!!e.constructor?.[gy]||by(e)||Oy(e))}var Ay=Object.prototype.constructor.toString();function Cy(e){if(!e||"object"!=typeof e)return!1;const t=my(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)===Ay}function _y(e,t){0===Sy(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function Sy(e){const t=e[fy];return t?t.type_:Array.isArray(e)?1:by(e)?2:Oy(e)?3:0}function Ny(e,t){return 2===Sy(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ty(e,t,n){const r=Sy(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function by(e){return e instanceof Map}function Oy(e){return e instanceof Set}function Py(e){return e.copy_||e.base_}function Dy(e,t){if(by(e))return new Map(e);if(Oy(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Cy(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[fy];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const a=n[r],s=t[a];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(my(e),t)}{const t=my(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function Ry(e,t=!1){return vy(e)||Iy(e)||!Ey(e)||(Sy(e)>1&&(e.set=e.add=e.clear=e.delete=$y),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>Ry(t,!0)))),e}function $y(){yy(2)}function vy(e){return Object.isFrozen(e)}var xy,wy={};function My(e){const t=wy[e];return t||yy(0),t}function Ly(){return xy}function Fy(e,t){t&&(My("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jy(e){Uy(e),e.drafts_.forEach(Vy),e.drafts_=null}function Uy(e){e===xy&&(xy=e.parent_)}function ky(e){return xy={drafts_:[],parent_:xy,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Vy(e){const t=e[fy];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function By(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[fy].modified_&&(jy(t),yy(4)),Ey(e)&&(e=Gy(t,e),t.parent_||Hy(t,e)),t.patches_&&My("Patches").generateReplacementPatches_(n[fy].base_,e,t.patches_,t.inversePatches_)):e=Gy(t,n,[]),jy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==hy?e:void 0}function Gy(e,t,n){if(vy(t))return t;const r=t[fy];if(!r)return _y(t,((a,s)=>Wy(e,r,t,a,s,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Hy(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),_y(a,((a,o)=>Wy(e,r,t,a,o,n,s))),Hy(e,t,!1),n&&e.patches_&&My("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Wy(e,t,n,r,a,s,o){if(Iy(a)){const o=Gy(e,a,s&&t&&3!==t.type_&&!Ny(t.assigned_,r)?s.concat(r):void 0);if(Ty(n,r,o),!Iy(o))return;e.canAutoFreeze_=!1}else o&&n.add(a);if(Ey(a)&&!vy(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Gy(e,a),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||Hy(e,a)}}function Hy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ry(t,n)}var qy={get(e,t){if(t===fy)return e;const n=Py(e);if(!Ny(n,t))return function(e,t,n){const r=Ky(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_||!Ey(r)?r:r===Yy(e.base_,t)?(Xy(e),e.copy_[t]=Qy(r,e)):r},has:(e,t)=>t in Py(e),ownKeys:e=>Reflect.ownKeys(Py(e)),set(e,t,n){const r=Ky(Py(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Yy(Py(e),t),o=r?.[fy];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||Ny(e.base_,t)))return!0;Xy(e),Jy(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!==Yy(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Xy(e),Jy(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Py(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){yy(11)},getPrototypeOf:e=>my(e.base_),setPrototypeOf(){yy(12)}},zy={};function Yy(e,t){const n=e[fy];return(n?Py(n):e)[t]}function Ky(e,t){if(!(t in e))return;let n=my(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=my(n)}}function Jy(e){e.modified_||(e.modified_=!0,e.parent_&&Jy(e.parent_))}function Xy(e){e.copy_||(e.copy_=Dy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}_y(qy,((e,t)=>{zy[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),zy.deleteProperty=function(e,t){return zy.set.call(this,e,t,void 0)},zy.set=function(e,t,n){return qy.set.call(this,e[0],t,n,e[0])};function Qy(e,t){const n=by(e)?My("MapSet").proxyMap_(e,t):Oy(e)?My("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ly(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=qy;n&&(a=[r],s=zy);const{revoke:o,proxy:i}=Proxy.revocable(a,s);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:Ly()).drafts_.push(n),n}function Zy(e){if(!Ey(e)||vy(e))return e;const t=e[fy];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Dy(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Dy(e,!0);return _y(n,((e,t)=>{Ty(n,e,Zy(t))})),t&&(t.finalized_=!1),n}var em=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&&yy(6),void 0!==n&&"function"!=typeof n&&yy(7),Ey(e)){const a=ky(this),s=Qy(e,void 0);let o=!0;try{r=t(s),o=!1}finally{o?jy(a):Uy(a)}return Fy(a,n),By(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===hy&&(r=void 0),this.autoFreeze_&&Ry(r,!0),n){const t=[],a=[];My("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}yy(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){Ey(e)||yy(8),Iy(e)&&(e=function(e){Iy(e)||yy(10);return Zy(e)}(e));const t=ky(this),n=Qy(e,void 0);return n[fy].isManual_=!0,Uy(t),n}finishDraft(e,t){const n=e&&e[fy];n&&n.isManual_||yy(9);const{scope_:r}=n;return Fy(r,t),By(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=My("Patches").applyPatches_;return Iy(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},tm=em.produce;em.produceWithPatches.bind(em),em.setAutoFreeze.bind(em),em.setUseStrictShallowCopy.bind(em),em.applyPatches.bind(em),em.createDraft.bind(em),em.finishDraft.bind(em);var nm="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?dy:dy.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var rm=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function am(e){return Ey(e)?tm(e,(()=>{})):e}var sm="RTK_autoBatch",om=e=>t=>{setTimeout(t,e)},im=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new rm(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,s=!1,o=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:om(10):"callback"===e.type?e.queueNotification:om(e.timeout),d=()=>{o=!1,s&&(s=!1,i.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>a&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return a=!e?.meta?.[sm],s=!a,s&&(o||(o=!0,c(d))),r.dispatch(e)}finally{a=!0}}})})("object"==typeof n?n:void 0)),r};function cm(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:a=!0}=e??{};let s=new rm;return t&&("boolean"==typeof t?s.push(uy):s.push(py(t.extraArgument))),s},{reducer:n,middleware:r,devTools:a=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o,enhancers:i}=e||{};let c,d;if("function"==typeof n)c=n;else{if(!oy(n))throw new Error(pm(1));c=cy(n)}d="function"==typeof r?r(t):t();let l=dy;a&&(l=nm({trace:!1,..."object"==typeof a&&a}));const u=function(...e){return t=>(n,r)=>{const a=t(n,r);let s=()=>{throw new Error(ny(15))};const o={getState:a.getState,dispatch:(e,...t)=>s(e,...t)},i=e.map((e=>e(o)));return s=dy(...i)(a.dispatch),{...a,dispatch:s}}}(...d),p=im(u);return iy(c,o,l(..."function"==typeof i?i(p):p()))}function dm(e){const t={},n=[];let r;const a={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(pm(28));if(r in t)throw new Error(pm(29));return t[r]=n,a},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),a),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(r=e,a)};return e(a),[t,n,r]}function lm(e,t){let n,[r,a,s]=dm(t);if("function"==typeof e)n=()=>am(e());else{const t=am(e);n=()=>t}function o(e=n(),t){let o=[r[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===o.filter((e=>!!e)).length&&(o=[s]),o.reduce(((e,n)=>{if(n){if(Iy(e)){const r=n(e,t);return void 0===r?e:r}if(Ey(e))return tm(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return o.getInitialState=n,o}var{assign:um}=Object;Symbol.for("rtk-state-proxy-original");function pm(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hm=function(e){function t(t,n){return e.call(this)||this}return xa(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(za),gm={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=gm.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,ja([e,t],Fa(n))):setInterval.apply(void 0,ja([e,t],Fa(n)))},clearInterval:function(e){var t=gm.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},fm=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 xa(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),gm.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&&gm.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,qa(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(hm),ym=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return xa(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}(fm),mm={now:function(){return(mm.delegate||Date).now()},delegate:void 0},Im=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=mm.now,e}(),Em=function(e){function t(t,n){void 0===n&&(n=Im.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return xa(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}(Im),Am=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t}(Em))(ym),Cm=Ra((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),_m=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 xa(t,e),t.prototype.lift=function(e){var t=new Sm(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Cm},t.prototype.next=function(e){var t=this;as((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=La(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;as((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;as((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?Ya:(this.currentObservers=null,s.push(e),new za((function(){t.currentObservers=null,qa(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 ys;return e.source=this,e},t.create=function(e,t){return new Sm(e,t)},t}(ys),Sm=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return xa(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:Ya},t}(_m),Nm=function(e,t){return Nm=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])},Nm(e,t)};Object.create;Object.create;var Tm=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 _m,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}Nm(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(ys);const bm=e=>{let t=new Set,n=t;const r=()=>{t===n&&(t=new Set(t))},a=e=>{let n=!0;return r(),t.add(e),()=>{n&&(r(),t.delete(e),n=!1)}},s=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let r=!1,o=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{o?r=!0:s()})),{...n,dispatch:e=>{const t=o;t||(r=!1,o=!0);const n=i(e),a=r&&!t;return t||(r=!1,o=!1),a&&s(),n},subscribe:a}}},Om=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{Dl.updateDataPageStore(t),Object.keys(t).forEach((n=>{jg.getIn(e,[j.SHARED,n])?Object.keys(t[n]).forEach((r=>{jg.setIn(e,[j.SHARED,n,r],t[n][r])})):jg.setIn(e,[j.SHARED,n],t[n])}))})(e,n),r&&jg.deleteIn(e,[r,"shared"])},Pm=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:j.PERFORM_MODE),containerName:s}=t;s!==gp.WORKAREA&&a&&jg.setIn(e,[r,"context_data","caseViewMode"],a)},Dm=(e,t)=>{const{context:n}=t;jg.setIn(e,[n,"context_data","actionType"],t.actionType),jg.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},Rm=(e,t=[])=>{t.forEach((t=>jg.deleteIn(e,t)))},$m=(e,t=[])=>{t.forEach((t=>jg.deleteIn(e,t)))},vm=(e,t=[])=>{t.forEach((t=>{jg.deleteIn(e,t)}))},xm=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;jg.deleteIn(e,[t,"nextAssignmentInfo"]),jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableActions"]),jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableProcesses"]),jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"activeActionID"]),jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"assignments"]),jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"childCases"]),a&&(jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"confirmationLinks"]),jg.deleteIn(e,[t,"caseMessages"])),r&&(jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"actionButtons"]),jg.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"navigation"]))},wm=lm({},(e=>{e.addCase(_e,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&xm(e,t.payload.context);const{target:n}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,Pm(e,t.payload),Dm(e,t.payload),Om(e,t.payload),((e,t)=>{const{context:n}=t;jg.deleteIn(e,[n,"context_data","blocking_action_counter"]),jg.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase(ve,((e,t)=>{t.payload.doDeleteCaseSummary&&xm(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=vg(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=vg(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&Dm(e,t.payload),Pm(e,t.payload),Om(e,t.payload),$m(e,t.payload.suggestionContexts)})).addCase(Se,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&jg.deleteIn(e,[r]),jg.deleteIn(e,[n])})(e,t.payload),vm(e,n),Rm(e,t.payload.transientItems),$m(e,t.payload.suggestionContexts)})).addCase(Ce,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{jg.deleteIn(e,[t])})):jg.deleteIn(e,[n])})).addCase(xe,((e,t)=>{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:s}=t.payload;xm(e,t.payload.context),Pm(e,t.payload),e[n]=vg(e[n],e[r]),e[n]=vg(e[n],a),jg.deleteIn(e,[r]),vm(e,s),Om(e,t.payload)})).addCase(we,((e,t)=>{const{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}=t.payload;let{data:s}=t.payload;const o=jg.getIn(e[n],"pulse");let i=jg.getIn(e[n],"OperatorID"),c=jg.getIn(e[n],"pxRequestor");c&&s.pxRequestor&&(c=jg.mergeDeep(c,s.pxRequestor)),i&&s.OperatorID&&(i=jg.mergeDeep(i,s.OperatorID)),!r&&o&&(s=xg(s,"pulse",o),s=xg(s,"OperatorID",i),s=xg(s,"pxRequestor",c)),jg.setIn(e,n,s),Pm(e,t.payload),Om(e,t.payload),vm(e,a),Rm(e,t.payload.transientItems),$m(e,t.payload.suggestionContexts)})).addCase(ot,((e,t)=>{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;xm(e,n,{doDeleteConfirmationDetails:r})})).addCase(Ne,((e,t)=>{const{transientItemID:n,data:r}=t.payload;jg.setIn(e,n,r)})).addCase(be,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>jg.deleteIn(e,t)))})).addCase(Oe,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>jg.deleteIn(e,t)))})).addCase(Te,((e,t)=>{const{transientItemID:n,data:r}=t.payload;vg(jg.getIn(e,n),r)})).addCase(Pe,((e,t)=>{const{transientItemID:n,data:r}=t.payload;vg(jg.getIn(e,n),r)})).addCase(De,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Object.keys(r??{}).forEach((t=>{jg.deleteIn(e,[n,t])}))})).addCase(Re,((e,t)=>{const{transientItemID:n,data:r}=t.payload;jg.deleteIn(e,n),jg.setIn(e,n,r)})).addCase(ce,((e,t)=>{const{key:n,value:r}=t.payload;jg.setIn(e,`${j.SHARED}.${n}`,r)})).addCase(Fe,((e,t)=>{const{context:n,data:r}=t.payload;return jg.setIn(e,n,r)}))})),Mm=wm,Lm=lm({},(e=>{e.addCase(fe,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:r=[],uiRootReference:a=""}=t.payload,s=a&&"string"==typeof t.payload.context?`${t.payload.context}.${a}`:t.payload.context,o="string"==typeof s?Eg(s):[],i={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...r]};a&&o.length?jg.setIn(e,o,vg(jg.getIn(e,o),jg.getIn(t.payload.data,Eg(a)),i)):e[t.payload.context]=vg(e[t.payload.context],t.payload.data,i),Pm(e,t.payload,!0),Om(e,t.payload)})).addCase(Q,((e,t)=>{const{context:n,reference:r,value:a,isArrayDeepMerge:s}=t.payload;xg(e[n],r,a,{isArrayDeepMerge:s})})).addCase(Z,((e,t)=>{const{context:n,reference:r,value:a}=t.payload;wg(e[n],r,a)})).addCase(ye,((e,t)=>{Rg(e[t.payload.context],t.payload.reference)})).addCase(oe,((e,t)=>{jg.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(ie,((e,t)=>{jg.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(rt,((e,t)=>{const{data:n}=t.payload;Om(e,{data:{shared:n}})})).addCase(at,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;jg.deleteIn(e.shared,[n,r]);const a=jg.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&jg.deleteIn(e.shared,[n])}))})).addCase(it,((e,t)=>{const n=jg.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?jg.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):jg.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)}))})),Fm=Lm,jm=/\[(\d+)\]$/gi,Um=/(\d+)/gi,km=/\[.\]$/gi,Vm=(e,t,n,r=[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT])=>{const a=jg.getIn(t,r);if(a){const t=lo(a,[],[]);for(const a of t)jg.setIn(e[n],[...r,...a],{})}},Bm=(e,t,n,r)=>{const{property:a,pageReference:s,category:o,type:i}=r.payload,c=jg.getIn(e[t],n);if(c&&o===j.CASEMESSAGES)jg.setIn(e[t],no(a,s,o),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&jg.setIn(e[t],no(a,s,o),r)}},Gm=(e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:s,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return Vm(e,i,c),e;const d=no(n,r,a,s);if(Number.isInteger(o)){jg.deleteIn(e[c],d);const t=d.slice(0,d.length-1);let n=jg.getIn(e[c],t)||{};const r=(l=Object.keys(n),[...l].sort(((e,t)=>{const n=e.match(jm),r=t.match(jm);if(!n&&!r)return e.localeCompare(t);if(!n&&r)return-1;if(n?.length&&r?.length){const e=n[0].match(Um),t=r[0].match(Um);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})));n=r.map((e=>n[e])),n.forEach(((n,a)=>{const s=r[a].match(jm);if(s?.length){const i=parseInt(s[0].match(Um)[0],10);i>o&&(jg.deleteIn(e[c],t.concat(r[a])),jg.setIn(e[c],t.concat(r[a].replace(km,`[${i-1}]`)),n))}}))}else jg.setIn(e[c],d,{});var l;return e};function Wm(e,t){const n=jg.getIn(e,t);return void 0!==n?.dataInfo?.content}const Hm=(e,t)=>{const n=jg.getIn(e,t);return!0===Dd.isObjectCaseType(n?.objectInfo?.objectTypeID)};function qm(e,t){let n=to.FIELD_MESSAGES_PATH;return Wm(e,t)?n=to.DATA_OBJECT_FIELD_MESSAGES_PATH:Hm(e,t)&&(n=to.OBJECT_FIELD_MESSAGES_PATH),n}const zm=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=jg.getIn(n,j.ERROR_FIELD_IN_PAGE).slice(1),a=jg.getIn(n,j.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(a){let s="caseInfo.content";Wm(e,t)?s="dataInfo.content":Hm(e,t)&&(s="objectInfo.content");let o=r?`${s}.${r}`:s;o=o.replace(/\(/g,"[").replace(/\)/g,"]");const i=no(a,o,j.PROPERTY),c=jg.getIn(e[t],`${o}.classID`),d=qh(a,c),l=Ph.getLocale()??"en-US",u=new yu(l,d?.localeReference),p={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...d?.label&&{fieldLabel:u.getLocalizedText(d.label)}},h=jg.getIn(e[t],i,[]);if(jg.isContains(h,p))return;jg.setIn(e[t],i,[...h,p])}})(e,t,n)}))};function Ym(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:s,pageErrors:o}=Xc(n.errorDetails,r),i=qm(e,a);if(jg.setIn(e,[a,...i],{}),jg.setIn(e,[a,...to.PAGE_MESSAGES_PATH],[]),s.forEach((t=>{const n=jg.getIn(t,j.ERROR_FIELD_IN_PAGE);if(n){const t=n.slice(1);if(t){const n=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)}(t);if(!n)return!1;const r=t.substring(t.lastIndexOf(".")+1),s=no(r,n,j.PROPERTY);jg.setIn(e,[a,...s],[])}}})),s.length>0&&zm(e,a,s),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[a]||(a=j.APP.APP),jg.setIn(e,[a,...to.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(gp.WORKAREA)&&(a=W(a)),jg.deleteIn(e,[a,...to.PAGE_MESSAGES_PATH]);return e}const Km=lm({},(e=>{e.addCase(Ee,((e,t)=>t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?Ym(e,t):e)).addCase(ve,((e,t)=>{const{context:n}=t.payload,r=[n,...qm(e,n)],a=[n,...to.PAGE_MESSAGES_PATH];if(jg.setIn(e,r,{}),jg.setIn(e,a,[]),n&&n.includes(gp.WORKAREA)){const t=[J(n),...to.PAGE_MESSAGES_PATH];jg.setIn(e,t,[])}})).addCase(et,((e,t)=>{const{isListEntry:n,clearAll:r,context:a}=t.payload;return r?(jg.deleteIn(e,[a,j.CONTEXT_DATA]),e):n?Gm(e,t):((e,t)=>{const{property:n,pageReference:r,category:a,isListEntry:s,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return Vm(e,o,i),e;const d=no(n,r,a,s);return a===j.PAGE&&i?.includes(gp.WORKAREA)&&(c=W(i)),Bm(e,c,d,t),Bm(e,i,d,t),e})(e,t)})).addCase(Ze,((e,t)=>{const{messages:n,property:r,pageReference:a,context:s,category:o}=t.payload,i=no(r,a,o);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&jg.setIn(e[s],no(r,a,o),n)}))})),Jm=Km,Xm=(e,t,n,r,a)=>{jg.setIn(e[t],[...n,r],a)},Qm=lm({},(e=>{e.addCase(st,((e,t)=>{const{instruction:n,actions:r,context:a,referenceList:s,listIndex:o,groupIndex:i,listMoveToIndex:c,content:d={}}=t.payload,l=Eg(s);switch(n){case j.LIST_ACTIONS.ADD:Xm(e,a,l,i,d);break;case j.LIST_ACTIONS.INSERT:Xm(e,a,l,o,d);break;case j.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const s=vg(jg.getIn(e[t],[...n,r],{}),a);jg.setIn(e[t],[...n,r],s)})(e,a,l,o??i,d);break;case j.LIST_ACTIONS.DELETE:((e,t,n,r,a)=>{const s=jg.getIn(e[t],n,[]);"string"==typeof r?delete s[r]:s.splice(r,1),jg.setIn(e[t],n,s),eo.deleteListNode(t,[a],s.length)})(e,a,l,o??i,s);break;case j.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const s=jg.getIn(e[t],[...n,r],{}),o=jg.getIn(e[t],n,[]);o.splice(r,1),o.splice(a,0,s),jg.setIn(e[t],n,o),so(e,t,n?.join("."),r,a)})(e,a,l,o,c);break;case j.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=jg.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:s,listIndex:o}=e;if(r===j.LIST_ACTIONS.SELECT){a[o]=s;const e=n?.join(".");hi(t,e)}else delete a[o]})),jg.setIn(e[t],n,a.filter(Boolean))})(e,a,l,r);break;case j.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{jg.setIn(e[t],n,[])})(e,a,l);break;case j.LIST_ACTIONS.REPLACE:((e,t,n,r)=>{jg.setIn(e[t],n,r)})(e,a,l,d);break;case j.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{jg.setIn(e[t],n,{})})(e,a,l)}}))})),Zm=[Fm,Mm,Jm,Qm],eI=(e,t)=>(e||(e=iI().data),t.type===tt?iI().data:(Zm.forEach((n=>{e=n(e,t)})),e)),tI={},nI=(e,t=[])=>{t.forEach((t=>{jg.deleteIn(e,[t])}))},rI=(e,t)=>{const{type:n,payload:r}=t,a=n===ve,{target:s,context:o,semanticURL:i="",root:c,containerItemID:d,childContainers:l,flowName:u,resourceType:p="",key:h="",clearView:g=!1}=r;return c?jg.setIn(e,[s,"items",d,"view"],c):g&&jg.deleteIn(e,[s,"items",d,"view"]),o&&jg.setIn(e,[s,"items",d,"context"],o),u&&jg.setIn(e,[s,"items",d,"flowName"],u),(!a||a&&h)&&jg.setIn(e,[s,"items",d,"key"],h.trim()),((e,t,n,r)=>{""===e&&jg.deleteIn(t,[n,"items",r,"key"])})(h,e,s,d),(!a||a&&i)&&jg.setIn(e,[s,"items",d,"semanticURL"],i),(!a||a&&p)&&jg.setIn(e,[s,"items",d,"resourceType"],p),nI(e,l),e},aI=lm(tI,(e=>{e.addCase(tt,(()=>tI)).addCase(Ae,((e,t)=>{const{context:n,name:r,type:a,actionMgrID:s}=t.payload,o=`${n}/${r}`;if(rc.resolveActionByID(s,null,!1),e[o])return e;jg.setIn(e,[o],{type:a,accessedOrder:[],items:{}})})).addCase(Le,((e,t)=>{const{containerName:n,childContainers:r=[]}=t.payload;jg.deleteIn(e,[n]),r.forEach((t=>{jg.deleteIn(e,[t])}))})).addCase(Ce,((e,t)=>{const{context:n,name:r,actionMgrID:a,childContainers:s}=t.payload,o=`${n}/${r}`;rc.resolveActionByID(a,null,!1),jg.setIn(e,[o,"accessedOrder"],[]),jg.setIn(e,[o,"items"],{}),Array.isArray(s)&&s.forEach((t=>{jg.deleteIn(e,[t])}))})).addCase(_e,((e,t)=>{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,actionID:E,isMultiRecordData:A,acTertiary:C,parentContext:_,heading:S,isTraditionalRemoteCase:N,readOnly:T,referenceList:b,subscriptName:O,subscriptFieldName:P,pageGroupName:D,isPageGroup:R,index:$}=t.payload,v=e[n],w=v&&v.type,M=v&&v.accessedOrder||[],L=v&&v.items||{};if(e[n]&&"single"===w&&M.length>0)return rI(e,t);const F={accessedOrder:[...M,c],items:{...L,[c]:{view:i,semanticURL:o,key:l,flowName:u,readOnly:T,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:g,...s&&{isBulkAction:s},showProgress:f,progressMessage:y,modalOptions:m,isTraditionalRemoteCase:N,resourceStatus:I,referenceList:b,subscriptName:O,subscriptFieldName:P,pageGroupName:D,isPageGroup:R,index:$,...E&&{actionID:E},...C&&{acTertiary:C},...A&&{isMultiRecordData:A},..._&&{parentContext:_},heading:S}}};rc.resolveActionByID(d,null,!1),e[n]=x()(e[n],F)})).addCase(ve,((e,t)=>{const{actionMgrID:n,data:r}=t.payload;try{rI(e,t),rc.resolveActionByID(n,r,!1)}catch{rc.rejectActionByID(n,!1)}})).addCase(we,((e,t)=>((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:s}=t.payload;let o=e;try{const i=e&&e[a]?.type;let c=e&&e[a]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,s]:c.includes(s)?c:[...c,s],jg.setIn(e,[a,"items",s,"transientItems"],[]),jg.setIn(e,[a,"accessedOrder"],c),o=rI(e,t),rc.resolveActionByID(n,r,!1)}catch{rc.rejectActionByID(n,!1)}return o})(e,t))).addCase($e,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=jg.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),jg.setIn(e,[n,"accessedOrder"],t),rc.resolveActionByID(a,null,!1)}catch{rc.rejectActionByID(a,!1)}})).addCase(xe,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a,childContainers:s}=t.payload;try{const t=jg.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));jg.setIn(e,[n,"accessedOrder"],t),jg.deleteIn(e,[n,"items",r]),nI(e,s),rc.resolveActionByID(a,null,!1)}catch{rc.rejectActionByID(a,!1)}})).addCase(Se,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:a,childContainers:s}=t.payload;try{const t=jg.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));jg.setIn(e,[n,"accessedOrder"],t),jg.deleteIn(e,[n,"items",r]),nI(e,s),rc.resolveActionByID(a,null,!1)}catch{rc.rejectActionByID(a,!1)}})).addCase(Ne,((e,t)=>{const{transientItemID:n,target:r,contextName:a}=t.payload,s=jg.getIn(e,[r,"items",a,"transientItems"])??[];jg.setIn(e,[r,"items",a,"transientItems"],[...s,n])})).addCase(Oe,((e,t)=>{const{target:n,containerItemID:r}=t.payload;jg.deleteIn(e,[n,"items",r,"transientItems"])})).addCase(be,((e,t)=>{const{target:n,transientItemID:r,containerItemID:a}=t.payload,s=(jg.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));jg.setIn(e,[n,"items",a,"transientItems"],s)}))})),sI=aI;let oI={};const iI=()=>oI,cI=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[j.CONTEXT_DATA]||e[j.CONTEXT_DATA];oI={data:{[j.APP.APP]:{...t,[j.CONTEXT_DATA]:r}},containers:{}}})(e),{data:eI,containers:sI});function dI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=sl(e),r=function(e,t){return"number"==typeof al(e)?e.pop():t}(e,1/0),a=e;return a.length?1===a.length?Ts(a[0]):function(e){return void 0===e&&(e=1/0),nl(gs,e)}(r)(Ms(a,n)):il}const lI=(e,t=!1)=>e===j.ACTION?t?Hl.REFRESH_CASE_DATA:Hl.REFRESH_ASSIGNMENT_DATA:Hl.REFRESH_CASE_VIEW,uI=e=>{const{context:t}=e;let n={...qc(t).content,contextData:!1};const r=pd(t);jg.isEmpty(r)||(n=ud(r,n));const a=lI(e.editType,e.isLocalAction),{restApi:s,reqType:o}=Vf(a,{ID:e.isLocalAction||e.editType!==j.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=s;return e.editType===j.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,Ms(Bo(i,{method:o,body:n,headers:e.headers},t)).pipe(tl((t=>({actionInPayload:e,response:t.data,headers:Hc(t.headers)}))),dl(": Error occurred during ajax call : ",t))},pI={},{VIEW:hI,FIELD:gI}=j.CONTEXT_TREE_NODE_TYPES,fI=(e,t,n)=>{const r=t.value.data[n]?.objectInfo?.headers,a=t.value.data[n]?.caseInfo?.headers;return e&&r?r:a},yI=e=>(e=>wo[e])(e)>0&&pI[e],mI=(e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:a,fieldsWithWhen:s,isViewsWithWhen:o,interestPage:i,options:c,isMultiRecordData:d,editType:l,isLocalAction:u,interestPageActionID:p}=e,{optionalPayload:h}=c;h&&(t.content={...h});let g={},f={...t},y=Hl.REFRESH;if(r||d&&l===j.ACTION){const t=lI(l,u);d&&l===j.ACTION&&(f.interestPageActionID=p),g=Vf(t,e),f={...f,interestPage:i}}else o?g=((e,t)=>{const{isObjectType:n,isExternalObject:r,actionID:a,context:s}=e;if(t||n&&Bu(s))return Vf(r&&"Create"===a?Hl.REFRESH_EXTERNAL_OBJECT:Hl.REFRESH_CASE_DATA,e);return Vf(Hl.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(a.length>0||s.length>0)&&({restAPI:g,requestBody:f,requestType:y}=((e,t,n,r,a)=>(a={...a,calculations:{fields:t,whens:n}},{restAPI:Vf(r?Hl.RECALCULATE_CASE_DATA:Hl.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:a,requestType:Hl.RECALCULATE}))(e,a,s,n,f));return{restAPI:g,requestBody:f,requestType:y}},II=[(e,t)=>e.pipe(Zd(Hl.REFRESH_DATA,mt),tl((e=>e.payload)),nl((e=>{const{context:n,contextData:r,options:a,isObjectType:s}=e,{propertyName:o="",classID:i="",isObjectWideAction:c}=a,d=qc(n,{skipUUID:s,isObjectWideAction:c});let l=[],u=[],p=!1;Ph.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:l=[],whens:u=[]}=zu(n)),p=u.some((e=>e.type===hI))):p=!0;const h=u.filter((e=>e.type===gI)),g=jg.getPropertyName(o),f=g?g.split("."):[],y=f.pop(),m=f.join("."),I=[];m&&((e,t,n,r,a)=>{const s=qh(e,t);if(!s||"copy"!==s.dataRetrievalType)return;const o=jg.getIn(n,`content.content.${e}`);if(!o||"object"!=typeof o)return;const i=r?Object.keys(o).filter((e=>e!==r)):Object.keys(o);i.length>0&&(i.forEach((e=>delete o[e])),a.push(e))})(m,i,d,y,I),e.serverPrecedenceFields=I;let E={...d.content,contextData:r};const A=pd(n);jg.isEmpty(A)||(E=ud(A,E));const C=mI({...e,fieldsWithDeclarativeTargets:l,fieldsWithWhen:h,isViewsWithWhen:p},E);zl.registerBlockingAction(n).catch((()=>{}));const{restAPI:_,requestBody:S,requestType:N}=C;(e={...e,requestType:N}).requestType=N;const{reqType:T,restApi:b}=_,O={...fI(s,t,n)};O&&!O.etag&&e.isMultiRecordData&&e.editType===j.ACTION&&(O.etag=jg.getETag(e.context));return Ms(((e,t)=>{const{context:n}=e;(e=>{const{reqHeaders:t}=e;t&&(e.headers=e.headers||{},t.etag&&(e.headers["if-match"]=t.etag))})(e);const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if(yI(r)){const t=[];for(let n=0;n<pI[r].length;){const a=pI[r][n],s=qu(a,e);if("CANCEL_REFRESH"===s){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===s&&(t.push(n),a.cancelConfig?.cancel()),n+=1}t.forEach((e=>{pI[r].splice(e,1)}))}const a=Ho();return e.signal=a.token,e.cancelConfig=a,pI[r]?pI[r].push(e):pI[r]=[e],Io.publish(j.ON_REFRESH_START,{context:n}),Bo(e.url,e,n,{cancelContext:r}).then((e=>(delete pI[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete pI[r],e}))})({reqHeaders:O,context:n,method:T,body:S,url:Hu(e,b)},e)).pipe(tl((t=>{const r=((e,t,n)=>{if(!Dd.isObjectCaseType(t)&&!n)return e;const r=jg.getIn(e?.data,F.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return Dd.isExternalObject(r)?e:L.transformCaseData(e)})(t?.data,a?.classID,s);return a?.resetForm&&eo.removeContextTreeNode(n),{response:{...r},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:Hc(t.headers)}})),dl(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),nl((async e=>{if(e&&e.type===Ee)return Io.publish(j.ON_REFRESH_ERROR,{context:e.payload?.context}),zl.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),Qc(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:a,serverPrecedenceFields:s,requestType:o}=t,i=sc.getTargetViewContainerName(je),c=Ot(i,a),d={acName:c,context:a},l=Eu(n,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0});l.directUrlUpdation=!1,o===Hl.REFRESH&&await Yc(l,t,d);const u={target:c,context:a};let p=fd.getStateMachinesByContext(a)||{};const h=zc(l,u);p={...p,...fd.getUnConnectedStateMachines(a)||{}},Object.keys(p).forEach((e=>{if(jg.hasIn(h.data,e)){const t=jg.getIn(h.data,e),n=bg(e,void 0,a),r=eo.getContextReferences(a)?.get(e);Array.isArray(t)&&Array.isArray(n)&&n.length!==t.length&&"Multiselect"!==r?.props?.componentName&&fd.setStateMachineEmpty(a,e)}})),h.isArrayDeepMerge=t.options?.isArrayDeepMerge,h.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const g=Dd.getPropertiesToReArrange(a),f=_f(Yg,h,{serverPrecedenceFields:s,propertiesToReArrange:g});return fd.registerForServerChanges(),_g(f),rc.resolveActionByID(r,h),fd.unRegisterForServerChanges(),zl.deRegisterBlockingAction(a).catch((()=>{})),Io.publish(j.ON_REFRESH_COMPLETE,{context:a}),[]})))],EI=II,AI=[e=>e.pipe(Zd(nt),nl((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===j.READONLY&&s?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=s?.refreshStrategy||{},n=Ng()[s.name];if(n&&a in n){const r=n[a],{loadTime:s}=r;if(!Il.isTimeElapsed(s,e,t))return}}return Il.getData(s.name,{dataViewParameters:s.dataViewParameters},t).then((e=>{const t=s.mode===j.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(Yg({context:t,data:n})),Object.keys(r).length&&s.push(Nf({data:r,context:t})),_g(s),[]})))],CI=AI;class _I{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";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";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 _I.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case _I.LOAD_PREVIEW:this.loadPreview(e);break;case _I.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case _I.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case _I.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case _I.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case _I.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case _I.CANCEL_CASE:this.handleCaseCancel();break;case _I.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(Io.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=wp(F.APP.APP),t=e[e.length-1],n=Pp(t),r=Sg(n)?.caseInfo?.ID;if(r&&n&&$u({}).getPConnect().getActionsApi().getDescendants(r,n),xc(n)){const e=hh(n);e&&$u({}).getPConnect().getActionsApi().getDescendants(r,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){$u({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=$u({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",a=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(a,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:a}=e.data;let s=r;r===_I.OPEN_WORK_ITEM&&(s=_I.OPEN_WORK_BY_HANDLE),Oh.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:s});$u({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),a,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){if(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),t)){$u({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:F.PRIMARY,context:F.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;$u({meta:{},options:{context:vp(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;$u({meta:{},options:{context:vp(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:r,caseInitProperties:a}=e.data;if(n===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,n=$u({meta:{},options:{context:vp(e)}}),s=new URLSearchParams((a+r).slice(1)),o=this.setStartingFields(s);n.getPConnect().getActionsApi().createWork(t,{startingFields:o})}};setStartingFields=e=>{const t={};return e.forEach(((e,n)=>{n&&(t[n]=e)})),t};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),Io.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),Io.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{Io.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),Io.unsubscribeAllWithEventType(F.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:_I.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:_I.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:_I.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const SI=new _I,NI="nextAssignmentInfo",TI="nextAssignmentInfo.context",bI=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||sc.getTargetViewContainerName(We)},OI=e=>Fp(e)?{continueExecution:!0,removeActionPayload:{}}:rd(e),PI=e=>{const t=jg.getIn(e,[j.DATA,j.CASE_INFO.CASE_INFO]);return $d(t)&&vd(Ph.getOperatorIdentifier(),t)},DI=(e,t)=>{const{class:n,context:r,viewType:a=Gc.PAGE}=e,{removeActionPayload:s}=t;let o=e?.pageName?e?.pageName:Ph.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),Ms(ki.createCase(n,{...e,pageName:o,viewType:a,context:r})).pipe(tl((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:s}))),dl("Error occurred during ajax call at createWork Epic : ",r))},RI=e=>{Io.publish(j.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},$I=e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},vI=e=>{let t=0,n=[],r={},a=!1;return e.pipe(Zd(Hg),ll(100),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{context:n}=e,r=bI(e),s=Ot(r,n),{continueExecution:o,removeActionPayload:i}=OI(s);return a=Fc(e.class),o?(e.isTraditionalUICase=a,DI(e,{removeActionPayload:i})):(rc.rejectActionByID(t),cl())})),nl((async e=>{if(e&&e.type===Ee)return e.payload.context=ih(),n.push(Qc(e)),n;const{actionInPayload:s,response:o,headers:i,removeActionPayload:c}=e;let d;d=!(s.renderInline||Ph.getDefaultCasePage()||a)&&PI(o),jg.setIn(o.data,F.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const l=bI({...s,isInCreateStage:d}),u=Ot(l,s.context),p=ed(u,l,s.context);if(!_c(l)&&Fp(u)){const{continueExecution:e}=rd(u);if(!e)return rc.rejectActionByID(t),cl()}if(!(s?.openCaseViewAfterCreate??!0)&&!d){const e=$c(o),{businessID:t,caseType:a,resolvedURL:s}=gc(o);return r={id:t,label:a,href:s},RI(r),$I({caseId:t,assignmentId:e,caseType:a}),n}const h=Eu(o),g=String(Oc(Rc(h)));let f=Uf("createWork",{caseClassName:Pc(h)});f=f.replace(/{.+?}/,g),h.semanticURL=f,tc.setComponentCache(g,vo.addDebugHeaders(s.debugInfo)),((e,t)=>{const n=PI(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t,s=a&&!jc();jg.setIn(e,["directUrlUpdation"],(!n||s)&&!r)})(h,s);const y={acName:u,context:p},m=Vc(p);await Yc(h,s,y);const I={target:u,context:p,containerItemID:p,headers:i,semanticURL:f,isInCreateStage:d,isMinimizable:d,caseViewMode:h.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,currentCaseViewMode:m,assignmentContext:jg.getIn(h,TI),nextAssignmentInfo:jg.getIn(h,NI),resourceType:F.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo};wc(I,h);const E=zc(h,I);a&&(E.data.caseInfo.content.coexistenceAction="openAssignment");const A=Zc(u,E);return td(A)&&vc(n,{removeActionPayload:c,target:u}),n.push(A),id(n),n})),tl((()=>{const e=jc(),s=$d(jg.getIn(n[0]?.payload,"data.caseInfo"));return a&&e&&s?SI.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,ld,n):ld(n),Lc(n,t),r={},n=[],n})))},{RESOURCE_TYPES:xI}=F,wI=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:s}=e,o=bc(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?Gc.PAGE:n||(!Cc(r)&&!Cc(a)||s?Gc.PAGE:Gc.FORM)},MI=(e,t,n,r,a)=>{if(vc(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=Pp(t);let r=null;return n&&(r=Ip(t,n)),r?.key===e&&jp(t)})(r.key,n))r.context=vp(n),r.containerItemID=r.context,e.push(_f(If,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=qp(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(_f(If,r))}else{const t=qp(r.context),n=Sp(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(_f(If,r))):e.push(_f(nf,r))}},LI=(e,t,n,r,a,s,o)=>{Fp(t)&&Up(t)?((e,t,n,r,a)=>{wI(e,t)===Gc.FORM?(n.caseViewMode=r||j.PERFORM_MODE,a.push(_f(df,n))):a.push(_f(If,n))})(r,a,e,s,n):MI(n,o,t,e,r)},FI=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:a,isGetNextWork:s,doNotMergeMessagesForStatusCode:o})=>Bo(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...vo.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:s?o:""}),jI=(e,t)=>{const n=wI(e),{headers:r,context:a,assignmentID:s,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:d,caseID:l,jsActionQueryParams:u,isLastStepInCreateStage:p}=e;let h,g;({restApi:h,reqType:g}=o?Vf("getNextWork",{viewType:n}):c?Vf("openStage",{caseID:l,stageID:d}):Vf(Ge,{assignmentID:s,viewType:n}));const{removeActionPayload:f}=t,y=Ph.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=Hc(t,e.remoteClassName)),t})(e);return Ms(FI({restUrl:m,reqType:g,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"})).pipe(tl((e=>{if(Ph.isCoexistenceAppOfType(j.APP_TYPE.UIKIT)&&!p){return $d(e.data.data.caseInfo)?e:(m=I?m.replaceAll(I,"pyDetails"):m,Ph.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:m})}return e})),nl((e=>e?.isReloadWithDifferentViewTypeRequired?FI({restUrl:m,reqType:g,requestHeaders:E,debugInfo:i,context:a,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"}):ol(e))),tl((t=>{const{key:a,flowName:o}=Jc(s);return L.analyseResponse(t),{response:{...t.data,key:a,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:Hc({...r,...t.headers})}})),dl("Error occurred during ajax call at openAssignment Epic : ",a))},{RESOURCE_TYPES:UI}=F,kI=e=>{const t="Browser"===Ph.getRuntime();let n=0,r=[];const a=[];let s=!1,o=!1;return e.pipe(Zd(Bd),tl((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),nl((e=>{s=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Gc.FORM:wI(e),e.viewType=r;const a=Ec(Ge,e),i=Ot(a,t),{activate:c,activateContainerActionPayload:d}=sd(UI.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return ol({type:$e,activateContainerActionPayload:d,actionInPayload:e});const l=Pp(i);let u;u=d?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:l?rd(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=u;return p?(o=Fc(e.className),e.isTraditionalUICase=o,jI(e,{removeActionPayload:h})):(rc.rejectActionByID(n),cl())})),nl((async e=>{if(e?.type===Ee){if(s){const{payload:t}=e,{err:n}=t,r=n.response.status;a.push({status:Number(r)})}return r.push(Qc(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:d,removeActionPayload:l,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Bd,a=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const s={type:t,payload:{...n,caseID:a,headers:d}};return r.push(s),r}const{context:p,caseViewMode:h,debugInfo:g}=n,f=i?.data?.caseInfo?.caseTypeID;o=Fc(f),n.isTraditionalUICase=o;let y=((e,t)=>{const n=bc(e);let r;r=!Ph.getDefaultCasePage()&&$d(n);const{isChild:a,containerName:s,isTraditionalUICase:o}=t,i=a&&r,c=r&&!t.isActionFromToDoList;return!i&&!c||o?s||Ec(Ge,t):j.MODAL})(i,n);o&&(y=n.containerName??y);const m=Ot(y,p);if(t===$e)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=$p(a);await Yc({directUrlUpdation:!d,semanticURL:r},c,{acName:i,target:i,context:l}),e.push(_f(hf,{containerItemID:a,target:i,isParallelAssignment:s,insKey:o,resourceType:xI.CASE,context:l,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,u,{actionInPayload:n,target:m}),id(r),r;const I=i?.data?.caseInfo?.content,E=i?.data?.caseInfo?.ID,A=i?.uiResources?.root?.config?.name,C=i?.uiResources?.root?.config?.context;I&&!I.pyViewName&&A&&"page"!==n.viewType&&(jg.setIn(I,"pyViewName",A),jg.setIn(I,"pyViewContext",C));const _=Eu(i);((e,t)=>{const n=bc(e),r=Rc(e),a=$d(n),{skipBrowserSemanticUrlUpdate:s=!1,viewType:o,isTraditionalUICase:i}=t,c=i&&!jc(),d=o===Gc.PAGE&&(!a||c)&&!s,{caseTypeID:l}=n;if(d){const t=Uf(Be,{caseClassName:l}).replace(/{.+?}/,String(Oc(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(_,n);const S=ed(m,y,p),N=n.debugInfo||{};N?.debugId||(N.debugId=vo.getCoreHeadersFromContext(p)?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]),tc.setComponentCache(E,vo.addDebugHeaders(N));const T={acName:m,target:m,context:S};await Yc(_,n,T);const b={target:m,context:S,containerItemID:S,headers:d,parentContext:W(n?.context),isMinimizable:$d(jg.getIn(_,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:F.ASSIGNMENT,debugInfo:g};wc(b,_,{skipFlowNameUpdate:n?.caseViewMode===j.REVIEW_MODE});const O=zc(_,b);return n.isProcessAction&&(O.data.isProcessAction=n.isProcessAction),o&&(O.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,O),LI(O,m,r,n,i,h,l),((e,t)=>{if(e=V.getRemoteCaseClassBySourceClass(e)??e,V.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:r,name:a}=V.getRemoteCase(e);if(t.headers?.RemoteSystemID||rc.setRemoteCaseHeaderByContext(t,r),V.isTraditionalRemoteCase(e)){t.assignmentID=t.assignments?.[0]?.ID;const r={className:e,name:a,action:Et,remoteClassName:n};rc.setTraditionalRemoteCaseParams(t,r)}}})(f,O.data.caseInfo),c===Gc.FORM&&xc(O.containerItemID)&&dd(O,r,C),id(r),(e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:n.assignmentID,caseKey:O.key}),r})),tl((()=>{const e=n,t=jc(),s=$d(jg.getIn(r[0]?.payload,"data.caseInfo"));return o&&t&&s?SI.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,_g,r):_g(r),Lc(r,e,a),r[0]?.payload?.isParallelAssignment&&_g({type:Bd,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},VI=(e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:s,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Ph.getDefaultCasePage(),d=Vf(Be,{caseID:n,params:{pageName:c}});let{restApi:l}=d;const{reqType:u}=d;return"none"===o&&(l=`${l?.split("viewType")[0]}viewType=none`),Ms(Bo(l,{method:u,headers:{...r,...s&&{...vo.addDebugHeaders(s)}}},a)).pipe(tl((t=>(L.analyseResponse(t),{response:t.data,actionInPayload:e,headers:Hc({...r,...t.headers}),removeActionPayload:i}))),dl("Error occurred during ajax call at openWorkByHandle Epic : ",a))},BI="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:GI}=F,WI=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=Ec(Be,r),h=Ot(p,d);if(Sc(s))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:s,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Ec(Be,a),d=Ot(c,s),l=$p(r);await Yc({directUrlUpdation:!o,semanticURL:n},a,{acName:d,containerName:c,target:d,context:l}),e.push(_f(hf,{containerItemID:r,target:d,context:l,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const a=ed(h,p,d,{buildNew:!0}),s=Eu(o),g=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=Rc(e),s=n?r:Pc(e);let o=Uf(Be,{caseClassName:s},{id:t?.insKey});return o=o?.replace("{workID}",String(Oc(a)))?.replace("{id}",t?.insKey),o})(s,r);s.semanticURL=g,s.directUrlUpdation=!l;const f={acName:h,context:a};await Yc(s,r,f);const y=zc(s,{target:h,context:a,containerItemID:a,semanticURL:g,headers:c,debugInfo:u});y.caseViewMode=j.REVIEW_MODE,y.resourceType=GI.CASE,n&&(y.data.caseInfo.content.coexistenceAction="openWorkByHandle"),wc(y,s,{skipFlowNameUpdate:!0}),y.currentCaseViewMode=Vc(e?.actionInPayload?.context);const m=Zc(h,y);i.containerItemID&&td(m)&&t.push(_f(ff,{containerItemID:i.containerItemID,target:h})),t.push(m)}id(t);const g=r.insKey;mc({caseKey:g,actionInContext:d})},HI=e=>{let t=0,n=[];return e.pipe(Zd(BI),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{context:n,isChild:r,viewType:a}=e,s=Ec(Be,e),o=Ot(s,n);let i,c=!0;if("none"!==a){const e=rd(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return rc.rejectActionByID(t),cl();const{activate:d,activateContainerActionPayload:l}=sd(GI.CASE,o,e);return d&&!r&&"none"!==a?ol({type:$e,activateContainerActionPayload:l,actionInPayload:e}):VI(e,{removeActionPayload:i})})),nl((async e=>{if(e&&Nc(e.type))return n.push(Qc(e)),n;const t=Sg(e?.actionInPayload?.context),r=Fc(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Eu(e?.response),a={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ot,payload:{context:a.context,doDeleteConfirmationDetails:!1}}),r&&a.data.caseInfo?.content&&(a.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(_f(Yg,a));const s=qp(e?.actionInPayload?.context),o=Ac(e?.actionInPayload?.context),i=Object.freeze({target:s,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(xc(e?.actionInPayload?.context)){const t=zc(e?.response,{...i});dd({...t,isArrayDeepMerge:!0},n)}}}else await WI(e,n,r);return n})),tl((()=>(_g(n),Lc(n,t),n=[],n))))},qI="FINISH_ASSIGNMENT",{RESOURCE_TYPES:zI}=F,YI=(e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:s,isModalAction:o}=t;if(s&&o){const t=Ac(n),s=Ot(t,r);e.push(_f(hf,{containerItemID:n,target:s,actionMgrID:a}))}},KI=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:s}=t,o=$p(n),i=`${o?.includes("root")?j.APP.ROOT:j.APP.APP}/${gp.MODAL}`;e.push(_f(ff,{containerItemID:n,context:o,target:i,skipReleaseLockRequest:r,isInCreateStage:a,isProcessAction:s}))},JI=e=>bg(".openCaseViewAfterCreate",j.CONTEXT_DATA,e)??!0,XI=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r,a,s)=>{const{caseID:o}=n,i=(c=t,jg.getIn(c,Ic.NEXT_ASSIGNMENT_INFO_ID,j.EMPTY_STRING));var c;const d=a?dc(t):Pc(t),{caseViewMode:l,headers:u,semanticURL:p,actionMgrID:h,directUrlUpdation:g,key:f,flowName:y,resourceType:m}=r,I=qp(n?.context),E=Ip(I,n?.context)?.acTertiary;Object.assign(s,{caseId:o,assignmentId:i,caseType:d,isSubmitFromBlendedUI:E}),KI(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${gp.PRIMARY}`,C=ed(A,gp.PRIMARY),_=vo.getCoreHeadersFromContext(n.context)||!1,S=zc(t,{target:A,context:C,containerItemID:C,caseViewMode:l,headers:u,semanticURL:p,key:f,flowName:y,resourceType:m,directUrlUpdation:g,debugInfo:_&&_.debugInfo&&{debugId:_.debugInfo[j.COREHEADER_APP_DEBUG_ID]}});if(Fp(A)){const t=Sg(C),a=Rc({data:t}),[,s]=a?a.split(" "):[],o=`You will lose unsaved changes for ${s}. Do you want to continue?`;if(!JI(n.context))return e;{const{continueExecution:t}=rd(A,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,rc.rejectActionByID(h),cl();S.currentCaseViewMode=Vc(S?.context),e.push(_f(If,S))}}else e.push(_f(nf,S));return t.directUrlUpdation=g,t.semanticURL=p,await Yc(t,{...S,acName:A},{acName:A,context:C}),e},QI=(e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===we));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=yf({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)},ZI=e=>/^app\/preview_[0-9]*/g.test(e),eE=(e,t)=>{const n=W(e);return!ZI(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},tE=e=>{if(!JI(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}},nE=(e,t,n,r)=>{const{data:a,caseViewMode:s}=t,o={data:a,caseViewMode:s,context:n};if(jg.setIn(o.data,["context_data","caseViewMode"],s),e.push({type:ot,payload:{context:n}}),r){const t={data:L.transformObjectToCase(a),caseViewMode:s,context:n};e.push(_f(Yg,t))}e.push(_f(Yg,o))},rE=async(e,t,n,r,a,s,o,i,c,d)=>{const{headers:l}=c,u=d?j.OBJECT_INFO.OBJECT_INFO:j.CASE_INFO.CASE_INFO;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=Sg(e),r=c?.response?.data?.caseInfo?.assignments??[],a=n?.caseInfo?.assignments??[],s=Vc(e)===j.PERFORM_MODE,o=r[0]?.ID!==a[0]?.ID,i=r.length>0&&a.length>0;s&&o&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(r,a[0]?.ID))}const p=Fp(qp(e));let h=!1;const g=qp(n),f=mp(g),y=Pp(g);y&&f?.items?.[y]?.key===c?.actionInPayload?.caseID&&(h=!0),KI(a,{...r,skipReleaseLockRequest:!0});const m=Ac(e),I={target:qp(e),containerItemID:e,context:e,containerName:m};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const E=J(n),A=Sg(E),C=Sg(r.context),_=A[u]?.ID,S=C[u]?.ID,N=Sg(e)?.caseInfo?.ID;if(p&&_===S||!p&&(""===o||"review"===t.caseViewMode||!s&&t.root&&0===Object.keys(t.root).length&&N===t.data?.caseInfo?.ID))(void 0===t?.data[u]?.content||void 0!==t.data[u].content&&"object"==typeof t.data[u].content&&0===Object.keys(t.data[u].content).length)&&(t.root=void 0,delete t.data?.caseMessages),t.caseViewMode===j.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,r=t?.data?.caseInfo?.assignments??[],a=r[0]?.ID;return n!==a})(r,i)&&(t.flowName=" ",t.clearView=!0),a.push(_f(df,{...t,key:o,resourceType:"",...I}));else if(s){const s=qp(e),i=Sp(s,o);if(i)I.target=s,I.context=i,I.containerItemID=i,a.push(_f(df,{...t,key:o,resourceType:"",...I}));else{const e=wp(n)[0];if(r.target=e,r.context=ed(e,j.WORKAREA,n),r?.context){r.containerItemID=r.context,a.push(_f(nf,{...r,...t}));const n=r.containerItemID;a.push(_f(hf,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=qp(e),r.containerName=Ac(e),r.context=e,r.containerItemID=e,jg.setIn(t,"acName",I.target),await Yc(i,t),h&&(n.includes(j.WORKAREA)&&xc(n)&&(n=J(n)),nE(a,t,n,d)),!s&&t.caseViewMode===j.PERFORM_MODE){const t=((e,t)=>{const n=qp(e);return Sp(n,t)})(e,o),n={data:{[u]:{headers:l}},context:t};a.push(_f(Yg,n)),a.push(xu(((e,t=!1,n=!1)=>{const r=rc.getNextActionMgrId();return{ID:Bg.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Bg.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{KI(a,r);let e=!1;const o=qp(n),i=mp(o),l=Pp(o);if(l&&i?.items?.[l]?.key===c?.actionInPayload?.caseID&&(e=!0),s){const e=wp(n)[0];r.target=e,r.context=ed(e,j.WORKAREA,n),r.containerItemID=r.context,a.push(_f(nf,{...r,...t}));const s=r.containerItemID;a.push(_f(hf,{parentContainerTarget:e,containerItemID:s}))}e&&nE(a,t,n,d)}},aE=async(e,t,n,r,a,s,o)=>{const i=s?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(KI(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${gp.PRIMARY}`,a=ed(r,gp.PRIMARY),s={insKey:e.ID,className:e.content.classID,context:a,acTargetName:j.PRIMARY,isChild:!0},o={type:le,payload:{...s}};n.push(o)}})(e.data[i].parentCaseInfo,t,a);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=qp(t?.context),r=Ip(n,t?.context)?.parentContext,a=qp(r);t?.isProcessAction&&_p(a,c)&&dh(r,e?.data[i]?.lastUpdateTime)}n.resourceType=zI.CASE,n.directUrlUpdation=!0,t.isProcessAction||await XI(a,{translatedDXAPIResponse:r,actionInPayload:t},n,s,o)},sE=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===j.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:s}=t,o=Dd.getPropertiesToReplace(s);a.push(_f(df,{...e,...r,propertiesToReplace:o})),jg.setIn(e,"acName",r.target),await Yc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,s=$p(a);if(s&&xc(a)){const t=J(s),o={data:n,caseViewMode:r,context:t};jg.setIn(o.data,["context_data","caseViewMode"],r),e.push({type:ot,payload:{context:t}});const i=Dd.getPropertiesToReplace(a);e.push(_f(Yg,o,{propertiesToReplace:i}))}})(a,t,e)},oE=async(e,t,n,r,a,s,o,i,c,d={})=>{const{isCaseWideAction:l,isInCreateStage:u,containerItemID:p}=e,h=W(e.context),g=Dc(a,c),f=c?dc(a):Pc(a),y=u&&!g&&!l,m=wp(h)[0],I=m?Pp(m):h,E=Ac(p),A=$p(p),C=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:E});y&&!ZI(e.context)?await aE(i,e,t,a,s,c,d):eE(e.context,I)?await rE(I,t,h,e,s,n,r,a,o,c):!l&&!c||eE(e.context,I)?await sE(t,e,a,C,s):(KI(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=W(r),o=$p(s);e.push(_f(Jg,{containerItemID:s,context:o,container:gp.PREVIEW,containerName:gp.PREVIEW,caseId:a,viewName:F.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(s,e,{caseClassName:f}))},iE=(e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:s}=t,o=eE(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;fc({caseID:s,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:a,stages:i,stageID:c})},cE=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[j.ERROR_FIELD_IN_PAGE]=e[j.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[j.ERROR_FIELD_IN_PAGE].slice(1),r=e[j.ERROR_IN_PAGE_IDENTIFIER],a=r.startsWith(".")?r.slice(1):r;if(a){let s=t?`caseInfo.content.${t}`:"caseInfo.content";s=j.getProperty(s.replace(/\(/g,"[").replace(/\)/g,"]"));const o=no(a,s,j.PROPERTY),i={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};eo.mutateField(n,s,o[o.length-1],{messages:[i],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:r})}}))},dE=(e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:s,additionalHeaders:o={},outcome:i,jsActionQueryParams:c,headers:d}=e,{state$:l}=t,u=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:a}=e;return t&&r&&!a?Gc.PAGE:n||Gc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?"executeCaseWideActions":"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:a,viewType:u};let{restApi:g}=Vf(p,h);const{reqType:f}=Vf(p,h);u&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${u}`:`${g}?viewType=${u}`),i&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${i}`:`${g}?outcome=${i}`),g=jd(c,g),e.viewType=u;const{content:y}=qc(s),m=l.value.data[s]?.caseInfo?.headers||{},{etag:I}=m,E={"if-match":I,...d,...o};return Ms(Bo(g,{method:f,body:y,headers:E},s)).pipe(tl((t=>{const{data:n,headers:r}=t;return L.analyseResponse(n),{response:n,actionInPayload:e,headers:Hc({...E,...r})}})),dl("Error occurred during ajax call at finishAssignment Epic : ",s))},lE=e=>{Io.publish(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},uE=e=>{Io.publish(j.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:pE}=F,hE=(e,t)=>{let n=0,r=[],a={},s="",o={},i=!1,c=!1;return e.pipe(Zd(qI),nl((e=>{const d=Ph.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),s=e.payload.context,io({context:s,stateObj:Sg(s),clearContextMessages:!0}),!Td(s)||ho(s)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(n,!0,t),zl.handleDeferredActionCompletion(e.payload.context).then((()=>{uE({errorType:F.ERROR_TYPE.CLIENT})})),ol([])}return ol(e.payload).pipe(nl((e=>{YI(r,e);const n={...e};return dE(n,{state$:t})})),nl((async e=>{if(e&&e.type===Ee){Ud(e);const t=Qc(e);return r.push(t),r}kl.clearContextedCache(s);const{headers:t,actionInPayload:l,response:u}=e,{containerItemID:p,context:h=$p(p),isModalAction:g,isInCreateStage:f}=l;i=l.isCaseWideAction,c=l.isProcessAction;const y=qp(p);l.target=y;const m=Ac(p),I=Object.freeze({target:l.target,containerItemID:p,context:h,containerName:m});jg.setIn(u.data,j.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),jg.setIn(u.data,j.CASE_INFO_IS_LOCAL_ACTION,!1),u?.uiResources?.root?.config?.name&&"page"!==l.viewType&&jg.setIn(u.data,j.CASE_INFO.VIEW_NAME,u?.uiResources?.root?.config?.name),lE({submitResponse:u});let E=Eu(u,{[F.STOPMERGEACTIONS]:!u.nextAssignmentInfo});const A=Pc(E),C=W(l.context),_=wp(C)[0]?Pp(wp(C)[0]):C,S=Dc(E),N=f&&!S;!g||f||eE(l.context,_)||(E=od(E,Sg(p)));const T=zc(E,{headers:t,actionMgrID:n,directUrlUpdation:!1});let b,O;Mc(T.data,l),T.caseClassName=A,T.resourceType=pE.ASSIGNMENT,T.headers=t;const P=E?.data?.caseInfo?.assignments?.some((e=>e.ID===l.assignmentID)),D=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(E,l),R=((e,t,n,r,a)=>{let s;const o=qp(t);return s=jp(o)?Sp(o,n.data?.caseInfo?.ID):Pp(o),r&&e&&Og(null,j.CASE_VIEW_MODE_PROP,s)===j.PERFORM_MODE&&a})(P,_,E,g,D),$=l?.actionID===F.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(E?.data?.nextAssignmentInfo&&!$)T.caseViewMode=j.PERFORM_MODE,b=Rc(E),O=!0;else if(R&&!$)E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM?T.caseViewMode=j.REVIEW_MODE:T.caseViewMode=j.PERFORM_MODE,b=Rc(E),T.flowName=" ",T.deleteAssignmentSpecificResources=!1,O=!1;else{T.caseViewMode=j.REVIEW_MODE;const e=Fp(qp(_));b=E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM&&!e?Rc(E):"",O=!1}const v=Rc(E);wc(T,E,{skipFlowNameUpdate:T?.caseViewMode===j.REVIEW_MODE||R});const x=Uf("createWork",{caseClassName:A}).replace(/{.+?}/,String(Oc(v)));if(E.semanticURL=x,T.semanticURL=x,g?(await oE(l,T,O,b,E,r,e,u,!1,o),N&&(a=tE(l))):f&&d&&!S?(Ph.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:gp.PRIMARY,targetContainerName:gp.PRIMARY,viewType:Gc.PAGE,isLastStepInCreateStage:!0,context:n},a={type:ge,payload:{...r}};t.push(a)})(u,r,W(h))):await sE(T,l,E,I,r),kc(e,r),zl.handleDeferredActionCompletion(s).catch((()=>{})),iE(T,l,_),!E?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:Rc(e),assignmentID:n?null:r,actionID:a||null}})(E,l);yc({...e,containerItemID:p})}return QI(r,{transientItemID:p,target:y,isModalAction:g}),r})),tl((()=>{const e=r.find((e=>e.type===Ee));return e?(zl.handleDeferredActionCompletion(s).then((()=>{uE({errorType:F.ERROR_TYPE.SERVER})})).catch((()=>{})),cE(e),rc.rejectActionByID(n)):rc.resolveActionByID(n,a),o?.caseId&&(e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})(o),ld(r),(i||c)&&(e=>{Io.publish(j.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0}),r=[],a={},o={},r})))})))},gE="CANCEL_ASSIGNMENT",fE=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}=Vf(i,{ID:a,caseID:a,viewType:Gc.PAGE}),l=tc.getComponentCache(a),u=l&&"object"==typeof l?l:{};return Ms(Bo(c,{method:d,headers:{...t,...u}},s,{includeRemoteSystemIdIfPresent:!!o})).pipe(tl((t=>(tc.resetComponentCache(a),r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:Hc(t.headers)}))),dl(": Error occurred during ajax call at release lock request : ",s))},yE=(e,t)=>{const{isModalAction:n}=t;return fE({routeKey:"cancelAssignment",isModalAction:n,...e})},mE=e=>{let t=0,n=[];return e.pipe(Zd(gE),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{isModalAction:n}=e;e.context||(e.context=$p(e.containerItemID));const{context:r}=e,a=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?gp.MODAL:Ac(n)})(e),s=Ot(a,r),{continueExecution:o}=rd(s);return o?(e.RemoteSystemID=V.getRemoteHeaderByContext(e.context)??void 0,Ms(yE(e,{isModalAction:n}))):(rc.rejectActionByID(t),cl())})),nl((e=>{if(e&&e.type===Ee)return n.push(Qc(e)),Ms([n]);const{actionInPayload:r,response:a}=e,{containerItemID:s,isModalAction:o,isInCreateStage:i}=r;a?.data.caseInfo&&(a.data.caseInfo.availableProcesses=a.data.caseInfo.availableProcesses??[]);const c=qp(s),d=$p(s),l={target:o?`${j.APP.APP}/${j.MODAL}`:c,containerItemID:s,caseViewMode:o?j.PERFORM_MODE:j.REVIEW_MODE,context:d,actionMgrID:t,key:Rc(a),skipReleaseLockRequest:!1};return i&&n.push(_f(df,l)),!o&&xc(s)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:a,response:s}=t,o=W(n),i={context:$p(o),data:{...s.data,referencedUsers:a,context_data:{caseViewMode:r}}};s?.data?.caseInfo&&(s.data.caseInfo.assignments??=[]),e.push(_f(Yg,i))})(n,{childContainerItemID:s,caseViewMode:j.REVIEW_MODE,referencedUsers:a?.data.referencedUsers,response:a}),l.skipReleaseLockRequest=!0,n.push(_f(ff,l)),Ms([n])})),tl((()=>(_g(n),Lc(n,t),n=[],n))))},IE="NAVIGATE_TO_STEP",EE=(e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:s=$p(a),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?Gc.PAGE:Gc.FORM},{restApi:d,reqType:l}=Vf("navigateToStep",c),{content:u}=qc(s),p=i.value.data[s].caseInfo.headers;return Ms(Bo(`${d}`,{method:l,body:u,headers:{"if-match":p&&p.etag}},s)).pipe(tl((t=>({response:t.data,actionInPayload:e,headers:Hc({...p,...t.headers})}))),dl("Error occurred during ajax call at navigateToStep Epic : ",s))},{RESOURCE_TYPES:AE}=F,CE=(e,t)=>{let n=0,r=[];return e.pipe(Zd(IE),el((e=>(({actionMgrID:n}=e.payload),ol(e.payload).pipe(nl((e=>(po(e.context),EE(e,{state$:t})))),nl((async e=>{if(e&&Nc(e.type))return r.push(Qc(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:s,context:o=$p(s),isModalAction:i}=t;kl.clearContextedCache(t.context);const c=qp(s),d=Ac(s),l=Object.freeze({target:c,containerItemID:s,context:o,containerName:d}),u=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name,h=n?.uiResources?.root?.config?.context;u&&!u.pyViewName&&p&&"page"!==t.viewType&&(jg.setIn(u,"pyViewName",p),jg.setIn(u,"pyViewContext",h));const g=Eu(n),f={acName:c,...l};await Yc(g,t,f);const y=zc(g,{...l,headers:a});n?.nextAssignmentInfo||(y.caseViewMode=j.REVIEW_MODE),kc(e,r),y.doDeleteCaseSummary=t.doDeleteCaseSummary,y.resourceType=AE.ASSIGNMENT,wc(y,g),Mc(y.data,t);const m=g.data?.caseInfo?.stages,I=g.data?.caseInfo?.stageID;return fc({caseID:Rc(g),isModalAction:i,stages:m,stageID:I}),xc(s)&&dd(y,r),r.push(_f(df,y)),id(r),r})),tl((()=>(_g(r),Lc(r,n),r=[],r))))))))},_E=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=Vf(qe,{ID:t});return Ms(Bo(r,{method:a},n)).pipe(tl((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Hc(t.headers)}))),dl(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},SE=e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},NE=(e,t)=>{let n,r=0,a=[];return e.pipe(Zd(Gd),tl((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),nl((e=>e.ignoreCaseDeletion?ol({actionInPayload:e}):_E(e))),nl((async e=>{if(e&&Nc(e.type)){const{payload:t}=e,n=Qc({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:s,isModalAction:o}=n,i=o?gp.MODAL:gp.PRIMARY,c=Ot(i,s);if(!o&&c){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 Yc({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:j.PRIMARY,isChild:!0},t={type:le,payload:{...e}};a.push(t)}const d={target:c,containerItemID:s,context:s,caseDeleted:!0};return a.push(_f(ff,d)),a})),tl((()=>(_g(a),Lc(a,r)===j.PROMISE_VALUE.RESOLVE&&SE({caseType:n}),a=[],a))))};function TE(e,t){return Ga(t)?nl(e,t,1):nl(e,1)}const bE=(e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:s,reqType:o}=Vf("save",{assignmentID:n,actionID:r}),{content:i}=qc(a),c=t.value.data[a]?.caseInfo?.headers;return Ms(Bo(s,{method:o,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(tl((t=>({response:t.data,actionInPayload:e,headers:Hc(t.headers)}))),dl(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))},OE=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let s=[];return ol(n.payload).pipe(nl((e=>bE(e,r))),TE((e=>{if(e&&Nc(e.type))return ol(e);const{containerItemID:t}=e&&e.actionInPayload,r=W(t),a=qp(r),o=mp(a),i=wp(r)[0];let c=i?Pp(wp(r)[0]):r;if(!Fp(qp(c))){const t=mp(i);t?.accessedOrder.forEach((n=>{e.actionInPayload.caseID===t.items[n].key&&(c=t.items[n].context)}))}const d=Pp(a);n.payload.canUpdateAvailableActions&&Iu(e.response);if(c&&s.push((t=>_f(Yg,{context:t,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}}))(c)),o?.items?.[d]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},a=Dd.getPropertiesToReplace(t);s.push(_f(Yg,n,{propertiesToReplace:a})),s.push(_f(df,{context:t}))}return kc(e,s),fE({...e.actionInPayload,RemoteSystemID:V.getRemoteHeaderByContext(e.actionInPayload.context)??void 0})})),nl((async n=>{if(n&&Nc(n.type)){const{payload:t}=n,r=Qc({...n,...t,actionMgrID:a});s.push(r);const o=e.action.payload.modalLoadingContainer;if(o){const e=o.context,{context_data:t}=Sg(e)||{};t?.isLoading&&zp(e)}return s}const{actionInPayload:r}=n,{context:o,containerName:i}=r,c={target:Ot(i,o),containerItemID:o,context:o};return t||s.push(_f(ff,c)),s})),tl((()=>(_g(s),Lc(s,a),(e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e)})({context:n.payload.context,assignmentID:n.payload.assignmentID}),t||(s=[]),zl.isDeferredActionInProgress(n.payload.context)&&zl.handleDeferredActionCompletion(n.payload.context),s))))},PE=(e,t)=>{let n,r=0;return e.pipe(Zd(Wd),el((e=>{const{saveOnly:a}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return OE({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},DE=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",Io.unsubscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",Io.subscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:RE}=j,{RESOURCE_TYPES:$E}=F,vE=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:s,openActionType:o,modalLoadingContainer:i,headers:c}=e,{isProcessAction:d}=t,l=d?Ye:(e=>{const t=e.localActionType.toLowerCase();return t===RE.CASE_WIDE||t===RE.EXPRESS?Ke:ze})(e),u=Gc.FORM,{reqType:p}=Vf(l,{caseID:a,ID:r,actionID:n,viewType:u});let{restApi:h}=Vf(l,{caseID:a,ID:r,actionID:n,viewType:u});e.actionType=l===Ke?j.CASE:j.ASSIGNMENT,h&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${u}`:`${h}?viewType=${u}`);const g=i?.context??s;return Ms(Bo(h,{method:p,headers:c},g)).pipe(tl((t=>({response:t.data,actionInPayload:e,headers:Hc(t.headers,"",e.headers)}))),dl(`: Error occurred during ajax call at ${o} Epic : `,g))},xE=(e,t)=>{const{isProcessAction:n}=t,r=n?Ye:ze;e.openActionType=r;let a;if("modal"===Ec(r,e)){a=wp(e.contextName)[0]?wp(e.contextName)[0]:qp(e.contextName);const n=a?Pp(a):e.contextName,r=$p(n),s=Ec(e.openActionType,e),o=Ot(s,e.context),i=K(e.context,H(s,e.context));if(_g(nf({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),_g(lf({context:i})),e.modalLoadingContainer={target:o,context:i},!wp(e.contextName)[0])return vE(e,t);if(!e.continueExecution)return vE(e,t);if(!ip(r))return vE(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return Ms([Hd(e.saveActionPayload)]).pipe(nl((e=>(e=>{let t,n=0;const r=[],a={value:Cg()?.getState()};return ol(e).pipe(Zd(Wd),el((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!s){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(n,!0,e),ol([])}return OE({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),nl((n=>{if(1===n.length&&Nc(n[0].type)){const{continueExecution:n}=rd(a);if(!n)return rc.rejectActionByID(e.actionMgrID),il.pipe(Ls((()=>cl()))).toPromise();if(n)return vE(e,t)}return vE(e,t)})),tl((e=>e)))}return vE(e,t)},wE=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:s,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,d=Eu(e),l=Ec(o,r),u=c?.target??Ot(l,a);let p,h,g=!1;!Up(u)||jp(u)&&!_p(u,e.data.caseInfo.ID)?(h=H(l,a),_c(l)&&(h=K(a,h)),p=h,g=!0):(p=jp(u)?Sp(u,e.data.caseInfo.ID):Pp(u),h=$p(p));const f={acName:u,target:u,containerName:l,context:h};await Yc(d,r,f),(void 0===d?.data?.caseInfo?.content||void 0!==d.data.caseInfo.content&&"object"==typeof d.data.caseInfo.content&&0===Object.keys(d.data.caseInfo.content).length)&&delete d.data?.caseMessages;const y=d.uiResources?.root;let m;m=y?j.PERFORM_MODE:j.REVIEW_MODE;const I=zc(d,{target:u,context:h,containerItemID:p,caseViewMode:m,doDeleteCaseSummary:i,headers:n,actionName:s,isMinimizable:!1,isInCreateStage:_c(l),resourceType:$E.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});y&&wc(I,d),_c(l)&&delete I.doDeleteCaseSummary,r.openActionType===Je&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=r.selectedList);const E=g?nf:df;if(I.data.context_data.isProcessAction=r.isProcessAction,t.push(_f(E,I)),g||t.push(_f(uf,I)),g){const a=wp(r.contextName),s=Sp(a,e.data.caseInfo.ID);if(s){const e={data:{caseInfo:{headers:n}},context:s};t.push(_f(Yg,e))}}return p!==Pp(u)&&t.push(_f(hf,{target:u,containerItemID:p})),xc(p)&&!c?.context&&dd(I,t),I.caseViewMode===j.REVIEW_MODE&&t.push(_f(ff,I)),t},ME="OPEN_LOCAL_ACTION",LE=(e,t)=>xE(e,t),FE=e=>{let t=0,n=[];return e.pipe(Zd(ME),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>LE(e,{actionMgrID:t}))),nl((async e=>{if(!e)return il;if(Nc(e.type)){const t=Qc(e);n.push(t);const{context_data:r}=Sg(e.payload.context)||{};return r?.isLoading&&n.push(_f(uf,e.payload)),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return jg.setIn(a,"data.caseInfo.activeActionID",s),jg.setIn(a.data,j.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&jg.setIn(a.data,j.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await wE(a,n,{headers:r,actionInPayload:t}),DE(t),n})),tl((()=>(_g(n),Lc(n,t),n=[],n))))},jE=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:s="",bulkContextType:o=""}=e,i=Je,{reqType:c,restApi:d}=Vf(i,{caseTypeID:a,actionID:t,bulkContextID:s,bulkContextType:o});return Ms(Bo(d,{method:c},n)).pipe(tl((t=>({response:t.data,actionInPayload:e,headers:Hc(t.headers)}))),dl(`: Error occurred during ajax call at ${r} Epic : `,n))},UE=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",Io.unsubscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",Io.subscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},kE="OPEN_BULK_ACTION",VE=e=>{let t=0,n=[];return e.pipe(Zd(kE),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Je;const a=Ec(Je,e),s=Ot(a,n),{continueExecution:o}=rd(s);return o?jE(e):(rc.rejectActionByID(r),cl())})(e,{actionMgrID:t}))),nl((async e=>{if(e&&Nc(e.type)){const t=Qc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return jg.setIn(a,"data.caseInfo.activeActionID",s),await wE(a,n,{headers:r,actionInPayload:t}),UE(t),n})),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],n))))};var BE=Array.isArray,GE=Object.getPrototypeOf,WE=Object.prototype,HE=Object.keys;function qE(e){if(1===e.length){var t=e[0];if(BE(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&GE(r)===WE){var n=HE(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var zE=Array.isArray;function YE(e){return tl((function(t){return function(e,t){return zE(t)?e.apply(void 0,ja([],Fa(t))):e(t)}(e,t)}))}function KE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return Ga(al(e))?e.pop():void 0}(e),r=qE(e),a=r.args,s=r.keys,o=new ys((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Ts(a[t]).subscribe(Ds(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(YE(n)):o}const JE=e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:s}=qc(n,{nonEmptyAndChangedData:!0});let o=5;try{const e=au.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.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,d=Xe,{reqType:l,restApi:u}=Vf(d,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)s.cases=i.slice(t,t+c),s.cases.length&&p.push(Ms(Bo(u,{method:l,body:s},n)).pipe(tl((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Hc({...r})}})),dl("Error occurred during ajax call at submitbulkaction Epic : ",n)));return KE(p)},XE=e=>{Io.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},QE="SUBMIT_BULK_ACTION",ZE=e=>{let t,n=0,r=[],a="";return e.pipe(Zd(QE),el((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(n,!0,e),ol([])}return ol(e.payload).pipe(nl((e=>(t=e,JE(t)))),nl((e=>{let n=0,s=0;const o=[],{containerItemID:i,context:c}=t;return e.forEach((e=>{const{response:t}=e;n+=Number(t.successCount),s+=Number(t.failureCount),s&&t.results.forEach((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`,XE({submitResponse:e}),t.target="HYBRID"===Ph.getRenderingMode()?qp(i):`${j.APP.APP}/${gp.MODAL}`,r.push(_f(ff,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),s&&r.push(_f(gf,{messages:[{type:"error",message:1===s?"1 record failed to update":`${s} records failed to update`,errorDetails:o,showHeader:!1}],context:W(c)||c,category:"HTTP",showHeader:!1})),r})),tl((()=>(rc.resolveActionByID(n,a),_g(r),r=[],r))))})))},eA=e=>{const{actionID:t,context:n,cases:r}=e,{content:a}=qc(n,{nonEmptyAndChangedData:!0});a.cases=r.map((e=>({ID:e})));const s=Xe,{reqType:o,restApi:i}=Vf(s,{actionID:t,runningMode:"async"});return Ms(Bo(i,{method:o,body:a},n)).pipe(tl((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Hc({...r})}})),dl("Error occurred during ajax call at submitbulkaction Epic : ",n))},tA=e=>{Io.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},nA="SUBMIT_BULK_ACTION_ASYNC",rA=e=>{let t,n=0,r=[],a="";return e.pipe(Zd(nA),el((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(n,!0,e),ol([])}return ol(e.payload).pipe(el((e=>(t=e,eA(t)))),tl((e=>{const n=[],{containerItemID:s,context:o}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),a="Processing bulk actions, please refresh to check completion",tA({submitResponse:i}),t.target=`${j.APP.APP}/${gp.MODAL}`,r.push(_f(ff,{containerItemID:s,context:o,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(_f(gf,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:W(o)||o,category:"HTTP",showHeader:!1})),r})),tl((()=>(rc.resolveActionByID(n,a),_g(r),r=[],r))))})))},aA=(e,t)=>xE(e,t),sA=e=>{let t=0,n=[];return e.pipe(Zd(Vd),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>(po(e.context),aA(e,{actionMgrID:t,isProcessAction:!0})))),nl((async e=>{if(e&&Nc(e.type)){const t=Qc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await wE(a,n,{headers:r,actionInPayload:t}),n})),tl((()=>(ld(n),Lc(n,t),n=[],n))))},oA=e=>{let t=0,n=[];return e.pipe(Zd(Se,we),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:s,currentCaseViewMode:o,isProcessAction:i,isInCreateStage:c}=e,d=o===j.PERFORM_MODE,l=n&&d;return i&&c?fE(e):t!==r||a||s||!l?t?.includes(j.MODAL)&&Vc(hh(t))===j.REVIEW_MODE?fE(e):ol([]):fE(e)})),nl((e=>(e&&Nc(e.type)&&n.push(Qc(e)),n))),tl((()=>(_g(n),Lc(n,t),n=[],n))))};var iA=new Em(fm),cA=iA;function dA(e,t,n){void 0===e&&(e=0),void 0===n&&(n=cA);var r=-1;return null!=t&&(rl(t)?n=t:r=t),new ys((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)}))}function lA(e,t){return void 0===e&&(e=0),void 0===t&&(t=iA),e<0&&(e=0),dA(e,e,t)}function uA(e){return Ps((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(Ds(n,(function(t){null==s||s.unsubscribe(),r=!0,a=t,s=Ds(n,o,es),Ts(e(t)).subscribe(s)}),(function(){o(),n.complete()}),void 0,(function(){a=s=null})))}))}const pA=(e,t,n,r,a)=>{if(a!==j.RESOURCE_STATUS.CREATE)return;fd.isStateMachineExist(e,t,n)||fd.setStateMachine(e,n,t,new ii(n,t,e));fd.getStateMachine(e,t,n).insert({},"string"==typeof r?r:r+1,!0,{isDefault:!0})},hA=(e,t,n,r,a)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===r||"UPDATE"===r)&&(e.data.caseInfo.content[a][t][n]=t)},gA=e=>{const t=!e.isLocalAction&&e.editType===j.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},fA=e=>{let t=0,n=[],r="";return e.pipe(Zd(gt),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>uI(e))),nl((async e=>{if(e&&e.type===Ee)return n.push(Qc(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a,headers:s}=e,o=t.containerName,i=Ot(o,t.context);let c=ed(i,o,t.context);c=K(t.context,c);const{pageReference:d,targetProperty:l,index:u,subscriptFieldName:p,pageGroupName:h,actionType:g,isPageGroup:f}=t,y=d?.startsWith(F.OBJECT_INFO.OBJECT_INFO);let m=null;y?(m=L.transformCaseData(a),m.uiResources.root.config.context=`${d}${l}[${u}]`):m=a;const I=Eu(m);I.key=t.ID,I.data?.caseInfo?(I.data.caseInfo.ID=t.ID,hA(I,u,p,g,h)):I.data?.objectInfo&&(I.data.objectInfo.ID=t.ID);const{interestPageActionID:E,editType:A,isLocalAction:C,actionID:_}=t,S={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:E,editType:A,isLocalAction:C,actionID:_};I.uiResources.context_data.modalView=S;const N=Sg(t.context)?.context_data?.caseInfo,T=`${t.pageReference}${t.targetProperty}`,b=ro(N,T,t.index);I.uiResources.context_data.caseInfo={...I.uiResources.context_data.caseInfo,content:jg.mergeDeep(I.uiResources.context_data.caseInfo?.content,b?.content)};const O=Bg.getProperty(j.CASE_INFO.REMOTESYSTEMID,"",t.context),P={acName:i,context:c};await Yc(I,t,P);const D={target:i,context:c,containerItemID:c,headers:s,index:u,subscriptFieldName:p,pageGroupName:h,isPageGroup:f};O&&(D.headers={...D.headers,RemoteSystemID:O});const R=jg.deepClone(I.data?.caseInfo?.content);I.data?.caseInfo&&A===j.ACTION&&($()(I.data,`${d}${l}`,new Array(u+1).fill({})),$()(I.data,`${d}${l}[${u}]`,bg(`${l}[${u}]`,d,t.context)));const v=zc(I,D);I.data?.caseInfo&&(I.data.caseInfo.content=R);const x=zc(I,D);v.resourceStatus=t.actionType,v.isMultiRecordData=!0,v.parentContext=t.context,v.heading=t.heading,v.data.caseInfo&&A===j.ACTION&&(v.data.caseInfo={...v.data.caseInfo,...gA(t),isLocalAction:t.isLocalAction}),x.skipValidation=!0;const w=Zc(i,v);r=c,n.push(w),id(n);const M=_f(Yg,x);return{actionsOut:n,actionInPayload:t,mergeAction:M}})),tl((({actionInPayload:e,mergeAction:a})=>(Tc(n)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],e.skipPageInstructions||pA(r,e.pageReference,e.targetProperty,e.index,e.actionType),e.editType===j.ACTION&&(fd.registerForServerChanges(),_g(a),fd.unRegisterForServerChanges()),n))))},yA=e=>{let t,n="",r=[];return e.pipe(Zd(ft),el((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(n,!0,t),zl.handleDeferredActionCompletion(e.payload.context),ol([])}return ol(e.payload).pipe(nl((e=>(t=e,uI(t)))),nl((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==Ee){const{context:n,pageReference:r}=t,a={context:n},{response:s}=e,o=r?.startsWith(F.OBJECT_INFO.OBJECT_INFO);let i=null;o?(i=L.transformCaseData(s),i.uiResources.root.config.context=r):i=s;const c=Eu(i);c.key=t.ID,c.data?.caseInfo?c.data.caseInfo.ID=t.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=t.ID);const d=zc(c,a);d.skipValidation=!0;const l=_f(Yg,d);fd.registerForServerChangesSync(),_g(l),fd.unRegisterForServerChanges()}return e})(e,t))),nl((async e=>{if(e&&e.type===Ee){const t=Qc(e);return r.push(t),r}const{containerItemID:n,context:a,pageReference:s}=t;return((e,t,n,r)=>{fi(e).forEach((e=>{const a=jg.convertClipboardPageToPageRefNotation(e.target);fd.isStateMachineExist(t,n,a)||fd.setStateMachine(t,a,n,new ii(a,n,t));const s=fd.getStateMachine(t,n,a);switch(e.instruction.toLowerCase()){case"insert":s.insert(e.content,e.listIndex,r,{});break;case"update":s.update(e.content,e.listIndex??e.groupIndex,r,{});break;case"delete":e.listIndex?s.delete(e.listIndex,r):e.groupIndex?s.delete(e.groupIndex,r):s.deletePage();break;case"replace":s.replacePage(e.content);break;case"move":s.move(e.listIndex,e.listMoveToIndex);break;case"add":s.insert(e.content,e.groupIndex,r,{});break;case"delete all":s.deleteAll()}}))})(a,t.parentContext,s.startsWith(F.OBJECT_INFO.OBJECT_INFO_CONTENT)?j.getProperty(F.OBJECT_INFO.OBJECT_INFO_CONTENT):j.getProperty(F.CASE_INFO.CASE_INFO_CONTENT),!1),r.push(_f(ff,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),tl((()=>{if(Tc(r))rc.rejectActionByID(n),zl.handleDeferredActionCompletion(t.context);else{rc.resolveActionByID(n),zl.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(Bg.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Bg.getPropertyValue(j.getProperty(F.CASE_INFO.CASE_INFO_ID),r,t.parentContext),n=Bg.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),a=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),s=a.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");Lu(e,n,t.parentContext,s,{})}else Gu(t.parentContext,j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),{})}return _g(r),r=[],r})))})))},mA=e=>{const{caseID:t,headers:n,debugInfo:r,context:a}=e,s=Vf("getDescendants",{caseID:t}),{restApi:o}=s,{reqType:i}=s;return Ms(Bo(o,{method:i,headers:{...n,...r&&{...vo.addDebugHeaders(r)}}},a)).pipe(tl((t=>({actionInPayload:e,response:t.data,headers:Hc({...n,...t.headers})}))),dl("Error ocurred during ajax call at getDescendants Epic : ",a))},IA=e=>{let t=0,n=[];return e.pipe(Zd(Wl),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>mA(e))),nl((async e=>{if(e&&Nc(e.type))return n.push(Qc(e)),n;const{actionInPayload:t,response:r}=e,a={};jg.setIn(a,"caseInfo.childCases",r?.childCases??[]);const s={data:a,context:t?.context};return n.push(_f(Yg,s)),n})),tl((()=>(_g(n),Lc(n,t),n=[],n))))},EA=e=>{let t,n="",r=[],a={};return e.pipe(Zd(yt),el((e=>{t=e.payload;const{isFormValid:s}=e.payload;return({actionMgrID:n}=e.payload),s?ol(e.payload).pipe(nl((e=>(t=e,ol({})))),nl((async()=>{const{containerItemID:e}=t,s=Sg(e),o=e,i=s?.dataInfo.content;delete i.classID;const c=W(o),d=wp(c).length,l=wp(c)[d-1]?Pp(wp(c)[d-1]):c,u=qp(e),p=Ip(u,e)||{},h=p?.referenceList?.replaceAll(".",""),g=p?.subscriptName,f=Sg(l),y={containerItemID:l,data:{...f,caseInfo:{content:{...i}}}};r.push(_f(df,y)),((e,t,n)=>{ip(t)&&e.push(_f(ff,{containerItemID:n,skipReleaseLockRequest:!0}))})(r,o,e);const m=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:r,activeWorkArea:a,subscriptFieldName:s,actionMgrID:o,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[s],containerName:F.MODAL,pageReference:F.CASE_INFO.CASE_INFO_CONTENT,viewID:F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:F.RESOURCE_STATUS.CREATE,interestPage:`.${r}.${n[s]??""}`,targetProperty:`.${r??""}`,pageGroupName:r,context:a??"",subscriptFieldName:s};return{type:gt,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:o,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:f,subscriptData:i,pageGroupName:h,activeWorkArea:l,subscriptFieldName:g,actionMgrID:n,containerItemID:e});return r.push(m),a=i,r})),tl((()=>(rc.resolveActionByID(n,a),_g(r),r=[],r)))):(((e,t)=>{const n={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};rc.rejectActionByID(e,!0,n),zl.handleDeferredActionCompletion(t)})(n,e.payload.context),ol([]))})))},AA=[vI,kI,HI,FE,VE,ZE,rA,sA,hE,CE,mE,oA,PE,NE,e=>e.pipe(Zd(He),uA((()=>lA(100))),tl((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:s,skipReleaseLockRequest:o,isInCreateStage:i}=e.payload;return rc.resolveActionByID(t),Io.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:s,skipReleaseLockRequest:o,isInCreateStage:i}),[]}))),e=>e.pipe(Zd(Me),uA((()=>lA(100))),tl((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,s=Ot(r,n);return rc.resolveActionByID(t),_g(_f(hf,{containerItemID:a,target:s,doDeleteCaseSummary:!1})),[]}))),fA,yA,IA,EA],CA=AA;function _A(){return Ps((function(e,t){e.subscribe(Ds(t,es))}))}const{RESOURCE_TYPES:SA}=F,NA=[e=>e.pipe(Zd(te),tl((e=>e.payload)),nl((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===gp.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=Ot(gp.PREVIEW,e.context),n=ed(t,gp.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);_g(nf({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:j.REVIEW_MODE,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(V.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=V.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=Vf("loadView",t);return e.viewContext===SA.PAGE&&({restApi:r,reqType:a}=Vf(je,{page:e.viewName,pageClass:e.pageClass})),Ms(Bo(r,{method:a,headers:n},e.context)).pipe(tl((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:Hc(t.headers),rootView:jg.getIn(r,j.ROOT)}})),dl(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),nl((async e=>{const t={};if(e?.type===Ee){if(t.actionsOut=Qc(e),e?.payload?.context?.includes(gp.PREVIEW)){const n={...Sg(e.payload.context),caseInfo:{progress:!1,error:!0}},r=Ot(gp.PREVIEW,e.payload.context);t.actionsOut=_f(df,{key:n.key,target:r,containerName:gp.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete r?.data?.caseInfo?.assignments,delete r?.data?.caseInfo?.availableActions,delete r?.data?.caseInfo?.availableProcesses);const{containerItemID:s,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,a=t||sc.getTargetViewContainerName(je),s=r?.target??Ot(a,e.context);return{target:s,context:r?.context??(t===gp.PREVIEW&&n?e.context:ed(s,a,e.context,{buildNew:!!t}))}})(n);n.context=c;const d={acName:i,context:c};let l={};l=Eu(r),l.directUrlUpdation=!1,await Yc(l,n,d);const u={...n,target:i,context:c,containerItemID:s||c,headers:a},p=zc(l,u);if(p.resourceType=SA.CASE,o&&!p.updateData){p.caseViewMode=j.REVIEW_MODE;const e=qp(p?.context);((e,t,n,r,a)=>{e&&a===gp.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=_f(df,{...n,containerName:a})):e?(r.actionsOut=[],r.actionsOut.push(_f(hf,{target:t,containerItemID:e}))):r.actionsOut=_f(nf,{...n,containerName:a})})(Sp(e,p.key),e,p,t,o)}else p.preserveClientChanges=!0,t.actionsOut=[],o===gp.PREVIEW&&t.actionsOut.push({type:ot,payload:{context:c}}),((e,t)=>{if(e.key){const n=qp(e?.context);Sp(n,e.key)&&t.actionsOut.push(_f(Yg,e))}else t.actionsOut.push(_f(Yg,e))})(p,t)}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{Io.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),tl((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(rc.resolveActionByID(n,e),L.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(Zd(ne),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{Io.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:a,className:s,skipSemanticUrl:o=!1,containerName:i=sc.getTargetViewContainerName(je)}=e,c=n&&{...vo.addDebugHeaders(n)},d=Ot(i,r);let l="",u={},p=!0;if(!o){if(l=Uf(je,{page:a,pageClass:s}),d&&l){const{activate:t,activateContainerActionPayload:n}=sd(SA.PAGE,d,{semanticURL:l});if(t)return ol({type:$e,activateContainerActionPayload:n,actionConfig:e})}if(Pp(d)&&({continueExecution:p,removeActionPayload:u}=rd(d)),!p)return rc.rejectActionByID(t),cl()}const{restApi:h,reqType:g}=Vf(je,{page:a,pageClass:s});return Ms(Bo(h,{method:g,headers:c},r)).pipe(tl((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:l,semanticURL:l},actionConfig:e,headers:Hc(t.headers),removeActionPayload:u,skipSemanticUrl:o}})),dl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),nl((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===Ee)return n.push(Qc(e)),t;let{type:r}=e;const{actionConfig:a,skipSemanticUrl:s}=e,o=a.containerName||sc.getTargetViewContainerName(ne),i=Ot(o,a.context);Io.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:d}=((e,t,n,r)=>{let a={},s=e;if(n.isTraditionalRemoteCase){a={...n};const e=Sp(r,a.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},s=$e)}return{remoteCasePayload:a,updatedType:s}})(r,e,a,i);if(r=d??r,a.isDeferLoaded){const{response:r,headers:o={}}=e,{isCreateDataObject:c,context:d}=a,l=Eu(r,{isCreateDataObject:c});l.directUrlUpdation=!s;const u={acName:i,context:d};await Yc(l,a,u);const p=zc(l,{containerItemID:d,target:i,headers:o,context:d});t.rootView=jg.getIn(l,j.ROOT),n.push(_f(Yg,p))}else if(r===$e){const{activateContainerActionPayload:{semanticURL:t,containerItemID:r}}=e,s={acName:i,context:$p(r)};a.isTraditionalRemoteCase||await Yc({directUrlUpdation:!0,semanticURL:t},a,s,!0),n.push(_f(hf,{target:i,containerItemID:r}))}else{const t=ed(i,o,a.context),{response:r,headers:d={},removeActionPayload:l}=e,u=Eu(r,{isCreateDataObject:a.isCreateDataObject});u.directUrlUpdation=!s;const p={acName:i,context:t},h=Vc(t);await Yc(u,a,p);const g={target:i,context:t,containerItemID:t,headers:d,debugInfo:a.debugInfo,currentCaseViewMode:h,referenceList:a?.referenceListStr,subscriptName:a?.subscriptName},f=zc(u,g);f.resourceType=F.PAGE,a.isCreateDataObject&&(f.resourceType=F.RESOURCE_TYPES.DATA,f.resourceStatus=F.RESOURCE_STATUS.CREATE,delete f.data.caseInfo,f.referenceList=a.referenceListStr,f.subscriptName=a.subscriptName),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=F.CASE,n.key=Dd.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:Oc(Dd.getRemoteCaseKey(t.assignmentID,t.insKey))}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(a,c,f),f.data??={},f.data.traditionalGadgetId=Dd.getUniqueGadgetId();const y=Zc(i,f);l.containerItemID&&td(y)&&n.push(_f(ff,{containerItemID:l.containerItemID,target:i})),n.push(y),id(n)}return Io.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),tl((({actionManagerID:e=0,rootView:t})=>{rc.resolveActionByID(e,t),_g(n),n=[]})),_A())}],TA=NA,bA=(e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:o,skipSemanticUrl:i,RemoteSystemID:c}=e,{removeActionPayload:d}=t,{restApi:l,reqType:u,body:p}=Vf(Ue,{pageName:r,dataContext:a,dataContextParameters:s}),h={};return h.RemoteSystemID=c,Ms(Bo(l,{method:u,headers:h,body:p},n)).pipe(tl((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:Hc(t.headers),removeActionPayload:d,skipSemanticUrl:i}))),dl("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:OA}=F,PA=(e,t)=>{const n=Object.getOwnPropertyDescriptor(e,t);return Object.hasOwn(e,t)&&n&&!0===n.writable&&"string"==typeof e[t]},DA=e=>{let t,n=0,r=[];return e.pipe(Zd(re),TE((e=>(({actionMgrID:n}=e.payload),ol(e.payload).pipe(nl((e=>((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:d,containerName:l,RemoteSystemID:u}=e;for(let e=0,t=Object.keys(s);e<t.length;e+=1){const n=t[e];PA(s,n)&&(s[n]=decodeURIComponent(s[n]))}const p=Ot(l,n);let h="",g={},f=!1;for(let e=0,t=Object.keys(s);e<t.length;e+=1){const n=t[e],r=s[n];PA(s,n)&&(s[n]=jg.containsEncodedPattern(r)?r:encodeURIComponent(r))}if(!o){h=Uf(Ue,{pageName:r,dataViewName:a},s);const{activate:n,activateContainerActionPayload:o}=sd(OA.PAGE,p,{semanticURL:h});if(n)return ol({type:$e,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:f,removeActionPayload:g}=rd(p)),!f)return rc.rejectActionByID(t),cl()}return bA({context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:h,skipSemanticUrl:o,containerName:l,isDeferLoaded:i,parentAction:c,resourceType:d,RemoteSystemID:u},{removeActionPayload:g})})(e,n))),nl((async e=>{if(e&&e.type===Ee)return r.push(Qc(e)),r;const{type:n,actionConfig:a,headers:s,response:o,skipSemanticUrl:i}=e;t=jg.getIn(o,j.ROOT);const{containerName:c,parentAction:d,resourceType:l}=a,u=Ot(c,a.context);let p;const h=Vc(a?.context);if(a.isDeferLoaded){p=Eu(o),p.directUrlUpdation=!i;const t={acName:u,context:a.context};await Yc(p,a,t);const n={target:u,headers:s,context:a.context,containerItemID:e.containerItemID},c=zc(p,n);return r=_f(Yg,c),r}if(n===$e){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,s={acName:u,context:$p(n)};await Yc({directUrlUpdation:!0,semanticURL:t},a,s,!0),r.push(_f(hf,{target:u,containerItemID:n,resourceType:OA.DATA}))}else if("DATA"===l&&d===ht){const{context:e}=a,t=o?.data,n={context:e,data:t};r.push(_f(Yg,n))}else{const t=ed(u,c,a.context),{removeActionPayload:n}=e;p=Eu(o),p.directUrlUpdation=!i;const d={acName:u,context:t};await Yc(p,a,d);const l=zc(p,{target:u,context:t,containerItemID:t,headers:s,currentCaseViewMode:h});l.resourceType=OA.DATA;const g=Zc(u,l);n.containerItemID&&td(g)&&r.push(_f(ff,{containerItemID:n.containerItemID,target:u})),id(r),r.push(g)}return r})),tl((()=>(rc.resolveActionByID(n,t),_g(r),r=[],r))))))))},RA=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:s,reqType:o}=Vf("deleteDataObject",a);return Ms(Bo(s,{method:o},n)).pipe(tl((t=>({response:t.data,actionInPayload:e}))),dl("Error occurred during ajax call at deleteDataObject Epic",n))},$A=e=>{let t=0,n=[];return e.pipe(Zd(dt),ll(100),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>RA(e))),nl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Qc({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],n))))},vA=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,a={data_view_ID:t},{restApi:s,reqType:o}=Vf("getDataObjectActions",a);return Ms(Bo(s,{method:o,body:{dataViewParameters:n}},r)).pipe(tl((e=>({...e.data}))),dl("Error occurred during ajax call at GET data object actions : ",e.context))},xA=e=>{let t=0,n=[];let r={};return e.pipe(Zd(me),ll(100),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>vA(e))),nl((async e=>e&&e.type===Ee?(n.push(Qc(e)),n):(r=e,[]))),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t,r),_g(n),n=[],n))))},wA=[DA,e=>{let t=0,n=[];return e.pipe(Zd(ct),ll(100),el((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(t,!0,e),ol([])}return ol(e.payload).pipe(nl((e=>ul(e))),nl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Qc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?gp.MODAL:gp.PRIMARY,i={target:Ot(o,a),containerItemID:a,context:a};return n.push(_f(ff,i)),n})),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Zd(lt),ll(100),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>pl(e))),nl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Qc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:s={}}=e,{containerName:o,readOnly:i,actionName:c}=r,d=Ot(o,r.context),l=ed(d,o,r.context),u={acName:d,context:l};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=r.dataLookUp,e.dataContextParameters||=r.requestPayload}await Yc(a,r,u);const p=zc(a,{target:d,context:l,containerItemID:l,headers:s});return p.resourceType=F.RESOURCE_TYPES.DATA,p.resourceStatus=F.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(r.requestPayload),n.push(_f(nf,p)),n})),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Zd(ut),ll(100),el((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(t,!0,e),ol([])}return ol(e.payload).pipe(nl((e=>hl(e))),nl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Qc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?gp.MODAL:gp.PRIMARY,i={target:Ot(o,a),containerItemID:a,context:a};return n.push(_f(ff,i)),n})),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],n))))})))},$A,xA,e=>{let t=0,n=[];return e.pipe(Zd(pt),ll(100),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>gl(e))),nl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,a=Qc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:s={}}=e,{containerName:o,actionID:i,context:c,actionName:d}=r,l=Ot(o,r.context);let u=H(o,c);u=K(c,u);const p={target:l,context:u,containerItemID:u,headers:s,resourceType:F.RESOURCE_TYPES.DATA,resourceStatus:F.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:d};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=r.lookupDatapage,e.dataContextParameters||=r.dataViewParameters}const h={acName:l,context:c};await Yc(a,r,h);const g=zc(a,p);return n.push(_f(nf,g)),n})),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Zd(ht),ll(100),el((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const a=e.payload.context;if(!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(t,!0,e),ol([])}return io({context:a,stateObj:Sg(a),clearContextMessages:!0}),ol(e.payload).pipe(nl((e=>fl(e))),nl((async e=>{if(e&&e.type===Ee){Ud(e,"dataObject");const{payload:r}=e,a=Qc({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:s={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:d}=r,l=Ot(o,r.context),u={acName:l,context:r.context};await Yc(a,r,u);const p={key:d,target:l,resourceType:c,containerItemID:i,headers:s,context:r.context};return n=((e,t,n,r)=>{const{resourceType:a,key:s,containerItemID:o}=r,i=zc(n,t);i.resourceType=a||F.RESOURCE_TYPES.DATA;const c=J(o);e.push(_f(ff,i));const d=bg(".dataContext","dataInfo",c),l=bg(".dataContextParameters","dataInfo",c),u={context:c,skipSemanticUrl:!0,resourceType:a,parentAction:ht,dataContext:d,dataContextParameters:l},p=d&&l&&Uf(Ue,{pageName:j.PY_DETAILS,dataViewName:d},l)||"";if(o?.includes(j.PREVIEW)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DATA_PREVIEW,container:j.PREVIEW,containerName:j.PREVIEW,...u}};e.push(t)}else if(a!==j.PAGE&&s===p&&o?.includes(j.PRIMARY)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DETAILS,containerName:"",...u}};e.push(t)}return e})(n,p,a,{key:d,resourceType:c,containerItemID:i}),n})),tl((()=>(1===n.length&&Nc(n[0].type)?rc.rejectActionByID(t):rc.resolveActionByID(t),_g(n),n=[],n))))})))}],MA=wA;function LA(e,t){return void 0===t&&(t=iA),Ps((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(Ds(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:FA,DATA:jA,OBJECT:UA}}=F;let kA=[],VA=!1,BA=!1;const GA={},WA=[e=>e.pipe(Zd(Ie),LA(200),tl((e=>e.payload)),nl((e=>{BA=!1,Io.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{BA=!0}));const t=Eo.getPreviewMode()&&vo.addDebugHeaders({debugId:jg.generateUniqueID()});GA.dataContext=e.payload.dataViewName,GA.dataContextParameters=(e=>{if(!e)return e;const t={};for(let n=0,r=Object.keys(e);n<r.length;n+=1){const a=r[n];if(Object.hasOwn(e,a)){const n=e[a];t[a]=jg.containsEncodedPattern(n)?decodeURIComponent(n):encodeURIComponent(n)}}return t})(e.payload.dataViewKeys);const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:s}=e;s&&(s.indexOf("viewType={viewType}")>0?s=s.replace("{viewType}","page"):s.indexOf('viewType=""')>0&&(s=s.replace('viewType=""','viewType="page"'))),VA=a===Nt,VA&&L.setNeedsMapping(!0);const o=E()+s,i=e.options.context;let c;const d={},l=e?.payload?.caseClassName;if(V.isRemoteCase(l)){const{RemoteSystemID:e}=V.getRemoteCase(l);d.RemoteSystemID=e}if(Ph.isWSSPortal()&&(d[j.X_ORIGIN_CHANNEL]="WSS"),"POST"===r){c=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`);let i;switch(cd(a)){case FA:case UA:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case jA:i=GA;break;default:i=c}return Ms(Bo(o,{method:r,body:i,headers:{...d,...t}},n)).pipe(tl((t=>({response:{...t.data},payload:e,headers:Hc(t.headers,"",d)}))),dl(": Error occurred during ajax call at historyEpic : ",e))}return Ms(Bo(o,{method:"GET",headers:{...d,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(tl((n=>({response:n.data,payload:e,headers:{...Hc(n.headers),...t}}))),Fs((r=>{if(a===Qe){const n={messages:[{type:"error",message:r.response.data.errorDetails[0].localizedValue}],category:"PAGE"};tc.setComponentCache("assignments-launchAssignment-Error",n);const a=Sh(Ch()),s=Oh.getEndPointInfo(a.split("/assignments")[0]),o=E()+s.routeEndpoint;return e={...e,routeKey:Be,resetSemanticURL:!0},Ms(Bo(o,{method:s.reqType,headers:{...d,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(tl((n=>({response:n.data,payload:e,headers:{...Hc(n.headers),...t}}))))}return ol(Sf(": Error occurred during ajax call at historyEpic : ",r,n))})))})),nl((async e=>{if(BA)return kA;if(Io.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{BA=!0})),e&&e.type===Ee)return Qc(e);const{headers:t={},response:n,payload:r}=e,a=Eu(n,{[F.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=r.options.acName,o=Fp(s)&&Up(s)?Pp(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[j.COREHEADER_APP_DEBUG_ID]}};let d=r?.payload?.pageClass;const l=r?.payload?.page,u=VA?Nt:Be,p=VA?r.payload.objectID:r.payload.workID,h=VA?"{objectID}":"{workID}";let g=VA?`objects/${p}`:"";r?.payload?.caseName&&p&&(g=Uf(u,{caseName:e.payload.payload.caseName}),g=g?.replace(h,p)||"",d=r?.payload?.caseClassName),(r?.routeKey===Qe||r?.resetSemanticURL)&&((e,t)=>{const n=Rc(t);let r=Uf(Be,{caseClassName:Pc(t)},{id:n});r=r?.replace("{workID}",String(Oc(n))).replace("{id}",String(Oc(n))),Yf({directUrlUpdation:!0,semanticURL:r,options:{}})})(0,a),Io.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:l,pageClass:d});const f=jg.getIn(a,j.LOCALE_REFERENCES);await $h.loadLocaleResources(f);const y=jg.getIn(a,j.COMPONENTS);y&&await ec(y),ji(a,r.options.actionConfig,!0),Io.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:l,pageClass:d});let m=zc(a,c);return m=((e,t,n)=>{if(e===Bc.CASE||e===Bc.OBJECT||e===Bc.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=Jc(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===Bc.ASSIGNMENT?(n.caseViewMode=j.PERFORM_MODE,n.resourceType=Bc.CASE):n.caseViewMode=j.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(cd(e.payload.routeKey),{...n.data,semanticURL:g,caseViewMode:j.REVIEW_MODE},m),kA.push(Zc(s,m)),((e,t)=>{let n=tc.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push(_f(gf,n)),tc.resetComponentCache("assignments-launchAssignment-Error"))})(o,kA),id(kA),kA})),tl((()=>(BA||_g(kA),kA=[],VA=!1,BA=!1,kA))),dl("Error occurred"))],HA=WA,qA=[e=>{let t=0;return e.pipe(Zd(tt),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),tl((()=>{const e=Cg()?.getState(),n=iI();return h()(e,n)&&t>0?rc.resolveActionByID(t,{}):rc.rejectActionByID(t),[]})),_A())}],zA=[e=>{let t=0,n=[];return e.pipe(Zd(ae),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a,s="";n||(s=Uf(ke,{insightID:"{insightID}"}),s=s.replace("{insightID}",r),a=Oh.getEndPointInfo(s));const{restApi:o,reqType:i}=Vf(ke,{...a?.payload||[],insightID:r});return Ms(Bo(o,{method:i},t)).pipe(tl((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),dl(": Error occurred during ajax call at showPage Epic : ",e.context))})),nl((async e=>{if(e&&e.type===Ee)return n.push(Qc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=sc.getTargetViewContainerName(ne),s=Ot(a,t.context),o=ed(s,a,t.context),{response:i}=e,c=Eu(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await Yc(c,t,d,l,u);const p=zc(c,{target:s,context:o,containerItemID:o});p.resourceType=F.PAGE;const h=Zc(s,p);return n.push(h),id(n),n})),tl((()=>{rc.resolveActionByID(t),_g(n),n=[]})),_A())}],YA=zA,KA=[e=>{let t=0,n=[];return e.pipe(Zd(se),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=Uf(Ve,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:s,reqType:o}=Vf(Ve,{dashboardID:r});return Ms(Bo(s,{method:o},t)).pipe(tl((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}})),dl(": Error occurred during ajax call at showPage Epic : ",e.context))})),nl((async e=>{if(e&&e.type===Ee)return n.push(Qc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=sc.getTargetViewContainerName(ne),s=Ot(a,t.context),o=ed(s,a,t.context),{response:i}=e,c=Eu(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await Yc(c,t,d,l,u);const p=zc(c,{target:s,context:o,containerItemID:o});p.resourceType=F.PAGE;const h=Zc(s,p);return n.push(h)})),tl((()=>{rc.resolveActionByID(t),_g(n),n=[]})),_A())}],JA=KA,XA=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||sc.getTargetViewContainerName(St)},QA=e=>"pzCreateDetails"===e?.uiResources?.root?.config?.name||!1,ZA=(e,t)=>{const n=QA(e),{skipBrowserSemanticUrlUpdate:r=!1}=t;jg.setIn(e,["directUrlUpdation"],!n&&!r)},eC=e=>e.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,tC=(e,t)=>{let n;return n=!e.renderInline&&!Ph.getDefaultCasePage()&&QA(t),n},nC=(e,t)=>{const{class:n,context:r,viewType:a=Gc.PAGE}=e,{removeActionPayload:s}=t,o=e?.pageName?e?.pageName:Ph.getDefaultCasePage();return Ms(ki.createCase(n,{...e,pageName:o,viewType:a,context:r})).pipe(tl((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:s}))),dl("Error occurred during ajax call at createObject Epic : ",r))},rC="CREATE_OBJECT",aC=e=>{let t,n=0,r=[],a={};return e.pipe(Zd(rC),ll(100),el((e=>{if(({actionMgrID:n}=e.payload),Dd.isExternalObject(e.payload.class)&&!Td(e.payload.context)){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(n,!0,e),ol([])}return ol(e.payload).pipe(nl((e=>{const{context:r}=e;t=e.class;const a=XA(e),s=Ot(a,r),{continueExecution:o,removeActionPayload:i}=OI(s);return o?nC(e,{removeActionPayload:i}):(rc.rejectActionByID(n),cl())})),nl((async e=>{if(e&&e.type===Ee)return e.payload.context=((e,t)=>Dd.isExternalObject(e)&&t?t:ih())(t,e.payload.context),r.push(Qc(e)),r;const{actionInPayload:s,response:o,headers:i,removeActionPayload:c}=e,d=tC(s,o);jg.setIn(o.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const l=XA({...s,isInCreateStage:d}),u=Ot(l,s.context),p=ed(u,l,s.context);if(((e,t)=>{Dd.isExternalObject(e.class)&&(e.containerItemID=e.context,KI(t,e))})(s,r),((e,t,n)=>!_c(e)&&Fp(t)&&!Dd.isExternalObject(n))(l,u,t)){const{continueExecution:e}=rd(u);if(!e)return rc.rejectActionByID(n),cl()}if(((e,t)=>!e&&!t)(s?.openCaseViewAfterCreate??!0,d)){const{businessID:e,caseType:t,resolvedURL:n}=gc(o);return a={id:e,label:t,href:n},RI(a),$I({caseId:e,caseType:t}),r}(e=>{Dd.isExternalObject(e.class)&&RI({content:$h.getLocaleValue("Successfully submitted!","Assignment")})})(s);const h=Eu(o),g=String(Oc(lc(h)));let f=Uf(St,{caseClassName:dc(h)});f=f.replace(/{.+?}/,g),h.semanticURL=f,tc.setComponentCache(g,vo.addDebugHeaders(s.debugInfo)),ZA(h,s);const y={acName:u,context:p};await Yc(h,s,y);const m={target:u,context:p,headers:i,semanticURL:f,caseViewMode:eC(h),containerItemID:p,isInCreateStage:d,isMinimizable:d,assignmentContext:jg.getIn(h,TI),nextAssignmentInfo:jg.getIn(h,NI),resourceType:F.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo};uc(m,h);const I=zc(h,m),E=Zc(u,I);return((e,t,n)=>{if(td(e)){const{removeActionPayload:e,target:r}=t;vc(n,{removeActionPayload:e,target:r})}})(E,{removeActionPayload:c,target:u},r),r.push(E),id(r),r})),tl((()=>(ld(r),Lc(r,n),(e=>{Dd.isExternalObject(e)&&L.setNeedsMapping(!1)})(t),a={},r=[],r))))})))},sC=(e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:s,additionalHeaders:o={},jsActionQueryParams:i}=e,{state$:c}=t,d=Gc.PAGE,l="executeObjectWideAction",u={assignmentID:n,actionID:r,viewType:d,objectID:a};let{restApi:p}=Vf(l,u);const{reqType:h}=Vf(l,u);d&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${d}`:`${p}?viewType=${d}`),p=jd(i,p),e.viewType=d;const{content:g}=qc(s,{isObjectWideAction:!0}),f=c.value.data[s]?.objectInfo?.headers||{},{etag:y}=f,m={"if-match":y,...o};return Ms(Bo(p,{method:h,body:g,headers:m},s)).pipe(tl((t=>{const{data:n,headers:r}=t;return L.analyseResponse(t.data),{actionInPayload:e,response:n,headers:Hc({...m,...r})}})),dl("Error occurred during ajax call at executeObjectWideAction Epic : ",s))},oC=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:lc(e)}},{RESOURCE_TYPES:iC}=F,cC=(e,t)=>{let n=0,r=[],a={},s="";return e.pipe(Zd(_t),el((e=>{if(({actionMgrID:n}=e.payload),s=e.payload.context,io({context:s,stateObj:Sg(s),clearContextMessages:!0}),!Td(s)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return rc.rejectActionByID(n,!0,t),zl.handleDeferredActionCompletion(e.payload.context),ol([])}return ol(e.payload).pipe(nl((e=>{YI(r,e);const n={...e};return sC(n,{state$:t})})),nl((async e=>{if(e?.type===Ee){const t=Qc(e);return r.push(t),r}kl.clearContextedCache(s);const{headers:t,actionInPayload:o,response:i}=e,{containerItemID:c,isModalAction:d,isInCreateStage:l}=o,u=qp(c);o.target=u,jg.setIn(i.data,j.OBJECT_INFO_IS_LOCAL_ACTION,!1),lE({submitResponse:i});let p=Eu(i,{[F.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const h=dc(p),g=W(o.context),f=wp(g)[0]?Pp(wp(g)[0]):g,y=(e=>{const t=pc(e);return $d(t)&&vd(Ph.getOperatorIdentifier(),t)})(p),m=l&&!y;!d||l||eE(o.context,f)||(p=od(p,Sg(c)));const I=zc(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&jg.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),jg.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(I.data,o),I.caseClassName=h,I.resourceType=iC.ASSIGNMENT,I.headers=t;const E=lc(p);uc(I,p);const A=Uf(St,{caseClassName:h}).replace(/{.+?}/,String(Oc(E)));p.semanticURL=A,I.semanticURL=A,await oE(o,I,!1,E,p,r,e,i,!0),m&&(a=tE(o),$I({caseId:o.caseID,caseType:o.caseTypeID,assignmentId:o.assignmentID})),((e,t)=>{const n=dc(e?.response),r=pc(e?.response),{caseTypeID:a}=r,s=Ph.getFeatureMap();(s?.deferUpdateCaseSummaryView??!Object.hasOwn(s,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&eg(j.CASESUMMARY_VIEW_NAME,a)&&Uc(t,e?.actionInPayload,{caseClassName:n})})(e,r),zl.handleDeferredActionCompletion(s),iE(I,o,f);const C=oC(p,o);return yc({...C,containerItemID:c}),QI(r,{transientItemID:c,target:u,isModalAction:d}),r})),tl((()=>{const e=r.find((e=>e.type===Ee));return e?(zl.handleDeferredActionCompletion(s),cE(e),rc.rejectActionByID(n)):rc.resolveActionByID(n,a),ld(r),L.setNeedsMapping(!1),r=[],a={},r})))})))},dC=(e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:s,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Ph.getDefaultCasePage(),d=Vf(Nt,{objectID:n,params:{pageName:c}});let{restApi:l}=d;const{reqType:u}=d;return"none"===o&&(l=`${l?.split("viewType")[0]}viewType=none`),Ms(Bo(l,{method:u,headers:{...r,...s&&{...vo.addDebugHeaders(s)}}},a)).pipe(tl((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Hc({...r,...t.headers}),removeActionPayload:i}))),dl("Error occurred during ajax call at getObject Epic : ",a))},lC="GET_OBJECT",{RESOURCE_TYPES:uC}=F,pC=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:r,type:a,response:s,removeActionPayload:o,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:d,debugInfo:l}=n,u=Ec(Nt,n),p=Ot(u,c);if(Sc(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:s,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Ec(Nt,a),d=Ot(c,s),l=$p(r);await Yc({directUrlUpdation:!o,semanticURL:n},a,{acName:d,containerName:c,target:d,context:l}),e.push(_f(hf,{containerItemID:r,target:d,context:l,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:r,actionInPayload:n});else{const e=ed(p,u,c,{buildNew:!0}),r=Eu(s),a=(e=>{const t=lc(e),n=dc(e);let r=Uf(Nt,{objectClassName:n});return r=r?.replace("{objectID}",String(Oc(t))),r})(r);r.semanticURL=a,r.directUrlUpdation=!d;const h={acName:p,context:e};await Yc(r,n,h);const g=zc(r,{target:p,context:e,containerItemID:e,semanticURL:a,headers:i,debugInfo:l});g.caseViewMode=j.REVIEW_MODE,g.resourceType=uC.OBJECT,uc(g,r);const f=Zc(p,g);o.containerItemID&&td(f)&&t.push(_f(ff,{containerItemID:o.containerItemID,target:p})),t.push(f)}id(t);const h=n.insKey;mc({caseKey:h,actionInContext:c})},hC=e=>{let t=0,n=[];return e.pipe(Zd(lC),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{context:n,isChild:r,viewType:a}=e,s=Ec(Nt,e),o=Ot(s,n);let i,c=!0;if("none"!==a){const e=rd(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return rc.rejectActionByID(t),cl();const{activate:d,activateContainerActionPayload:l}=sd(uC.OBJECT,o,e);return d&&!r&&"none"!==a?ol({type:$e,activateContainerActionPayload:l,actionInPayload:e}):dC(e,{removeActionPayload:i})})),nl((async e=>{if(e&&Nc(e.type))return n.push(Qc(e)),n;if("none"===e?.actionInPayload?.viewType){const t=Sg(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==j.PERFORM_MODE){const t=Eu(e?.response),r={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ot,payload:{context:r.context,doDeleteConfirmationDetails:!1}}),n.push(_f(Yg,r));const a=qp(e?.actionInPayload?.context),s=Ac(e?.actionInPayload?.context),o=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if(hc(e?.actionInPayload?.context)){const t=zc(e?.response,{...o});dd({...t,isArrayDeepMerge:!0},n)}}}else await pC(e,n);return n})),tl((()=>(_g(n),Lc(n,t),n=[],n))))},gC="OPEN_OBJECT_ACTION",fC=e=>{const{actionID:t,caseID:n,context:r,openActionType:a,modalLoadingContainer:s}=e,o=Gc.FORM,i=Vf(Tt,{objectID:n,actionID:t,viewType:o}),{reqType:c}=i;let{restApi:d}=i;e.actionType=j.RESOURCE_TYPES.OBJECT,d&&!d.includes("viewType=")&&(d=d.includes("?")?`${d}&viewType=${o}`:`${d}?viewType=${o}`);const l=s?.context??r;return Ms(Bo(d,{method:c,headers:{}},l)).pipe(tl((t=>(L.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Hc(t.headers)}))),dl(`: Error occurred during ajax call at ${a} Epic : `,l))},yC=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:s,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,d=Eu(e,{info:F.OBJECT_INFO.OBJECT_INFO}),l=Ec(o,r),u=c?.target??Ot(l,a),{context:p,containerItemID:h,isNewContainerItem:g}=((e,t,n,r)=>{let a,s,o=!1;const i=jp(e);return!Up(e)||i&&!_p(e,r)?(s=H(t,n),_c(t)&&(s=K(n,s)),a=s,o=!0):(a=i?Sp(e,r):Pp(e),s=$p(a)),{context:s,containerItemID:a,isNewContainerItem:o}})(u,l,a,e.data.objectInfo.ID),f={acName:u,target:u,containerName:l,context:p};await Yc(d,r,f);const y=d.uiResources?.root,m=(e=>e?j.PERFORM_MODE:j.REVIEW_MODE)(y),I=zc(d,{target:u,context:p,containerItemID:h,caseViewMode:m,doDeleteCaseSummary:i,headers:n,actionName:s,isMinimizable:!1,isInCreateStage:_c(l),resourceType:F.RESOURCE_TYPES.OBJECT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,actionType:r.actionType});if(y&&uc(I,d),_c(l)&&delete I.doDeleteCaseSummary,t.push(_f((e=>e?nf:df)(g),I)),g||t.push(_f(uf,I)),g){const a=wp(r.contextName),s=Sp(a,e.data.objectInfo.ID);if(s){const e={data:{objectInfo:{headers:n}},context:s};t.push(_f(Yg,e))}}return h!==Pp(u)&&t.push(_f(hf,{target:u,containerItemID:h})),hc(h)&&!c?.context&&dd(I,t),t},mC=e=>{e.openActionType=Tt;if(Ec(e.openActionType,e)===j.MODAL){const t=Ec(e.openActionType,e),n=Ot(t,e.context),r=K(e.context,H(t,e.context));_g(nf({target:n,context:r,containerItemID:r,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),_g(lf({context:r})),e.modalLoadingContainer={target:n,context:r},fC(e)}return fC(e)},IC=e=>{let t=0,n=[];return e.pipe(Zd(gC),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>mC(e))),nl((async e=>{if(Nc(e.type)){const t=Qc(e);n.push(t);const r=Sg(e.payload.context);return r?.context_data?.isLoading&&n.push(_f(uf,e.payload)),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return jg.setIn(a,"data.objectInfo.activeActionID",s),jg.setIn(a.data,j.getProperty(j.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&jg.setIn(a.data,j.getProperty(j.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await yC(a,n,{headers:r,actionInPayload:t}),DE(t),n})),tl((()=>(_g(n),Lc(n,t),n=[],n))))},EC=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||sc.getTargetViewContainerName(bt)},AC=(e,t)=>{const{class:n,context:r,viewType:a=Gc.PAGE}=e,{removeActionPayload:s}=t,o=e?.pageName?e?.pageName:Ph.getDefaultCasePage();return Ms(ki.createCase(n,{...e,pageName:o,viewType:a,context:r,retrieveActionViewForNewObject:!0})).pipe(tl((({response:t,headers:n})=>(L.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:s}))),dl("Error occurred during ajax call at createObject Epic : ",r))},CC="CREATE_EXTERNAL_OBJECT",_C=e=>{let t=0,n=[];return e.pipe(Zd(CC),ll(100),tl((e=>(({actionMgrID:t}=e.payload),e.payload))),nl((e=>{const{context:n}=e,r=EC(e),a=Ot(r,n),{continueExecution:s,removeActionPayload:o}=OI(a);return s?AC(e,{removeActionPayload:o}):(rc.rejectActionByID(t),cl())})),nl((async e=>{if(e&&e.type===Ee)return e.payload.context=ih(),n.push(Qc(e)),n;const{actionInPayload:r,response:a,headers:s,removeActionPayload:o}=e,i=tC(r,a);jg.setIn(a.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const c=EC({...r,isInCreateStage:i}),d=Ot(c,r.context),l=ed(d,c,r.context);if(!_c(c)&&Fp(d)){const{continueExecution:e}=rd(d);if(!e)return rc.rejectActionByID(t),cl()}const u=Eu(a);let p=Uf(bt,{caseClassName:dc(u)});p=p.replace(/{.+?}/,String(Oc(lc(u)))),u.semanticURL=p,ZA(u,r);const h={acName:d,context:l};await Yc(u,r,h);const g={target:d,context:l,headers:s,semanticURL:p,caseViewMode:eC(u),containerItemID:l,isInCreateStage:i,isMinimizable:i,assignmentContext:jg.getIn(u,TI),nextAssignmentInfo:jg.getIn(u,NI),resourceType:F.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalObjectCreationFlow:!0};uc(g,u);const f=zc(u,g),y=Zc(d,f);return td(y)&&vc(n,{removeActionPayload:o,target:d}),n.push(y),id(n),n})),tl((()=>(ld(n),Lc(n,t),n=[],n))))},SC=e=>{const{workId:t,context:n,isExternalCase:r}=e,a=r?qe:"deleteWork",{restApi:s,reqType:o}=Vf(a,{ID:t});return Ms(Bo(s,{method:o},n)).pipe(tl((t=>({response:t.data,actionInPayload:e,headers:Hc(t.headers)}))),dl("Error occurred during ajax call at deleteWork Epic : ",n))},NC=e=>{Io.publish(j.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},TC=e=>{let t,n=0,r=[];return e.pipe(Zd(qd),tl((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),nl((e=>e.ignoreWorkDeletion?ol({actionInPayload:e}):SC(e))),nl((async e=>{if(e&&Nc(e.type)){const{payload:t}=e,a=Qc({...e,...t,actionMgrID:n});return r.push(a),r}const{actionInPayload:t}=e,{context:a}=t;return RI({content:$h.getLocaleValue("Deleted successfully!","Messages")}),a?.includes(j.PREVIEW)&&r.push(_f(tf,Gp({context:j.APP.APP,name:j.PREVIEW}))),a?.includes(j.PRIMARY)&&window?.history?.back(),r})),tl((()=>(_g(r),Lc(r,n)===j.PROMISE_VALUE.RESOLVE&&NC({caseTypeID:t}),r=[],r))))},bC=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 dI.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}(...EI,...CA,...TA,...HA,...MA,...CI,...qA,...YA,...JA,...[aC,hC,cC,IC,_C,TC]),OC=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,context:s,transientItemID:o}=r;"HTTP"!==a&&[_e,ve,Se,we,Te,Re].includes(n)&&(Id(s||o),eo.removeContextTreeNode(s||o)),e(t)},PC={},DC=e=>{const t=jg.getIn(PC,[j.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=jg.getIn(PC,[r,t],[]),s=a&&a.length>0&&a.indexOf(e);if(s>-1&&a.splice(s,1),!a||a&&0===a.length){jg.deleteIn(PC,[r,t]);const e=jg.getIn(PC,[r]);e&&0===Object.keys(e).length&&jg.deleteIn(PC,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),jg.deleteIn(PC,[j.CONTEXT,e]);const r=jg.getIn(PC,[j.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&jg.deleteIn(PC,[j.CONTEXT]),n.length>0&&_g(Tf({dataPagesToBeRemoved:n}))},RC=(e={},t)=>{Object.keys(e).forEach((n=>{const r=jg.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=jg.getIn(PC,[j.CONTEXT,n]);if(jg.getIn(PC,[e])){const r=jg.getIn(PC,[e,t],[]);jg.setIn(PC,[e,t],[...new Set([...r,n])])}else jg.setIn(PC,[e,t],[n]);r?jg.setIn(PC,[j.CONTEXT,n],[...new Set([...r,t])]):jg.setIn(PC,[j.CONTEXT,n],[t])})(n,e,t)}))}))},$C=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:r=[]}={},type:a}=e;if(((e,t)=>{t&&t.length>0&&(e===we||e===Se)&&t.forEach((e=>{DC(e)}))})(a,r),a===_e||a===fe||a===rt){const e=a===rt?t:t.shared;RC(e,n)}else a===we?(DC(n),RC(t.shared,n)):a===Se&&DC(n)})),e(t)},vC=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}=F;if(r===Se){const{resourceType:t,key:n,context:r}=jg.getIn(e.getState(),["containers",a,"items",s])||{},o={resourceType:t,key:n,context:r,containerItemID:s};Io.publish(l.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),a===`${F.APP.APP}/${j.PRIMARY}`&&d===j.CONTAINER_TYPE.MULTIPLE&&Io.publish(l.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===we||r===Se)&&i.forEach((e=>{Gl.cleanCaches(e)})),r!==we&&r!==Se||Gl.cleanCaches(o),t(n)},xC=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null}={},type:a}=t;!n||a!==_e&&a!==ve&&a!==we&&a!==Se||(yi(n),gi(n)),r&&a===Pe&&(yi(r),gi(r)),e(t)},wC=function(e){void 0===e&&(e={});var t,n=new(0,Am.constructor)(Am.schedulerActionCtor),r=new _m,a=function(a){t=a;var s=new _m,o=new _m,i=s.asObservable().pipe($s(n)),c=new Tm(o.pipe($s(n)),t.getState());return r.pipe(tl((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})),nl((function(e){return Ms(e).pipe(vs(n),$s(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}(),MC=e=>{if(null!==Cg())return void Mg();const t=[lp.propertyChangeMiddleware,OC,$C,xC,wC,vC],n=cm({reducer:cI(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(bm).concat(bm)});wC.run(bC),Ag(n)},LC={publishConstellationLoadedEvent:()=>{Io.publish(j.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const FC=new class{activateContainerItemOnSwitch(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Sp(t,e)};$u({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Sp(t,e)};$u({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=$u({meta:{type:"PreviewViewContainer",config:{name:j.PREVIEW}},options:{context:j.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:j.PRIMARY,context:j.APP.APP}),bp(j.APP.APP,j.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:j.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){$u({}).getPConnect().getContainerManager().resetContainers({name:j.PREVIEW,context:j.APP.APP})}isFormDirty(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n=lh(t,e);return gd.isStateModified(n)}getEventUtils(){return LC}getBroadcastUtils(){return SI}isTraditionalUICase(e){return Fc(e)}};const jC=class{static openCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?Ph.setDefaultCasePage(n.pageName):(Ph.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?Ph.disableAssignmentHeader(n.disableAssignmentHeader):Ph.disableAssignmentHeader(!1),tu.openCase(e,t,j.PRIMARY,n)}static createCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?Ph.setDefaultCasePage(n.pageName):(Ph.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?Ph.disableAssignmentHeader(n.disableAssignmentHeader):Ph.disableAssignmentHeader(!1),tu.createCase(e,t,j.PRIMARY,n)}static getNextWork(e=F.APP.APP,t={}){return t.renderInline=!0,t.pageName?Ph.setDefaultCasePage(t.pageName):(Ph.setDefaultCasePage(j.PY_DETAILS),t.pageName=j.PY_DETAILS),t?.disableAssignmentHeader?Ph.disableAssignmentHeader(t.disableAssignmentHeader):Ph.disableAssignmentHeader(!1),tu.getNextWork(e,j.PRIMARY,t)}static openAssignment(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?Ph.setDefaultCasePage(n.pageName):(Ph.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?Ph.disableAssignmentHeader(n.disableAssignmentHeader):Ph.disableAssignmentHeader(!1),tu.openAssignment(e,t,j.PRIMARY,n)}static openPage(e,t,n=F.APP.APP,r={}){const a=ne;r?.defaultCasePage?Ph.setDefaultCasePage(r.defaultCasePage):Ph.setDefaultCasePage(j.PY_DETAILS),r?.disableAssignmentHeader?Ph.disableAssignmentHeader(r.disableAssignmentHeader):Ph.disableAssignmentHeader(!1);const s={viewName:e,className:t,acTargetName:j.PRIMARY,actionMgrID:rc.getNextActionMgrId(),context:n},{promise:o}=rc.actionManagerPromise(a,s.actionMgrID);return _g({type:a,payload:{...s}}),o}static getCurrentContextAPI(e,t=F.APP.APP){return $u({meta:{config:{}},options:{context:t,pageReference:e,containerName:j.PRIMARY}}).getPConnect()}};const UC=new class{createC11nEnv=e=>$u(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>cn;getStateManager=()=>l;getActionCreators=()=>u;getStreamObservable=()=>s;getActionProcessor=()=>Wg;getActionHandler=()=>Gg;renderApp=(e,t)=>{const n={context:j.APP.APP},r={...jg.getIn(e,j.ROOT),options:n};MC(e),ji(e,n,!0);const a=this.createC11nEnv({meta:r,isRoot:!0});Io.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:r,uiResources:a={}}=e,{root:s}=a,o=jg.getIn(a,j.CONTEXT_DATA),i=Eu(e);await Yc(i,{},{},!1,!0);const c={...r,[j.CONTEXT_DATA]:o};Yp(s,t,c,n)};fetchEndPointResource=(e,t,n)=>{Bo(e,{method:"GET"},j.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await ec(n);const r=this.createC11nEnv({meta:e,isRoot:!0});Cg()||MC({}),Io.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{Xi.initServer(e,t,n)};loadView=async(e,t,n=[])=>{m();const r=Eu(e),a=jg.getIn(r,j.VIEWS),s=jg.getIn(r,j.NAVIGATIONS),o=jg.getIn(r,j.COMPONENTS)||[];o.push(...n);const i=jg.getIn(r,j.STATIC_SERVER_URL),c=jg.getIn(r,j.APPLICATION_DATA);a&&Jh(a),s&&Xh(s),(e=>{e&&(Mf=e.pyLabel)})(c),i&&Xi.initServer(i),await ec(o,i),this.renderApp(r,t)};initAppShell=(e,t,n)=>{ey(e),sc.buildActionTargetMap(t),m(n)};initRoutingTable=(e,t)=>{ey(e,!0),m(t)};setAppAlias=e=>{Xi.setAppAlias(e)};getHomeRestApi=e=>{const t=E(),{restApi:n}=kf("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(Qf()&&!t){const t=Ah(),r=Oh.processUrl(t,!0),a=Oh._getMatchedRouteInRoutingTable(r)||"",s=Oh.getRoutingInfo(),o=Oh.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=s&&s.routes[a].payload;c=c.replace("{workID}",i).replace("{id}",i),n=Oh.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=Oh.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,a,s)=>{const{config:o}=t||{},i=o?.name;if(Cg()||MC({}),s){const e=`${j.APP.ROOT}/${i}`;ah(e),rh().deleteContainerItem(e)}(rh().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&Mg(),_g(Yg({data:{},context:j.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:j.APP.ROOT,pageReference:"",target:`${j.APP.ROOT}/${i}`}}),d=c.getPConnect(),l=`${d.getContextName()}/${d.getContainerName()}`;Pp(l)||"noPortal"===o?.renderingMode||d.getContainerManager().initializeContainers({type:"single"});const u=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await ec(u),Io.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:a})};loadViewByName=(e,t,n,r)=>{let a=this.getViewRestApi(e,n);a===E()&&(a=this.getHomeRestApi(t)),this.fetchEndPointResource(a,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{Zf(e)};checkIfSemanticURL=()=>Qf();onPCoreReady=e=>{Io.subscribe(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{Io.subscribe(F.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Oi.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{C(e)};setFetchDefaultHeaders=e=>{zo(e)};setFetchAuthInfo=e=>{Yo(e)};getCaseApi=()=>tu;getMashupApi=()=>jC;enableAppRouting=e=>{Ff(e)};initStore=()=>MC({});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=$u({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}}}};const kC=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}};const VC=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 kC(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1}},BC=e=>"fulfilled"===e.status,GC=async()=>{const e=Ph.getLocale();let t;const n=Ph.getLocalizationVersion();try{let r;2===n?r=[e]:(r=[$h.GENERIC_BUNDLE_KEY,$h.MESSAGE_BUNDLE_KEY,$h.FIELD_LABELS_BUNDLE_KEY],t=await $h.isCurrentLocalePackAvailable());const a=r.map((async r=>{2===n?await(async e=>{const t=Ph.getAvailableLocalePacks(),n=Ph.getLocalizationBundles();let r;if(e&&t&&t.includes(e)?r=[Bi("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(r=n.map((e=>Bi("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!r||0===r.length)return;const a=200,s=201;(await Promise.allSettled(r)).filter(BC).forEach((({value:e})=>{if([a,s].includes(e.status)&&e.data){const t=e.data,n=zh(Ph.getLocale()??"en-US");Object.keys(t).forEach((e=>{$h.setLocaleForRule(t[e],e),n.setLocaleForRule(t[e],e)}))}}))})(r):t&&await(async(e,t)=>{const n=await Xi.getSvcLocale(t,`${e}.json`);if(n.ok&&e){const t=await n.json();$h.setLocaleForRule(t,e)}})(r,e)}));await Promise.allSettled(a)}catch(e){console.warn(e)}},WC="@P .viewConfig";let HC=0;const qC=new class{init(e){const t=new VC(e),n={...t.environmentInfo,renderingMode:t.renderingMode};Ff(t.enableRouting),MC({}),Ph.setTheme(t.theme),Ph.setCookieComplianceMethod(t.cookieComplianceMethod),Ph.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Oi.updateFieldDefaults(t.fieldDefaults),Oi.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),vo.setDefaultHeaders(t.additionalHeaders),this.#I(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),Xi.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),C(t.serviceConfig.googleMapKey),Xi.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),$h.setTimezone(t.timezone),Ph.setEnvironmentInfo(n),Ph.setLocale(t.locale),V.setRemoteCaseMapping(t.remoteCaseMapping),Ol.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),tc.init(),t.initBroadcast&&FC.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=$u({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}}};importReactRoot=async()=>{const e=[];return UC.getComponentsRegistry().getComponent("ReactRoot")?.modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.setAttribute("async",t),a.onload=n(),a.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(a)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,a)=>{const s=new URLSearchParams(t);let o=!1;"true"===n&&(o=!0);let i=null,c=null,d=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1]),t.length>1&&"assignments"===t[2]&&t[3]&&(d=t[3])}else o=!1;let l=r;i&&(l=`${l}/${i}`),c&&(l=`${l}/${c}`),d&&(l=`${l}/assignments/${d}`),o&&(s.has("noPortal")||s.append("noPortal","true"),c&&a&&s.append("view",a));const u=s.toString();return l+=u?`?${u}`:"",l};initCoreConfig=e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:a,noPortal:s,noHistory:o,viewName:i,theme:c,restServerConfig:d,dynamicLoadComponents:l=!0,dynamicSemanticUrl:u=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:g}=e,{appAlias:f,contextPath:y}=n;let m=window.location.origin;const I={};if(void 0!==d&&(m=d),y&&(m=`${m}${y}`),f&&"LAUNCHPAD"!==h&&(m=`${m}/${f}`),e.restServerConfig=m,!0===u){const e=this.buildSemanticUrl(r,a,s,m,i);!o&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),I.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==l&&(I.dynamicLoadComponents=!1);let E=null;if(f){const e=f.indexOf("/app/");E=e>=0?f.substring(e+1):f}if(Object.keys(I).length>0&&window.PCore.setBehaviorOverrides(I),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===Ph.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),g?.cspNonce&&(window.__webpack_nonce__=g.cspNonce),this.init(e)};launchViewByName=(e,t,n,r,a,s,o,i)=>{HC+=1;const c=i||`mashup${HC}`,d={type:"RootContainer",config:{viewConfig:WC,renderingMode:"view",name:c}};UC.loadRootComponent(e,d,a,s,o).then((()=>UC.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,a,s,o)=>{HC+=1;const i="hybrid"===o?`hybrid_${HC}`:o;HC+=1;const c=i||`mashup${HC}`,d={type:"RootContainer",config:{viewConfig:WC,renderingMode:"portal",name:c}};o===j.HYBRID&&ql.setRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME,c),ql.setRuntimeParams(r),UC.loadRootComponent(e,d,n,a,s).then((()=>UC.updateStoreWithUiRoot(t,c,!1)))};launchPortal=async(e,t,n=`portal${HC+=1}`,r=[])=>{const a={type:"RootContainer",config:{viewConfig:WC,renderingMode:"portal",skeleton:"LoadingComponent",name:n}},s=[...r,a.config.skeleton];Ph.isPortalLoaded=!0;try{return await UC.loadRootComponent(e,a,s),UC.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0)=>{const r={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}UC.loadRootComponent(e,r,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&n(458)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:a,ccLibs:s,isAlternateDesignSystemEnabled:o,alternateDesignSystemName:i}=e;this.initCoreConfig(e);const c=async()=>{await this.importReactRoot();const e=Ph.environmentInfoObject?.pyC11nDXCBDevURL;return e&&await Xi.importCustomComponentMap(""),r&&!e&&await Xi.importCustomComponentMap(r),Ph.environmentInfoObject?.pyInfinityStaticService&&s&&s.length>0&&await Promise.all(s.map((e=>Xi.importCustomComponentMap(e)))),"true"===o&&"other"!==i&&await this.importDesignSystemComponentMap(n,a,i),t&&t(),!0};return new Promise(((e,t)=>{GC().then((async()=>{const t=UC.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await c()):Io.subscribe("component-map-loaded",(async()=>{e(await c())}))})).catch((e=>{t(e)}))}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&(PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess"),PCore.getPubSubUtils().subscribe("fetchFailure",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchFailure"))};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")};#I(e,t,n){ey(e),sc.buildActionTargetMap(t),m(n)}},zC={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=Vf("createViewRuleByID");return Bo(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=Vf("getViewRuleByID",{ID:e});return Bo(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=Vf("updateViewRuleByID",{ID:e});return Bo(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=Vf("deleteViewRuleByID",{ID:e});return Bo(n,{method:r},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:r,reqType:a}=Vf("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return Bo(r,{method:a,body:{calculations:{fields:n}}}).then((e=>e.data))}},YC={"Content-Type":"application/json"},KC={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return Bi("addCaseFollower",{body:a,queryPayload:r,headers:YC},n)},deleteCaseFollower:(e,t,n)=>Bi("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Bi("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},JC={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return Bi("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Bi("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Bi("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},XC="operatorDetails",QC={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=Vf(XC,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Bi(XC,{queryPayload:t})}return t?Bi("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Bi(XC,{body:{dataViewParameters:{ID:e}}})}},ZC="postCustomFeedMessages",e_={"Content-Type":"application/json"};const t_=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,s,o)=>{const i=s.getLocalizationService();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.pageLastEntry"));const l={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:d};for(let e=0;e<a.length;e+=1)a[e].cancel();const u=Hi();return a.push(u),Bi("getFeedMessages",{queryPayload:l,cancelTokenSource:u},s.getContextName()).then((async t=>{if(200===t.status&&t.data){a.pop();const n=[],c={};let d=!1,l=[];if(t?.data){if(l=Array.isArray(t.data.data.MessageTypes)&&t.data.data.MessageTypes.length?t.data.data.MessageTypes:[],t?.data?.data?.FeedList){const e=t.data.data.FeedList?.pxResults;Array.isArray(e)&&e?.length>0&&e.forEach(((e,t)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${t}`,n.push(e.ID),c[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)})),d||["pzPostDetails","pzPrivatePostDetails"].includes(e.pyMessageViewReference)||(d=!0)}))}if(d&&await Au({uiResources:t.data.uiResources}),!r&&(r=[{id:"All",label:i.getLocalizedText("All"),on:!0,disabled:!1}],t?.data?.data?.FeedFilters)){const e=t.data.data.FeedFilters?.pxResults;let n=!0;if(e&&Array.isArray(e)&&e?.length>0){e.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i.getLocalizedText(e.pyLabel),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)}));const t=r.find((e=>"All"===e.id));t&&(t.on=n)}}}if(o&&s.getValue("pulse.messageIDs")){let r=s.getValue("pulse.messageIDs"),a=s.getValue("pulse.messages");r=[...r,...n],a={...a,...c},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:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:l,pulseContext:e}})}else s.updateState({pulse:{messages:c,messageIDs:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:l,pulseContext:e}});const u=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:u}}return s.reportError(`getFeeds call failed ${t.status}`,t.data),""})).catch((e=>{qi(e)||s.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n,r=[],a=!1,s=[])=>{const o={message:t,context:e,parentMessageId:a?e:"",attachments:r,pyRecipients:s.length?s:void 0},i=0===s.length?{body:JSON.stringify(o),headers:e_}:{body:JSON.stringify(o),queryPayload:{type:"PegaSocial-Post-Private"},headers:e_};return Bi(s.length?ZC:"postFeedMessages",i,n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const s=t?.data;if(a){s.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(s,a,n,r.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(s,a,n,r.length>0);return n.updateState({pulse:{messages:o,messageIDs:i}}),c}return n.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",e.response),e.response}))};postCustomMessage=(e,t,n)=>Bi(ZC,{body:t,queryPayload:{type:e},headers:e_},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const r=e.data.data,a={ID:r.ID,pzInsKey:r.ID,classID:r.classID,pyPostType:r.pyPostType,postedByUser:r.postedByUser,pyIsDeleteEnabled:r.pyIsDeleteEnabled,pyMessageViewReference:r.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:r.pyCommentContext,pyPostedOn:r.postedTime,pyFeedTitle:r.postedByUser.name,pyIconReference:r.postedByUser.ID},...r.PostMessage};Cu(r.messageViewReference,n,t.context)||await Au({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[a.ID]:a,...n.getValue("pulse.messages")},messageIDs:[a.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",e.response),e.response}));editMessage=({messageID:e,parentMessageID:t,message:n,pConnectObj:r,isReply:a=!1,recipients:s=[]})=>{const o=JSON.stringify({message:n,...s.length&&{pyRecipients:s}});return Bi("editFeedMessage",{queryPayload:{messageID:e},body:o,headers:e_},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=>{throw r.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,r=!1)=>{const a={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",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||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},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.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,pConnectObj:a})=>{const s=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Bi(s,{body:o,queryPayload:{pulseContext:e},headers:e_},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 occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n);Bi("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 occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Bi("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());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=Hi();return this.mentionsTagsCancelTokenSource.push(i),Bi("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=>{qi(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Bi("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t)=>Bi("getViewRuleByMessageType",{queryPayload:{type:e}},t.getContextName());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=Hi();return this.mentionsTagsCancelTokenSource.push(s),Bi("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=>{qi(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},n_={getTaggedCases:(e,t)=>Bi("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Bi("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return Bi("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Bi("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>Dl.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},r_=(e,t)=>{sh(t.getContextName(),e.etag),oh(t.getContextName(),e.etag)},a_={getParticipants:(e,t)=>Bi("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Bi("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Bi("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Bi("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,r,a)=>{const s={caseID:e},o={...n,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Bi("createParticipant",{body:o,queryPayload:s,headers:i},r.getContextName()).then((t=>{r_(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=bd(a||r.getContextName());r.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},updateParticipant:async(e,t,n,r,a)=>{const s={caseID:e,participantID:t},o={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Bi("updateParticipant",{body:n,queryPayload:s,headers:o},r.getContextName()).then((t=>{r_(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=bd(a||r.getContextName());r.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Bi("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((t=>{r_(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function s_(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const o_="create",i_="update",c_="delete";function d_(e,t,n,r){const a=rg(t);if(a){switch(e){case o_:case i_:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case c_:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const l_={},u_=async e=>{const t=rg(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=s_(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=Vf("getUIListPersonalizations",{listID:e});return Bo(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:s_(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},p_=async(e,t,n)=>{const{restApi:r,reqType:a}=Vf("createListPersonalization",{listID:e});return d_(o_,e,t,n),Bo(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return l_[t]=n,e}))},h_=async(e,t,n)=>{const r=l_[t]||t;d_(i_,e,t,n);const{restApi:a,reqType:s}=Vf("updateListPersonalization",{listID:e,personalizationID:r})||{};return Bo(a,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},g_=async(e,t)=>{const n=l_[t]||t;d_(c_,e,t);const{restApi:r,reqType:a}=Vf("deleteListPersonalization",{listID:e,personalizationID:n});return Bo(r,{method:a,body:{}}).then((e=>(l_[t]&&delete l_[t],e)))};const f_=function(e){return e?{createPersonalization:p_.bind(null,e),updatePersonalization:h_.bind(null,e),deletePersonalization:g_.bind(null,e),fetchPersonalizations:u_.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},y_="getDataObjects",m_="getInsightByID",I_=["LocalList","RemoteList","PromptList","DataPage"];let E_=null;const A_={},C_=e=>Il.getAppCacheKey(`PrimaryFields-${e}`);function __(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 S_={getDataObjects:function(){const e=Il.getAppCacheKey(y_);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(e)}`));const{restApi:t,reqType:n}=Vf(y_,{}),r=Bo(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(E_)return E_;const t=Il.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=Vf("getDataPages",{datapageRequestType:"explorable"});return E_=Bo(n,{method:r,datapageRequestType:"explorable"}),E_.then((e=>{E_=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),E_},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=ng(e);if(t&&t.classID){let e=sg(t.classID);const n=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(n&&!jg.isEmpty(n)){const r=n.reduce(((e,n)=>{const r=Kh(n,t.classID);return e[n]=r,e}),{});e={...e,...r}}if(e&&Object.keys(e).length>0){for(const t of Object.keys(e))e[t].type.startsWith("Page")?delete e[t]:e[t]?.datasource&&I_.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].isUserReference?"User reference":void 0),category:__(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return kl.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=Il.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}=Vf("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=Bo(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=ng(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=Il.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(r)}`));const a=Il.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=Il.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(n)}`));const r=Il.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:a,classesToFetch:s,isTopLevelClassPresent:o,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let a=!1;const s=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=C_(t);window.sessionStorage.getItem(o)||(A_[t]?r.push(A_[t]):(n.push(t),t===e?a=!0:s.push(t)))})),{allClasses:o,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:a,joinedClassesToFetch:s}}(e,n);return s.length&&a.push((async(e,t,n,r)=>{const a=Il.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=C_(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete A_[e]}))}));return e.forEach((e=>{A_[e]=a})),a})(s,o?e:void 0,o?t:void 0,i.length>0?i:void 0)),Promise.allSettled(a).then((()=>{const e={};return r.forEach((t=>{const n=C_(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(`${window.sessionStorage.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=Vf("getInsightIDs");return Bo(e,{method:t})},getInsightByID:function(e){const t=ag(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=Vf(m_,n);return Bo(r,{method:a})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=Vf(m_,t);return Bo(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=Vf("createInsight");return Bo(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=Vf("updateInsight",n);let s;return"UpdateDateTime"in t&&(s=t.UpdateDateTime),Bo(r,{method:a,body:JSON.stringify(t),headers:{"if-match":s,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=Vf("deleteInsight",t);return Bo(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=Vf("exportToExcel");return Bo(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=Vf("exportToCSV");return Bo(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=Vf("scheduleInsight",n);return Bo(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:s}=Vf("updateScheduledInsight",r);return Bo(a,{method:s,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=Vf("deleteScheduledInsight",n);return Bo(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=Vf("translateStrings");return Bo(t,{method:n,body:JSON.stringify(e)})}};const N_=new class{addRoutes=e=>{return t=e,void Oh.addRoutes(t);var t}};const T_=class{static registerModule(e,t,n){n[e]=()=>t}};const b_=class{static getCaseEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)};const O_=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},P_={setTokens:e=>{Yo({tokenInfo:e}),zo(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>Io.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>_o(),getAuthInstance:e=>Co.init(e),setAuthorizationHeader:e=>{zo({Authorization:e}),setTimeout((()=>Io.publish("updateSession",{updateStatus:"success"})),0)}};const D_=new class{getDebouncedSubject(e){return(new _m).pipe(LA(e))}};Li.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="Enter a valid email address"),t})),Li.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),Li.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),Li.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="Enter a valid url"),t})),setTimeout((()=>{const e="Enter a valid phone number";Promise.resolve().then(n.bind(n,866)).then((({parsePhoneNumberFromString:t})=>{Li.register("phone",(n=>{let r=null;n&&!/^\+?\d+$/.test(n)&&(r=e);const a=n?.startsWith("+");if(n&&a){const a=t(n);a&&a.isPossible()&&n===a.number||(r=e)}return r}))}))}),j.PRIORITY.TRIVIAL);const R_=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};Li.register("datetime",(e=>R_("DateTime",e))),Li.register("date",(e=>R_("Date",e))),Li.register("time",(e=>R_("Time",e)));const $_=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};Li.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=$_(e.pxResults):Array.isArray(e)?t=$_(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const v_="createConversation",x_="sendMessage",w_="getConversations",M_="getMessages",L_=(e,t,n,r,a,s,o)=>{for(const e of o)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=Hi();return o.push(i),Bi(e,{queryPayload:w_===e?{assistantID:t,contextID:n,pageSize:r,pageIndex:a}:{agentID:t,contextID:n,pageSize:r,pageIndex:a},cancelTokenSource:i},s).then((e=>(o.pop(),e)))},F_=(e,t,n,r,a)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const s=Hi();return a.push(s),Bi(e,{queryPayload:M_===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n}},r).then((e=>(a.pop(),e)))},j_=(e,t,n,r,a)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const s=Hi();return a.push(s),Bi(e,{body:JSON.stringify({contextID:t}),cancelTokenSource:s,queryPayload:e===v_?{assistantID:n}:{agentID:n}},r).then((e=>(a.pop(),e)))},U_=(e,t,n,r,a,s)=>{const o={...r&&{request:r},...s&&s?.length>0&&{attachments:s}};return Bi(e,{body:JSON.stringify(o),queryPayload:e===x_?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n}},a)},k_={createConversation:(e,t,n,r=[])=>j_(v_,e,t,n,r),sendMessage:(e,t,n,r)=>U_(x_,e,t,n,r),createConversationForAgent:(e,t,n,r=[])=>j_("createConversationForAgent",e,t,n,r),sendMessageForAgent:(e,t,n,r,a)=>U_("sendMessageForAgent",e,t,n,r,a),likeAgentMessage:(e,t,n,r)=>Bi("likeAgentMessage",{queryPayload:{agentID:e,conversationID:t,messageID:n}},r),unLikeAgentMessage:(e,t,n,r,a="")=>{const s={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:a})};return Bi("dislikeAgentMessage",s,r)},getConversations:(e,t,n,r,a,s=[])=>L_(w_,e,t,n,r,a,s),getConversationsForAgent:(e,t,n,r,a,s=[])=>L_("getConversationsForAgent",e,t,n,r,a,s),getMessages:(e,t,n,r=[])=>F_(M_,e,t,n,r),getMessagesForAgent:(e,t,n,r=[])=>F_("getMessagesForAgent",e,t,n,r)};const V_=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=Ph.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class B_{static behaviorOverrides={};getPersonalizationUtils=f_;constructor(){B_.behaviorOverrides={}}getPCoreVersion=()=>"25.1.0";onPCoreReady=e=>UC.onPCoreReady(e);onPCoreCleanup=e=>UC.onPCoreCleanup(e);getComponentsRegistry=()=>UC.getComponentsRegistry();checkIfSemanticURL=()=>UC.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(Qf()){const e=Oh.processUrl(Ah(),!0);return!!Oh._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>N_;getViewResources=()=>i;configureForBrowserBookmark=e=>UC.configureForBrowserBookmark(e);getStore=()=>Cg();resetStore=()=>Mg();getMessageManager=()=>fo;getCoexistenceManager=()=>FC;getStoreValue=(e,t,n)=>bg(e,t,n);getContainerUtils=()=>c;getAnnotationUtils=()=>Yd;getFieldUtils=()=>Qo;getFieldDefaultUtils=()=>Oi;getAssetLoader=()=>Xi;getAttachmentUtils=()=>wi;getViewRuleApi=()=>zC;getFeedUtils=()=>t_;getTagUtils=()=>n_;getGenAIAssistantUtils=()=>k_;getStakeholderUtils=()=>a_;getUserApi=()=>QC;getCaseFollowerApi=()=>KC;getCaseUtils=()=>Dd;getStateUtils=()=>au;getRelatedCasesApi=()=>JC;getDataApi=()=>kl;getDataApiUtils=()=>Il;getAnalyticsUtils=()=>S_;getLocaleUtils=e=>{const t=e??Ph.getLocale()??"en-US";return zh(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{B_.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{B_.behaviorOverrides[e]=t};getBehaviorOverrides=()=>B_.behaviorOverrides;getBehaviorOverride=e=>B_.behaviorOverrides[e];getAsynchronousUtils=()=>D_;createPConnect=e=>$u(e);getPubSubUtils=()=>Io;registerComponentCreator=e=>{vu(e)};getConstants=()=>Object.freeze(F);getResolvedConstantValue=e=>j.getProperty(e);getEvents=()=>b_;getRestClient=()=>o;getMashupApi=()=>jC;getEnvironmentInfo=()=>Ph;getRuntimeParamsAPI=()=>ql;getSemanticUrlUtils=()=>ic;getRemoteCaseUtils=()=>V;getNavigationUtils=()=>tc;registerModule=(e,t)=>T_.registerModule(e,t,this);getErrorHandler=()=>O_;getFormUtils=()=>gd;getMessagingServiceManager=()=>Ol;getMetadataUtils=()=>d;getDataPageUtils=()=>Dl;getDataTypeUtils=()=>zd;getCascadeManager=()=>mg;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>P_;getDebugger=()=>Eo;getDeferLoadManager=()=>yl;getExpressionEngine=()=>r;getActionsSequencer=()=>zl;getRefreshManager=()=>Bl;getInitialiser=()=>qC;getBootstrapUtils=()=>UC;getContextTreeManager=()=>eo;getAccessPrivilege=()=>V_.getInstance();getObjectTransformer=()=>L;getAllStateMachines=(e,t,n)=>t&&n?fd.getAllStateMachines(e,t,n):fd.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>!1;getQualifiedName=(e,t)=>e;getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform")}const G_=new B_;globalThis.PCore=G_})()})();
2
2
  //# sourceMappingURL=constellation-core-react-native.js.map