(function(lo,co){typeof exports=="object"&&typeof module<"u"?co(exports):typeof define=="function"&&define.amd?define(["exports"],co):(lo=typeof globalThis<"u"?globalThis:lo||self,co(lo.ProjectBuilder={}))})(this,function(lo){"use strict";var Jte=Object.defineProperty;var Qte=(lo,co,et)=>co in lo?Jte(lo,co,{enumerable:!0,configurable:!0,writable:!0,value:et}):lo[co]=et;var ei=(lo,co,et)=>(Qte(lo,typeof co!="symbol"?co+"":co,et),et);function co(t,n){for(var e=0;ei[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function et(){}function DI(t,n){for(const e in n)t[e]=n[e];return t}function BI(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function u0(t){return t()}function f0(){return Object.create(null)}function An(t){t.forEach(u0)}function ul(t){return typeof t=="function"}function It(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}let up;function rr(t,n){return up||(up=document.createElement("a")),up.href=n,t===up.href}function UI(t){return Object.keys(t).length===0}function us(t,...n){if(t==null){for(const i of n)i(void 0);return et}const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function fp(t){let n;return us(t,e=>n=e)(),n}function ye(t,n,e){t.$$.on_destroy.push(us(n,e))}function fl(t,n,e,i){if(t){const r=d0(t,n,e,i);return t[0](r)}}function d0(t,n,e,i){return t[1]&&i?DI(e.ctx.slice(),t[1](i(n))):e.ctx}function dl(t,n,e,i){if(t[2]&&i){const r=t[2](i(e));if(n.dirty===void 0)return r;if(typeof r=="object"){const o=[],s=Math.max(n.dirty.length,r.length);for(let l=0;l32){const n=[],e=t.ctx.length/32;for(let i=0;it.removeEventListener(n,e,i)}function Ts(t){return function(n){return n.preventDefault(),t.call(this,n)}}function vc(t){return function(n){return n.stopPropagation(),t.call(this,n)}}function x(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function w(t,n,e){n in t?t[n]=typeof t[n]=="boolean"&&e===""?!0:e:x(t,n,e)}function GI(t){return Array.from(t.childNodes)}function be(t,n){n=""+n,t.data!==n&&(t.data=n)}function wc(t,n){t.value=n??""}function hi(t,n,e,i){e==null?t.style.removeProperty(n):t.style.setProperty(n,e,i?"important":"")}function p0(t,n,e){for(let i=0;i{n[e.slot||"default"]=!0}),n}let jf;function Da(t){jf=t}function ml(){if(!jf)throw new Error("Function called outside component initialization");return jf}function YI(t){ml().$$.before_update.push(t)}function Un(t){ml().$$.on_mount.push(t)}function h1(t){ml().$$.after_update.push(t)}function Kn(t){ml().$$.on_destroy.push(t)}function Mn(){const t=ml();return(n,e,{cancelable:i=!1}={})=>{const r=t.$$.callbacks[n];if(r){const o=WI(n,e,{cancelable:i});return r.slice().forEach(s=>{s.call(t,o)}),!o.defaultPrevented}return!0}}function h0(t,n){return ml().$$.context.set(t,n),n}function m0(t){return ml().$$.context.get(t)}function ko(t,n){const e=t.$$.callbacks[n.type];e&&e.slice().forEach(i=>i.call(this,n))}const uu=[],_t=[];let fu=[];const m1=[],g0=Promise.resolve();let g1=!1;function _0(){g1||(g1=!0,g0.then(pn))}function gl(){return _0(),g0}function pp(t){fu.push(t)}function Tt(t){m1.push(t)}const _1=new Set;let du=0;function pn(){if(du!==0)return;const t=jf;do{try{for(;dut.indexOf(i)===-1?n.push(i):e.push(i)),e.forEach(i=>i()),fu=n}const hp=new Set;let yc;function Je(){yc={r:0,c:[],p:yc}}function Qe(){yc.r||An(yc.c),yc=yc.p}function Q(t,n){t&&t.i&&(hp.delete(t),t.i(n))}function se(t,n,e,i){if(t&&t.o){if(hp.has(t))return;hp.add(t),yc.c.push(()=>{hp.delete(t),i&&(e&&t.d(1),i())}),t.o(n)}else i&&i()}function mp(t,n){const e=n.token={};function i(r,o,s,l){if(n.token!==e)return;n.resolved=l;let a=n.ctx;s!==void 0&&(a=a.slice(),a[s]=l);const c=r&&(n.current=r)(a);let u=!1;n.block&&(n.blocks?n.blocks.forEach((d,f)=>{f!==o&&d&&(Je(),se(d,1,1,()=>{n.blocks[f]===d&&(n.blocks[f]=null)}),Qe())}):n.block.d(1),c.c(),Q(c,1),c.m(n.mount(),n.anchor),u=!0),n.block=c,n.blocks&&(n.blocks[o]=c),u&&pn()}if(BI(t)){const r=ml();if(t.then(o=>{Da(r),i(n.then,1,n.value,o),Da(null)},o=>{if(Da(r),i(n.catch,2,n.error,o),Da(null),!n.hasCatch)throw o}),n.current!==n.pending)return i(n.pending,0),!0}else{if(n.current!==n.then)return i(n.then,1,n.value,t),!0;n.resolved=t}}function b0(t,n,e){const i=n.slice(),{resolved:r}=t;t.current===t.then&&(i[t.value]=r),t.current===t.catch&&(i[t.error]=r),t.block.p(i,e)}function Dt(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Ct(t,n,e){const i=t.$$.props[n];i!==void 0&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function De(t){t&&t.c()}function Me(t,n,e){const{fragment:i,after_update:r}=t.$$;i&&i.m(n,e),pp(()=>{const o=t.$$.on_mount.map(u0).filter(ul);t.$$.on_destroy?t.$$.on_destroy.push(...o):An(o),t.$$.on_mount=[]}),r.forEach(pp)}function qe(t,n){const e=t.$$;e.fragment!==null&&(XI(e.after_update),An(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function KI(t,n){t.$$.dirty[0]===-1&&(uu.push(t),_0(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<{const m=p.length?p[0]:f;return c.ctx&&r(c.ctx[d],c.ctx[d]=m)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](m),u&&KI(t,d)),f}):[],c.update(),u=!0,An(c.before_update),c.fragment=i?i(c.ctx):!1,n.target){if(n.hydrate){const d=GI(n.target);c.fragment&&c.fragment.l(d),d.forEach(K)}else c.fragment&&c.fragment.c();n.intro&&Q(t.$$.fragment),Me(t,n.target,n.anchor),pn()}Da(a)}let v0;typeof HTMLElement=="function"&&(v0=class extends HTMLElement{constructor(n,e,i){super();ei(this,"$$componentCtor");ei(this,"$$slots");ei(this,"$$component");ei(this,"$$connected",!1);ei(this,"$$data",{});ei(this,"$$reflecting",!1);ei(this,"$$props_definition",{});ei(this,"$$listeners",{});ei(this,"$$listener_unsubscribe_fns",new Map);this.$$componentCtor=n,this.$$slots=e,i&&this.attachShadow({mode:"open"})}addEventListener(n,e,i){if(this.$$listeners[n]=this.$$listeners[n]||[],this.$$listeners[n].push(e),this.$$component){const r=this.$$component.$on(n,e);this.$$listener_unsubscribe_fns.set(e,r)}super.addEventListener(n,e,i)}removeEventListener(n,e,i){if(super.removeEventListener(n,e,i),this.$$component){const r=this.$$listener_unsubscribe_fns.get(e);r&&(r(),this.$$listener_unsubscribe_fns.delete(e))}}async connectedCallback(){if(this.$$connected=!0,!this.$$component){let n=function(r){return()=>{let o;return{c:function(){o=document.createElement("slot"),r!=="default"&&o.setAttribute("name",r)},m:function(a,c){J(a,o,c)},d:function(a){a&&K(o)}}}};if(await Promise.resolve(),!this.$$connected)return;const e={},i=VI(this);for(const r of this.$$slots)r in i&&(e[r]=[n(r)]);for(const r of this.attributes){const o=this.$$get_prop_name(r.name);o in this.$$data||(this.$$data[o]=gp(o,r.value,this.$$props_definition,"toProp"))}this.$$component=new this.$$componentCtor({target:this.shadowRoot||this,props:{...this.$$data,$$slots:e,$$scope:{ctx:[]}}});for(const r in this.$$listeners)for(const o of this.$$listeners[r]){const s=this.$$component.$on(r,o);this.$$listener_unsubscribe_fns.set(o,s)}this.$$listeners={}}}attributeChangedCallback(n,e,i){var r;this.$$reflecting||(n=this.$$get_prop_name(n),this.$$data[n]=gp(n,i,this.$$props_definition,"toProp"),(r=this.$$component)==null||r.$set({[n]:this.$$data[n]}))}disconnectedCallback(){this.$$connected=!1,Promise.resolve().then(()=>{this.$$connected||(this.$$component.$destroy(),this.$$component=void 0)})}$$get_prop_name(n){return Object.keys(this.$$props_definition).find(e=>this.$$props_definition[e].attribute===n||!this.$$props_definition[e].attribute&&e.toLowerCase()===n)||n}});function gp(t,n,e,i){var o;const r=(o=e[t])==null?void 0:o.type;if(n=r==="Boolean"&&typeof n!="boolean"?n!=null:n,!i||!e[t])return n;if(i==="toAttribute")switch(r){case"Object":case"Array":return n==null?null:JSON.stringify(n);case"Boolean":return n?"":null;case"Number":return n??null;default:return n}else switch(r){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":return n;case"Number":return n!=null?+n:n;default:return n}}function w0(t,n,e,i,r){const o=class extends v0{constructor(){super(t,e,r),this.$$props_definition=n}static get observedAttributes(){return Object.keys(n).map(s=>(n[s].attribute||s).toLowerCase())}};return Object.keys(n).forEach(s=>{Object.defineProperty(o.prototype,s,{get(){return this.$$component&&s in this.$$component?this.$$component[s]:this.$$data[s]},set(l){var a;if(l=gp(s,l,n),this.$$data[s]=l,(a=this.$$component)==null||a.$set({[s]:l}),n[s].reflect){this.$$reflecting=!0;const c=gp(s,l,n,"toAttribute");c==null?this.removeAttribute(s):this.setAttribute(n[s].attribute||s,c),this.$$reflecting=!1}}})}),i.forEach(s=>{Object.defineProperty(o.prototype,s,{get(){var l;return(l=this.$$component)==null?void 0:l[s]}})}),t.element=o,o}class Ot{constructor(){ei(this,"$$");ei(this,"$$set")}$destroy(){qe(this,1),this.$destroy=et}$on(n,e){if(!ul(e))return et;const i=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return i.push(e),()=>{const r=i.indexOf(e);r!==-1&&i.splice(r,1)}}$set(n){this.$$set&&!UI(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}const JI="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(JI);const pu=[];function QI(t,n){return{subscribe:yt(t,n).subscribe}}function yt(t,n=et){let e;const i=new Set;function r(l){if(It(t,l)&&(t=l,e)){const a=!pu.length;for(const c of i)c[1](),pu.push(c,t);if(a){for(let c=0;c{i.delete(c),i.size===0&&e&&(e(),e=null)}}return{set:r,update:o,subscribe:s}}function hu(t,n,e){const i=!Array.isArray(t),r=i?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=n.length<2;return QI(e,(s,l)=>{let a=!1;const c=[];let u=0,d=et;const f=()=>{if(u)return;d();const m=n(i?c[0]:c,s,l);o?s(m):d=ul(m)?m:et},p=r.map((m,g)=>us(m,h=>{c[g]=h,u&=~(1<{u|=1<{"message"in r&&e(0,i=r.message)},[i]}class MA extends Ot{constructor(n){super(),At(this,n,RA,jA,It,{message:0},LA)}}var si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qA=function(n){return DA(n)&&!BA(n)};function DA(t){return!!t&&typeof t=="object"}function BA(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||FA(t)}var UA=typeof Symbol=="function"&&Symbol.for,zA=UA?Symbol.for("react.element"):60103;function FA(t){return t.$$typeof===zA}function xA(t){return Array.isArray(t)?[]:{}}function Uf(t,n){return n.clone!==!1&&n.isMergeableObject(t)?Cu(xA(t),t,n):t}function GA(t,n,e){return t.concat(n).map(function(i){return Uf(i,e)})}function HA(t,n){if(!n.customMerge)return Cu;var e=n.customMerge(t);return typeof e=="function"?e:Cu}function WA(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}function J0(t){return Object.keys(t).concat(WA(t))}function Q0(t,n){try{return n in t}catch{return!1}}function VA(t,n){return Q0(t,n)&&!(Object.hasOwnProperty.call(t,n)&&Object.propertyIsEnumerable.call(t,n))}function YA(t,n,e){var i={};return e.isMergeableObject(t)&&J0(t).forEach(function(r){i[r]=Uf(t[r],e)}),J0(n).forEach(function(r){VA(t,r)||(Q0(t,r)&&e.isMergeableObject(n[r])?i[r]=HA(r,e)(t[r],n[r],e):i[r]=Uf(n[r],e))}),i}function Cu(t,n,e){e=e||{},e.arrayMerge=e.arrayMerge||GA,e.isMergeableObject=e.isMergeableObject||qA,e.cloneUnlessOtherwiseSpecified=Uf;var i=Array.isArray(n),r=Array.isArray(t),o=i===r;return o?i?e.arrayMerge(t,n,e):YA(t,n,e):Uf(n,e)}Cu.all=function(n,e){if(!Array.isArray(n))throw new Error("first argument should be an array");return n.reduce(function(i,r){return Cu(i,r,e)},{})};var ZA=Cu,XA=ZA;const KA=j1(XA);var R1=function(t,n){return R1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},R1(t,n)};function Np(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");R1(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var Ui=function(){return Ui=Object.assign||function(n){for(var e,i=1,r=arguments.length;i0}),e=[],i=0,r=n;i1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(rO,function(a,c,u,d,f,p){if(c)n.minimumIntegerDigits=u.length;else{if(d&&f)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(ub.test(r.stem)){n.minimumIntegerDigits=r.stem.length;continue}if(lb.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(lb,function(a,c,u,d,f,p){return u==="*"?n.minimumFractionDigits=c.length:d&&d[0]==="#"?n.maximumFractionDigits=d.length:f&&p?(n.minimumFractionDigits=f.length,n.maximumFractionDigits=f.length+p.length):(n.minimumFractionDigits=c.length,n.maximumFractionDigits=c.length),""});var o=r.options[0];o==="w"?n=Ui(Ui({},n),{trailingZeroDisplay:"stripIfInteger"}):o&&(n=Ui(Ui({},n),fb(o)));continue}if(cb.test(r.stem)){n=Ui(Ui({},n),fb(r.stem));continue}var s=db(r.stem);s&&(n=Ui(Ui({},n),s));var l=sO(r.stem);l&&(n=Ui(Ui({},n),l))}return n}var Lp={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function aO(t,n){for(var e="",i=0;i>1),a="a",c=lO(n);for((c=="H"||c=="k")&&(l=0);l-- >0;)e+=a;for(;s-- >0;)e=c+e}else r==="J"?e+="H":e+=r}return e}function lO(t){var n=t.hourCycle;if(n===void 0&&t.hourCycles&&t.hourCycles.length&&(n=t.hourCycles[0]),n)switch(n){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var e=t.language,i;e!=="root"&&(i=t.maximize().region);var r=Lp[i||""]||Lp[e||""]||Lp["".concat(e,"-001")]||Lp["001"];return r[0]}var D1,cO=new RegExp("^".concat(ab.source,"*")),uO=new RegExp("".concat(ab.source,"*$"));function ji(t,n){return{start:t,end:n}}var fO=!!String.prototype.startsWith,dO=!!String.fromCodePoint,pO=!!Object.fromEntries,hO=!!String.prototype.codePointAt,mO=!!String.prototype.trimStart,gO=!!String.prototype.trimEnd,_O=!!Number.isSafeInteger,bO=_O?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},B1=!0;try{var vO=_b("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");B1=((D1=vO.exec("a"))===null||D1===void 0?void 0:D1[0])==="a"}catch{B1=!1}var hb=fO?function(n,e,i){return n.startsWith(e,i)}:function(n,e,i){return n.slice(i,i+e.length)===e},U1=dO?String.fromCodePoint:function(){for(var n=[],e=0;eo;){if(s=n[o++],s>1114111)throw RangeError(s+" is not a valid code point");i+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return i},mb=pO?Object.fromEntries:function(n){for(var e={},i=0,r=n;i=i)){var r=n.charCodeAt(e),o;return r<55296||r>56319||e+1===i||(o=n.charCodeAt(e+1))<56320||o>57343?r:(r-55296<<10)+(o-56320)+65536}},wO=mO?function(n){return n.trimStart()}:function(n){return n.replace(cO,"")},yO=gO?function(n){return n.trimEnd()}:function(n){return n.replace(uO,"")};function _b(t,n){return new RegExp(t,n)}var z1;if(B1){var bb=_b("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");z1=function(n,e){var i;bb.lastIndex=e;var r=bb.exec(n);return(i=r[1])!==null&&i!==void 0?i:""}}else z1=function(n,e){for(var i=[];;){var r=gb(n,e);if(r===void 0||vb(r)||CO(r))break;i.push(r),e+=r>=65536?2:1}return U1.apply(void 0,i)};var kO=function(){function t(n,e){e===void 0&&(e={}),this.message=n,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(n,e,i){for(var r=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(n,i);if(s.err)return s;r.push(s.val)}else{if(o===125&&n>0)break;if(o===35&&(e==="plural"||e==="selectordinal")){var l=this.clonePosition();this.bump(),r.push({type:br.pound,location:ji(l,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(Pi.UNMATCHED_CLOSING_TAG,ji(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&F1(this.peek()||0)){var s=this.parseTag(n,e);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(n,e);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},t.prototype.parseTag=function(n,e){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:br.literal,value:"<".concat(r,"/>"),location:ji(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(n+1,e,!0);if(o.err)return o;var s=o.val,l=this.clonePosition();if(this.bumpIf("")?{val:{type:br.tag,value:r,children:s,location:ji(i,this.clonePosition())},err:null}:this.error(Pi.INVALID_TAG,ji(l,this.clonePosition())))}else return this.error(Pi.UNCLOSED_TAG,ji(i,this.clonePosition()))}else return this.error(Pi.INVALID_TAG,ji(i,this.clonePosition()))},t.prototype.parseTagName=function(){var n=this.offset();for(this.bump();!this.isEOF()&&TO(this.char());)this.bump();return this.message.slice(n,this.offset())},t.prototype.parseLiteral=function(n,e){for(var i=this.clonePosition(),r="";;){var o=this.tryParseQuote(e);if(o){r+=o;continue}var s=this.tryParseUnquoted(n,e);if(s){r+=s;continue}var l=this.tryParseLeftAngleBracket();if(l){r+=l;continue}break}var a=ji(i,this.clonePosition());return{val:{type:br.literal,value:r,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!SO(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(n){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(n==="plural"||n==="selectordinal")break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)e.push(39),this.bump();else{this.bump();break}else e.push(i);this.bump()}return U1.apply(void 0,e)},t.prototype.tryParseUnquoted=function(n,e){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(e==="plural"||e==="selectordinal")||i===125&&n>0?null:(this.bump(),U1(i))},t.prototype.parseArgument=function(n,e){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Pi.EXPECT_ARGUMENT_CLOSING_BRACE,ji(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Pi.EMPTY_ARGUMENT,ji(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Pi.MALFORMED_ARGUMENT,ji(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Pi.EXPECT_ARGUMENT_CLOSING_BRACE,ji(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:br.argument,value:r,location:ji(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Pi.EXPECT_ARGUMENT_CLOSING_BRACE,ji(i,this.clonePosition())):this.parseArgumentOptions(n,e,r,i);default:return this.error(Pi.MALFORMED_ARGUMENT,ji(i,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var n=this.clonePosition(),e=this.offset(),i=z1(this.message,e),r=e+i.length;this.bumpTo(r);var o=this.clonePosition(),s=ji(n,o);return{value:i,location:s}},t.prototype.parseArgumentOptions=function(n,e,i,r){var o,s=this.clonePosition(),l=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(l){case"":return this.error(Pi.EXPECT_ARGUMENT_TYPE,ji(s,a));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var f=yO(d.val);if(f.length===0)return this.error(Pi.EXPECT_ARGUMENT_STYLE,ji(this.clonePosition(),this.clonePosition()));var p=ji(u,this.clonePosition());c={style:f,styleLocation:p}}var m=this.tryParseArgumentClose(r);if(m.err)return m;var g=ji(r,this.clonePosition());if(c&&hb(c==null?void 0:c.style,"::",0)){var h=wO(c.style.slice(2));if(l==="number"){var d=this.parseNumberSkeletonFromString(h,c.styleLocation);return d.err?d:{val:{type:br.number,value:i,location:g,style:d.val},err:null}}else{if(h.length===0)return this.error(Pi.EXPECT_DATE_TIME_SKELETON,g);var _=h;this.locale&&(_=aO(h,this.locale));var f={type:Eu.dateTime,pattern:_,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?eO(_):{}},b=l==="date"?br.date:br.time;return{val:{type:b,value:i,location:g,style:f},err:null}}}return{val:{type:l==="number"?br.number:l==="date"?br.date:br.time,value:i,location:g,style:(o=c==null?void 0:c.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Pi.EXPECT_SELECT_ARGUMENT_OPTIONS,ji(y,Ui({},y)));this.bumpSpace();var k=this.parseIdentifierIfPossible(),T=0;if(l!=="select"&&k.value==="offset"){if(!this.bumpIf(":"))return this.error(Pi.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ji(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(Pi.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Pi.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),k=this.parseIdentifierIfPossible(),T=d.val}var R=this.tryParsePluralOrSelectOptions(n,l,e,k);if(R.err)return R;var m=this.tryParseArgumentClose(r);if(m.err)return m;var O=ji(r,this.clonePosition());return l==="select"?{val:{type:br.select,value:i,options:mb(R.val),location:O},err:null}:{val:{type:br.plural,value:i,options:mb(R.val),offset:T,pluralType:l==="plural"?"cardinal":"ordinal",location:O},err:null}}default:return this.error(Pi.INVALID_ARGUMENT_TYPE,ji(s,a))}},t.prototype.tryParseArgumentClose=function(n){return this.isEOF()||this.char()!==125?this.error(Pi.EXPECT_ARGUMENT_CLOSING_BRACE,ji(n,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var n=0,e=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Pi.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ji(r,this.clonePosition()));this.bump();break}case 123:{n+=1,this.bump();break}case 125:{if(n>0)n-=1;else return{val:this.message.slice(e.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(n,e){var i=[];try{i=nO(n)}catch{return this.error(Pi.INVALID_NUMBER_SKELETON,e)}return{val:{type:Eu.number,tokens:i,location:e,parsedOptions:this.shouldParseSkeletons?oO(i):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(n,e,i,r){for(var o,s=!1,l=[],a=new Set,c=r.value,u=r.location;;){if(c.length===0){var d=this.clonePosition();if(e!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(Pi.EXPECT_PLURAL_ARGUMENT_SELECTOR,Pi.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;u=ji(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(a.has(c))return this.error(e==="select"?Pi.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Pi.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);c==="other"&&(s=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(e==="select"?Pi.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Pi.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ji(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(n+1,e,i);if(m.err)return m;var g=this.tryParseArgumentClose(p);if(g.err)return g;l.push([c,{value:m.val,location:ji(p,this.clonePosition())}]),a.add(c),this.bumpSpace(),o=this.parseIdentifierIfPossible(),c=o.value,u=o.location}return l.length===0?this.error(e==="select"?Pi.EXPECT_SELECT_ARGUMENT_SELECTOR:Pi.EXPECT_PLURAL_ARGUMENT_SELECTOR,ji(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Pi.MISSING_OTHER_CLAUSE,ji(this.clonePosition(),this.clonePosition())):{val:l,err:null}},t.prototype.tryParseDecimalInteger=function(n,e){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var o=!1,s=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)o=!0,s=s*10+(l-48),this.bump();else break}var a=ji(r,this.clonePosition());return o?(s*=i,bO(s)?{val:s,err:null}:this.error(e,a)):this.error(n,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var n=this.position.offset;if(n>=this.message.length)throw Error("out of bound");var e=gb(this.message,n);if(e===void 0)throw Error("Offset ".concat(n," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(n,e){return{val:null,err:{kind:n,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var n=this.char();n===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=n<65536?1:2)}},t.prototype.bumpIf=function(n){if(hb(this.message,n,this.offset())){for(var e=0;e=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(n){if(this.offset()>n)throw Error("targetOffset ".concat(n," must be greater than or equal to the current offset ").concat(this.offset()));for(n=Math.min(n,this.message.length);;){var e=this.offset();if(e===n)break;if(e>n)throw Error("targetOffset ".concat(n," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&vb(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var n=this.char(),e=this.offset(),i=this.message.charCodeAt(e+(n>=65536?2:1));return i??null},t}();function F1(t){return t>=97&&t<=122||t>=65&&t<=90}function SO(t){return F1(t)||t===47}function TO(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function vb(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function CO(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function x1(t){t.forEach(function(n){if(delete n.location,ib(n)||rb(n))for(var e in n.options)delete n.options[e].location,x1(n.options[e].value);else eb(n)&&ob(n.style)||(tb(n)||nb(n))&&q1(n.style)?delete n.style.location:sb(n)&&x1(n.children)})}function EO(t,n){n===void 0&&(n={}),n=Ui({shouldParseSkeletons:!0,requiresOtherClause:!0},n);var e=new kO(t,n).parse();if(e.err){var i=SyntaxError(Pi[e.err.kind]);throw i.location=e.err.location,i.originalMessage=e.err.message,i}return n!=null&&n.captureLocation||x1(e.val),e.val}function G1(t,n){var e=n&&n.cache?n.cache:LO,i=n&&n.serializer?n.serializer:NO,r=n&&n.strategy?n.strategy:AO;return r(t,{cache:e,serializer:i})}function IO(t){return t==null||typeof t=="number"||typeof t=="boolean"}function wb(t,n,e,i){var r=IO(i)?i:e(i),o=n.get(r);return typeof o>"u"&&(o=t.call(this,i),n.set(r,o)),o}function yb(t,n,e){var i=Array.prototype.slice.call(arguments,3),r=e(i),o=n.get(r);return typeof o>"u"&&(o=t.apply(this,i),n.set(r,o)),o}function H1(t,n,e,i,r){return e.bind(n,t,i,r)}function AO(t,n){var e=t.length===1?wb:yb;return H1(t,this,e,n.cache.create(),n.serializer)}function OO(t,n){return H1(t,this,yb,n.cache.create(),n.serializer)}function PO(t,n){return H1(t,this,wb,n.cache.create(),n.serializer)}var NO=function(){return JSON.stringify(arguments)};function W1(){this.cache=Object.create(null)}W1.prototype.get=function(t){return this.cache[t]},W1.prototype.set=function(t,n){this.cache[t]=n};var LO={create:function(){return new W1}},V1={variadic:OO,monadic:PO},Iu;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Iu||(Iu={}));var jp=function(t){Np(n,t);function n(e,i,r){var o=t.call(this,e)||this;return o.code=i,o.originalMessage=r,o}return n.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},n}(Error),kb=function(t){Np(n,t);function n(e,i,r,o){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Iu.INVALID_VALUE,o)||this}return n}(jp),jO=function(t){Np(n,t);function n(e,i,r){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(i),Iu.INVALID_VALUE,r)||this}return n}(jp),RO=function(t){Np(n,t);function n(e,i){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(i,'"'),Iu.MISSING_VALUE,i)||this}return n}(jp),Ms;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Ms||(Ms={}));function MO(t){return t.length<2?t:t.reduce(function(n,e){var i=n[n.length-1];return!i||i.type!==Ms.literal||e.type!==Ms.literal?n.push(e):i.value+=e.value,n},[])}function qO(t){return typeof t=="function"}function Rp(t,n,e,i,r,o,s){if(t.length===1&&$0(t[0]))return[{type:Ms.literal,value:t[0].value}];for(var l=[],a=0,c=t;a0?new Intl.Locale(e[0]):new Intl.Locale(typeof n=="string"?n:n[0])},t.__parse=EO,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}();function zO(t,n){if(n==null)return;if(n in t)return t[n];const e=n.split(".");let i=t;for(let r=0;r0){const o=e.slice(r,e.length).join(".");if(o in i){i=i[o];break}}i=i[e[r]]}else i=void 0;return i}const Tl={},FO=(t,n,e)=>e&&(n in Tl||(Tl[n]={}),t in Tl[n]||(Tl[n][t]=e),e),Tb=(t,n)=>{if(n==null)return;if(n in Tl&&t in Tl[n])return Tl[n][t];const e=Gf(n);for(let i=0;i(e[t]=KA.all([e[t]||{},...n]),e))}hu([zf],([t])=>Object.keys(t)),zf.subscribe(t=>Z1=t);const Mp={};function WO(t,n){Mp[t].delete(n),Mp[t].size===0&&delete Mp[t]}function Ib(t){return Mp[t]}function VO(t){return Gf(t).map(n=>{const e=Ib(n);return[n,e?[...e]:[]]}).filter(([,n])=>n.length>0)}function qp(t){return t==null?!1:Gf(t).some(n=>{var e;return(e=Ib(n))==null?void 0:e.size})}function YO(t,n){return Promise.all(n.map(i=>(WO(t,i),i().then(r=>r.default||r)))).then(i=>Eb(t,...i))}const Ff={};function Ab(t){if(!qp(t))return t in Ff?Ff[t]:Promise.resolve();const n=VO(t);return Ff[t]=Promise.all(n.map(([e,i])=>YO(e,i))).then(()=>{if(qp(t))return Ab(t);delete Ff[t]}),Ff[t]}var Ob=Object.getOwnPropertySymbols,ZO=Object.prototype.hasOwnProperty,XO=Object.prototype.propertyIsEnumerable,KO=(t,n)=>{var e={};for(var i in t)ZO.call(t,i)&&n.indexOf(i)<0&&(e[i]=t[i]);if(t!=null&&Ob)for(var i of Ob(t))n.indexOf(i)<0&&XO.call(t,i)&&(e[i]=t[i]);return e};const JO={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function QO({locale:t,id:n}){console.warn(`[svelte-i18n] The message "${n}" was not found in "${Gf(t).join('", "')}".${qp(Cl())?` Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const xf={fallbackLocale:null,loadingDelay:200,formats:JO,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Au(){return xf}function $O(t){const n=t,{formats:e}=n,i=KO(n,["formats"]);let r=t.fallbackLocale;if(t.initialLocale)try{Sb.resolveLocale(t.initialLocale)&&(r=t.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${t.initialLocale}" is not a valid locale.`)}return i.warnOnMissingMessages&&(delete i.warnOnMissingMessages,i.handleMissingMessage==null?i.handleMissingMessage=QO:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(xf,i,{initialLocale:r}),e&&("number"in e&&Object.assign(xf.formats.number,e.number),"date"in e&&Object.assign(xf.formats.date,e.date),"time"in e&&Object.assign(xf.formats.time,e.time)),Nc.set(r)}const X1=yt(!1);var eP=Object.defineProperty,tP=Object.defineProperties,nP=Object.getOwnPropertyDescriptors,Pb=Object.getOwnPropertySymbols,iP=Object.prototype.hasOwnProperty,rP=Object.prototype.propertyIsEnumerable,Nb=(t,n,e)=>n in t?eP(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,sP=(t,n)=>{for(var e in n||(n={}))iP.call(n,e)&&Nb(t,e,n[e]);if(Pb)for(var e of Pb(n))rP.call(n,e)&&Nb(t,e,n[e]);return t},oP=(t,n)=>tP(t,nP(n));let K1;const Dp=yt(null);function Lb(t){return t.split("-").map((n,e,i)=>i.slice(0,e+1).join("-")).reverse()}function Gf(t,n=Au().fallbackLocale){const e=Lb(t);return n?[...new Set([...e,...Lb(n)])]:e}function Cl(){return K1??void 0}Dp.subscribe(t=>{K1=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const aP=t=>{if(t&&HO(t)&&qp(t)){const{loadingDelay:n}=Au();let e;return typeof window<"u"&&Cl()!=null&&n?e=window.setTimeout(()=>X1.set(!0),n):X1.set(!0),Ab(t).then(()=>{Dp.set(t)}).finally(()=>{clearTimeout(e),X1.set(!1)})}return Dp.set(t)},Nc=oP(sP({},Dp),{set:aP}),Bp=t=>{const n=Object.create(null);return i=>{const r=JSON.stringify(i);return r in n?n[r]:n[r]=t(i)}};var lP=Object.defineProperty,Up=Object.getOwnPropertySymbols,jb=Object.prototype.hasOwnProperty,Rb=Object.prototype.propertyIsEnumerable,Mb=(t,n,e)=>n in t?lP(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,J1=(t,n)=>{for(var e in n||(n={}))jb.call(n,e)&&Mb(t,e,n[e]);if(Up)for(var e of Up(n))Rb.call(n,e)&&Mb(t,e,n[e]);return t},Ou=(t,n)=>{var e={};for(var i in t)jb.call(t,i)&&n.indexOf(i)<0&&(e[i]=t[i]);if(t!=null&&Up)for(var i of Up(t))n.indexOf(i)<0&&Rb.call(t,i)&&(e[i]=t[i]);return e};const Hf=(t,n)=>{const{formats:e}=Au();if(t in e&&n in e[t])return e[t][n];throw new Error(`[svelte-i18n] Unknown "${n}" ${t} format.`)},cP=Bp(t=>{var n=t,{locale:e,format:i}=n,r=Ou(n,["locale","format"]);if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return i&&(r=Hf("number",i)),new Intl.NumberFormat(e,r)}),uP=Bp(t=>{var n=t,{locale:e,format:i}=n,r=Ou(n,["locale","format"]);if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return i?r=Hf("date",i):Object.keys(r).length===0&&(r=Hf("date","short")),new Intl.DateTimeFormat(e,r)}),fP=Bp(t=>{var n=t,{locale:e,format:i}=n,r=Ou(n,["locale","format"]);if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return i?r=Hf("time",i):Object.keys(r).length===0&&(r=Hf("time","short")),new Intl.DateTimeFormat(e,r)}),dP=(t={})=>{var n=t,{locale:e=Cl()}=n,i=Ou(n,["locale"]);return cP(J1({locale:e},i))},pP=(t={})=>{var n=t,{locale:e=Cl()}=n,i=Ou(n,["locale"]);return uP(J1({locale:e},i))},hP=(t={})=>{var n=t,{locale:e=Cl()}=n,i=Ou(n,["locale"]);return fP(J1({locale:e},i))},mP=Bp((t,n=Cl())=>new Sb(t,n,Au().formats,{ignoreTag:Au().ignoreTag})),gP=(t,n={})=>{var e,i,r,o;let s=n;typeof t=="object"&&(s=t,t=s.id);const{values:l,locale:a=Cl(),default:c}=s;if(a==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=Tb(t,a);if(!u)u=(o=(r=(i=(e=Au()).handleMissingMessage)==null?void 0:i.call(e,{locale:a,id:t,defaultValue:c}))!=null?r:c)!=null?o:t;else if(typeof u!="string")return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u;if(!l)return u;let d=u;try{d=mP(u,a).format(l)}catch(f){f instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,f.message)}return d},_P=(t,n)=>hP(n).format(t),bP=(t,n)=>pP(n).format(t),vP=(t,n)=>dP(n).format(t),wP=(t,n=Cl())=>Tb(t,n),Vt=hu([Nc,zf],()=>gP);hu([Nc],()=>_P),hu([Nc],()=>bP),hu([Nc],()=>vP),hu([Nc,zf],()=>wP);const lp=class lp{constructor(n){this.source=n}static enableProductionMode(){lp.level=0}debug(...n){this.log(console.log,4,n)}info(...n){this.log(console.log,3,n)}warn(...n){this.log(console.warn,2,n)}error(...n){this.log(console.error,1,n)}log(n,e,i){if(e<=lp.level){const r=this.source?["["+this.source+"]"].concat(i):i;n.apply(console,r)}}};ei(lp,"level",4);let Q1=lp;const ve=new Q1,vr={BOM:"bom",PROJECT_WORKSPACE:"projectWorkspace",GOTO_PROJECT:"gotoProject",GOTO_LIST:"gotoList",EDIT_PROJECT:"editProject",EDIT_LIST:"editList",CONFIGURATORS:"configurator",CREATE_LIST_EVENT:"createListEvent",EDIT_LIST_EVENT:"editListEvent",ADD_TO_LIST_FROM_UC_CART_PUBLIC:"addToListFromUcCartPublic",ADD_TO_LIST_FROM_UC_CART:"addToListFromUcCart"},El="active_projects",Pu="archive_projects",Wf="shared_projects",zp="submit",yP="Open",qb="Completed",Db="Cancelled",kP="On Hold",SP="In Progress",Lc="All Lists",Vf="archive_lists",Fp="shared_lists",TP="dot-others",CP="dot-completed",EP="dot-cancelled",jc="/projects",Bb="/projects/{id}",IP="/projects/",Ub="edit-project-dialog",xp="clone-project-dialog",Gp="archive-unarchive-project-dialog",Hp="delete-project-dialog",AP="/links/",Wp="/state-change",OP="/check",PP="/analytics",NP="isArchived",LP="isShared",zb="limit",jP="lastEvaluatedKey",RP="lastModifiedDate",Vp=30,MP="description",Nu=350,Yp=3,Zp=1,Fb=11,Yf={projectLoadThreshold:.5,projectListSize:11},qP="List",xb="https://d2osz8slymlqdp.cloudfront.net/assets/images/configurator/product-configurator.jpg",DP="-",Gb="submitCloneEvent",BP=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,UP=/(\.\.)|(\.@)|(@\.)|(\.\.$)/,Ys="Enter",zP="/links/user",FP="/links/add-collabrators",xP="/links/update",Il={CAN_VIEW:"canView",CAN_EDIT:"canEdit",REMOVE:"delete"},Xp="canEditLink",Kp="canViewLink",Zf="yyyy-MM-dd_HH-mm-ss",Hb="supported-countries",GP="?projectId=",Xf="projectId",HP="&platform=",ds="platform",WP="&redirect=true",VP="redirect",Wb="true",YP="&action=",Kf={pb:{dev:"http://localhost:4200/myschneider",qa:"https://www-int.se.com/myschneider",uat:"https://www-sqe.se.com/myschneider",pprod:"https://www-pre.se.com/myschneider",staging:"https://staging-uce.d2b2ks5n72ezlz.amplifyapp.com/myschneider",prod:"https://www.se.com/myschneider"},uc:{dev:"http://localhost:4200/myschneider",qa:"https://www-int.se.com/myschneider",uat:"https://www-sqe.se.com/myschneider",pprod:"https://www-pre.se.com/myschneider",staging:"https://www-pre.se.com/myschneider",prod:"https://www.se.com/myschneider"}},Jf={dev:"https://www-pre.se.com/",qa:"https://www-pre.se.com/",uat:"https://www-pre.se.com/",pprod:"https://www-pre.se.com/",staging:"https://www-pre.se.com/",prod:"https://www.se.com/"},Vb="?getOnlyDetails=",ZP="login",Yb="tab_clicked",$1={bomActivityLog:"activity_log_tab",bomDocumentsTab:"documents_tab"},ur={EXPORT_BOM:"export_bom",BOM_EXPORT_WITH_GROUP:"bom_export_with_group",BOM_EXPORT_WITHOUT_GROUP:"bom_export_without_group",DOWNLOAD_DOCUMENT:"download_document",DOWNLOAD_ZIP_CTA:"download_zip",REDIRECT:"redirect",REDIRECT_LISTIING_PAGE:"redirected_to_listing_page",PRIVATE_PROJECT_CREATED:"private_project_created",PROJECT_LISTING:"project_listing",PROJECT_OVERVIEW:"project_overview",REDIRECT_TO_PROJECT_DETAIL_PAGE:"redirect_to_project_detail_page",CREATE:"create"},za="string",Zb="delete",Xb={en:"Supported-Countries",da:"Underst?ttede lande",de:"Unterstützte L?nder",es:"Países soportados",fi:"Tuetut maat",fr:"Pays pris en charge",id:"Negara-Negara yang Didukung",it:"Paesi supportati",ko:"?? ??",nl:"Ondersteunde landen",no:"St?ttede land",pl:"Obs?ugiwane kraje",pt:"Países Suportados",sv:"L?nder som st?ds",th:"?????????????????",tr:"Desteklenen ülkeler",vi:"Các N??c ???c H? Tr?",zh:"受支援國家",cs:"Podporované země",sk:"Podporované krajiny",sl:"Podprte dr?ave",bg:"Поддържани държави",ro:"Tari acceptate",hu:"Támogatott országok",el:"Υποστηριζ?μενε? χ?ρε?"},yi={PROJECT_BOM:"projectBom",PROJECT_WORKSPACE:"projectWorkspace",CART_PAGE:"goToCart",GOTO_UC_CART:"gotoUCCart",GOTO_UC_CART_PUBLIC:"gotoUCCartPublic",PRODUCT_REF_REPLACE:"PRODUCT_REF_REPLACE",PRODUCT_RANGE_REPLACE:"PRODUCT_RANGE_REPLACE",ADD_TO_QUOTE:"ADD_TO_QUOTE",BOM_ADDED_TO_QUOTE:"bomAddedToQuote",SUBDUED_BUTTON_CLICK:"btnClick",ENABLE_ADD_TO_QUOTE_BTN:"enableAddToQuote",DISABLE_ADD_TO_QUOTE_BTN:"disableAddToQuote",ADD_TO_QUOTE_TRIGGERED:"addToQuoteTriggered",ADD_TO_QUOTE_BOM_DATA:"addToQuoteBomData"},Lu="/projects/",XP="/cart/",KP="/export",JP="?exportByGroup=",QP="/validate",Kb="/products/",$P="/price",eN="/pdp",Jb="/activity",tN="/cpq",nN="?projectId=",ju=`https://dlj4q3m88gw9a.cloudfront.net/${Hb}/sample-template/{locale}/Sample-Template.xlsx`,Ru=`https://d3bkyles6azupp.cloudfront.net/${Hb}/sample-template/{locale}/Sample-Template.xlsx`,iN="{path}{cc}/{lc}/product-substitution/subs-api",rN="public_pb::{path}{cc}/{lc}/work/support/contacts.jsp::https://download.schneider-electric.com::{path}{cc}/{lc}::false::5::true::{path}{cc}/{lc}/product-cart",eg="{path}{cc}/{lc}/product-substitution/subs-api/getProductDetails/?appSource=public_pb&pageNumber=1&itemsPerPage=5&searchProdKey=",Qb=3145728,$b="https://dlj4q3m88gw9a.cloudfront.net/v&a-template/Damper_Template_Global.xlsx",ev="https://d3bkyles6azupp.cloudfront.net/v&a-template/Damper_Template_Global.xlsx",po="bomManagerTab",Wo="bomDocumentsTab",Vo="bomActivityLog",tg="create",Rc="move",Ti="group",ya="subgroup",tv="productRef",sN="serialNum",oN="0",aN="00",Al="object",nv=-1,lN=2,iv=12,rv=32,sv=16,Mu=12,Jp="productSelected",Ol=80,ov="parts",av="groups",Fa="Remove",To="Move",xa="V&A",ps="QUOTE",ng="Download Single",lv="Download Multiple",Mc="Elbridge",cN={FULFILLED:"fulfilled",REJECTED:"rejected"},cv=["PLC_ADD_TO_MY_PROJECT","MCC_ADD_TO_MY_PROJECT","MSIZER_ADD_TO_MY_PROJECT","ADD_TO_PROJECT_BOM"],Qp="ADD_TO_MY_LIST",$p="ADD_TO_MY_CART",eh="IMPORT_FROM_MY_LIST",uv="LIST_IMPORT_SUCCESS",ig="SHOW_CHILDREN",rg="BOM_UPDATE",Pl="Add to cart",Nl="Add to cart message popup",gi="ACTIVE",Ga="NOT_IN_SCOPE",sg="NOT_COMMERCIALIZED_IN_YOUR_COUNTRY",Ha="productRef",Qf="catalogReference",qc="Remove multiple",og="add_to_cart",on="",cn=" ",qu=[],ag="10000",uN="/config",Du="REFERENCE",fv="FUNCTION",Zr="root",dv="v2/reference-data/universal-search/search",pv="v2/reference-data/product/pim-search/search",fN="v3/reference-data/product/pim-product/products-list/search",Bu="https://interface.elbridge2.itek.de/",hv={US:834,FR:835,BR:836,DE:837,GB:838,IT:839,TR:840,ES:841,ZA:842,AU:843,TH:844,CH:846,AT:849,PT:850,EG:851,SG:855,IN:856,BE:857,NL:858,VN:869,IE:877,MY:881,ID:870,TW:871,NO:860,SE:861,DK:862,PL:863,FI:879,KR:872,AR:873,CL:875,PE:876,HU:864,SL:867,BG:868,RO:878,GR:880,PY:1067,UY:1070,CZ:1071,SK:1072,SA:1088},mv="LOCATOR_ACCOUNTS_SELECTED",gv="LOCATOR_GO_BACK",_v="eolStatus",bv="description",lg="price",vv="quantity",cg={ENTITY_TYPE:"entityType",CONFIGURATION_ID:"configurationId",PRODUCT_CODE:"productCode"},wv="https://www.se.com/assets-locator/style37.css",yv="https://www.se.com/ww/en",kv="https://www.se.com/assets-locator/locator-uiaas37.js",dN=["DE"],Sv="GB",Tv="UK",Ll="Locked",Wa="LOCK_BOM_OPTIONS",ug="LOCK_PRIMARY_BUTTON",pN="LOCK_BUTTON",th='script[data-se-widget-plugin="',nh='"]',fg="QuotesCPQ",hN="Y",mN="Active",Uu="action",gN="Draft",_N="Pending",bN="Project Builder",dg="productId",vN="groupId",zu={UC:{public:["FR","BR"],private:["FR","BR"]},PB:["SG","RO"]},Cv={v1:[1,2,3,5]},Ev={v1:!0,v2:!1,v3:{1:!0,2:!1,3:!0,5:!0}},Iv={UC:{public:{FR:{description:Ev.v2,sortOrder:Cv.v1}},private:{FR:{description:Ev.v2,sortOrder:Cv.v1}}}},Av={action:"bom_added_to_quote",subAction:"number_of_products_added_to_CPQ"},Ov="small",wN="pbValue",Pv="https://www.se.com/ww/en/locate/images-gen/local/",ih=" {activity_log.message_product_added_cpq_action} ",jl=10,Nv={feature:{standAloneFlow:{status:!1,feature:["selector","Configurator"]}}},$f="GCR_MTZ",yN="ALTIVAR PROCESS CTO",kN="Altivar",pg="CARTESIAN",ed={APPLICATION_SOURCE:{SELECTOR_AND_CONFIGURATOR:"s&c"},TYPE:"configuration",API_URL:{dev:"https://gw-api-ppr-emea.schneider-electric.com/sc/",qa:"https://gw-api-ppr-emea.schneider-electric.com/sc/",uat:"https://gw-api-ppr-emea.schneider-electric.com/sc/",pprod:"https://gw-api-ppr-emea.schneider-electric.com/sc/",staging:"https://gw-api.schneider-electric.com/sc/",prod:"https://gw-api.schneider-electric.com/sc/"},API_ENDPOINTS:{PERSISTED_CONFIG:"configurations/persisted/",HIVE:"/hive"}},rh={create:"create",modify:"modify"},SN="My Configuration",TN="configurationMasterId",sh={da:"Eksempelskabelon",de:"Muster-Vorlage",en:"Sample-Template",es:"Modelo de plantilla",fi:"Mallimalli",fr:"Modèle d'échantillon",id:"Templat-Sampel",it:"Modello di esempio",ko:"?? ???",nl:"Voorbeeldtemplate",no:"Eksempelmal",pl:"Przyk?adowy szablon",pt:"Amostra-template",sv:"Exempelmall",th:"??????????????",tr:"?rnek ?ablon",vi:"M?u-M?u",zh:"樣例模板",cs:"Vzorek-?ablona",sk:"Vzorová ?ablóna",sl:"Vzor?na predloga",bg:"Образец",ro:"Sablon Esantion",hu:"Mintasablon",el:"Δε?γμα προτ?που"},Lv="CONFIGURATOR_ADD_TO_BOM",CN=["remove_all","download_datasheets","export_list","share","hide_images"],jv={remove_all:"action_delete",download_datasheets:"action_download_stroke",export_list:"action_doc_export_stroke",share:"action_share",hide_images:"body_eye"},EN="00",Rv={CSV:"csv",XLSX:"xlsx",PDF:"pdf",DOCS:"docx",DOC:"doc",XLS:"xls",TXT:"txt",MP4:"mp4",XML:"xml"},IN="copy",Co={CART:"cart",ELBRIDGE:"elbridge",FIND_A_RESELLER:"findReseller"},Dc="false_with_export",an=yt({}),hn=yt(!0),ka=yt(!1),Va=yt(""),Yo=yt(""),qs=yt(0),td=yt([]),Mv=yt([]),hg=yt(0),mg=yt(0),Bc=yt(!1),gg=yt(!1),AN=yt(""),Sa=yt(!1),Ta=yt(!1),Xr=yt(!0),Fu=yt(""),xu=yt(!1),nd=yt({itemFound:null}),oh=yt(""),ah=yt(""),Ji=yt(!1),is=yt(!1),qv=yt(!1),Ya=yt(!1),Dv=yt(!1),lh=yt(!1),Zs=yt({}),ho=yt(!1),Eo=yt(!1),Zo=yt(!1),ti=yt({}),Rl=yt([]),_g=yt({}),Ml=yt(po),Bv=yt([]),Gu=yt({}),Xo=yt(!1),Hu=yt(""),ch=yt(""),bg=yt(""),Wu=yt(""),Vu=yt(""),vg=yt(""),wg=yt(""),wr=yt({}),id=yt([]),Ca=yt(!1),yg=yt([]),Za=yt(!1),kg=yt([]),rd=yt(0),uh=yt([]),Ko=yt(!1),ql=yt(""),Jo=yt(""),Uc=yt(1),fh=yt(!1),Dl=yt(!0);function ON(t){let n;return t.message?n=t.message:typeof t===Tu&&(n=t),{hasError:!0,type:"",message:n,status:500}}function PN(t){t===401&&NN()}function NN(){ve.error("User is not authroized")}async function LN(t){const n={hasError:!0,type:"",message:"",status:500,url:""};if(n.url=t.url,t.ok){const e=await t.json();e.error&&(n.type=e.error.type,n.message=e.error.message)}else{const e=await t.json();let i;try{const r=e;Array.isArray(r.errors)&&(i=r.errors[0])}catch{i.title="",i.message=""}n.type=i.title||t.status.toString(),n.message=i.message||t.statusText}return n.status=t.status,PN(t.status),n}async function dh(t){if(t.message)return ON(t.message);if(t.response)return await LN(t.response)}async function jN(t={}){return t.headers||(t.headers={}),(t.hasContentType||!Object.hasOwn(t,"hasContentType"))&&(t.headers["Content-Type"]="application/json"),t.isBLSAPI||(t.headers.language=We.language,t.headers.country=We.country),t.unsecure||(t.headers.Authorization=`${We.accessToken}`),t.apigeeTokenWithoutBearer&&(t.headers.apigeeToken=t.apigeeTokenWithoutBearer),t.apigeeToken&&(t.headers.authorization=_u+t.apigeeToken),t.timeZone&&(t.headers.timeZone=t.timeZone),t!=null&&t.language&&(t.headers.language=t.language,t.headers.country=t==null?void 0:t.country),t!=null&&t.projectId&&(t.headers.projectid=t.projectId),t!=null&&t.listId&&(t.headers.listid=t.listId),(t!=null&&t.islist||t!=null&&t.listId)&&(t.headers.islist=!0),await RN(t),t}async function RN(t){if(t.apigeeTokenWithoutBearer||t.apigeeToken){const n=await nq(t.apigeeToken??t.apigeeTokenWithoutBearer);return t.apigeeTokenWithoutBearer&&(t.headers.apigeeToken=n),t.apigeeToken&&(t.headers.authorization=_u+n),t}}async function Pn(t,n={}){const e={};n=await jN(n);try{const i=await fetch(t,n);if(i.ok){if(i.headers.get("content-Type")==="application/pdf")return Promise.resolve(i);if(i.headers.get("content-Type")==="text/plain;charset=UTF-8"){const o=await i.text();return Promise.resolve(o)}const r=await i.json();return Promise.resolve(r)}else return e.response=i,dh(e)}catch(i){return e.message=i,dh(e)}}async function Yu(t,n={}){const e={};try{const i=await fetch(t,n);if(i.ok){const r=await i.json(),o={};return r.data?(o.data=r.data,Promise.resolve(o)):Promise.resolve(r)}else return e.response=i,dh(e)}catch(i){return e.message=i,dh(e)}}const Qi={CLOSE_LIST_UPDATE_POPUP_EVENT:"closeListUpdatePopupEvent",CLOSE:"close",MOBILE_ACTION:"mobileAction",MOBILE_ACTION_TO_BOM:"MobileActionToBom",CONFIRM_ACTION:"confirmAction",RESET_MOBILE_ACTION:"resetMobileActions",UPDATE_QUANTITY:"updateQuantity",REMOVE_PRODUCT:"removeProduct",DESTROY_LIST_OPTIONS:"destroyListOptions",SEND_BOM_DATA_TO_CPQ:"sendBomDataToCpq"},Ds="hidden",Kr="unset",ph="Remove all",MN="Download Datasheets",qN="Export List",Uv="Hide Images",zv="Share",Sg="REPLACE_ITEMS",Tg="ADD_TO_EXISTING",Cg="ADD_TO_CART",DN=4,Bl={environment:{lower:"",upper:"https://download.schneider-electric.com/files?"},size:{"1X":"rendition_64_gif","2X":"rendition_113_png","3X":"rendition_369_jpg","4X":"rendition_520_jpg","5X":"rendition_1500_jpg"},docref:"p_Doc_Ref=",fileType:"p_File_Type="},BN="https://d1qlmf1k5jg4ut.cloudfront.net/default-image.png",UN="lower",zN="upper",Ai={SHARE_LIST:{action:"list_shared",subaction:"list_shared_via_email"},EDIT_LIST:{action:"cta_clicked",subaction:"list_edit"},ACTIVITY_TAB:{action:"tab_clicked",subaction:"activity_tab"},DOCUMENT_TAB:{action:"tab_clicked",subaction:"document_tab"},UPLOAD_EXCEL_LIST:{action:"cta_clicked",subaction:"upload_excel_list_page"},HELP_ME_CHOOSE_LIST:{action:"cta_clicked",subaction:"help_me_choose_list_page"},ADD_TO_CART:{action:"add_to_cart",subaction:"add_to_cart_list_page"},CREATE_GROUP:{action:"cta_clicked",subaction:"create_group"},MOVE_TO_GROUP:{action:"cta_clicked",subaction:"move_group"},DOWNLOAD_DATASHEET_LIST:{action:"cta_clicked",subaction:"download_datasheet_list_page"},EXPORT_BOM_WITH_GROUP:{action:"cta_clicked",subaction:"export_list_with_group"},EXPORT_BOM_WITHOUT_GROUP:{action:"cta_clicked",subaction:"export_list_without_group"},UPLOAD_EXCEL_CART:{action:"cta_clicked",subaction:"upload_excel_cart_page"},HELP_ME_CHOOSE_CART:{action:"cta_clicked",subaction:"help_me_choose_cart_page"},SAVE_TO_LIST:{action:"cta_clicked",subaction:"save_to_my_list"},DOWNLOAD_LIST:{action:"cta_clicked",subaction:"download_list"},DOWNLOAD_DATASHEET_CART:{action:"cta_clicked",subaction:"download_datasheet_cart_page"},NEXT_CART:{action:"cta_clicked",subaction:"next_cart_page"},BUYING_OPTION:{action:"buying_option"},REMOVE_ALL:{action:"cta_clicked",subaction:"remove_all_cart_page"},DOWNLOAD_LOCAL:{action:"cta_clicked",subaction:"download_document_in_local"},DOWNLOAD_IN_LIST:{action:"cta_clicked",subaction:"download_document_in_list"}},FN=[{v:"BACKEND.PRODUCT_REFERENCE",t:"s",s:{font:{bold:!0,color:{rgb:"000000"}}},w:{width:20}},{v:"BACKEND.Quantity",t:"s",s:{font:{bold:!0,color:{rgb:"000000"}}},w:{width:15}},{v:"BACKEND.ENTITY_TYPE",t:"s",s:{font:{bold:!0,color:{rgb:"000000"}}},w:{width:20}},{v:"BACKEND.CONFIGURATION_ID",t:"s",s:{font:{bold:!0,color:{rgb:"000000"}}},w:{width:25}},{v:"BACKEND.PRODUCT_CODE",t:"s",s:{font:{bold:!0,color:{rgb:"000000"}}},w:{width:25}},{v:"BACKEND.DESCRIPTION",t:"s",s:{font:{bold:!0,color:{rgb:"000000"}}},w:{width:40}}],Fv="1X",xN="/my-list/",xv=["FR"],zc={API_KEY:"849fcecd-306f-41c0-b423-5670a82d9777",CSI_WTBSOURCE:"se.com",CART_URL:"https://api.channelsight.com/api/1.22/cart",FEED_URL:"https://api.channelsight.com/api/1.12/feed",TRANSFER_API:"https://api.channelsight.com/api/1.22/cart/transfer",MK:"FR",LANG:"fr-FR"},Gv={SUCCESS:"Success",OK:"OK"},GN=1,hh={FRANCE_DISTRIBUTOR:{country:"FR",distrubutorUrl:"https://www.se.com/fr/fr/locate/284-distributeurs-en-france-et-france-d"},BRAZIL_DISTRIBUTOR:{country:"BR",distrubutorUrl:"https://www.se.com/br/pt/locate/360-buscar-distribuidor"}},rs={ADD_TO_CART_SUCCESS:"ADD_TO_CART_SUCCESS",ADD_TO_CART_FAILURE:"ADD_TO_CART_FAILURE",PUBLIC_CART_DATA_TRANSFER:"PUBLIC_CART_DATA_TRANSFER",UPDATE_EYEBROW_CART:"UPDATE_EYEBROW_CART",UPDATE_LIST:"UPDATE_LIST"},Fc="_uc_cart_id",Zu="_uc_list_id",Gr={BUY_SCHNEIDER_ELECTRIC:"schneider_electric",FIND_A_DISTRIBUTOR:"store",DISTRIBUTOR:"distributor",QUOTE:"cpq",DEVIS:"devis"},HN="/config/token",Hv="_uc_list_count",Wv="_uc_cart_count",WN="?platform=",VN="?buyingoption=cpq",YN="?iscart=true",mh=16,ZN="?buyingoption=schneider_electric",XN="buyingoption",KN={local:"https://www-sqe.se.com/$country/$language/pds-list/download-pdf",dev:"https://www-sqe.se.com/$country/$language/pds-list/download-pdf",qa:"https://www-sqe.se.com/$country/$language/pds-list/download-pdf",uat:"https://www-sqe.se.com/$country/$language/pds-list/download-pdf",pprod:"https://www-pre.se.com/$country/$language/pds-list/download-pdf",staging:"https://www-pre.se.com/$country/$language/pds-list/download-pdf",prod:"https://www.se.com/$country/$language/pds-list/download-pdf"},gh={COUNTRY_PARAM:"?country=",LANGUAGE_PARAM:"&language=",PLATFORM_PARAM:"&platform=",LIST_PARAM:"&isList=",CART_PARAM:"&cartId=",FORMAT_SKU:"?format=skuonly"},JN="$country",QN="$language",Vv={local:"https://myschneiderdevis-uat.se.com/authenticate/pan",dev:"https://myschneiderdevis-uat.se.com/authenticate/pan",qa:"https://myschneiderdevis-uat.se.com/authenticate/pan",uat:"https://myschneiderdevis-uat.se.com/authenticate/pan",staging:"https://myschneiderdevis-uat.se.com/authenticate/pan",pprod:"https://myschneiderdevis-uat.se.com/authenticate/pan",prod:"https://myschneiderdevis.se.com/authenticate/pan"},$N="?buyingoption=devis",_h="configurationId",Nn={CTA_CLICK:"cta_click",VIEW_CART:"view_cart",VIEW_ITEM_LIST:"view_item_list",ADD_TO_CART:"add_to_cart",ADD_TO_LIST:"add_to_wishlist",REMOVE_FROM_CART:"remove_from_cart",REMOVE_FROM_LIST:"remove_from_wishlist",FILE_DOWNLOAD:"file_download",SEARCH:"search",GUIDED_SEARCH_CLICK:"guided_search_click"},$i={UCCart:"MyCart",UCList:"MyList",Category:"UnifiedCheckout"},eL={dev:{selectAndConfigBearerToken:"l1JE3V_comxS7laGt2TT0O2GAQhBScUF"},qa:{selectAndConfigBearerToken:"l1JE3V_comxS7laGt2TT0O2GAQhBScUF"},uat:{selectAndConfigBearerToken:"l1JE3V_comxS7laGt2TT0O2GAQhBScUF"},staging:{selectAndConfigBearerToken:"788tGu78hhvwLhBw8mZQeesGEX1MiKlH"},pprod:{selectAndConfigBearerToken:"l1JE3V_comxS7laGt2TT0O2GAQhBScUF"},prod:{selectAndConfigBearerToken:"788tGu78hhvwLhBw8mZQeesGEX1MiKlH"}},tL={local:"Bearer f6e47d61-81e0-4c4e-a5e0-4e7f31b0e2e1",dev:"Bearer f6e47d61-81e0-4c4e-a5e0-4e7f31b0e2e1",qa:"Bearer f6e47d61-81e0-4c4e-a5e0-4e7f31b0e2e1",uat:"Bearer f6e47d61-81e0-4c4e-a5e0-4e7f31b0e2e1",staging:"Bearer 4e1eb58a-ba0b-4c13-8aa4-368d64b99ee5",pprod:"Bearer f6e47d61-81e0-4c4e-a5e0-4e7f31b0e2e1",prod:"Bearer 4e1eb58a-ba0b-4c13-8aa4-368d64b99ee5"},Yv={en:"My List",fr:"Ma liste",br:"Minha Lista",es:"Mi lista",de:"Meine Liste",it:"La mia lista",pt:"Minha lista",ja:"マイリスト",zh:"我的列表",ko:"? ??",ru:"Мой список",vi:"Danh sách c?a t?i",th:"????????????",id:"Daftar Saya",tr:"Listem"};async function Zv(t){const n=We.basePath+Lu+t,e={method:mi.GET,unsecure:!1},i=ar(e);return Pn(n,i)}async function nL(t,n,e=!1){let i=We.basePath+Lu+n;e&&(i=We.basePath+XP+n);const r={method:mi.PUT,unsecure:!1,body:JSON.stringify(t)},o=ar(r);return Pn(i,o)}async function iL(t,n,e,i,r=!1){let o=We.basePath+Lu+n+QP;o=r?o+YN:o;const s={method:mi.POST,unsecure:!1,body:JSON.stringify(t),apigeeTokenWithoutBearer:e,timeZone:i,country:t==null?void 0:t.countryCode.toUpperCase(),language:t.languageCode},l=ar(s);return Pn(o,l)}async function rL(t,n,e){const i=We.basePath+Lu+n+KP+JP+t,r={method:mi.GET,unsecure:!1,timeZone:e},o=ar(r);return Pn(i,o)}async function Eg(t,n,e){const i=`https://${String(We.externalUrls[0])}/${t}`,r={method:mi.POST,unsecure:!0,apigeeToken:e,body:JSON.stringify(n),isBLSAPI:!0};return Pn(i,r)}async function sL(t,n,e,i,r){let o;Ki.subscribe(a=>o=a);const s=We.basePath+Kb+t+eN,l={method:mi.POST,unsecure:!1,body:JSON.stringify(n),apigeeTokenWithoutBearer:e,country:i,language:r,headers:{}};return o==qn&&Yn()&&(l.headers.islist=!0),o==Vn&&Yn()&&(l.headers.isCart=!0),Pn(s,l)}async function oL(t,n,e,i,r){let o;Ki.subscribe(a=>o=a);const s=We.basePath+Kb+t+$P,l={method:mi.POST,unsecure:!1,body:JSON.stringify(n),apigeeTokenWithoutBearer:e,country:i,language:r,headers:{}};return o==Vn&&Yn()&&(l.headers.iscart=!0),o==qn&&Yn()&&(l.headers.islist=!0),Pn(s,l)}async function aL(t,n,e,i){let r=We.basePath+String(Jb)+nN+t;n&&Pm(n)&&(r=r+"&limit="+n),e&&fy(e)&&(r=r+"&lastEvaluatedKey="+e),i&&Pm(i)&&(r=r+"&lastModifiedDate="+i);const o={method:mi.GET,unsecure:!1};return Pn(r,o)}function lL(t){const n=We.basePath+String(Jb),e={method:mi.POST,unsecure:!1,body:JSON.stringify(t)};return Pn(n,e)}function cL(t){const n=We.basePath+t,e={method:mi.GET,unsecure:!1,islist:Yn()};return Pn(n,e)}function uL(t,n){const e=We.basePath+Lu+t,i={method:mi.POST,unsecure:!1,body:JSON.stringify(n)},r=ar(i);return Pn(e,r)}function fL(){const t=We.basePath+mA,n={method:mi.GET,unsecure:!1,islist:Yn()};return Pn(t,n)}function dL(t){const n=We.basePath+Lu+t,e={method:mi.GET,unsecure:!1},i=ar(e);return Pn(n,i)}function pL(t){const n=We.basePath+String(tN),e={method:mi.POST,unsecure:!1,body:JSON.stringify(t)};return Pn(n,e)}function hL(t){const n=t,e={method:mi.GET,unsecure:!0};return Pn(n,e)}function mL(t,n){const e=ed.API_URL[We.environment]+ed.API_ENDPOINTS.PERSISTED_CONFIG+t,i={method:mi.GET,unsecure:!0,isBLSAPI:!0,apigeeToken:n};return Pn(e,i)}function gL(t,n){const e=ed.API_URL[We.environment]+ed.API_ENDPOINTS.PERSISTED_CONFIG+t+ed.API_ENDPOINTS.HIVE,i={method:mi.GET,unsecure:!0,isBLSAPI:!0,apigeeToken:n};return Pn(e,i)}const er={OPTIONS:"OPTIONS",GET:"GET",PATCH:"PATCH",POST:"POST",PUT:"PUT",DELETE:"DELETE"},yr={NAME:"name",URL:"url",DESCRIPTION:"description"},_L={name:"bookmark",icon:"link"},Xu="http://",Ku="https://",bL={zip:"folder",pdf:"action_pdf_report",docx:"file_docx",xlsx:"file_xlsx",csv:"file_csv",doc:"file_docx",xml:"file_xml",txt:"page",mp4:"media_player_playrun",xls:"file_xlsx"},ut={document:"document",folder:"folder",bookmark:"bookmark",ALL:"all"},bh=4e3,Xv="/documents/",Kv="search",Jv="?permission=true",vL="zip",jr="root",ai="#",kr="%23",sd="_blank",Xs=".",Io="/",ft="",Jr=100,_i=25,Ul=700,Ea=50,Qv=4e3,$v=6e3,e2="error",t2="success",n2="warning",Ju="Remove",vh="deleteDocUser",wh="RenameFileandFolder",yh="create",Ks={CREATE:"create",DELETE:"delete",RENAME:"rename",CONSOLIDATE:"consolidate"},od={ZIP:"zip"},xc={ZIP:"application/zip",XML:"application/xml",TXT:"text/plain",XLSX:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},i2={FULFILLED:"fulfilled",REJECTED:"rejected"},Ig="yyyy-MM-dd_HH-mm-ss",kh="Download Single",Sh="Download Multiple",r2="^(https?:\\/\\/|www\\.)([a-z\\d-]+\\.)+[a-z]{2,}(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(#[-a-z\\d_&=]*)?$",wL=/^([a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])(,)?)+$/,Th="refreshSearch",ad="Enter",As="internal",zl="Internal document",Ag="closePopupEvent",yL="action_doc_new",s2="?isFavourite=true",Ch="documentsTable",o2="_blank",a2="CONFLICT",Eh="webkitRelativePath",ld="Content-Type",Qr="All files",Ia="Favorites",kL="fileName",SL="downloadLink",Fl={SCANNING_IN_PROGRESS:"Scanning in progress",VIRUS_FOUND:"Virus found",SUCCESSFULLY_SCANNED:"Successfully Scanned"},Ih=5e3,l2=1e5,Ah={IN_PROGRESS:"-in-progress",COMPLETED:"-completed",CANCELLED:"-cancelled",SMALL_FONT:"pw small-font"},cd="listId",c2="Scheduler_Consolidated",Bs={INITIAL_SPACE:3,MIDDLE_SPACE:3,END_SPACE:3},ud={TOP_ROW_STYLING:{border:{top:{style:"thick"},left:{style:"thick"},right:{style:"thick"}}},MIDDLE_ROW_STYLING:{border:{left:{style:"thick"},right:{style:"thick"}}},BOTTOM_ROW_STYLING:{border:{bottom:{style:"thick"},left:{style:"thick"},right:{style:"thick"}}}},TL=[{KEY1:"Company:",KEY2:"Project Name:",KEY3:"Date:",STYLING:ud.TOP_ROW_STYLING},{KEY1:"",KEY2:"Project Number:",KEY3:"",STYLING:ud.MIDDLE_ROW_STYLING},{KEY1:"Phone:",KEY2:"Owner:",KEY3:"",STYLING:ud.MIDDLE_ROW_STYLING},{KEY1:"Alt. Phone:",KEY2:"Engineer:",KEY3:"Revision:",STYLING:ud.MIDDLE_ROW_STYLING},{KEY1:"Fax:",KEY2:"Contractor:",KEY3:"Approved:",STYLING:ud.BOTTOM_ROW_STYLING}],Oh={1280:{column1:"23%",column2:"10%",column3:"10%",column4:"14%",column5:"10%",column6:"15%",column7:"10%",column8:"8%"},1024:{column1:"270px",column2:"120px",column3:"120px",column4:"140px",column5:"120px",column6:"150px",column7:"120px",column8:"90px"},default:{column1:"340px",column2:"200px",column3:"145px",column4:"145px",column5:"145px",column6:"210px",column7:"145px",column8:"72px"}},Ao=(t,n)=>{var e;for(const i in t)if(i===ov&&(t[_a]&&((e=t[i])!=null&&e.length)&&(t[i][0][vN]=t[_a]),t[i]&&t[i].length>0&&(n=[...n,...t[i]])),i===av&&t[i]&&t[i].length>0)for(const r of t[i])n=Ao(r,n);return n};function CL(t){const{bom:n}=t;let e=[];return e=Ao(n,e),e.length>0?e.map(r=>{var o;if(((o=r==null?void 0:r.parts)==null?void 0:o.length)>0&&(r!=null&&r.isSelected))return r.parts.map(l=>l.productRef||l.productId);if(r.isSelected)return r.productRef||r.productId}).filter(Boolean).flat():[]}function fd(t,n,e=!1){const{bom:i}=t;let r=[];return r=Ao(i,r),r.length>0?(n?r:r.map(s=>{if(s.isSelected||e)return s!=null&&s.parts||(s[TA]=Te),s})).filter(Boolean).flat():[]}function EL(t=[],n=[]){const e=[...t];return n.forEach(i=>{var o,s;const r=e.find(l=>l.name===i.name);r?((o=i==null?void 0:i.parts)==null||o.forEach(l=>{var c,u;const a=r==null?void 0:r.parts.find(d=>d.productRef===l.productRef);a?(a.quantity=(parseInt(a==null?void 0:a.quantity)+parseInt(l==null?void 0:l.quantity)).toString(),((c=a==null?void 0:a.parts)==null?void 0:c.length)>0&&(a.parts=(u=a.parts)==null?void 0:u.map(d=>({...d,quantity:a.quantity})))):r.parts.unshift(l)}),(s=i==null?void 0:i.groups)==null||s.forEach(l=>{var c,u;const a=(c=r.groups)==null?void 0:c.find(d=>d.name===l.name);a?(u=l==null?void 0:l.parts)==null||u.forEach(d=>{var p,m,g;const f=(p=a.parts)==null?void 0:p.find(h=>h.productRef===d.productRef&&(h==null?void 0:h.configurationId)===(d==null?void 0:d.configurationId));f?(f.quantity=(parseInt(f==null?void 0:f.quantity)+parseInt(d==null?void 0:d.quantity)).toString(),((m=f==null?void 0:f.parts)==null?void 0:m.length)>0&&(f.parts=(g=f.parts)==null?void 0:g.map(h=>({...h,quantity:f.quantity})))):a==null||a.parts.unshift(d)}):r==null||r.groups.unshift(l)})):e.unshift(i)}),e}function Xa(t,n,e){return e.forEach(i=>{const r=i==null?void 0:i.configurationId,o=r&&r!==on?_h:i!=null&&i.productRef?t:dg,s=o===_h?_h:t;let l=-1;o===_h?l=n.findIndex(a=>a[s]&&a[s]===i[o]&&a.productCode&&a.productCode===i.productCode):l=n.findIndex(a=>a[s]&&a[s]===i[o]),l!==-1?n[l].quantity=Number(n[l].quantity)+Number(i.quantity):n.push(i)}),n}function IL(t,n,e){return n.forEach(i=>{let r=-1;i.configurationId?r=e.findIndex(o=>o[t]===i[t]&&Number(o.configurationId)==Number(i.configurationId)):r=e.findIndex(o=>o[t]===i[t]),r!==-1?e[r].quantity=Number(e[r].quantity)+Number(i.quantity):e.unshift(i)}),e}const AL=(t,n)=>{const{countryCode:e,languageCode:i}=m_(t,n);return{getProductList:{scope:{brand:bp,country:t},locale:{isoLanguage:i,isoCountry:e},query:{queryItems:[{name:"productComRef",value:on}]},version:5,scopeIndependant:!0,maxResult:100}}},OL=async(t,n,e,i,r)=>{const o=AL(n,e);if(t.length>0){const s=[];return t.forEach(c=>{o.getProductList.query.queryItems[0].value=c,s.push(JM(fN,o,String(i),r))}),(await Promise.allSettled(s)).map(c=>{var u;if(c.status===cN.FULFILLED)return((u=c.value)==null?void 0:u.length)>0?c.value[0]:[]})}},fr=(t,n,e)=>e?new Intl.NumberFormat(`${t}-${n}`,{style:"currency",currency:bu[n==null?void 0:n.toUpperCase()]?bu[n==null?void 0:n.toUpperCase()]:uA}).format(Number(isNaN(e)?0:e)):"";async function PL(t,n,e,i,r,o,s){const l=s?`&platform${kc}${s}`:"";let a=We.basePath+jc+nA+NP+kc+t+l;n&&typeof n===wu.NUMBER&&(a=a+Mf+zb+kc+n.toString()),n&&n===cr&&typeof n===Tu&&(a=a+Mf+LP+kc+n),e&&Pm(e)&&(a=a+Mf+zb+kc+e),o&&(i&&fy(i)&&(a=a+Mf+jP+kc+i),r&&Pm(r)&&(a=a+Mf+RP+kc+r));const c={method:mi.GET,unsecure:!1},u=ar(c);return Pn(a,u)}async function NL(t,n){const e=Bb.replace("{id}",t),i=We.basePath+e,r={method:mi.PATCH,unsecure:!1,body:JSON.stringify({isArchived:n})},o=ar(r);return Pn(i,o)}async function LL(t,n){const e=Bb.replace("{id}",t),i=We.basePath+e,r={method:mi.PATCH,unsecure:!1,body:JSON.stringify({isDeleted:n})},o=ar(r);return Pn(i,o)}function jL(t,n){const e=We.basePath+jc,i={method:mi.POST,unsecure:!1,body:JSON.stringify({country:We.country,persona:We.persona,eabProjectId:t,eabBackUrl:n})},r=ar(i);return Pn(e,r)}function RL(t){const n=We.basePath+jc,e={method:mi.POST,unsecure:!1,body:JSON.stringify({country:We.country,persona:We.persona,name:t.name,description:t.description})},i=ar(e);return Pn(n,i)}async function ML(t,n){const e=We.basePath+jc+mu+n,i={method:mi.PUT,unsecure:!1,body:JSON.stringify(t),language:String(t.language).toLowerCase(),country:String(t.country)},r=ar(i);return Pn(e,r)}async function qL(t,n,e){const i=We.basePath+jc+mu+t,r={method:mi.POST,unsecure:!1,body:JSON.stringify(e?{name:n}:Hi)},o=ar(r);return Pn(i,o)}async function DL(t,n){const e=We.basePath+AP+t+"?businessunit="+n,i={method:mi.GET,unsecure:!1},r=ar(i);return Pn(e,r)}function BL(t){const n=We.basePath+zP,e={method:mi.POST,unsecure:!1,body:JSON.stringify(t)},i=ar(e);return Pn(n,i)}function UL(t){const n=We.basePath+xP,e={method:mi.PATCH,unsecure:!1,body:JSON.stringify(t)},i=ar(e);return Pn(n,i)}function zL(t){const n=We.basePath+FP,e={method:mi.POST,unsecure:!1,body:JSON.stringify(t)},i=ar(e);return Pn(n,i)}async function dr(t){const n=We.basePath+PP,e={method:mi.POST,unsecure:!1,body:JSON.stringify(t)};return Pn(n,e)}async function FL(t){const n=`${We.basePath}${HN}${WN}${t}`,e={method:mi.GET,unsecure:!0,headers:{Authorization:tL[We.environment]}};return await Pn(n,e)}const mn=(t,n,e)=>{var r;let i=(r=n==null?void 0:n.ownerInfo)!=null&&r.country?n.ownerInfo.country:t;return e&&(i=OA[t==null?void 0:t.toUpperCase()]||i),i},gn=(t,n)=>{var i;return(i=n==null?void 0:n.ownerInfo)!=null&&i.language?n.ownerInfo.language:t},xL="buyOptionSelection",dd="/cart/",GL="/cart/state-change/",Js={environment:{lower:"https://download-pp.dev.schneider-electric.com/",upper:"https://download.schneider-electric.com/files?"},size:{"1X":"rendition_64_gif","2X":"rendition_113_png","3X":"rendition_369_jpg","4X":"rendition_520_jpg","5X":"rendition_1500_jpg"},docref:"p_Doc_Ref=",fileType:"p_File_Type="},HL="lower",WL="upper",VL={SONEPARFR:"SoneparFR"},Sr="EXPORT_GROUP",Tr="EXPORT_WITHOUT_GROUP",Qo="SHARE_BOM_VIA_EMAIL",ui="DELETE_BOM",bi="LIST_PRICE",hs="TOTAL_PRICE_BOM",Us="QUANTITY",Ph="PDP_URL",Nh="DOWNLOAD_PRODUCT_DOCUMENT_IN_LOCAL",Lh="DOWNLOAD_PRODUCT_DOCUMENT_IN_PB",Qs="CREATE_GROUP",$s="MOVE_GROUP",jh="SELECT_ALL",Rh="SELECT_GROUP",Gc="SELECT_SINGLE",Mh="THREE_DOT_ICON_GROUP",Qu="THREE_DOT_ICON_PRODUCT",u2="VIEW_PRODUCT",f2="DOWNLOAD_HIVE",qh="REOPEN_SELECTOR",Dh="ARCHIVED_PROJECT_TAB",Bh="SHARED_PROJECT_TAB",xl="THREE_DOT_ICON_PROJECT_LIST",Og="IMPORT_HIVE_FILE",Aa="SUBSTITUTION_TOOL",$u="COMMERCIALIZATION_FIELD",ef="CPQ_SELF_SERVICE_JOURNEY",Gl="CPQ_INTERNAL_JOURNEY",Cr="CREATE_NEW_PROJECT",Uh="CLONE_PROJECT",ms="EDIT_PROJECT",eo="SHARE_PROJECT",d2="TOTAL_PRICE_PROJECT",zh="PROJECT_OWNER_FIELD",Fh="ARCHIVE_PROJECT",xh="END_USER_COMPANY_FIELD",p2="DISTRIBUTOR_LOCATOR",h2="ELBRIDGE",$o="ADD_TO_CART",ea="ACTIVITY_LOG",Hc="DOCUMENT_TAB",Oo="SAVING_BOOKMARK",Po="FILE_UPLOAD",No="FOLDER_UPLOAD",Lo="CREATE_FOLDER",pr="GUIDED_SEARCH",tf="HELP_ME_CHOOSE",to="EXCEL_UPLOAD",Hl="DOWNLOAD_SAMPLE_TEMPLATE",mo="IMPORT_CONFIGURATION",m2="BUY_FROM_SCHNEIDER_ELECTRIC",g2="BUY_FROM_OUR_DISTRIBUTOR",_2="GET_A_QUOTE",b2="DEVIS_QUOTE",v2="FIND_A_DISTRIBUTOR",hr="BOM_MANAGEMENT",w2="QUOTE",ta="PROJECT",Wl="BUYING",y2="TRANSLATION",k2="PROJECT_COLLABORATION",no="DOCUMENT",nf="ADD_PRODUCT",Ae={HIDE:0,SHOW:1,LOCK:2,DISABLED:3};function S2(t){var s;let n=0;const{apiVal:e,isLoggedIn:i,cpqUser:r,availableServices:o}=t;if(!i)n=e==1?2:0;else if(e!==0){const l=(s=r==null?void 0:r.Items)==null?void 0:s.some(c=>c.status===mN&&c.allow_create===hN);((o==null?void 0:o.includes(fg))&&l)===!0&&e==1&&(n=1)}return n}function YL(t){let n=0;const{isStandAlone:e}=t;return e&&zi(t)===1?n=1:n=0,n}function ZL(t){let n=0;const{apiVal:e,isLoggedIn:i,country:r,availableServices:o,showCartIcon:s}=t,l=(o==null?void 0:o.includes(Ip))&&s&&(r==null?void 0:r.toLocaleLowerCase())!==vu.IT||!1;if(i)e!==0&&l===!0&&e==1&&(n=1);else{if(Yn())return l?1:0;n=2}return n}function XL(t){let n=0;const{apiVal:e,isLoggedIn:i,country:r,availableServices:o,isStandAlone:s}=t;return i&&e!==0&&(!(o!=null&&o.includes(Ip))&&r.toLocaleLowerCase()===vu.DE&&!s)===!0&&(n=1),n}function KL(t){let n=0;const{apiVal:e,isLoggedIn:i,country:r,availableServices:o,showCartIcon:s}=t;if(!i)n=2;else if(e!==0){const l=!(o!=null&&o.includes(Ip)&&s),a=!dN.includes(r);l&&a&&e==1&&(n=1)}return n}function zi(t){const{isLoggedIn:n,val:e}=t;return n?e!==void 0?e===2?3:e:1:e!==void 0&&e!==1?e:2}function rf(t){const{isLoggedIn:n}=t;return n?1:0}function zs(t){const{isLoggedIn:n,val:e}=t;return e?n&&e==2?1:e:1}function JL(t){const{isLoggedIn:n,val:e,isStandAlone:i}=t;return n?i==="true"?3:e==2?1:e||1:e||1}function na(t){const{isLoggedIn:n,val:e,isStandAlone:i}=t;return n?i==="true"?3:e==2?1:e||1:e||1}function or(t){const{isStandAlone:n}=t;if(n)return 3}function sf(t={}){const{apiVal:n}=t;return Yn()?1:n}function QL(t={}){const{apiVal:n,isLoggedIn:e}=t;return Yn()?e?1:0:n}function Pg(t,n){const e=Yn(),i=$L(t);return i.includes(n.toUpperCase())?0:1}function $L(t){return Yn()?t?zu.UC.private:zu.UC.public:zu.PB}const Vl={EXPORT_GROUP:{shortName:"EG",getValue:zs,categoryFeatureName:hr,apiPropertyName:"exportBomWithGroups",isStandAloneLogic:t=>or(t)},EXPORT_WITHOUT_GROUP:{shortName:"EWG",getValue:zs,categoryFeatureName:hr,apiPropertyName:"exportBomWithoutGroups",isStandAloneLogic:t=>or(t)},SHARE_BOM_VIA_EMAIL:{shortName:"SBVE",getValue:zi,categoryFeatureName:hr,apiPropertyName:"shareBOMviaEmail",isStandAloneLogic:t=>or(t),overrideBusinessLogic:t=>QL(t)},DELETE_BOM:{shortName:"DB",getValue:zs,categoryFeatureName:hr,apiPropertyName:"removeItemsFromBOM",isStandAloneLogic:t=>or(t)},LIST_PRICE:{shortName:"LP",getValue:t=>{const{country:n,isLoggedIn:e}=t;return Pg(e,n)},categoryFeatureName:hr,apiPropertyName:"priceAPI",overrideBusinessLogic:t=>{const{country:n,isLoggedIn:e}=t;return Pg(e,n)}},TOTAL_PRICE_BOM:{shortName:"TPB",getValue:zs,categoryFeatureName:hr,overrideBusinessLogic:t=>{const{country:n,isLoggedIn:e}=t;return Pg(e,n)}},QUANTITY:{shortName:"QTY",getValue:JL,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},PDP_URL:{shortName:"PDP",getValue:zs,categoryFeatureName:hr},DOWNLOAD_PRODUCT_DOCUMENT_IN_LOCAL:{shortName:"DPDL",getValue:zs,apiPropertyName:"downloadDocumentsInLocal",categoryFeatureName:hr},DOWNLOAD_PRODUCT_DOCUMENT_IN_PB:{shortName:"DPDPB",getValue:zi,categoryFeatureName:hr},SELECT_ALL:{shortName:"SA",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},SELECT_GROUP:{shortName:"SG",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},SELECT_SINGLE:{shortName:"SS",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},THREE_DOT_ICON_GROUP:{shortName:"TDIG",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},THREE_DOT_ICON_PRODUCT:{shortName:"TDIP",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},VIEW_PRODUCT:{shortName:"VP",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},DOWNLOAD_HIVE:{shortName:"DH",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},REOPEN_SELECTOR:{shortName:"RS",getValue:na,categoryFeatureName:hr},SHARED_PROJECT_TAB:{shortName:"SPT",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},ARCHIVED_PROJECT_TAB:{shortName:"APT",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},THREE_DOT_ICON_PROJECT_LIST:{shortName:"TDIPL",getValue:na,categoryFeatureName:hr,isStandAloneLogic:t=>or(t)},CREATE_GROUP:{shortName:"CG",getValue:zi,categoryFeatureName:hr,apiPropertyName:"createGroup",overrideBusinessLogic:t=>sf(t)},MOVE_GROUP:{shortName:"MG",getValue:zi,categoryFeatureName:hr,apiPropertyName:"moveGroup",overrideBusinessLogic:t=>sf(t)},SUBSTITUTION_TOOL:{shortName:"ST",getValue:zi,categoryFeatureName:hr,apiPropertyName:"viewSubsitutes",overrideBusinessLogic:t=>sf(t)},COMMERCIALIZATION_FIELD:{shortName:"CF",getValue:zs,categoryFeatureName:hr},CPQ_SELF_SERVICE_JOURNEY:{shortName:"CPQ_SELF",getValue:zi,categoryFeatureName:w2,apiPropertyName:"cpqEnabled",overrideBusinessLogic:t=>S2(t)},CPQ_INTERNAL_JOURNEY:{shortName:"CPQ_INT",getValue:YL,categoryFeatureName:w2},CREATE_NEW_PROJECT:{shortName:"CNP",getValue:rf,categoryFeatureName:ta,apiPropertyName:"createProject",isStandAloneLogic:t=>or(t)},PROJECT_LIST:{shortName:"PL",getValue:rf,categoryFeatureName:ta},HOME_PAGE:{shortName:"HP",getValue:rf,categoryFeatureName:ta},ARCHIVE_PROJECT:{shortName:"AP",getValue:rf,categoryFeatureName:ta},CLONE_PROJECT:{shortName:"CP",getValue:rf,categoryFeatureName:ta},EDIT_PROJECT:{shortName:"EP",getValue:zs,categoryFeatureName:ta,apiPropertyName:"editProjectDetails",isStandAloneLogic:t=>or(t)},SHARE_PROJECT:{shortName:"SP",getValue:zi,categoryFeatureName:ta,apiPropertyName:"shareProjectThroughSharableLink",isStandAloneLogic:t=>Yn()?zt()?1:0:or(t)},COUNTRY_LIST_SHARE_PROJECT_POPUP:{shortName:"CLS",getValue:zi,categoryFeatureName:ta,apiPropertyName:"shareProjectThroughSharableLink"},TOTAL_PRICE_PROJECT:{shortName:"TPP",getValue:zs,categoryFeatureName:ta},PROJECT_OWNER_FIELD:{shortName:"POF",getValue:zs,categoryFeatureName:ta},END_USER_COMPANY_FIELD:{shortName:"EUCF",getValue:zs,categoryFeatureName:ta},DISTRIBUTOR_LOCATOR:{shortName:"DL",getValue:rf,categoryFeatureName:Wl,apiPropertyName:"findReseller",overrideBusinessLogic:t=>KL(t)},ELBRIDGE:{shortName:"ELB",getValue:zs,categoryFeatureName:Wl,overrideBusinessLogic:t=>XL(t)},ADD_TO_CART:{shortName:"ATC",getValue:zi,categoryFeatureName:Wl,apiPropertyName:"addToCart",overrideBusinessLogic:t=>ZL(t)},SHARE_PERMISSION_BASED_PROJECT_LINK:{shortName:"SP",getValue:zi,categoryFeatureName:k2},ACTIVITY_LOG:{shortName:"AL",getValue:zi,categoryFeatureName:k2,apiPropertyName:"activityLog",isStandAloneLogic:t=>or(t),overrideBusinessLogic:t=>{const{isLoggedIn:n,apiVal:e}=t;return Yn()?n?1:0:e}},MANAGE_TRANSLATIONS_VIA_TMS:{shortName:"MT",getValue:zs,categoryFeatureName:y2},TRANSLATIONS_MODULE:{shortName:"TM",getValue:zs,categoryFeatureName:y2},DOCUMENT_TAB:{shortName:"DT",getValue:zi,apiPropertyName:"documentManagment",categoryFeatureName:no,isStandAloneLogic:t=>or(t),overrideBusinessLogic:t=>{const{isLoggedIn:n,apiVal:e}=t;return Yn()&&n?1:e}},SAVING_BOOKMARK:{shortName:"SB",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},FAVORITES:{shortName:"FAV",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},FILE_UPLOAD:{shortName:"FIU",getValue:zi,categoryFeatureName:no,apiPropertyName:"fileUpload"},FOLDER_UPLOAD:{shortName:"FU",getValue:zi,categoryFeatureName:no,apiPropertyName:"folderUpload"},SHARE_FILES_FOLDER:{shortName:"SFF",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},SET_EXPIRY_DATE:{shortName:"SED",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},SEARCH_FILE:{shortName:"SFI",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},CREATE_FOLDER:{shortName:"CF",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},RENAME_FILE:{shortName:"RFI",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},RENAME_FOLDER:{shortName:"RF",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},ANTIVIRUS_SCANNING:{shortName:"AS",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},DELETE_DOCUMENT:{shortName:"DED",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},DOWNLOAD_DOCUMENT:{shortName:"DOD",getValue:zi,categoryFeatureName:no,apiPropertyName:"documentManagment"},GUIDED_SEARCH:{shortName:"GS",getValue:zs,categoryFeatureName:nf,apiPropertyName:"guidedSearch",isStandAloneLogic:t=>or(t)},HELP_ME_CHOOSE:{shortName:"HMC",getValue:t=>{const{isLoggedIn:n}=t;return n?1:0},categoryFeatureName:nf,apiPropertyName:"addProductsFromHMC",isStandAloneLogic:t=>or(t)},EXCEL_UPLOAD:{shortName:"EU",getValue:zi,categoryFeatureName:nf,apiPropertyName:"excelImport",isStandAloneLogic:t=>or(t),overrideBusinessLogic:t=>sf(t)},DOWNLOAD_SAMPLE_TEMPLATE:{shortName:"DST",getValue:zi,categoryFeatureName:nf,apiPropertyName:"excelImport",isStandAloneLogic:t=>or(t),overrideBusinessLogic:t=>sf(t)},IMPORT_CONFIGURATION:{shortName:"IC",getValue:zi,categoryFeatureName:nf,apiPropertyName:"importConfiguration",isStandAloneLogic:t=>or(t),overrideBusinessLogic:t=>sf(t)},IMPORT_HIVE_FILE:{shortName:"IHF",getValue:zi,categoryFeatureName:nf,isStandAloneLogic:t=>or(t)},BUY_FROM_SCHNEIDER_ELECTRIC:{shortName:"BFSE",getValue:({val:t})=>t,categoryFeatureName:Wl,isStandAloneLogic:()=>0,overrideBusinessLogic:t=>{const{isLoggedIn:n}=t;if(Yn())return n?0:1}},BUY_FROM_OUR_DISTRIBUTOR:{shortName:"BFOD",getValue:({val:t})=>t,categoryFeatureName:Wl,isStandAloneLogic:()=>0,overrideBusinessLogic:t=>{const{country:n}=t;if(Yn())return(n==null?void 0:n.toLowerCase())===vu.FR.toLowerCase()?1:0}},GET_A_QUOTE:{shortName:"GAQ",getValue:({val:t})=>t,apiPropertyName:"cpqEnabled",categoryFeatureName:Wl,isStandAloneLogic:()=>0,overrideBusinessLogic:t=>{const{country:n}=t;return Yn()&&(n==null?void 0:n.toLowerCase())===vu.BR.toLowerCase()?zt()?S2(t)?1:0:1:0}},DEVIS_QUOTE:{shortName:"DAQ",getValue:({val:t})=>t,apiPropertyName:"devisEnabled",categoryFeatureName:Wl,isStandAloneLogic:()=>0,overrideBusinessLogic:t=>{const{country:n}=t;return Yn()&&(n==null?void 0:n.toLowerCase())===vu.FR.toLowerCase()?(zt(),1):0}},FIND_A_DISTRIBUTOR:{shortName:"FAD",getValue:({val:t})=>t,categoryFeatureName:Wl,isStandAloneLogic:()=>0,overrideBusinessLogic:()=>1}},Yl=yt(!1),ki=yt(!1),$r=yt(Li),es=yt(Te),Wi=yt(!1),tr=yt(Te),nr=yt(Te),T2=yt(Li),of=yt(!1),Ka=yt(Te),Gh=yt(Date.now()+Math.random()),Ng=yt(""),C2=yt({}),Lg=yt(""),Er=yt(!0);async function ej(t){const n=We.basePath+dd,e={method:mi.POST,unsecure:!1,body:JSON.stringify(t),credentials:Ic},i=ar(e);return Pn(n,i)}async function tj(t){let n=We.basePath+dd;n=zt()?n:n+t;const e={method:mi.GET,credentials:Ic},i=ar(e);return Pn(n,i)}async function nj(t,n){let e=We.basePath+dd;e=e+t;const i={method:mi.GET,credentials:Ic,unsecure:!0,apigeeToken:n},r=ar(i);return Pn(e,r)}async function ij(t,n,e){let i=We.basePath+dd;i=zt()?i:i+e;const r={method:mi.PATCH,credentials:Ic,unsecure:!1,body:JSON.stringify({partId:t,productCount:n})},o=ar(r);return Pn(i,o)}async function rj(t,n){let e=We.basePath+dd;e=zt()?e:e+n;const i={method:mi.PUT,unsecure:!1,body:JSON.stringify(t),credentials:Ic},r=ar(i);return Pn(e,r)}async function sj(t){let n=KN[We.environment].replace(JN,We.country.toLowerCase()).replace(QN,We.language);n=`${n}${t}`;const e={method:mi.GET,credentials:Ic,hasContentType:!1},i=ar(e);return Pn(n,i)}async function oj(t,n){const e=We.basePath+GL+n,i={method:mi.POST,unsecure:!1,body:JSON.stringify(t),credentials:Ic},r=ar(i);return Pn(e,r)}typeof window<"u"&&(window.dataLayer=window.dataLayer||[]);function Bn(t,n,e,i="",r=!1,o="",s=!1){try{const l=aj(t,n,e,i,r,o,s);if(window.dataLayer)if(t===Nn.VIEW_CART&&window.dataLayer.push({ecommerce:null}),l){const a={event:t,...l};window.dataLayer.push(a)}else ve.info(`No handler for event type: ${t}`);else ve.info(`Data Layer is absent: ${t}`)}catch(l){ve.info(`Error tracking event ${t}:`,l)}}function aj(t,n,e,i,r=!1,o="",s=!1){switch(t){case Nn.CTA_CLICK:{const l=n;return{cta_name:l.cta_name,cta_location:zt()?`${l.cta_location}MySchneider`:`${l.cta_location}SE`,cta_category:l.cta_category||$i.Category,cta_id:l.cta_id||"",cta_link:l.cta_link||""}}case Nn.SEARCH:return n;case Nn.GUIDED_SEARCH_CLICK:return n;case Nn.VIEW_CART:return{ecommerce:lj(n).ecommerce};case Nn.VIEW_ITEM_LIST:{let l;return r?l=uj(n):l=cj(n,e,i,o),l}case Nn.ADD_TO_CART:{const l=Hh(n);return l.ecommerce={...l.ecommerce,...pd(o,s,"add_to_cart_location")},l}case Nn.REMOVE_FROM_CART:{const l=Hh(n);return l.ecommerce={...l.ecommerce,...pd(o,s,"remove_from_cart_location")},l}case Nn.ADD_TO_LIST:{const l=Hh(n);return l.ecommerce={...l.ecommerce,...pd(o,s,"add_to_list_location")},l}case Nn.REMOVE_FROM_LIST:{const l=Hh(n);return l.ecommerce={...l.ecommerce,...pd(o,s,"remove_from_list_location")},l}case Nn.FILE_DOWNLOAD:return fj(n);default:return null}}function lj(t){var i,r;const n=[],e=(i=Do(t==null?void 0:t.bom,n))==null?void 0:i.map(o=>{var s;return{item_id:o!=null&&o.productRef?o==null?void 0:o.productRef:o==null?void 0:o.productId,item_name:o!=null&&o.productRef?o==null?void 0:o.productRef:o==null?void 0:o.productId,quantity:o==null?void 0:o.quantity,price:(s=o==null?void 0:o.price)==null?void 0:s.pbValue}});return{ecommerce:{value:t==null?void 0:t.price,currency:bu[(r=We.country)==null?void 0:r.toUpperCase()],cart_location:zt()?"UnifiedCheckoutMySchneider":"UnifiedCheckoutSE",items:e}}}function cj(t,n,e,i=""){var a;const r=[],o=t!=null&&t.bom?Do(t==null?void 0:t.bom,r):t,s=o==null?void 0:o.map(c=>{var u;return{item_id:c!=null&&c.productRef?c==null?void 0:c.productRef:c==null?void 0:c.productId,item_name:c!=null&&c.productRef?c==null?void 0:c.productRef:c==null?void 0:c.productId,item_list_name:e,item_list_id:e,quantity:c==null?void 0:c.quantity,price:((u=c==null?void 0:c.price)==null?void 0:u.pbValue)||0}}),l={ecommerce:{item_list_name:e,item_list_id:e,item_list_option:n,currency:bu[(a=We.country)==null?void 0:a.toUpperCase()],value_availability:t==null?void 0:t.price,value:(t==null?void 0:t.price)||0,items:s}};return i!==""&&(l.ecommerce={...l.ecommerce,...pd(i,!0,"item_list_location")}),l}function pd(t,n=!1,e){const i=n?`${zt()?"myschneider":"se"}|${t}`:t;return{[e]:i}}function uj(t){var i,r;const n=[],e=(i=Do(t==null?void 0:t.bom,n))==null?void 0:i.map(o=>{var s;return{item_id:o!=null&&o.productRef?o==null?void 0:o.productRef:o==null?void 0:o.productId,item_name:o!=null&&o.productRef?o==null?void 0:o.productRef:o==null?void 0:o.productId,item_list_name:zt()?"mylistunifiedcheckoutmyschneider":"mylistunifiedcheckoutse",item_list_id:zt()?"MyListUnifiedCheckoutMySchneider":"MyListUnifiedCheckoutSE",quantity:o==null?void 0:o.quantity,price:(s=o==null?void 0:o.price)==null?void 0:s.pbValue}});return{ecommerce:{item_list_name:zt()?"mylistunifiedcheckoutmyschneider":"mylistunifiedcheckoutse",item_list_id:zt()?"MyListUnifiedCheckoutMySchneider":"MyListUnifiedCheckoutSE",currency:bu[(r=We.country)==null?void 0:r.toUpperCase()],value_availability:t==null?void 0:t.price,value:t==null?void 0:t.price,items:e}}}function fj(t){var l,a;const n=t==null?void 0:t.url,e=new URL(n),i=e.pathname,r=decodeURIComponent(i.split("/").pop()),o=decodeURIComponent((((l=e.searchParams.get("response-content-disposition"))==null?void 0:l.match(/filename\*?=UTF-8''([^&]+)/))||[])[1]||r.split("_")[0]+".pdf"),s=(a=r.split("_")[1])==null?void 0:a.replace(".pdf","");return{document_name:o,document_id:s,document_type:t.document_type||"pdf",link_url:n,content_group:"pdf",content_type:"pdf"}}function Hh(t){var r;const n=[],e=t!=null&&t.bom?Do(t==null?void 0:t.bom,n):t,i=e==null?void 0:e.map(({productRef:o,productId:s,quantity:l,price:a})=>{const c=o||s;return{item_id:c,item_name:c,quantity:l,price:(a==null?void 0:a.pbValue)||0}});return{ecommerce:{currency:bu[(r=We.country)==null?void 0:r.toUpperCase()],value_availability:(t==null?void 0:t.price)||0,value:(t==null?void 0:t.price)||"",items:i}}}async function E2(t){var n,e,i;try{ki.set(!0);const{createdDate:r,modifiedDate:o,country:s,language:l,bom:a}=t,c={createdDate:r,modifiedDate:o,country:s,language:l,bom:a,isTransferred:!1,productCount:Jc(a)};let u=await ej(c);if(u.hasError){u=u,ki.set(!1);const d=u.message;return tl(rs.ADD_TO_CART_FAILURE,u),ve.error("cart.task :: addCartTask :: ",u.message),{message:d,error:!0}}else return u=u,es.set((n=u==null?void 0:u.data)==null?void 0:n.id),ki.set(!1),Ld(`${s.toLowerCase()}${Fc}`,(e=u==null?void 0:u.data)==null?void 0:e.id),Xg(((i=u==null?void 0:u.data)==null?void 0:i.productCount)||0),tl(rs.ADD_TO_CART_SUCCESS,u),Rd(rs.UPDATE_EYEBROW_CART),ve.info("cart.task :: addCartTask :: ",u.data),{error:!1}}catch(r){return ki.set(!1),ve.error("cart.task :: addCartTask :: ",r),{message:String(r),error:!1}}}async function jo(t){var n;try{ki.set(!0);let e=await tj(t);if(e.hasError){e=e,ki.set(!1);const i=e.message;return ve.error("cart.task :: getCartProducts :: ",e.message),{message:i,error:!0,status:e.status,type:e.type}}else return e=e,es.set((n=e==null?void 0:e.data[0])==null?void 0:n.id),ki.set(!1),gf(e==null?void 0:e.data[0]),ve.info("cart.task :: getCartProducts :: ",$r),{error:!1}}catch(e){return ki.set(!1),ve.error("cart.task :: getCartProducts :: ",e),{message:String(e),error:!1}}}async function dj(t,n){try{ki.set(!0);let e=await nj(t,n);if(!e.hasError)return e=e,e==null?void 0:e.data[0]}catch(e){return ki.set(!1),ve.error("cart.task :: getCartProducts :: ",e),{message:String(e),error:!1}}}async function Wh(t,n,e){var i;try{ki.set(!0);const r=t.map(s=>s.id);let o=await ij(r,e,n);if(o!=null&&o.hasError){o=o,ki.set(!1);const s=o==null?void 0:o.message;return tl(rs.ADD_TO_CART_FAILURE,o),ve.error("Cart.task :: deleteProductTaskFromCart :: ",o==null?void 0:o.message),{message:s,error:!0}}else return o=o,ki.set(!1),Xg(((i=o==null?void 0:o.data)==null?void 0:i.productCount)||0),gf(o==null?void 0:o.data),tl(rs.ADD_TO_CART_SUCCESS,o),Rd(rs.UPDATE_EYEBROW_CART),ve.info("Cart.task :: deleteProductTaskFromCart :: ",o==null?void 0:o.message),{error:!1}}catch(r){return ki.set(!1),ve.error("Cart.task :: deleteProductTaskFromCart :: ",r),{message:String(r),error:!1}}}async function Os(t,n){var e;try{ki.set(!0);const{bom:i}=t,r={bom:i,productCount:Jc(i)};let o=await rj(r,n);if(o.hasError){o=o,ki.set(!1);const s=o.message;return tl(rs.ADD_TO_CART_FAILURE,o),ve.error("cart.task :: replaceProducts :: ",o.message),{message:s,error:!0}}else return o=o,Xg(((e=o==null?void 0:o.data)==null?void 0:e.productCount)||0),gf(o==null?void 0:o.data),ki.set(!1),tl(rs.ADD_TO_CART_SUCCESS,o),Rd(rs.UPDATE_EYEBROW_CART),ve.info("cart.task :: replaceProducts :: ",$r),{error:!1}}catch(i){return ki.set(!1),ve.error("cart.task :: replaceProducts :: ",i),{message:String(i),error:!1}}}async function pj(t){try{ki.set(!0);let n=await sj(t);if(n.hasError)return n=n,ki.set(!1),ve.error("download datasheet ",n),n;{n=n;const e=await n.blob(),i=document.createElement("a");i.href=URL.createObjectURL(e),i.download="My Products PDS.pdf",i.click(),ki.set(!1),ve.info("download datasheet ",n);const r={url:i.href,document_type:"Product Data Sheet"};return Bn("file_download",r),n}}catch(n){return ki.set(!1),ve.error("download datasheet error",n),n}}async function hj(t,n){try{ki.set(!0);let e=await oj(t,n);if(e.hasError){e=e,ki.set(!1);const i=e.message;return ve.error("cart.task :: state change :: ",e.message),{message:i,error:!0}}else return ki.set(!1),{error:!1}}catch(e){return ki.set(!1),ve.error("cart.task :: state change :: ",e),{message:String(e),error:!1}}}async function io(t,n,e,i,r=!0,o=!0,s){try{r&&Jt.update(()=>!0);let l=await PL(t,n,e,i==null?void 0:i.id,i==null?void 0:i.modifiedDate,o,s);if(l.hasError)l=l,Jt.update(()=>!1),ve.error("project.task :: fetchProjects :: ",l.message);else{const a=l==null?void 0:l.attrs;l=l;const c=l.data,u=a==null?void 0:a.LastEvaluatedKey,d=a==null?void 0:a.listCount;if(W0.update(()=>d),o)c.length>0&&(Xi.update(f=>(f=f.concat(c),f)),P1.update(()=>u));else return Xi.update(()=>c),Jt.update(()=>!1),l;Jt.update(()=>!1),ve.info("project.task :: fetchProjects :: ",c)}}catch(l){Jt.update(()=>!1),ve.error("project.task :: fetchProjects :: ",l)}}async function I2(t,n){try{Jt.update(()=>!0);let e=await NL(n,t);if(e.hasError){e=e,Jt.update(()=>!1);const i=e.message;return ve.error("project.task :: changeProjectState :: ",e.message),{message:i,error:!0}}else{e=e;const i=e.data.data;return Xi.update(()=>i),Jt.update(()=>!1),ve.info("project.task :: changeProjectState :: ",Xi),{error:!1}}}catch(e){return Jt.update(()=>!1),ve.error("project.task :: changeProjectState :: ",e),{message:String(e),error:!1}}}async function A2(t,n,e){try{Jt.update(()=>!0);let i=await LL(t,e);if(i.hasError){i=i,Jt.update(()=>!1);const r=i.message;return ve.error("project.task :: deleteProjectTask :: ",i.message),{message:r,error:!0}}else{i=i;const r=i.data.data;return Xi.update(()=>r),Jt.update(()=>!1),ve.info("project.task :: deleteProjectTask :: ",Xi),{error:!1}}}catch(i){return Jt.update(()=>!1),ve.error("project.task :: deleteProjectTask :: ",i),{message:String(i),error:!1}}}async function Vh(t,n){try{Jt.update(()=>!0);let e=await jL(t,n);if(e.hasError)e=e,Jt.update(()=>!1),ve.error("project.task :: create project :: ",e.message);else return e=e,Jt.update(()=>!1),ve.info("project.task :: create project :: ",e.data),an.update(()=>e.data),Promise.resolve(e.data.id)}catch(e){Jt.update(()=>!1),ve.error("project.task :: create project :: ",e)}}async function Yh(t){try{Jt.update(()=>!0);let n=await RL(t);if(n.hasError)n=n,Jt.update(()=>!1),ve.error("list.task :: create list :: ",n.message);else return n=n,Jt.update(()=>!1),Bn("view_item_list",{},"","CartOptionUnifiedCheckoutSE",!0),ve.info("list.task :: create list :: ",n.data),an.update(()=>n.data),Promise.resolve(n.data.id)}catch(n){Jt.update(()=>!1),ve.error("list.task :: create list :: ",n)}}async function Vi(t,n,e,i,r=!0,o=!1){var s,l;try{Rr(!1),Jt.update(()=>!0),t.bom&&(t.bom=ym(t.bom)),_o((s=t==null?void 0:t.bom)==null?void 0:s.groups),(l=t==null?void 0:t.bom)==null||delete l.isSelected,t.name&&(t.name=tn(t==null?void 0:t.name)),t.description&&tn(t==null?void 0:t.description),t&&Yn()&&(t.productCount=Jc(t.bom));let a=await ML(t,n);if(a.hasError){a=a;const c=a.message;Ja(ks(c,i)),Jt.update(()=>!1),ve.error("project.task :: updateProject :: ",a.message)}else{if(hm(),is.update(()=>!1),a=a,a&&a.data&&a.data){a.data=ic(a.data);const c=a.data?a.data:{};s_(c.bom),an.update(()=>c),Yn()&&(Rw(rs.UPDATE_LIST,n),jw())}V0.update(()=>a),o||Jt.update(()=>!1),r&&ia(e),ve.info("project.task :: updateProject :: ",a)}return a}catch(a){Jt.update(()=>!1),ve.error("project.task :: updateProject :: ",a)}}async function O2(t,n,e){try{Jt.update(()=>!0);let i=await qL(t,n,e);if(i.hasError){i=i,Jt.update(()=>!1);const r=i.message;return ve.error("project.task :: cloneProject :: ",i.message),{message:r,error:!1}}else return i=i,V0.update(()=>i),Jt.update(()=>!1),ve.info("project.task :: cloneProject :: ",i),{error:!0}}catch(i){return Jt.update(()=>!1),ve.error("project.task :: cloneProject :: ",i),{message:String(i),error:!1}}}async function P2(t,n,e){try{Rr(!1);let i=await BL(t);i.hasError?(Ja(ks(String(i.message),e)),i=i,ve.error("shareProject.task :: Share Project :: ",i.message)):(ia(n),Rg(i.data.users))}catch(i){Ja(ks(String(i),e)),ve.error("shareProject.task :: Share Project :: ",i)}}async function jg(t,n,e){try{Rr(!1);let i=await UL(t);i.hasError?(Ja(ks(String(i.message),e)),i=i,ve.error("updateUserPermission.task :: Update Permission :: ",i.message)):(ia(n),Rg(i.data.users))}catch(i){Ja(ks(String(i),e)),ve.error("updateUserPermission.task :: Update Permission :: ",i)}}function ia(t){Rr(!0),xo.set(xr),Go.set(t)}function Ja(t){Rr(!0),xo.set(mr),Go.set(t)}function Rr(t){ws.set(t)}async function Zl(t,n){var e;try{let i=await DL(t,n);if(i.hasError)i=i,ve.error("CopyProjectLink.task :: copy project link :: ",i.message);else{i=i;const r=i==null?void 0:i.data;Ho.update(()=>r);const o=(e=i==null?void 0:i.data)==null?void 0:e.users;Rg(o)}}catch(i){ve.error("CopyProjectLink.task :: copy project link :: ",i)}}function Rg(t){const n=fp(Lr);if(n.length&&n.length===t.length){const e=[...t,...n].filter((i=>({email:r})=>!i.has(r)&&i.add(r))(new Set));Lr.update(()=>e)}else Lr.update(()=>t)}async function N2(t){try{let n=await zL(t);n.hasError?(n=n,ve.error("collabratorsAdd.task :: collabrators Add :: ",n.message)):(n=n,N1.update(()=>n==null?void 0:n.data))}catch(n){ve.error("collabratorsAdd.task :: copy collabrators Add :: ",n)}}async function L2(t){let n=await FL(t);if(n.hasError)n=n,ve.error("Clientid error task :: ",n.message);else return n=n,n.data}const j2="custom-configuredReference1",R2="custom-configuredReference2",Mr={APPLICATION_SOURCE:"applicationSource",COST:"cost",COST_DATE:"costDate",CURRENCY:"currency",CUSTOMIZATION:"customization",DESCRIPTION:"description",FREE_TEXT:"freeText",FREEZE_ITEM:"freezeItem",GROUP_ID:"groupId",IS_PARENT:"isParent",NAME:"name",ORDERING_DATA:"orderingData",OVERWRITE_COST:"overwriteCost",OVERWRITE_PRICE:"overwritePrice",PART_TYPE:"partType",PB_VALUE:"pbValue",PRICE:"price",PRICE_DATE:"priceDate",PRODUCT_ID:"productId",RELOAD_DATA:"reloadData",QUANTITY:"quantity",SELECTOR:"selector",SOURCE:"source",SUBPARTS:"subparts",VALUE:"value",BOM_ITEM_LINE_NO:"bomLineItemNo"},Et={COUNTRY_LENGTH_3:3,EMPTY_ARRAY:[],EMPTY_STRING:"",EMPTY_OBJECT:{},NULL:null,ONE:1,DUMMY_ORDERING_ID:"00"},Wc={CART:"cart",DISTRIBUTER:"DISTRIBUTER",ELBRIDGE:"ELBRIDGE",EMAIL:"email",QUOTE:"quote",EASY:"easy",EASY_IN:"EASY_IN",PB:"PB"},M2={ANY:"ANY",DESCRIPTION:"description",QUANTITY:"quantity",DEFAULT_STRING:"default"},Ro={CONFIGURABLE:"configurable",CTO:"cto",CUSTOMIZABLE:"customizable",DEFAULT:"default",NON_CTO:"nonCto",HIVE2:"Hive2"},Vc={CART:"cart",EASY:"easy",EASY_IN:"easyIn",EASY_OUT:"easyOut",PB_BOM:"pbBom",SC:"sc"};var Oe=(t=>(t.ARRAY="array",t.BOOLEAN="boolean",t.NULLABLE="nullable",t.NON_EMPTY="nonempty",t.NUMBER="number",t.OBJECT="object",t.OPTIONAL="optional",t.STRING="string",t.UNION="union",t))(Oe||{});const q2={ALTIVAR_GROUP_NAME:"ALTIVAR PROCESS CTO",CARTESIAN_ROBOTS_GROUP_NAME:"CARTESIAN"},D2=class c0{constructor(n){this.source=n}static enableProductionMode(){c0.level=0}debug(...n){this.log(ni.info,4,n)}info(...n){this.log(ni.info,3,n)}warn(...n){this.log(console.warn,2,n)}error(...n){this.log(console.error,1,n)}log(n,e,i){if(e<=c0.level){const r=this.source?["["+this.source+"]"].concat(i):i;n.apply(console,r)}}};D2.level=4;let mj=D2;const ni=new mj;var Ri;(function(t){t.assertEqual=r=>r;function n(r){}t.assertIs=n;function e(r){throw new Error}t.assertNever=e,t.arrayToEnum=r=>{const o={};for(const s of r)o[s]=s;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(l=>typeof r[r[l]]!="number"),s={};for(const l of o)s[l]=r[l];return t.objectValues(s)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&o.push(s);return o},t.find=(r,o)=>{for(const s of r)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function i(r,o=" | "){return r.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=i,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(Ri||(Ri={}));var Mg;(function(t){t.mergeShapes=(n,e)=>({...n,...e})})(Mg||(Mg={}));const En=Ri.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xl=t=>{switch(typeof t){case"undefined":return En.undefined;case"string":return En.string;case"number":return isNaN(t)?En.nan:En.number;case"boolean":return En.boolean;case"function":return En.function;case"bigint":return En.bigint;case"symbol":return En.symbol;case"object":return Array.isArray(t)?En.array:t===null?En.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?En.promise:typeof Map<"u"&&t instanceof Map?En.map:typeof Set<"u"&&t instanceof Set?En.set:typeof Date<"u"&&t instanceof Date?En.date:En.object;default:return En.unknown}},en=Ri.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gj=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class go extends Error{constructor(n){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const e=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,e):this.__proto__=e,this.name="ZodError",this.issues=n}get errors(){return this.issues}format(n){const e=n||function(o){return o.message},i={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(r);else if(s.code==="invalid_return_type")r(s.returnTypeError);else if(s.code==="invalid_arguments")r(s.argumentsError);else if(s.path.length===0)i._errors.push(e(s));else{let l=i,a=0;for(;ae.message){const e={},i=[];for(const r of this.issues)r.path.length>0?(e[r.path[0]]=e[r.path[0]]||[],e[r.path[0]].push(n(r))):i.push(n(r));return{formErrors:i,fieldErrors:e}}get formErrors(){return this.flatten()}}go.create=t=>new go(t);const af=(t,n)=>{let e;switch(t.code){case en.invalid_type:t.received===En.undefined?e="Required":e=`Expected ${t.expected}, received ${t.received}`;break;case en.invalid_literal:e=`Invalid literal value, expected ${JSON.stringify(t.expected,Ri.jsonStringifyReplacer)}`;break;case en.unrecognized_keys:e=`Unrecognized key(s) in object: ${Ri.joinValues(t.keys,", ")}`;break;case en.invalid_union:e="Invalid input";break;case en.invalid_union_discriminator:e=`Invalid discriminator value. Expected ${Ri.joinValues(t.options)}`;break;case en.invalid_enum_value:e=`Invalid enum value. Expected ${Ri.joinValues(t.options)}, received '${t.received}'`;break;case en.invalid_arguments:e="Invalid function arguments";break;case en.invalid_return_type:e="Invalid function return type";break;case en.invalid_date:e="Invalid date";break;case en.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(e=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(e=`${e} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?e=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?e=`Invalid input: must end with "${t.validation.endsWith}"`:Ri.assertNever(t.validation):t.validation!=="regex"?e=`Invalid ${t.validation}`:e="Invalid";break;case en.too_small:t.type==="array"?e=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?e=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?e=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?e=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:e="Invalid input";break;case en.too_big:t.type==="array"?e=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?e=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?e=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?e=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?e=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:e="Invalid input";break;case en.custom:e="Invalid input";break;case en.invalid_intersection_types:e="Intersection results could not be merged";break;case en.not_multiple_of:e=`Number must be a multiple of ${t.multipleOf}`;break;case en.not_finite:e="Number must be finite";break;default:e=n.defaultError,Ri.assertNever(t)}return{message:e}};let B2=af;function _j(t){B2=t}function Zh(){return B2}const Xh=t=>{const{data:n,path:e,errorMaps:i,issueData:r}=t,o=[...e,...r.path||[]],s={...r,path:o};if(r.message!==void 0)return{...r,path:o,message:r.message};let l="";const a=i.filter(c=>!!c).slice().reverse();for(const c of a)l=c(s,{data:n,defaultError:l}).message;return{...r,path:o,message:l}},bj=[];function wn(t,n){const e=Zh(),i=Xh({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,e,e===af?void 0:af].filter(r=>!!r)});t.common.issues.push(i)}class Ps{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,e){const i=[];for(const r of e){if(r.status==="aborted")return ii;r.status==="dirty"&&n.dirty(),i.push(r.value)}return{status:n.value,value:i}}static async mergeObjectAsync(n,e){const i=[];for(const r of e){const o=await r.key,s=await r.value;i.push({key:o,value:s})}return Ps.mergeObjectSync(n,i)}static mergeObjectSync(n,e){const i={};for(const r of e){const{key:o,value:s}=r;if(o.status==="aborted"||s.status==="aborted")return ii;o.status==="dirty"&&n.dirty(),s.status==="dirty"&&n.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||r.alwaysSet)&&(i[o.value]=s.value)}return{status:n.value,value:i}}}const ii=Object.freeze({status:"aborted"}),Kh=t=>({status:"dirty",value:t}),Fs=t=>({status:"valid",value:t}),qg=t=>t.status==="aborted",Dg=t=>t.status==="dirty",hd=t=>t.status==="valid",md=t=>typeof Promise<"u"&&t instanceof Promise;function Jh(t,n,e,i){if(typeof n=="function"?t!==n||!i:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n.get(t)}function U2(t,n,e,i,r){if(typeof n=="function"?t!==n||!r:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n.set(t,e),e}var xn;(function(t){t.errToObj=n=>typeof n=="string"?{message:n}:n||{},t.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(xn||(xn={}));var gd,_d;class Oa{constructor(n,e,i,r){this._cachedPath=[],this.parent=n,this.data=e,this._path=i,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const z2=(t,n)=>{if(hd(n))return{success:!0,data:n.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const e=new go(t.common.issues);return this._error=e,this._error}}};function fi(t){if(!t)return{};const{errorMap:n,invalid_type_error:e,required_error:i,description:r}=t;if(n&&(e||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:r}:{errorMap:(o,s)=>{var l,a;const{message:c}=t;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(l=c??i)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(a=c??e)!==null&&a!==void 0?a:s.defaultError}},description:r}}class vi{constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(n){return Xl(n.data)}_getOrReturnCtx(n,e){return e||{common:n.parent.common,data:n.data,parsedType:Xl(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new Ps,ctx:{common:n.parent.common,data:n.data,parsedType:Xl(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const e=this._parse(n);if(md(e))throw new Error("Synchronous parse encountered promise.");return e}_parseAsync(n){const e=this._parse(n);return Promise.resolve(e)}parse(n,e){const i=this.safeParse(n,e);if(i.success)return i.data;throw i.error}safeParse(n,e){var i;const r={common:{issues:[],async:(i=e==null?void 0:e.async)!==null&&i!==void 0?i:!1,contextualErrorMap:e==null?void 0:e.errorMap},path:(e==null?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Xl(n)},o=this._parseSync({data:n,path:r.path,parent:r});return z2(r,o)}async parseAsync(n,e){const i=await this.safeParseAsync(n,e);if(i.success)return i.data;throw i.error}async safeParseAsync(n,e){const i={common:{issues:[],contextualErrorMap:e==null?void 0:e.errorMap,async:!0},path:(e==null?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Xl(n)},r=this._parse({data:n,path:i.path,parent:i}),o=await(md(r)?r:Promise.resolve(r));return z2(i,o)}refine(n,e){const i=r=>typeof e=="string"||typeof e>"u"?{message:e}:typeof e=="function"?e(r):e;return this._refinement((r,o)=>{const s=n(r),l=()=>o.addIssue({code:en.custom,...i(r)});return typeof Promise<"u"&&s instanceof Promise?s.then(a=>a?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(n,e){return this._refinement((i,r)=>n(i)?!0:(r.addIssue(typeof e=="function"?e(i,r):e),!1))}_refinement(n){return new oa({schema:this,typeName:Jn.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}optional(){return Na.create(this,this._def)}nullable(){return ec.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return sa.create(this,this._def)}promise(){return ff.create(this,this._def)}or(n){return yd.create([this,n],this._def)}and(n){return kd.create(this,n,this._def)}transform(n){return new oa({...fi(this._def),schema:this,typeName:Jn.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const e=typeof n=="function"?n:()=>n;return new Id({...fi(this._def),innerType:this,defaultValue:e,typeName:Jn.ZodDefault})}brand(){return new zg({typeName:Jn.ZodBranded,type:this,...fi(this._def)})}catch(n){const e=typeof n=="function"?n:()=>n;return new Ad({...fi(this._def),innerType:this,catchValue:e,typeName:Jn.ZodCatch})}describe(n){const e=this.constructor;return new e({...this._def,description:n})}pipe(n){return Od.create(this,n)}readonly(){return Pd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vj=/^c[^\s-]{8,}$/i,wj=/^[0-9a-z]+$/,yj=/^[0-9A-HJKMNP-TV-Z]{26}$/,kj=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Sj=/^[a-z0-9_-]{21}$/i,Tj=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Cj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ej="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Bg;const Ij=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Aj=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Oj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,F2="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Pj=new RegExp(`^${F2}$`);function x2(t){let n="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?n=`${n}\\.\\d{${t.precision}}`:t.precision==null&&(n=`${n}(\\.\\d+)?`),n}function Nj(t){return new RegExp(`^${x2(t)}$`)}function G2(t){let n=`${F2}T${x2(t)}`;const e=[];return e.push(t.local?"Z?":"Z"),t.offset&&e.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${e.join("|")})`,new RegExp(`^${n}$`)}function Lj(t,n){return!!((n==="v4"||!n)&&Ij.test(t)||(n==="v6"||!n)&&Aj.test(t))}class ra extends vi{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==En.string){const r=this._getOrReturnCtx(n);return wn(r,{code:en.invalid_type,expected:En.string,received:r.parsedType}),ii}const e=new Ps;let i;for(const r of this._def.checks)if(r.kind==="min")n.data.lengthr.value&&(i=this._getOrReturnCtx(n,i),wn(i,{code:en.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),e.dirty());else if(r.kind==="length"){const o=n.data.length>r.value,s=n.data.lengthn.test(r),{validation:e,code:en.invalid_string,...xn.errToObj(i)})}_addCheck(n){return new ra({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...xn.errToObj(n)})}url(n){return this._addCheck({kind:"url",...xn.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...xn.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...xn.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...xn.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...xn.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...xn.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...xn.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...xn.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...xn.errToObj(n)})}datetime(n){var e,i;return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(e=n==null?void 0:n.offset)!==null&&e!==void 0?e:!1,local:(i=n==null?void 0:n.local)!==null&&i!==void 0?i:!1,...xn.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...xn.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...xn.errToObj(n)})}regex(n,e){return this._addCheck({kind:"regex",regex:n,...xn.errToObj(e)})}includes(n,e){return this._addCheck({kind:"includes",value:n,position:e==null?void 0:e.position,...xn.errToObj(e==null?void 0:e.message)})}startsWith(n,e){return this._addCheck({kind:"startsWith",value:n,...xn.errToObj(e)})}endsWith(n,e){return this._addCheck({kind:"endsWith",value:n,...xn.errToObj(e)})}min(n,e){return this._addCheck({kind:"min",value:n,...xn.errToObj(e)})}max(n,e){return this._addCheck({kind:"max",value:n,...xn.errToObj(e)})}length(n,e){return this._addCheck({kind:"length",value:n,...xn.errToObj(e)})}nonempty(n){return this.min(1,xn.errToObj(n))}trim(){return new ra({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get minLength(){let n=null;for(const e of this._def.checks)e.kind==="min"&&(n===null||e.value>n)&&(n=e.value);return n}get maxLength(){let n=null;for(const e of this._def.checks)e.kind==="max"&&(n===null||e.value{var n;return new ra({checks:[],typeName:Jn.ZodString,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...fi(t)})};function jj(t,n){const e=(t.toString().split(".")[1]||"").length,i=(n.toString().split(".")[1]||"").length,r=e>i?e:i,o=parseInt(t.toFixed(r).replace(".","")),s=parseInt(n.toFixed(r).replace(".",""));return o%s/Math.pow(10,r)}class Kl extends vi{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==En.number){const r=this._getOrReturnCtx(n);return wn(r,{code:en.invalid_type,expected:En.number,received:r.parsedType}),ii}let e;const i=new Ps;for(const r of this._def.checks)r.kind==="int"?Ri.isInteger(n.data)||(e=this._getOrReturnCtx(n,e),wn(e,{code:en.invalid_type,expected:"integer",received:"float",message:r.message}),i.dirty()):r.kind==="min"?(r.inclusive?n.datar.value:n.data>=r.value)&&(e=this._getOrReturnCtx(n,e),wn(e,{code:en.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind==="multipleOf"?jj(n.data,r.value)!==0&&(e=this._getOrReturnCtx(n,e),wn(e,{code:en.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):r.kind==="finite"?Number.isFinite(n.data)||(e=this._getOrReturnCtx(n,e),wn(e,{code:en.not_finite,message:r.message}),i.dirty()):Ri.assertNever(r);return{status:i.value,value:n.data}}gte(n,e){return this.setLimit("min",n,!0,xn.toString(e))}gt(n,e){return this.setLimit("min",n,!1,xn.toString(e))}lte(n,e){return this.setLimit("max",n,!0,xn.toString(e))}lt(n,e){return this.setLimit("max",n,!1,xn.toString(e))}setLimit(n,e,i,r){return new Kl({...this._def,checks:[...this._def.checks,{kind:n,value:e,inclusive:i,message:xn.toString(r)}]})}_addCheck(n){return new Kl({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:xn.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:xn.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:xn.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:xn.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:xn.toString(n)})}multipleOf(n,e){return this._addCheck({kind:"multipleOf",value:n,message:xn.toString(e)})}finite(n){return this._addCheck({kind:"finite",message:xn.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:xn.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:xn.toString(n)})}get minValue(){let n=null;for(const e of this._def.checks)e.kind==="min"&&(n===null||e.value>n)&&(n=e.value);return n}get maxValue(){let n=null;for(const e of this._def.checks)e.kind==="max"&&(n===null||e.valuen.kind==="int"||n.kind==="multipleOf"&&Ri.isInteger(n.value))}get isFinite(){let n=null,e=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(e===null||i.value>e)&&(e=i.value):i.kind==="max"&&(n===null||i.valuenew Kl({checks:[],typeName:Jn.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...fi(t)});class Jl extends vi{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce&&(n.data=BigInt(n.data)),this._getType(n)!==En.bigint){const r=this._getOrReturnCtx(n);return wn(r,{code:en.invalid_type,expected:En.bigint,received:r.parsedType}),ii}let e;const i=new Ps;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?n.datar.value:n.data>=r.value)&&(e=this._getOrReturnCtx(n,e),wn(e,{code:en.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind==="multipleOf"?n.data%r.value!==BigInt(0)&&(e=this._getOrReturnCtx(n,e),wn(e,{code:en.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):Ri.assertNever(r);return{status:i.value,value:n.data}}gte(n,e){return this.setLimit("min",n,!0,xn.toString(e))}gt(n,e){return this.setLimit("min",n,!1,xn.toString(e))}lte(n,e){return this.setLimit("max",n,!0,xn.toString(e))}lt(n,e){return this.setLimit("max",n,!1,xn.toString(e))}setLimit(n,e,i,r){return new Jl({...this._def,checks:[...this._def.checks,{kind:n,value:e,inclusive:i,message:xn.toString(r)}]})}_addCheck(n){return new Jl({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:xn.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:xn.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:xn.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:xn.toString(n)})}multipleOf(n,e){return this._addCheck({kind:"multipleOf",value:n,message:xn.toString(e)})}get minValue(){let n=null;for(const e of this._def.checks)e.kind==="min"&&(n===null||e.value>n)&&(n=e.value);return n}get maxValue(){let n=null;for(const e of this._def.checks)e.kind==="max"&&(n===null||e.value{var n;return new Jl({checks:[],typeName:Jn.ZodBigInt,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...fi(t)})};class bd extends vi{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==En.boolean){const e=this._getOrReturnCtx(n);return wn(e,{code:en.invalid_type,expected:En.boolean,received:e.parsedType}),ii}return Fs(n.data)}}bd.create=t=>new bd({typeName:Jn.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...fi(t)});class Yc extends vi{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==En.date){const r=this._getOrReturnCtx(n);return wn(r,{code:en.invalid_type,expected:En.date,received:r.parsedType}),ii}if(isNaN(n.data.getTime())){const r=this._getOrReturnCtx(n);return wn(r,{code:en.invalid_date}),ii}const e=new Ps;let i;for(const r of this._def.checks)r.kind==="min"?n.data.getTime()r.value&&(i=this._getOrReturnCtx(n,i),wn(i,{code:en.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),e.dirty()):Ri.assertNever(r);return{status:e.value,value:new Date(n.data.getTime())}}_addCheck(n){return new Yc({...this._def,checks:[...this._def.checks,n]})}min(n,e){return this._addCheck({kind:"min",value:n.getTime(),message:xn.toString(e)})}max(n,e){return this._addCheck({kind:"max",value:n.getTime(),message:xn.toString(e)})}get minDate(){let n=null;for(const e of this._def.checks)e.kind==="min"&&(n===null||e.value>n)&&(n=e.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const e of this._def.checks)e.kind==="max"&&(n===null||e.valuenew Yc({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Jn.ZodDate,...fi(t)});class Qh extends vi{_parse(n){if(this._getType(n)!==En.symbol){const e=this._getOrReturnCtx(n);return wn(e,{code:en.invalid_type,expected:En.symbol,received:e.parsedType}),ii}return Fs(n.data)}}Qh.create=t=>new Qh({typeName:Jn.ZodSymbol,...fi(t)});class vd extends vi{_parse(n){if(this._getType(n)!==En.undefined){const e=this._getOrReturnCtx(n);return wn(e,{code:en.invalid_type,expected:En.undefined,received:e.parsedType}),ii}return Fs(n.data)}}vd.create=t=>new vd({typeName:Jn.ZodUndefined,...fi(t)});class wd extends vi{_parse(n){if(this._getType(n)!==En.null){const e=this._getOrReturnCtx(n);return wn(e,{code:en.invalid_type,expected:En.null,received:e.parsedType}),ii}return Fs(n.data)}}wd.create=t=>new wd({typeName:Jn.ZodNull,...fi(t)});class lf extends vi{constructor(){super(...arguments),this._any=!0}_parse(n){return Fs(n.data)}}lf.create=t=>new lf({typeName:Jn.ZodAny,...fi(t)});class Zc extends vi{constructor(){super(...arguments),this._unknown=!0}_parse(n){return Fs(n.data)}}Zc.create=t=>new Zc({typeName:Jn.ZodUnknown,...fi(t)});class Qa extends vi{_parse(n){const e=this._getOrReturnCtx(n);return wn(e,{code:en.invalid_type,expected:En.never,received:e.parsedType}),ii}}Qa.create=t=>new Qa({typeName:Jn.ZodNever,...fi(t)});class $h extends vi{_parse(n){if(this._getType(n)!==En.undefined){const e=this._getOrReturnCtx(n);return wn(e,{code:en.invalid_type,expected:En.void,received:e.parsedType}),ii}return Fs(n.data)}}$h.create=t=>new $h({typeName:Jn.ZodVoid,...fi(t)});class sa extends vi{_parse(n){const{ctx:e,status:i}=this._processInputParams(n),r=this._def;if(e.parsedType!==En.array)return wn(e,{code:en.invalid_type,expected:En.array,received:e.parsedType}),ii;if(r.exactLength!==null){const s=e.data.length>r.exactLength.value,l=e.data.lengthr.maxLength.value&&(wn(e,{code:en.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),e.common.async)return Promise.all([...e.data].map((s,l)=>r.type._parseAsync(new Oa(e,s,e.path,l)))).then(s=>Ps.mergeArray(i,s));const o=[...e.data].map((s,l)=>r.type._parseSync(new Oa(e,s,e.path,l)));return Ps.mergeArray(i,o)}get element(){return this._def.type}min(n,e){return new sa({...this._def,minLength:{value:n,message:xn.toString(e)}})}max(n,e){return new sa({...this._def,maxLength:{value:n,message:xn.toString(e)}})}length(n,e){return new sa({...this._def,exactLength:{value:n,message:xn.toString(e)}})}nonempty(n){return this.min(1,n)}}sa.create=(t,n)=>new sa({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Jn.ZodArray,...fi(n)});function cf(t){if(t instanceof qr){const n={};for(const e in t.shape){const i=t.shape[e];n[e]=Na.create(cf(i))}return new qr({...t._def,shape:()=>n})}else return t instanceof sa?new sa({...t._def,type:cf(t.element)}):t instanceof Na?Na.create(cf(t.unwrap())):t instanceof ec?ec.create(cf(t.unwrap())):t instanceof Pa?Pa.create(t.items.map(n=>cf(n))):t}class qr extends vi{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),e=Ri.objectKeys(n);return this._cached={shape:n,keys:e}}_parse(n){if(this._getType(n)!==En.object){const a=this._getOrReturnCtx(n);return wn(a,{code:en.invalid_type,expected:En.object,received:a.parsedType}),ii}const{status:e,ctx:i}=this._processInputParams(n),{shape:r,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Qa&&this._def.unknownKeys==="strip"))for(const a in i.data)o.includes(a)||s.push(a);const l=[];for(const a of o){const c=r[a],u=i.data[a];l.push({key:{status:"valid",value:a},value:c._parse(new Oa(i,u,i.path,a)),alwaysSet:a in i.data})}if(this._def.catchall instanceof Qa){const a=this._def.unknownKeys;if(a==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(a==="strict")s.length>0&&(wn(i,{code:en.unrecognized_keys,keys:s}),e.dirty());else if(a!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const a=this._def.catchall;for(const c of s){const u=i.data[c];l.push({key:{status:"valid",value:c},value:a._parse(new Oa(i,u,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const a=[];for(const c of l){const u=await c.key,d=await c.value;a.push({key:u,value:d,alwaysSet:c.alwaysSet})}return a}).then(a=>Ps.mergeObjectSync(e,a)):Ps.mergeObjectSync(e,l)}get shape(){return this._def.shape()}strict(n){return xn.errToObj,new qr({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(e,i)=>{var r,o,s,l;const a=(s=(o=(r=this._def).errorMap)===null||o===void 0?void 0:o.call(r,e,i).message)!==null&&s!==void 0?s:i.defaultError;return e.code==="unrecognized_keys"?{message:(l=xn.errToObj(n).message)!==null&&l!==void 0?l:a}:{message:a}}}:{}})}strip(){return new qr({...this._def,unknownKeys:"strip"})}passthrough(){return new qr({...this._def,unknownKeys:"passthrough"})}extend(n){return new qr({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new qr({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:Jn.ZodObject})}setKey(n,e){return this.augment({[n]:e})}catchall(n){return new qr({...this._def,catchall:n})}pick(n){const e={};return Ri.objectKeys(n).forEach(i=>{n[i]&&this.shape[i]&&(e[i]=this.shape[i])}),new qr({...this._def,shape:()=>e})}omit(n){const e={};return Ri.objectKeys(this.shape).forEach(i=>{n[i]||(e[i]=this.shape[i])}),new qr({...this._def,shape:()=>e})}deepPartial(){return cf(this)}partial(n){const e={};return Ri.objectKeys(this.shape).forEach(i=>{const r=this.shape[i];n&&!n[i]?e[i]=r:e[i]=r.optional()}),new qr({...this._def,shape:()=>e})}required(n){const e={};return Ri.objectKeys(this.shape).forEach(i=>{if(n&&!n[i])e[i]=this.shape[i];else{let r=this.shape[i];for(;r instanceof Na;)r=r._def.innerType;e[i]=r}}),new qr({...this._def,shape:()=>e})}keyof(){return H2(Ri.objectKeys(this.shape))}}qr.create=(t,n)=>new qr({shape:()=>t,unknownKeys:"strip",catchall:Qa.create(),typeName:Jn.ZodObject,...fi(n)}),qr.strictCreate=(t,n)=>new qr({shape:()=>t,unknownKeys:"strict",catchall:Qa.create(),typeName:Jn.ZodObject,...fi(n)}),qr.lazycreate=(t,n)=>new qr({shape:t,unknownKeys:"strip",catchall:Qa.create(),typeName:Jn.ZodObject,...fi(n)});class yd extends vi{_parse(n){const{ctx:e}=this._processInputParams(n),i=this._def.options;function r(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return e.common.issues.push(...l.ctx.common.issues),l.result;const s=o.map(l=>new go(l.ctx.common.issues));return wn(e,{code:en.invalid_union,unionErrors:s}),ii}if(e.common.async)return Promise.all(i.map(async o=>{const s={...e,common:{...e.common,issues:[]},parent:null};return{result:await o._parseAsync({data:e.data,path:e.path,parent:s}),ctx:s}})).then(r);{let o;const s=[];for(const a of i){const c={...e,common:{...e.common,issues:[]},parent:null},u=a._parseSync({data:e.data,path:e.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return e.common.issues.push(...o.ctx.common.issues),o.result;const l=s.map(a=>new go(a));return wn(e,{code:en.invalid_union,unionErrors:l}),ii}}get options(){return this._def.options}}yd.create=(t,n)=>new yd({options:t,typeName:Jn.ZodUnion,...fi(n)});const Ql=t=>t instanceof Td?Ql(t.schema):t instanceof oa?Ql(t.innerType()):t instanceof Cd?[t.value]:t instanceof $l?t.options:t instanceof Ed?Ri.objectValues(t.enum):t instanceof Id?Ql(t._def.innerType):t instanceof vd?[void 0]:t instanceof wd?[null]:t instanceof Na?[void 0,...Ql(t.unwrap())]:t instanceof ec?[null,...Ql(t.unwrap())]:t instanceof zg||t instanceof Pd?Ql(t.unwrap()):t instanceof Ad?Ql(t._def.innerType):[];class em extends vi{_parse(n){const{ctx:e}=this._processInputParams(n);if(e.parsedType!==En.object)return wn(e,{code:en.invalid_type,expected:En.object,received:e.parsedType}),ii;const i=this.discriminator,r=e.data[i],o=this.optionsMap.get(r);return o?e.common.async?o._parseAsync({data:e.data,path:e.path,parent:e}):o._parseSync({data:e.data,path:e.path,parent:e}):(wn(e,{code:en.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),ii)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,e,i){const r=new Map;for(const o of e){const s=Ql(o.shape[n]);if(!s.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const l of s){if(r.has(l))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(l)}`);r.set(l,o)}}return new em({typeName:Jn.ZodDiscriminatedUnion,discriminator:n,options:e,optionsMap:r,...fi(i)})}}function Ug(t,n){const e=Xl(t),i=Xl(n);if(t===n)return{valid:!0,data:t};if(e===En.object&&i===En.object){const r=Ri.objectKeys(n),o=Ri.objectKeys(t).filter(l=>r.indexOf(l)!==-1),s={...t,...n};for(const l of o){const a=Ug(t[l],n[l]);if(!a.valid)return{valid:!1};s[l]=a.data}return{valid:!0,data:s}}else if(e===En.array&&i===En.array){if(t.length!==n.length)return{valid:!1};const r=[];for(let o=0;o{if(qg(o)||qg(s))return ii;const l=Ug(o.value,s.value);return l.valid?((Dg(o)||Dg(s))&&e.dirty(),{status:e.value,value:l.data}):(wn(i,{code:en.invalid_intersection_types}),ii)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,s])=>r(o,s)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}kd.create=(t,n,e)=>new kd({left:t,right:n,typeName:Jn.ZodIntersection,...fi(e)});class Pa extends vi{_parse(n){const{status:e,ctx:i}=this._processInputParams(n);if(i.parsedType!==En.array)return wn(i,{code:en.invalid_type,expected:En.array,received:i.parsedType}),ii;if(i.data.lengththis._def.items.length&&(wn(i,{code:en.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),e.dirty());const r=[...i.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Oa(i,o,i.path,s)):null}).filter(o=>!!o);return i.common.async?Promise.all(r).then(o=>Ps.mergeArray(e,o)):Ps.mergeArray(e,r)}get items(){return this._def.items}rest(n){return new Pa({...this._def,rest:n})}}Pa.create=(t,n)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pa({items:t,typeName:Jn.ZodTuple,rest:null,...fi(n)})};class Sd extends vi{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:e,ctx:i}=this._processInputParams(n);if(i.parsedType!==En.object)return wn(i,{code:en.invalid_type,expected:En.object,received:i.parsedType}),ii;const r=[],o=this._def.keyType,s=this._def.valueType;for(const l in i.data)r.push({key:o._parse(new Oa(i,l,i.path,l)),value:s._parse(new Oa(i,i.data[l],i.path,l)),alwaysSet:l in i.data});return i.common.async?Ps.mergeObjectAsync(e,r):Ps.mergeObjectSync(e,r)}get element(){return this._def.valueType}static create(n,e,i){return e instanceof vi?new Sd({keyType:n,valueType:e,typeName:Jn.ZodRecord,...fi(i)}):new Sd({keyType:ra.create(),valueType:n,typeName:Jn.ZodRecord,...fi(e)})}}class tm extends vi{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:e,ctx:i}=this._processInputParams(n);if(i.parsedType!==En.map)return wn(i,{code:en.invalid_type,expected:En.map,received:i.parsedType}),ii;const r=this._def.keyType,o=this._def.valueType,s=[...i.data.entries()].map(([l,a],c)=>({key:r._parse(new Oa(i,l,i.path,[c,"key"])),value:o._parse(new Oa(i,a,i.path,[c,"value"]))}));if(i.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const a of s){const c=await a.key,u=await a.value;if(c.status==="aborted"||u.status==="aborted")return ii;(c.status==="dirty"||u.status==="dirty")&&e.dirty(),l.set(c.value,u.value)}return{status:e.value,value:l}})}else{const l=new Map;for(const a of s){const c=a.key,u=a.value;if(c.status==="aborted"||u.status==="aborted")return ii;(c.status==="dirty"||u.status==="dirty")&&e.dirty(),l.set(c.value,u.value)}return{status:e.value,value:l}}}}tm.create=(t,n,e)=>new tm({valueType:n,keyType:t,typeName:Jn.ZodMap,...fi(e)});class Xc extends vi{_parse(n){const{status:e,ctx:i}=this._processInputParams(n);if(i.parsedType!==En.set)return wn(i,{code:en.invalid_type,expected:En.set,received:i.parsedType}),ii;const r=this._def;r.minSize!==null&&i.data.sizer.maxSize.value&&(wn(i,{code:en.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),e.dirty());const o=this._def.valueType;function s(a){const c=new Set;for(const u of a){if(u.status==="aborted")return ii;u.status==="dirty"&&e.dirty(),c.add(u.value)}return{status:e.value,value:c}}const l=[...i.data.values()].map((a,c)=>o._parse(new Oa(i,a,i.path,c)));return i.common.async?Promise.all(l).then(a=>s(a)):s(l)}min(n,e){return new Xc({...this._def,minSize:{value:n,message:xn.toString(e)}})}max(n,e){return new Xc({...this._def,maxSize:{value:n,message:xn.toString(e)}})}size(n,e){return this.min(n,e).max(n,e)}nonempty(n){return this.min(1,n)}}Xc.create=(t,n)=>new Xc({valueType:t,minSize:null,maxSize:null,typeName:Jn.ZodSet,...fi(n)});class uf extends vi{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:e}=this._processInputParams(n);if(e.parsedType!==En.function)return wn(e,{code:en.invalid_type,expected:En.function,received:e.parsedType}),ii;function i(l,a){return Xh({data:l,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Zh(),af].filter(c=>!!c),issueData:{code:en.invalid_arguments,argumentsError:a}})}function r(l,a){return Xh({data:l,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Zh(),af].filter(c=>!!c),issueData:{code:en.invalid_return_type,returnTypeError:a}})}const o={errorMap:e.common.contextualErrorMap},s=e.data;if(this._def.returns instanceof ff){const l=this;return Fs(async function(...a){const c=new go([]),u=await l._def.args.parseAsync(a,o).catch(f=>{throw c.addIssue(i(a,f)),c}),d=await Reflect.apply(s,this,u);return await l._def.returns._def.type.parseAsync(d,o).catch(f=>{throw c.addIssue(r(d,f)),c})})}else{const l=this;return Fs(function(...a){const c=l._def.args.safeParse(a,o);if(!c.success)throw new go([i(a,c.error)]);const u=Reflect.apply(s,this,c.data),d=l._def.returns.safeParse(u,o);if(!d.success)throw new go([r(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new uf({...this._def,args:Pa.create(n).rest(Zc.create())})}returns(n){return new uf({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,e,i){return new uf({args:n||Pa.create([]).rest(Zc.create()),returns:e||Zc.create(),typeName:Jn.ZodFunction,...fi(i)})}}class Td extends vi{get schema(){return this._def.getter()}_parse(n){const{ctx:e}=this._processInputParams(n);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}}Td.create=(t,n)=>new Td({getter:t,typeName:Jn.ZodLazy,...fi(n)});class Cd extends vi{_parse(n){if(n.data!==this._def.value){const e=this._getOrReturnCtx(n);return wn(e,{received:e.data,code:en.invalid_literal,expected:this._def.value}),ii}return{status:"valid",value:n.data}}get value(){return this._def.value}}Cd.create=(t,n)=>new Cd({value:t,typeName:Jn.ZodLiteral,...fi(n)});function H2(t,n){return new $l({values:t,typeName:Jn.ZodEnum,...fi(n)})}class $l extends vi{constructor(){super(...arguments),gd.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const e=this._getOrReturnCtx(n),i=this._def.values;return wn(e,{expected:Ri.joinValues(i),received:e.parsedType,code:en.invalid_type}),ii}if(Jh(this,gd)||U2(this,gd,new Set(this._def.values)),!Jh(this,gd).has(n.data)){const e=this._getOrReturnCtx(n),i=this._def.values;return wn(e,{received:e.data,code:en.invalid_enum_value,options:i}),ii}return Fs(n.data)}get options(){return this._def.values}get enum(){const n={};for(const e of this._def.values)n[e]=e;return n}get Values(){const n={};for(const e of this._def.values)n[e]=e;return n}get Enum(){const n={};for(const e of this._def.values)n[e]=e;return n}extract(n,e=this._def){return $l.create(n,{...this._def,...e})}exclude(n,e=this._def){return $l.create(this.options.filter(i=>!n.includes(i)),{...this._def,...e})}}gd=new WeakMap,$l.create=H2;class Ed extends vi{constructor(){super(...arguments),_d.set(this,void 0)}_parse(n){const e=Ri.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(n);if(i.parsedType!==En.string&&i.parsedType!==En.number){const r=Ri.objectValues(e);return wn(i,{expected:Ri.joinValues(r),received:i.parsedType,code:en.invalid_type}),ii}if(Jh(this,_d)||U2(this,_d,new Set(Ri.getValidEnumValues(this._def.values))),!Jh(this,_d).has(n.data)){const r=Ri.objectValues(e);return wn(i,{received:i.data,code:en.invalid_enum_value,options:r}),ii}return Fs(n.data)}get enum(){return this._def.values}}_d=new WeakMap,Ed.create=(t,n)=>new Ed({values:t,typeName:Jn.ZodNativeEnum,...fi(n)});class ff extends vi{unwrap(){return this._def.type}_parse(n){const{ctx:e}=this._processInputParams(n);if(e.parsedType!==En.promise&&e.common.async===!1)return wn(e,{code:en.invalid_type,expected:En.promise,received:e.parsedType}),ii;const i=e.parsedType===En.promise?e.data:Promise.resolve(e.data);return Fs(i.then(r=>this._def.type.parseAsync(r,{path:e.path,errorMap:e.common.contextualErrorMap})))}}ff.create=(t,n)=>new ff({type:t,typeName:Jn.ZodPromise,...fi(n)});class oa extends vi{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Jn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:e,ctx:i}=this._processInputParams(n),r=this._def.effect||null,o={addIssue:s=>{wn(i,s),s.fatal?e.abort():e.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),r.type==="preprocess"){const s=r.transform(i.data,o);if(i.common.async)return Promise.resolve(s).then(async l=>{if(e.value==="aborted")return ii;const a=await this._def.schema._parseAsync({data:l,path:i.path,parent:i});return a.status==="aborted"?ii:a.status==="dirty"||e.value==="dirty"?Kh(a.value):a});{if(e.value==="aborted")return ii;const l=this._def.schema._parseSync({data:s,path:i.path,parent:i});return l.status==="aborted"?ii:l.status==="dirty"||e.value==="dirty"?Kh(l.value):l}}if(r.type==="refinement"){const s=l=>{const a=r.refinement(l,o);if(i.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(i.common.async===!1){const l=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?ii:(l.status==="dirty"&&e.dirty(),s(l.value),{status:e.value,value:l.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(l=>l.status==="aborted"?ii:(l.status==="dirty"&&e.dirty(),s(l.value).then(()=>({status:e.value,value:l.value}))))}if(r.type==="transform")if(i.common.async===!1){const s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!hd(s))return s;const l=r.transform(s.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:l}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>hd(s)?Promise.resolve(r.transform(s.value,o)).then(l=>({status:e.value,value:l})):s);Ri.assertNever(r)}}oa.create=(t,n,e)=>new oa({schema:t,typeName:Jn.ZodEffects,effect:n,...fi(e)}),oa.createWithPreprocess=(t,n,e)=>new oa({schema:n,effect:{type:"preprocess",transform:t},typeName:Jn.ZodEffects,...fi(e)});class Na extends vi{_parse(n){return this._getType(n)===En.undefined?Fs(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}Na.create=(t,n)=>new Na({innerType:t,typeName:Jn.ZodOptional,...fi(n)});class ec extends vi{_parse(n){return this._getType(n)===En.null?Fs(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}ec.create=(t,n)=>new ec({innerType:t,typeName:Jn.ZodNullable,...fi(n)});class Id extends vi{_parse(n){const{ctx:e}=this._processInputParams(n);let i=e.data;return e.parsedType===En.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:e.path,parent:e})}removeDefault(){return this._def.innerType}}Id.create=(t,n)=>new Id({innerType:t,typeName:Jn.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...fi(n)});class Ad extends vi{_parse(n){const{ctx:e}=this._processInputParams(n),i={...e,common:{...e.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return md(r)?r.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new go(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new go(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Ad.create=(t,n)=>new Ad({innerType:t,typeName:Jn.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...fi(n)});class nm extends vi{_parse(n){if(this._getType(n)!==En.nan){const e=this._getOrReturnCtx(n);return wn(e,{code:en.invalid_type,expected:En.nan,received:e.parsedType}),ii}return{status:"valid",value:n.data}}}nm.create=t=>new nm({typeName:Jn.ZodNaN,...fi(t)});const Rj=Symbol("zod_brand");class zg extends vi{_parse(n){const{ctx:e}=this._processInputParams(n),i=e.data;return this._def.type._parse({data:i,path:e.path,parent:e})}unwrap(){return this._def.type}}class Od extends vi{_parse(n){const{status:e,ctx:i}=this._processInputParams(n);if(i.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?ii:r.status==="dirty"?(e.dirty(),Kh(r.value)):this._def.out._parseAsync({data:r.value,path:i.path,parent:i})})();{const r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?ii:r.status==="dirty"?(e.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(n,e){return new Od({in:n,out:e,typeName:Jn.ZodPipeline})}}class Pd extends vi{_parse(n){const e=this._def.innerType._parse(n),i=r=>(hd(r)&&(r.value=Object.freeze(r.value)),r);return md(e)?e.then(r=>i(r)):i(e)}unwrap(){return this._def.innerType}}Pd.create=(t,n)=>new Pd({innerType:t,typeName:Jn.ZodReadonly,...fi(n)});function W2(t,n={},e){return t?lf.create().superRefine((i,r)=>{var o,s;if(!t(i)){const l=typeof n=="function"?n(i):typeof n=="string"?{message:n}:n,a=(s=(o=l.fatal)!==null&&o!==void 0?o:e)!==null&&s!==void 0?s:!0,c=typeof l=="string"?{message:l}:l;r.addIssue({code:"custom",...c,fatal:a})}}):lf.create()}const Mj={object:qr.lazycreate};var Jn;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Jn||(Jn={}));const qj=(t,n={message:`Input not instance of ${t.name}`})=>W2(e=>e instanceof t,n),V2=ra.create,Y2=Kl.create,Dj=nm.create,Bj=Jl.create,Z2=bd.create,Uj=Yc.create,zj=Qh.create,Fj=vd.create,xj=wd.create,Gj=lf.create,Hj=Zc.create,Wj=Qa.create,Vj=$h.create,Yj=sa.create,Zj=qr.create,Xj=qr.strictCreate,Kj=yd.create,Jj=em.create,Qj=kd.create,$j=Pa.create,eR=Sd.create,tR=tm.create,nR=Xc.create,iR=uf.create,rR=Td.create,sR=Cd.create,oR=$l.create,aR=Ed.create,lR=ff.create,X2=oa.create,cR=Na.create,uR=ec.create,fR=oa.createWithPreprocess,dR=Od.create;var ts=Object.freeze({__proto__:null,defaultErrorMap:af,setErrorMap:_j,getErrorMap:Zh,makeIssue:Xh,EMPTY_PATH:bj,addIssueToContext:wn,ParseStatus:Ps,INVALID:ii,DIRTY:Kh,OK:Fs,isAborted:qg,isDirty:Dg,isValid:hd,isAsync:md,get util(){return Ri},get objectUtil(){return Mg},ZodParsedType:En,getParsedType:Xl,ZodType:vi,datetimeRegex:G2,ZodString:ra,ZodNumber:Kl,ZodBigInt:Jl,ZodBoolean:bd,ZodDate:Yc,ZodSymbol:Qh,ZodUndefined:vd,ZodNull:wd,ZodAny:lf,ZodUnknown:Zc,ZodNever:Qa,ZodVoid:$h,ZodArray:sa,ZodObject:qr,ZodUnion:yd,ZodDiscriminatedUnion:em,ZodIntersection:kd,ZodTuple:Pa,ZodRecord:Sd,ZodMap:tm,ZodSet:Xc,ZodFunction:uf,ZodLazy:Td,ZodLiteral:Cd,ZodEnum:$l,ZodNativeEnum:Ed,ZodPromise:ff,ZodEffects:oa,ZodTransformer:oa,ZodOptional:Na,ZodNullable:ec,ZodDefault:Id,ZodCatch:Ad,ZodNaN:nm,BRAND:Rj,ZodBranded:zg,ZodPipeline:Od,ZodReadonly:Pd,custom:W2,Schema:vi,ZodSchema:vi,late:Mj,get ZodFirstPartyTypeKind(){return Jn},coerce:{string:t=>ra.create({...t,coerce:!0}),number:t=>Kl.create({...t,coerce:!0}),boolean:t=>bd.create({...t,coerce:!0}),bigint:t=>Jl.create({...t,coerce:!0}),date:t=>Yc.create({...t,coerce:!0})},any:Gj,array:Yj,bigint:Bj,boolean:Z2,date:Uj,discriminatedUnion:Jj,effect:X2,enum:oR,function:iR,instanceof:qj,intersection:Qj,lazy:rR,literal:sR,map:tR,nan:Dj,nativeEnum:aR,never:Wj,null:xj,nullable:uR,number:Y2,object:Zj,oboolean:()=>Z2().optional(),onumber:()=>Y2().optional(),optional:cR,ostring:()=>V2().optional(),pipeline:dR,preprocess:fR,promise:lR,record:eR,set:nR,strictObject:Xj,string:V2,symbol:zj,transformer:X2,tuple:$j,undefined:Fj,union:Kj,unknown:Hj,void:Vj,NEVER:ii,ZodIssueCode:en,quotelessJson:gj,ZodError:go});const Kc=t=>{const n=e=>{const i={};try{for(const r in e){const o=e[r];if(Array.isArray(o)){const[s,...l]=o;let a;if(s===Oe.STRING)a=ts.string();else if(s===Oe.ARRAY){const c=l[0];c===Oe.STRING?a=ts.array(ts.string()):c===Oe.NUMBER?a=ts.array(ts.number()):c===Oe.BOOLEAN?a=ts.array(ts.boolean()):typeof c=="object"?a=ts.array(n(c)):a=ts.array(ts.any())}else if(typeof s=="object")a=n(s);else if(s===Oe.BOOLEAN)a=ts.boolean();else if(s===Oe.NUMBER)a=ts.number();else if(s===Oe.UNION){const c=l[0];if(!Array.isArray(c))throw new Error("UNION type expects an array of types");const u=c.map(d=>{if(d===Oe.STRING)return ts.string();if(d===Oe.NUMBER)return ts.number();if(d===Oe.BOOLEAN)return ts.boolean();throw new Error(`Unsupported union type: ${d}`)});a=ts.union(u),l.shift()}else throw new Error(`Unsupported type: ${s}`);l.includes(Oe.OPTIONAL)&&(a=a.optional()),l.includes(Oe.NULLABLE)&&(a=a.nullable()),l.includes(Oe.NON_EMPTY)&&(a instanceof ts.ZodArray?a=a.nonempty():a instanceof ts.ZodString&&(a=a.min(1))),i[r]=a}else if(typeof o=="object"&&o!==null)i[r]=n(o);else throw new Error(`Expected an array for schema definition at key: ${r}`)}}catch(r){ni.error("Error in validating schema: "+r.message)}return ts.object(i).passthrough()};return n(t)},pR={catalogReference:[Oe.STRING,Oe.NON_EMPTY],configurationId:[Oe.STRING,Oe.OPTIONAL],firstCharacteristic:[Oe.STRING,Oe.OPTIONAL],isGCR:[Oe.BOOLEAN,Oe.NON_EMPTY],quantity:[Oe.STRING,Oe.NON_EMPTY],secondCharacteristic:[Oe.STRING,Oe.OPTIONAL]},hR=Kc(pR),Ir={costPriceObject:{overwriteCost:[Oe.BOOLEAN,Oe.OPTIONAL,Oe.NULLABLE],currency:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],value:[Oe.NUMBER,Oe.OPTIONAL,Oe.NULLABLE],priceDate:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],source:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],sourceValue:[Oe.NUMBER,Oe.OPTIONAL,Oe.NULLABLE]},customization:{configuredReference:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],"custom-configuredReference1":[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],"custom-configuredReference2":[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE]},orderingData:{edi:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],hive2:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],hive2Url:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],orderingId:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],productCode:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE]},reloadData:{reloadConfiguration:[Oe.BOOLEAN,Oe.OPTIONAL,Oe.NULLABLE],reloadConfigurationIdSandC:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],reloadSolution:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE]},selector:{country:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],dataId:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],language:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],project:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],technology:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE]}},K2={groupArray:{id:[Oe.STRING,Oe.NON_EMPTY],groupName:[Oe.STRING,Oe.NON_EMPTY],parentGroupId:[Oe.STRING,Oe.NON_EMPTY],qty:[Oe.NUMBER,Oe.NON_EMPTY]},productsArray:{applicationSource:[Oe.STRING,Oe.NON_EMPTY],cost:[Ir.costPriceObject],customization:[Ir.customization,Oe.NULLABLE],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],freeText:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],partType:[Oe.STRING,Oe.NON_EMPTY],isParent:[Oe.BOOLEAN,Oe.NON_EMPTY],quantity:[Oe.NUMBER,Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],freezeItem:[Oe.BOOLEAN,Oe.OPTIONAL,Oe.NULLABLE],documentUrl:[Oe.ARRAY,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],groupId:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],bomLineItemNo:[Oe.STRING,Oe.NON_EMPTY],price:[Ir.costPriceObject],reloadData:[Ir.reloadData],selector:[Ir.selector],subparts:[Oe.ARRAY,{quantity:[Oe.NUMBER,Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],cost:[Ir.costPriceObject],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],price:[Ir.costPriceObject]}]}};Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL,Oe.ARRAY,Oe.NULLABLE,Oe.OPTIONAL,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL;const mR={freezeItem:[Oe.STRING,Oe.OPTIONAL],eolStatus:[Oe.ARRAY],quantity:[Oe.NUMBER],isParent:[Oe.BOOLEAN],cost:[{costDate:[Oe.STRING],currency:[Oe.STRING],overwriteCost:[Oe.BOOLEAN],source:[Oe.STRING],value:[Oe.NUMBER]},Oe.OPTIONAL],productId:[Oe.STRING,Oe.OPTIONAL],customization:[{configuredReference:[Oe.STRING,Oe.NULLABLE],custom_configuredReference1:[Oe.STRING,Oe.NULLABLE],custom_configuredReference2:[Oe.STRING,Oe.NULLABLE]},Oe.OPTIONAL],groupId:[Oe.STRING,Oe.OPTIONAL],description:[Oe.STRING,Oe.OPTIONAL],reloadData:[{reloadConfiguration:[Oe.STRING,Oe.NULLABLE],reloadConfigurationIdSandC:[Oe.STRING,Oe.NULLABLE],reloadSolution:[Oe.STRING,Oe.NULLABLE]},Oe.OPTIONAL],price:[Oe.NUMBER,{currency:[Oe.STRING,Oe.OPTIONAL],overwritePrice:[Oe.BOOLEAN,Oe.OPTIONAL],priceDate:[Oe.STRING,Oe.OPTIONAL],source:[Oe.STRING,Oe.OPTIONAL],value:[Oe.NUMBER,Oe.OPTIONAL]},Oe.OPTIONAL],freeText:[Oe.STRING,Oe.OPTIONAL],parts:[Oe.ARRAY,Oe.OBJECT,Oe.OPTIONAL],id:[Oe.STRING,Oe.OPTIONAL],orderingData:[{edi:[Oe.STRING,Oe.NULLABLE],hive2:[Oe.STRING,Oe.NULLABLE],hive2Url:[Oe.STRING],orderingId:[Oe.STRING,Oe.NULLABLE],productCode:[Oe.STRING,Oe.NULLABLE]},Oe.OPTIONAL],partType:[Oe.STRING],applicationSource:[Oe.STRING,Oe.OPTIONAL],serialNum:[Oe.STRING,Oe.OPTIONAL]},gR={application_name:[Oe.STRING,Oe.NON_EMPTY],name:[Oe.STRING,Oe.NON_EMPTY],documentUrl:[Oe.ARRAY,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],locale:[Oe.STRING,Oe.NON_EMPTY,Oe.NULLABLE],country:[Oe.STRING,Oe.NON_EMPTY,Oe.NULLABLE],groups:[Oe.ARRAY,K2.groupArray,Oe.OPTIONAL],products:[Oe.ARRAY,{cost:[Ir.costPriceObject,Oe.OPTIONAL],customization:[Ir.customization,Oe.NULLABLE,Oe.OPTIONAL],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],freeText:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],partType:[Oe.STRING,Oe.NON_EMPTY],isParent:[Oe.BOOLEAN,Oe.NON_EMPTY],quantity:[Oe.NUMBER,Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],freezeItem:[Oe.BOOLEAN,Oe.OPTIONAL,Oe.NULLABLE],groupId:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],price:[Ir.costPriceObject,Oe.OPTIONAL],reloadData:[Ir.reloadData,Oe.OPTIONAL],selector:[Ir.selector,Oe.OPTIONAL],subparts:[Oe.ARRAY,Oe.OPTIONAL,{quantity:[Oe.NUMBER,Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],cost:[Ir.costPriceObject,Oe.OPTIONAL],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],price:[Ir.costPriceObject,Oe.OPTIONAL]}]},Oe.OPTIONAL]},_R=Kc(gR),Mo={data:[{bomID:[Oe.STRING,Oe.OPTIONAL],event:[Oe.STRING,Oe.OPTIONAL],filters:[Oe.ARRAY,Oe.OPTIONAL],id:[Oe.STRING,Oe.OPTIONAL],lastModifiedAt:[Oe.STRING,Oe.OPTIONAL],source:[Oe.STRING,Oe.OPTIONAL],username:[Oe.STRING,Oe.OPTIONAL],widgetName:[Oe.STRING,Oe.OPTIONAL]},Oe.OPTIONAL],bom:[{configurationMasterId:[Oe.STRING,Oe.OPTIONAL],country:[Oe.STRING,Oe.NON_EMPTY],groups:[Oe.ARRAY,K2.groupArray,Oe.OPTIONAL],locale:[Oe.STRING,Oe.NON_EMPTY],isCto:[Oe.UNION,[Oe.BOOLEAN,Oe.STRING],Oe.OPTIONAL],products:[Oe.ARRAY,{applicationSource:[Oe.STRING],cost:[{overwriteCost:[Oe.BOOLEAN,Oe.OPTIONAL,Oe.NULLABLE],currency:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],value:[Oe.NUMBER,Oe.OPTIONAL,Oe.NULLABLE],priceDate:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],source:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],sourceValue:[Oe.NUMBER,Oe.OPTIONAL,Oe.NULLABLE]},Oe.OPTIONAL],customization:[Ir.customization,Oe.NULLABLE,Oe.OPTIONAL],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],freeText:[Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],partType:[Oe.STRING,Oe.NON_EMPTY],isParent:[Oe.BOOLEAN,Oe.OPTIONAL],quantity:[Oe.UNION,[Oe.NUMBER,Oe.STRING],Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],freezeItem:[Oe.BOOLEAN,Oe.NULLABLE,Oe.OPTIONAL],documentUrl:[Oe.ARRAY,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],groupId:[Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],bomLineItemNo:[Oe.STRING,Oe.OPTIONAL],price:[Ir.costPriceObject,Oe.OPTIONAL],reloadData:[Ir.reloadData,Oe.OPTIONAL],selector:[Ir.selector,Oe.OPTIONAL],subparts:[Oe.ARRAY,{quantity:[Oe.NUMBER,Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],cost:[Ir.costPriceObject,Oe.OPTIONAL],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],price:[Ir.costPriceObject,Oe.OPTIONAL]},Oe.OPTIONAL]},Oe.NON_EMPTY],extras:[{configurationName:[Oe.STRING,Oe.OPTIONAL],pluginId:[Oe.STRING,Oe.OPTIONAL],addTo:[Oe.STRING,Oe.OPTIONAL]},Oe.OPTIONAL]}],documentUrl:[Oe.ARRAY,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],freezeBom:[Oe.BOOLEAN,Oe.OPTIONAL]},bR=Kc(Mo);var J2,Q2,$2,ew,tw,nw,iw;const df={...Mo,bom:{...Mo.bom[0],products:[Oe.ARRAY,{...(J2=Mo==null?void 0:Mo.bom[0])==null?void 0:J2.products[1],cost:{...($2=(Q2=Mo==null?void 0:Mo.bom[0])==null?void 0:Q2.products[1])==null?void 0:$2.cost[0],pbValue:(nw=(tw=(ew=Mo==null?void 0:Mo.bom[0])==null?void 0:ew.products[1])==null?void 0:tw.cost[0])==null?void 0:nw.sourceValue}}]},data:{...Mo.data[0],ProjectBomId:(iw=Mo==null?void 0:Mo.data[0])==null?void 0:iw.bomID}};df.data&&delete df.data.bomID;var rw,sw,ow;((ow=(sw=(rw=df==null?void 0:df.bom)==null?void 0:rw.products[1])==null?void 0:sw.cost)==null?void 0:ow.sourceValue)&&delete df.bom.products[1].cost.sourceValue;const vR=Kc(df),wR={bom:[{parts:[Oe.ARRAY,{description:[Oe.STRING,Oe.OPTIONAL],eolStatus:[Oe.ARRAY,Oe.OPTIONAL],id:[Oe.STRING,Oe.OPTIONAL],productRef:[Oe.STRING,Oe.OPTIONAL],quantity:[Oe.NUMBER,Oe.OPTIONAL],source:[Oe.STRING,Oe.OPTIONAL],serialNum:[Oe.STRING,Oe.OPTIONAL]}],groups:[Oe.ARRAY,{name:[Oe.STRING,Oe.OPTIONAL],parts:[Oe.ARRAY,mR,Oe.OPTIONAL],groups:[Oe.ARRAY,Oe.OBJECT,Oe.OPTIONAL],id:[Oe.STRING,Oe.OPTIONAL],configurationMasterId:[Oe.STRING,Oe.OPTIONAL],isSelected:[Oe.BOOLEAN,Oe.OPTIONAL],isHideSubgroupButton:[Oe.BOOLEAN,Oe.OPTIONAL]}]}]},yR=Kc(wR),kR={applicationSource:[Oe.STRING,Oe.NON_EMPTY],configurationMasterId:[Oe.STRING,Oe.NON_EMPTY,Oe.OPTIONAL],country:[Oe.STRING,Oe.OPTIONAL],locale:[Oe.STRING,Oe.OPTIONAL],groupsName:[Oe.ARRAY,Oe.STRING,Oe.OPTIONAL],products:[Oe.ARRAY,{description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],isParent:[Oe.BOOLEAN,Oe.NON_EMPTY,Oe.OPTIONAL],quantity:[Oe.NUMBER,Oe.NON_EMPTY,Oe.OPTIONAL],productId:[Oe.STRING,Oe.NON_EMPTY,Oe.OPTIONAL],documentUrl:[Oe.ARRAY,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],subparts:[Oe.ARRAY,{quantity:[Oe.NUMBER,Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],cost:[Ir.costPriceObject,Oe.OPTIONAL],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],price:[Ir.costPriceObject,Oe.OPTIONAL]},Oe.OPTIONAL],reference:[Oe.STRING,Oe.OPTIONAL],pictureUrl:[Oe.STRING,Oe.NON_EMPTY,Oe.OPTIONAL]}],extras:[{configurationName:[Oe.STRING,Oe.OPTIONAL],pluginId:[Oe.STRING,Oe.OPTIONAL],addTo:[Oe.STRING,Oe.OPTIONAL]},Oe.OPTIONAL]},SR={applicationSource:[Oe.STRING,Oe.NON_EMPTY],id:[Oe.STRING,Oe.NON_EMPTY,Oe.OPTIONAL],selector:[{country:[Oe.STRING,Oe.OPTIONAL],language:[Oe.STRING,Oe.OPTIONAL]}],groupsName:[Oe.ARRAY,Oe.STRING,Oe.OPTIONAL],products:[Oe.ARRAY,{description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],isParent:[Oe.BOOLEAN,Oe.NON_EMPTY,Oe.OPTIONAL],quantity:[Oe.NUMBER,Oe.NON_EMPTY,Oe.OPTIONAL],productId:[Oe.STRING,Oe.NON_EMPTY,Oe.OPTIONAL],documentUrl:[Oe.ARRAY,Oe.STRING,Oe.NULLABLE,Oe.OPTIONAL],subparts:[Oe.ARRAY,{quantity:[Oe.NUMBER,Oe.NON_EMPTY],productId:[Oe.STRING,Oe.NON_EMPTY],cost:[Ir.costPriceObject],description:[Oe.STRING,Oe.OPTIONAL,Oe.NULLABLE],price:[Ir.costPriceObject]},Oe.OPTIONAL],reference:[Oe.STRING,Oe.NON_EMPTY],pictureUrl:[Oe.STRING,Oe.NON_EMPTY,Oe.OPTIONAL]}],extras:[{configurationName:[Oe.STRING,Oe.OPTIONAL],pluginId:[Oe.STRING,Oe.OPTIONAL],addTo:[Oe.STRING,Oe.OPTIONAL]},Oe.OPTIONAL]},TR=Kc(kR),CR=Kc(SR);function pf(t,n){let e=null;try{e={success:!0,data:n.passthrough().parse(t)}}catch(i){i instanceof ts.ZodError?e={success:!1,error:i.issues}:e={success:!1,error:i}}return e}function aw(t,n){var e,i;let r=null;switch(t){case Vc.EASY_IN:{r=pf(n,_R);break}case Vc.EASY:{r=pf(n,bR);break}case Vc.PB_BOM:{r=pf(n,yR);break}case Vc.CART:{r=pf(n,hR);break}case Vc.EASY_OUT:{r=pf(n,vR);break}case Vc.SC:{r=pf(n,((e=n==null?void 0:n.extras)==null?void 0:e.pluginId)==="s&c"||((i=n==null?void 0:n.extras)==null?void 0:i.pluginId)==="hpc"?CR:TR);break}}return ni.info("returnOutput",r),r}async function im(t,n){const e=(t??[]).map(async i=>{var r,o,s,l,a,c,u,d,f,p,m,g;if(i.hive2File)return{quantity:String(i.quantity),[n]:i.catalogReference?String(i.catalogReference):String(i.productRef||i.productId),hive:await ER(i.hive2File)};if(i.VAconfigId)return{quantity:String(i.quantity),[n]:String(i.productRef||i.productId),isGCR:!1};if(i.configurationId||(r=i==null?void 0:i.orderingData)!=null&&r.orderingId&&i.orderingData.orderingId!==Et.DUMMY_ORDERING_ID){const h={quantity:String(i.quantity),[n]:i.catalogReference?String(i.catalogReference):String(i.productRef||i.productId),isGCR:!0,configurationId:Number(i.configurationId)||((o=i==null?void 0:i.orderingData)==null?void 0:o.orderingId)};return(s=i==null?void 0:i.orderingData)!=null&&s.hive2&&(h.hive=btoa((l=i==null?void 0:i.orderingData)==null?void 0:l.hive2)),h}else if(((a=i==null?void 0:i.customization)==null?void 0:a.configuredReference)!==""&&(c=i==null?void 0:i.customization)!=null&&c.custom_configuredReference1){const h=i.customization||{};return{quantity:String(i.quantity),[n]:i.productId?String(i.productId):String(i.catalogReference||i.productRef),isGCR:!1,firstCharacteristic:i.firstCharacteristic?String(i.firstCharacteristic):String(h.custom_configuredReference1||h["custom-configuredReference1"]||""),secondCharacteristic:i.secondCharacteristic?String(i.secondCharacteristic):String(h.custom_configuredReference2||h["custom-configuredReference2"]||"")}}else return(u=i==null?void 0:i.orderingData)!=null&&u.hive2&&(((d=i==null?void 0:i.orderingData)==null?void 0:d.orderingId)===void 0||((f=i==null?void 0:i.orderingData)==null?void 0:f.orderingId)===null||((p=i==null?void 0:i.orderingData)==null?void 0:p.orderingId)===Et.EMPTY_STRING||((m=i==null?void 0:i.orderingData)==null?void 0:m.orderingId)===Et.DUMMY_ORDERING_ID)?{quantity:String(i.quantity),[n]:i.productId?String(i.productId):String(i.productRef||i.catalogReference),hive:btoa((g=i==null?void 0:i.orderingData)==null?void 0:g.hive2),isGCR:!1}:{quantity:String(i.quantity),[n]:i!=null&&i.catalogReference?String(i.catalogReference):String(i.productRef||i.productId),isGCR:!1}});return await Promise.all(e)}async function ER(t){const n=await(await fetch(t)).blob();return new Promise((e,i)=>{const r=new FileReader;r.onloadend=()=>{var o;const s=(o=r.result)==null?void 0:o.toString(),l=(s==null?void 0:s.split(",")[1])||"";e(l)},r.onerror=i,r.readAsDataURL(n)})}const rm={CATALOG_REFERENCE:"catalogReference",CUSTOM_CONFIGUREDREFERENCE_1:"custom-configuredReference1",CUSTOM_CONFIGUREDREFERENCE_2:"custom-configuredReference2"},hf={DESCRIPTION_SHORT_KEY:"DESCRIPTION_SHORT",HOOK_URL_ELBRIDGE:"https://interface.elbridge2.itek.de/",ORDER_UNIT:"C62",ORDER_UNIT_KEY:"ORDER_UNIT",MANUFACTURER_PID_KEY:"MANUFACTURER_PID",SUPPLIER_ID_GLN:"4012106000002",SUPPLIER_ID_GLN_KEY:"SUPPLIER_ID_GLN"},lw={productId:"productId",bomLineItemNo:"bomLineItemNo",SINGLE_ZERO:"0",DOUBLE_ZERO:"00",TYPE_OBJECT:"object",EXPORT_BOM_PRICE_INDEX:4},IR={SOURCE:{IMPORT:"IMPORT",REFERENCE:"REFERENCE"},APPLICATION_SOURCE:{SELECTOR_AND_CONFIGURATOR:"S&C"}},AR={ALTIVAR_PROCESS_CTO:"ALTIVAR PROCESS CTO",APPLICATION_SOURCE:"applicationSource",COST:"cost",CUSTOMIZATION:"customization",DESCRIPTION:"description",DRAFT:"Draft",FREEZE_ITEM:"freezeItem",FREE_TEXT:"freeText",GROUP_ID:"groupId",HELP_ME_CHOOSE:"Help Me Choose",IS_PARENT:"isParent",ORDERING_DATA:"orderingData",PART_TYPE_CONST:"partType",PB_BOM_LINE_ITEM:"pbBomLineItem",PENDING:"Pending",PRICE_CONSTANT:"price",PRODUCT_ID:"productId",PROJECT_BUILDER:"Project Builder",QUANTITY:"quantity",RELOAD_DATA:"reloadData",SELECTOR:"selector",SUBPARTS:"subparts"},$a={EXCEL_UPLOAD:"EXCEL_UPLOAD",ID:"id",GROUP_ID:"groupId",GROUPS:"groups",GUIDED_SEARCH:"GUIDED_SEARCH",IMPORT:"IMPORT",PB_COMPONENT_NAME:"projectbuilder",PARTS:"parts",REFRENCE_KEY:"REFERENCE",URL:"url"},OR="parts",PR="groups",NR="-";function cw(t){return t.filter(n=>n.partType!==Ro.CTO).map(n=>LR(n))}function LR(t){return{[hf.SUPPLIER_ID_GLN_KEY]:hf.SUPPLIER_ID_GLN,[hf.MANUFACTURER_PID_KEY]:t==null?void 0:t.productRef,[hf.DESCRIPTION_SHORT_KEY]:(t==null?void 0:t.description)??Et.EMPTY_STRING,[M2.QUANTITY]:t==null?void 0:t.quantity,[hf.ORDER_UNIT_KEY]:hf.ORDER_UNIT}}function Fg(t){try{return{[Mr.COST]:uw(t==null?void 0:t.cost,t==null?void 0:t.currency),[Mr.PRICE]:fw(t==null?void 0:t.price,t==null?void 0:t.currency),[Mr.DESCRIPTION]:(t==null?void 0:t.description)??Et.EMPTY_STRING,[Mr.PRODUCT_ID]:(t==null?void 0:t.reference)??(t==null?void 0:t.productId),[Mr.QUANTITY]:t.quantity??Et.EMPTY_STRING}}catch(n){return ni.error("OL: Error in easyEasyOutService::calculateSubParts method: "+n.message),{}}}function jR(t){return(t==null?void 0:t.applicationSource)??Et.EMPTY_STRING}function uw(t,n){try{return{costDate:(t==null?void 0:t.priceDate)??((t==null?void 0:t.costDate)||new Date().toJSON().slice(0,10)),currency:(t==null?void 0:t.currency)??n??Et.EMPTY_STRING,overwriteCost:t!=null&&t.overwriteCost?t==null?void 0:t.overwriteCost:!1,source:(t==null?void 0:t.source)||Et.EMPTY_STRING,value:(t==null?void 0:t.value)??0}}catch(e){return ni.error("OL: Error in easyEasyOutService::getCost method: "+e.message),{}}}function RR(t,n){try{return{configuredReference:(t==null?void 0:t.configuredReference)??n??Et.EMPTY_STRING,[j2]:(t==null?void 0:t[j2])??Et.EMPTY_STRING,[R2]:(t==null?void 0:t[R2])??Et.EMPTY_STRING}}catch(e){return ni.error("OL: Error in easyEasyOutService::getCustomization method: "+e.message),{}}}function MR(t,n,e,i){try{return{orderingId:(t==null?void 0:t.orderingId)??n??Et.DEFAULT_ORDERING_ID,hive2:(t==null?void 0:t.hive2)??i??Et.EMPTY_STRING,hive2Url:(t==null?void 0:t.hive2Url)??Et.EMPTY_STRING,productCode:(t==null?void 0:t.productCode)??e??Et.EMPTY_STRING,edi:(t==null?void 0:t.edi)??Et.EMPTY_STRING}}catch(r){return ni.error("OL: Error in easyEasyOutService::getOrderingData method: "+r.message),{}}}function qR(t){return t??Et.EMPTY_STRING}function DR(t){var n,e,i,r,o;try{const s=(n=t==null?void 0:t.selector)!=null&&n.language&&(e=t==null?void 0:t.selector)!=null&&e.country?`${(i=t==null?void 0:t.selector)==null?void 0:i.language}_${(r=t==null?void 0:t.selector)==null?void 0:r.country}`:"";return((o=t==null?void 0:t.bom)==null?void 0:o.locale)??(t==null?void 0:t.locale)??s??Et.EMPTY_STRING}catch(s){return ni.error("OL: Error in easyEasyOutService::getLocale method: "+s.message),Et.EMPTY_STRING}}function BR(t,n){var e;return t!=null&&t.configurationId||n!=null&&n.TC_ID_CUSTO||(e=t==null?void 0:t.extras)!=null&&e.codification||n.partType===Ro.CTO?Ro.CTO:Ro.NON_CTO}function Nd(t){if(t!=null&&t.application_name&&t.application_name!==Et.EMPTY_STRING)return FR(t);if(t!=null&&t.grouping&&Object.keys(t.grouping).length)return xR(t);if(t!=null&&t.selector&&Object.keys(t.selector).length)return GR(t);if(t!=null&&t.applicationSource&&t.applicationSource!==Et.EMPTY_STRING)return t}function fw(t,n){try{return{currency:(t==null?void 0:t.currency)??n??Et.EMPTY_STRING,overwritePrice:t!=null&&t.overwritePrice?t.overwritePrice:!1,pbValue:(t==null?void 0:t.sourceValue)??0,priceDate:(t==null?void 0:t.priceDate)||new Date().toJSON().slice(0,10),source:(t==null?void 0:t.source)||Et.EMPTY_STRING,value:(t==null?void 0:t.value)??0}}catch(e){return ni.error("OL: Error in easyEasyOutService::getPrice method: "+e.message),{}}}function UR(t,n){var e;return n!=null&&n.configurationId?(e=n==null?void 0:n.selector)==null?void 0:e.dataId:(t==null?void 0:t.productId)??(t==null?void 0:t.reference)}function xg(t){var n,e,i;const r=gw("caller");ni.info("OL: In easyEasyOutService::getProducts function");const o=((n=t==null?void 0:t.bom)==null?void 0:n.products)??(t==null?void 0:t.products)??Et.EMPTY_ARRAY;return ni.info("OL: Products in easyEasyOutService::getProducts function: "+JSON.stringify(o)),r==="UC"?o.length?t!=null&&t.configurationId?[Gg(t,o[0],!0,1,(e=t==null?void 0:t.selector)==null?void 0:e.dataId)]:dw(t.products??[],t):[]:o.length?t!=null&&t.configurationId||o[0].TC_ID_CUSTO?[Gg(t,o[0],!0,1,(i=t==null?void 0:t.selector)==null?void 0:i.dataId)]:dw(t.products??[],t):[]}function dw(t,n){try{return t.map((e,i)=>Gg(n,e,e.isParent??!1,String(i+1)))}catch(e){return ni.error("OL: Error in easyEasyOutService::getPrice method: "+e.message),[]}}function Gg(t,n,e,i,r){var o;try{return{[Mr.APPLICATION_SOURCE]:jR(t),[Mr.COST]:uw(n==null?void 0:n.cost,n==null?void 0:n.currency),[Mr.PRICE]:fw(n==null?void 0:n.price,n==null?void 0:n.currency),[Mr.SUBPARTS]:WR(t,n,r),[Mr.CUSTOMIZATION]:RR(n==null?void 0:n.extras,n==null?void 0:n.TC_ID_CUSTO),[Mr.ORDERING_DATA]:MR(n==null?void 0:n.orderingData,t==null?void 0:t.configurationId,(o=t==null?void 0:t.extras)==null?void 0:o.codification,n==null?void 0:n.hive2),[Mr.SELECTOR]:HR(t==null?void 0:t.selector,n==null?void 0:n.selector),[Mr.DESCRIPTION]:qR(n==null?void 0:n.description),[Mr.PART_TYPE]:BR(t,n),[Mr.RELOAD_DATA]:zR(n==null?void 0:n.reloadData,t==null?void 0:t.configurationId),[Mr.QUANTITY]:(n==null?void 0:n.quantity)??Et.EMPTY_STRING,[Mr.FREE_TEXT]:(n==null?void 0:n.freeText)??null,[Mr.FREEZE_ITEM]:(n==null?void 0:n.freezeItem)??!1,[Mr.GROUP_ID]:(n==null?void 0:n.groupId)??Et.EMPTY_STRING,[Mr.IS_PARENT]:e,[Mr.PRODUCT_ID]:UR(n,t),[Mr.BOM_ITEM_LINE_NO]:String(i),[Mr.NAME]:(n==null?void 0:n.name)??Et.EMPTY_STRING}}catch(s){return ni.error("OL: Error in easyEasyOutService::getReloadData method: "+s.message),{}}}function zR(t,n){try{return{reloadSolution:(t==null?void 0:t.reloadSolution)??Et.EMPTY_STRING,reloadConfiguration:(t==null?void 0:t.reloadConfiguration)??!!n??!1,reloadConfigurationIdSandC:String((t==null?void 0:t.reloadConfigurationIdSandC)??n??Et.EMPTY_STRING)}}catch(e){return ni.error("OL: Error in easyEasyOutService::getReloadData method: "+e.message),{}}}function FR(t){try{return{data:{id:Et.EMPTY_STRING,event:Et.EMPTY_STRING,source:(t==null?void 0:t.application_name)??Et.EMPTY_STRING,filters:Et.EMPTY_ARRAY,bomId:Et.EMPTY_STRING,lastModifiedAt:Et.EMPTY_STRING,username:Et.EMPTY_STRING},bom:{country:(t==null?void 0:t.country)??Et.EMPTY_STRING,documentUrl:(t==null?void 0:t.documentUrl)??Et.EMPTY_ARRAY,groups:(t==null?void 0:t.groups)??Et.EMPTY_ARRAY,locale:(t==null?void 0:t.locale)??Et.EMPTY_STRING,isCto:t==null?void 0:t.isCto,products:xg(t)}}}catch(n){return ni.error("OL: Error in easyEasyOutService::getEasyInToEasyResponse method: "+n.message),{}}}function xR(t){var n,e;try{return{data:{id:Et.EMPTY_STRING,event:Et.EMPTY_STRING,source:((n=t==null?void 0:t.options)==null?void 0:n.source)??Et.EMPTY_STRING,filters:Et.EMPTY_ARRAY,bomId:Et.EMPTY_STRING,lastModifiedAt:Et.EMPTY_STRING,username:Et.EMPTY_STRING},bom:{country:t==null?void 0:t.country,documentUrl:Et.EMPTY_ARRAY,groups:Et.EMPTY_ARRAY,locale:t==null?void 0:t.locale,isCto:t==null?void 0:t.isCto,products:xg(t),configurationMasterId:((e=t==null?void 0:t.grouping)==null?void 0:e.configurationMasterId)||Et.EMPTY_STRING}}}catch(i){return ni.error("OL: Error in easyEasyOutService::getConfiguratorToEasyResponse method: "+i.message),{}}}function GR(t){var n,e;try{return{data:{id:Et.EMPTY_STRING,event:Et.EMPTY_STRING,source:((n=t==null?void 0:t.selector)==null?void 0:n.project)??Et.EMPTY_STRING,filters:Et.EMPTY_ARRAY,bomId:Et.EMPTY_STRING,lastModifiedAt:Et.EMPTY_STRING,username:Et.EMPTY_STRING,widgetName:VR(t)},bom:{country:((e=t==null?void 0:t.selector)==null?void 0:e.country)??(t==null?void 0:t.country),documentUrl:Et.EMPTY_ARRAY,groups:Et.EMPTY_ARRAY,locale:DR(t),isCto:t==null?void 0:t.isCto,products:xg(t),extras:(t==null?void 0:t.extras)||Et.EMPTY_OBJECT}}}catch(i){return ni.error("OL: Error in easyEasyOutService::getSelectorToEasyResponse method: "+i.message),{}}}function HR(t,n){try{return{technology:(t==null?void 0:t.technology)??(n==null?void 0:n.technology)??Et.EMPTY_STRING,dataId:(t==null?void 0:t.dataId)??(n==null?void 0:n.dataId)??Et.EMPTY_STRING,project:(t==null?void 0:t.project)??(n==null?void 0:n.project)??Et.EMPTY_STRING,country:(t==null?void 0:t.country)??(n==null?void 0:n.country)??Et.EMPTY_STRING,language:(t==null?void 0:t.language)??(n==null?void 0:n.language)??Et.EMPTY_STRING}}catch(e){return ni.error("OL: Error in easyEasyOutService::getSelector method: "+e.message),{}}}function WR(t,n,e){var i,r;const o=gw("caller");try{const s=t==null?void 0:t.products;if((n==null?void 0:n.partType)===Ro.CTO)return(i=n==null?void 0:n.subparts)==null?void 0:i.map(l=>Fg(l));if((r=s==null?void 0:s[0])!=null&&r.TC_ID_CUSTO&&o!=="UC"){const l=s.slice(1);return l==null?void 0:l.map(a=>Fg(a))}else return e?s==null?void 0:s.map(l=>Fg(l)):(n==null?void 0:n.subparts)||[]}catch(s){return ni.error("OL: Error in easyEasyOutService::getSubparts method: "+s.message),[]}}function VR(t){return(t==null?void 0:t.widgetName)??Et.EMPTY_STRING}function YR(t,n){return ZR(t,n)}function ZR(t,n){return XR(t,n==null?void 0:n.selectedAppName,n==null?void 0:n.selectedFuncName,n==null?void 0:n.configurationName,n==null?void 0:n.configurationMasterId)}function XR(t,n,e,i,r){var o,s;let l={};try{n!==Et.NULL?(l={id:Et.EMPTY_STRING,name:n,groups:[],parts:[]},e!==Et.EMPTY_STRING?(sm(l.groups,Et.EMPTY_STRING,e,r||Et.EMPTY_STRING),pw(l.groups[0]),sm(l.groups[0].groups,Et.EMPTY_STRING,i,r)):sm(l.groups,Et.EMPTY_STRING,i,r)):e!==Et.EMPTY_STRING?(l={id:Et.EMPTY_STRING,name:e,groups:[],parts:[]},sm(l.groups,Et.EMPTY_STRING,i,r)):l={id:Et.EMPTY_STRING,name:i,configurationMasterId:r,groups:[],parts:[]},((o=t==null?void 0:t.groups)==null?void 0:o.length)>0&&(l.groups[0].groups=[],l.groups[0].groups=QR(t==null?void 0:t.groups),console.log(l.groups[0].groups)),l.extras=((s=t==null?void 0:t.bom)==null?void 0:s.extras)||{}}catch(a){ni.error("OL: Error in easyPBService::convertDataFromEasyToBOM method: "+a.message)}return hw(t,l)}function pw(t){try{t!=null&&t.groups?pw(t.groups[0]):t.groups=[]}catch(n){ni.error("OL: Error in easyPBService::addEmptyGroup method: "+n.message)}}function sm(t,n,e,i){try{t.push({id:n,name:e,configurationMasterId:i})}catch(r){ni.error("OL: Error in easyPBService::addDataToGroup method: "+r.message)}}function hw(t,n){var e,i,r;try{((i=(e=t==null?void 0:t.bom)==null?void 0:e.products)==null?void 0:i.length)>0&&(((r=n==null?void 0:n.groups)==null?void 0:r.length)>0?hw(t,n.groups[0]):(n.parts=[],KR(t,n)))}catch(o){ni.error("OL: Error in easyPBService::populateParts method: "+o.message)}return n}function KR(t,n){var e;try{(e=t==null?void 0:t.bom)==null||e.products.forEach(i=>{JR(i,n==null?void 0:n.parts)})}catch(i){ni.error("OL: Error in easyPBService::populateConfigurationParts method: "+i.message)}}function JR(t,n){var e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D;try{n.push({productRef:Et.EMPTY_STRING,partType:(t==null?void 0:t.partType)==="cto"?Ro.CTO:Ro.NON_CTO,productId:(e=t.orderingData)!=null&&e.orderingId&&((i=t.orderingData)==null?void 0:i.orderingId)!==""?t==null?void 0:t.productId.substring(3):t==null?void 0:t.productId,description:t==null?void 0:t.description,freezeItem:String(t==null?void 0:t.freezeItem),isParent:t!=null&&t.isParent?!!t.isParent:!1,quantity:Number(t==null?void 0:t.quantity),groupId:t==null?void 0:t.groupId,reloadData:{reloadSolution:(r=t==null?void 0:t.reloadData)==null?void 0:r.reloadSolution,reloadConfiguration:String((o=t==null?void 0:t.reloadData)==null?void 0:o.reloadConfiguration),reloadConfigurationIdSandC:(s=t==null?void 0:t.reloadData)==null?void 0:s.reloadConfigurationIdSandC},orderingData:{orderingId:(l=t==null?void 0:t.orderingData)==null?void 0:l.orderingId,hive2:(a=t==null?void 0:t.orderingData)==null?void 0:a.hive2,hive2Url:(c=t==null?void 0:t.orderingData)==null?void 0:c.hive2Url,productCode:(u=t==null?void 0:t.orderingData)==null?void 0:u.productCode,edi:(d=t==null?void 0:t.orderingData)==null?void 0:d.edi},price:t.price?Number((f=t==null?void 0:t.price)==null?void 0:f.value):0,cost:{overwriteCost:(p=t==null?void 0:t.cost)!=null&&p.overwriteCost?!!((m=t==null?void 0:t.cost)!=null&&m.overwriteCost):!1,value:(g=t==null?void 0:t.cost)!=null&&g.value?Number((h=t==null?void 0:t.cost)==null?void 0:h.value):0,currency:(_=t==null?void 0:t.cost)==null?void 0:_.currency,source:"",costDate:""},freeText:t==null?void 0:t.freeText,customization:{configuredReference:(b=t==null?void 0:t.customization)==null?void 0:b.configuredReference,custom_configuredReference1:(y=t==null?void 0:t.customization)==null?void 0:y["custom-configuredReference1"],custom_configuredReference2:(k=t==null?void 0:t.customization)==null?void 0:k["custom-configuredReference2"]},selector:{technology:(T=t==null?void 0:t.selector)==null?void 0:T.technology,dataId:(R=t==null?void 0:t.selector)==null?void 0:R.dataId,project:(O=t==null?void 0:t.selector)==null?void 0:O.project,country:(j=t==null?void 0:t.selector)==null?void 0:j.country,language:(q=t==null?void 0:t.selector)==null?void 0:q.language},hive2:(M=t==null?void 0:t.orderingData)==null?void 0:M.hive2}),t.isParent&&t.isParent===!0&&((z=t==null?void 0:t.subparts)==null?void 0:z.length)>0&&(n[0].parts=[],(D=t==null?void 0:t.subparts)==null||D.forEach(P=>{var L;n[0].parts.push({isParent:!1,partType:Ro.DEFAULT,productRef:null,productId:P==null?void 0:P.productId,quantity:Number(P==null?void 0:P.quantity),description:P==null?void 0:P.description,price:P.price?Number((L=P==null?void 0:P.price)==null?void 0:L.value):0})}))}catch(P){ni.error("OL: Error in easyPBService::populateConfigurationOutputParts method: "+P.message)}}function QR(t){const n=[];try{const e={};t.forEach(i=>{e[i.id]=i}),Object.keys(e).forEach(i=>{const r=e[i];if(r.parentGroupId==="0")n.push({id:r.id,name:r.groupName});else if(r.parentGroupId in e){const o=e[r.parentGroupId];"groups"in o||(o.groups=[]),o.groups.push({id:r.id,name:r.groupName})}})}catch(e){ni.error("OL: Error in easyPBService::convertFlatArrayToHierarchial method: "+e.message)}return n}function $R(t){return eM(t)}function eM(t){var n,e,i,r,o,s,l,a,c;try{return{application_name:((e=(n=t.bom)==null?void 0:n.products[0])==null?void 0:e.applicationSource)??Et.EMPTY_STRING,locale:((i=t==null?void 0:t.bom)==null?void 0:i.locale)??Et.EMPTY_STRING,country:((r=t==null?void 0:t.bom)==null?void 0:r.country)??Et.EMPTY_STRING,name:((s=(o=t==null?void 0:t.bom)==null?void 0:o.products[0])==null?void 0:s.name)??Et.EMPTY_STRING,documentUrl:((l=t==null?void 0:t.bom)==null?void 0:l.documentUrl)??Et.EMPTY_ARRAY,groups:((a=t.bom)==null?void 0:a.groups)??Et.EMPTY_ARRAY,products:((c=t.bom)==null?void 0:c.products)??Et.EMPTY_ARRAY}}catch(u){ni.error("OL: Error in easyToEasyInService::getResponseStructure method: "+u.message)}return null}const mw={};function mf(t,n){mw[t]=n}function gw(t){return mw[t]}function tM(t,n,e,i){let r=null;try{switch(n){case Wc.CART:{r=im(t.bom.products??[]);break}case Wc.ELBRIDGE:{r=cw(t.bom.products??[]);break}case Wc.EASY:{r=Nd(t);break}case Wc.EASY_IN:{r=$R(t);break}case Wc.QUOTE:{r=Nd(t);break}case Wc.PB:{const o=nM(t,i);r=YR(t,o);break}}return{messageType:n,data:r,eventName:"",redirectionUrI:""}}catch(o){return ni.error("OL: Error in service::getPayloadForExternalService method: "+o.message),{messageType:"",data:{},eventName:"",redirectionUrI:""}}}function nM(t={},n={}){var e,i,r;const o=(((e=t.bom)==null?void 0:e.products)||[])[0]||{},s=((i=t.selection)==null?void 0:i.brickDetails)||[],l=iM(o.applicationSource);return{selectedFuncName:(n==null?void 0:n.selectedFuncName)||(l?o.applicationSource:s[0]??void 0),applicationName:(n==null?void 0:n.applicationName)||(l?void 0:s.length>=1?s[1]:void 0),configurationName:(n==null?void 0:n.configurationName)||o.name||void 0,configurationMasterId:(n==null?void 0:n.configurationMasterId)||((r=t==null?void 0:t.bom)==null?void 0:r.configurationMasterId)||void 0}}function iM(t){return(t==null?void 0:t.trim().toLowerCase())===q2.ALTIVAR_GROUP_NAME.toLowerCase()||(t==null?void 0:t.trim().toLowerCase())===q2.CARTESIAN_ROBOTS_GROUP_NAME.toLowerCase()}function rM(t,n){return sM(t,n)}function sM(t,n){var e,i,r,o,s,l,a,c,u,d,f;try{return{data:{event:n.event??((e=t.data)==null?void 0:e.event)??Et.EMPTY_STRING,filters:n.filters??((i=t.data)==null?void 0:i.filters)??Et.EMPTY_ARRAY,lastModifiedAt:n.lastModifiedAt??((r=t.data)==null?void 0:r.lastModifiedAt)??Et.EMPTY_STRING,id:n.id??((o=t.data)==null?void 0:o.id)??Et.EMPTY_STRING,projectBuilderId:n.projectBuilderId??Et.EMPTY_STRING,source:n.source??((s=t.data)==null?void 0:s.source)??Et.EMPTY_STRING,username:n.username??((l=t.data)==null?void 0:l.username)??Et.EMPTY_STRING},bom:{country:((a=t.bom)==null?void 0:a.country)??Et.EMPTY_STRING,documentUrl:((c=t.bom)==null?void 0:c.documentUrl)??Et.EMPTY_ARRAY,groups:((u=t.bom)==null?void 0:u.groups)??Et.EMPTY_ARRAY,locale:((d=t.bom)==null?void 0:d.locale)??Et.EMPTY_STRING,products:((f=t.bom)==null?void 0:f.products)??Et.EMPTY_ARRAY}}}catch(p){return ni.error("Error in getResponseStructure:",p),{}}}function Hg(t,n){return AM(t,n)}const{PRICE_CONSTANT:_w,COST:bw,RELOAD_DATA:oM,ORDERING_DATA:aM,SELECTOR:lM,CUSTOMIZATION:cM,PART_TYPE_CONST:uM,PRODUCT_ID:vw,IS_PARENT:fM,QUANTITY:ww,GROUP_ID:yw,PB_BOM_LINE_ITEM:dM,FREEZE_ITEM:pM,APPLICATION_SOURCE:hM,FREE_TEXT:mM,DESCRIPTION:kw,SUBPARTS:gM}=AR;function _M(t,n,e,i){try{return{orderingId:bM(t,n),hive2:(t==null?void 0:t.hive2)??i??Et.EMPTY_STRING,hive2Url:(t==null?void 0:t.hive2Url)??Et.EMPTY_STRING,productCode:(t==null?void 0:t.productCode)??e??Et.EMPTY_STRING,edi:(t==null?void 0:t.edi)??Et.EMPTY_STRING}}catch(r){return ni.error("OL: Error in pbToEasyService::getOrderingData method: "+r.message),{}}}function bM(t,n){return t!=null&&t.orderingId?t==null?void 0:t.orderingId:n||Et.DUMMY_ORDERING_ID}function vM(t,n){try{return{reloadSolution:(t==null?void 0:t.reloadSolution)??Et.EMPTY_STRING,reloadConfiguration:t!=null&&t.reloadConfiguration?t.reloadConfiguration:n||!1,reloadConfigurationIdSandC:(t==null?void 0:t.reloadConfigurationIdSandC)??n??Et.EMPTY_STRING}}catch(e){return ni.error("OL: Error in pbToEasyService::getReloadObj method: "+e.message),{}}}function wM(t,n){var e,i,r,o;try{return{technology:((i=(e=t==null?void 0:t.parts)==null?void 0:e.pimString)==null?void 0:i.type)??Et.EMPTY_STRING,dataId:((o=(r=t==null?void 0:t.parts)==null?void 0:r.pimString)==null?void 0:o.value)??Et.EMPTY_STRING,project:M2.ANY,country:(n==null?void 0:n.country)??Et.EMPTY_STRING,language:(n==null?void 0:n.language)??Et.EMPTY_STRING}}catch(s){return ni.error("OL: Error in pbToEasyService::getSelectorObj method: "+s.message),{}}}function yM(t,n,e,i){try{return{configuredReference:(t==null?void 0:t.configuredReference)??n??Et.EMPTY_STRING,[rm.CUSTOM_CONFIGUREDREFERENCE_1]:(t==null?void 0:t[rm.CUSTOM_CONFIGUREDREFERENCE_1])??e??Et.EMPTY_STRING,[rm.CUSTOM_CONFIGUREDREFERENCE_2]:(t==null?void 0:t[rm.CUSTOM_CONFIGUREDREFERENCE_2])??i??Et.EMPTY_STRING}}catch(r){return ni.error("OL: Error in pbToEasyService::getCustomizationObj method: "+r.message),{}}}function kM(t,n="",e=""){var i,r;try{const o=(i=t==null?void 0:t.orderingData)==null?void 0:i.hive2,s=t==null?void 0:t.hive2;return((r=t==null?void 0:t.partType)==null?void 0:r.toLowerCase())===Ro.CTO.toLowerCase()||e.toLowerCase()===IR.APPLICATION_SOURCE.SELECTOR_AND_CONFIGURATOR.toLowerCase()&&n||o||s?Ro.CTO:Ro.NON_CTO}catch(o){return ni.error("OL: Error in pbToEasyService::getPartType method: "+o.message),Et.EMPTY_STRING}}function SM(t,n){try{return t==null?void 0:t.map(({currency:e,productId:i,productRef:r,quantity:o,cost:s,price:l,description:a})=>({[bw]:Cw(s??{},e??Et.EMPTY_STRING),[kw]:a||Et.EMPTY_STRING,[_w]:Tw(l,e??Et.EMPTY_STRING),[vw]:Sw(i??Et.EMPTY_STRING,r,n),[ww]:o??Et.EMPTY_STRING}))}catch(e){return ni.error("OL: Error in pbToEasyService::getSubParts method: "+e.message),[]}}function TM(t,n){try{let e=Et.EMPTY_STRING;switch(t){case $a.REFRENCE_KEY:e=$a.GUIDED_SEARCH;break;case $a.IMPORT:e=$a.EXCEL_UPLOAD;break;default:e=n;break}return e}catch(e){return ni.error("OL: Error in pbToEasyService::getApplicationSource method: "+e.message),Et.EMPTY_STRING}}function Sw(t,n,e){try{return(e==null?void 0:e.toLowerCase())===Ro.CUSTOMIZABLE.toLowerCase()?t||n:n||t}catch(i){return ni.error("OL: Error in pbToEasyService::getProductId method: "+i.message),Et.EMPTY_STRING}}function CM(t,n){try{const e=OM(t,n);return e==null?void 0:e.map(({parts:i,productRef:r,configurationId:o,productCode:s,personalizationId:l,firstCharacteristic:a,secondCharacteristic:c,source:u,applicationSource:d,...f})=>{var p,m;return{[hM]:TM(u,d)??Et.EMPTY_STRING,[bw]:Cw(f==null?void 0:f.cost,(p=i==null?void 0:i[0])==null?void 0:p.currency),[cM]:yM(f==null?void 0:f.customization,l,a,c),[kw]:(f==null?void 0:f.description)??Et.EMPTY_STRING,[mM]:(f==null?void 0:f.freeText)??null,[pM]:(f==null?void 0:f.freezeItem)??!1,[yw]:f.groupId??Et.EMPTY_STRING,[fM]:f.isParent??!1,[aM]:_M(f==null?void 0:f.orderingData,o,s,f==null?void 0:f.hive2),[uM]:kM(f,o,d),[dM]:f.serialNum??Et.EMPTY_STRING,[_w]:Tw(f==null?void 0:f.price,(m=i==null?void 0:i[0])==null?void 0:m.currency),[vw]:Sw(f==null?void 0:f.productId,r,f==null?void 0:f.partType),[ww]:f.quantity??Et.EMPTY_STRING,[oM]:vM(f==null?void 0:f.reloadData,o),[lM]:wM(f,t),[gM]:SM(i,f==null?void 0:f.partType)??Et.EMPTY_ARRAY}})}catch(e){return ni.error("OL: Error in pbToEasyService::addProducts method: "+e.message),[]}}function EM(t){try{const{country:n=Et.EMPTY_STRING,language:e=Et.EMPTY_STRING}=t;return`${e}_${n}`}catch(n){return ni.error("OL: Error in pbToEasyService::getLocale method: "+n.message),Et.EMPTY_STRING}}function Tw(t,n){try{return{currency:(t==null?void 0:t.currency)??n??Et.EMPTY_STRING,overwritePrice:t!=null&&t.overwritePrice?t==null?void 0:t.overwritePrice:!1,pbValue:typeof t===Oe.NUMBER?t:(t==null?void 0:t.pbValue)??null,priceDate:(t==null?void 0:t.priceDate)||new Date().toJSON().slice(0,10),source:(t==null?void 0:t.source)||Et.EMPTY_STRING,value:(t==null?void 0:t.value)??null}}catch(e){return ni.error("OL: Error in pbToEasyService::getPrice method: "+e.message),{}}}function Cw(t,n){try{return{costDate:(t==null?void 0:t.costDate)||new Date().toJSON().slice(0,10),currency:(t==null?void 0:t.currency)??n??Et.EMPTY_STRING,overwriteCost:t!=null&&t.overwriteCost?t==null?void 0:t.overwriteCost:!1,source:(t==null?void 0:t.source)||Et.EMPTY_STRING,value:t!=null&&t.value?t==null?void 0:t.value:0}}catch(e){return ni.error("OL: Error in pbToEasyService::getCost method: "+e.message),{}}}function IM(t){try{let n=function(r,o){var s;const l={groupName:r.name,id:r.id,parentGroupId:o};if(i.push(l),r!=null&&r.groups&&((s=r.groups)==null?void 0:s.length)>0)for(const a of r.groups)n(a,(r==null?void 0:r.id)??Et.EMPTY_STRING)};const{groups:e}=(t==null?void 0:t.bom)??[],i=[];if(e&&(e==null?void 0:e.length)>0)for(const r of e)n(r,Et.EMPTY_STRING);return i??[]}catch(n){return ni.error("OL: Error in pbToEasyService::extractGroups method: "+n.message),[]}}function AM(t,n=!0){try{return{data:{bomID:t.bomID??Et.EMPTY_STRING,event:t.eventName??Et.EMPTY_STRING,filters:t.filters??Et.EMPTY_ARRAY,id:t.id??Et.EMPTY_STRING,lastModifiedAt:PM((t==null?void 0:t.lastModifiedDate)??Et.EMPTY_STRING),source:(t==null?void 0:t.source)??Et.EMPTY_STRING,userName:t.userName??Et.EMPTY_STRING},bom:{country:(t==null?void 0:t.country)??Et.EMPTY_STRING,freezeBom:(t==null?void 0:t.getFreezeBom)??!1,documentUrl:(t==null?void 0:t.documentUrl)??[],groups:IM(t),locale:EM(t),products:CM(t,n)}}}catch(e){return ni.error("OL: Error in pbToEasyService::getResponseStructure method: "+e.message),{}}}function OM(t,n=!0){try{const{bom:e}=t;let i=[];return i=Ew(e,i),n?i.length>0?i.map(r=>{if(r.isSelected)return r!=null&&r.parts||(r[$a.URL]=Et.EMPTY_STRING),r}).filter(Boolean).flat():[]:i}catch(e){return ni.error("OL: Error in pbToEasyService::getSelectedProductsFromBom method: "+e.message),[]}}const Ew=(t,n)=>{var e;try{for(const i in t)if(i===$a.PARTS&&(t[$a.ID]&&(e=t[i])!=null&&e.length&&(t[i][0][yw]=t[$a.ID]),t[i]&&t[i].length>0&&(n=[...n,...t[i]])),i===$a.GROUPS&&t[i]&&t[i].length>0)for(const r of t[i])n=Ew(r,n);return n}catch(i){return ni.error("OL: Error in pbToEasyService::getAllParts method: "+i.message),[]}};function PM(t){return t??new Date().toUTCString()}function NM(t,n,e){let i=[],r=[];return i=Iw(t,i),i=LM(i),r=jM(i,r),ni.info("Merged parts created from OL",JSON.stringify(r)),r}function Iw(t,n){for(const e in t)if(e===OR&&t[e]&&(n=[...n,...t[e]]),e===PR&&t[e])for(const i of t[e])n=Iw(i,n);return n}function LM(t){const n=new Set(t.map(e=>(e==null?void 0:e.productRef)??(e==null?void 0:e.productId)));return(n==null?void 0:n.size)<(t==null?void 0:t.length)&&(t=RM(t)),MM(t),t}function jM(t,n){return t==null||t.forEach(e=>{var i;n.push(e),((i=e==null?void 0:e.parts)==null?void 0:i.length)>0&&(n=[...n,...e.parts])}),n}function RM(t){return Object.values(t.reduce((n,e)=>{const i=(e==null?void 0:e.productRef)??(e==null?void 0:e.productId);return n[i]?n[i].quantity+=e.quantity:n[i]=Object.assign({},e),n},{}))}function MM(t,n){let e;e=0,t=t.map(i=>{var r;return e=e+1,e>9?i.serialNum=`${lw.SINGLE_ZERO}${e}`:i.serialNum=`${lw.DOUBLE_ZERO}${e}`,i!=null&&i.parts&&((r=i==null?void 0:i.parts)==null?void 0:r.length)>0&&(i.parts=i.parts.map((o,s)=>(o.serialNum=`${i.serialNum}${NR}${s+1}`,o))),i})}const om={SCHEMA:Vc,SERVICE:Wc};function Wg(t){const n=document.getElementById(t);if(n&&(n!=null&&n.shadowRoot)){const e=document.createElement("style");e.textContent=` .qds-button { display: flex !important; gap: 10px !important; }`,n.shadowRoot.appendChild(e)}}function Oi(t){t&&(document.body.style.overflow=t)}function La(t,n){var e,i;return(t==null?void 0:t.length)&&(t==null?void 0:t.toLowerCase())===((i=((e=n==null?void 0:n.profile)==null?void 0:e.email)||Te)==null?void 0:i.toLowerCase())}function Aw(t){isNaN(t.target.value)||t.preventDefault()}async function Vg(t){const n=document.getElementById(t).innerHTML;try{return await navigator.clipboard.writeText(n),!0}catch{return!1}}function am(t,n,e){let i;if(!t||typeof t!==za)i=Te;else if(!n||Js!=null&&Js.size[n])i=Te;else{const r=e?HL:WL,o=Js==null?void 0:Js.environment[r];o||(i=Te),i=`${o}${Js==null?void 0:Js.docref}${t}&${Js==null?void 0:Js.fileType}${n}`}return i}function Jc(t){const i=Ow(t==null?void 0:t.parts,0),r=Pw(t==null?void 0:t.groups,0);return i+r}function Ow(t,n){const e=isNaN(t==null?void 0:t.length)?0:t==null?void 0:t.length;return n=n+e,n}function Pw(t,n){return t==null||t.forEach(e=>{var i,r;((i=e==null?void 0:e.parts)==null?void 0:i.length)>0&&(n+=Ow(e.parts,0)),((r=e==null?void 0:e.groups)==null?void 0:r.length)>0&&(n+=Pw(e.groups,0))}),n}function gf(t){if(t!=null&&t.bom){const e=ic(t);$r.set(e)}}function Nw(t,n,e,i,r,o,s,l,a,c){return{action:t,subaction:n,platform:e,...i&&{listId:i},...r&&{anonymousListId:r},...s&&{list:s},...a!==void 0&&{price:a},...c&&{user:c},...o&&{isList:o},...l&&{cartId:l}}}function gs(t,n,e,i,r,o,s){const l=Nw(t,n,e,i,r,!0,o,s);dr(l)}async function qM(t,n,e){try{const i=await Promise.resolve().then(()=>ll),{Workbook:r}=i,o=new r,s=o.addWorksheet(e);s.columns=t.map(p=>{var m;return{width:((m=p.w)==null?void 0:m.width)||15}});const l=t.map(p=>p.v);s.addRow(l),s.getRow(1).eachCell(p=>{p.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FF008029"}},p.font={bold:!0,color:{argb:"FFFFFFFF"}}}),n.forEach(p=>s.addRow(p)),s.getColumn(6).alignment={wrapText:!0};const c=await o.xlsx.writeBuffer(),u=new Blob([c],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),d=document.createElement("a");d.href=URL.createObjectURL(u),d.download=`${e}.xlsx`,d.click(),URL.revokeObjectURL(d.href);const f={document_name:`${e}.xlsx`,document_id:"",document_type:"xlsx",link_url:d.href,content_group:"",content_type:""};return Bn("file_download",f),!0}catch(i){return ve.info(i,"createAttachmentForListDownload"),!1}}function Yg(){Wi.update(()=>!0),nr.update(()=>rA),tr.update(()=>mr)}function Zg(t){t.currentTarget.src=BN}function el(t){return t[$o]===Ae.SHOW||t[$o]===Ae.DISABLED}function tl(t,n){const e=new CustomEvent(t,{detail:n});document.dispatchEvent(e)}function DM(){try{return window.innerWidth<968}catch{return!1}}function Ld(t,n){const e=new Date;e.setFullYear(e.getFullYear()+1);const i="expires="+e.toUTCString(),r=nl.getBaseDomain();document.cookie=`${t}=${n}; ${i}; Domain=${r};path=/;`}function Lw(t){const n=nl.getBaseDomain();n?document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; Domain=${n};path=/;`:document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`}function jw(){var t;if(!zt()){let n=[];an.subscribe(e=>n=e),Ld(`${(t=We==null?void 0:We.country)==null?void 0:t.toUpperCase()}${Hv}`,Jc(n==null?void 0:n.bom))}}function Xg(t){var n;Yn()&&!zt()&&Ld(`${(n=We==null?void 0:We.country)==null?void 0:n.toUpperCase()}${Wv}`,t)}async function jd(t,n="false"){ve.info("productsInCart::",t),ve.info("Event listener sendBomDataToCpq"),ki.set(!0);let e=!1;const i=void 0,r=fd(t,i,!0);e=r==null?void 0:r.find(l=>{var a;return l!=null&&l.eolStatus?((a=l==null?void 0:l.eolStatus)==null?void 0:a[0])!==gi:null});let o;const s=await yf(t,i,!0);if(e?o=new CustomEvent(yi.ADD_TO_QUOTE_BOM_DATA,{detail:{bomData:s,showConfirmation:{confirm:!0,confirmText:fp(Vt)("cpq.cpq_popup_content")}}}):o=new CustomEvent(yi.ADD_TO_QUOTE_BOM_DATA,{detail:{bomData:s,showConfirmation:{confirm:!1}}}),ki.set(!1),ve.info("send Bom Data Event to cpq",o),document.dispatchEvent(o),n==="true"){const l=new CustomEvent(rs.PUBLIC_CART_DATA_TRANSFER);ve.info("public cart data transfer cqp",l),document.dispatchEvent(l)}}function Rd(t){const n=new BroadcastChannel(t),e={status:"Success",tabId:fp(Gh)};n.postMessage(e)}function Rw(t,n=!1){if(!n)return;const e=new BroadcastChannel(t),i={status:"Success",tabId:fp(Gh),listId:n};e.postMessage(i)}function Md(t){const n=document.cookie.split("; ");for(const e of n){const[i,r]=e.split("=");if(i===t)return decodeURIComponent(r)}}function Kg(t){let n=Jc(t==null?void 0:t.bom);return n=n||n!==0?n-1:0,n}const nl=function(){const t=()=>Md(`${s()}${Fc}`),n=()=>Md(`${s()}${Zu}`),e=()=>{var l;return Md(`${(l=We.country)==null?void 0:l.toUpperCase()}${Wv}`)},i=l=>{const a=Md(l);if(a!=null&&a!=="")return a},r=()=>{var l;return Md(`${(l=We.country)==null?void 0:l.toUpperCase()}${Hv}`)},o=()=>window.location.hostname.includes("se.com")?".se.com":window.location.hostname,s=()=>{var l;return((l=We.country)==null?void 0:l.toLowerCase())||""};return{getCartId:t,getListId:n,getCartCount:e,getListCount:r,getBaseDomain:o,getCookieValue:i}}();async function _f(t,n){await E2({bom:{parts:[],groups:[]},country:t,language:n,isTransferred:!1,productCount:0})}async function Mw(){return await Yh({name:Yv[((We==null?void 0:We.language)||"").toLowerCase()]||Yv.en,description:Te})}async function qw(t,n,e){const i=Nw(M0,n,e,void 0,t);await dr(i)}async function Dw(t,n,e=!1){await pj(BM(t,n,e))}function BM(t,n,e=!1){return`${gh.FORMAT_SKU}${gh.PLATFORM_PARAM}${t}${gh.CART_PARAM}${n}${gh.LIST_PARAM}${e}`}function lm(t={}){let n={success:!1};if(t.detail){let e=t.detail.payload||t.detail||{};const i=t.detail.type||"sc",r=om.SCHEMA[i.toUpperCase()]||om.SCHEMA.SC;if(r&&(r===om.SCHEMA.EASY&&e.easyData&&(e=e.easyData),!e.applicationSource&&om.SCHEMA.SC===r&&(e.applicationSource="default"),n=aw(r,e),!n.success)){const o=n.error;o&&o.length&&(ve.info("validation Schema Error"),o.forEach(s=>{ve.info(`${s.path.join(".")} : ${s.message}`)}))}}return n}function Bw(t={},n,e){let i=t.productRef||t.productId;n&&e&&(i=`${n} : ${e}`);const r=t.extras||{};return r.configurationName&&(r.pluginId==="s&c"||r.pluginId==="pes")&&(i=r.configurationName),i}async function UM(t={},n){const e=t.orderingData||{},i=t.configurationId||e.configurationId||e.orderingId;if(i)return!(t.hive2||e.hive2)&&!(t.hive2||e.hive2)?await eq(i,n):!1}function Uw(t=[]){const n={items:[],flag:!1};return t&&t.length>0&&t.forEach(e=>{const i=JSON.parse(JSON.stringify(e));i.isGCR==!1&&i.hive&&(n.flag=!0,delete i.hive),n.items.push(i)}),n}function Qc(t){delete t.id,delete t.federatedId;const n=`${We.country.toLowerCase()}`;return localStorage.getItem(n)!==null&&delete t.platform,t.errorReport&&(delete t.message,delete t.errorReport),t}function cm(t){const n=t.target.value;return/^(?:[1-9]\d*|0?[1-9])$/.test(String(n)+t.key)||t.preventDefault(),n??0}function zM(t,n,e,i,r){Wn(!1),u_(t,n,r).catch(()=>{Mi(i)}).then(()=>{var l;gg.set(!1),bo(e);let o,s;if(Ki.subscribe(a=>s=a),s===qn||s===Vn){s===qn?an.subscribe(p=>o=p):s===Vn&&$r.subscribe(p=>o=p);const a=mn(We.country,o),c=gn(We.language,o),u=(t==null?void 0:t.bom)||{},d=Jc(u)||0,f=((l=u.groups)==null?void 0:l.length)||0;d>0||f>0?ci(n||t.id,a,c,We.apigeeToken).then(function(p){ve.info(p)}).catch(function(p){ve.error(String(p.message))}):s===Vn&&gf({bom:{parts:[],groups:[]}})}}).finally(()=>{Zo.set(!1),Xr.set(!0),ve.info("Project BOM updated for project with ID: ",String(t.id))})}function _o(t){t==null||t.forEach(n=>{var e,i;delete n.isSelected,((e=n==null?void 0:n.parts)==null?void 0:e.length)>0&&n.parts.forEach(r=>{var o;delete r.isSelected,((o=r==null?void 0:r.parts)==null?void 0:o.length)>0&&r.parts.forEach(s=>{delete s.isSelected})}),((i=n==null?void 0:n.groups)==null?void 0:i.length)>0&&_o(n.groups)})}function ja(t){t==null||t.forEach(n=>{var e;n==null||delete n.isSelected,(e=n==null?void 0:n.parts)==null||e.forEach(i=>{i==null||delete i.isSelected})})}function Jg(t,n,e,i,r){let o=[];for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(typeof t[s]==Al?o=o.concat(Jg(t[s],n,e,i,r)):s==n&&t[s]===e&&(t[i]=r));return t}function um(t,n,e){var i,r;return t!=null&&t.groups&&(t==null?void 0:t.groups.length)>0?((i=t==null?void 0:t.groups)==null?void 0:i.some(o=>String(o[n]).toLocaleLowerCase()===String(e)))||((r=String(t==null?void 0:t[n]))==null?void 0:r.toLocaleLowerCase())===String(e):!1}function qo(t,n,e,i){var o;let r;return!(t!=null&&t.groups)||((o=t==null?void 0:t.groups)==null?void 0:o.length)===0?r=Qg(n,1,i):r=FM(t,n,e,r,i),r}function Qg(t,n,e){return`${t}${e}${n}`}function FM(t,n,e,i,r){const o=[];return(t==null?void 0:t.groups.map(l=>String(l[e])).toString().toLocaleLowerCase().match(new RegExp(n.toLocaleLowerCase(),"g")))!==null?(t.groups.forEach(l=>{const a=String(l[e]).toLocaleLowerCase().split(r).length===n.toLocaleLowerCase().split(r).length+1;if(String(l[e]).toLocaleLowerCase().startsWith(n.toLocaleLowerCase())&&a){const c=String(l[e]).toLocaleLowerCase().split(r);c[Number(c.length-1)].match(new RegExp(vp,"g"))===null&&o.push(Number(String(l[e]).split(r)[c.length-1]))}}),i=Qg(n,o.length!=0?Math.max(...o)+1:1,r)):i=Qg(n,1,r),i}function fm(t,n){return t===Ti?{groupExists:n,subGroupExists:!n}:{groupExists:!n,subGroupExists:n}}function $g(t,n,e,i){let r=[];for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(typeof t[o]==Al)r=r.concat($g(t[o],n,e,i));else if(o==n&&t[o]===i){const s=t.parts.splice(t.parts.findIndex(l=>l.id===e),1);Bn(Nn.VIEW_ITEM_LIST,s,"","remove_from_list",!1,"list",!0)}}return t}function zw(t,n,e,i,r){let o=[];for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(typeof t[s]==Al?o=o.concat(zw(t[s],n,e,i,r)):s===n&&t[s]===i&&(t.parts.splice(t.parts.findIndex(l=>l.id===e),1),t.parts=Xa(Ha,t.parts,r)));return t}function Fw(t,n,e,i){let r=[];for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(typeof t[o]==Al)r=r.concat(Fw(t[o],n,e,i));else if(o==n&&t[o]===i){const s=((t==null?void 0:t.groups)||[]).find(a=>a.id===e);let l=[];l=Ao(s,l),Bn(Nn.VIEW_ITEM_LIST,l,"","remove_from_list",!1,"list",!0),t.groups.splice(t.groups.findIndex(a=>a.id===e),1)}}return t}function e_(t,n,e,i,r,o){var l;let s=[];for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(typeof t[a]==Al?s=s.concat(e_(t[a],n,e,i,r,o)):a==n&&t[a]===e&&(((l=t.groups)==null?void 0:l.length)>0?t.groups.unshift({name:i,id:String(Te),groups:r,parts:o}):(t.groups=[],t.groups.push({name:i,id:String(Te),groups:r,parts:o}))));return t}function t_(t,n){const e=t.parts.splice(t.parts.findIndex(i=>i.id===n),1);Bn(Nn.VIEW_ITEM_LIST,e,"","remove_from_list",!1,"list",!0)}function xw(){let t;return oh.subscribe(n=>{t=String(n)}),t}function Gw(){let t;return ah.subscribe(n=>{t=String(n)}),t}function Hw(){let t;return Gu.subscribe(n=>{t=n}),t}function qd(t,n,e,i){const r=[];t.parts&&t.parts.length>0&&(t.parts.forEach(o=>{o.isSelected&&(e.push(o),r.push(o))}),Ww(t,r)),t.groups&&t.groups.length>0&&t.groups.forEach(o=>{if(!o.isSelected){const s=[];o.parts&&o.parts.length>0&&o.parts.forEach(l=>{l.isSelected&&(e.push(l),s.push(l))}),Ww(o,s)}(i===tg&&o.isSelected||i===Rc&&o.isDisabled&&o.isSelected)&&n.push(o),o.groups&&o.groups.length>0&&!o.isSelected&&qd(o,n,e,i)})}function Ww(t,n){t.parts&&t.parts.length>0&&t.parts.forEach(()=>{n.forEach(e=>{t.parts=t.parts.filter(i=>i.id!==e.id)})})}function Dd(t,n){t.groups&&t.groups.length>0&&t.groups.forEach(e=>{n.forEach(i=>{t.groups=t.groups.filter(r=>r.id!==i.id)}),e.groups&&Dd(e,n)})}function n_(t){t==null||t.forEach(n=>{var e;n!=null&&n.isSelected&&Xo.update(()=>!0),((e=n==null?void 0:n.groups)==null?void 0:e.length)>0&&n_(n.groups)})}function _s(t){return JSON.parse(JSON.stringify(t))}function Do(t=[],n){for(const e in t)if(e===ov.toLocaleLowerCase()&&t[e]&&(n=[...n,...t[e]]),e===av.toLocaleLowerCase()&&t[e])for(const i of t[e])n=Do(i,n);return n}function i_(t){t.groups&&t.groups.length>0?(t.groups.some(n=>n.isSelected===!0)&&(t.isDisabled=!0),t.groups.forEach(n=>{n.isDisabled===!0&&n.isSelected===!0&&Vw(n),i_(n)})):t.isSelected&&(t.isDisabled=!0)}function Vw(t){var n;(n=t==null?void 0:t.groups)==null||n.forEach(e=>{e.isDisabled=!0,Vw(e)})}function r_(t,n,e,i){n.id?t.groups.reduce(function(r,o){n.id===o.id&&Yw(o,e,i),o.groups&&o.groups.length>0&&r_(o,n,e,i)},[]):Yw(t,e,i)}function Yw(t,n,e){n.length!==0&&(t.groups||(t.groups=[]),t.groups=n.concat(t.groups)),e.length!==0&&(t.parts||(t.parts=[]),t.parts=bf(e.concat(t.parts)))}function bf(t){return Object.values(t.reduce((n,e)=>{const i=(e==null?void 0:e.productRef)??(e==null?void 0:e.productId);return n[i]?n[i].quantity+=e.quantity:n[i]=Object.assign({},e),n},{}))}function tc(t){var s;let n=[];n=Do(t,n);const e=n.filter(l=>{var a;return l.isSelected&&((a=l==null?void 0:l.eolStatus)==null?void 0:a.length)>0&&l.eolStatus.includes(gi)&&!nc(l)});kg.update(()=>e);const i=n.filter(l=>l.isSelected);Mv.update(()=>n.filter(l=>l.isSelected&&l.VAconfigId)),qs.update(()=>(i==null?void 0:i.length)??0),Yn()&&(td.set(i),KM());const r=((s=i.filter(l=>{var a;return((a=l==null?void 0:l.eolStatus)==null?void 0:a.length)>0&&l.eolStatus.includes(gi)||zd(l)||(l==null?void 0:l.hive2)!==on}))==null?void 0:s.length)??0;rd.update(()=>r);const o=cw(n.filter(l=>{var a;return l.isSelected&&((a=l==null?void 0:l.eolStatus)==null?void 0:a.length)>0&&l.eolStatus.includes(gi)}));id.update(()=>o)}function s_(t){const n=!!Do(t,[]).length;lh.update(()=>n)}function xM(t){let n="";const e=new Uint8Array(t);for(let i=0;ill),{Workbook:r}=i,o=new r,s=o.addWorksheet(e);t=t.map(u=>u.v),s.addRow(t),s.addRows(n);const l=s.getRow(1);l.font={bold:!0};const a=await o.xlsx.writeBuffer();ve.info("share bom: info: creating the email attachment :: project-bom-utils.ts :: createAttachment");const c={document_name:`${e}.xlsx`,document_id:"",document_type:"xlsx",link_url:"",content_group:"",content_type:""};return Bn("file_download",c),xM(a)}catch(i){return ve.error("share bom: error: project-bom-utils.ts :: createAttachment",i),null}}function il(t,n,e,i,r,o){t=n,zM({bom:t},String(e.id),i,r,o)}function Bd(t,n){t==null||t.forEach(e=>{var i;((i=e==null?void 0:e.groups)==null?void 0:i.length)>0?((e!=null&&e.isSelected||e!=null&&e.isHideSubgroupButton||n)&&(e.isHideSubgroupButton=!0,e.groups=e.groups.map(r=>(r.isHideSubgroupButton=!0,r))),Bd(e.groups,n)):(e!=null&&e.isSelected||n)&&(e.isHideSubgroupButton=!0)})}function Ud(t){t==null||t.forEach(n=>{var e;delete n.isHideSubgroupButton,((e=n==null?void 0:n.groups)==null?void 0:e.length)>0&&Ud(n.groups)})}function vf(t,n,e){const i=t.replace("{locale}/Sample-Template",`${String(n)}/${e}`);window.location.href=i}function dm(t,n,e){return t===Ti?n:e}function pm(t,n,e){return t===Ti?n:e}function nc(t){return(t==null?void 0:t.partType)===Ei.CTO||t.partType===Ei.CONFIGURABLE}function zd(t){return!!t.hive2File}function o_(t){return Ra(t)}function GM(t){return t===Ei.CONFIGURABLE}function HM(t){return t===Ei.CTO}function Ra(t){var n;return!((n=t==null?void 0:t.serialNum)!=null&&n.includes("-"))}function Xw(t){return JSON.parse(JSON.stringify(t))}function a_(t){return t==null?void 0:t.reduce((e,i)=>e+(i==null?void 0:i.quantity),0)}function hm(){qs.set(0),rd.set(0),id.update(()=>[])}function Kw(t,n,e){var r;const i=(r=n==null?void 0:n.bom)==null?void 0:r.groups.findIndex(o=>(o==null?void 0:o.configurationMasterId)===t);i>=0?WM(i,n,e):Jw(e.name,n,e)}function WM(t,n,e){var i,r,o,s,l,a,c;(o=(r=(i=n==null?void 0:n.bom)==null?void 0:i.groups[t])==null?void 0:r.parts)==null||o.push(...e.parts),n.bom.groups[t].parts=bf((l=(s=n==null?void 0:n.bom)==null?void 0:s.groups[t])==null?void 0:l.parts),((c=(a=n==null?void 0:n.bom)==null?void 0:a.groups[t])==null?void 0:c.name)!==(e==null?void 0:e.name)&&(n.bom.groups[t].name=e==null?void 0:e.name)}function Jw(t,n,e){var r,o;((r=n==null?void 0:n.bom)==null?void 0:r.groups.findIndex(s=>s.name===t))>=0?(e.name=h_(e),Jw(e.name,n,e)):(o=n==null?void 0:n.bom)==null||o.groups.unshift(e)}function mm(t){return t.reduce((e,i)=>{const r=typeof(i==null?void 0:i.price)===Vs?i.price.pbValue||0:i.price||0;return e+Number(r)},0)}function wf(t){var e;let n=Te;return t&&(n=t.country,(e=t.ownerInfo)!=null&&e.country&&(n=t.ownerInfo.country)),VM(n)}function VM(t){const n=Yn(),e=zt(),i=YM(e);return n?i.includes(t==null?void 0:t.toUpperCase())?0:1:!i.includes(t==null?void 0:t.toUpperCase())}function YM(t){return Yn()?t?zu.UC.private:zu.UC.public:zu.PB}function Qw(t,n,e=!1){let i=n||e?t:t==null?void 0:t.filter(r=>r.isSelected);return t==null||t.forEach(r=>{var o,s,l;r!=null&&r.groups&&((o=r==null?void 0:r.groups)==null?void 0:o.length)>0&&(i==null?void 0:i.length)===0&&(i=i==null?void 0:i.concat(Qw(r.groups,n,e))),r!=null&&r.groups&&((s=r==null?void 0:r.groups)==null?void 0:s.length)===0&&(r!=null&&r.parts)&&((l=r==null?void 0:r.parts)==null?void 0:l.length)>0&&(i==null?void 0:i.length)===0&&(i=i==null?void 0:i.concat(e?r==null?void 0:r.parts:r==null?void 0:r.parts.filter(a=>a.isSelected)))}),i}function ZM(t,n,e=!1){var s;const i=n||e?t.parts:(s=t.parts)==null?void 0:s.filter(l=>l.isSelected),r=Qw(t.groups,n,e);return{parts:i,groups:r}}async function yf(t,n,e=!1){var l,a,c;const{bom:i,id:r}=t,o=ZM({...i},n,e),s=await $M({bom:o,projectId:r});if((l=s==null?void 0:s.data)!=null&&l.id){let u;Ua.subscribe(g=>u=g);const d={event:yi.BOM_ADDED_TO_QUOTE,filters:[gN,_N],projectBuilderId:t.id,id:(a=s==null?void 0:s.data)==null?void 0:a.id,source:bN,username:((c=u==null?void 0:u.user)==null?void 0:c.name)??on,lastModifiedAt:new Date().toUTCString()};let f=!n;f=Yn()?!1:f;const p=Hg(t,f);ve.info("OL Response for PB to Easy Service :: ",p);const m=rM(p,d);return ve.info("OL Response for Easy to Easy Out Service :: ",m),m}}function gm(t,n){const e=t.bom.products;Br(n,cn+"{activity_log.message_product_added_cpq_action}"+cn,on+"{activity_log.message_product_added_cpq_subaction}"+cn,"{activity_log.message_added_product}"+cn+e.length+cn+"{activity_log.message_product_added_cpq_description}",e)}async function _m(t,n){const e=ss(Av.action,`${Av.subAction} - ${n.length}`,Fo,t,void 0,n);await dr(e)}function kf(t,n){const e=document.createElement("style");e.textContent=n,t.shadowRoot.appendChild(e)}function $w(){const t=document.querySelectorAll(".action_btn");t==null||t.forEach(n=>{n&&n.shadowRoot&&kf(n,` .qds-button { display: flex !important; gap: 10px !important; } `)})}function ey(t){let n=0;function e(r){r.forEach(o=>{o!=null&&o.quantity&&(n+=Number(o==null?void 0:o.quantity))})}t!=null&&t.parts&&e(t==null?void 0:t.parts);function i(r){r==null||r.forEach(o=>{o!=null&&o.parts&&e(o==null?void 0:o.parts),o!=null&&o.groups&&i(o==null?void 0:o.groups)})}return t!=null&&t.groups&&i(t==null?void 0:t.groups),n}function ty(t){return!(t!=null&&t.price)&&!(t!=null&&t.isParent)||(t==null?void 0:t.isParent)&&(t==null?void 0:t.isCTOItemPriceMissing)}function l_(t={}){const n=Do(t.bom,[]),e=n==null?void 0:n.filter(i=>ty(i));(e==null?void 0:e.length)>0?Bc.set(!0):Bc.set(!1),hg.set(n==null?void 0:n.length)}function c_(t,n){var e;try{if(t[0]){const i=t[0];t=(e=t[0].parts)==null?void 0:e.map(o=>(delete i.isParent,delete i.parts,i.isCto=Dc,i.VAconfigId=n,i.productRef=o.productRef||o.productId,o.partType=Ei.DEFAULT,{...i,...o}))}}catch(i){ve.error("project-bom-utils :: vAndaDataConversion :: Error in converting the V&A configurator data",i)}}function bm(t,n){const e=Ao(t,[]),i=[];return e.forEach(r=>{r.VAconfigId&&r.VAconfigId===n&&i.push(r.id)}),i}function vm(t){return t===qb?CP:t===Db?EP:TP}let $c=0;function ic(t){var n,e;return $c=0,t!=null&&t.bom&&(((e=(n=t.bom)==null?void 0:n.parts)==null?void 0:e.length)>0&&wm(t.bom.parts,!1),ny(t.bom)),t}function ny(t){var n;(n=t==null?void 0:t.groups)==null||n.forEach(e=>{var i,r;e!=null&&e.parts&&((i=e==null?void 0:e.parts)==null?void 0:i.length)>0&&wm(e.parts,!1),e!=null&&e.groups&&((r=e==null?void 0:e.groups)==null?void 0:r.length)>0&&ny(e)})}function wm(t,n){n&&($c=0),t=t.map(e=>{var i;return $c=$c+1,$c>9?e.serialNum=`${oN}${$c}`:e.serialNum=`${aN}${$c}`,e!=null&&e.parts&&((i=e==null?void 0:e.parts)==null?void 0:i.length)>0&&(e.parts=e.parts.map((r,o)=>(r.serialNum=`${e.serialNum}${DP}${o+1}`,r))),e})}function iy(t){return t=t.map(({id:n,productRef:e,description:i,quantity:r,price:o,eolStatus:s,partType:l,isParent:a,selectorId:c,personalizationId:u,productId:d,productCode:f,configurationId:p,parts:m,url:g,source:h,secondCharacteristic:_,firstCharacteristic:b,product:y,sourceCountry:k,applicationSource:T,freezeItem:R,groupId:O,reloadData:j,orderingData:q,cost:M,freeText:z,customization:D,hive2:P,widgetName:L,hive2File:C,isCto:S,configCharacteristicGroup:I,VAconfigId:N,extras:E,kbId:B})=>({id:n,productRef:e,description:i,quantity:r,price:o,eolStatus:s,partType:l,isParent:a,selectorId:c,personalizationId:u,productId:d,productCode:f,configurationId:p,parts:m,url:g,source:h,secondCharacteristic:_,firstCharacteristic:b,product:y,sourceCountry:k,applicationSource:T,freezeItem:R,groupId:O,reloadData:j,orderingData:q,cost:M,freeText:z,customization:D,hive2:P,widgetName:L,hive2File:C,isCto:S,configCharacteristicGroup:I,VAconfigId:N,extras:E,kbId:B})),t}function ry(t){return t.length&&(t.forEach((n,e)=>{n.parts&&(t[e].parts=iy(t[e].parts)),n.groups&&n.groups.length&&(n.groups=n.groups.map(({id:i,name:r,parts:o,groups:s,configurationMasterId:l})=>({id:i,name:r,parts:o,groups:s,configurationMasterId:l})),ry(n.groups))}),t=t.map(({id:n,name:e,parts:i,groups:r,configurationMasterId:o})=>({id:n,name:e,parts:i,groups:r,configurationMasterId:o}))),t}function ym(t){return t!=null&&t.parts&&(t.parts=iy(t.parts)),t!=null&&t.groups&&(t.groups=ry(t.groups)),t==null||delete t.isDisabled,t}function XM(t){t.isSelected?(qs.update(n=>n+1),td.update(n=>[...n,t])):(qs.update(n=>n-1),td.update(n=>n.filter(e=>e!==t)))}function KM(){Bc.set(!1);let t=0;return td.subscribe(n=>{t=n.reduce((e,i)=>{var r;return ty(i)&&Bc.set(!0),i!=null&&i.isParent?i!=null&&i.isCTOItemPriceMissing?e:e+Number(i==null?void 0:i.price)*Number(i==null?void 0:i.quantity):e+Number(((r=i==null?void 0:i.price)==null?void 0:r.pbValue)||(i==null?void 0:i.price)||0)*Number(i==null?void 0:i.quantity)},0)}),mg.set(t),t}function km(t,n){return t.isSelected=n,t.parts&&(t.parts=Sm(t.parts,n)),t.groups&&(t.groups=sy(t.groups,n)),t}function Sm(t,n){return t.forEach(e=>{n&&e.isSelected||(e.isSelected=n,Fd(e,n),XM(e))}),t}function Fd(t,n){var e;((e=t.parts)==null?void 0:e.length)>0&&t.parts.forEach(i=>{i.isSelected=n})}function sy(t,n){return t.forEach(e=>{e.isSelected=n,e.parts&&(e.parts=Sm(e.parts,n)),e.groups&&(e.groups=sy(e.groups,n))}),t}function xd(t){var n,e,i;if(t!=null&&t.isSelected){(n=t==null?void 0:t.groups)==null||n.forEach(s=>{xd(s)});const r=(e=t==null?void 0:t.parts)==null?void 0:e.some(s=>!s.isSelected),o=(i=t==null?void 0:t.groups)==null?void 0:i.some(s=>!s.isSelected);(r||o)&&(t.isSelected=!1)}}function Tm(t){let n=t;return typeof t!==Al&&(n=JSON.parse(t)),{countryCode:String(n[0].productselectorconfig.isocountry),languageCode:String(n[0].productselectorconfig.language)}}function ss(t,n,e,i,r,o,s,l){return{action:t,subaction:n,platform:e,...i&&{projectId:i},...r&&{anonymousProjectId:r},...o&&{bom:o},...s!==void 0&&{price:s},...l&&{user:l}}}async function u_(t,n,e,i=!0){var r,o;try{i&&hn.update(()=>!0),t.bom&&(t.bom=ym(t.bom)),(r=t.bom)==null||delete r.isSelected,_o((o=t.bom)==null?void 0:o.groups),hm();const s=`${We.country.toLowerCase()}`;localStorage.getItem(s)!==null&&delete t.platform;const{federatedId:l,id:a,...c}=t;ve.info("Updating Data",l,a),c.name=c.name&&tn(c==null?void 0:c.name),c.description=c.description&&tn(c==null?void 0:c.description);let u=!1;Ki.subscribe(f=>{f===Vn&&(u=!0)}),u&&(c.productCount=Jc((c==null?void 0:c.bom)||{}));let d=await nL(c,n,u);if(d.hasError){d=d;const f=d.message;Mi(ks(f,e)),hn.update(()=>!1),ve.error("project-bom.task :: updateProject :: ",d.message)}else{is.update(()=>!1),d=d,d.data=ic(d.data),Yn()&&jw();const f=d.data;s_(f.bom),an.update(()=>f),hn.update(()=>!1),Rw(rs.UPDATE_LIST,n),ve.info("project-bom.task :: updateProject :: ",d)}}catch(s){hn.update(()=>!1),ve.error("project-bom.task :: updateProject :: ",s)}}async function ro(t,n,e){var i;try{ka.set(!1),hn.update(()=>!0);let r=await Zv(t);if(r.hasError)r=r,hn.update(()=>!1),Jt.update(()=>!1),ve.error("project bom.task :: fetchProjectBomDetails error:: ",r.message),!zt()&&Yn()&&r.message==="PROJECT_NOT_FOUND"&&Mw().then(async o=>{const s=`${We.country.toLowerCase()}`;ve.info("Project ID generated: "+o),Ld(`${s}${Zu}`,o),await ro(o),qw(o,n,e)});else{r=r,qs.set(0),rd.set(0),r.data&&r.data.bom&&(r.data=ic(r.data));const o=r.data;s_(o.bom),o!=null&&o.user&&(o.isArchived=o.isArchived?o.isArchived:!((i=o==null?void 0:o.user)!=null&&i.canEdit)),an.update(()=>o),hn.update(()=>!1),Jt.update(()=>!1),ve.info("project bom.task :: fetchProjectBomDetails :: ",r.data)}}catch(r){hn.update(()=>!1),ve.error("project bom.task :: fetchProjectBomDetails error:: ",r)}}async function oy(t,n,e,i,r=!1){try{let o=await iL(t,n,e,p_(),r);if(o.hasError){o=o;const s=o.message;return Mi(ks(s,i)),ve.error("project bom.task :: uploadXLSCSVApi :: ",o.message),o}else return hn.update(()=>!1),ve.info("project bom.task :: uploadXLSCSVApi :: ",o),o}catch(o){hn.update(()=>!1),ve.error("project bom.task :: uploadXLSCSVApi :: ",o)}}async function ay(t,n,e,i,r){try{Wn(!1),hn.update(()=>!0);let o=await rL(t,n,e);if(o.hasError){hn.update(()=>!1),o=o;const s=o.message;return Mi(ks(s,i)),ve.error("project bom.task :: exportGroup :: ",o.message),o}else{hn.update(()=>!1),ve.info("project bom.task :: exportGroup :: ",o);const{data:s}=o;s.exportUrl?window.open(s.exportUrl,"_self"):Mi(r)}}catch(o){hn.update(()=>!1),ve.error("project bom.task :: exportGroup :: ",o)}}async function ly(t,n,e,i,r,o){var s,l;try{Wn(!1);let a=await Eg(t,n,e);if(a.hasError){hn.update(()=>!1),a=a;const c=a.message;Mi(c),ve.error("project bom.task :: guidedSearch :: ",a.message),Bo(i)}else if(hn.update(()=>!1),ve.info("project bom.task :: guidedSearch :: ",a),(s=a==null?void 0:a.documents)!=null&&s.length)if(r){const c=document.createElement("div");return c.innerHTML=a.documents[0].id,(c==null?void 0:c.innerText)===String(n.term)?String(a.documents[0][o].openUrl):null}else{let c="Cart Search";Ki.subscribe(f=>{f===qn&&(c="MyList Search")});const u={site_search_category:c,guidedSearch:"true",site_search_keyword:(n==null?void 0:n.filters[0].children[0].value)||"",siteSearchResults:(l=a==null?void 0:a.documents)==null?void 0:l.length};Bn(Nn.SEARCH,u);const d=(a==null?void 0:a.documents).map(f=>({product:String(f==null?void 0:f.catalogNumber),description:String(f==null?void 0:f.name),title:String(f==null?void 0:f.name)}));return Bo(null),d}else return Bo(i),null}catch(a){hn.update(()=>!1),Bo(i),ve.error("project bom.task :: guidedSearch :: ",a)}}async function cy(t,n,e,i){var r,o,s,l,a,c,u,d;try{Wn(!1);let f=await Eg(t,n,e);if(f.hasError){hn.update(()=>!1),f=f;const p=f.message;Mi(p),ve.error("project bom.task :: guidedSearch :: ",f.message),Bo(i)}else{hn.update(()=>!1),ve.info("project bom.task :: guidedSearch :: ",f);let p="Cart Search";Ki.subscribe(g=>{g===qn&&(p="MyList Search")});const m={site_search_category:p,guidedSearch:"true",site_search_keyword:((s=(o=(r=n==null?void 0:n.guidedSearch)==null?void 0:r.search)==null?void 0:o.searchBean[0])==null?void 0:s.searchValue)||"",siteSearchResults:(a=(l=f==null?void 0:f.guidedSearchResponse)==null?void 0:l.return)==null?void 0:a.length};if(Bn(Nn.SEARCH,m),(u=(c=f==null?void 0:f.guidedSearchResponse)==null?void 0:c.return)!=null&&u.length){const g=((d=f==null?void 0:f.guidedSearchResponse)==null?void 0:d.return).map(h=>({product:String(h==null?void 0:h.reference),description:String(h==null?void 0:h.shortDescription),title:String(h==null?void 0:h.shortDescription)}));return Bo(null),g}else return Bo(i),null}}catch(f){hn.update(()=>!1),Bo(i),ve.error("project bom.task :: guidedSearch :: ",f)}}async function JM(t,n,e,i){var r,o,s,l,a;try{Wn(!1);let c=await Eg(t,n,e);if(c.hasError)hn.update(()=>!1),c=c,ve.error("project bom.task :: guidedSearch :: ",c.message),Bo(i);else if(hn.update(()=>!1),ve.info("project bom.task :: guidedSearch :: ",c),(o=(r=c==null?void 0:c.getProductListResponse)==null?void 0:r.productListBean)!=null&&o.count){const u=((a=(l=(s=c==null?void 0:c.getProductListResponse)==null?void 0:s.productListBean)==null?void 0:l.products)==null?void 0:a.product).map(d=>({product:String(d==null?void 0:d.commercialReference),description:String(d==null?void 0:d.shortDescription),title:String(d==null?void 0:d.shortDescription)}));return Bo(null),u}else return Bo(i),null}catch(c){hn.update(()=>!1),Bo(i),ve.error("project bom.task :: guidedSearch :: ",c)}}function Bo(t){const n={itemFound:t};nd.update(()=>n)}async function ci(t,n,e,i,r){var o,s,l,a;try{r||Ji.update(()=>!0);const c={brandName:bp,languageCode:e,countryCode:n};let u;Ki.subscribe(f=>u=f);let d=await oL(t,c,i,n,e);if(d.hasError)d=d,Ji.update(()=>!1);else{d=d;const f=(o=d==null?void 0:d.data)==null?void 0:o.bom,m=ic(d.data);m!=null&&m.user&&(m.isArchived=m.isArchived?m.isArchived:!((s=m==null?void 0:m.user)!=null&&s.canEdit)),an.update(()=>m),is.update(()=>!1),qs.set(0),Ji.update(()=>!1),u===Vn&&(gf(d.data),Ji.update(()=>!1)),u!==gu&&(((l=f==null?void 0:f.parts)==null?void 0:l.length)!==0||((a=f==null?void 0:f.groups)==null?void 0:a.length)!==0)&&sL(t,c,i,n,e).then(g=>{var h;if(!g.hasError){g.data=ic(g.data);const _=g.data;_!=null&&_.user&&(_.isArchived=_.isArchived?_.isArchived:!((h=_==null?void 0:_.user)!=null&&h.canEdit)),u===Vn?gf(_):an.update(()=>_)}}).catch(g=>{ve.error("project bom.task :: fetchPDPURL error:: ",g)})}}catch(c){Ji.update(()=>!1),ve.error("project bom.task :: fetchPricing error:: ",c)}}async function Cm(t,n,e,i=!0){var r;try{i&&hn.update(()=>!0);let o=await aL(t,n,e==null?void 0:e.id,e==null?void 0:e.modifiedDate);if(o.hasError)o=o,hn.update(()=>!1),ve.error("project-bom.task :: fetchActivityLog :: ",o.message);else{o=o;const s=o.data;if((s==null?void 0:s.length)>0){const l=(r=o==null?void 0:o.attrs)==null?void 0:r.LastEvaluatedKey;_g.update(()=>l),Rl.update(a=>a.concat(s))}hn.update(()=>!1),ve.info("project-bom.task :: fetchActivityLog :: ",o)}return o}catch(o){hn.update(()=>!1),Rl.update(()=>[]),ve.error("project-bom.task :: fetchActivityLog :: ",o)}}function Br(t,n,e,i,r){let s=lL({projectId:t,action:n,subaction:e,description:i,details:r});s.hasError?(s=s,hn.update(()=>!1),ve.error("Error adding activity log",s)):(s=s.data,ve.info("Activity log added successfully",s))}function bo(t){Wn(!0),Va.set(xr),Yo.set(t)}function Mi(t){Wn(!0),Va.set(mr),Yo.set(t)}function ys(t){Wn(!0),Va.set($I),Yo.set(t)}function Wn(t){ka.set(t)}async function Gd(){let t=await cL(uN);if(t.hasError)throw ve.error("Error while generating token",t),new Error(String(t==null?void 0:t.message));return t=t.data,ve.info("Response of apigee token api",t),t}async function Em(t,n){let e=await uL(t,n);if(e.hasError)throw ve.error("Error while creating project",e),new Error(String(e==null?void 0:e.message));return e=e.data,ve.info("Response of change state api",e),e}async function Im(){let t=await fL();if(t.hasError)throw ve.error("Error while fetching platform details",t),new Error(String(t==null?void 0:t.message));return t=t.data,ve.info("Response of platform details api",t),wr.set(t),t}async function QM(t){let n=await dL(t);if(n.hasError)throw ve.error("Error while getting list of anonymous project",n),new Error(String(n==null?void 0:n.message));return n=n.data,ve.info("List of project with same anonymous id",n),n}async function $M(t){let n=await pL(t);if(n.hasError)throw ve.error("Error while checking substitutes :: ",n),new Error(String(n==null?void 0:n.message));return n=n,ve.info("Bom saved to Bom Table :: ",n),n}async function f_(t){var e,i,r,o,s;let n=await hL(t);if(n.hasError)throw ve.error("Error while checking substitutes :: ",n),new Error(String(n==null?void 0:n.message));{n=n;const l=(e=n==null?void 0:n.productReferencesBean)==null?void 0:e.referenceList,a=((i=l==null?void 0:l.reference)==null?void 0:i.length)!==0?(r=l==null?void 0:l.reference[0])==null?void 0:r.subs:"";return ve.info("List of substitutes :: ",a),Yn()?l==null?void 0:l.reference[0]:(a==null?void 0:a.length)!==0&&((s=(o=a[0])==null?void 0:o.substProduct)==null?void 0:s.length)!==0&&a[0].substProduct[0].rangeId===null}}async function Am(t,n){try{const e=await mL(t,n);if(e!=null&&e.hasError)throw ve.error("Error in adding configuration with config Id ",t),new Error(e==null?void 0:e.message);return ve.info("Fetched configId ",t," :: ",e),e}catch(e){return ve.error("Error in adding configuration with config Id ",t),{hasError:!0,message:`Error fetching configuration: ${(e==null?void 0:e.message)||"Unknown error"}`,data:null}}}async function eq(t,n){try{const e=await gL(t,n);if(e!=null&&e.hasError)throw ve.error("Error in adding configuration with config Id ",t),new Error(e==null?void 0:e.message);return ve.info("Fetched configId ",t," :: ",e),e}catch{throw ve.error("Error in adding configuration with config Id ",t),new Error("Error in adding configuration")}}function d_(t,n){return t||(n?n.slice(0,n.length-1):"")}function p_(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function rl(){return We.environment===We.PROD||We.environment===We.STAGING}function tq(){return We.environment===We.STAGING}function ks(t,n){const e=t==null?void 0:t.split(" ");return e!=null&&e.length?(e==null?void 0:e.map(r=>{let o=r==null?void 0:r.replace("$_(","");return o=o==null?void 0:o.replace(")",""),n[o]?String(n[o]):r})).join(" "):t}function Om(t,n){const e=t==null?void 0:t.split(" ");return e!=null&&e.length?(e==null?void 0:e.map(r=>{let o=r==null?void 0:r.replace("{","");return o=n(String(o==null?void 0:o.replace("}",""))),o})).join(" "):t}function tn(t){var n,e;return t?(e=(n=new DOMParser().parseFromString(t,"text/html"))==null?void 0:n.body)==null?void 0:e.textContent:""}function Sf(t){return String(v1[t])}function uy(t){return t==null?void 0:t.filter((n,e)=>(t==null?void 0:t.indexOf(n))===e)}function zt(){let t="";return wr.subscribe(n=>{t=(n.platform||Te).toUpperCase()}),localStorage.getItem("mode")&&localStorage.getItem("mode")!==Te?localStorage.getItem("mode")===Is:t===Fo}function h_(t){var o;const n=(o=t.name)==null?void 0:o.match(new RegExp(vp,"g"));let e=0;const i=t.name.split(Ws),r=i[i.length-1];return isNaN(parseInt(r))||(e=Number(r)),n[n.length-1]!==Ws?`${t.name}-1`:n.join("")+(Number(e)+1)}function Ar(t){document.dispatchEvent(new CustomEvent(Hn.NAVIGATION_EVENT,{detail:{url:t}}))}const m_=(t,n)=>{var r,o;const e=(r=ku==null?void 0:ku[t])!=null&&r[n]?(o=ku==null?void 0:ku[t])==null?void 0:o[n]:SA,i=e==null?void 0:e.split("_");return{countryCode:i[1],languageCode:i[0]}};function Pm(t){return typeof t=="number"}function fy(t){return typeof t===Tu}async function nq(t){const n=Date.now();let e;if(Y0.subscribe(i=>e=i),!zt()&&e-ni.feature===t);if(e&&e.length>0){const i=e[0].countryList;if(i)return i.filter(r=>r.shortName===n)}return null}function dy(t){var n,e,i;return((n=t==null?void 0:t.detail)==null?void 0:n.key)===gr||((e=t==null?void 0:t.detail)==null?void 0:e.key)===Ys||((i=t==null?void 0:t.detail)==null?void 0:i.key)===ba}function py(t,n){return(t==null?void 0:t.length)<=n?t:(t==null?void 0:t.slice(0,n-3))+Ba.THREE_DOT_STR}function Yn(){let t=!1;return Pc.subscribe(n=>t=n),t}function ar(t){return Yn()?{...t,headers:{...t==null?void 0:t.headers,islist:!0,listId:(t==null?void 0:t.projectId)??Te}}:t}function __(t){try{return t?typeof t===Vs?t:JSON.parse(t):{}}catch(n){return ve.error("Failed to parsed user object",n),{}}}function Lm(t){const n=new Set,e=new Set;return Object.keys(t.reduce((r,o)=>o&&typeof o===Vs&&!Array.isArray(o)?{...r,...o}:r,{})).forEach(r=>{t.every(s=>{if(s&&typeof s===Vs&&!Array.isArray(s)){const l=s[r];return l==null||l===""}return!0})?n.add(r):e.add(r)}),{excelData:t.map(r=>{if(r&&typeof r===Vs&&!Array.isArray(r)){const o={...r};return n.forEach(s=>{delete o[s]}),o}return r}),totalColumns:e.size}}const b_=yt(!1);$O({fallbackLocale:"English",initialLocale:"English"});function iq(t){let n;return U0[t]?n=U0[t]:n=t.split(tA)[0],n}function rq({withLocale:t}){const n=We.accessToken,e=iq(t),i=Yn(),r=sq(e,i),o=i?{}:{Authorization:n,isList:"false"};return b_.set(!0),fetch(r,{headers:o}).then(s=>s.json()).then(s=>{s=i?s:s.data,ti.update(()=>s),Eb(String(t),s),Nc.set(String(t)),b_.set(!1),K0.update(()=>!0)}).catch(s=>{ve.error(s),b_.set(!1)})}function sq(t,n){return n?rl()?tq()?`${k1[We.environment]}/${t}.json`:`${k1[We.environment]}/${t}.json`:`${k1.qa}/${t}.json`:`${We.basePath}${gA}?includeDraft=true&requestedLanguage=${t}`}function jm(t){"@babel/helpers - typeof";return jm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jm(t)}function eu(t){if(t===null||t===!0||t===!1)return NaN;var n=Number(t);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function Ns(t,n){if(n.length1?"s":"")+" required, but only "+n.length+" present")}function aa(t){Ns(1,arguments);var n=Object.prototype.toString.call(t);return t instanceof Date||jm(t)==="object"&&n==="[object Date]"?new Date(t.getTime()):typeof t=="number"||n==="[object Number]"?new Date(t):((typeof t=="string"||n==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function oq(t,n){Ns(2,arguments);var e=aa(t).getTime(),i=eu(n);return new Date(e+i)}var aq={};function Rm(){return aq}function lq(t){var n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),t.getTime()-n.getTime()}function cq(t){return Ns(1,arguments),t instanceof Date||jm(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function uq(t){if(Ns(1,arguments),!cq(t)&&typeof t!="number")return!1;var n=aa(t);return!isNaN(Number(n))}function fq(t,n){Ns(2,arguments);var e=eu(n);return oq(t,-e)}var dq=864e5;function pq(t){Ns(1,arguments);var n=aa(t),e=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var i=n.getTime(),r=e-i;return Math.floor(r/dq)+1}function Mm(t){Ns(1,arguments);var n=1,e=aa(t),i=e.getUTCDay(),r=(i=r.getTime()?e+1:n.getTime()>=s.getTime()?e:e-1}function hq(t){Ns(1,arguments);var n=hy(t),e=new Date(0);e.setUTCFullYear(n,0,4),e.setUTCHours(0,0,0,0);var i=Mm(e);return i}var mq=6048e5;function gq(t){Ns(1,arguments);var n=aa(t),e=Mm(n).getTime()-hq(n).getTime();return Math.round(e/mq)+1}function qm(t,n){var e,i,r,o,s,l,a,c;Ns(1,arguments);var u=Rm(),d=eu((e=(i=(r=(o=n==null?void 0:n.weekStartsOn)!==null&&o!==void 0?o:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(a=u.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=aa(t),p=f.getUTCDay(),m=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var g=qm(m,n),h=new Date(0);h.setUTCFullYear(d,0,p),h.setUTCHours(0,0,0,0);var _=qm(h,n);return u.getTime()>=g.getTime()?d+1:u.getTime()>=_.getTime()?d:d-1}function _q(t,n){var e,i,r,o,s,l,a,c;Ns(1,arguments);var u=Rm(),d=eu((e=(i=(r=(o=n==null?void 0:n.firstWeekContainsDate)!==null&&o!==void 0?o:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(a=u.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1),f=my(t,n),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var m=qm(p,n);return m}var bq=6048e5;function vq(t,n){Ns(1,arguments);var e=aa(t),i=qm(e,n).getTime()-_q(e,n).getTime();return Math.round(i/bq)+1}function Fi(t,n){for(var e=t<0?"-":"",i=Math.abs(t).toString();i.length0?i:1-i;return Fi(e==="yy"?r%100:r,e.length)},M:function(n,e){var i=n.getUTCMonth();return e==="M"?String(i+1):Fi(i+1,2)},d:function(n,e){return Fi(n.getUTCDate(),e.length)},a:function(n,e){var i=n.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(n,e){return Fi(n.getUTCHours()%12||12,e.length)},H:function(n,e){return Fi(n.getUTCHours(),e.length)},m:function(n,e){return Fi(n.getUTCMinutes(),e.length)},s:function(n,e){return Fi(n.getUTCSeconds(),e.length)},S:function(n,e){var i=e.length,r=n.getUTCMilliseconds(),o=Math.floor(r*Math.pow(10,i-3));return Fi(o,e.length)}};const rc=wq;var Tf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yq={G:function(n,e,i){var r=n.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(n,e,i){if(e==="yo"){var r=n.getUTCFullYear(),o=r>0?r:1-r;return i.ordinalNumber(o,{unit:"year"})}return rc.y(n,e)},Y:function(n,e,i,r){var o=my(n,r),s=o>0?o:1-o;if(e==="YY"){var l=s%100;return Fi(l,2)}return e==="Yo"?i.ordinalNumber(s,{unit:"year"}):Fi(s,e.length)},R:function(n,e){var i=hy(n);return Fi(i,e.length)},u:function(n,e){var i=n.getUTCFullYear();return Fi(i,e.length)},Q:function(n,e,i){var r=Math.ceil((n.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Fi(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,i){var r=Math.ceil((n.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Fi(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,i){var r=n.getUTCMonth();switch(e){case"M":case"MM":return rc.M(n,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,i){var r=n.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Fi(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,i,r){var o=vq(n,r);return e==="wo"?i.ordinalNumber(o,{unit:"week"}):Fi(o,e.length)},I:function(n,e,i){var r=gq(n);return e==="Io"?i.ordinalNumber(r,{unit:"week"}):Fi(r,e.length)},d:function(n,e,i){return e==="do"?i.ordinalNumber(n.getUTCDate(),{unit:"date"}):rc.d(n,e)},D:function(n,e,i){var r=pq(n);return e==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):Fi(r,e.length)},E:function(n,e,i){var r=n.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,i,r){var o=n.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Fi(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(n,e,i,r){var o=n.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Fi(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(n,e,i){var r=n.getUTCDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return Fi(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});case"iiii":default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,i){var r=n.getUTCHours(),o=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,e,i){var r=n.getUTCHours(),o;switch(r===12?o=Tf.noon:r===0?o=Tf.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,e,i){var r=n.getUTCHours(),o;switch(r>=17?o=Tf.evening:r>=12?o=Tf.afternoon:r>=4?o=Tf.morning:o=Tf.night,e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,e,i){if(e==="ho"){var r=n.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return rc.h(n,e)},H:function(n,e,i){return e==="Ho"?i.ordinalNumber(n.getUTCHours(),{unit:"hour"}):rc.H(n,e)},K:function(n,e,i){var r=n.getUTCHours()%12;return e==="Ko"?i.ordinalNumber(r,{unit:"hour"}):Fi(r,e.length)},k:function(n,e,i){var r=n.getUTCHours();return r===0&&(r=24),e==="ko"?i.ordinalNumber(r,{unit:"hour"}):Fi(r,e.length)},m:function(n,e,i){return e==="mo"?i.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):rc.m(n,e)},s:function(n,e,i){return e==="so"?i.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):rc.s(n,e)},S:function(n,e){return rc.S(n,e)},X:function(n,e,i,r){var o=r._originalDate||n,s=o.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return _y(s);case"XXXX":case"XX":return tu(s);case"XXXXX":case"XXX":default:return tu(s,":")}},x:function(n,e,i,r){var o=r._originalDate||n,s=o.getTimezoneOffset();switch(e){case"x":return _y(s);case"xxxx":case"xx":return tu(s);case"xxxxx":case"xxx":default:return tu(s,":")}},O:function(n,e,i,r){var o=r._originalDate||n,s=o.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+gy(s,":");case"OOOO":default:return"GMT"+tu(s,":")}},z:function(n,e,i,r){var o=r._originalDate||n,s=o.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+gy(s,":");case"zzzz":default:return"GMT"+tu(s,":")}},t:function(n,e,i,r){var o=r._originalDate||n,s=Math.floor(o.getTime()/1e3);return Fi(s,e.length)},T:function(n,e,i,r){var o=r._originalDate||n,s=o.getTime();return Fi(s,e.length)}};function gy(t,n){var e=t>0?"-":"+",i=Math.abs(t),r=Math.floor(i/60),o=i%60;if(o===0)return e+String(r);var s=n||"";return e+String(r)+s+Fi(o,2)}function _y(t,n){if(t%60===0){var e=t>0?"-":"+";return e+Fi(Math.abs(t)/60,2)}return tu(t,n)}function tu(t,n){var e=n||"",i=t>0?"-":"+",r=Math.abs(t),o=Fi(Math.floor(r/60),2),s=Fi(r%60,2);return i+o+e+s}const kq=yq;var by=function(n,e){switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},vy=function(n,e){switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Sq=function(n,e){var i=n.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return by(n,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",by(r,e)).replace("{{time}}",vy(o,e))},Tq={p:vy,P:Sq};const Cq=Tq;var Eq=["D","DD"],Iq=["YY","YYYY"];function Aq(t){return Eq.indexOf(t)!==-1}function Oq(t){return Iq.indexOf(t)!==-1}function wy(t,n,e){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Pq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Nq=function(n,e,i){var r,o=Pq[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const Lq=Nq;function v_(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.width?String(n.width):t.defaultWidth,i=t.formats[e]||t.formats[t.defaultWidth];return i}}var jq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Rq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qq={date:v_({formats:jq,defaultWidth:"full"}),time:v_({formats:Rq,defaultWidth:"full"}),dateTime:v_({formats:Mq,defaultWidth:"full"})};const Dq=qq;var Bq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Uq=function(n,e,i,r){return Bq[n]};const zq=Uq;function Hd(t){return function(n,e){var i=e!=null&&e.context?String(e.context):"standalone",r;if(i==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=e!=null&&e.width?String(e.width):o;r=t.formattingValues[s]||t.formattingValues[o]}else{var l=t.defaultWidth,a=e!=null&&e.width?String(e.width):t.defaultWidth;r=t.values[a]||t.values[l]}var c=t.argumentCallback?t.argumentCallback(n):n;return r[c]}}var Fq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Gq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Hq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Wq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Vq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Yq=function(n,e){var i=Number(n),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},Zq={ordinalNumber:Yq,era:Hd({values:Fq,defaultWidth:"wide"}),quarter:Hd({values:xq,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:Hd({values:Gq,defaultWidth:"wide"}),day:Hd({values:Hq,defaultWidth:"wide"}),dayPeriod:Hd({values:Wq,defaultWidth:"wide",formattingValues:Vq,defaultFormattingWidth:"wide"})};const Xq=Zq;function Wd(t){return function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=n.match(r);if(!o)return null;var s=o[0],l=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],a=Array.isArray(l)?Jq(l,function(d){return d.test(s)}):Kq(l,function(d){return d.test(s)}),c;c=t.valueCallback?t.valueCallback(a):a,c=e.valueCallback?e.valueCallback(c):c;var u=n.slice(s.length);return{value:c,rest:u}}}function Kq(t,n){for(var e in t)if(t.hasOwnProperty(e)&&n(t[e]))return e}function Jq(t,n){for(var e=0;e1&&arguments[1]!==void 0?arguments[1]:{},i=n.match(t.matchPattern);if(!i)return null;var r=i[0],o=n.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=e.valueCallback?e.valueCallback(s):s;var l=n.slice(r.length);return{value:s,rest:l}}}var $q=/^(\d+)(th|st|nd|rd)?/i,eD=/\d+/i,tD={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nD={any:[/^b/i,/^(a|c)/i]},iD={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rD={any:[/1/i,/2/i,/3/i,/4/i]},sD={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oD={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},aD={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lD={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cD={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uD={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fD={ordinalNumber:Qq({matchPattern:$q,parsePattern:eD,valueCallback:function(n){return parseInt(n,10)}}),era:Wd({matchPatterns:tD,defaultMatchWidth:"wide",parsePatterns:nD,defaultParseWidth:"any"}),quarter:Wd({matchPatterns:iD,defaultMatchWidth:"wide",parsePatterns:rD,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:Wd({matchPatterns:sD,defaultMatchWidth:"wide",parsePatterns:oD,defaultParseWidth:"any"}),day:Wd({matchPatterns:aD,defaultMatchWidth:"wide",parsePatterns:lD,defaultParseWidth:"any"}),dayPeriod:Wd({matchPatterns:cD,defaultMatchWidth:"any",parsePatterns:uD,defaultParseWidth:"any"})},dD={code:"en-US",formatDistance:Lq,formatLong:Dq,formatRelative:zq,localize:Xq,match:fD,options:{weekStartsOn:0,firstWeekContainsDate:1}};const pD=dD;var hD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gD=/^'([^]*?)'?$/,_D=/''/g,bD=/[a-zA-Z]/;function vD(t,n,e){var i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k;Ns(2,arguments);var T=String(n),R=Rm(),O=(i=(r=e==null?void 0:e.locale)!==null&&r!==void 0?r:R.locale)!==null&&i!==void 0?i:pD,j=eu((o=(s=(l=(a=e==null?void 0:e.firstWeekContainsDate)!==null&&a!==void 0?a:e==null||(c=e.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:R.firstWeekContainsDate)!==null&&s!==void 0?s:(d=R.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=eu((p=(m=(g=(h=e==null?void 0:e.weekStartsOn)!==null&&h!==void 0?h:e==null||(_=e.locale)===null||_===void 0||(b=_.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&g!==void 0?g:R.weekStartsOn)!==null&&m!==void 0?m:(y=R.locale)===null||y===void 0||(k=y.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&p!==void 0?p:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var M=aa(t);if(!uq(M))throw new RangeError("Invalid time value");var z=lq(M),D=fq(M,z),P={firstWeekContainsDate:j,weekStartsOn:q,locale:O,_originalDate:M},L=T.match(mD).map(function(C){var S=C[0];if(S==="p"||S==="P"){var I=Cq[S];return I(C,O.formatLong)}return C}).join("").match(hD).map(function(C){if(C==="''")return"'";var S=C[0];if(S==="'")return wD(C);var I=kq[S];if(I)return!(e!=null&&e.useAdditionalWeekYearTokens)&&Oq(C)&&wy(C,n,String(t)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Aq(C)&&wy(C,n,String(t)),I(D,C,O.localize,P);if(S.match(bD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return C}).join("");return L}function wD(t){var n=t.match(gD);return n?n[1].replace(_D,"'"):t}function yD(t){return Ns(1,arguments),aa(t).getTime()>Date.now()}function qi(t){const n=new Date(t);return`${n.getDate()}/${n.getMonth()+1}/${n.getFullYear()}`}function Dm(t){const n=new Date(t);return`${qi(t)} ${n==null?void 0:n.toLocaleTimeString().toLocaleUpperCase()}`}function yy(t){return yD(t)}function sc(t="/"){const n=new Date,e=n.getDate()+t+(n.getMonth()+1)+t+n.getFullYear()+" @ "+n.getHours()+":"+n.getMinutes()+":"+n.getSeconds();return String(e)}const Vd="attachments",Yd="base64String",Zd="customerSupportUrl",w_="closeReseller",la="data",Bm="endUsersCompany",ky=4,Xd="message",Kd="name",ca="notificationName",Um="BillOfMaterial",y_="unifiedCheckout-shareList",kD="unifiedCheckout-shareList_distributor",SD="unifiedCheckout-shareList-email",zm="updateCollborators",Fm="updateCollborators",Cf="removeCollborators",xm="unifiedCheckout-removeCollaborator",nu="Owner",Jd="products",Sy="projectDescription",Ty="listDescription",Ef="projectName",Gm="listName",Cy="projectURL",Ey="listURL",iu="receiverDetails",TD="https://www.se.com/_country/_language/work/support/customer-care/contact-schneider-electric.jsp";function Si(t){const n=BP;return t.match(UP)?!1:n.test(t)}function Ma(t){return{name:String(t==null?void 0:t.name),description:t!=null&&t.description?String(t==null?void 0:t.description):"",status:String(t==null?void 0:t.status),company:t!=null&&t.company?String(t==null?void 0:t.company):"",owner:String(t==null?void 0:t.owner),isArchived:!!(t!=null&&t.isArchived)}}function CD(t,n){return{notifications:[{[ca]:Cf,[la]:JSON.stringify({[Ef]:tn(t==null?void 0:t.name)}),[iu]:JSON.stringify(n)}]}}function Qd(t,n){t==null||t.forEach(e=>{n==null||n.push({data:{username:"user"},emailId:e,language:We.language,country:We.country})})}function ED(){var n;const t=rl()?ju:Ru;vf(t,`${String(We.language)}`,Xb[(n=We.language)==null?void 0:n.toLowerCase()])}const lne="";function ID(t){Ut(t,"svelte-b99uv0",".add-btn.svelte-b99uv0{margin-bottom:6px;margin-right:16px;font-size:medium}.view-btn.svelte-b99uv0{font-size:medium}.cart-add-button.svelte-b99uv0{margin-left:16px}")}function AD(t){let n,e,i,r,o,s,l;return{c(){var a,c;n=A("qds-button"),w(n,"icon-name",t[0]),w(n,"class",e=Nt(t[4])+" svelte-b99uv0"),w(n,"style",i=t[5]==="emphasized"?"background-color:"+((a=t[10])==null?void 0:a.primaryButtonColor):"background-color:"+((c=t[10])==null?void 0:c.secondaryButtonColor)),w(n,"size",t[2]),w(n,"text",t[1]),w(n,"id",r=t[7]??Te),w(n,"data-testid",t[8]),w(n,"disabled",o=t[6]??!1),w(n,"type",t[3])},m(a,c){J(a,n,c),s||(l=xe(n,"click",t[13]),s=!0)},p(a,c){var u,d;c&1&&w(n,"icon-name",a[0]),c&16&&e!==(e=Nt(a[4])+" svelte-b99uv0")&&w(n,"class",e),c&1056&&i!==(i=a[5]==="emphasized"?"background-color:"+((u=a[10])==null?void 0:u.primaryButtonColor):"background-color:"+((d=a[10])==null?void 0:d.secondaryButtonColor))&&w(n,"style",i),c&4&&w(n,"size",a[2]),c&2&&w(n,"text",a[1]),c&128&&r!==(r=a[7]??Te)&&w(n,"id",r),c&256&&w(n,"data-testid",a[8]),c&64&&o!==(o=a[6]??!1)&&w(n,"disabled",o),c&8&&w(n,"type",a[3])},d(a){a&&K(n),s=!1,l()}}}function OD(t){let n,e,i,r,o,s;return{c(){n=A("qds-button"),w(n,"icon-name",t[0]),w(n,"class",e=Nt(t[4])+" svelte-b99uv0"),w(n,"importance",t[5]),w(n,"size",t[2]),w(n,"text",t[1]),w(n,"id",i=t[7]??Te),w(n,"data-testid",t[8]),w(n,"disabled",r=t[6]??!1),w(n,"type",t[3]),w(n,"action",t[9])},m(l,a){J(l,n,a),o||(s=xe(n,"click",t[12]),o=!0)},p(l,a){a&1&&w(n,"icon-name",l[0]),a&16&&e!==(e=Nt(l[4])+" svelte-b99uv0")&&w(n,"class",e),a&32&&w(n,"importance",l[5]),a&4&&w(n,"size",l[2]),a&2&&w(n,"text",l[1]),a&128&&i!==(i=l[7]??Te)&&w(n,"id",i),a&256&&w(n,"data-testid",l[8]),a&64&&r!==(r=l[6]??!1)&&w(n,"disabled",r),a&8&&w(n,"type",l[3]),a&512&&w(n,"action",l[9])},d(l){l&&K(n),o=!1,s()}}}function PD(t){let n;function e(o,s){var l;return((l=o[10])==null?void 0:l.primaryButtonColor)===Te?OD:AD}let i=e(t),r=i(t);return{c(){r.c(),n=wt()},m(o,s){r.m(o,s),J(o,n,s)},p(o,[s]){i===(i=e(o))&&r?r.p(o,s):(r.d(1),r=i(o),r&&(r.c(),r.m(n.parentNode,n)))},i:et,o:et,d(o){o&&K(n),r.d(o)}}}function ND(t,n,e){let i;ye(t,ns,b=>e(10,i=b));let{iconClassName:r=Te}=n,{buttonText:o=Te}=n,{buttonSize:s="standard"}=n,{buttonType:l=Te}=n,{className:a=Te}=n,{importance:c="standard"}=n,{disabled:u=!1}=n,{id:d=Te}=n,{dataTestId:f=Te}=n,{action:p=Te}=n;const m=Mn();function g(){u||m(Hn.BUTTON_CLICK)}const h=()=>{g()},_=()=>{g()};return t.$$set=b=>{"iconClassName"in b&&e(0,r=b.iconClassName),"buttonText"in b&&e(1,o=b.buttonText),"buttonSize"in b&&e(2,s=b.buttonSize),"buttonType"in b&&e(3,l=b.buttonType),"className"in b&&e(4,a=b.className),"importance"in b&&e(5,c=b.importance),"disabled"in b&&e(6,u=b.disabled),"id"in b&&e(7,d=b.id),"dataTestId"in b&&e(8,f=b.dataTestId),"action"in b&&e(9,p=b.action)},[r,o,s,l,a,c,u,d,f,p,i,g,h,_]}class Gt extends Ot{constructor(n){super(),At(this,n,ND,PD,It,{iconClassName:0,buttonText:1,buttonSize:2,buttonType:3,className:4,importance:5,disabled:6,id:7,dataTestId:8,action:9},ID)}}const cne="";function LD(t){Ut(t,"svelte-12vizl0",".quant-input.svelte-12vizl0{width:100%}.input-box.svelte-12vizl0{display:block;margin-bottom:0.8px}.width-100.svelte-12vizl0{width:100%}.input-add-user-email.svelte-12vizl0{width:95%}.full-width.svelte-12vizl0{margin-top:5px;width:100%}")}function jD(t){let n,e,i,r,o,s,l;return{c(){n=A("qds-input"),w(n,"class",e=Nt(t[14])+" svelte-12vizl0"),w(n,"disabled",t[2]),w(n,"multiple",t[3]),w(n,"required",t[4]),w(n,"autocomplete",t[5]),w(n,"id",t[12]),w(n,"maxlength",t[6]),w(n,"minlength",t[8]),w(n,"data-testid",i=t[13]??void 0),w(n,"name",t[9]),w(n,"placeholder",t[11]),w(n,"size",t[15]),w(n,"type",t[16]),w(n,"min",r=t[7]?t[7]:void 0),w(n,"max",o=t[10]?t[10]:void 0),w(n,"value",t[0]),w(n,"no-icon",t[17])},m(a,c){J(a,n,c),t[22](n),s||(l=[xe(n,"qdsInput",t[23]),xe(n,"keydown",t[24]),xe(n,"keypress",t[25]),xe(n,"blur",t[26])],s=!0)},p(a,[c]){c&16384&&e!==(e=Nt(a[14])+" svelte-12vizl0")&&w(n,"class",e),c&4&&w(n,"disabled",a[2]),c&8&&w(n,"multiple",a[3]),c&16&&w(n,"required",a[4]),c&32&&w(n,"autocomplete",a[5]),c&4096&&w(n,"id",a[12]),c&64&&w(n,"maxlength",a[6]),c&256&&w(n,"minlength",a[8]),c&8192&&i!==(i=a[13]??void 0)&&w(n,"data-testid",i),c&512&&w(n,"name",a[9]),c&2048&&w(n,"placeholder",a[11]),c&32768&&w(n,"size",a[15]),c&65536&&w(n,"type",a[16]),c&128&&r!==(r=a[7]?a[7]:void 0)&&w(n,"min",r),c&1024&&o!==(o=a[10]?a[10]:void 0)&&w(n,"max",o),c&1&&w(n,"value",a[0]),c&131072&&w(n,"no-icon",a[17])},i:et,o:et,d(a){a&&K(n),t[22](null),s=!1,An(l)}}}function RD(t,n,e){let{disabled:i=!1}=n,{multiple:r=!1}=n,{required:o=!1}=n,{autoComplete:s="off"}=n,{maxLength:l=100}=n,{min:a=0}=n,{minLength:c=0}=n,{name:u=Te}=n,{max:d=100}=n,{placeholder:f=Te}=n,{id:p=Te}=n,{dataTestId:m=Te}=n,{className:g=Te}=n,{size:h="standard"}=n,{type:_="text"}=n,{value:b=Te}=n,{inputReference:y=Hi}=n,{noIcon:k=!1}=n;const T=Mn();function R(C){e(0,b=y==null?void 0:y.value),T(Hn.QDS_INPUT,C)}function O(C){T(Hn.ON_KEY_PRESS,C)}function j(C){T(Hn.ON_KEY_DOWN,C)}function q(C){T(Hn.ON_BLUR,C)}function M(C){_t[C?"unshift":"push"](()=>{y=C,e(1,y)})}const z=C=>{R(C)},D=C=>j(C),P=C=>O(C),L=C=>q(C);return t.$$set=C=>{"disabled"in C&&e(2,i=C.disabled),"multiple"in C&&e(3,r=C.multiple),"required"in C&&e(4,o=C.required),"autoComplete"in C&&e(5,s=C.autoComplete),"maxLength"in C&&e(6,l=C.maxLength),"min"in C&&e(7,a=C.min),"minLength"in C&&e(8,c=C.minLength),"name"in C&&e(9,u=C.name),"max"in C&&e(10,d=C.max),"placeholder"in C&&e(11,f=C.placeholder),"id"in C&&e(12,p=C.id),"dataTestId"in C&&e(13,m=C.dataTestId),"className"in C&&e(14,g=C.className),"size"in C&&e(15,h=C.size),"type"in C&&e(16,_=C.type),"value"in C&&e(0,b=C.value),"inputReference"in C&&e(1,y=C.inputReference),"noIcon"in C&&e(17,k=C.noIcon)},[b,y,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,k,R,O,j,q,M,z,D,P,L]}class Yi extends Ot{constructor(n){super(),At(this,n,RD,jD,It,{disabled:2,multiple:3,required:4,autoComplete:5,maxLength:6,min:7,minLength:8,name:9,max:10,placeholder:11,id:12,dataTestId:13,className:14,size:15,type:16,value:0,inputReference:1,noIcon:17},LD)}}const une="";function MD(t){Ut(t,"svelte-1clcpcr",".pw.align-right.svelte-1clcpcr{margin-left:auto}.pw.pointer.svelte-1clcpcr{cursor:pointer}.pw.red-color.svelte-1clcpcr{color:var(--se-red, #dc0a0a)}.pw.normal-font.svelte-1clcpcr{font-weight:normal;font-size:16px}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.description-height.svelte-1clcpcr{height:153px}.width-48.svelte-1clcpcr{width:48%}.width-4.svelte-1clcpcr{width:4%}.font-heading.svelte-1clcpcr{color:var(--se-black, #0f0f0f);font-size:37px}.edit-font.svelte-1clcpcr{color:var(--se-dark-grey, #626469);font-size:16px}.validation-error.svelte-1clcpcr{display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:12px}.clone-error-message.svelte-1clcpcr{font-size:12px;margin:4px 0px;color:var(--se-black, #0f0f0f)}.dialog-button.svelte-1clcpcr{margin-top:20px;margin-bottom:28px}.close-dialog.svelte-1clcpcr{display:block;margin-left:auto;position:relative;bottom:45px;color:var(--se-medium-grey, #9fa0a4)}.edit-cancel.svelte-1clcpcr{margin-left:16px}")}function Iy(t){var Zn,Gn,oi,$n,Ci,Xe;let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g=String((Zn=t[0])==null?void 0:Zn.name).length+"",h,_,b=t[3]("edit_project.30_characters")+"",y,k,T,R,O,j,q,M,z,D,P,L=((Gn=t[0])!=null&&Gn.description?($n=(oi=t[0])==null?void 0:oi.description)==null?void 0:$n.length:0)+"",C,S,I=t[3]("edit_project.350_characters")+"",N,E,B,U,H,Z,V,ne,W,re,G,F,X,le,ue,ee,$,he,me,te,oe,ce,ge,fe,ae,ie,_e,Ie,we=t[3]("generic.open")+"",pe,Se,Le=t[3]("generic.in_progress")+"",Re,Ee,ke=t[3]("generic.completed")+"",Ce,Ne,Pe=t[3]("generic.on_hold")+"",Ve,ot,gt=t[3]("generic.cancelled")+"",He,Be,Ye,Ue,rt,ze,tt,je,nt,$e,mt,lt;function vt(at,Ze){return at[4]?DD:qD}let Bt=vt(t),Ke=Bt(t),pt=t[4]&&Ay(t);function bt(at){t[10](at)}let qt={id:"input-proj-name",type:"text",name:"name",maxLength:Vp};t[0].name!==void 0&&(qt.value=t[0].name),c=new Yi({props:qt}),_t.push(()=>Ct(c,"value",bt));let Ht=((Ci=t[1])==null?void 0:Ci.name)&&Oy(t),St=((Xe=t[1])==null?void 0:Xe.description)&&Py(t);function Rt(at){t[12](at)}let st={className:"pw disabled",type:"text",name:"company",id:"input-proj-company",disabled:!0};t[0].company!==void 0&&(st.value=t[0].company),V=new Yi({props:st}),_t.push(()=>Ct(V,"value",Rt));function Lt(at){t[13](at)}let Xt={className:"pw disabled",name:"owner",id:"input-proj-owner",disabled:!0,type:"text"};t[0].owner!==void 0&&(Xt.value=t[0].owner),le=new Yi({props:Xt}),_t.push(()=>Ct(le,"value",Lt));function fn(at){t[14](at)}let Sn={className:"pw disabled",name:"createdDate",disabled:!0,type:"text",id:"createdDate"};return t[0].createdDate!==void 0&&(Sn.value=t[0].createdDate),te=new Yi({props:Sn}),_t.push(()=>Ct(te,"value",fn)),ze=new Gt({props:{disabled:JSON.stringify(Ma(t[0]))===JSON.stringify(t[2]),id:"edit-submit",buttonType:"submit",buttonText:t[3]("generic.submit"),importance:"emphasized"}}),nt=new Gt({props:{id:"edit-cancel",buttonType:"button",buttonText:t[3]("generic.cancel")}}),nt.$on("btnClick",t[16]),{c(){var at,Ze;Ke.c(),n=Y(),e=A("form"),i=A("se-container"),r=A("se-block"),o=A("center"),s=A("se-block"),pt&&pt.c(),l=Y(),a=A("se-form-field"),De(c.$$.fragment),d=Y(),f=A("se-container"),Ht&&Ht.c(),p=Y(),m=A("p"),h=de(g),_=de("/"),y=de(b),R=Y(),O=A("se-form-field"),j=A("qds-textarea"),M=Y(),z=A("se-container"),St&&St.c(),D=Y(),P=A("p"),C=de(L),S=de("/"),N=de(I),U=Y(),H=A("se-container"),Z=A("se-form-field"),De(V.$$.fragment),re=Y(),G=A("se-block"),F=Y(),X=A("se-form-field"),De(le.$$.fragment),$=Y(),he=A("se-container"),me=A("se-form-field"),De(te.$$.fragment),ge=Y(),fe=A("se-block"),ae=Y(),ie=A("se-form-field"),_e=A("select"),Ie=A("option"),pe=de(we),Se=A("option"),Re=de(Le),Ee=A("option"),Ce=de(ke),Ne=A("option"),Ve=de(Pe),ot=A("option"),He=de(gt),Ye=Y(),Ue=A("se-container"),rt=A("span"),De(ze.$$.fragment),tt=Y(),je=A("span"),De(nt.$$.fragment),x(m,"class",k=Nt(String((at=t[0])==null?void 0:at.name).length>30?"pw align-right validation-error pw red-color":"pw align-right validation-error")+" svelte-1clcpcr"),w(f,"option","column"),w(a,"block","true"),w(a,"id","input-stacked-form"),w(a,"label",T=t[3]("edit_project.project_name")),w(a,"required","true"),w(a,"option","stacked"),w(j,"readonly",t[4]),w(j,"id","input-proj-description"),w(j,"name","description"),w(j,"class","description-height svelte-1clcpcr"),w(j,"value",q=t[0].description),w(j,"maxlength",Nu),x(P,"class",E=Nt(String((Ze=t[0])==null?void 0:Ze.description).length>350?"pw align-right validation-error pw red-color":"pw align-right validation-error")+" svelte-1clcpcr"),w(z,"option","column"),w(O,"block","true"),w(O,"id","input-stacked-form"),w(O,"label",B=t[3]("generic.description")),w(O,"option","stacked"),w(Z,"class","width-48 svelte-1clcpcr"),w(Z,"block","true"),w(Z,"id","input-stacked-form"),w(Z,"label",W=t[3]("edit_project.end_user_company")),w(Z,"option","stacked"),w(G,"class","width-4 svelte-1clcpcr"),w(X,"class","width-48 svelte-1clcpcr"),w(X,"block","true"),w(X,"id","input-stacked-form"),w(X,"label",ee=t[3]("edit_project.project_owner")),w(X,"option","stacked"),w(H,"direction","row"),w(H,"class","edit-font svelte-1clcpcr"),w(H,"rowsize","50%"),w(me,"block","true"),w(me,"class","width-48 svelte-1clcpcr"),w(me,"id","input-stacked-form"),w(me,"label",ce=t[3]("generic.date")),w(me,"option","stacked"),w(fe,"class","width-4 svelte-1clcpcr"),x(Ie,"id","opt-proj-open"),Ie.__value=yP,wc(Ie,Ie.__value),x(Se,"id","opt-proj-in-progress"),Se.__value=SP,wc(Se,Se.__value),x(Ee,"id","opt-proj-completed"),Ee.__value=qb,wc(Ee,Ee.__value),x(Ne,"id","opt-proj-on-hold"),Ne.__value=kP,wc(Ne,Ne.__value),x(ot,"id","opt-proj-cancelled"),ot.__value=Db,wc(ot,ot.__value),x(_e,"name","status"),x(_e,"id","input-proj-status"),t[0].status===void 0&&pp(()=>t[15].call(_e)),w(ie,"disabled",t[4]),w(ie,"class","width-48 svelte-1clcpcr"),w(ie,"id","select-form"),w(ie,"label",Be=t[3]("edit_project.project_status")),w(ie,"required","true"),w(ie,"type","select"),w(ie,"option","stacked"),w(he,"class","edit-font svelte-1clcpcr"),w(he,"direction","row"),w(he,"rowsize","50%"),x(rt,"class","pw pointer pw normal-font svelte-1clcpcr"),x(je,"class","pw pointer pw normal-font edit-cancel svelte-1clcpcr"),w(Ue,"class","edit-font dialog-button svelte-1clcpcr"),w(Ue,"direction","row"),w(Ue,"rowsize","50%"),w(s,"width","80%"),w(i,"class","edit-font svelte-1clcpcr"),w(i,"option","column")},m(at,Ze){Ke.m(at,Ze),J(at,n,Ze),J(at,e,Ze),v(e,i),v(i,r),v(r,o),v(o,s),pt&&pt.m(s,null),v(s,l),v(s,a),Me(c,a,null),v(a,d),v(a,f),Ht&&Ht.m(f,null),v(f,p),v(f,m),v(m,h),v(m,_),v(m,y),v(s,R),v(s,O),v(O,j),v(O,M),v(O,z),St&&St.m(z,null),v(z,D),v(z,P),v(P,C),v(P,S),v(P,N),v(s,U),v(s,H),v(H,Z),Me(V,Z,null),v(H,re),v(H,G),v(H,F),v(H,X),Me(le,X,null),v(s,$),v(s,he),v(he,me),Me(te,me,null),v(he,ge),v(he,fe),v(he,ae),v(he,ie),v(ie,_e),v(_e,Ie),v(Ie,pe),v(_e,Se),v(Se,Re),v(_e,Ee),v(Ee,Ce),v(_e,Ne),v(Ne,Ve),v(_e,ot),v(ot,He),p0(_e,t[0].status,!0),v(s,Ye),v(s,Ue),v(Ue,rt),Me(ze,rt,null),v(Ue,tt),v(Ue,je),Me(nt,je,null),$e=!0,mt||(lt=[xe(j,"input",t[11]),xe(_e,"change",t[15]),xe(e,"submit",Ts(t[7]))],mt=!0)},p(at,Ze){var jn,yn,sn,dt,$t,dn,On,ri;Bt===(Bt=vt(at))&&Ke?Ke.p(at,Ze):(Ke.d(1),Ke=Bt(at),Ke&&(Ke.c(),Ke.m(n.parentNode,n))),at[4]?pt?pt.p(at,Ze):(pt=Ay(at),pt.c(),pt.m(s,l)):pt&&(pt.d(1),pt=null);const kt={};!u&&Ze&1&&(u=!0,kt.value=at[0].name,Tt(()=>u=!1)),c.$set(kt),(jn=at[1])!=null&&jn.name?Ht?Ht.p(at,Ze):(Ht=Oy(at),Ht.c(),Ht.m(f,p)):Ht&&(Ht.d(1),Ht=null),(!$e||Ze&1)&&g!==(g=String((yn=at[0])==null?void 0:yn.name).length+"")&&be(h,g),(!$e||Ze&8)&&b!==(b=at[3]("edit_project.30_characters")+"")&&be(y,b),(!$e||Ze&1&&k!==(k=Nt(String((sn=at[0])==null?void 0:sn.name).length>30?"pw align-right validation-error pw red-color":"pw align-right validation-error")+" svelte-1clcpcr"))&&x(m,"class",k),(!$e||Ze&8&&T!==(T=at[3]("edit_project.project_name")))&&w(a,"label",T),(!$e||Ze&16)&&w(j,"readonly",at[4]),(!$e||Ze&1&&q!==(q=at[0].description))&&w(j,"value",q),(dt=at[1])!=null&&dt.description?St?St.p(at,Ze):(St=Py(at),St.c(),St.m(z,D)):St&&(St.d(1),St=null),(!$e||Ze&1)&&L!==(L=(($t=at[0])!=null&&$t.description?(On=(dn=at[0])==null?void 0:dn.description)==null?void 0:On.length:0)+"")&&be(C,L),(!$e||Ze&8)&&I!==(I=at[3]("edit_project.350_characters")+"")&&be(N,I),(!$e||Ze&1&&E!==(E=Nt(String((ri=at[0])==null?void 0:ri.description).length>350?"pw align-right validation-error pw red-color":"pw align-right validation-error")+" svelte-1clcpcr"))&&x(P,"class",E),(!$e||Ze&8&&B!==(B=at[3]("generic.description")))&&w(O,"label",B);const nn={};!ne&&Ze&1&&(ne=!0,nn.value=at[0].company,Tt(()=>ne=!1)),V.$set(nn),(!$e||Ze&8&&W!==(W=at[3]("edit_project.end_user_company")))&&w(Z,"label",W);const Ft={};!ue&&Ze&1&&(ue=!0,Ft.value=at[0].owner,Tt(()=>ue=!1)),le.$set(Ft),(!$e||Ze&8&&ee!==(ee=at[3]("edit_project.project_owner")))&&w(X,"label",ee);const Zt={};!oe&&Ze&1&&(oe=!0,Zt.value=at[0].createdDate,Tt(()=>oe=!1)),te.$set(Zt),(!$e||Ze&8&&ce!==(ce=at[3]("generic.date")))&&w(me,"label",ce),(!$e||Ze&8)&&we!==(we=at[3]("generic.open")+"")&&be(pe,we),(!$e||Ze&8)&&Le!==(Le=at[3]("generic.in_progress")+"")&&be(Re,Le),(!$e||Ze&8)&&ke!==(ke=at[3]("generic.completed")+"")&&be(Ce,ke),(!$e||Ze&8)&&Pe!==(Pe=at[3]("generic.on_hold")+"")&&be(Ve,Pe),(!$e||Ze&8)&>!==(gt=at[3]("generic.cancelled")+"")&&be(He,gt),Ze&1&&p0(_e,at[0].status),(!$e||Ze&16)&&w(ie,"disabled",at[4]),(!$e||Ze&8&&Be!==(Be=at[3]("edit_project.project_status")))&&w(ie,"label",Be);const zn={};Ze&5&&(zn.disabled=JSON.stringify(Ma(at[0]))===JSON.stringify(at[2])),Ze&8&&(zn.buttonText=at[3]("generic.submit")),ze.$set(zn);const Rn={};Ze&8&&(Rn.buttonText=at[3]("generic.cancel")),nt.$set(Rn)},i(at){$e||(Q(c.$$.fragment,at),Q(V.$$.fragment,at),Q(le.$$.fragment,at),Q(te.$$.fragment,at),Q(ze.$$.fragment,at),Q(nt.$$.fragment,at),$e=!0)},o(at){se(c.$$.fragment,at),se(V.$$.fragment,at),se(le.$$.fragment,at),se(te.$$.fragment,at),se(ze.$$.fragment,at),se(nt.$$.fragment,at),$e=!1},d(at){at&&(K(n),K(e)),Ke.d(at),pt&&pt.d(),qe(c),Ht&&Ht.d(),St&&St.d(),qe(V),qe(le),qe(te),qe(ze),qe(nt),mt=!1,An(lt)}}}function qD(t){let n,e=t[3]("edit_project.edit_project_details")+"",i,r,o,s,l;return{c(){n=A("p"),i=de(e),r=Y(),o=A("se-icon"),o.textContent="action_close",x(n,"class","font-heading svelte-1clcpcr"),w(o,"size","small"),w(o,"class","align-middle close-dialog cursor-pointer svelte-1clcpcr"),w(o,"data-testid","cross-button-close")},m(a,c){J(a,n,c),v(n,i),J(a,r,c),J(a,o,c),s||(l=xe(o,"click",t[9]),s=!0)},p(a,c){c&8&&e!==(e=a[3]("edit_project.edit_project_details")+"")&&be(i,e)},d(a){a&&(K(n),K(r),K(o)),s=!1,l()}}}function DD(t){let n,e=t[3]("project_listing.clone_project")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","font-heading svelte-1clcpcr")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o&8&&e!==(e=r[3]("project_listing.clone_project")+"")&&be(i,e)},d(r){r&&K(n)}}}function Ay(t){let n,e=t[3]("project_listing.project_title_reach_maximum")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","clone-error-message svelte-1clcpcr")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o&8&&e!==(e=r[3]("project_listing.project_title_reach_maximum")+"")&&be(i,e)},d(r){r&&K(n)}}}function Oy(t){var r;let n,e=((r=t[1])==null?void 0:r.name)+"",i;return{c(){n=A("span"),i=de(e),x(n,"id","err-name"),x(n,"class","validation-error pw red-color svelte-1clcpcr")},m(o,s){J(o,n,s),v(n,i)},p(o,s){var l;s&2&&e!==(e=((l=o[1])==null?void 0:l.name)+"")&&be(i,e)},d(o){o&&K(n)}}}function Py(t){var r;let n,e=((r=t[1])==null?void 0:r.description)+"",i;return{c(){n=A("span"),i=de(e),x(n,"id","err-des"),x(n,"class","validation-error pw red-color svelte-1clcpcr")},m(o,s){J(o,n,s),v(n,i)},p(o,s){var l;s&2&&e!==(e=((l=o[1])==null?void 0:l.description)+"")&&be(i,e)},d(o){o&&K(n)}}}function BD(t){let n,e,i,r,o=t[0]&&Iy(t);return{c(){n=A("se-loading"),e=Y(),o&&o.c(),i=wt(),w(n,"loading",t[5]),w(n,"overlay","true")},m(s,l){J(s,n,l),J(s,e,l),o&&o.m(s,l),J(s,i,l),r=!0},p(s,[l]){(!r||l&32)&&w(n,"loading",s[5]),s[0]?o?(o.p(s,l),l&1&&Q(o,1)):(o=Iy(s),o.c(),Q(o,1),o.m(i.parentNode,i)):o&&(Je(),se(o,1,1,()=>{o=null}),Qe())},i(s){r||(Q(o),r=!0)},o(s){se(o),r=!1},d(s){s&&(K(n),K(e),K(i)),o&&o.d(s)}}}function UD(t,n,e){let i,r,o,s;ye(t,Vt,O=>e(3,i=O)),ye(t,ti,O=>e(17,r=O)),ye(t,wa,O=>e(4,o=O)),ye(t,Jt,O=>e(5,s=O));let{projectData:l}=n,{errors:a={}}=n,{copyOfProjectDetails:c={}}=n;const u=Mn();function d(O){wa.update(()=>!1),u("closePopupEvent",{action:O})}Un(function(){Rr(!1)}),Kn(()=>{Rr(!1)});const f=()=>{var O;if(((O=l==null?void 0:l.name)==null?void 0:O.length)===0)e(1,a.name=i("edit_project.enter_project_name_message"),a);else if(l.name&&l.name.length>30)e(1,a.name=i("edit_project.please_enter_only_30_characters"),a);else if(l.description&&l.description.length>350)e(1,a.description=i("edit_project.please_enter_only_350_characters"),a);else if(o)m();else{Jt.update(()=>!0);const j={name:String(l.name),description:l.description?String(l.description):"",status:String(l.status)},q=i("edit_project.project_updated_successfully_message");Vi(j,String(l.id),q,r,!0,!0).catch(()=>{xo.set("error"),Go.set(i("generic.error_message"))}).then(()=>{d("submit")}).finally(()=>{ve.info("Project updated for with ID: ",j.id)}),e(1,a={})}};function p(O,j,q){e(0,l.description=O.target.value,l);let M=String(l[q]),z=String(O.target.value);z.length<=j?e(0,l[q]=z,l):e(0,l[q]=M,l)}function m(){u(Gb,{action:l})}const g=()=>{d("cancel")};function h(O){t.$$.not_equal(l.name,O)&&(l.name=O,e(0,l))}const _=O=>{p(O,Nu,MP)};function b(O){t.$$.not_equal(l.company,O)&&(l.company=O,e(0,l))}function y(O){t.$$.not_equal(l.owner,O)&&(l.owner=O,e(0,l))}function k(O){t.$$.not_equal(l.createdDate,O)&&(l.createdDate=O,e(0,l))}function T(){l.status=HI(this),e(0,l)}const R=()=>{d("cancel")};return t.$$set=O=>{"projectData"in O&&e(0,l=O.projectData),"errors"in O&&e(1,a=O.errors),"copyOfProjectDetails"in O&&e(2,c=O.copyOfProjectDetails)},[l,a,c,i,o,s,d,f,p,g,h,_,b,y,k,T,R]}class Ny extends Ot{constructor(n){super(),At(this,n,UD,BD,It,{projectData:0,errors:1,copyOfProjectDetails:2},MD)}}const fne="";function zD(t){Ut(t,"svelte-sysyte",".pw.pointer.svelte-sysyte{cursor:pointer}h4.heading.svelte-sysyte{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-sysyte{position:absolute;right:8px;top:8px}.heading.svelte-sysyte{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px}#confirm-text.svelte-sysyte{font-weight:400;font-size:14px}.dialog-footer-button.svelte-sysyte{margin-top:12px;margin-left:-4px}.popup-content.svelte-sysyte{padding:0px 20px;margin-bottom:20px;margin-top:-16px}.small-text.svelte-sysyte{font-size:12px}.margin-top-10.svelte-sysyte{margin-top:10px}")}function Ly(t){let n,e,i=t[7]("project_listing.user_list_remove")+"",r;return{c(){n=A("p"),e=de("*"),r=de(i),x(n,"class","small-text margin-top-10 svelte-sysyte")},m(o,s){J(o,n,s),v(n,e),v(n,r)},p(o,s){s&128&&i!==(i=o[7]("project_listing.user_list_remove")+"")&&be(r,i)},d(o){o&&K(n)}}}function FD(t){let n,e,i=t[7]("generic.confirm")+"",r,o,s,l,a,c,u,d,f=t[7]("project_listing.add_project_message")+"",p,m,g,h,_,b,y=t[6]===t[7]("project_listing.archive"),k,T,R,O,j,q,M,z,D,P,L=y&&Ly(t);return O=new Gt({props:{importance:"emphasized",buttonText:t[7]("generic.yes")}}),O.$on("btnClick",t[11]),M=new Gt({props:{buttonText:t[7]("generic.no")}}),M.$on("btnClick",t[12]),{c(){n=A("se-dialog"),e=A("h4"),r=de(i),o=Y(),s=de(t[6]),l=Y(),a=A("se-icon"),a.textContent="action_delete_cross",c=Y(),u=A("se-dialog-content"),d=A("span"),p=de(f),m=Y(),g=de(t[6]),h=Y(),_=de(t[3]),b=de(` ? `),L&&L.c(),k=Y(),T=A("div"),R=A("span"),De(O.$$.fragment),j=Y(),q=A("span"),De(M.$$.fragment),x(e,"class","heading svelte-sysyte"),x(e,"id","popup-header"),w(a,"id","close-popup"),w(a,"class","cross-icon pw pointer svelte-sysyte"),w(a,"color","standard"),x(d,"id","confirm-text"),x(d,"class","svelte-sysyte"),x(R,"class","popup-button"),x(q,"class","popup-button"),x(T,"class","dialog-footer-button svelte-sysyte"),w(u,"class","popup-content svelte-sysyte"),w(n,"id",t[5]),w(n,"can-backdrop","false"),w(n,"open",t[4]),w(n,"class","svelte-sysyte")},m(C,S){J(C,n,S),v(n,e),v(e,r),v(e,o),v(e,s),v(n,l),v(n,a),v(n,c),v(n,u),v(u,d),v(d,p),v(d,m),v(d,g),v(d,h),v(d,_),v(d,b),L&&L.m(d,null),v(u,k),v(u,T),v(T,R),Me(O,R,null),v(T,j),v(T,q),Me(M,q,null),t[13](n),z=!0,D||(P=xe(a,"click",t[10]),D=!0)},p(C,[S]){(!z||S&128)&&i!==(i=C[7]("generic.confirm")+"")&&be(r,i),(!z||S&64)&&be(s,C[6]),(!z||S&128)&&f!==(f=C[7]("project_listing.add_project_message")+"")&&be(p,f),(!z||S&64)&&be(g,C[6]),(!z||S&8)&&be(_,C[3]),S&192&&(y=C[6]===C[7]("project_listing.archive")),y?L?L.p(C,S):(L=Ly(C),L.c(),L.m(d,null)):L&&(L.d(1),L=null);const I={};S&128&&(I.buttonText=C[7]("generic.yes")),O.$set(I);const N={};S&128&&(N.buttonText=C[7]("generic.no")),M.$set(N),(!z||S&32)&&w(n,"id",C[5]),(!z||S&16)&&w(n,"open",C[4])},i(C){z||(Q(O.$$.fragment,C),Q(M.$$.fragment,C),z=!0)},o(C){se(O.$$.fragment,C),se(M.$$.fragment,C),z=!1},d(C){C&&K(n),L&&L.d(),qe(O),qe(M),t[13](null),D=!1,P()}}}function xD(t,n,e){let i;ye(t,Vt,b=>e(7,i=b));const r=Mn();let{wrapper:o}=n,{archiveStatus:s}=n,{projectId:l}=n,{projectName:a}=n,{open:c=!1}=n,{dialogId:u}=n,{dialogType:d}=n;function f(b,y,k,T){r("updateProjectEvent",{wrapper:b,archiveStatus:!!y,projectId:String(k),projectName:String(T)})}function p(b,y){r("closePopupEvent",{wrapperarchiveUnarchive:b,archiveDialogId:String(y)})}const m=()=>{p(o,u)},g=()=>{f(o,s,String(l),String(a))},h=()=>{p(o,u)};function _(b){_t[b?"unshift":"push"](()=>{o=b,e(0,o)})}return t.$$set=b=>{"wrapper"in b&&e(0,o=b.wrapper),"archiveStatus"in b&&e(1,s=b.archiveStatus),"projectId"in b&&e(2,l=b.projectId),"projectName"in b&&e(3,a=b.projectName),"open"in b&&e(4,c=b.open),"dialogId"in b&&e(5,u=b.dialogId),"dialogType"in b&&e(6,d=b.dialogType)},[o,s,l,a,c,u,d,i,f,p,m,g,h,_]}class GD extends Ot{constructor(n){super(),At(this,n,xD,FD,It,{wrapper:0,archiveStatus:1,projectId:2,projectName:3,open:4,dialogId:5,dialogType:6},zD)}}function oc(t,n,e){const i=t?new Date(t):new Date;return vD(i,n,{...e})}const os=typeof window<"u"?window.origin:"https://www.se.com",sl=t=>t.replace("https://www.se.com/","").replace("https://www.apc.com/","").split("/",2);function k_(t){const n=t.split("/search/");return n.length>1?n[1].split("/source=")[0]:null}function HD(t){const n=t.split("/search/");if(n.length>1){const e=n[1].split("/source=");if(e.length>1)return e[1]}return"all"}const WD=[{type:"myschneider native link",regexpMatcher:/https:\/\/www\.se\.com\/myschneider\//i,convert:t=>t},{type:"apc link",regexpMatcher:/^https?:\/\/(www\.)?apc\.com/,convert:t=>t},{type:"simple-product",regexpMatcher:/\/product\/(?[\w-]+)/,convert:function(t){var o,s;const[n,e]=sl(t),i=((o=this==null?void 0:this.regexpMatcher)==null?void 0:o.exec).call(o,t),r=String((s=i==null?void 0:i.groups)==null?void 0:s.productId);return zt()?`${os}/myschneider/catalogBrowse/${n}/${e}/product/${r}`:`${os}/${n}/${e}/product/${r}`}},{type:"product-category",regexpMatcher:/\/product-category\/(?\d+)/,convert:function(t){var o,s;const[n,e]=sl(t),i=((o=this==null?void 0:this.regexpMatcher)==null?void 0:o.exec).call(o,t),r=String((s=i==null?void 0:i.groups)==null?void 0:s.category);return zt()?`${os}/myschneider/catalogBrowse/${n}/${e}/category/${r}`:`${os}/${n}/${e}/product-category/${r}`}},{type:"product-subcategory",regexpMatcher:/\/product-subcategory\/(?\d+)/,convert:function(t){var o,s;const[n,e]=sl(t),i=((o=this==null?void 0:this.regexpMatcher)==null?void 0:o.exec).call(o,t),r=String((s=i==null?void 0:i.groups)==null?void 0:s.subcategory);return zt()?`${os}/myschneider/catalogBrowse/${n}/${e}/subcategory/${r}`:`${os}/${n}/${e}/subcategory/${r}`}},{type:"product-range",regexpMatcher:/\/product-range\/(?\d+)/,convert:function(t){var o,s;const[n,e]=sl(t),i=((o=this==null?void 0:this.regexpMatcher)==null?void 0:o.exec).call(o,t),r=String((s=i==null?void 0:i.groups)==null?void 0:s.range);return zt()?`${os}/myschneider/catalogBrowse/${n}/${e}/range/${r}`:`${os}/${n}/${e}/range/${r}`}},{type:"work-products",regexpMatcher:/\/work\/products\/(.+)/,convert:function(t){const[n,e]=sl(t),i=t.split("/work/products/")[1];return zt()?`${os}/myschneider/catalogBrowse/${n}/${e}/work/products/${i}`:`${os}/${n}/${e}/work/products/${i}`}},{type:"substitution",regexpMatcher:/\/product-substitution\/(?[\w-]+)/,convert:function(t){var o,s;const n=((o=this==null?void 0:this.regexpMatcher)==null?void 0:o.exec).call(o,t),e=String((s=n==null?void 0:n.groups)==null?void 0:s.productId),[i,r]=sl(t);return zt()?`${os}/myschneider/productSubsTool?search=${e}`:`${os}/${i}/${r}/product-substitution/${e}`}},{type:"ddc",regexpMatcher:/\/download\/document\/(?[\w\s_-]+)/,convert:function(t){var s,l;const[n,e]=sl(t),i=((s=this==null?void 0:this.regexpMatcher)==null?void 0:s.exec).call(s,t),r=String((l=i==null?void 0:i.groups)==null?void 0:l.ddcId),o=encodeURIComponent(r);return`${os}/myschneider/documentsDownloadCenter/detail/?id=${o}&country=${n}&lang=${e}`}},{type:"faqs",regexpMatcher:/\/faqs\/(?\w+)/,convert:function(t){var o,s;const[n,e]=sl(t),i=((o=this==null?void 0:this.regexpMatcher)==null?void 0:o.exec).call(o,t),r=String((s=i==null?void 0:i.groups)==null?void 0:s.faqId);return zt()?`${os}/myschneider/faq/${r}/${e}`:`${os}/${n}/${e}/faq/${r}`}},{type:"clipsal external link",regexpMatcher:/^https?:\/\/www\.clipsal\.com/,convert:t=>t},{type:"pre se link",regexpMatcher:/^https?:\/\/www-pre\.se\.com/,convert:function(t){return`https://www-pre.se.com/myschneider/search/?q=${k_(t)}`}},{type:"sqe se link",regexpMatcher:/^https?:\/\/www-sqe\.se\.com/,convert:function(t){return`https://www-sqe.se.com/myschneider/search/?q=${k_(t)}`}},{type:"se link",regexpMatcher:/^https?:\/\/(www\.)?se\.com/,convert:function(t){const n=k_(t),e=HD(t),[i,r]=sl(t);return zt()?`${os}/myschneider/search/?q=${n}&source=${e}`:`${os}/${i}/${r}/search/?q=${n}&source=${e}`}},{type:"order link",regexpMatcher:/^\/myschneider\/ordermanagement\/orders\/detail\?/,convert:function(t){const n=t.replace(/^.*?myschneider\/ordermanagement\/orders\/detail\?/,"");return zt()?`${os}/myschneider/ordermanagement/orders/detail?${n}`:`${os}/ordermanagement/orders/detail?${n}`}}],VD=t=>{const n=WD.find(e=>{if(e.cbkMatcher)return e.cbkMatcher(t);if(e.regexpMatcher)return e.regexpMatcher.test(t);throw new Error("Misconfigured URL matcher, must have 1 matching method, has none"+e.type)});if(!n)throw new Error("No match found");return n};function vo(t){if(t)try{return VD(t).convert(t)}catch(n){return ve.error("Guided has unmatched URL",t,"will use raw URL, error:",n),t}}function jy(t){const n=new Set(t.map(e=>{if((e==null?void 0:e.productRef)??(e==null?void 0:e.productId))return e;if(!(e!=null&&e.productRef)&&!(e!=null&&e.productId))return e}));return(n==null?void 0:n.size)<(t==null?void 0:t.length)&&(t=bf(t)),wm(t,!0),t}function YD(t,n){return t==null||t.forEach(e=>{var i;n.push(e),((i=e==null?void 0:e.parts)==null?void 0:i.length)>0&&(n=[...n,...e.parts])}),n}async function If(t,n,e,i=!1){let r=NM(t);const o=[];for(const l of r)Ry(o,l,e,n,i);const s=My(n,e,i);return ve.info("BOM Export Header",s),i?await qM(s,o,"sheet"):await Zw(s,o,"sheet")}function ZD(t){var e;if(!((e=t[_v])!=null&&e.length))return"bom_manager.status_unavailable";const n=t[_v];return typeof n[0]===Tu?n[0]===gi?on:`BACKEND.${String(n[0])}`:n.map(i=>`BACKEND.${i.name} ${i.value}`).join(" ")}function Ry(t,n,e,i,r=!1){const o=ks(ZD(n),i);let s;if(s=[n[sN],n[tv]??n[dg],n[bv],o,fr(gn(We.language,e),mn(We.country,e),typeof n[lg]===Al?String(n[lg][wN]||0):String(n[lg]||0)),n[vv]],r){const l={...n,entityType:(n==null?void 0:n.partType)===Ei.CONFIGURABLE?i==null?void 0:i[G0.CTO_TOKEN]:i==null?void 0:i[G0.SINGLE_TOKEN]};s=[l[tv]??l[dg],l[vv],l[cg.ENTITY_TYPE],l[cg.CONFIGURATION_ID],l[cg.PRODUCT_CODE],l[bv]]}wf(e)||(s=s==null?void 0:s.filter((l,a)=>a!==ky)),t.push(s)}function My(t,n,e=!1){let i=JSON.parse(JSON.stringify(C0));return e&&(i=JSON.parse(JSON.stringify(FN))),wf(n)||(i=i==null?void 0:i.filter(r=>(r==null?void 0:r.v)!==C0[ky].v)),i.forEach(r=>{r.v=String(t==null?void 0:t[r==null?void 0:r.v])}),i}async function S_(t,n,e){let i=[];t=jy(t),i=YD(t,i);const r=[];for(const s of i)Ry(r,s,e,n);const o=My(n,e);return ve.info("BOM Export Header",o),await Zw(o,r,"sheet")}function $d(){var n,e;let t=TD.replace("_country",(n=We.country)==null?void 0:n.toLowerCase());return((e=We.country)==null?void 0:e.toLowerCase())===bl.DE?t=t.replace("_language",bl.DE):t=t.replace("_language",String(We.language)),t}function ep(t){const n=[];let e=[];return e=Do(t==null?void 0:t.bom,e),e=jy(e),e.forEach(i=>{const r={productRef:(i==null?void 0:i.productRef)??(i==null?void 0:i.productId),quantity:i.quantity,description:i.description};i!=null&&i.parts||(r.url=vo(i.pdpUrl)),n.push(r)}),n}const dne="";function XD(t){Ut(t,"svelte-wujj40",".pw.pointer.svelte-wujj40{cursor:pointer}h4.heading.svelte-wujj40{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-wujj40{position:absolute;right:8px;top:8px}.heading.svelte-wujj40{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px}#confirm-text.svelte-wujj40{font-weight:400;font-size:14px}.dialog-footer-button.svelte-wujj40{margin-top:12px;margin-left:-4px}.popup-content.svelte-wujj40{padding:0px 20px;margin-bottom:20px;margin-top:-16px}")}function KD(t){let n,e=t[6]("bom_manager.confirm_delete_message")+"",i;return{c(){n=A("h4"),i=de(e),x(n,"class","heading svelte-wujj40"),x(n,"id","delete-header")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o&64&&e!==(e=r[6]("bom_manager.confirm_delete_message")+"")&&be(i,e)},d(r){r&&K(n)}}}function JD(t){let n,e;return{c(){n=A("h4"),e=de(t[5]),x(n,"class","heading svelte-wujj40"),x(n,"id","cart-header")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r&32&&be(e,i[5])},d(i){i&&K(n)}}}function QD(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_;function b(T,R){return T[1]==kp.DELETE?JD:KD}let y=b(t),k=y(t);return f=new Gt({props:{id:"btn-confirm-yes",buttonText:t[3],importance:"emphasized"}}),f.$on("btnClick",t[13]),m=new Gt({props:{id:"btn-confirm-cancel",buttonText:t[4]}}),m.$on("btnClick",t[14]),{c(){n=A("se-dialog"),k.c(),e=Y(),i=A("se-icon"),i.textContent="action_delete_cross",r=Y(),o=A("se-dialog-content"),s=A("se-loading"),l=Y(),a=A("span"),c=de(t[2]),u=Y(),d=A("div"),De(f.$$.fragment),p=Y(),De(m.$$.fragment),w(i,"id","close-popup"),w(i,"class","cross-icon pw pointer svelte-wujj40"),w(i,"color","standard"),w(s,"loading",$D),w(s,"overlay","true"),x(a,"id","confirm-text"),x(a,"class","svelte-wujj40"),x(d,"class","dialog-footer-button svelte-wujj40"),w(o,"class","popup-content svelte-wujj40"),w(n,"id","dialog-confirm"),w(n,"open",t[0]),w(n,"can-backdrop","false")},m(T,R){J(T,n,R),k.m(n,null),v(n,e),v(n,i),v(n,r),v(n,o),v(o,s),v(o,l),v(o,a),v(a,c),v(o,u),v(o,d),Me(f,d,null),v(d,p),Me(m,d,null),g=!0,h||(_=xe(i,"click",t[12]),h=!0)},p(T,[R]){y===(y=b(T))&&k?k.p(T,R):(k.d(1),k=y(T),k&&(k.c(),k.m(n,e))),(!g||R&4)&&be(c,T[2]);const O={};R&8&&(O.buttonText=T[3]),f.$set(O);const j={};R&16&&(j.buttonText=T[4]),m.$set(j),(!g||R&1)&&w(n,"open",T[0])},i(T){g||(Q(f.$$.fragment,T),Q(m.$$.fragment,T),g=!0)},o(T){se(f.$$.fragment,T),se(m.$$.fragment,T),g=!1},d(T){T&&K(n),k.d(),qe(f),qe(m),h=!1,_()}}}let $D=!1;function eB(t,n,e){let i,r;ye(t,ti,k=>e(15,i=k)),ye(t,Vt,k=>e(6,r=k));let{isPopupOpen:o}=n,{popupName:s}=n,{confirmTxt:l}=n,{confirmLbl:a}=n,{cancelLbl:c}=n,{payload:u}=n,{isLoading:d}=n,{title:f}=n,{emailBody:p}=n;function m(){e(0,o=!1)}function g(){e(9,u.isDelete=!0,u),jg(u,r("share_project.user_removed_successfully"),i).catch(k=>{e(10,d=!1),ve.error(k==null?void 0:k.message)}).then(()=>{e(10,d=!1);const k=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:p,module:fo.GENERIC_CONFIRM_POPUP}});document.dispatchEvent(k),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,T=>{ve.info("email response",T.detail.emailResp)})}).finally(()=>{e(10,d=!1),e(0,o=!1)})}function h(){switch(s){case kp.DELETE:{g();break}}}const _=()=>{m()},b=()=>{h()},y=()=>{m()};return t.$$set=k=>{"isPopupOpen"in k&&e(0,o=k.isPopupOpen),"popupName"in k&&e(1,s=k.popupName),"confirmTxt"in k&&e(2,l=k.confirmTxt),"confirmLbl"in k&&e(3,a=k.confirmLbl),"cancelLbl"in k&&e(4,c=k.cancelLbl),"payload"in k&&e(9,u=k.payload),"isLoading"in k&&e(10,d=k.isLoading),"title"in k&&e(5,f=k.title),"emailBody"in k&&e(11,p=k.emailBody)},[o,s,l,a,c,f,r,m,h,u,d,p,_,b,y]}class qy extends Ot{constructor(n){super(),At(this,n,eB,QD,It,{isPopupOpen:0,popupName:1,confirmTxt:2,confirmLbl:3,cancelLbl:4,payload:9,isLoading:10,title:5,emailBody:11},XD)}}const pne="";function tB(t){Ut(t,"svelte-zvdjon",".display-flex.svelte-zvdjon{display:-ms-flexbox;display:-webkit-flex;display:flex}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.drop-down.svelte-zvdjon{border:none;font-weight:400;color:var(--text-dark-gray);font-size:0.875rem;line-height:1.429;padding:8px}.dialog-content-width.svelte-zvdjon{position:relative;overflow-x:hidden;min-height:150px;max-height:200px;padding-right:8px}.error.svelte-zvdjon{color:var(--se-red, #dc0a0a);font-size:12px}.custom-search.svelte-zvdjon{position:relative;width:90%}.custom-search-button.svelte-zvdjon{border:0;outline:none;margin:0;z-index:2;color:var(--se-medium-blue, #219bfd);top:0px}.divtext.svelte-zvdjon{border:0px;width:100%;padding:10px;line-height:1;box-sizing:border-box;outline:none;background-color:transparent}.three-dots-icon.svelte-zvdjon{position:absolute;right:0px;top:0px}.flexbox.svelte-zvdjon{display:flex;width:100%;align-items:center}.move-right.svelte-zvdjon{padding:5px 0px 2px;width:100%;display:flex;align-items:center;background-color:var(--se-ultra-light-grey-3, #f3f2f2)}.user-logo.svelte-zvdjon{left:10px;position:absolute;border-radius:100%;border-color:gray;border-width:1px;border-style:solid}.user-email.svelte-zvdjon{right:0px;position:absolute;padding-right:50px}.mt-14.svelte-zvdjon{margin-top:14px}.email-center.svelte-zvdjon{margin-top:3px;margin-left:42px}.can-edit-center.svelte-zvdjon{top:-6px}.add-users-form.svelte-zvdjon{margin-top:16px}.message.svelte-zvdjon{width:100%;padding-top:12px;margin-top:12px;height:100%;outline:none}.share-with-info.svelte-zvdjon{margin-top:16px;font-size:14px;margin-bottom:10px}.share-country-list-button.svelte-zvdjon{color:var(--se-medium-blue, #219bfd);cursor:pointer}.add-email-block.svelte-zvdjon{width:calc(100% - 150px)}.flexbox.svelte-zvdjon{display:flex;width:100%;align-items:center}#dropdown-share-project-permission-email.svelte-zvdjon{margin-right:0.5em}#dropdown-change-collaborator-permission.svelte-zvdjon{margin-right:0.2em}.drop-down-parent.svelte-zvdjon{display:flex}")}function Dy(t,n,e){const i=t.slice();return i[6]=n[e],i[47]=e,i}function By(t,n,e){const i=t.slice();return i[48]=n[e],i[47]=e,i}function Uy(t){let n,e=t[13]("share_project.user_already_have_access_to_this_project")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-zvdjon"),x(n,"id","p-project-access-error"),x(n,"data-testid","duplicate-email-error")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&8192&&e!==(e=r[13]("share_project.user_already_have_access_to_this_project")+"")&&be(i,e)},d(r){r&&K(n)}}}function zy(t){let n,e=t[13]("share_project.email_already_exist")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-zvdjon"),x(n,"id","p-duplicate-email-error"),x(n,"data-testid","duplicate-email-error")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&8192&&e!==(e=r[13]("share_project.email_already_exist")+"")&&be(i,e)},d(r){r&&K(n)}}}function Fy(t){let n,e;return{c(){n=A("p"),e=de(t[12]),x(n,"class","error svelte-zvdjon")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r[0]&4096&&be(e,i[12])},d(i){i&&K(n)}}}function xy(t){let n,e,i,r;function o(){return t[29](t[48])}return{c(){n=A("qds-chip"),w(n,"data-testid","email-chip-"+t[47]),w(n,"class","chip-space svelte-zvdjon"),w(n,"id","doc-measurement-"+t[47]),w(n,"type","closable"),w(n,"text",e=t[48]),w(n,"size","standard")},m(s,l){J(s,n,l),i||(r=xe(n,"qdsClose",o),i=!0)},p(s,l){t=s,l[0]&2&&e!==(e=t[48])&&w(n,"text",e)},d(s){s&&K(n),i=!1,r()}}}function Gy(t){let n,e=Dt(t[15]),i=[];for(let r=0;ruser_standard',i=Y(),r=A("span"),s=de(o),l=Y(),a=A("span"),c=A("se-dropdown"),u=A("qds-button"),f=Y(),p=A("ul"),m=A("qds-list-item"),h=Y(),_=A("qds-list-item"),y=Y(),k=A("qds-list-item"),R=Y(),x(e,"class","user-logo svelte-zvdjon"),x(r,"class","email-center svelte-zvdjon"),x(r,"id","span-collaborator-email"),w(u,"class","custom-search-button svelte-zvdjon"),w(u,"slot","trigger"),w(u,"action","dropdown"),w(u,"type","button"),w(u,"id","button-update-collaborator-permission"),w(u,"text",d=t[6].canEdit?t[13]("share_project.can_edit"):t[13]("share_project.can_view")),w(m,"id","item-update-can-view-permission"),w(m,"text",g=t[13]("share_project.can_view")),w(_,"id","item-update-can-edit-permission"),w(_,"text",b=t[13]("share_project.can_edit")),w(k,"id","item-remove-permission"),w(k,"text",T=t[13]("generic.remove")),x(p,"id","list-update-collaborator-permission"),w(c,"alignment","right"),w(c,"id","dropdown-change-collaborator-permission"),w(c,"class","drop-down three-dots-icon can-edit-center svelte-zvdjon"),x(a,"class","user-email svelte-zvdjon"),x(n,"class","mt-14 display-flex svelte-zvdjon")},m(D,P){J(D,n,P),v(n,e),v(n,i),v(n,r),v(r,s),v(n,l),v(n,a),v(a,c),v(c,u),v(c,f),v(c,p),v(p,m),v(p,h),v(p,_),v(p,y),v(p,k),v(n,R),O||(j=[xe(m,"click",q),xe(_,"click",M),xe(k,"click",z)],O=!0)},p(D,P){t=D,P[0]&32768&&o!==(o=t[6].email+"")&&be(s,o),P[0]&40960&&d!==(d=t[6].canEdit?t[13]("share_project.can_edit"):t[13]("share_project.can_view"))&&w(u,"text",d),P[0]&8192&&g!==(g=t[13]("share_project.can_view"))&&w(m,"text",g),P[0]&8192&&b!==(b=t[13]("share_project.can_edit"))&&w(_,"text",b),P[0]&8192&&T!==(T=t[13]("generic.remove"))&&w(k,"text",T)},d(D){D&&K(n),O=!1,An(j)}}}function Wy(t){let n,e,i;function r(s){t[36](s)}let o={popupName:kp.DELETE,confirmTxt:t[13]("share_project.are_you_sure_remove_user"),confirmLbl:t[13]("generic.remove"),cancelLbl:t[13]("generic.cancel"),title:t[13]("share_project.remove_user"),payload:{linkId:t[5],email:t[9]},isLoading:t[7],emailBody:t[17](t[14],Cf)};return t[8]!==void 0&&(o.isPopupOpen=t[8]),n=new qy({props:o}),_t.push(()=>Ct(n,"isPopupOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&8192&&(a.confirmTxt=s[13]("share_project.are_you_sure_remove_user")),l[0]&8192&&(a.confirmLbl=s[13]("generic.remove")),l[0]&8192&&(a.cancelLbl=s[13]("generic.cancel")),l[0]&8192&&(a.title=s[13]("share_project.remove_user")),l[0]&544&&(a.payload={linkId:s[5],email:s[9]}),l[0]&128&&(a.isLoading=s[7]),l[0]&16384&&(a.emailBody=s[17](s[14],Cf)),!e&&l[0]&256&&(e=!0,a.isPopupOpen=s[8],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function nB(t){var Ue,rt,ze,tt,je,nt;let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M=t[0].toLowerCase()===(((rt=(Ue=t[6])==null?void 0:Ue.profile)==null?void 0:rt.email)||Te).toLowerCase(),z,D,P=t[12]&&t[12].length>0&&!Si(t[0]),L,C,S,I,N,E,B,U,H,Z,V,ne,W,re,G,F=t[4].owner+"",X,le,ue=t[13]("generic.you")+"",ee,$,he,me,te=t[13]("share_project.owner")+"",oe,ce,ge,fe,ae=t[13]("share_project.please_make_sure_collaborators_blong_france_brazil_germany")+"",ie,_e,Ie,we=t[13]("generic.here")+"",pe,Se,Le,Re,Ee,ke;function Ce($e){t[24]($e)}let Ne={type:"text",autoComplete:"off",id:"input-add-user-email",className:"pw width-100",placeholder:t[13]("share_bill_of_materials.enter_email_address")};t[0]!==void 0&&(Ne.value=t[0]),d=new Yi({props:Ne}),_t.push(()=>Ct(d,"value",Ce)),d.$on("onKeyDown",t[25]),d.$on("qdsInput",t[26]);let Pe=M&&Uy(t),Ve=t[2]&&zy(t),ot=P&&Fy(t),gt=Dt(t[1]),He=[];for(let $e=0;$euser_standard',re=Y(),G=A("span"),X=de(F),le=de(" ("),ee=de(ue),$=de(")"),he=Y(),me=A("span"),oe=de(te),ce=Y(),Be&&Be.c(),ge=Y(),fe=A("div"),ie=de(ae),_e=Y(),Ie=A("span"),pe=de(we),Se=de(" ."),Le=Y(),Ye&&Ye.c(),w(n,"loading",t[7]),w(n,"overlay","true"),w(r,"inline",""),w(r,"id","label-collabotaor-list-text"),w(r,"text",o=t[13]("share_project.add_team_members")),x(u,"class","divtext svelte-zvdjon"),x(c,"class","add-email-block svelte-zvdjon"),w(h,"action","dropdown"),w(h,"size","large"),w(h,"class","custom-search-button svelte-zvdjon"),w(h,"data-testid","permission-button-share-project"),w(h,"slot","trigger"),w(h,"id","button-share-project-permission"),w(h,"type","button"),w(h,"text",_=t[3]?t[13]("share_project.can_edit"):t[13]("share_project.can_view")),w(k,"id","item-share-project-can-view-permission"),w(k,"text",T=t[13]("share_project.can_view")),w(O,"id","item-share-project-can-edit-permission"),w(O,"text",j=t[13]("share_project.can_edit")),x(y,"id","list-share-project-permission"),w(g,"alignment","right"),w(g,"id","dropdown-share-project-permission-email"),w(g,"class","drop-down svelte-zvdjon"),x(m,"class","drop-down-parent svelte-zvdjon"),x(a,"class","move-right svelte-zvdjon"),x(l,"class","custom-search flexbox svelte-zvdjon"),w(I,"class","message svelte-zvdjon"),w(I,"id","textarea-description"),w(I,"name","description"),w(I,"placeholder",N=t[13]("share_project.add_a_message")),w(I,"value",E=t[10].description),w(I,"rows","5"),w(I,"maxlength","500"),x(U,"class","share-button-email"),x(W,"class","user-logo svelte-zvdjon"),x(G,"class","email-center svelte-zvdjon"),x(G,"id","span-project-owner-name"),x(G,"data-testid","project-owner-id"),x(me,"class","user-email svelte-zvdjon"),x(me,"id","span-project-owner-text"),x(ne,"class","mt-14 display-flex svelte-zvdjon"),x(ne,"data-testid","project-owner-label"),x(V,"class","dialog-content-width svelte-zvdjon"),x(Ie,"class","share-country-list-button svelte-zvdjon"),x(fe,"class","share-with-info svelte-zvdjon"),x(i,"class","form-share-bom add-users-form svelte-zvdjon")},m($e,mt){J($e,n,mt),J($e,e,mt),J($e,i,mt),v(i,r),v(i,s),v(i,l),v(l,a),v(a,c),v(c,u),Me(d,u,null),v(a,p),v(a,m),v(m,g),v(g,h),v(g,b),v(g,y),v(y,k),v(y,R),v(y,O),v(i,q),Pe&&Pe.m(i,null),v(i,z),Ve&&Ve.m(i,null),v(i,D),ot&&ot.m(i,null),v(i,L);for(let lt=0;ltf=!1)),d.$set(lt),(!Re||mt[0]&8200&&_!==(_=$e[3]?$e[13]("share_project.can_edit"):$e[13]("share_project.can_view")))&&w(h,"text",_),(!Re||mt[0]&8192&&T!==(T=$e[13]("share_project.can_view")))&&w(k,"text",T),(!Re||mt[0]&8192&&j!==(j=$e[13]("share_project.can_edit")))&&w(O,"text",j),mt[0]&65&&(M=$e[0].toLowerCase()===(((Ke=(Bt=$e[6])==null?void 0:Bt.profile)==null?void 0:Ke.email)||Te).toLowerCase()),M?Pe?Pe.p($e,mt):(Pe=Uy($e),Pe.c(),Pe.m(i,z)):Pe&&(Pe.d(1),Pe=null),$e[2]?Ve?Ve.p($e,mt):(Ve=zy($e),Ve.c(),Ve.m(i,D)):Ve&&(Ve.d(1),Ve=null),mt[0]&4097&&(P=$e[12]&&$e[12].length>0&&!Si($e[0])),P?ot?ot.p($e,mt):(ot=Fy($e),ot.c(),ot.m(i,L)):ot&&(ot.d(1),ot=null),mt[0]&65538){gt=Dt($e[1]);let St;for(St=0;St{Ye=null}),Qe())},i($e){Re||(Q(d.$$.fragment,$e),Q(H.$$.fragment,$e),Q(Ye),Re=!0)},o($e){se(d.$$.fragment,$e),se(H.$$.fragment,$e),se(Ye),Re=!1},d($e){$e&&(K(n),K(e),K(i)),qe(d),Pe&&Pe.d(),Ve&&Ve.d(),ot&&ot.d(),Ln(He,$e),qe(H),Be&&Be.d(),Ye&&Ye.d(),Ee=!1,An(ke)}}}function iB(t,n,e){let i,r,o,s,l,a;ye(t,Vt,ee=>e(13,i=ee)),ye(t,Ho,ee=>e(41,r=ee)),ye(t,an,ee=>e(14,o=ee)),ye(t,ti,ee=>e(42,s=ee)),ye(t,wr,ee=>e(43,l=ee)),ye(t,Lr,ee=>e(15,a=ee));let{currentEmail:c=Te}=n,{allEmails:u=[]}=n,{isEmailDuplicate:d=!1}=n,{canEdit:f=!1}=n,{projDetails:p={id:"",name:""}}=n,{previewLinkShare:m}=n,{user:g}=n,h=!1,_=!1,b,y,k=[],T,R=[],O={email:"",description:""},j=Te,q=Te;function M(ee){e(2,d=!1),(u==null?void 0:u.length)===1&&(e(11,j=Te),e(0,c=Te)),e(1,u=u.filter($=>($==null?void 0:$.toLowerCase())!==(ee==null?void 0:ee.toLowerCase()))),e(11,j=Te)}function z(){u==null||u.forEach(ee=>{R==null||R.push({data:{username:"user"},emailId:ee,language:We==null?void 0:We.language,country:We==null?void 0:We.country})})}function D(ee,$,he){const me={notifications:[{[iu]:JSON.stringify(R)}]};return $===Um?(me.notifications[0][ca]=Um,me.notifications[0][la]=JSON.stringify({[Ef]:tn(ee==null?void 0:ee.name),[Xd]:O!=null&&O.description?O.description:Te,[nu]:ee==null?void 0:ee.owner,[Cy]:he,[Sy]:tn(ee==null?void 0:ee.description),[Bm]:ee==null?void 0:ee.company,[Zd]:T,[Jd]:k,[Vd]:[{[Yd]:String(y),[Kd]:`${tn(ee==null?void 0:ee.name)}-(BOM)-${oc(new Date,Zf)}.xlsx`}]})):$===zm?(me.notifications[0][ca]=zm,me.notifications[0][la]=JSON.stringify({[Ef]:tn(ee==null?void 0:ee.name),[nu]:ee==null?void 0:ee.owner,[Cy]:he})):$===Cf&&(me.notifications[0][ca]=Cf,me.notifications[0][la]=JSON.stringify({[Ef]:tn(ee==null?void 0:ee.name)})),me}async function P(){e(12,q=Te),ve.info("allemails",u),e(7,h=!0),c&&(c==null?void 0:c.length)>0&&Si(c)&&Si(j)&&(u!=null&&u.includes(c)||u.push(c.trim().toLowerCase()),e(11,j=Te),e(0,c=Te));const ee={linkId:m,emails:u,canEdit:f,canView:!f},$=i("share_project.project_shared_successfully");R=[];const he=a;P2(ee,$,s).catch(te=>{e(7,h=!1),ve.error(te.message)}).then(async()=>{if(e(7,h=!1),he==null||he.forEach(function(te){e(1,u=u==null?void 0:u.filter(function(oe){var ce,ge,fe;if(((ce=oe==null?void 0:oe.toLowerCase())==null?void 0:ce.trim())!==((fe=(ge=te==null?void 0:te.email)==null?void 0:ge.toLowerCase())==null?void 0:fe.trim()))return!0;if((te==null?void 0:te.canEdit)!==f){e(1,u=[oe]),z();const ae=D(o,zm,String(f?r==null?void 0:r.canEditLink:r==null?void 0:r.canViewLink)),ie=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:ae,module:fo.ADD_USER}});document.dispatchEvent(ie),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,_e=>{ve.info("email response",_e.detail.emailResp)})}return R=[],e(10,O.description="",O),e(1,u=[]),!1}))}),u.length){T=$d(),await If(o==null?void 0:o.bom,s,o).then(ce=>y=ce),k=ep(o),z();const te=D(o,Um,String(f?r==null?void 0:r.canEditLink:r==null?void 0:r.canViewLink)),oe=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:te,module:fo.ADD_USER}});document.dispatchEvent(oe),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,ce=>{ve.info("email response",ce.detail.emailResp)}),R=[],e(1,u=[]),e(10,O.description=Te,O),e(11,j=Te),e(0,c=Te)}}).finally(()=>{e(7,h=!1),e(1,u=[]),e(10,O.description=Te,O),e(11,j=Te),e(0,c=Te),ve.info("Users status: ",ee)});const me=ss(D0,B0,String(l.platform),String(o==null?void 0:o.id));dr(me)}function L(ee,$){e(7,h=!0),e(9,b=$.toLowerCase());let he={linkId:m,email:$==null?void 0:$.toLowerCase()};ee===Il.CAN_VIEW?(he.canEdit=!1,he.canView=!0):ee===Il.CAN_EDIT?(he.canEdit=!0,he.canView=!1):he.isDelete=!0;const me=i("share_project.permission_updated_seccessfully");jg(he,me,s).catch(te=>{e(7,h=!1),ve.error(te.message)}).then(()=>{e(7,h=!1),e(1,u=[b]),z();const te=D(o,zm,String(f?r==null?void 0:r.canEditLink:r==null?void 0:r.canViewLink)),oe=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:te,module:fo.ADD_USER}});document.dispatchEvent(oe),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,ce=>{ve.info("email response",ce.detail.emailResp)}),R=[],e(1,u=[])}).finally(()=>{e(7,h=!1),ve.info("Users status: ",he)})}function C(ee){e(8,_=!0),e(9,b=ee==null?void 0:ee.toLowerCase()),R=[],e(1,u=[b]),z(),e(1,u=[])}function S(){var ee;e(11,j=c),u!=null&&u.includes((ee=j==null?void 0:j.trim())==null?void 0:ee.toLowerCase())&&e(2,d=!0),/@.{2,}/.test(j)&&!Si(j)?e(12,q=i("generic.invalid_email")):e(12,q=Te)}function I(ee){var $;dy(ee)&&Si(c.trim())?(($=ee==null?void 0:ee.detail)==null||$.preventDefault(),e(12,q=Te),N()):e(2,d=!1)}function N(){var ee;e(2,d=!1),u!=null&&u.length&&(u==null?void 0:u.indexOf(c==null?void 0:c.toLowerCase()))!==-1?e(2,d=!0):c.toLowerCase()!==(((ee=g==null?void 0:g.profile)==null?void 0:ee.email)||Te).toLowerCase()&&(e(1,u=[...u,c==null?void 0:c.toLowerCase()]),e(0,c=Te),e(12,q=Te))}function E(){var $;let ee=rl()?ju:Ru;vf(ee,`${String(We.language)}`,Xb[($=We.language)==null?void 0:$.toLowerCase()])}function B(ee){c=ee,e(0,c)}const U=ee=>{I(ee)},H=()=>S(),Z=()=>{e(3,f=!1)},V=()=>{e(3,f=!0)},ne=ee=>{M(ee)},W=ee=>{var $;e(10,O.description=($=ee==null?void 0:ee.target)==null?void 0:$.value,O)},re=()=>{P()},G=ee=>L(Il.CAN_VIEW,String(ee.email)),F=ee=>L(Il.CAN_EDIT,String(ee.email)),X=ee=>C(String(ee.email)),le=()=>E();function ue(ee){_=ee,e(8,_)}return t.$$set=ee=>{"currentEmail"in ee&&e(0,c=ee.currentEmail),"allEmails"in ee&&e(1,u=ee.allEmails),"isEmailDuplicate"in ee&&e(2,d=ee.isEmailDuplicate),"canEdit"in ee&&e(3,f=ee.canEdit),"projDetails"in ee&&e(4,p=ee.projDetails),"previewLinkShare"in ee&&e(5,m=ee.previewLinkShare),"user"in ee&&e(6,g=ee.user)},[c,u,d,f,p,m,g,h,_,b,O,j,q,i,o,a,M,D,P,L,C,S,I,E,B,U,H,Z,V,ne,W,re,G,F,X,le,ue]}class rB extends Ot{constructor(n){super(),At(this,n,iB,nB,It,{currentEmail:0,allEmails:1,isEmailDuplicate:2,canEdit:3,projDetails:4,previewLinkShare:5,user:6},tB,[-1,-1])}}const hne="";function sB(t){Ut(t,"svelte-1jdp5ek","@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.copy-link-lbl.svelte-1jdp5ek{padding:12px;background-color:var(--se-ultra-light-grey-3, #f3f2f2);display:flex;justify-content:space-between}.share-global-icon.svelte-1jdp5ek{position:relative;top:4px}.copy-link-block.svelte-1jdp5ek{display:flex;background-color:var(--se-ultra-light-grey-3, #f3f2f2);padding:10px}.copy-link-input.svelte-1jdp5ek{max-width:550px;color:var(--se-light-grey, #cbcbcb);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid #ccc;padding:8px;background-color:#f9f9f9;font-family:Arial, sans-serif;box-sizing:border-box}.custom-search-button.svelte-1jdp5ek{color:var(--se-medium-blue, #219bfd)}")}function oB(t){let n,e,i=t[2]("share_project.share_project_link")+"",r,o,s,l,a,c,u,d,f=t[2]("share_project.anyone_with_link")+"",p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,I;return L=new Gt({props:{buttonSize:"large",dataTestId:"copy-link-button",id:"button-copy-project-link",importance:"emphasized",buttonText:t[2]("share_project.copy_link")}}),L.$on("btnClick",t[4]),{c(){n=A("div"),e=A("h4"),r=de(i),o=Y(),s=A("div"),l=A("div"),a=A("div"),c=A("span"),c.innerHTML='earth_pacific',u=Y(),d=A("span"),p=de(f),m=Y(),g=A("span"),h=A("se-dropdown"),_=A("qds-button"),y=Y(),k=A("ul"),T=A("qds-list-item"),O=Y(),j=A("qds-list-item"),M=Y(),z=A("div"),D=A("p"),P=Y(),De(L.$$.fragment),x(c,"class","share-global-icon svelte-1jdp5ek"),x(d,"class","copy-label-text"),x(d,"id","span-copy-label-text"),w(_,"action","dropdown"),w(_,"class","custom-search-button svelte-1jdp5ek"),w(_,"size","large"),w(_,"id","button-permission-button-share-project"),w(_,"data-testid","permission-button-share-project"),w(_,"slot","trigger"),w(_,"text",b=t[1]?t[2]("share_project.can_edit"):t[2]("share_project.can_view")),w(T,"id","item-can-view-project-permission"),w(T,"text",R=t[2]("share_project.can_view")),w(j,"id","item-can-edit-project-permission"),w(j,"text",q=t[2]("share_project.can_edit")),x(k,"id","list-permission-share-project-link"),w(h,"alignment",""),w(h,"id","dropdown-share-project-link"),x(g,"class","pw"),x(l,"class","copy-link-lbl pw svelte-1jdp5ek"),x(D,"class","copy-link-input svelte-1jdp5ek"),x(D,"data-testid","copy-link-input"),x(D,"id","input-copy-project-link"),x(z,"class","copy-link-block svelte-1jdp5ek"),x(n,"class","share-link-block")},m(N,E){J(N,n,E),v(n,e),v(e,r),v(n,o),v(n,s),v(s,l),v(l,a),v(a,c),v(a,u),v(a,d),v(d,p),v(l,m),v(l,g),v(g,h),v(h,_),v(h,y),v(h,k),v(k,T),v(k,O),v(k,j),v(s,M),v(s,z),v(z,D),t[9](D),v(z,P),Me(L,z,null),C=!0,S||(I=[xe(T,"click",t[7]),xe(j,"click",t[8]),xe(D,"focus",t[3])],S=!0)},p(N,[E]){(!C||E&4)&&i!==(i=N[2]("share_project.share_project_link")+"")&&be(r,i),(!C||E&4)&&f!==(f=N[2]("share_project.anyone_with_link")+"")&&be(p,f),(!C||E&6&&b!==(b=N[1]?N[2]("share_project.can_edit"):N[2]("share_project.can_view")))&&w(_,"text",b),(!C||E&4&&R!==(R=N[2]("share_project.can_view")))&&w(T,"text",R),(!C||E&4&&q!==(q=N[2]("share_project.can_edit")))&&w(j,"text",q);const B={};E&4&&(B.buttonText=N[2]("share_project.copy_link")),L.$set(B)},i(N){C||(Q(L.$$.fragment,N),C=!0)},o(N){se(L.$$.fragment,N),C=!1},d(N){N&&K(n),t[9](null),qe(L),S=!1,An(I)}}}function aB(t,n,e){let i,r;ye(t,Ho,m=>e(10,i=m)),ye(t,Vt,m=>e(2,r=m));let{previewLink:o}=n,s,l=!1;Un(()=>{u(Kp)});function a(){const m=document.createRange();m.selectNodeContents(s);const g=window.getSelection();g.removeAllRanges(),g.addRange(m)}async function c(){const m=s.textContent;a(),await navigator.clipboard.writeText(m)}function u(m){const g=String(i[m]);s&&e(0,s.textContent=g,s),e(6,o=String(i.id)),e(1,l=m===Xp)}const d=()=>{u(Kp)},f=()=>{u(Xp)};function p(m){_t[m?"unshift":"push"](()=>{s=m,e(0,s)})}return t.$$set=m=>{"previewLink"in m&&e(6,o=m.previewLink)},[s,l,r,a,c,u,o,d,f,p]}class lB extends Ot{constructor(n){super(),At(this,n,aB,oB,It,{previewLink:6},sB)}}const mne="";function cB(t){Ut(t,"svelte-1nlhllm",".pw.align-right.svelte-1nlhllm{margin-left:auto}.pw.pointer.svelte-1nlhllm{cursor:pointer}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-1nlhllm{position:relative;right:8px}.share-bom-content.svelte-1nlhllm{margin-bottom:20px}.loading.svelte-1nlhllm{padding:0px 20px}")}function uB(t){let n,e,i,r,o,s;function l(d){t[11](d)}let a={};t[7]!==void 0&&(a.previewLink=t[7]),n=new lB({props:a}),_t.push(()=>Ct(n,"previewLink",l));function c(d){t[12](d)}let u={user:t[2],projDetails:t[1],currentEmail:t[3],allEmails:t[4],isEmailDuplicate:t[5],canEdit:t[6]};return t[7]!==void 0&&(u.previewLinkShare=t[7]),r=new rB({props:u}),_t.push(()=>Ct(r,"previewLinkShare",c)),r.$on("closePopupEvent",t[13]),{c(){De(n.$$.fragment),i=Y(),De(r.$$.fragment)},m(d,f){Me(n,d,f),J(d,i,f),Me(r,d,f),s=!0},p(d,f){const p={};!e&&f&128&&(e=!0,p.previewLink=d[7],Tt(()=>e=!1)),n.$set(p);const m={};f&4&&(m.user=d[2]),f&2&&(m.projDetails=d[1]),f&8&&(m.currentEmail=d[3]),f&16&&(m.allEmails=d[4]),f&32&&(m.isEmailDuplicate=d[5]),f&64&&(m.canEdit=d[6]),!o&&f&128&&(o=!0,m.previewLinkShare=d[7],Tt(()=>o=!1)),r.$set(m)},i(d){s||(Q(n.$$.fragment,d),Q(r.$$.fragment,d),s=!0)},o(d){se(n.$$.fragment,d),se(r.$$.fragment,d),s=!1},d(d){d&&K(i),qe(n,d),qe(r,d)}}}function fB(t){let n;return{c(){n=A("se-loading"),w(n,"class","share-popup-loader"),w(n,"loading",t[0]),w(n,"overlay","true")},m(e,i){J(e,n,i)},p(e,i){i&1&&w(n,"loading",e[0])},i:et,o:et,d(e){e&&K(n)}}}function dB(t){let n,e,i=t[8]("share_project.share")+"",r,o,s=t[8]("generic.project")+"",l,a,c,u,d,f,p,m,g,h;const _=[fB,uB],b=[];function y(k,T){return k[0]?0:1}return f=y(t),p=b[f]=_[f](t),{c(){n=A("se-dialog-header"),e=A("h3"),r=de(i),o=Y(),l=de(s),a=Y(),c=A("se-icon"),c.textContent="action_close",u=Y(),d=A("se-dialog-content"),p.c(),w(c,"class","cross-icon pw align-right pointer svelte-1nlhllm"),w(c,"color","standard"),w(c,"size","micro"),w(c,"id","ic-close-button-share-project"),w(c,"data-testid","close-button-share-project"),w(n,"color","alternative"),w(n,"id","dialog-header-share-project"),w(d,"id","dialog-content-share-project"),w(d,"class","share-bom-content svelte-1nlhllm"),sr(d,"loading",t[0])},m(k,T){J(k,n,T),v(n,e),v(e,r),v(e,o),v(e,l),v(n,a),v(n,c),J(k,u,T),J(k,d,T),b[f].m(d,null),m=!0,g||(h=xe(c,"click",t[10]),g=!0)},p(k,[T]){(!m||T&256)&&i!==(i=k[8]("share_project.share")+"")&&be(r,i),(!m||T&256)&&s!==(s=k[8]("generic.project")+"")&&be(l,s);let R=f;f=y(k),f===R?b[f].p(k,T):(Je(),se(b[R],1,1,()=>{b[R]=null}),Qe(),p=b[f],p?p.p(k,T):(p=b[f]=_[f](k),p.c()),Q(p,1),p.m(d,null)),(!m||T&1)&&sr(d,"loading",k[0])},i(k){m||(Q(p),m=!0)},o(k){se(p),m=!1},d(k){k&&(K(n),K(u),K(d)),b[f].d(),g=!1,h()}}}function pB(t,n,e){let i;ye(t,Vt,b=>e(8,i=b));const r=Mn();let o=Te,s=[],l=!1,a=!1,{isLoading:c}=n,{projDetails:u}=n,d,{user:f}=n;function p(b){e(3,o=Te),e(4,s=[]),e(5,l=!1),e(6,a=!1),Lr.update(()=>[]);const y={};Ho.update(()=>y),r("closePopupEvent",{action:b})}const m=()=>{p("close")};function g(b){d=b,e(7,d)}function h(b){d=b,e(7,d)}const _=()=>{p("close")};return t.$$set=b=>{"isLoading"in b&&e(0,c=b.isLoading),"projDetails"in b&&e(1,u=b.projDetails),"user"in b&&e(2,f=b.user)},[c,u,f,o,s,l,a,d,i,p,m,g,h,_]}class Vy extends Ot{constructor(n){super(),At(this,n,pB,dB,It,{isLoading:0,projDetails:1,user:2},cB)}}const gne="";function hB(t){Ut(t,"svelte-m432f3",".pw.disabled.svelte-m432f3{pointer-events:none;opacity:0.5}.pw.align-right.svelte-m432f3{margin-left:auto}.pw.align-left.svelte-m432f3{margin-right:auto}.pw.display-flex.svelte-m432f3{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-m432f3{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-m432f3{font-size:16px}.pw.small-font.svelte-m432f3{font-size:14px}.pw.nano-font.svelte-m432f3{font-size:12px}.pw.pointer.svelte-m432f3{cursor:pointer}.pw-snackbar-elem.svelte-m432f3{top:30px}.pw.red-color.svelte-m432f3{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-m432f3{display:none}.pw.width-100.svelte-m432f3{width:100%}.pw.bold-font.svelte-m432f3{font-weight:bold}.pw.normal-font.svelte-m432f3{font-weight:normal;font-size:16px}.pw.error-msg.svelte-m432f3{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-m432f3{text-align:center}.pw.center-align-items.svelte-m432f3{align-items:center}.pw.justify-content-center.svelte-m432f3{justify-content:center}.pw.bom-checkbox.svelte-m432f3{max-width:16px}.pw.ml-8.svelte-m432f3{margin-left:8px}.pw.ml-12.svelte-m432f3{margin-left:12px}.pw.ml-36.svelte-m432f3{margin-left:36px}.pw.mt-8.svelte-m432f3{margin-top:8px}.pw.mt-6.svelte-m432f3{margin-top:6px}.pw.mt-32.svelte-m432f3{margin-top:32px}.pw.mb-8.svelte-m432f3{margin-bottom:8px}.pw.mb-12.svelte-m432f3{margin-bottom:12px}.pw.mb-16.svelte-m432f3{margin-top:16px}.pw.mb-21.svelte-m432f3{margin-bottom:21px}.pw.mr-12.svelte-m432f3{margin-right:12px}.pw.p-12.svelte-m432f3{padding:12px}.pw.pl-16.svelte-m432f3{padding-left:16px}.pw.pr-16.svelte-m432f3{padding-right:16px}.position-absolute.svelte-m432f3{position:absolute}.flex-wrap.svelte-m432f3{flex-wrap:wrap}.justify-content-sp-btw.svelte-m432f3{justify-content:space-between}.gp-10.svelte-m432f3{gap:10px}.gp-5.svelte-m432f3{gap:5px}.desktop-view.svelte-m432f3{display:none}.mobile-view.svelte-m432f3{display:block}.mobile-view-flx.svelte-m432f3{display:flex;flex-direction:column}.rounded-border.svelte-m432f3{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-m432f3{text-align:right}.bg-color-light-grey.svelte-m432f3{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-m432f3{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-m432f3{padding:8px 0 16px 8px}@media(min-width: 968px){.mobile-view.svelte-m432f3,.mobile-view-flx.svelte-m432f3{display:none}.desktop-view.svelte-m432f3{display:inherit}}.cart-mobile-snackbar.svelte-m432f3{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-m432f3,.mobile-view-snackbar.svelte-m432f3{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-m432f3{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-m432f3{display:block}.mobile-snackbar.svelte-m432f3{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-m432f3{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-m432f3{margin:-6px}.bottom-snackbar.svelte-m432f3{bottom:30px;top:auto}.min-width.svelte-m432f3{width:380px;padding:1px;min-height:371px}.font-bold.svelte-m432f3{font-weight:bold}.flex-font-5.svelte-m432f3{display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:16px}.padding-5.svelte-m432f3{padding:4px}.dot-others.svelte-m432f3{height:16px;width:16px;border-radius:50%;display:inline-block;margin-right:6px;background-color:var(--se-sunflower-yellow, #ffd100)}.dot-completed.svelte-m432f3{height:16px;width:16px;border-radius:50%;display:inline-block;margin-right:6px;background-color:var(--se-life-green, #3dcd58)}.dot-cancelled.svelte-m432f3{height:16px;width:16px;border-radius:50%;display:inline-block;margin-right:6px;background-color:var(--se-red, #dc0a0a)}.font-color.svelte-m432f3{color:var(--se-anthracite-grey, #333333);font-size:small}.row-wrap.svelte-m432f3{display:-ms-flexbox;display:-webkit-flex;display:flex;flex-direction:row;flex-wrap:wrap}.mt-10.svelte-m432f3{margin-top:10px}.center-icon.svelte-m432f3{align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);opacity:0.7}.border-dash.svelte-m432f3{border:1px dashed var(--se-sky-blue, #42b4e6) !important}.margin-1p.svelte-m432f3{margin:1px}.background-blue.svelte-m432f3{background-color:var(--se-sky-blue-10p, #ecf7fc)}.project-name.svelte-m432f3{display:flex;align-items:center;font-weight:bolder;font-size:22px;height:60px;white-space:normal;overflow-wrap:break-word;line-height:30px}.project-status.svelte-m432f3{color:var(--se-anthracite-grey, #333333);font-size:12px;line-height:15px}.project-attributes.svelte-m432f3{color:var(--se-anthracite-grey, #333333);font-size:14px;line-height:20px}.project-description.svelte-m432f3{color:var(--se-anthracite-grey, #333333);font-size:14px;line-height:20px;height:120px;white-space:pre-wrap;overflow-y:auto;text-overflow:ellipsis;word-break:break-word}.project-price.svelte-m432f3{font-weight:bolder;font-size:14px;line-height:20px;height:48px;padding-left:17px;align-items:center}.flex-font-5.svelte-m432f3{display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:16px}.flex-center.svelte-m432f3{display:flex;align-items:center;height:300px}.project-card-head.svelte-m432f3,.project-card-content.svelte-m432f3{background-color:var(--se-ultra-light-grey-4, #fafafa)}.project-card-item.svelte-m432f3{position:relative;background:var(--se-ultra-light-grey-4, #fafafa);border-top:3px solid transparent}.project-card-item.svelte-m432f3:hover{border-top:3px solid var(--se-life-green, #3dcd58)}.three-dots-icon.svelte-m432f3{position:absolute;right:22px;bottom:26px}.share-icon.svelte-m432f3:hover{background-color:var(--se-light-grey, #cbcbcb);border-radius:2px}.height-40.svelte-m432f3{max-height:40px}")}function Yy(t,n,e){const i=t.slice();return i[75]=n[e],i[77]=e,i}function mB(t){let n,e,i,r;const o=[bB,_B],s=[];function l(a,c){return a[6].length===0?0:1}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,c){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function gB(t){let n=t[15]("generic.please_wait")+"",e;return{c(){e=de(n)},m(i,r){J(i,e,r)},p(i,r){r[0]&32768&&n!==(n=i[15]("generic.please_wait")+"")&&be(e,n)},i:et,o:et,d(i){i&&K(e)}}}function _B(t){let n,e=t[24]("")===void 0||t[24]("")!==Dn.EAB,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b=e&&vB(t),y=Dt(t[6]),k=[];for(let j=0;jCt(d,"isLoading",T)),d.$on("closePopupEvent",t[54]),m=new GD({props:{dialogType:t[1],dialogId:t[0],wrapper:t[7],archiveStatus:t[8],projectId:t[9],projectName:t[10],open:t[19]}}),m.$on("updateProjectEvent",t[33]),m.$on("closePopupEvent",t[34]);let O=t[14]&&r3(t);return{c(){n=A("se-container"),b&&b.c(),i=Y();for(let j=0;jf=!1)),d.$set(z);const D={};q[0]&2&&(D.dialogType=j[1]),q[0]&1&&(D.dialogId=j[0]),q[0]&128&&(D.wrapper=j[7]),q[0]&256&&(D.archiveStatus=j[8]),q[0]&512&&(D.projectId=j[9]),q[0]&1024&&(D.projectName=j[10]),q[0]&524288&&(D.open=j[19]),m.$set(D),j[14]?O?O.p(j,q):(O=r3(j),O.c(),O.m(h.parentNode,h)):O&&(O.d(1),O=null)},i(j){_||(Q(l.$$.fragment,j),Q(d.$$.fragment,j),Q(m.$$.fragment,j),_=!0)},o(j){se(l.$$.fragment,j),se(d.$$.fragment,j),se(m.$$.fragment,j),_=!1},d(j){j&&(K(n),K(g),K(h)),b&&b.d(),Ln(k,j),qe(l),t[52](null),qe(d),t[55](null),qe(m),O&&O.d(j)}}}function bB(t){let n;function e(o,s){return o[3]===Rs&&o[4]===Rs?AB:o[4]===cr?IB:EB}let i=e(t),r=i(t);return{c(){r.c(),n=wt()},m(o,s){r.m(o,s),J(o,n,s)},p(o,s){i===(i=e(o))&&r?r.p(o,s):(r.d(1),r=i(o),r&&(r.c(),r.m(n.parentNode,n)))},i:et,o:et,d(o){o&&K(n),r.d(o)}}}function vB(t){let n,e=t[3]===Rs&&t[4]===Rs&&Zy(t);return{c(){e&&e.c(),n=wt()},m(i,r){e&&e.m(i,r),J(i,n,r)},p(i,r){i[3]===Rs&&i[4]===Rs?e?e.p(i,r):(e=Zy(i),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(i){i&&K(n),e&&e.d(i)}}}function Zy(t){let n,e=(t[18][Cr]===Ae.SHOW||t[18][Cr]===Ae.DISABLED)&&Xy(t);return{c(){e&&e.c(),n=wt()},m(i,r){e&&e.m(i,r),J(i,n,r)},p(i,r){i[18][Cr]===Ae.SHOW||i[18][Cr]===Ae.DISABLED?e?e.p(i,r):(e=Xy(i),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(i){i&&K(n),e&&e.d(i)}}}function Xy(t){let n,e,i,r,o;return{c(){n=A("se-block"),e=A("se-block-header"),e.innerHTML='
electricity_polarity_positive_plus
',w(e,"class","background-blue border-dash margin-1p svelte-m432f3"),w(n,"outline","false"),w(n,"color","standard"),w(n,"option","card"),w(n,"class",i="min-width pw pointer "+(t[18][Cr]===Ae.DISABLED?"disabled":"")+" svelte-m432f3")},m(s,l){J(s,n,l),v(n,e),r||(o=xe(n,"click",t[42]),r=!0)},p(s,l){l[0]&262144&&i!==(i="min-width pw pointer "+(s[18][Cr]===Ae.DISABLED?"disabled":"")+" svelte-m432f3")&&w(n,"class",i)},d(s){s&&K(n),r=!1,o()}}}function wB(t){let n,e=t[3]!==cr&&t[4]===Rs&&Ky(t);return{c(){e&&e.c(),n=wt()},m(i,r){e&&e.m(i,r),J(i,n,r)},p(i,r){i[3]!==cr&&i[4]===Rs?e?e.p(i,r):(e=Ky(i),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(i){i&&K(n),e&&e.d(i)}}}function Ky(t){let n,e,i,r,o;function s(){return t[43](t[75])}return{c(){n=A("se-icon"),e=de("action_share"),w(n,"id","ic-proj-list-share-"+t[77]),w(n,"class",i="primary pw align-right pw pointer share-icon "+(t[18][eo]===Ae.DISABLED?"pw disabled":"")+" svelte-m432f3"),w(n,"size","small")},m(l,a){J(l,n,a),v(n,e),r||(o=xe(n,"click",vc(s)),r=!0)},p(l,a){t=l,a[0]&262144&&i!==(i="primary pw align-right pw pointer share-icon "+(t[18][eo]===Ae.DISABLED?"pw disabled":"")+" svelte-m432f3")&&w(n,"class",i)},d(l){l&&K(n),r=!1,o()}}}function yB(t){let n,e,i=t[15]("bom_manager.project_source")+"",r,o,s=Dn.EAB+"",l;return{c(){n=A("div"),e=A("p"),r=de(i),o=de(" : "),l=de(s),x(e,"id","description-"+t[77]),x(n,"class","mt-10 svelte-m432f3")},m(a,c){J(a,n,c),v(n,e),v(e,r),v(e,o),v(e,l)},p(a,c){c[0]&32768&&i!==(i=a[15]("bom_manager.project_source")+"")&&be(r,i)},d(a){a&&K(n)}}}function Jy(t){var r,o,s,l,a,c,u,d,f;let n,e=((r=t[75])!=null&&r.price&&Number((o=t[75])==null?void 0:o.price)>0?fr((l=(s=t[75])==null?void 0:s.ownerInfo)!=null&&l.language&&((a=t[75])!=null&&a.user)?String(t[75].ownerInfo.language):We.language,(u=(c=t[75])==null?void 0:c.ownerInfo)!=null&&u.country&&((d=t[75])!=null&&d.user)?String(t[75].ownerInfo.country):We.country,String((f=t[75])==null?void 0:f.price)):Te)+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","project-price display-flex svelte-m432f3"),x(n,"id","price-"+t[77])},m(p,m){J(p,n,m),v(n,i)},p(p,m){var g,h,_,b,y,k,T,R,O;m[0]&64&&e!==(e=((g=p[75])!=null&&g.price&&Number((h=p[75])==null?void 0:h.price)>0?fr((b=(_=p[75])==null?void 0:_.ownerInfo)!=null&&b.language&&((y=p[75])!=null&&y.user)?String(p[75].ownerInfo.language):We.language,(T=(k=p[75])==null?void 0:k.ownerInfo)!=null&&T.country&&((R=p[75])!=null&&R.user)?String(p[75].ownerInfo.country):We.country,String((O=p[75])==null?void 0:O.price)):Te)+"")&&be(i,e)},d(p){p&&K(n)}}}function kB(t){let n,e,i,r,o,s,l,a,c,u=t[3]!==cr&&t[18][Fh]===Ae.SHOW&&Qy(t),d=t[3]===cr&&$y(t),f=t[18][Uh]===Ae.SHOW&&e3(t),p=t[3]!==cr&&t[18][ms]===Ae.SHOW&&t3(t),m=t[75].owner&&t[75].owner!==Te&&n3(t);return{c(){n=A("se-dropdown"),e=A("se-icon"),e.textContent="other_vertical",i=Y(),r=A("ul"),u&&u.c(),o=Y(),d&&d.c(),s=Y(),f&&f.c(),l=Y(),p&&p.c(),a=Y(),m&&m.c(),w(e,"slot","trigger"),w(e,"id","ic-three-dot-"+t[77]),w(e,"option","button"),w(n,"alignment","left"),w(n,"class",c="three-dots-icon "+(t[18][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-m432f3")},m(g,h){J(g,n,h),v(n,e),v(n,i),v(n,r),u&&u.m(r,null),v(r,o),d&&d.m(r,null),v(r,s),f&&f.m(r,null),v(r,l),p&&p.m(r,null),v(r,a),m&&m.m(r,null)},p(g,h){g[3]!==cr&&g[18][Fh]===Ae.SHOW?u?u.p(g,h):(u=Qy(g),u.c(),u.m(r,o)):u&&(u.d(1),u=null),g[3]===cr?d?d.p(g,h):(d=$y(g),d.c(),d.m(r,s)):d&&(d.d(1),d=null),g[18][Uh]===Ae.SHOW?f?f.p(g,h):(f=e3(g),f.c(),f.m(r,l)):f&&(f.d(1),f=null),g[3]!==cr&&g[18][ms]===Ae.SHOW?p?p.p(g,h):(p=t3(g),p.c(),p.m(r,a)):p&&(p.d(1),p=null),g[75].owner&&g[75].owner!==Te?m?m.p(g,h):(m=n3(g),m.c(),m.m(r,null)):m&&(m.d(1),m=null),h[0]&262144&&c!==(c="three-dots-icon "+(g[18][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-m432f3")&&w(n,"class",c)},d(g){g&&K(n),u&&u.d(),d&&d.d(),f&&f.d(),p&&p.d(),m&&m.d()}}}function SB(t){let n=t[24]("")===void 0||t[24]("")!==Dn.EAB,e,i=n&&CB(t);return{c(){i&&i.c(),e=wt()},m(r,o){i&&i.m(r,o),J(r,e,o)},p(r,o){n&&i.p(r,o)},d(r){r&&K(e),i&&i.d(r)}}}function Qy(t){let n,e,i,r;function o(){return t[46](t[75])}return{c(){n=A("qds-list-item"),w(n,"id","lst-archive-"+t[77]),w(n,"text",e=t[15]("project_listing.archive_project"))},m(s,l){J(s,n,l),i||(r=xe(n,"click",o),i=!0)},p(s,l){t=s,l[0]&32768&&e!==(e=t[15]("project_listing.archive_project"))&&w(n,"text",e)},d(s){s&&K(n),i=!1,r()}}}function $y(t){let n,e,i,r;function o(){return t[47](t[75])}return{c(){n=A("qds-list-item"),w(n,"id","lst-unarchive-"+t[77]),w(n,"text",e=t[15]("project_listing.unarchive_project"))},m(s,l){J(s,n,l),i||(r=xe(n,"click",o),i=!0)},p(s,l){t=s,l[0]&32768&&e!==(e=t[15]("project_listing.unarchive_project"))&&w(n,"text",e)},d(s){s&&K(n),i=!1,r()}}}function e3(t){let n,e,i,r;function o(){return t[48](t[75])}return{c(){n=A("qds-list-item"),w(n,"id","lst-clone-"+t[77]),w(n,"text",e=t[15]("project_listing.clone_project"))},m(s,l){J(s,n,l),i||(r=xe(n,"click",o),i=!0)},p(s,l){t=s,l[0]&32768&&e!==(e=t[15]("project_listing.clone_project"))&&w(n,"text",e)},d(s){s&&K(n),i=!1,r()}}}function t3(t){let n=t[24]("")===void 0||t[24]("")!==Dn.EAB,e,i=n&&TB(t);return{c(){i&&i.c(),e=wt()},m(r,o){i&&i.m(r,o),J(r,e,o)},p(r,o){n&&i.p(r,o)},d(r){r&&K(e),i&&i.d(r)}}}function TB(t){let n,e,i,r;function o(){return t[49](t[75])}return{c(){n=A("qds-list-item"),w(n,"id","lst-edit-proj-list-"+t[77]),w(n,"text",e=t[15]("edit_project.edit_project"))},m(s,l){J(s,n,l),i||(r=xe(n,"click",o),i=!0)},p(s,l){t=s,l[0]&32768&&e!==(e=t[15]("edit_project.edit_project"))&&w(n,"text",e)},d(s){s&&K(n),i=!1,r()}}}function n3(t){let n,e,i,r;function o(){return t[50](t[75])}return{c(){n=A("qds-list-item"),w(n,"id","lst-delete-proj-list-"+t[77]),w(n,"text",e=t[15]("delete_project.delete_project"))},m(s,l){J(s,n,l),i||(r=xe(n,"click",o),i=!0)},p(s,l){t=s,l[0]&32768&&e!==(e=t[15]("delete_project.delete_project"))&&w(n,"text",e)},d(s){s&&K(n),i=!1,r()}}}function CB(t){let n,e,i,r,o,s,l,a,c;function u(){return t[45](t[75])}return{c(){n=A("se-dropdown"),e=A("se-icon"),e.textContent="other_vertical",i=Y(),r=A("ul"),o=A("qds-list-item"),w(e,"slot","trigger"),w(e,"id","ic-three-dot-"+t[77]),w(e,"option","button"),w(o,"id","lst-edit-proj-share-"+t[77]),w(o,"text",s=t[15]("edit_project.edit_project")),w(n,"alignment","left"),w(n,"class",l="three-dots-icon "+(t[18][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-m432f3")},m(d,f){J(d,n,f),v(n,e),v(n,i),v(n,r),v(r,o),a||(c=xe(o,"click",u),a=!0)},p(d,f){t=d,f[0]&32768&&s!==(s=t[15]("edit_project.edit_project"))&&w(o,"text",s),f[0]&262144&&l!==(l="three-dots-icon "+(t[18][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-m432f3")&&w(n,"class",l)},d(d){d&&K(n),a=!1,c()}}}function i3(t){let n,e,i,r,o,s=tn(String(t[75].name))+"",l,a,c,u=t[24]("")===void 0||t[24]("")!==Dn.EAB,d,f,p,m=t[15]("edit_project.last_modified")+"",g,h,_=(t[75].modifiedDate?qi(Number(t[75].modifiedDate)):qi(Number(t[75].createdDate)))+"",b,y,k,T,R,O,j,q=(t[75].status?t[15](`generic.${String(t[75].status).toLowerCase().split(" ").join("_")}`):"")+"",M,z,D=t[24]("")!==void 0&&t[24]("")===Dn.EAB,P,L,C,S=(t[75].description?tn(String(t[75].description)):Te)+"",I,N,E,B,U=t[15]("generic.date")+"",H,Z,V=(t[75].createdDate?qi(Number(t[75].createdDate)):Te)+"",ne,W,re,G=t[15]("edit_project.end_user_company")+"",F,X,le=(t[75].company?t[75].company:t[15]("bom_manager.not_available_txt"))+"",ue,ee,$,he=t[15]("edit_project.project_owner")+"",me,te,oe=(t[75].owner?t[75].owner:t[15]("bom_manager.not_available_txt"))+"",ce,ge,fe=wf(t[75]),ae,ie,_e,Ie=u&&wB(t),we=D&&yB(t),pe=fe&&Jy(t);function Se(){return t[44](t[75])}function Le(ke,Ce){var Ne,Pe;if(((Pe=(Ne=ke[75])==null?void 0:Ne.user)==null?void 0:Pe.canEdit)===!0&&ke[4]===cr&&ke[18][ms]===Ae.SHOW)return SB;if(ke[4]===Rs)return kB}let Re=Le(t),Ee=Re&&Re(t);return{c(){n=A("se-block"),e=A("div"),i=A("se-block-header"),r=A("p"),o=A("span"),l=de(s),c=Y(),Ie&&Ie.c(),d=Y(),f=A("se-block-content"),p=A("p"),g=de(m),h=de(":??"),b=de(_),y=Y(),k=A("div"),T=A("span"),O=Y(),j=A("p"),M=de(q),z=Y(),we&&we.c(),P=Y(),L=A("div"),C=A("p"),I=de(S),N=Y(),E=A("div"),B=A("p"),H=de(U),Z=de(":??"),ne=de(V),W=Y(),re=A("p"),F=de(G),X=de(":??"),ue=de(le),ee=Y(),$=A("p"),me=de(he),te=de(":??"),ce=de(oe),ge=Y(),pe&&pe.c(),ae=Y(),Ee&&Ee.c(),x(r,"title",a=tn(String(t[75].name))),x(r,"class","project-name pw pointer svelte-m432f3"),x(r,"id","project-name-"+t[77]),w(i,"id","projectHeader-"+t[77]),w(i,"class","project-card-head svelte-m432f3"),x(p,"class","project-attributes flex-font-5 svelte-m432f3"),x(p,"id","last-modified-"+t[77]),x(T,"class",R=Nt(vm(String(t[75].status)))+" svelte-m432f3"),x(j,"class","project-status svelte-m432f3"),x(j,"id","status-"+t[77]),x(k,"class","flex-font-5 mt-10 svelte-m432f3"),x(C,"class","project-description svelte-m432f3"),x(C,"id","description-"+t[77]),x(L,"class","mt-10 svelte-m432f3"),x(B,"class","project-attributes svelte-m432f3"),x(B,"id","created-date-"+t[77]),x(re,"class","project-attributes height-40 svelte-m432f3"),x(re,"id","company-"+t[77]),x($,"class","project-attributes svelte-m432f3"),x($,"id","owner-"+t[77]),x(E,"class","mt-10 svelte-m432f3"),w(f,"class","project-card-content svelte-m432f3"),x(e,"class","project-card-item cursor-pointer svelte-m432f3"),x(e,"id","block-inner-project-tile-"+t[77]),w(n,"option","card"),w(n,"outline","true"),w(n,"class","min-width svelte-m432f3"),w(n,"id","block-project-tile-"+t[77])},m(ke,Ce){J(ke,n,Ce),v(n,e),v(e,i),v(i,r),v(r,o),v(o,l),v(i,c),Ie&&Ie.m(i,null),v(e,d),v(e,f),v(f,p),v(p,g),v(p,h),v(p,b),v(f,y),v(f,k),v(k,T),v(k,O),v(k,j),v(j,M),v(f,z),we&&we.m(f,null),v(f,P),v(f,L),v(L,C),v(C,I),v(f,N),v(f,E),v(E,B),v(B,H),v(B,Z),v(B,ne),v(E,W),v(E,re),v(re,F),v(re,X),v(re,ue),v(E,ee),v(E,$),v($,me),v($,te),v($,ce),v(e,ge),pe&&pe.m(e,null),v(n,ae),Ee&&Ee.m(n,null),ie||(_e=xe(e,"click",Se),ie=!0)},p(ke,Ce){t=ke,Ce[0]&64&&s!==(s=tn(String(t[75].name))+"")&&be(l,s),Ce[0]&64&&a!==(a=tn(String(t[75].name)))&&x(r,"title",a),u&&Ie.p(t,Ce),Ce[0]&32768&&m!==(m=t[15]("edit_project.last_modified")+"")&&be(g,m),Ce[0]&64&&_!==(_=(t[75].modifiedDate?qi(Number(t[75].modifiedDate)):qi(Number(t[75].createdDate)))+"")&&be(b,_),Ce[0]&64&&R!==(R=Nt(vm(String(t[75].status)))+" svelte-m432f3")&&x(T,"class",R),Ce[0]&32832&&q!==(q=(t[75].status?t[15](`generic.${String(t[75].status).toLowerCase().split(" ").join("_")}`):"")+"")&&be(M,q),D&&we.p(t,Ce),Ce[0]&64&&S!==(S=(t[75].description?tn(String(t[75].description)):Te)+"")&&be(I,S),Ce[0]&32768&&U!==(U=t[15]("generic.date")+"")&&be(H,U),Ce[0]&64&&V!==(V=(t[75].createdDate?qi(Number(t[75].createdDate)):Te)+"")&&be(ne,V),Ce[0]&32768&&G!==(G=t[15]("edit_project.end_user_company")+"")&&be(F,G),Ce[0]&32832&&le!==(le=(t[75].company?t[75].company:t[15]("bom_manager.not_available_txt"))+"")&&be(ue,le),Ce[0]&32768&&he!==(he=t[15]("edit_project.project_owner")+"")&&be(me,he),Ce[0]&32832&&oe!==(oe=(t[75].owner?t[75].owner:t[15]("bom_manager.not_available_txt"))+"")&&be(ce,oe),Ce[0]&64&&(fe=wf(t[75])),fe?pe?pe.p(t,Ce):(pe=Jy(t),pe.c(),pe.m(e,null)):pe&&(pe.d(1),pe=null),Re===(Re=Le(t))&&Ee?Ee.p(t,Ce):(Ee&&Ee.d(1),Ee=Re&&Re(t),Ee&&(Ee.c(),Ee.m(n,null)))},d(ke){ke&&K(n),Ie&&Ie.d(),we&&we.d(),pe&&pe.d(),Ee&&Ee.d(),ie=!1,_e()}}}function r3(t){let n,e=t[15]("generic.please_wait")+"",i;return{c(){n=A("span"),i=de(e)},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&32768&&e!==(e=r[15]("generic.please_wait")+"")&&be(i,e)},d(r){r&&K(n)}}}function EB(t){let n,e,i,r=t[15]("project_listing.you_have_not_archived_any_list")+"",o;return{c(){n=A("se-container"),e=A("center"),i=A("p"),o=de(r),w(n,"class","flex-center svelte-m432f3"),w(n,"direction","column")},m(s,l){J(s,n,l),v(n,e),v(e,i),v(i,o)},p(s,l){l[0]&32768&&r!==(r=s[15]("project_listing.you_have_not_archived_any_list")+"")&&be(o,r)},d(s){s&&K(n)}}}function IB(t){let n,e,i,r=t[15]("share_project.you_do_not_have_any_project_to_shared")+"",o;return{c(){n=A("se-container"),e=A("center"),i=A("p"),o=de(r),w(n,"class","flex-center svelte-m432f3"),w(n,"direction","column")},m(s,l){J(s,n,l),v(n,e),v(e,i),v(i,o)},p(s,l){l[0]&32768&&r!==(r=s[15]("share_project.you_do_not_have_any_project_to_shared")+"")&&be(o,r)},d(s){s&&K(n)}}}function AB(t){let n=t[24]("")===void 0||t[24]("")!==Dn.EAB,e,i=n&&OB(t);return{c(){i&&i.c(),e=wt()},m(r,o){i&&i.m(r,o),J(r,e,o)},p(r,o){n&&i.p(r,o)},d(r){r&&K(e),i&&i.d(r)}}}function OB(t){let n,e=(t[18][Cr]===Ae.SHOW||t[18][Cr]===Ae.DISABLED)&&s3(t);return{c(){e&&e.c(),n=wt()},m(i,r){e&&e.m(i,r),J(i,n,r)},p(i,r){i[18][Cr]===Ae.SHOW||i[18][Cr]===Ae.DISABLED?e?e.p(i,r):(e=s3(i),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(i){i&&K(n),e&&e.d(i)}}}function s3(t){let n,e,i,r,o,s=t[15]("project_listing.start_first_project_message")+"",l,a,c,u;return{c(){n=A("se-container"),e=A("center"),i=A("div"),i.innerHTML='electricity_polarity_positive_plus',r=Y(),o=A("p"),l=de(s),x(i,"class","border-dash min-width background-blue pw pointer margin-1p svelte-m432f3"),x(o,"class","font-bold svelte-m432f3"),w(n,"class",a="pw "+(t[18][Cr]===Ae.DISABLED?"disabled":"")+" svelte-m432f3"),w(n,"direction","column")},m(d,f){J(d,n,f),v(n,e),v(e,i),v(e,r),v(e,o),v(o,l),c||(u=xe(i,"click",t[41]),c=!0)},p(d,f){f[0]&32768&&s!==(s=d[15]("project_listing.start_first_project_message")+"")&&be(l,s),f[0]&262144&&a!==(a="pw "+(d[18][Cr]===Ae.DISABLED?"disabled":"")+" svelte-m432f3")&&w(n,"class",a)},d(d){d&&K(n),c=!1,u()}}}function PB(t){let n,e,i,r,o;const s=[gB,mB],l=[];function a(c,u){return c[17]?0:c[6]?1:-1}return~(n=a(t))&&(e=l[n]=s[n](t)),{c(){e&&e.c(),i=Y(),r=A("se-snackbar"),w(r,"open",t[20]),w(r,"message",t[21]),w(r,"type",t[22]),w(r,"class","pw-snackbar-elem svelte-m432f3"),w(r,"icon","notification_ok_wired"),w(r,"duration",Cs),w(r,"id","snackbar-project-listing")},m(c,u){~n&&l[n].m(c,u),J(c,i,u),J(c,r,u),o=!0},p(c,u){let d=n;n=a(c),n===d?~n&&l[n].p(c,u):(e&&(Je(),se(l[d],1,1,()=>{l[d]=null}),Qe()),~n?(e=l[n],e?e.p(c,u):(e=l[n]=s[n](c),e.c()),Q(e,1),e.m(i.parentNode,i)):e=null),(!o||u[0]&1048576)&&w(r,"open",c[20]),(!o||u[0]&2097152)&&w(r,"message",c[21]),(!o||u[0]&4194304)&&w(r,"type",c[22])},i(c){o||(Q(e),o=!0)},o(c){se(e),o=!1},d(c){c&&(K(i),K(r)),~n&&l[n].d(c)}}}function NB(t){t.open=!1}function LB(t,n,e){let i,r,o,s,l,a,c,u,d,f,p,m,g,h;ye(t,Vt,Ue=>e(15,i=Ue)),ye(t,wa,Ue=>e(57,r=Ue)),ye(t,wr,Ue=>e(58,o=Ue)),ye(t,ti,Ue=>e(59,s=Ue)),ye(t,an,Ue=>e(16,l=Ue)),ye(t,Lr,Ue=>e(60,a=Ue)),ye(t,P1,Ue=>e(61,c=Ue)),ye(t,Xi,Ue=>e(6,u=Ue)),ye(t,Jt,Ue=>e(17,d=Ue)),ye(t,Ii,Ue=>e(18,f=Ue)),ye(t,Yr,Ue=>e(19,p=Ue)),ye(t,ws,Ue=>e(20,m=Ue)),ye(t,Go,Ue=>e(21,g=Ue)),ye(t,xo,Ue=>e(22,h=Ue));const _=Ub;let{dialogId:b=Gp}=n,{dialogType:y="unarchive "}=n,{isArchive:k=cr}=n,{isShared:T}=n,{projectListOptions:R=Yf}=n,O,j,q,M,z,D,P,{singleProject:L}=n,C=!1,S=[],{user:I}=n,{businessunit:N}=n,{platform:E}=n;const B=Mn();let U=!1;const H={threshold:R.projectLoadThreshold},Z=new IntersectionObserver((Ue,rt)=>{var ze;(ze=Ue[0])!=null&&ze.isIntersecting&&(u==null?void 0:u.length)%(R==null?void 0:R.projectListSize)===0&&(rt.unobserve(Ue[0].target),e(14,U=!0),io(k,T,R.projectListSize,c,!1,!0,V(E)).catch(tt=>{ve.error(tt.message)}).finally(()=>{e(14,U=!1)}))},H);function V(Ue){if(Ue=new URLSearchParams(window.location.search).get(ds),!(Ue===yu||Ue===Dn.SE))return Ue}Un(async()=>{await gl(),Rr(!1),T===cr?io(k,T):io(k,T,R.projectListSize,c==null?void 0:c.id,!0,!0,V(E)).catch(Ue=>{ve.error(Ue.message)})}),Kn(()=>{Rr(!1),Xi.set(Li)});const ne=(Ue,rt)=>{B(Ue,rt);const ze=new CustomEvent(Ue,{detail:rt});document.dispatchEvent&&document.dispatchEvent(ze)};function W(Ue){return{notifications:[{[ca]:Cf,[la]:JSON.stringify({[Ef]:tn(Ue==null?void 0:Ue.name)}),[iu]:JSON.stringify(S)}]}}function re(Ue,rt,ze,tt,je,nt){e(1,y=je),e(8,j=rt),e(9,q=ze),e(10,M=tn(tt)),e(0,b=Gp),nt&&an.update(()=>nt),Yr.set(!0)}function G(Ue,rt,ze,tt,je,nt){e(1,y=je),e(9,q=ze),e(10,M=tn(tt)),e(0,b=Hp),nt&&an.update(()=>nt),Yr.set(!0)}function F(Ue){Ue==null||Ue.forEach(rt=>{S==null||S.push({data:{username:"user"},emailId:rt,language:We.language,country:We.country})})}function X(Ue,rt,ze,tt){Rr(!1),Yr.set(!1),Zl(ze,N).catch(je=>{e(13,C=!1),ve.error(je.message)}).then(()=>{e(13,C=!1)}).finally(()=>{e(13,C=!1),ve.info("Copy link api")}),I2(rt,ze).catch(je=>{ve.error(je.message)}).then(je=>{if(le(je,tn(tt),rt),rt&&a!=null&&a.length){const nt=a==null?void 0:a.map(lt=>lt==null?void 0:lt.email);F(nt);const $e=W(l),mt=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:$e,module:"projectList"}});document.dispatchEvent(mt),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,lt=>{ve.info("email response",lt.detail.emailResp)})}}).finally(()=>{Yr.set(!1),ve.info("Project status changed for project: ",tt),Lr.update(()=>[])})}function le(Ue,rt,ze){if(Ue.error)Ja(ks(String(Ue==null?void 0:Ue.message),s));else{const tt=rt+" "+i(ze?"project_listing.archived":"project_listing.unarchived")+" "+i("generic.successfully");ia(tt),setTimeout(()=>{ae(ze?Pu:El)},1e3)}}function ue(Ue,rt,ze){rt&&((ze?String(ze.detail.action):"")===zp?ee(Rs,i("edit_project.project_updated_successfully_message")):Rr(!1),Ue.open=!1,Yr.set(!1))}function ee(Ue,rt){Xi.set(Li),io(Ue,T,R.projectListSize,void 0,!0,!0,V(E)).then(()=>{wa.update(()=>!1),ia(rt)}).catch(ze=>{ve.error(ze.message)})}async function $(Ue){try{const rt=await Vh();if(Ue&&typeof Ue===za){const ze=ss(ur.PRIVATE_PROJECT_CREATED,Ue,rt,String(o==null?void 0:o.platform));dr(ze)}ne(vr.GOTO_PROJECT,{projectId:rt,projectType:va})}catch(rt){ve.error(rt.message)}}function he(Ue,rt){const ze=Ue.id;ne(vr.GOTO_PROJECT,{projectId:ze,action:rt})}function me(Ue,rt){Rr(!1),e(2,L={...Ue}),e(2,L.name=tn(L.name),L),e(2,L.description=L!=null&&L.description?tn(L.description):"",L),e(2,L.createdDate=qi(Number(Ue.createdDate)),L),e(2,L.modifiedDate=qi(Number(Ue.modifiedDate)),L),e(2,L.owner=L.owner?L.owner:i("bom_manager.not_available_txt"),L),e(2,L.company=L.company?L.company:i("bom_manager.not_available_txt"),L),rt.open=!0}async function te(Ue,rt){var ze;try{const tt={};Ho.update(()=>tt),Lr.update(()=>[]),Rr(!1),e(13,C=!0),rt.open=!0;const je=[];je.push(Zl(Ue,N)),je.push(Zv(Ue));const nt=await Promise.all(je);e(13,C=!1),(ze=nt[1])!=null&&ze.data&&an.update(()=>nt[1].data)}catch(tt){ve.error("error in links API",tt.message),e(13,C=!1)}}function oe(Ue,rt,ze,tt,je){e(1,y=i("generic.clone")+" "),e(7,O=Ue),e(10,M=tn(tt)),e(8,j=rt),e(9,q=ze),e(0,b=xp),D=je,Yr.set(!0)}function ce(Ue,rt,ze){Rr(!1),Yr.set(!1),O2(rt,ze,r).catch(tt=>{ve.error(tt.message)}).then(tt=>{ge(tt,ze,Ue)}).finally(()=>{ve.info("Project cloned for project: ",ze)})}function ge(Ue,rt,ze){if(Ue.error){ze&&ae(El);const tt=rt+" "+i("project_listing.cloned_success_message");fe(tt)}else Ue.message&&(wa.update(()=>!0),me(D,z))}function fe(Ue){ee(k,Ue)}function ae(Ue){B("activateTab",{id:String(Ue)})}function ie(Ue){b===xp?ce(j,String(Ue.detail.projectId),String(Ue.detail.projectName)):b===Hp?_e(String(Ue.detail.projectId),String(Ue.detail.projectName),!0):X(Ue.detail.wrapper,!Ue.detail.archiveStatus,String(Ue.detail.projectId),String(Ue.detail.projectName))}function _e(Ue,rt,ze){Rr(!1),Yr.set(!1),A2(Ue,rt,ze).catch(tt=>{ve.error(tt.message)}).then(tt=>{const je=rt+" "+i("project_listing.project_deleted_message");ia(je),Xi.set(Li),io(k,T,R.projectListSize,void 0,!0,!0,V(E)).catch(nt=>{ve.error(nt.message)})}).finally(()=>{Yr.set(!1),ve.info("Project deleted with ID: ",Ue)})}function Ie(Ue){ue(Ue.detail.wrapperarchiveUnarchive,String(Ue.detail.archiveDialogId))}function we(Ue){ce(Ue.detail.action.isArchived,String(Ue.detail.action.id),String(Ue.detail.action.name))}const pe=()=>{$(ur.PROJECT_LISTING)},Se=()=>{$(ur.PROJECT_LISTING)},Le=Ue=>{te(Ue==null?void 0:Ue.id,P)},Re=Ue=>{he(Ue,ur.PROJECT_LISTING)},Ee=Ue=>{me(Ue,z)},ke=Ue=>{re(O,k===cr,String(Ue.id),String(Ue.name),i("project_listing.archive"),Ue)},Ce=Ue=>{re(O,k===cr,String(Ue.id),String(Ue.name),i("project_listing.unarchive"),Ue)},Ne=Ue=>{oe(O,k===cr,String(Ue.id),String(Ue.name),Ue)},Pe=Ue=>{me(Ue,z)},Ve=Ue=>{G(O,!0,String(Ue.id),String(Ue.name),Zb,Ue)},ot=Ue=>{ue(z,_,Ue)};function gt(Ue){_t[Ue?"unshift":"push"](()=>{z=Ue,e(11,z)})}function He(Ue){C=Ue,e(13,C)}const Be=()=>{NB(P)};function Ye(Ue){_t[Ue?"unshift":"push"](()=>{P=Ue,e(12,P)})}return t.$$set=Ue=>{"dialogId"in Ue&&e(0,b=Ue.dialogId),"dialogType"in Ue&&e(1,y=Ue.dialogType),"isArchive"in Ue&&e(3,k=Ue.isArchive),"isShared"in Ue&&e(4,T=Ue.isShared),"projectListOptions"in Ue&&e(36,R=Ue.projectListOptions),"singleProject"in Ue&&e(2,L=Ue.singleProject),"user"in Ue&&e(5,I=Ue.user),"businessunit"in Ue&&e(37,N=Ue.businessunit),"platform"in Ue&&e(38,E=Ue.platform)},t.$$.update=()=>{t.$$.dirty[0]&80&&(u==null?void 0:u.length)>0&&T!==cr&&gl().then(()=>{Z==null||Z.observe(document.getElementById("block-project-tile-"+String(u.length-1)))})},[b,y,L,k,T,I,u,O,j,q,M,z,P,C,U,i,l,d,f,p,m,g,h,_,V,re,G,ue,$,he,me,te,oe,ie,Ie,we,R,N,E,X,_e,pe,Se,Le,Re,Ee,ke,Ce,Ne,Pe,Ve,ot,gt,He,Be,Ye]}class T_ extends Ot{constructor(n){super(),At(this,n,LB,PB,It,{dialogId:0,dialogType:1,isArchive:3,isShared:4,projectListOptions:36,singleProject:2,user:5,businessunit:37,platform:38,updateProject:39,deleteProject:40},hB,[-1,-1,-1])}get updateProject(){return this.$$.ctx[39]}get deleteProject(){return this.$$.ctx[40]}}const _ne="";function jB(t){Ut(t,"svelte-55wj0b",".display-flex.svelte-55wj0b{display:-ms-flexbox;display:-webkit-flex;display:flex}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.header.svelte-55wj0b{color:var(--se-primary);padding-bottom:12px;padding-top:12px}.se-content-bg.svelte-55wj0b{background-color:var(--se-white, #ffffff);border:1px solid;border-top:0px;border-color:var(--se-super-light-grey, #e6e6e6)}.align-survey-btn.svelte-55wj0b{margin-left:auto;margin-top:12px}")}const RB=t=>({}),o3=t=>({});function MB(t){let n,e,i,r,o,s;return{c(){n=A("qds-tab"),w(n,"id","lnk-shared-tab"),w(n,"role","tab"),w(n,"tabindex","0"),w(n,"selected",e=t[0]===Wf),w(n,"disabled",i=t[6][Bh]===Ae.DISABLED),w(n,"text",r=t[5]("project_listing.shared_projects"))},m(l,a){J(l,n,a),o||(s=[xe(n,"click",t[19]),xe(n,"keydown",t[20])],o=!0)},p(l,a){a&1&&e!==(e=l[0]===Wf)&&w(n,"selected",e),a&64&&i!==(i=l[6][Bh]===Ae.DISABLED)&&w(n,"disabled",i),a&32&&r!==(r=l[5]("project_listing.shared_projects"))&&w(n,"text",r)},d(l){l&&K(n),o=!1,An(s)}}}function qB(t){let n,e,i,r,o;return r=new T_({props:{isArchive:"false",isShared:"true",businessunit:t[2],projectListOptions:JSON.parse(t[3]),platform:t[4]}}),r.$on("gotoProject",t[8]),r.$on("activateTab",t[10]),{c(){n=A("se-block-content"),e=A("se-block"),i=Y(),De(r.$$.fragment),w(n,"outline","true"),w(n,"class","se-content-bg svelte-55wj0b")},m(s,l){J(s,n,l),v(n,e),v(n,i),Me(r,n,null),o=!0},p(s,l){const a={};l&4&&(a.businessunit=s[2]),l&8&&(a.projectListOptions=JSON.parse(s[3])),l&16&&(a.platform=s[4]),r.$set(a)},i(s){o||(Q(r.$$.fragment,s),o=!0)},o(s){se(r.$$.fragment,s),o=!1},d(s){s&&K(n),qe(r)}}}function DB(t){let n,e,i,r,o;return r=new T_({props:{isArchive:"true",isShared:"false",businessunit:t[2],projectListOptions:JSON.parse(t[3]),platform:t[4]}}),r.$on("gotoProject",t[8]),r.$on("activateTab",t[10]),{c(){n=A("se-block-content"),e=A("se-block"),i=Y(),De(r.$$.fragment),w(n,"outline","true"),w(n,"class","se-content-bg svelte-55wj0b")},m(s,l){J(s,n,l),v(n,e),v(n,i),Me(r,n,null),o=!0},p(s,l){const a={};l&4&&(a.businessunit=s[2]),l&8&&(a.projectListOptions=JSON.parse(s[3])),l&16&&(a.platform=s[4]),r.$set(a)},i(s){o||(Q(r.$$.fragment,s),o=!0)},o(s){se(r.$$.fragment,s),o=!1},d(s){s&&K(n),qe(r)}}}function BB(t){let n,e,i,r,o;return r=new T_({props:{isArchive:"false",isShared:"false",businessunit:t[2],user:t[1],projectListOptions:JSON.parse(t[3]),platform:t[4]}}),r.$on("gotoProject",t[8]),r.$on("editProject",t[9]),r.$on("activateTab",t[10]),{c(){n=A("se-block-content"),e=A("se-block"),i=Y(),De(r.$$.fragment),w(n,"outline","true"),w(n,"class","se-content-bg svelte-55wj0b")},m(s,l){J(s,n,l),v(n,e),v(n,i),Me(r,n,null),o=!0},p(s,l){const a={};l&4&&(a.businessunit=s[2]),l&2&&(a.user=s[1]),l&8&&(a.projectListOptions=JSON.parse(s[3])),l&16&&(a.platform=s[4]),r.$set(a)},i(s){o||(Q(r.$$.fragment,s),o=!0)},o(s){se(r.$$.fragment,s),o=!1},d(s){s&&K(n),qe(r)}}}function UB(t){let n,e,i=t[5]("workspace_homepage.project_builder")+"",r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T=t[11]("")===void 0||t[11]("")!==Dn.EAB,R,O,j,q,M,z;const D=t[14].surveyBtn,P=fl(D,t,t[13],o3);let L=T&&MB(t);const C=[BB,DB,qB],S=[];function I(N,E){return N[0]===El?0:N[0]===Pu?1:N[0]===Wf?2:-1}return~(O=I(t))&&(j=S[O]=C[O](t)),{c(){n=A("div"),e=A("h3"),r=de(i),o=Y(),s=A("div"),P&&P.c(),l=Y(),a=A("se-container"),c=A("se-block"),u=A("se-block-header"),d=A("qds-tabbar"),f=A("qds-tab"),g=Y(),h=A("qds-tab"),k=Y(),L&&L.c(),R=Y(),j&&j.c(),x(e,"class","header svelte-55wj0b"),x(e,"data-testid","projects-header"),x(s,"class","align-survey-btn svelte-55wj0b"),x(n,"class","display-flex justify-content-between svelte-55wj0b"),w(f,"id","lnk-active-tab"),w(f,"role","tab"),w(f,"tabindex","0"),w(f,"selected",p=t[0]===El),w(f,"text",m=t[5]("project_listing.active_projects")),w(h,"id","lnk-archive-tab"),w(h,"role","tab"),w(h,"tabindex","0"),w(h,"selected",_=t[0]===Pu),w(h,"disabled",b=t[6][Dh]===Ae.DISABLED),w(h,"text",y=t[5]("project_listing.archived_projects")),w(d,"option","content"),w(d,"color","alternative"),w(u,"option","fill"),w(u,"outline","false"),w(u,"class","se-home-header"),w(c,"color","standard"),w(c,"divider","false"),w(a,"option","fill")},m(N,E){J(N,n,E),v(n,e),v(e,r),v(n,o),v(n,s),P&&P.m(s,null),J(N,l,E),J(N,a,E),v(a,c),v(c,u),v(u,d),v(d,f),v(d,g),v(d,h),v(d,k),L&&L.m(d,null),v(c,R),~O&&S[O].m(c,null),q=!0,M||(z=[xe(f,"click",t[15]),xe(f,"keydown",t[16]),xe(h,"click",t[17]),xe(h,"keydown",t[18])],M=!0)},p(N,[E]){(!q||E&32)&&i!==(i=N[5]("workspace_homepage.project_builder")+"")&&be(r,i),P&&P.p&&(!q||E&8192)&&pl(P,D,N,N[13],q?dl(D,N[13],E,RB):hl(N[13]),o3),(!q||E&1&&p!==(p=N[0]===El))&&w(f,"selected",p),(!q||E&32&&m!==(m=N[5]("project_listing.active_projects")))&&w(f,"text",m),(!q||E&1&&_!==(_=N[0]===Pu))&&w(h,"selected",_),(!q||E&64&&b!==(b=N[6][Dh]===Ae.DISABLED))&&w(h,"disabled",b),(!q||E&32&&y!==(y=N[5]("project_listing.archived_projects")))&&w(h,"text",y),T&&L.p(N,E);let B=O;O=I(N),O===B?~O&&S[O].p(N,E):(j&&(Je(),se(S[B],1,1,()=>{S[B]=null}),Qe()),~O?(j=S[O],j?j.p(N,E):(j=S[O]=C[O](N),j.c()),Q(j,1),j.m(c,null)):j=null)},i(N){q||(Q(P,N),Q(j),q=!0)},o(N){se(P,N),se(j),q=!1},d(N){N&&(K(n),K(l),K(a)),P&&P.d(N),L&&L.d(),~O&&S[O].d(),M=!1,An(z)}}}function zB(t,n,e){let i,r,o;ye(t,wr,M=>e(12,i=M)),ye(t,Vt,M=>e(5,r=M)),ye(t,Ii,M=>e(6,o=M));let{$$slots:s={},$$scope:l}=n,{activetab:a=El}=n,{user:c}=n,{businessunit:u}=n,{projectListOptions:d}=n,{platform:f}=n,p=new URLSearchParams(window.location.search);const m=Mn();function g(M){e(0,a=M)}async function h(M){var z;if((z=M==null?void 0:M.detail)!=null&&z.action){const D=ss(ur.REDIRECT_TO_PROJECT_DETAIL_PAGE,M.detail.action,String(i.platform),M.detail.projectId);dr(D)}m(vr.GOTO_PROJECT,M.detail)}function _(M){m(vr.EDIT_PROJECT,M.detail)}function b(M){g(String(M.detail.id))}function y(M){if(M=new URLSearchParams(window.location.search).get(ds),!(M===yu||M===Dn.SE))return M}const k=()=>(g(El),!1),T=M=>{(M.key===Ys||M.key===gr)&&(g(El),M.preventDefault())},R=()=>(g(Pu),!1),O=M=>{(M.key===Ys||M.key===gr)&&(g(Pu),M.preventDefault())},j=()=>(g(Wf),!1),q=M=>{(M.key===Ys||M.key===gr)&&(g(Wf),M.preventDefault())};return t.$$set=M=>{"activetab"in M&&e(0,a=M.activetab),"user"in M&&e(1,c=M.user),"businessunit"in M&&e(2,u=M.businessunit),"projectListOptions"in M&&e(3,d=M.projectListOptions),"platform"in M&&e(4,f=M.platform),"$$scope"in M&&e(13,l=M.$$scope)},t.$$.update=()=>{if(t.$$.dirty&4096&&(p==null?void 0:p.size)>0){const M=p.get(ur.REDIRECT);if(M){const z=ss(ur.REDIRECT_LISTIING_PAGE,M,String(i==null?void 0:i.platform));dr(z)}}},[a,c,u,d,f,r,o,g,h,_,b,y,i,l,s,k,T,R,O,j,q]}class FB extends Ot{constructor(n){super(),At(this,n,zB,UB,It,{activetab:0,user:1,businessunit:2,projectListOptions:3,platform:4},jB)}}const bne="";function xB(t){Ut(t,"svelte-1im53s1",".view-btn.svelte-1im53s1{font-size:medium}.pointer.svelte-1im53s1{cursor:pointer}")}function GB(t){let n,e,i,r,o,s;return{c(){n=A("qds-standalone-link"),e=de(t[0]),w(n,"href",i=t[2]?t[2]:null),w(n,"disabled",t[1]),w(n,"id",t[6]),w(n,"class",r=Nt(t[8])+" svelte-1im53s1"),w(n,"data-testid",t[7]),w(n,"icon-name",t[3]),w(n,"size",t[5])},m(l,a){J(l,n,a),v(n,e),o||(s=xe(n,"click",t[12]),o=!0)},p(l,a){a&1&&be(e,l[0]),a&4&&i!==(i=l[2]?l[2]:null)&&w(n,"href",i),a&2&&w(n,"disabled",l[1]),a&64&&w(n,"id",l[6]),a&256&&r!==(r=Nt(l[8])+" svelte-1im53s1")&&w(n,"class",r),a&128&&w(n,"data-testid",l[7]),a&8&&w(n,"icon-name",l[3]),a&32&&w(n,"size",l[5])},d(l){l&&K(n),o=!1,s()}}}function HB(t){let n,e,i,r,o,s;return{c(){n=A("qds-standalone-link"),e=de(t[0]),w(n,"href",i=t[2]?t[2]:null),w(n,"disabled",t[1]),w(n,"class",r=Nt(t[8])+" svelte-1im53s1"),w(n,"importance",t[4]),w(n,"id",t[6]),w(n,"data-testid",t[7]),w(n,"icon-name",t[3]),w(n,"size",t[5])},m(l,a){J(l,n,a),v(n,e),o||(s=xe(n,"click",t[11]),o=!0)},p(l,a){a&1&&be(e,l[0]),a&4&&i!==(i=l[2]?l[2]:null)&&w(n,"href",i),a&2&&w(n,"disabled",l[1]),a&256&&r!==(r=Nt(l[8])+" svelte-1im53s1")&&w(n,"class",r),a&16&&w(n,"importance",l[4]),a&64&&w(n,"id",l[6]),a&128&&w(n,"data-testid",l[7]),a&8&&w(n,"icon-name",l[3]),a&32&&w(n,"size",l[5])},d(l){l&&K(n),o=!1,s()}}}function WB(t){let n;function e(o,s){var l;return((l=o[9])==null?void 0:l.linkActiveColor)===Te?HB:GB}let i=e(t),r=i(t);return{c(){r.c(),n=wt()},m(o,s){r.m(o,s),J(o,n,s)},p(o,[s]){i===(i=e(o))&&r?r.p(o,s):(r.d(1),r=i(o),r&&(r.c(),r.m(n.parentNode,n)))},i:et,o:et,d(o){o&&K(n),r.d(o)}}}function VB(t,n,e){let i;ye(t,ns,_=>e(9,i=_));let{linkText:r=Te}=n,{disabled:o=!1}=n,{href:s=Te}=n,{iconName:l=Te}=n,{importance:a="standard"}=n,{linkSize:c="standard"}=n,{id:u=Te}=n,{dataTestId:d=Te}=n,{className:f="pw pointer"}=n;const p=Mn();function m(){p(Hn.LINK_CLICK)}const g=()=>{m()},h=()=>{m()};return t.$$set=_=>{"linkText"in _&&e(0,r=_.linkText),"disabled"in _&&e(1,o=_.disabled),"href"in _&&e(2,s=_.href),"iconName"in _&&e(3,l=_.iconName),"importance"in _&&e(4,a=_.importance),"linkSize"in _&&e(5,c=_.linkSize),"id"in _&&e(6,u=_.id),"dataTestId"in _&&e(7,d=_.dataTestId),"className"in _&&e(8,f=_.className)},[r,o,s,l,a,c,u,d,f,i,m,g,h]}class xi extends Ot{constructor(n){super(),At(this,n,VB,WB,It,{linkText:0,disabled:1,href:2,iconName:3,importance:4,linkSize:5,id:6,dataTestId:7,className:8},xB)}}const vne="";function YB(t){Ut(t,"svelte-94n99r",".pw.display-flex.svelte-94n99r.svelte-94n99r{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-94n99r.svelte-94n99r{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-94n99r.svelte-94n99r{font-size:16px}.pw.bold-font.svelte-94n99r.svelte-94n99r{font-weight:bold}.pw.ml-8.svelte-94n99r.svelte-94n99r{margin-left:8px}.pw.mt-8.svelte-94n99r.svelte-94n99r{margin-top:8px}.pw.mt-32.svelte-94n99r.svelte-94n99r{margin-top:32px}.pw.mb-8.svelte-94n99r.svelte-94n99r{margin-bottom:8px}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.right-section.svelte-94n99r.svelte-94n99r{position:relative;height:auto}.right-section.svelte-94n99r .tick-icon.svelte-94n99r{position:absolute;left:-7px;top:-14px}.right-section.svelte-94n99r ul li.list-display.svelte-94n99r{padding-left:36px;margin-bottom:6px;position:relative}.bottom-section.svelte-94n99r.svelte-94n99r{position:absolute;bottom:5px;margin-left:14px;margin-bottom:12px}.img-padding.svelte-94n99r.svelte-94n99r{padding:0 12px 12px 12px}")}function a3(t){let n,e;return n=new xi({props:{className:"list-items pw pointer",id:"link-to-configurator",linkText:t[1]("workspace_homepage.use_product_configurator"),linkSize:"small"}}),n.$on("linkClick",t[5]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&2&&(o.linkText=i[1]("workspace_homepage.use_product_configurator")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function ZB(t){let n,e,i,r,o,s,l=t[1]("workspace_homepage.create_bill_and_save")+"",a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O=t[1]("workspace_homepage.search_by_se_reference")+"",j,q,M,z,D,P,L=t[1]("workspace_homepage.upload_to_excel")+"",C,S,I,N,E,B,U=t[1]("workspace_homepage.user_application_or_function_selector")+"",H,Z,V,ne,W,re,G,F=t[0].includes("Configurators"),X;ne=new Gt({props:{importance:"emphasized",id:"add-new-bom-btn",buttonText:t[1]("workspace_homepage.create_new_bill")}}),ne.$on("btnClick",t[4]);let le=F&&a3(t);return{c(){n=A("se-container"),e=A("se-block"),i=A("div"),r=A("se-icon"),r.textContent="existing_project",o=Y(),s=A("p"),a=de(l),c=Y(),u=A("se-container"),d=A("div"),f=A("se-block"),p=A("div"),m=A("img"),h=Y(),_=A("se-block"),b=A("ul"),y=A("li"),k=A("se-icon"),k.textContent="notification_ok",T=Y(),R=A("p"),j=de(O),q=Y(),M=A("li"),z=A("se-icon"),z.textContent="notification_ok",D=Y(),P=A("p"),C=de(L),S=Y(),I=A("li"),N=A("se-icon"),N.textContent="notification_ok",E=Y(),B=A("p"),H=de(U),Z=Y(),V=A("div"),De(ne.$$.fragment),W=Y(),re=A("br"),G=Y(),le&&le.c(),w(r,"class","project-icon get-started-heading pw mt-8 svelte-94n99r"),w(r,"padding","small"),w(r,"size","xlarge"),x(s,"class","list-items pw mt-32 pw bold-font pw base-font svelte-94n99r"),x(s,"id","placard-head-info"),x(i,"class","pw display-flex pw ml-8 pw mb-8 svelte-94n99r"),x(m,"id","product-config"),rr(m.src,g=xb)||x(m,"src",g),x(m,"alt","img"),x(m,"width","100%"),x(m,"height","100%"),x(p,"class","list-items"),w(f,"outlinecolor","secondary"),w(f,"class","cards pw display-flex img-padding svelte-94n99r"),x(d,"class","cards pw display-flex left-part svelte-94n99r"),w(k,"class","tick-icon svelte-94n99r"),w(k,"size","large"),w(k,"color","primary"),x(R,"id","placard-info-1"),x(y,"class","pw display-flex list-items list-display svelte-94n99r"),w(z,"class","tick-icon svelte-94n99r"),w(z,"size","large"),w(z,"color","primary pw mb-12"),x(P,"id","placard-info-2"),x(M,"class","pw display-flex list-items list-display svelte-94n99r"),w(N,"class","tick-icon svelte-94n99r"),w(N,"size","large"),w(N,"color","primary pw mb-12"),x(B,"id","placard-info-3"),x(I,"class","pw display-flex list-items list-display svelte-94n99r"),x(b,"class","pw ml-8 svelte-94n99r"),x(V,"class","bottom-section svelte-94n99r"),w(_,"class","right-section svelte-94n99r"),w(u,"direction","row"),w(e,"outline","true"),w(e,"outlinecolor","secondary"),w(e,"class","cards"),w(n,"class","pw")},m(ue,ee){J(ue,n,ee),v(n,e),v(e,i),v(i,r),v(i,o),v(i,s),v(s,a),v(e,c),v(e,u),v(u,d),v(d,f),v(f,p),v(p,m),v(u,h),v(u,_),v(_,b),v(b,y),v(y,k),v(y,T),v(y,R),v(R,j),v(b,q),v(b,M),v(M,z),v(M,D),v(M,P),v(P,C),v(b,S),v(b,I),v(I,N),v(I,E),v(I,B),v(B,H),v(_,Z),v(_,V),Me(ne,V,null),v(V,W),v(V,re),v(V,G),le&&le.m(V,null),X=!0},p(ue,[ee]){(!X||ee&2)&&l!==(l=ue[1]("workspace_homepage.create_bill_and_save")+"")&&be(a,l),(!X||ee&2)&&O!==(O=ue[1]("workspace_homepage.search_by_se_reference")+"")&&be(j,O),(!X||ee&2)&&L!==(L=ue[1]("workspace_homepage.upload_to_excel")+"")&&be(C,L),(!X||ee&2)&&U!==(U=ue[1]("workspace_homepage.user_application_or_function_selector")+"")&&be(H,U);const $={};ee&2&&($.buttonText=ue[1]("workspace_homepage.create_new_bill")),ne.$set($),ee&1&&(F=ue[0].includes("Configurators")),F?le?(le.p(ue,ee),ee&1&&Q(le,1)):(le=a3(ue),le.c(),Q(le,1),le.m(V,null)):le&&(Je(),se(le,1,1,()=>{le=null}),Qe())},i(ue){X||(Q(ne.$$.fragment,ue),Q(le),X=!0)},o(ue){se(ne.$$.fragment,ue),se(le),X=!1},d(ue){ue&&K(n),qe(ne),le&&le.d()}}}function XB(t,n,e){let i;ye(t,Vt,d=>e(1,i=d));let{availableservices:r}=n;const o=Mn(),s=(d,f)=>{o(d,f);const p=new CustomEvent(d,{detail:f});document.dispatchEvent&&document.dispatchEvent(p)};function l(d,f){s(vr.BOM,{id:d,action:f,projectType:va})}function a(){s(vr.CONFIGURATORS)}const c=()=>{l(null,ur.PROJECT_OVERVIEW)},u=()=>{a()};return t.$$set=d=>{"availableservices"in d&&e(0,r=d.availableservices)},[r,i,l,a,c,u]}class KB extends Ot{constructor(n){super(),At(this,n,XB,ZB,It,{availableservices:0},YB)}}const wne="";function JB(t){Ut(t,"svelte-1snxq6d",".pw.align-left.svelte-1snxq6d{margin-right:auto}.pw.display-flex.svelte-1snxq6d{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1snxq6d{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.pointer.svelte-1snxq6d{cursor:pointer}.pw.bold-font.svelte-1snxq6d{font-weight:bold}.pw.ml-8.svelte-1snxq6d{margin-left:8px}.pw.ml-12.svelte-1snxq6d{margin-left:12px}.pw.mt-8.svelte-1snxq6d{margin-top:8px}.pw.mb-12.svelte-1snxq6d{margin-bottom:12px}.pw.mb-16.svelte-1snxq6d{margin-top:16px}.pw.p-12.svelte-1snxq6d{padding:12px}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.se-line.svelte-1snxq6d{padding:0 12px}.cards.svelte-1snxq6d{width:50%;min-height:345px;margin-top:12px}.list-items.svelte-1snxq6d{padding-top:12px}.se-project-head.svelte-1snxq6d{margin-left:12px;padding-top:8px}.bom-section-head.svelte-1snxq6d{font-size:22px}")}function l3(t,n,e){const i=t.slice();return i[17]=n[e],i[19]=e,i}function QB(t,n,e){const i=t.slice();return i[14]=n[e],i}function $B(t){let n,e,i=t[3]("workspace_homepage.no_active_projects")+"",r;return{c(){n=A("li"),e=A("p"),r=de(i),x(e,"class","se-project-head svelte-1snxq6d"),x(e,"id","projDetails.id"),x(n,"class","pw display-flex list-items svelte-1snxq6d")},m(o,s){J(o,n,s),v(n,e),v(e,r)},p(o,s){s&8&&i!==(i=o[3]("workspace_homepage.no_active_projects")+"")&&be(r,i)},i:et,o:et,d(o){o&&K(n)}}}function eU(t){let n,e,i=Dt(t[4]),r=[];for(let s=0;sse(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s',e=Y(),i=A("qds-divider"),x(n,"class","pw display-flex list-items svelte-1snxq6d"),w(i,"class","se-line svelte-1snxq6d")},m(r,o){J(r,n,o),J(r,e,o),J(r,i,o)},p:et,d(r){r&&(K(n),K(e),K(i))}}}function f3(t){let n,e,i,r,o;return e=new xi({props:{id:"link-to-configurator",linkText:t[3]("workspace_homepage.use_product_configurator"),linkSize:"small"}}),e.$on("linkClick",t[11]),{c(){n=A("span"),De(e.$$.fragment),i=Y(),r=A("se-icon"),r.textContent="arrow2_right",w(r,"color","secondary"),w(r,"size","nano"),w(r,"class","align-middle"),x(n,"class","pw mb-16 list-items pw pointer svelte-1snxq6d")},m(s,l){J(s,n,l),Me(e,n,null),v(n,i),v(n,r),o=!0},p(s,l){const a={};l&8&&(a.linkText=s[3]("workspace_homepage.use_product_configurator")),e.$set(a)},i(s){o||(Q(e.$$.fragment,s),o=!0)},o(s){se(e.$$.fragment,s),o=!1},d(s){s&&K(n),qe(e)}}}function iU(t){let n,e,i,r,o,s,l,a=t[3]("workspace_homepage.recent_projects")+"",c,u,d,f,p,m,g,h,_,b,y,k,T=t[3]("workspace_homepage.product_configurators")+"",R,O,j,q,M,z,D=t[0].includes("Configurators"),P;const L=[tU,eU,$B],C=[];function S(N,E){return N[2]?0:N[1]?2:1}d=S(t),f=C[d]=L[d](t),g=new Gt({props:{id:"add-new-bom-btn",importance:"emphasized",className:"add-btn",buttonText:t[3]("workspace_homepage.create_new_bill")}}),g.$on("btnClick",t[9]),_=new Gt({props:{id:"view-all-btn",className:"view-btn",buttonText:t[3]("workspace_homepage.view_all_projects")}}),_.$on("btnClick",t[10]);let I=D&&f3(t);return{c(){n=A("se-container"),e=A("se-block"),i=A("se-container"),r=A("se-block"),o=A("ul"),s=A("li"),l=A("p"),c=de(a),u=Y(),f.c(),p=Y(),m=A("li"),De(g.$$.fragment),h=Y(),De(_.$$.fragment),b=Y(),y=A("se-block"),k=A("p"),R=de(T),O=Y(),j=A("div"),q=A("img"),z=Y(),I&&I.c(),x(l,"class","se-project-head bom-section-head pw bold-font svelte-1snxq6d"),x(l,"id","recentProject"),x(s,"class","pw display-flex list-items svelte-1snxq6d"),x(m,"class","pw ml-8 pw mt-8 pw svelte-1snxq6d"),hi(m,"padding-top",(t[1]?190:t[4].length>=3||t[2]?0:(3-t[4].length)*75)+"px"),w(r,"outline","true"),w(r,"outlinecolor","secondary"),w(r,"class","cards pw display-flex pw mb-12 pw ml-12 svelte-1snxq6d"),x(k,"class","pw align-left pw bold-font bom-section-head pw mb-12 svelte-1snxq6d"),x(k,"id","configurators-head"),x(q,"id","product-config"),rr(q.src,M=xb)||x(q,"src",M),x(q,"alt","img"),x(q,"width","100%"),x(q,"height","100%"),x(j,"class","list-items svelte-1snxq6d"),w(y,"outlinecolor","secondary"),w(y,"class","cards pw display-flex pw p-12 svelte-1snxq6d"),w(i,"direction","row"),w(e,"outline","true"),w(e,"outlinecolor","secondary"),w(n,"class","pw")},m(N,E){J(N,n,E),v(n,e),v(e,i),v(i,r),v(r,o),v(o,s),v(s,l),v(l,c),v(o,u),C[d].m(o,null),v(o,p),v(o,m),Me(g,m,null),v(m,h),Me(_,m,null),v(i,b),v(i,y),v(y,k),v(k,R),v(y,O),v(y,j),v(j,q),v(y,z),I&&I.m(y,null),P=!0},p(N,[E]){(!P||E&8)&&a!==(a=N[3]("workspace_homepage.recent_projects")+"")&&be(c,a);let B=d;d=S(N),d===B?C[d].p(N,E):(Je(),se(C[B],1,1,()=>{C[B]=null}),Qe(),f=C[d],f?f.p(N,E):(f=C[d]=L[d](N),f.c()),Q(f,1),f.m(o,p));const U={};E&8&&(U.buttonText=N[3]("workspace_homepage.create_new_bill")),g.$set(U);const H={};E&8&&(H.buttonText=N[3]("workspace_homepage.view_all_projects")),_.$set(H),(!P||E&22)&&hi(m,"padding-top",(N[1]?190:N[4].length>=3||N[2]?0:(3-N[4].length)*75)+"px"),(!P||E&8)&&T!==(T=N[3]("workspace_homepage.product_configurators")+"")&&be(R,T),E&1&&(D=N[0].includes("Configurators")),D?I?(I.p(N,E),E&1&&Q(I,1)):(I=f3(N),I.c(),Q(I,1),I.m(y,null)):I&&(Je(),se(I,1,1,()=>{I=null}),Qe())},i(N){P||(Q(f),Q(g.$$.fragment,N),Q(_.$$.fragment,N),Q(I),P=!0)},o(N){se(f),se(g.$$.fragment,N),se(_.$$.fragment,N),se(I),P=!1},d(N){N&&K(n),C[d].d(),qe(g),qe(_),I&&I.d()}}}function rU(t,n,e){let i,r;ye(t,Vt,_=>e(3,i=_)),ye(t,Xi,_=>e(4,r=_));const o=Mn();let{availableservices:s}=n,{isArchiveProject:l}=n,{isFetchInProgress:a}=n;const c=(_,b)=>{o(_,b);const y=new CustomEvent(_,{detail:b});document.dispatchEvent&&document.dispatchEvent(y)};function u(_,b,y,k){_&&_.preventDefault(),c(vr.BOM,{id:b,action:y,actionType:k,projectType:va})}function d(_){_&&_.preventDefault(),c(vr.CONFIGURATORS)}function f(_){_&&_.preventDefault(),c(vr.PROJECT_WORKSPACE)}const p=(_,b)=>{u(b,String(_.id),ur.PROJECT_OVERVIEW,ur.REDIRECT)},m=_=>{u(_,null,ur.PROJECT_OVERVIEW,ur.CREATE)},g=_=>{f(_)},h=_=>{d(_)};return t.$$set=_=>{"availableservices"in _&&e(0,s=_.availableservices),"isArchiveProject"in _&&e(1,l=_.isArchiveProject),"isFetchInProgress"in _&&e(2,a=_.isFetchInProgress)},[s,l,a,i,r,u,d,f,p,m,g,h]}class sU extends Ot{constructor(n){super(),At(this,n,rU,iU,It,{availableservices:0,isArchiveProject:1,isFetchInProgress:2},JB)}}function oU(t){let n,e;return n=new KB({props:{availableservices:t[0]}}),n.$on("bom",t[4]),n.$on("configurator",t[6]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&1&&(o.availableservices=i[0]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function aU(t){let n,e;return n=new sU({props:{isArchiveProject:t[1],isFetchInProgress:t[2],availableservices:t[0]}}),n.$on("bom",t[4]),n.$on("projectWorkspace",t[5]),n.$on("configurator",t[6]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&2&&(o.isArchiveProject=i[1]),r&4&&(o.isFetchInProgress=i[2]),r&1&&(o.availableservices=i[0]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function lU(t){let n,e,i,r;const o=[aU,oU],s=[];function l(a,c){return a[3].length>0||a[2]?0:1}return e=l(t),i=s[e]=o[e](t),{c(){n=A("se-container"),i.c(),w(n,"direction","column")},m(a,c){J(a,n,c),s[e].m(n,null),r=!0},p(a,[c]){let u=e;e=l(a),e===u?s[e].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),i=s[e],i?i.p(a,c):(i=s[e]=o[e](a),i.c()),Q(i,1),i.m(n,null))},i(a){r||(Q(i),r=!0)},o(a){se(i),r=!1},d(a){a&&K(n),s[e].d()}}}function cU(t,n,e){let i,r;ye(t,wr,m=>e(7,i=m)),ye(t,Xi,m=>e(3,r=m));let{availableservices:o}=n;const s=Mn();let l=!1,a=!0;const c=(m,g)=>{s(m,g);const h=new CustomEvent(m,{detail:g});document.dispatchEvent&&document.dispatchEvent(h)};Un(async()=>{await p(l,Yp)});async function u(m){var g,h;try{const _=m.detail.id===null?await Vh():String(m.detail.id),b=(g=m==null?void 0:m.detail)==null?void 0:g.action,y=(h=m==null?void 0:m.detail)==null?void 0:h.actionType;if(_)if(b&&typeof b===za&&y===ur.CREATE){const k=ss(ur.PRIVATE_PROJECT_CREATED,b,String(i==null?void 0:i.platform),String(_));dr(k),c(vr.BOM,{projectId:_,action:b,actionType:y,projectType:va})}else c(vr.BOM,{projectId:_,action:b,actionType:y})}catch(_){ve.error(_.message)}}function d(){c(vr.PROJECT_WORKSPACE)}function f(){c(vr.CONFIGURATORS)}async function p(m,g){var h,_;try{const b=await io(String(m),void 0,g,void 0,void 0,!1);!m&&!((h=b==null?void 0:b.data)!=null&&h.length)&&(e(1,l=!0),await p(l,Zp)),((_=b==null?void 0:b.data)!=null&&_.length||m)&&e(2,a=!1)}catch(b){e(2,a=!1),ve.error(b.message)}}return Kn(()=>{Xi.set(Li)}),t.$$set=m=>{"availableservices"in m&&e(0,o=m.availableservices)},[o,l,a,r,u,d,f]}class uU extends Ot{constructor(n){super(),At(this,n,cU,lU,It,{availableservices:0})}}const fU="C_REF1",C_={configuredReference:"configuredReference",configuredReference1:"custom-configuredReference1",configuredReference2:"custom-configuredReference2"},d3="KB_",p3="FUNCTION",dU="custom-configuredReference1",ua={DEFAULT:"default",CONFIGURABLE:"configurable",CUSTOMIZABLE:"customizable",CTO:"cto"},pU="productId",h3={APPLICATION_SOURCE:{SELECTOR_AND_CONFIGURATOR:"s&c"},TYPE:"configuration",API_URL:{dev:"https://gw-api-ppr-emea.schneider-electric.com/sc/",qa:"https://gw-api-ppr-emea.schneider-electric.com/sc/",uat:"https://gw-api-ppr-emea.schneider-electric.com/sc/",pprod:"https://gw-api-ppr-emea.schneider-electric.com/sc/",staging:"https://gw-api.schneider-electric.com/sc/",prod:"https://gw-api.schneider-electric.com/sc/"},API_ENDPOINTS:{PERSISTED_CONFIG:"configurations/persisted/"}},hU="custom-configuredReference2";let Hm=!1;function E_(t,n){var e,i;return((e=t.products)==null?void 0:e.length)>0&&(((i=n==null?void 0:n.groups)==null?void 0:i.length)>0?E_(t,n==null?void 0:n.groups[0]):(n.parts=[],mU(t,n))),n}function mU(t,n){var i,r;gU(t)>-1?(I_(t,n==null?void 0:n.parts,ua.CUSTOMIZABLE),n.parts[0].parts=[],Wm(t,n==null?void 0:n.parts[0].parts,Te,ua.CUSTOMIZABLE,!1)):t!=null&&t.configurationId&&(t==null?void 0:t.configurationId)!==Te?(i=t==null?void 0:t.extras)!=null&&i.codification&&((r=t==null?void 0:t.extras)==null?void 0:r.codification)!==Te?(I_(t,n==null?void 0:n.parts,ua.CONFIGURABLE),n.parts[0].parts=[],Wm(t,n==null?void 0:n.parts[0].parts,Te,ua.CONFIGURABLE,!1)):(I_(t,n==null?void 0:n.parts,ua.CTO),n.parts[0].parts=[],Wm(t,n==null?void 0:n.parts[0].parts,Te,ua.CTO,!1)):Wm(t,n==null?void 0:n.parts,Te,ua.DEFAULT,!1)}function gU(t){var n;return(n=t==null?void 0:t.products)==null?void 0:n.findIndex(e=>(e==null?void 0:e.TC_ID_CUSTO)&&(e==null?void 0:e.TC_ID_CUSTO)!==Te)}function I_(t,n,e){var i,r;fh.subscribe(o=>Hm=o),n.push({pimString:t==null?void 0:t.pimString,productRef:bU(t,e),quantity:t==null?void 0:t.quantity,description:Te,price:0,selectorId:Te,partType:e,kbId:t==null?void 0:t.kbId,isParent:!0,productId:m3(t==null?void 0:t.products[0],pU),product:m3(t==null?void 0:t.products[0],fU),productCode:(i=t==null?void 0:t.extras)!=null&&i.codification?(r=t==null?void 0:t.extras)==null?void 0:r.codification:Te,configurationId:t!=null&&t.configurationId?t==null?void 0:t.configurationId:Te,personalizationId:wU(t==null?void 0:t.products[0]),source:Hm?Du:p3,secondCharacteristic:g3(t==null?void 0:t.products[0],dU),firstCharacteristic:g3(t==null?void 0:t.products[0],hU),...Yn()&&{configCharacteristicGroup:t==null?void 0:t.configCharacteristicGroup}})}function Wm(t,n,e,i,r){var s;fh.subscribe(l=>Hm=l);const o=i===ua.CUSTOMIZABLE?(s=t==null?void 0:t.products)==null?void 0:s.filter(l=>!(l!=null&&l.extras)):t==null?void 0:t.products;o==null||o.forEach(function(l,a){const c=_U(l,n);c===-1?n.push({productRef:l!=null&&l.reference?String(l==null?void 0:l.reference):l!=null&&l.productId?String(l==null?void 0:l.productId):Te,quantity:l==null?void 0:l.quantity,pimString:t==null?void 0:t.pimString,description:l==null?void 0:l.description,price:0,productId:Te,selectorId:e,partType:i,isParent:r,personalizationId:a>0&&(l!=null&&l.TC_ID_CUSTO)?l==null?void 0:l.TC_ID_CUSTO:Te,configurationId:Te,productCode:Te,source:Hm?Du:p3}):n[c].quantity=n[c].quantity+l.quantity})}function _U(t,n){return n.findIndex(e=>(e==null?void 0:e.productRef)===(t==null?void 0:t.reference))}function bU(t,n){var e,i,r,o,s;if(n===ua.CUSTOMIZABLE)return(e=t==null?void 0:t.products[0])!=null&&e.extras?vU((i=t==null?void 0:t.products[0])==null?void 0:i.extras):Te;if(n===ua.CONFIGURABLE||n===ua.CTO)return(r=t==null?void 0:t.selector)!=null&&r.dataId&&((o=t==null?void 0:t.selector)==null?void 0:o.dataId.indexOf(d3))>-1?(s=t==null?void 0:t.selector)==null?void 0:s.dataId.split(d3)[1]:Te}function vU(t){return`${String(t==null?void 0:t[C_.configuredReference])}#${String(t==null?void 0:t[C_.configuredReference1])}#${String(t==null?void 0:t[C_.configuredReference2])}`}function wU(t){return t!=null&&t.TC_ID_CUSTO?t==null?void 0:t.TC_ID_CUSTO:Te}function m3(t,n){return t[n]?String(t[n]):Te}function g3(t,n){return t!=null&&t.extras?String(t==null?void 0:t.extras[n]):Te}function _3(t,n){const e=t.bom.parts.findIndex(i=>{var r,o;return String(i==null?void 0:i.configurationId)===n.configurationId&&(i==null?void 0:i.productCode)===(n==null?void 0:n.productCode)||String((r=i==null?void 0:i.orderingData)==null?void 0:r.orderingId)==n.configurationId&&((o=i==null?void 0:i.orderingData)==null?void 0:o.productCode)===(n==null?void 0:n.productCode)});return e>-1&&(t.bom.parts[e].quantity+=n.quantity,t.bom.parts[e].parts.forEach(i=>{const r=n.parts.findIndex(o=>o.productRef===i.productRef||(i==null?void 0:i.productId)===o.productRef);r>-1&&(i.quantity+=n.parts[r].quantity)})),t}function yU(t,n,e){return{country:n==null?void 0:n.country,language:n==null?void 0:n.kbLang,products:e,configurationId:t,project:n==null?void 0:n.project,type:h3.TYPE,quantity:1,selector:{dataId:n==null?void 0:n.kbId,country:n==null?void 0:n.country,project:n==null?void 0:n.project,language:n==null?void 0:n.kbLang},kbId:n==null?void 0:n.kbId,extras:{codification:(n==null?void 0:n.codification)??Te,pluginId:h3.APPLICATION_SOURCE.SELECTOR_AND_CONFIGURATOR},...Yn()&&{configCharacteristicGroup:A_(n==null?void 0:n.characteristicGroups)}}}function A_(t=[]){let n=t.filter(e=>e==null?void 0:e.isVisible).flatMap(e=>e==null?void 0:e.characteristics.flatMap(i=>{var o;const r=(o=i==null?void 0:i.values)==null?void 0:o.filter(s=>s==null?void 0:s.isAssigned);return(r==null?void 0:r.length)>0&&(r[0].name=i==null?void 0:i.name),r}));return n=n.slice(0,11),n}async function b3(t,n,e,i,r){var a;const o=(a=n==null?void 0:n.references)==null?void 0:a.map(c=>c==null?void 0:c.id);let s;return await OL(o,e,i,r,Te).then(c=>{var u;s=(u=n==null?void 0:n.references)==null?void 0:u.map((d,f)=>{var p;return{reference:d==null?void 0:d.id,quantity:d==null?void 0:d.quantity,description:((p=c[f])==null?void 0:p.description)??Te}})}),yU(t,n,s)}const Wt=yt(!0),v3=yt(!1),Vm=yt(!1),ac=yt(""),lc=yt(""),Qn=yt([]),Ls=yt([]),Af=yt(!1),cc=yt([]),Uo=yt([]),Ym=yt({}),qa=yt(!1);function ir(t){const n=bL;if(t){for(let e=0;et)}}function kU(t){const n=[];for(const e in t)n.push({productId:e,fileName:t[e].map(i=>i[kL]),url:t[e].map(i=>i[SL])});return n}const SU=async(t,n)=>{try{Af.update(()=>!0);const e=[];return t==null||t.forEach(function(i){var r;(r=i==null?void 0:i.url)==null||r.forEach(function(o,s){e.push(new Promise((l,a)=>{fetch(o).then(c=>c.blob()).then(c=>{l({productId:i==null?void 0:i.productId,fileName:i.fileName[s],data:c})}).catch(()=>{Af.update(()=>!1),a(n)})}))})}),await Promise.allSettled(e)}catch(e){return Af.update(()=>!1),ve.error(e.message),n}};async function Zm(t,n,e,i,r){var o;if(t&&Object.keys(t).length>0){bo(i);const s=kU(t);if(n){Af.update(()=>!1),window.open((o=s[0])==null?void 0:o.url[0],"_blank");return}return await SU(s,r)}else ys(e)}async function Xm(t,n,e){var o,s,l,a,c;const i=(await Promise.resolve().then(()=>f1)).default,r=new i;for(const u in t)if(((o=Object.keys(t))==null?void 0:o.length)===1)for(const d of t[u])(d==null?void 0:d.status)===i2.FULFILLED&&(r.file(`${(s=d==null?void 0:d.value)==null?void 0:s.fileName}`,(l=d==null?void 0:d.value)==null?void 0:l.data),tp());else{const d=r.folder(u);for(const f of t[u])f.status===i2.FULFILLED&&(d.file(`${(a=f==null?void 0:f.value)==null?void 0:a.fileName}`,(c=f==null?void 0:f.value)==null?void 0:c.data),tp())}Object.values.length&&await r.generateAsync({type:"blob"}).then(function(u){const d=new Blob([u],{type:"Buffer"});Af.update(()=>!1);const f=window.URL.createObjectURL(d),p=document.createElement("a");p.setAttribute("href",f),p.setAttribute("download",`${n}-${oc(new Date,String(Ig))}.${od.ZIP}`),tp(),p.click()}).catch(()=>(Af.update(()=>!1),e))}function tp(){const t=new CustomEvent(Hn.DOWNLOAD_SUCCESSFUL,{});document.dispatchEvent(t)}function Km(t){return{name:t.substring(0,t.lastIndexOf(".")).trim(),fileType:t.split(".").pop().trim()}}function as(t){const n=new Date(t);return`${n.getDate()}/${n.getMonth()+1}/${n.getFullYear()}`}function uc(t){const n=new Date(t);return`${as(t)} ${n==null?void 0:n.toLocaleTimeString().toLocaleUpperCase()}`}function bs(t,n,e=yr.NAME,i){return n==null?void 0:n.some(o=>{var s,l,a,c,u,d,f,p;switch(e){case yr.NAME:if(((s=o==null?void 0:o.recordType)==null?void 0:s.toLowerCase())===i&&((l=o==null?void 0:o.name)==null?void 0:l.toLowerCase())===t.toLowerCase())return!0;break;case yr.URL:if(((a=o==null?void 0:o.recordType)==null?void 0:a.toLowerCase())===i&&((c=o==null?void 0:o.url)==null?void 0:c.toLowerCase())===t.toLowerCase())return!0;break;case yr.DESCRIPTION:if(((u=o==null?void 0:o.recordType)==null?void 0:u.toLowerCase())===i&&((d=o==null?void 0:o.description)==null?void 0:d.toLowerCase())===t.toLowerCase())return!0;break;case"default":if(((f=o==null?void 0:o.recordType)==null?void 0:f.toLowerCase())===i&&((p=o==null?void 0:o.name)==null?void 0:p.toLowerCase())===t.toLowerCase())return!0;break}})}function O_(t){const n=window.atob(t),e=n.length,i=new Uint8Array(e);for(let r=0;r ")}function so(t){var n;return(n=String(t))==null?void 0:n.toLowerCase().match(wL)}function fc(t,n){const e=`${Ah.SMALL_FONT} `;return t===Fl.SCANNING_IN_PROGRESS?e+n+Ah.IN_PROGRESS:t===Fl.SUCCESSFULLY_SCANNED?e+n+Ah.COMPLETED:t===Fl.VIRUS_FOUND?e+n+Ah.CANCELLED:e}function dc(t){switch(t){case Fl.SCANNING_IN_PROGRESS:return"document_management.scanning_in_progress";case Fl.SUCCESSFULLY_SCANNED:return"document_management.successfully_scanned";case Fl.VIRUS_FOUND:return"document_management.virus_found";default:return ft}}function w3(t,n){return t.forEach(e=>{var i,r,o;if((i=e.name)!=null&&i.includes(n)){const s=(r=e.name)==null?void 0:r.match(new RegExp(`^(${n})(-\\d+)?(\\.xlsx)$`));if(s){const l=s[1],a=s[2]?parseInt((o=s[2])==null?void 0:o.slice(1))+1:1;n=`${l}-${a}`}}}),n}function TU(t){return[{value1:t==null?void 0:t.company,value2:tn(t==null?void 0:t.name),value3:as(t==null?void 0:t.createdDate)},{value1:"",value2:tn(t==null?void 0:t.name),value3:""},{value1:"",value2:tn(t==null?void 0:t.owner),value3:""},{value1:"",value2:"",value3:""},{value1:"",value2:"",value3:""}]}function y3(t){const n=[];n.push([]);const e=TU(t);return TL.forEach((i,r)=>{const o=[];for(let s=0;sll),{Workbook:i}=e,r=await fetch(t);ve.info("after fetching file",r);const o=await r.blob();ve.info("blob",o);const s=await o.arrayBuffer();ve.info("arrayBuffer",s);const l=new i;await l.xlsx.load(s);const a=l.worksheets[0],c=[],d=(n=a.getRow(1).values)==null?void 0:n.slice(1);return a.eachRow((f,p)=>{var g;if(p===1)return;const m={};(g=f.values)==null||g.slice(1).forEach((h,_)=>{const b=d==null?void 0:d[_];b&&(m[b]=h)}),c.push(m)}),ve.info("V&A: info: fetching and parsing multiple scheduler filesdata :: DocumentsTable.svelte :: fetchAndParseFile"),c}catch(e){return ve.error("V&A: error: DocumentsTable.svelte :: fetchAndParseFile",e),[]}}function CU(t,n){const e=t.addRow(n.map(r=>typeof r===Vs&&"header"in r?r.header:r));let i=0;n.forEach((r,o)=>{var s,l;if(typeof r===Vs&&"header"in r){const a=e.getCell(o+1);r.font&&(a.font=r.font),r.border&&(a.border=r.border);const c=e.number;r.alignment&&(a.alignment=r.alignment),r.mergeCells&&t.mergeCells(c,(s=r.mergeCells)==null?void 0:s.startColNumber,c,(l=r.mergeCells)==null?void 0:l.endColNumber),r.rowHeight&&(i=r.rowHeight)}}),i&&(e.height=i)}function EU(t,n,e){var i;if((i=t.partIds)!=null&&i.includes(n.id)){for(const r in e)if(e[r]&&e[r]===(n.productRef||n.productId))return!0;return!1}return!1}function S3(t,n,e,i){let r=!1,o=[];const s=Ao(i.bom,[]);for(const l of t)if(Array.isArray(l))CU(n,l);else if(typeof l===Vs&&!Array.isArray(l)){l.Qty=0;const a=Object.keys(l).indexOf("Qty"),c=3;if(e.forEach(d=>{d.partIds&&s.forEach(f=>{EU(d,f,l)&&(l.Qty=f.quantity)})}),!r){o=Array.from(new Set(t.flatMap(p=>typeof p===Vs&&!Array.isArray(p)&&!("header"in p)?Object.keys(p):[])));const[d]=o.splice(a,1);o.splice(c,0,d),o.push("List Price"),o.push(""),o.push("Specification Sheet"),o.push("Installation Instructions"),o.push("Image"),n.addRow(o).eachCell(p=>{p.font={bold:!0}}),r=!0}const u=o.map(d=>l[d]??"");n.addRow(u)}try{n.views=[{state:"frozen",xSplit:9,ySplit:0}]}catch(l){ve.error("error in freezing excel column"+l)}}function IU(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),projectId:i};return Pn(r,o)}async function AU(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),projectId:i};return Pn(r,o)}async function OU(t,n,e,i,r,o){const s=i+r+t+"/"+e+(o?s2:""),l={method:er.GET,unsecure:!1,apigeeTokenWithoutBearer:n,projectId:e},a=ar(l);return Pn(s,a)}async function PU(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),projectId:i};return Pn(r,o)}async function NU(t,n,e){const i={method:er.PUT,unsecure:!1,body:t,headers:e};return Yu(n,i)}async function LU(t,n,e,i,r,o,s){const l=e+"/"+i,a={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),country:r,language:o,projectId:s};return Pn(l,a)}async function jU(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),projectId:i};return Pn(r,o)}async function T3(t,n,e,i,r){const o=e+i,s={method:er.PATCH,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),projectId:r};return Pn(o,s)}async function RU(t,n,e,i,r){const o=n+e+i,s={method:er.POST,unsecure:!1,body:JSON.stringify(t),projectId:r};return Pn(o,s)}async function MU(t,n,e,i){const r=e+Xv+Kv,o={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:t,body:JSON.stringify({projectId:n,name:i}),projectId:n};return Pn(r,o)}async function qU(t,n,e,i,r,o){const s=e+i+r,l={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),projectId:o};return Pn(s,l)}async function DU(t,n,e,i,r,o){const s=e+i+r+Io+o,l={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),projectId:o};return Pn(s,l)}async function BU(t,n,e,i,r,o){const s=e+i+encodeURIComponent(r)+Io+o+Jv,l={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),projectId:o};return Pn(s,l)}async function UU(t,n,e,i,r,o,s){const l=`${i}${r}/${e}/${n}`,a={method:er.PATCH,unsecure:!1,apigeeTokenWithoutBearer:t,body:JSON.stringify({ttl:o}),projectId:s};return Pn(l,a)}async function P_(t,n,e,i,r){try{xs(!1);let o=await IU(t,n,e,r);if(o.hasError)ol(ks(o,i)),o=o;else return o.data}catch(o){ve.error("document management.task :: add new folder: error:: ",o)}}async function zU(t,n,e,i,r,o){try{xs(!1);let s=await T3(t,n,e,i,o);if(s.hasError)ol(ks(s,r)),s=s;else return s.data}catch(s){ve.error("document management.task :: rename file error :: ",s),ol(s)}}async function Or(t,n,e,i,r,o=!1){try{let s=await OU(t,n,e,i,r,o);if(s.hasError)s=s;else return s.data.map(l=>{l.name=tn(String(l.name))}),s.data}catch(s){ve.error("document management.task :: fetch docs error:: ",s)}}async function np(t,n,e,i){try{let r=await PU(t,n,e,i);if(r.hasError)r=r,ol(r.message);else return r.data}catch(r){ve.error("document management.task :: upload documents to project builder error:: ",r)}}async function $m(t,n,e){try{return await NU(t,n,e)}catch(i){ve.error("document management.task :: upload documents using presigned url:error::",i)}}async function FU(t,n,e,i){try{let r=await AU(t,n,e,i);return r.hasError?(r=r,ve.error("Document management download.task :: file download :: ",r.message)):r=r.data,r}catch(r){ve.error("document management.task :: save documents to project builder error:: ",r)}}async function N_(t,n,e,i,r,o,s){try{ka.set(!1);const l={productIds:t,languageCode:e.toLowerCase()===bl.EN&&i.toLowerCase()===bl.DE?bl.DE:e,countryCode:i};v3.update(()=>!1);let a=await LU(l,n,r,o,e,i,s);if(a.hasError)a=a,ve.error("Document management download.task :: file download :: ",a.message),qa.update(()=>!1);else return ve.info("document management.task :: file download :: ",a),a.data}catch(l){ve.error("document management.task :: download documents from project builder error:: ",l)}}async function ip(t,n,e,i){try{xs(!1);let r=await jU(t,n,e,i);r.hasError?(r=r,Wt.update(()=>!1)):r=r.data}catch(r){ve.error("document management.task :: delete documents from project builder error:: ",r)}}async function C3(t,n,e,i,r){try{let o=await RU(t,n,e,i,r);if(o.hasError)o=o;else return o.data}catch(o){Wt.update(()=>!1),ve.error("project bom.task :: fetch docs error:: ",o)}}function fa(t){xs(!0),ac.set(t2),lc.set(t)}function E3(t){xs(!0),ac.set(n2),lc.set(t)}function ol(t){xs(!0),ac.set(e2),lc.set(t)}function xs(t){Vm.set(t)}function ru(t){for(let n=0;nt)}function da(t){let n=ft;return(t==null?void 0:t.indexOf(ai))>0?n=t.replace(ai,kr):n=t,n}async function xU(t,n,e,i){try{let r=await MU(t,n,e,i);if(r.hasError)r=r;else return r.data.Items}catch(r){ve.error("project bom.task :: search docs error:: ",r)}}async function GU(t,n,e,i,r,o){const s=await qU(t,n,e,i,r,o);if(s.hasError)throw new Error(String(s==null?void 0:s.message));return Ym.update(()=>s.data),s.data}async function HU(t,n,e,i,r,o){const s=await DU(t,n,e,i,r,o);if(s.hasError)throw new Error(String(s==null?void 0:s.message));return Uo.update(()=>{var l,a;return(a=(l=s==null?void 0:s.data)==null?void 0:l.Attributes)==null?void 0:a.restrictUser}),s.data}async function WU(t,n,e,i,r,o){const s=await BU(t,n,e,i,r,o);if(s.hasError)throw new Error(String(s==null?void 0:s.message));return Uo.update(()=>{var l,a;return(a=(l=s==null?void 0:s.data)==null?void 0:l.Attributes)==null?void 0:a.restrictUser}),s.data}async function VU(t,n,e,i,r,o,s){try{const l=await UU(t,n,e,i,r,o,s);if(l.hasError)throw l;return l.data.Items}catch(l){ve.error("document-management.task :: save ttl value error:: ",l)}}async function rp(t,n,e,i,r){try{xs(!1);let o=await T3(t,n,e,i,r);if(o!=null&&o.hasError)throw o=o,new Error(String(o));return o.data}catch(o){ve.error("document management.task :: mark favourite file error :: ",o),ol(String(o))}}async function YU(t,n,e,i){let r=0;const o=15,s=l=>new Promise(a=>setTimeout(a,l));for(;r0)return l;r++,ve.info(`Attempt ${r} failed, retrying in 7 seconds...`),await s(7e3)}throw ve.info("pooling error"),{statusCode:504}}async function L_(t,n,e){const i=await fetch(`${t}/sc/configurations/downloadpersistedzip/${n}`,{method:"GET",headers:{Authorization:`Bearer ${e}`}});return i.ok?await i.blob():null}function ZU(t,n){const e=[];if(t&&n){const i=new Headers,r=t.filename.split(Xs).pop();i.append(ld,xc[r.toUpperCase()]),e.push($m(t==null?void 0:t.fileData,n,i))}}async function j_(t,n,e,i,r){try{const s=await(await Promise.resolve().then(()=>f1)).default.loadAsync(t),l=[];for(const c in s.files)if(c.startsWith("Scheduler")&&c.endsWith(".xlsx")){const u=await s.files[c].async("blob"),d=new Promise(function(f){let p;const m=new FileReader;m.readAsDataURL(u),m.onload=g=>{const _=g.target.result.toString().split(",")[1];p=O_(_),f({filename:i,file:u,fileData:p})}});l.push(d)}const a=Zr;Promise.all(l).then(c=>{c.forEach(u=>{const d={parentId:a,projectId:e,fileName:u.filename,filePath:Zr,isFileScanningNotRequired:!0,isVA:!0,VAconfigId:n};r&&(d.partIds=r),np(d,We.basePath,li.UPLOAD_API,e).then(f=>{f&&ZU(u,f)})})})}catch(o){ve.info("Error handling ZIP:",o)}}let Ss={};function su(t){return(t==null?void 0:t.trim().toLowerCase())===yN.toLowerCase()||(t==null?void 0:t.trim().toLowerCase())===pg.toLowerCase()}function R_(t,n,e,i,r){var o,s,l;if(Ss={},n!==eA?(Ss={id:Te,name:n??Te,groups:[],parts:[]},e!==Te?(e1(Ss.groups,Te,e,Te),O3(Ss.groups[0]),e1(Ss.groups[0].groups,Te,i,r)):e1(Ss.groups,Te,i,r)):e!==Te?(Ss={id:Te,name:e,groups:[],parts:[]},e1(Ss.groups,Te,i,r)):i!==void 0&&i!==""&&(Ss={id:Te,name:i,configurationMasterId:r,groups:[],parts:[]}),((s=(o=t==null?void 0:t.bom)==null?void 0:o.groups)==null?void 0:s.length)>0){Ss.groups[0].groups=[],Ss.groups[0].groups=JU((l=t==null?void 0:t.bom)==null?void 0:l.groups),ve.info("Groups in Hierarchical Order : ",Ss.groups[0].groups);const a={id:Ss.id,name:Ss.name,groups:[],parts:[]},c=Of(t,a);return ve.info("convertedPartData: ",c),A3(Ss.groups,a.parts),Ss}return Of(t,Ss)}function I3(t,n,e,i=""){var o,s,l,a,c,u;let r=!1;if(((s=(o=t==null?void 0:t.bom)==null?void 0:o.groups)==null?void 0:s.length)>0){let d=!1;t.bom.groups.forEach(f=>{var p,m,g;if(!r&&f.name===e)if(d=!0,((p=f==null?void 0:f.groups)==null?void 0:p.length)>0){let h=!1;if(i!==""){let _=!1;f.groups.forEach(b=>{b.name===i&&(_=!0,b.groups.forEach(y=>{if(y.name===n.groups[0].groups[0].name){h=!0;const k=qo(f,String(y.name),fs,Ws);b.groups[0].name=k,b.groups.unshift(n.groups[0].groups[0]),r=!0}}),h||(f==null||f.groups.unshift(n.groups[0].groups[0]),r=!0))}),_||(f==null||f.groups.unshift(n.groups[0]),r=!0)}else f.groups.forEach(_=>{if(_.name===n.groups[0].name){h=!0;const b=qo(f,String(n.groups[0].name),fs,Ws);n.groups[0].name=b,f.groups.unshift(n.groups[0]),r=!0}}),h||(f==null||f.groups.unshift(n.groups[0]),r=!0)}else if(((m=n==null?void 0:n.groups)==null?void 0:m.length)>0)f.groups=[],f==null||f.groups.unshift(n.groups[0]),r=!0;else{const h=qo(t==null?void 0:t.bom,String(f.name),fs,Ws);n.name=h,(g=t==null?void 0:t.bom)==null||g.groups.unshift(n),r=!0}}),d||(l=t==null?void 0:t.bom)==null||l.groups.unshift(n)}else t.bom=(c=(a=t.bom)==null?void 0:a.parts)!=null&&c.length?{groups:[n],parts:(u=t.bom)==null?void 0:u.parts}:{groups:[n]}}function A3(t,n){t.forEach(e=>{var i;((i=e==null?void 0:e.groups)==null?void 0:i.length)>0&&A3(e==null?void 0:e.groups,n),n.forEach(r=>{e.id===r.groupId&&e.parts.push(r)})})}function O3(t){t!=null&&t.groups?O3(t.groups[0]):t.groups=[]}function e1(t,n,e,i){t.unshift({id:n,name:e,configurationMasterId:i})}function Of(t,n){var e,i,r;return((i=(e=t==null?void 0:t.bom)==null?void 0:e.products)==null?void 0:i.length)>0&&(((r=n==null?void 0:n.groups)==null?void 0:r.length)>0?Of(t,n.groups[0]):(n.parts=[],XU(t,n))),n}function XU(t,n){var e;(e=t==null?void 0:t.bom)==null||e.products.forEach((i,r)=>{KU(t,n,i,n.parts,i.partType==="cto"?Ei.CTO:Ei.NON_CTO)})}function KU(t,n,e,i,r){var o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,I,N;if(i.push({productRef:null,extras:((o=t==null?void 0:t.bom)==null?void 0:o.extras)||{},partType:(e==null?void 0:e.partType)==="cto"?Ei.CTO:Ei.NON_CTO,partSubType:(e==null?void 0:e.partType)==="cto"?(s=e.orderingData)!=null&&s.productCode&&((l=e.orderingData)==null?void 0:l.productCode)!==""?Ei.CONFIGURABLE:Ei.CUSTOMIZABLE:Ei.DEFAULT,productId:(a=e.orderingData)!=null&&a.orderingId&&((c=e.orderingData)==null?void 0:c.orderingId)!==""?e==null?void 0:e.productId.substring(3):e==null?void 0:e.productId,description:e==null?void 0:e.description,freezeItem:String(e==null?void 0:e.freezeItem),isParent:e!=null&&e.isParent?!!e.isParent:!1,quantity:Number(e==null?void 0:e.quantity),kbId:e==null?void 0:e.kbId,groupId:e==null?void 0:e.groupId,reloadData:{reloadSolution:(u=e==null?void 0:e.reloadData)==null?void 0:u.reloadSolution,reloadConfiguration:String((d=e==null?void 0:e.reloadData)==null?void 0:d.reloadConfiguration),reloadConfigurationIdSandC:(f=e==null?void 0:e.reloadData)==null?void 0:f.reloadConfigurationIdSandC},orderingData:{orderingId:(p=e==null?void 0:e.orderingData)==null?void 0:p.orderingId,hive2:(m=e==null?void 0:e.orderingData)==null?void 0:m.hive2,hive2Url:(g=e==null?void 0:e.orderingData)==null?void 0:g.hive2Url,productCode:(h=e==null?void 0:e.orderingData)==null?void 0:h.productCode,edi:(_=e==null?void 0:e.orderingData)==null?void 0:_.edi},price:e.price?Number((b=e==null?void 0:e.price)==null?void 0:b.value):0,cost:{overwriteCost:(y=e==null?void 0:e.cost)!=null&&y.overwriteCost?!!((k=e==null?void 0:e.cost)!=null&&k.overwriteCost):!1,value:(T=e==null?void 0:e.cost)!=null&&T.value?Number((R=e==null?void 0:e.cost)==null?void 0:R.value):0,currency:(O=e==null?void 0:e.cost)==null?void 0:O.currency,source:"",costDate:""},freeText:e==null?void 0:e.freeText,customization:{configuredReference:(j=e==null?void 0:e.customization)==null?void 0:j.configuredReference,custom_configuredReference1:(q=e==null?void 0:e.customization)==null?void 0:q["custom-configuredReference1"],custom_configuredReference2:(M=e==null?void 0:e.customization)==null?void 0:M["custom-configuredReference2"]},selector:{technology:(z=e==null?void 0:e.selector)==null?void 0:z.technology,dataId:(D=e==null?void 0:e.selector)==null?void 0:D.dataId,project:(P=e==null?void 0:e.selector)==null?void 0:P.project,country:(L=e==null?void 0:e.selector)==null?void 0:L.country,language:(C=e==null?void 0:e.selector)==null?void 0:C.language},hive2:(S=e==null?void 0:e.orderingData)==null?void 0:S.hive2,...Yn()&&{configCharacteristicGroup:e==null?void 0:e.configCharacteristicGroup}}),e.isParent&&e.isParent===!0&&((I=e==null?void 0:e.subparts)==null?void 0:I.length)>0){const E=i.length-1;i[E].parts=[],(N=e==null?void 0:e.subparts)==null||N.forEach((B,U)=>{var H;i[E].parts.push({isParent:!1,partType:Ei.DEFAULT,productRef:null,productId:B==null?void 0:B.productId,quantity:Number(B==null?void 0:B.quantity),description:B==null?void 0:B.description,price:B.price?Number((H=B==null?void 0:B.price)==null?void 0:H.value):0})})}}function JU(t){const n=new Map;t.forEach(i=>{n.set(i.id,{...i,name:i.groupName,parts:[],groups:[]})});const e=[];return t.forEach(i=>{i.parentGroupId&&i.parentGroupId!=="0"?n.get(i.parentGroupId).groups.push(n.get(i.id)):e.push(n.get(i.id))}),e}async function pc(t,n,e,i,r,o){var _,b,y,k,T,R,O,j,q,M,z,D,P;ve.info("Standlone: Configurator Event Data in createObjectForBom function :: ",n);const s=n!=null&&n.detail?n.detail:n,l=s==null?void 0:s.payload,a=(s==null?void 0:s.type)===Su.EASY?(l==null?void 0:l.easyData)||l||s.easyData:P3(l||s);if(ve.info("Converted easy data from OL",a),a===null)return;a!=null&&a.selection?(a.selection={configurationMasterId:((_=s==null?void 0:s.grouping)==null?void 0:_.configurationMasterId)??Te},(b=a.groupsName)!=null&&b.length&&(a.selection.brickDetails=a.groupsName)):(a.selection={},a.selection=(y=s==null?void 0:s.selection)!=null&&y.brickDetails?{brickDetails:s.selection.brickDetails}:{configurationMasterId:((k=s==null?void 0:s.grouping)==null?void 0:k.configurationMasterId)??Te});const u=(((T=a.bom)==null?void 0:T.products)||[])[0]||{},d=(R=u.orderingData)==null?void 0:R.orderingId;if(Yn()&&d){const L=await Am(d,e);if(L.hasError!==!0){const C=u||{};C.configCharacteristicGroup=A_(L==null?void 0:L.characteristicGroups)}}const f=su(u.applicationSource),p=((O=a.selection)==null?void 0:O.brickDetails)||[],m=R_(a,f?u.applicationSource:p[0]??null,f?Te:p.length>=1?p[1]:Te,u.name,a.selection.configurationMasterId??Te);ve.info("Easy to Group ::",m);const g=f?u.applicationSource:m!=null&&m.name?m==null?void 0:m.name:u.name;let h="";if(((j=a==null?void 0:a.bom)==null?void 0:j.isCto)===Dc&&((q=m==null?void 0:m.parts[0])!=null&&q.parts)&&((D=(z=(M=a==null?void 0:a.bom)==null?void 0:M.products[0])==null?void 0:z.orderingData)!=null&&D.orderingId)){const L=a.bom.products[0].orderingData.orderingId;c_(m.parts,a.bom.products[0].orderingData.orderingId),L_(i,L,r).then(C=>{C&&(h=`CONFIG_${L}.xlsx`,j_(C,L,t.id,h))})}M_(t,m,g,((P=a.selection)==null?void 0:P.configurationMasterId)||d,o)}function t1(t){ve.info("Standlone: Configurator Event Data in createObjectForBom function :: ",t);const n=t!=null&&t.detail?t.detail:t,e=n==null?void 0:n.payload,i=(n==null?void 0:n.type)===Su.EASY?(e==null?void 0:e.easyData)||e||n.easyData:P3(e||n);return ve.info("Converted easy data from OL",i),i===null?{}:i}function P3(t){var o;$U(t);const n=t!=null&&t.application_name&&(t==null?void 0:t.application_name)!==""?Su.EASY_IN:Su.SC,e=Su.EASY,i=aw(n,t);let r=null;if(i!=null&&i.success)ve.info("Validation succeesed from OL"),Yn()?mf("caller","UC"):mf("caller",""),r=(o=tM(t,e))==null?void 0:o.data;else{const s=QU(i==null?void 0:i.error);ve.info("Validation failed from OL. Validation result: "+JSON.stringify(i)),Mi(s)}return r}function QU(t){let n="";return t==null||t.forEach(e=>{var i;(i=e==null?void 0:e.path)!=null&&i.join&&(n+=e.path.join("->")+", ")}),n}function $U(t){var n,e,i;t.applicationSource=(t==null?void 0:t.application_name)??((n=t==null?void 0:t.extras)==null?void 0:n.pluginId)??((e=t==null?void 0:t.options)==null?void 0:e.source)??(t==null?void 0:t.applicationSource)??Te,t.configurationId=(t==null?void 0:t.configurationId)??Te,(i=t==null?void 0:t.products)==null||i.map(r=>{var o,s;r.name=(t==null?void 0:t.name)??((o=t==null?void 0:t.grouping)==null?void 0:o.displayName)??((s=t==null?void 0:t.extras)==null?void 0:s.configurationName)??Te})}function M_(t,n={},e,i,r){var o,s,l;t!=null&&t.bom||(t.bom={groups:[],parts:[]}),(r===Dn.EAB||t.platform===Dn.EAB)&&(t.bom={}),e===void 0||e===null&&!n.groups&&((o=n.parts)!=null&&o.length)?(t.bom||(t.bom={parts:[]}),t.bom.parts=sp(n.parts,t.bom.parts)):((s=t.bom.groups)==null?void 0:s.length)===0&&Yn()?t.bom=t.bom.parts?{groups:[n],parts:t.bom.parts}:{groups:[n]}:i?(l=t.bom.groups)!=null&&l.length?ez(i,t.bom.groups,n):t.bom=t.bom.parts?{groups:[n],parts:t.bom.parts}:{groups:[n]}:I3(t,n,e)}function ez(t,n,e){N3(t,n,e)}function N3(t,n,e){var s,l,a;const i=n==null?void 0:n.findIndex(c=>c.name===e.name),r=n==null?void 0:n.findIndex(c=>(c==null?void 0:c.configurationMasterId)===t);let o=!1;if(r>=0&&i>=0){n[r].parts=(s=e==null?void 0:e.parts)==null?void 0:s.map(c=>{var d;const u=(d=n[r].parts)==null?void 0:d.find(f=>f.productId===c.productId);return u?{...c,quantity:c.quantity+u.quantity}:c}),o=!0;return}if(!o)if(i>=0)if(!((a=(l=n[i])==null?void 0:l.groups)!=null&&a.length)&&r===-1){tz(n,e);return}else N3(t,n[i].groups,e.groups[0]);else n==null||n.unshift(e)}function tz(t,n){let e;const i=t.filter(r=>{var l,a,c;const o=(l=r==null?void 0:r.name)==null?void 0:l.split(Ws),s=o[o.length-1];return isNaN(parseInt(s))?(e=n.name,(c=r==null?void 0:r.name)==null?void 0:c.includes(n.name)):(e=n.name.slice(0,-s.length-1),(a=r==null?void 0:r.name)==null?void 0:a.includes(n.name.slice(0,-s.length-1)))});if(i.length>0&&i.sort((r,o)=>{if(r.name===e)return-1;if(o.name===e)return 1;const s=r.name.match(Ep),l=o.name.match(Ep);if(s!==null&&l!==null){const a=parseInt(s==null?void 0:s[0]),c=parseInt(l==null?void 0:l[0]);return a-c}else return-1}),i.length!==0){const r=h_(i[i.length-1]);n.name=r,t==null||t.unshift(n)}}function L3(t,n){const e=structuredClone(n)||{};return e.groups=R3(t.groups,e.groups),e}function j3(t){var i,r;const n=(i=t.orderingData)==null?void 0:i.orderingId,e=(r=t.orderingData)==null?void 0:r.productCode;return n&&e?`ordering:${n}|${e}`:`productId:${t.productId||t.productRef}`}function sp(t=[],n=[]){const e=new Map;for(const i of n){const r=j3(i);e.set(r,{...i})}for(const i of t){const r=j3(i);if(e.has(r)){const o=e.get(r);r.startsWith("ordering:")&&(o!=null&&o.parts)&&(i!=null&&i.parts)&&(o.parts=sp(o.parts,i.parts)),o.quantity=Number(o.quantity)+Number(i.quantity)}else e.set(r,{...i})}return Array.from(e.values())}function R3(t=[],n=[]){const e=new Map(n.map(i=>[i.name,i]));for(const i of t){const r=e.get(i.name);r?(i.groups&&r.groups&&(r.groups=R3(i.groups,r.groups)),i.parts&&r.parts&&(r.parts=sp(i.parts,r.parts))):n.push(structuredClone(i))}return n}const yne="";function nz(t){Ut(t,"svelte-5e31qs",".pw.display-flex.svelte-5e31qs{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-5e31qs{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.bold-font.svelte-5e31qs{font-weight:bold}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.dialog-container.svelte-5e31qs{padding-right:48px;padding-left:16px}.close-dialog.svelte-5e31qs{display:block;margin-left:auto;margin-top:-12px;color:var(--se-medium-grey, #9fa0a4)}.bom_heading.svelte-5e31qs{color:var(--se-dark-grey, #626469);font-size:22px;margin-bottom:16px}.select-project.svelte-5e31qs{color:var(--se-dark-grey, #626469);font-size:var(--p-fontsize, 16px)}.add-to-new-project.svelte-5e31qs{color:var(--se-medium-blue, #219bfd);font-size:14px}.star.svelte-5e31qs{color:var(--se-fuchsia-red, #b10043)}.all-project.svelte-5e31qs{overflow-y:auto;padding-right:4px;height:143px;margin-top:12px}.list-project.svelte-5e31qs{padding:8px 10px 8px 15px;margin-right:5px;font-size:14px;color:var(--se-anthracite-grey, #333333)}.no-project-found.svelte-5e31qs{font-size:14px;color:var(--se-anthracite-grey, #333333)}.list-project.svelte-5e31qs:hover{background-color:var(--se-ultra-light-grey-3, #f3f2f2)}.dialog_footer.svelte-5e31qs{margin:12px 0px;margin-top:20px}.active-project.svelte-5e31qs{background-color:var(--se-ultra-light-grey-3, #f3f2f2)}.all-project.svelte-5e31qs::-webkit-scrollbar-thumb{height:46px}.all-project.svelte-5e31qs::-webkit-scrollbar{width:18px}.country-warning.svelte-5e31qs{display:flex;align-items:center;padding-top:12px}.menu-left-margin.svelte-5e31qs{margin-left:8px}")}function M3(t,n,e){const i=t.slice();return i[32]=n[e],i[34]=e,i}function iz(t){let n,e=t[2]("configurators.no_project_found")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","no-project-found svelte-5e31qs")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4&&e!==(e=r[2]("configurators.no_project_found")+"")&&be(i,e)},d(r){r&&K(n)}}}function rz(t){let n,e=Dt(t[4]),i=[];for(let r=0;re(23,i=E)),ye(t,Vt,E=>e(2,r=E)),ye(t,Vu,E=>e(24,o=E)),ye(t,Wu,E=>e(25,s=E)),ye(t,Jt,E=>e(3,l=E)),ye(t,Xi,E=>e(4,a=E));let c="",u=!1,d=!1,f=[],p,{language:m}=n,{country:g}=n,{apigeeToken:h}=n,{getConfiguratorsDetails:_}=n,{getConfiguratorsCountry:b}=n;const y=Mn();let k=!1;Un(async()=>{ve.info("getMotionConfiguratorsDetails in AddBomtoProj onMount: "+JSON.stringify(_==null?void 0:_.detail)),await gl(),Xi.set(Li),io(oz).catch(E=>{ve.error(E.message)}),e(1,k=b!==We.country)});function T(E){y("closePopupEvent",E)}function R(E){e(0,c=E.id)}function O(){c!==""&&(u=!0,z().catch(E=>{ve.error(E.message)}))}async function j(){Jt.update(()=>!0);try{e(0,c=""),e(0,c=await Vh()),d=!0,u=!1,D(),ve.info("New project created with ID: ",c)}catch(E){Jt.update(()=>!1),ve.error(E.message)}}function q(E){const B=da(E==null?void 0:E.documentId);rp({partIds:f},h,We.basePath,`${li.DOCUMENT_UPDATE_API}/${Zr}/${B}`,i.id).then(U=>{ve.info("document updated",U)}).catch(U=>{ve.error("Error in updating document",U)})}function M(){Or(Zr,h,i.id,We.basePath,li.DOCUMENT_API).then(E=>{if(ve.info("requested documents",E),E.length){const B=E.filter(U=>U.VAconfigId===p);B.length&&q(B[0])}}).catch(E=>{ve.error(E)})}async function z(){try{Jt.update(()=>!0),await ro(c),D()}catch{Jt.update(()=>!1)}}function D(){let E=JSON.parse(JSON.stringify(i));pc(E,_,void 0,s,o);let B=c;_.detail.isCto===Dc?P(E,B,_.detail.configurationId):P(E,B)}function P(E,B,U){ve.info("VnA: inside upadteAndFetchPriceBOMDetails");const H=r("edit_project.project_updated_successfully_message");Vi({bom:E.bom},B,H,ti).then(async Z=>{Jt.update(()=>!0);const V=mn(g,i),ne=gn(m,i);await ci(B,V,ne,h).then(function(W){ve.info(W)}),ve.info("VnA: outside VnA condition"),Z.data.id&&(U&&(ve.info("VnA: inside VnA condition"),e(15,f=bm(Z.data.bom,U)),e(16,p=U)),ve.info("VnA: before isLoading update false"),Jt.update(()=>!1),T({productAdded:u,selectedProjectId:c,newProjectCreated:d}))}).finally(()=>{Jt.update(()=>!1),ve.info("Project updated for with ID: ",B);let Z=new CustomEvent(rg,{detail:{eventSource:"PB_FROM_HMC",bomUpdate:!0}});ve.info("BOM_UPDATED to be called"),window.dispatchEvent(Z)})}function L(E){ws.set(E)}Kn(()=>{L(!1),Xi.set(Li)});const C=()=>{T({productAdded:!1})},S=E=>{R(E)},I=()=>{O()},N=()=>{T({productAdded:!1})};return t.$$set=E=>{"language"in E&&e(9,m=E.language),"country"in E&&e(10,g=E.country),"apigeeToken"in E&&e(11,h=E.apigeeToken),"getConfiguratorsDetails"in E&&e(12,_=E.getConfiguratorsDetails),"getConfiguratorsCountry"in E&&e(13,b=E.getConfiguratorsCountry)},t.$$.update=()=>{t.$$.dirty[0]&98304&&(f!=null&&f.length||p)&&M()},[c,k,r,l,a,T,R,O,j,m,g,h,_,b,L,f,p,C,S,I,N]}class lz extends Ot{constructor(n){super(),At(this,n,az,sz,It,{language:9,country:10,apigeeToken:11,getConfiguratorsDetails:12,getConfiguratorsCountry:13,setSnackbarVisibility:14},nz,[-1,-1])}get setSnackbarVisibility(){return this.$$.ctx[14]}}const kne="";function cz(t){Ut(t,"svelte-xow9zx",".dialog-bom-project.svelte-xow9zx{z-index:11000;position:absolute}")}function B3(t){let n,e,i;return e=new lz({props:{apigeeToken:t[3],language:t[0],country:t[1],getConfiguratorsDetails:t[2],getConfiguratorsCountry:t[6]}}),e.$on("closePopupEvent",t[7]),{c(){n=A("se-dialog-content"),De(e.$$.fragment)},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o&8&&(s.apigeeToken=r[3]),o&1&&(s.language=r[0]),o&2&&(s.country=r[1]),o&4&&(s.getConfiguratorsDetails=r[2]),o&64&&(s.getConfiguratorsCountry=r[6]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function uz(t){let n,e,i=t[5]&&B3(t);return{c(){n=A("se-dialog"),i&&i.c(),w(n,"page-scroll","false"),w(n,"can-backdrop","false"),w(n,"size","medium"),w(n,"class","dialog-bom-project svelte-xow9zx")},m(r,o){J(r,n,o),i&&i.m(n,null),t[10](n),e=!0},p(r,[o]){r[5]?i?(i.p(r,o),o&32&&Q(i,1)):(i=B3(r),i.c(),Q(i,1),i.m(n,null)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(),t[10](null)}}}function fz(t,n,e){let{language:i}=n,{country:r}=n,{dataConfig:o}=n,{apigeeToken:s}=n,{apigeeUrl:l}=n,{viteOcmCaseUrl:a}=n,c,u=!1,d,f;const p=Mn();Un(()=>{We.initializeExternalUrls([l,a]),m()});function m(){var b;e(4,c.open=!0,c),e(5,u=!0),e(6,f=(b=o==null?void 0:o.detail)==null?void 0:b.country)}function g(b){Ya.update(()=>!1),e(4,c.open=!1,c),d=b.detail,(b.detail.productAdded||b.detail.newProjectCreated)&&h()}function h(){p("configuratorsProductAdded",{projectId:String(d.selectedProjectId),getProductAddedDetails:d})}function _(b){_t[b?"unshift":"push"](()=>{c=b,e(4,c)})}return t.$$set=b=>{"language"in b&&e(0,i=b.language),"country"in b&&e(1,r=b.country),"dataConfig"in b&&e(2,o=b.dataConfig),"apigeeToken"in b&&e(3,s=b.apigeeToken),"apigeeUrl"in b&&e(8,l=b.apigeeUrl),"viteOcmCaseUrl"in b&&e(9,a=b.viteOcmCaseUrl)},[i,r,o,s,c,u,f,g,l,a,_]}class dz extends Ot{constructor(n){super(),At(this,n,fz,uz,It,{language:0,country:1,dataConfig:2,apigeeToken:3,apigeeUrl:8,viteOcmCaseUrl:9},cz)}}const Sne="";function pz(t){Ut(t,"svelte-1wx3yun",".pw.display-flex.svelte-1wx3yun{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1wx3yun{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.bold-font.svelte-1wx3yun{font-weight:bold}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.dialog-container.svelte-1wx3yun{padding-right:48px;padding-left:16px}.bom_heading.svelte-1wx3yun{color:var(--se-dark-grey, #626469);font-size:22px;margin-bottom:4px;padding:5px;border-bottom:solid 1px black}.select-project.svelte-1wx3yun{color:var(--se-dark-grey, #626469);font-size:var(--p-fontsize, 16px)}.star.svelte-1wx3yun{color:var(--se-fuchsia-red, #b10043)}.all-project.svelte-1wx3yun{overflow-y:auto;padding-right:4px;height:143px;margin-top:12px}.list-project.svelte-1wx3yun{padding:8px 10px 8px 15px;margin-right:5px;font-size:14px;color:var(--se-anthracite-grey, #333333)}.no-project-found.svelte-1wx3yun{font-size:14px;color:var(--se-anthracite-grey, #333333)}.list-project.svelte-1wx3yun:hover{background-color:var(--se-ultra-light-grey-3, #f3f2f2)}.dialog_footer.svelte-1wx3yun{margin:12px 0px;margin-top:20px}.active-project.svelte-1wx3yun{background-color:var(--se-ultra-light-grey-3, #f3f2f2)}.all-project.svelte-1wx3yun::-webkit-scrollbar-thumb{height:46px}.all-project.svelte-1wx3yun::-webkit-scrollbar{width:18px}")}function U3(t,n,e){const i=t.slice();return i[33]=n[e],i[35]=e,i}function hz(t){let n,e=t[1]("generic.no_project_found")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","no-project-found svelte-1wx3yun")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&2&&e!==(e=r[1]("generic.no_project_found")+"")&&be(i,e)},d(r){r&&K(n)}}}function mz(t){let n,e=Dt(t[2]),i=[];for(let r=0;re(23,i=E)),ye(t,Vt,E=>e(1,r=E)),ye(t,yg,E=>e(2,o=E));let{projectPage:s}=n,{page:l}=n,{redirectedFromPlatform:a}=n,{anonymousProjectId:c}=n,{language:u}=n,{country:d}=n,{apigeeToken:f}=n,{isProjectConversionSnackbar:p}=n,{action:m}=n,g=`${d.toLowerCase()}`,h=localStorage.getItem(g),_="",b,y;function k(){Promise.resolve().then(()=>OC)}function T(E){e(0,_=E.id)}function R(){_!==""&&j().catch(E=>{ve.error(E.message)})}async function O(){{const E=String(c)+Wp;Em(E,{platform:a,isPB:!0}).then(U=>{Za.update(()=>!1),e(6,l=So),h=String(U==null?void 0:U.id),Ar(`${lr}${s}/${String(h)}`),k()}).catch(U=>{Za.update(()=>!1),e(6,l=Sc),e(7,p=!0),Ar(`${lr}${s}`)}),await C(m,a,c)}}async function j(){try{await ro(_),b=i,M(),Za.update(()=>!1)}catch{Jt.update(()=>!1)}}async function q(){var E;try{const B=String(c)+Wp+Vb+"true";y=(E=(await Em(B,{platform:a}))[0])==null?void 0:E.bom}catch{}}async function M(){await q(),y?(Jt.update(()=>!0),z(),P(b,_),Jt.update(()=>!1),Za.update(()=>!1),await dr({action:N0,subaction:EA,platform:a,anonymousProjectId:c,projectId:_,user:L0})):(Za.update(()=>!1),Jt.update(()=>!1),Ar(`${lr}${s}/${String(_)}`))}function z(){var E,B,U;if(b.description="",b.owner="",b.company="",y!=null&&y.parts)if((E=b==null?void 0:b.bom)!=null&&E.parts){const H=bf((B=b==null?void 0:b.bom)==null?void 0:B.parts.concat(y==null?void 0:y.parts));b.bom.parts=[...H]}else b.bom.parts=y==null?void 0:y.parts;y!=null&&y.groups&&((U=b==null?void 0:b.bom)!=null&&U.groups?y.groups.forEach(H=>{D(H.name)}):b.bom.groups=y==null?void 0:y.groups)}function D(E){var Z,V,ne,W,re;let B;const U=(Z=b==null?void 0:b.bom)==null?void 0:Z.groups.filter(G=>{var le,ue,ee;const F=(le=G==null?void 0:G.name)==null?void 0:le.split(Ws),X=F[F.length-1];return isNaN(parseInt(X))?(B=E,(ee=G==null?void 0:G.name)==null?void 0:ee.includes(E)):(B=E.slice(0,-X.length-1),(ue=G==null?void 0:G.name)==null?void 0:ue.includes(E.slice(0,-X.length-1)))});U.length>0&&U.sort((G,F)=>{var ue,ee,$,he;if(G.name===B)return-1;if(F.name===B)return 1;const X=parseInt((ee=(ue=G.name)==null?void 0:ue.match(Ep))==null?void 0:ee[0]),le=parseInt((he=($=F.name)==null?void 0:$.match(Ep))==null?void 0:he[0]);return X-le});const H=y.groups.findIndex(G=>G.name===E);if(U.length!==0){const G=h_(U[U.length-1]);y.groups[H].name=G,(ne=(V=b==null?void 0:b.bom)==null?void 0:V.groups)==null||ne.unshift(y.groups[H])}else(re=(W=b==null?void 0:b.bom)==null?void 0:W.groups)==null||re.unshift(y.groups[H])}function P(E,B){const U=r("edit_project.project_updated_successfully_message");Vi({bom:E.bom},B,U,ti).then(async H=>{var W;Jt.update(()=>!0);const Z=mn(d,i),V=gn(u,i);await ci(B,Z,V,f).then(function(re){ve.info(re)}),e(6,l=So);const ne=String((W=H==null?void 0:H.data)==null?void 0:W.id);k(),Ar(`${lr}${s}/${String(ne)}`)}).catch(()=>{e(6,l=Sc),e(7,p=!0),Ar(`${lr}${s}`)}).finally(()=>{ve.info("Project updated for with ID: ",B)})}function L(E){ws.set(E)}async function C(E,B,U){const H=ss(N0,E,B,void 0,U,void 0,void 0,L0);await dr(H)}Kn(()=>{L(!1)});const S=E=>{T(E)},I=()=>{R()},N=()=>{O()};return t.$$set=E=>{"projectPage"in E&&e(8,s=E.projectPage),"page"in E&&e(6,l=E.page),"redirectedFromPlatform"in E&&e(9,a=E.redirectedFromPlatform),"anonymousProjectId"in E&&e(10,c=E.anonymousProjectId),"language"in E&&e(11,u=E.language),"country"in E&&e(12,d=E.country),"apigeeToken"in E&&e(13,f=E.apigeeToken),"isProjectConversionSnackbar"in E&&e(7,p=E.isProjectConversionSnackbar),"action"in E&&e(14,m=E.action)},[_,r,o,T,R,O,l,p,s,a,c,u,d,f,m,L,S,I,N]}class bz extends Ot{constructor(n){super(),At(this,n,_z,gz,It,{projectPage:8,page:6,redirectedFromPlatform:9,anonymousProjectId:10,language:11,country:12,apigeeToken:13,isProjectConversionSnackbar:7,action:14,setSnackbarVisibility:15},pz,[-1,-1])}get setSnackbarVisibility(){return this.$$.ctx[15]}}function n1(){return{orderEntry:{cartPage:String(O0)},configurators:{configuratorPage:String(P0)},projects:{projectsPage:String(w1)},myList:{listsPage:zo},myCart:{cartPage:Vn}}}const Tne="";function vz(t){Ut(t,"svelte-11yqkxp",".pw.display-flex.svelte-11yqkxp.svelte-11yqkxp{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-11yqkxp.svelte-11yqkxp{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.small-font.svelte-11yqkxp.svelte-11yqkxp{font-size:14px}.pw.pointer.svelte-11yqkxp.svelte-11yqkxp{cursor:pointer}.pw-snackbar-elem.svelte-11yqkxp.svelte-11yqkxp{top:30px}.pw.hidden.svelte-11yqkxp.svelte-11yqkxp{display:none}.pw.width-100.svelte-11yqkxp.svelte-11yqkxp{width:100%}.pw.bold-font.svelte-11yqkxp.svelte-11yqkxp{font-weight:bold}.pw.center-align-items.svelte-11yqkxp.svelte-11yqkxp{align-items:center}.pw.justify-content-center.svelte-11yqkxp.svelte-11yqkxp{justify-content:center}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.dialog-header.svelte-11yqkxp.svelte-11yqkxp{margin-bottom:8px}.dialog-header.svelte-11yqkxp h4.svelte-11yqkxp{margin:0px}.error-report.svelte-11yqkxp.svelte-11yqkxp{justify-content:flex-end;margin-right:20px}.error-report.svelte-11yqkxp p.svelte-11yqkxp{color:var(--se-fuchsia-red, #b10043);font-size:14px;margin-right:18px}.error-report.svelte-11yqkxp p .notification-icon.svelte-11yqkxp{font-size:16px}.error-report-link.svelte-11yqkxp.svelte-11yqkxp{font-size:14px}.download-icon.svelte-11yqkxp.svelte-11yqkxp{font-size:16px}.dialog-content.svelte-11yqkxp.svelte-11yqkxp{border:1px solid var(--se-super-light-grey, #e6e6e6);padding:20px;margin:4px 24px 20px 16px}.browse-file-conatainer.svelte-11yqkxp.svelte-11yqkxp{background-color:var(--se-ultra-light-grey-3, #f3f2f2);height:187px;flex-direction:column}.grey-text.svelte-11yqkxp.svelte-11yqkxp{color:var(--se-light-grey, #cbcbcb)}.dialog-footer.svelte-11yqkxp.svelte-11yqkxp{margin-top:20px}#my-progress.svelte-11yqkxp.svelte-11yqkxp{margin-top:10px}#my-bar.svelte-11yqkxp.svelte-11yqkxp{height:8px;background-color:var(--se-life-green, #3dcd58);width:100%}.browse-btn.svelte-11yqkxp.svelte-11yqkxp{color:var(--se-dark-sky-blue, #0087cd)}.flex-space-between-text-icon.svelte-11yqkxp.svelte-11yqkxp{display:flex;justify-content:space-between}.display-flex-end.svelte-11yqkxp.svelte-11yqkxp{display:flex;justify-content:end}.show-bottom.svelte-11yqkxp.svelte-11yqkxp{bottom:30px;top:auto}")}function F3(t){let n,e,i,r,o,s,l,a,c,u,d;return u=new xi({props:{href:t[7],linkText:t[11]("upload_excel.download_error_report"),linkSize:"small"}}),{c(){n=A("div"),e=A("p"),i=A("se-icon"),i.textContent="notification_critical_stroke",r=Y(),o=de(t[9]),s=Y(),l=A("span"),a=A("se-icon"),a.textContent="action_download_stroke",c=Y(),De(u.$$.fragment),w(i,"size","small"),w(i,"class","notification-icon svelte-11yqkxp"),x(e,"class","error-report-text display-flex pw center-align-items svelte-11yqkxp"),w(a,"color","information"),w(a,"class","download-icon svelte-11yqkxp"),w(a,"size","small"),x(l,"class","pw small-font error-report-link display-flex pw center-align-items svelte-11yqkxp"),x(n,"class","error-report display-flex pw center-align-items svelte-11yqkxp")},m(f,p){J(f,n,p),v(n,e),v(e,i),v(e,r),v(e,o),v(n,s),v(n,l),v(l,a),v(l,c),Me(u,l,null),d=!0},p(f,p){(!d||p[0]&512)&&be(o,f[9]);const m={};p[0]&128&&(m.href=f[7]),p[0]&2048&&(m.linkText=f[11]("upload_excel.download_error_report")),u.$set(m)},i(f){d||(Q(u.$$.fragment,f),d=!0)},o(f){se(u.$$.fragment,f),d=!1},d(f){f&&K(n),qe(u)}}}function x3(t){var d;let n,e,i,r=((d=t[6])==null?void 0:d.name)+"",o,s,l,a,c,u=t[3]===100&&G3(t);return{c(){n=A("div"),e=A("div"),i=A("p"),o=de(r),s=Y(),l=A("div"),a=A("div"),c=Y(),u&&u.c(),x(a,"id","my-bar"),hi(a,"width",t[3]+"%"),x(a,"class","svelte-11yqkxp"),x(l,"class","progress-bar-button display-flex pw center-align-items svelte-11yqkxp"),x(e,"id","my-progress"),x(e,"class","svelte-11yqkxp"),x(n,"class","pw width-100 svelte-11yqkxp")},m(f,p){J(f,n,p),v(n,e),v(e,i),v(i,o),v(e,s),v(e,l),v(l,a),v(l,c),u&&u.m(l,null)},p(f,p){var m;p[0]&64&&r!==(r=((m=f[6])==null?void 0:m.name)+"")&&be(o,r),p[0]&8&&hi(a,"width",f[3]+"%"),f[3]===100?u?u.p(f,p):(u=G3(f),u.c(),u.m(l,null)):u&&(u.d(1),u=null)},d(f){f&&K(n),u&&u.d()}}}function G3(t){let n,e,i;return{c(){n=A("se-icon"),n.textContent="action_delete_cross",w(n,"class","pw pointer svelte-11yqkxp"),w(n,"color","standard")},m(r,o){J(r,n,o),e||(i=xe(n,"click",t[33]),e=!0)},p:et,d(r){r&&K(n),e=!1,i()}}}function wz(t){let n,e,i,r,o,s,l,a,c,u=t[11]("bom_manager.upload_excel_csv")+"",d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z=t[11]("bom_manager.drop_an_excel")+"",D,P,L,C,S=t[11]("bom_manager.browse")+"",I,N,E,B=t[11]("upload_excel.file_less_than_3mb_warning")+"",U,H,Z,V,ne,W=t[11]("bom_manager.download_the_same_template_message")+"",re,G,F,X,le,ue,ee,$,he,me,te,oe,ce,ge,fe,ae,ie=t[7].length>0&&F3(t),_e=t[4]&&x3(t);return ee=new Gt({props:{buttonType:"button",disabled:t[10],importance:"emphasized",buttonText:t[11]("generic.add"),id:`add-to-list-list-page-${t[1]}`}}),ee.$on("btnClick",t[34]),oe=new xi({props:{linkText:t[11]("bom_manager.download_sample_template"),linkSize:"small"}}),oe.$on("linkClick",t[35]),{c(){n=A("se-snackbar"),i=Y(),r=A("se-dialog"),o=A("se-dialog-content"),s=A("se-loading"),l=Y(),a=A("div"),c=A("h4"),d=de(u),f=Y(),p=A("se-icon"),p.textContent="action_close",m=Y(),ie&&ie.c(),g=Y(),h=A("div"),_=A("div"),b=A("div"),y=A("div"),k=A("input"),T=Y(),R=A("se-icon"),O=de("action_upload_stroke"),q=Y(),M=A("div"),D=de(z),P=Y(),L=A("p"),C=de("? "),I=de(S),N=Y(),E=A("p"),U=de(B),H=de("."),Z=Y(),V=A("p"),ne=de("* "),re=de(W),G=de("."),F=Y(),_e&&_e.c(),X=Y(),le=A("div"),ue=A("span"),De(ee.$$.fragment),$=Y(),he=A("span"),me=A("se-icon"),me.textContent="action_download_stroke",te=Y(),De(oe.$$.fragment),w(n,"open",t[12]),w(n,"message",t[13]),w(n,"type",t[14]),w(n,"class","pw-snackbar-elem show-bottom svelte-11yqkxp"),w(n,"icon","notification_ok_wired"),w(n,"duration",Cs),w(n,"id",e=`snackbar-excel-upload-${t[1]}`),w(s,"loading",t[8]),w(s,"overlay","false"),x(c,"class","pw bold-font svelte-11yqkxp"),w(p,"class","pw pointer svelte-11yqkxp"),w(p,"color","standard"),x(a,"class","dialog-header flex-space-between-text-icon svelte-11yqkxp"),x(k,"accept",".csv, .xlsx"),x(k,"class","pw hidden svelte-11yqkxp"),x(k,"type","file"),w(R,"class","center pw pointer svelte-11yqkxp"),w(R,"id",j=`ic-excel-upload-file-list-page-${t[1]}`),w(R,"size","medium"),w(R,"color","standard"),x(L,"class","browse-btn pw pointer pw small-font svelte-11yqkxp"),x(M,"class","drop-title display-flex grey-text pw small-font pw justify-content-center svelte-11yqkxp"),x(E,"class","grey-text pw small-font svelte-11yqkxp"),x(V,"class","grey-text pw small-font svelte-11yqkxp"),x(b,"class","browse-file-conatainer display-flex pw center-align-items pw justify-content-center svelte-11yqkxp"),w(me,"color","information"),w(me,"class","download-icon svelte-11yqkxp"),w(me,"size","small"),x(he,"class","pw small-font download-sample display-flex-end pw center-align-items pointer svelte-11yqkxp"),x(le,"class","dialog-footer flex-space-between-center svelte-11yqkxp"),x(h,"class","dialog-content svelte-11yqkxp"),w(r,"class","pw svelte-11yqkxp"),w(r,"pagescroll","false"),w(r,"can-backdrop","false"),w(r,"id",ce=`upload-excel-${t[1]}`),w(r,"size","xlarge")},m(Ie,we){J(Ie,n,we),J(Ie,i,we),J(Ie,r,we),v(r,o),v(o,s),v(o,l),v(o,a),v(a,c),v(c,d),v(a,f),v(a,p),v(o,m),ie&&ie.m(o,null),v(o,g),v(o,h),v(h,_),v(_,b),v(b,y),v(y,k),t[28](k),v(y,T),v(y,R),v(R,O),v(b,q),v(b,M),v(M,D),v(M,P),v(M,L),v(L,C),v(L,I),v(b,N),v(b,E),v(E,U),v(E,H),v(b,Z),v(b,V),v(V,ne),v(V,re),v(V,G),v(_,F),_e&&_e.m(_,null),v(_,X),v(_,le),v(le,ue),Me(ee,ue,null),v(le,$),v(le,he),v(he,me),v(he,te),Me(oe,he,null),t[36](r),ge=!0,fe||(ae=[xe(p,"click",function(){ul(t[15](t[0]))&&t[15](t[0]).apply(this,arguments)}),xe(k,"change",t[27]),xe(R,"click",t[29]),xe(L,"click",t[30]),xe(b,"drop",t[31]),xe(b,"dragover",t[32])],fe=!0)},p(Ie,we){t=Ie,(!ge||we[0]&4096)&&w(n,"open",t[12]),(!ge||we[0]&8192)&&w(n,"message",t[13]),(!ge||we[0]&16384)&&w(n,"type",t[14]),(!ge||we[0]&2&&e!==(e=`snackbar-excel-upload-${t[1]}`))&&w(n,"id",e),(!ge||we[0]&256)&&w(s,"loading",t[8]),(!ge||we[0]&2048)&&u!==(u=t[11]("bom_manager.upload_excel_csv")+"")&&be(d,u),t[7].length>0?ie?(ie.p(t,we),we[0]&128&&Q(ie,1)):(ie=F3(t),ie.c(),Q(ie,1),ie.m(o,g)):ie&&(Je(),se(ie,1,1,()=>{ie=null}),Qe()),(!ge||we[0]&2&&j!==(j=`ic-excel-upload-file-list-page-${t[1]}`))&&w(R,"id",j),(!ge||we[0]&2048)&&z!==(z=t[11]("bom_manager.drop_an_excel")+"")&&be(D,z),(!ge||we[0]&2048)&&S!==(S=t[11]("bom_manager.browse")+"")&&be(I,S),(!ge||we[0]&2048)&&B!==(B=t[11]("upload_excel.file_less_than_3mb_warning")+"")&&be(U,B),(!ge||we[0]&2048)&&W!==(W=t[11]("bom_manager.download_the_same_template_message")+"")&&be(re,W),t[4]?_e?_e.p(t,we):(_e=x3(t),_e.c(),_e.m(_,X)):_e&&(_e.d(1),_e=null);const pe={};we[0]&1024&&(pe.disabled=t[10]),we[0]&2048&&(pe.buttonText=t[11]("generic.add")),we[0]&2&&(pe.id=`add-to-list-list-page-${t[1]}`),ee.$set(pe);const Se={};we[0]&2048&&(Se.linkText=t[11]("bom_manager.download_sample_template")),oe.$set(Se),(!ge||we[0]&2&&ce!==(ce=`upload-excel-${t[1]}`))&&w(r,"id",ce)},i(Ie){ge||(Q(ie),Q(ee.$$.fragment,Ie),Q(oe.$$.fragment,Ie),ge=!0)},o(Ie){se(ie),se(ee.$$.fragment,Ie),se(oe.$$.fragment,Ie),ge=!1},d(Ie){Ie&&(K(n),K(i),K(r)),ie&&ie.d(),t[28](null),_e&&_e.d(),qe(ee),qe(oe),t[36](null),fe=!1,An(ae)}}}function Cne(){}function yz(t,n,e){let i,r,o,s,l,a,c,u,d,f;ye(t,es,we=>e(41,i=we)),ye(t,an,we=>e(42,r=we)),ye(t,ti,we=>e(43,o=we)),ye(t,Vt,we=>e(11,s=we)),ye(t,Ki,we=>e(44,l=we)),ye(t,es,we=>e(45,a=we)),ye(t,wr,we=>e(46,c=we)),ye(t,ka,we=>e(12,u=we)),ye(t,Yo,we=>e(13,d=we)),ye(t,Va,we=>e(14,f=we));let{country:p}=n,{language:m}=n,{wrapperUploadExcel:g}=n,{projectId:h}=n,{view:_}=n,{isCart:b}=n,{apigeeToken:y}=n,k=0,T,R=!1,O,j,q,M=Te,z=!1,D,P,L=!0,C=0;Un(()=>{Wn(!1)}),Kn(()=>{Wn(!1)});function S(){N(),e(7,M=Te),e(0,g.open=!0,g)}function I(we){we.open=!1,Oi(Kr),N()}function N(){e(6,q=null),e(4,R=!1),e(3,k=0),O=null,e(7,M=Te),e(10,L=!0)}function E(we){var pe;e(3,k=0),e(7,M=Te),clearInterval(T),e(6,q=(pe=we==null?void 0:we.target)==null?void 0:pe.files[0]),B()}function B(){Wn(!1),H()?(Mi(s("bom_manager.file_upload_condition")),e(4,R=!1)):(q==null?void 0:q.size)>Qb?Z():q&&U()}function U(){T=setInterval(ne,void 0),e(4,R=!0);let we=new FileReader;we==null||we.readAsDataURL(q),we.onload=async pe=>{var Re,Ee;const Se=(Ee=(Re=pe==null?void 0:pe.target)==null?void 0:Re.result)==null?void 0:Ee.toString();O=Se==null?void 0:Se.split(ba)[1],await W()}}function H(){const we=[Rv.CSV,Rv.XLSX],pe=String(q==null?void 0:q.name).split(y0).pop().toLowerCase();return we.indexOf(String(pe))===-1}function Z(){Mi(s("bom_manager.file_size_limit_message")),e(4,R=!1)}function V(){clearInterval(T)}function ne(){e(3,k+=1)}async function W(){var Se,Le,Re,Ee,ke,Ce,Ne,Pe;const we=String(q==null?void 0:q.name),pe={type:we==null?void 0:we.split(y0)[1],file:O,countryCode:(Se=We==null?void 0:We.country)==null?void 0:Se.toLowerCase(),languageCode:We==null?void 0:We.language,ownerCountryCode:(Le=r==null?void 0:r.ownerInfo)!=null&&Le.country&&(r!=null&&r.user)?(Ee=String((Re=r==null?void 0:r.ownerInfo)==null?void 0:Re.country))==null?void 0:Ee.toLowerCase():null,ownerLanguageCode:(ke=r==null?void 0:r.ownerInfo)!=null&&ke.language&&(r!=null&&r.user)?(Ce=String(r.ownerInfo.language))==null?void 0:Ce.toLowerCase():null};C=Number((Pe=(Ne=r==null?void 0:r.bom)==null?void 0:Ne.parts)!=null&&Pe.length?r.bom.parts.length:0),await oy(pe,h,y,o,b).catch(()=>{Mi(s("generic.error_message"))}).then(Ve=>{re(Ve)}).finally(()=>{ve.info("Project uploaded: ",h)})}function re(we){var pe,Se,Le,Re,Ee;we!=null&&we.hasError?(e(7,M=Te),N()):(pe=we==null?void 0:we.data)!=null&&pe.errorReport?(e(10,L=!1),P=we==null?void 0:we.data,e(7,M=String((Se=we==null?void 0:we.data)==null?void 0:Se.errorReport)),e(9,D=ks(String((Le=we==null?void 0:we.data)==null?void 0:Le.message),o)),G(),C=Number((Re=we==null?void 0:we.data)==null?void 0:Re.totalQuantity)):we&&(we!=null&&we.data)&&(C=Number((Ee=we==null?void 0:we.data)==null?void 0:Ee.totalQuantity),e(10,L=!1),e(7,M=Te),P=we==null?void 0:we.data)}function G(){Number(D==null?void 0:D.split(gr)[0])===0&&e(10,L=!0)}function F(){var pe,Se;e(8,z=!0),gs(b?Ai.UPLOAD_EXCEL_CART.action:Ai.UPLOAD_EXCEL_LIST.action,b?Ai.UPLOAD_EXCEL_CART.subaction:Ai.UPLOAD_EXCEL_LIST.subaction,String(c.platform),b?void 0:zt()?r==null?void 0:r.id:void 0,b||zt()||r==null?void 0:r.id,void 0,a),Bn(Nn.CTA_CLICK,{cta_name:"Upload excel/csv files",cta_location:b?$i.UCCart:$i.UCList}),X();let we=(Se=(pe=P==null?void 0:P.bom)==null?void 0:pe.parts)==null?void 0:Se.map(Le=>({catalogNumber:Le==null?void 0:Le.productRef,description:Le==null?void 0:Le.description,quantity:Le==null?void 0:Le.quantity}));l===qn?le(P,h,we):ue(P,h,we)}function X(){P.description=P!=null&&P.description?P.description:Te,P==null||delete P.errorReport,P==null||delete P.message,P==null||delete P.id,P==null||delete P.federatedId}function le(we,pe,Se){const Le=s("bom_manager.products_added_to_list_message");Vi(we,pe,Le,o).then(async Re=>{var Ce;(Ce=Re==null?void 0:Re.data)!=null&&Ce.id&&(I(g),ve.info("Project updated for with ID: ",pe),e(8,z=!1)),e(21,y=We.apigeeToken);const Ee=mn(p,r),ke=gn(m,r);await ci(pe,Ee,ke,y).then(function(Ne){if(ve.info(Ne),zt()){const Pe=C===1?"{activity_log.message_product_reference}"+cn+Es+Se[0].catalogNumber+Es:String(C)+cn+"{activity_log.message_products}";Br(pe,"{activity_log.message_product_added_action}","{activity_log.message_product_added_excel_subaction}","{activity_log.message_added_product}"+cn+Pe+cn+"{activity_log.message_via_excel}",Se)}})}).finally(()=>{ve.info("Project updated for with IDfin: ",pe)})}function ue(we,pe,Se){Os(we,i).then(async Le=>{Le!=null&&Le.error||(I(g),ve.info("Project updated for with ID: ",pe),e(8,z=!1)),e(21,y=We.apigeeToken);const Re=mn(p,r),Ee=gn(m,r);await ci(i,Re,Ee,y).then(function(ke){if(ve.info(ke),zt()){const Ce=C===1?"{activity_log.message_product_reference}"+cn+Es+Se[0].catalogNumber+Es:String(C)+cn+"{activity_log.message_products}";Br(pe,"{activity_log.message_product_added_action}","{activity_log.message_product_added_excel_subaction}","{activity_log.message_added_product}"+cn+Ce+cn+"{activity_log.message_via_excel}",Se)}})}).finally(()=>{ve.info("Project updated for with IDfin: ",pe)})}function ee(we){we.preventDefault(),we.dataTransfer.dropEffect=IN}function $(we){we.preventDefault(),e(6,q=we.dataTransfer.files[0]),B()}function he(){var pe;const we=rl()?ju:Ru;vf(we,String(We.language),sh[(pe=We.language)==null?void 0:pe.toLowerCase()])}const me=we=>E(we);function te(we){_t[we?"unshift":"push"](()=>{j=we,e(5,j)})}const oe=()=>{e(5,j.value=Te,j),j.click()},ce=()=>{e(5,j.value=Te,j),j.click()},ge=we=>$(we),fe=we=>ee(we),ae=()=>{N()},ie=()=>{F()},_e=()=>he();function Ie(we){_t[we?"unshift":"push"](()=>{g=we,e(0,g)})}return t.$$set=we=>{"country"in we&&e(22,p=we.country),"language"in we&&e(23,m=we.language),"wrapperUploadExcel"in we&&e(0,g=we.wrapperUploadExcel),"projectId"in we&&e(24,h=we.projectId),"view"in we&&e(1,_=we.view),"isCart"in we&&e(25,b=we.isCart),"apigeeToken"in we&&e(21,y=we.apigeeToken)},t.$$.update=()=>{t.$$.dirty[0]&8&&k===100&&V()},[g,_,$,k,R,j,q,M,z,D,L,s,u,d,f,I,N,E,F,ee,he,y,p,m,h,b,S,me,te,oe,ce,ge,fe,ae,ie,_e,Ie]}class kz extends Ot{constructor(n){super(),At(this,n,yz,wz,It,{country:22,language:23,wrapperUploadExcel:0,projectId:24,view:1,isCart:25,apigeeToken:21,uploadPopup:26,drop:2},vz,[-1,-1])}get uploadPopup(){return this.$$.ctx[26]}get drop(){return this.$$.ctx[2]}}var Sz=typeof global=="object"&&global&&global.Object===Object&&global;const Tz=Sz;var Cz=typeof self=="object"&&self&&self.Object===Object&&self,Ez=Tz||Cz||Function("return this")();const H3=Ez;var Iz=H3.Symbol;const i1=Iz;var W3=Object.prototype,Az=W3.hasOwnProperty,Oz=W3.toString,op=i1?i1.toStringTag:void 0;function Pz(t){var n=Az.call(t,op),e=t[op];try{t[op]=void 0;var i=!0}catch{}var r=Oz.call(t);return i&&(n?t[op]=e:delete t[op]),r}var Nz=Object.prototype,Lz=Nz.toString;function jz(t){return Lz.call(t)}var Rz="[object Null]",Mz="[object Undefined]",V3=i1?i1.toStringTag:void 0;function qz(t){return t==null?t===void 0?Mz:Rz:V3&&V3 in Object(t)?Pz(t):jz(t)}function Dz(t){return t!=null&&typeof t=="object"}var Bz="[object Symbol]";function Uz(t){return typeof t=="symbol"||Dz(t)&&qz(t)==Bz}var zz=/\s/;function Fz(t){for(var n=t.length;n--&&zz.test(t.charAt(n)););return n}var xz=/^\s+/;function Gz(t){return t&&t.slice(0,Fz(t)+1).replace(xz,"")}function q_(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var Y3=0/0,Hz=/^[-+]0x[0-9a-f]+$/i,Wz=/^0b[01]+$/i,Vz=/^0o[0-7]+$/i,Yz=parseInt;function Z3(t){if(typeof t=="number")return t;if(Uz(t))return Y3;if(q_(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=q_(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=Gz(t);var e=Wz.test(t);return e||Vz.test(t)?Yz(t.slice(2),e?2:8):Hz.test(t)?Y3:+t}var Zz=function(){return H3.Date.now()};const D_=Zz;var Xz="Expected a function",Kz=Math.max,Jz=Math.min;function X3(t,n,e){var i,r,o,s,l,a,c=0,u=!1,d=!1,f=!0;if(typeof t!="function")throw new TypeError(Xz);n=Z3(n)||0,q_(e)&&(u=!!e.leading,d="maxWait"in e,o=d?Kz(Z3(e.maxWait)||0,n):o,f="trailing"in e?!!e.trailing:f);function p(R){var O=i,j=r;return i=r=void 0,c=R,s=t.apply(j,O),s}function m(R){return c=R,l=setTimeout(_,n),u?p(R):s}function g(R){var O=R-a,j=R-c,q=n-O;return d?Jz(q,o-j):q}function h(R){var O=R-a,j=R-c;return a===void 0||O>=n||O<0||d&&j>=o}function _(){var R=D_();if(h(R))return b(R);l=setTimeout(_,g(R))}function b(R){return l=void 0,f&&i?p(R):(i=r=void 0,s)}function y(){l!==void 0&&clearTimeout(l),c=0,i=a=r=l=void 0}function k(){return l===void 0?s:b(D_())}function T(){var R=D_(),O=h(R);if(i=arguments,r=this,a=R,O){if(l===void 0)return m(a);if(d)return clearTimeout(l),l=setTimeout(_,n),p(a)}return l===void 0&&(l=setTimeout(_,n)),s}return T.cancel=y,T.flush=k,T}const Ene="",{window:Qz}=uo;function $z(t){Ut(t,"svelte-1y39si8",".pw.disabled.svelte-1y39si8.svelte-1y39si8{pointer-events:none;opacity:0.5}.pw.align-right.svelte-1y39si8.svelte-1y39si8{margin-left:auto}.pw.align-left.svelte-1y39si8.svelte-1y39si8{margin-right:auto}.pw.display-flex.svelte-1y39si8.svelte-1y39si8{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1y39si8.svelte-1y39si8{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-1y39si8.svelte-1y39si8{font-size:16px}.pw.small-font.svelte-1y39si8.svelte-1y39si8{font-size:14px}.pw.nano-font.svelte-1y39si8.svelte-1y39si8{font-size:12px}.pw.pointer.svelte-1y39si8.svelte-1y39si8{cursor:pointer}.pw-snackbar-elem.svelte-1y39si8.svelte-1y39si8{top:30px}.pw.red-color.svelte-1y39si8.svelte-1y39si8{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-1y39si8.svelte-1y39si8{display:none}.pw.width-100.svelte-1y39si8.svelte-1y39si8{width:100%}.pw.bold-font.svelte-1y39si8.svelte-1y39si8{font-weight:bold}.pw.normal-font.svelte-1y39si8.svelte-1y39si8{font-weight:normal;font-size:16px}.pw.error-msg.svelte-1y39si8.svelte-1y39si8{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-1y39si8.svelte-1y39si8{text-align:center}.pw.center-align-items.svelte-1y39si8.svelte-1y39si8{align-items:center}.pw.justify-content-center.svelte-1y39si8.svelte-1y39si8{justify-content:center}.pw.bom-checkbox.svelte-1y39si8.svelte-1y39si8{max-width:16px}.pw.ml-8.svelte-1y39si8.svelte-1y39si8{margin-left:8px}.pw.ml-12.svelte-1y39si8.svelte-1y39si8{margin-left:12px}.pw.ml-36.svelte-1y39si8.svelte-1y39si8{margin-left:36px}.pw.mt-8.svelte-1y39si8.svelte-1y39si8{margin-top:8px}.pw.mt-6.svelte-1y39si8.svelte-1y39si8{margin-top:6px}.pw.mt-32.svelte-1y39si8.svelte-1y39si8{margin-top:32px}.pw.mb-8.svelte-1y39si8.svelte-1y39si8{margin-bottom:8px}.pw.mb-12.svelte-1y39si8.svelte-1y39si8{margin-bottom:12px}.pw.mb-16.svelte-1y39si8.svelte-1y39si8{margin-top:16px}.pw.mb-21.svelte-1y39si8.svelte-1y39si8{margin-bottom:21px}.pw.mr-12.svelte-1y39si8.svelte-1y39si8{margin-right:12px}.pw.p-12.svelte-1y39si8.svelte-1y39si8{padding:12px}.pw.pl-16.svelte-1y39si8.svelte-1y39si8{padding-left:16px}.pw.pr-16.svelte-1y39si8.svelte-1y39si8{padding-right:16px}.position-absolute.svelte-1y39si8.svelte-1y39si8{position:absolute}.flex-wrap.svelte-1y39si8.svelte-1y39si8{flex-wrap:wrap}.justify-content-sp-btw.svelte-1y39si8.svelte-1y39si8{justify-content:space-between}.gp-10.svelte-1y39si8.svelte-1y39si8{gap:10px}.gp-5.svelte-1y39si8.svelte-1y39si8{gap:5px}.desktop-view.svelte-1y39si8.svelte-1y39si8{display:none}.mobile-view.svelte-1y39si8.svelte-1y39si8{display:block}.mobile-view-flx.svelte-1y39si8.svelte-1y39si8{display:flex;flex-direction:column}.rounded-border.svelte-1y39si8.svelte-1y39si8{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-1y39si8.svelte-1y39si8{text-align:right}.bg-color-light-grey.svelte-1y39si8.svelte-1y39si8{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-1y39si8.svelte-1y39si8{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-1y39si8.svelte-1y39si8{padding:8px 0 16px 8px}.country-fr.svelte-1y39si8 .search-label.svelte-1y39si8,.country-fr.svelte-1y39si8 .with-icon.svelte-1y39si8,.country-pt.svelte-1y39si8 .search-label.svelte-1y39si8,.country-pt.svelte-1y39si8 .with-icon.svelte-1y39si8{font-size:var(--p-font-size, 0.87rem)}@media(min-width: 968px){.mobile-view.svelte-1y39si8.svelte-1y39si8,.mobile-view-flx.svelte-1y39si8.svelte-1y39si8{display:none}.desktop-view.svelte-1y39si8.svelte-1y39si8{display:inherit}}.cart-mobile-snackbar.svelte-1y39si8.svelte-1y39si8{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-1y39si8.svelte-1y39si8,.mobile-view-snackbar.svelte-1y39si8.svelte-1y39si8{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-1y39si8.svelte-1y39si8{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-1y39si8.svelte-1y39si8{display:block}.mobile-snackbar.svelte-1y39si8.svelte-1y39si8{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-1y39si8.svelte-1y39si8{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-1y39si8.svelte-1y39si8{margin:-6px}.bottom-snackbar.svelte-1y39si8.svelte-1y39si8{bottom:30px;top:auto}.input-box.svelte-1y39si8.svelte-1y39si8{font-size:14px;padding:1px 7px;height:33px;width:300px;margin-bottom:5px}.search-field.svelte-1y39si8.svelte-1y39si8{display:inline-block;min-width:170px;width:330px}@media(min-width: 1024px) and (max-width: 1280px){.search-field.svelte-1y39si8.svelte-1y39si8{width:280px}}.search-dropdown.svelte-1y39si8.svelte-1y39si8{display:block;padding-top:2px}@media(max-width: 768px){.search-dropdown.svelte-1y39si8.svelte-1y39si8{padding-top:1px}}@media(min-width: 320px) and (max-width: 420px){.guided-search-section.svelte-1y39si8.svelte-1y39si8{width:300px}}@media(min-width: 421px) and (max-width: 600px){.guided-search-section.svelte-1y39si8.svelte-1y39si8{width:400px}}.guided-search-cart.svelte-1y39si8.svelte-1y39si8{width:auto;flex:1;min-width:auto}.guided-search-cart.svelte-1y39si8 .search-input-reference-number-span.svelte-1y39si8{width:100%;display:inline-block}")}function K3(t,n,e){const i=t.slice();return i[31]=n[e],i[33]=e,i}function J3(t){let n,e,i;return{c(){var r;n=A("se-list"),e=A("se-list-item"),w(e,"disabled","true"),w(e,"item",i=(r=t[10])==null?void 0:r.itemFound)},m(r,o){J(r,n,o),v(n,e)},p(r,o){var s;o[0]&1024&&i!==(i=(s=r[10])==null?void 0:s.itemFound)&&w(e,"item",i)},d(r){r&&K(n)}}}function Q3(t){let n,e=Dt(t[1]),i=[];for(let r=0;r968?"search":"",autoComplete:"off",placeholder:t[7]("workspace_homepage.search_by_se"),className:"input-box "+(an!=null&&an.isArchived?"pw disabled":Te),disabled:((k=t[8])==null?void 0:k.isArchived)||t[9][pr]===Ae.DISABLED};t[0]!==void 0&&(_.value=t[0]),a=new Yi({props:_}),_t.push(()=>Ct(a,"value",h)),a.$on("qdsInput",t[17]);let b=((T=t[0])==null?void 0:T.length)>=Yp&&((R=t[10])==null?void 0:R.itemFound)!==null&&J3(t),y=t[1]&&Q3(t);return{c(){n=A("se-form-field"),e=A("span"),i=de(t[3]),r=Y(),o=A("div"),s=A("se-dropdown"),l=A("span"),De(a.$$.fragment),u=Y(),b&&b.c(),d=Y(),y&&y.c(),x(e,"class","pw base-font pw mb-12 search-label svelte-1y39si8"),x(l,"slot","trigger"),x(l,"class","search-input-reference-number-span svelte-1y39si8"),w(s,"class","search-dropdown svelte-1y39si8"),w(s,"max-width","328px"),x(o,"class","with-icon svelte-1y39si8"),w(n,"id","guided-search"),w(n,"class",f="search-field "+(t[4]?`guided-search-cart country-${t[2]}`:Te)+" svelte-1y39si8"),w(n,"block","true"),w(n,"type","input"),w(n,"option","stacked")},m(O,j){J(O,n,j),v(n,e),v(e,i),v(n,r),v(n,o),v(o,s),v(s,l),Me(a,l,null),v(s,u),b&&b.m(s,null),v(s,d),y&&y.m(s,null),t[19](s),p=!0,m||(g=xe(Qz,"CONFIGURATOR_ADD_TO_BOM",t[11]),m=!0)},p(O,j){var M,z,D;(!p||j[0]&8)&&be(i,O[3]);const q={};j[0]&32&&(q.id=`search-input-reference-number-${O[5]}`),j[0]&128&&(q.placeholder=O[7]("workspace_homepage.search_by_se")),j[0]&768&&(q.disabled=((M=O[8])==null?void 0:M.isArchived)||O[9][pr]===Ae.DISABLED),!c&&j[0]&1&&(c=!0,q.value=O[0],Tt(()=>c=!1)),a.$set(q),((z=O[0])==null?void 0:z.length)>=Yp&&((D=O[10])==null?void 0:D.itemFound)!==null?b?b.p(O,j):(b=J3(O),b.c(),b.m(s,d)):b&&(b.d(1),b=null),O[1]?y?y.p(O,j):(y=Q3(O),y.c(),y.m(s,null)):y&&(y.d(1),y=null),(!p||j[0]&20&&f!==(f="search-field "+(O[4]?`guided-search-cart country-${O[2]}`:Te)+" svelte-1y39si8"))&&w(n,"class",f)},i(O){p||(Q(a.$$.fragment,O),p=!0)},o(O){se(a.$$.fragment,O),p=!1},d(O){O&&K(n),qe(a),b&&b.d(),y&&y.d(),t[19](null),m=!1,g()}}}function tF(t,n,e){let i,r,o,s,l,a;ye(t,Vt,N=>e(7,i=N)),ye(t,Ki,N=>e(24,r=N)),ye(t,an,N=>e(8,o=N)),ye(t,ql,N=>e(25,s=N)),ye(t,Ii,N=>e(9,l=N)),ye(t,nd,N=>e(10,a=N));let{country:c}=n,{language:u}=n,{label:d}=n,{cataloginput:f}=n,{productSearch:p=null}=n,{isFromCart:m=!1}=n,{view:g}=n,{apigeeToken:h}=n,_,b,y,k;const T=Mn();let R;const O=()=>{_=mn(c,o,!0),b=gn(u,o);const{countryCode:N,languageCode:E}=m_(_,b);y=N,k=E},j=N=>(O(),{guidedSearch:{scope:{brand:bp,country:_},locale:{isoLanguage:k,isoCountry:y},search:{searchBean:[{field:"product_reference",searchValue:N==null?void 0:N.toUpperCase()}]},version:lN}}),q=N=>(O(),{context:{type:Sl.TYPE,country:y,language:k},filters:[{children:[{value:N}],id:Sl.PART_NUMBER}],searcher:Sl.SEARCHER,term:Sl.ALL});function M(N){return N==null?void 0:N.includes($f)}const z=()=>{e(1,p=null)},D=X3(async N=>{var B;T(Jp,{});const E=String((B=N==null?void 0:N.target)==null?void 0:B.value);if(e(1,p=null),E.length>=Yp){e(14,h=h===void 0?We.apigeeToken:h);try{R.open();const U={itemFound:String(i("generic.searching"))};nd.update(()=>U);const H=i("bom_manager.item_not_found_message"),Z=j(E),V=q(E);M(E)?e(1,p=await ly(dv,V,String(h),Te,!1)):e(1,p=await cy(pv,Z,String(h),H))}catch(U){ve.info("fetchCaseProduct: catch",U)}}},1e3);function P(N,E){const B=N.trim();let U={catalogNumber:B,description:E};if(U!=null&&U.catalogNumber){let H="Cart Search";r===qn&&(H="MyList Search");const Z={site_search_category:H,site_search_keyword:B};Bn(Nn.GUIDED_SEARCH_CLICK,Z),T(Jp,U)}else{const H=String(i("generic.error_message"));Mi(H)}}function L(N){f=N,e(0,f)}const C=N=>D(N==null?void 0:N.detail),S=N=>{e(0,f=String(N==null?void 0:N.product)),P(String(f),String(N==null?void 0:N.description))};function I(N){_t[N?"unshift":"push"](()=>{R=N,e(6,R)})}return t.$$set=N=>{"country"in N&&e(15,c=N.country),"language"in N&&e(2,u=N.language),"label"in N&&e(3,d=N.label),"cataloginput"in N&&e(0,f=N.cataloginput),"productSearch"in N&&e(1,p=N.productSearch),"isFromCart"in N&&e(4,m=N.isFromCart),"view"in N&&e(5,g=N.view),"apigeeToken"in N&&e(14,h=N.apigeeToken)},t.$$.update=()=>{t.$$.dirty[0]&1&&jt(ql,s=f,s)},[f,p,u,d,m,g,R,i,o,l,a,z,D,P,h,c,L,C,S,I]}let nF=class extends Ot{constructor(n){super(),At(this,n,tF,eF,It,{country:15,language:2,label:3,cataloginput:0,productSearch:1,isFromCart:4,view:5,apigeeToken:14},$z,[-1,-1])}};const Ine="";function iF(t){Ut(t,"svelte-1nr0p31",".editProject.svelte-1nr0p31{padding:8px 16px}.shareProject.svelte-1nr0p31{padding:8px 32px 8px 0px}.font-weight-400.svelte-1nr0p31{font-weight:400 !important}")}function rF(t){let n,e,i,r,o,s;return{c(){n=A("qds-button"),w(n,"icon-name",t[0]),w(n,"size",t[2]),w(n,"importance","subdued"),w(n,"text",t[1]),w(n,"class",e=Nt(t[3]??Te)+" svelte-1nr0p31"),w(n,"id",i=t[4]??Te),w(n,"disabled",r=t[5]??!1)},m(l,a){J(l,n,a),o||(s=xe(n,"click",t[7]),o=!0)},p(l,[a]){a&1&&w(n,"icon-name",l[0]),a&4&&w(n,"size",l[2]),a&2&&w(n,"text",l[1]),a&8&&e!==(e=Nt(l[3]??Te)+" svelte-1nr0p31")&&w(n,"class",e),a&16&&i!==(i=l[4]??Te)&&w(n,"id",i),a&32&&r!==(r=l[5]??!1)&&w(n,"disabled",r)},i:et,o:et,d(l){l&&K(n),o=!1,s()}}}function sF(t,n,e){let{iconClassName:i=Te}=n,{buttonText:r=Te}=n,{buttonSize:o=Ov}=n,{className:s=Te}=n,{id:l=Te}=n,{disabled:a=!1}=n;const c=Mn();function u(){c(yi.SUBDUED_BUTTON_CLICK)}const d=()=>{u()};return t.$$set=f=>{"iconClassName"in f&&e(0,i=f.iconClassName),"buttonText"in f&&e(1,r=f.buttonText),"buttonSize"in f&&e(2,o=f.buttonSize),"className"in f&&e(3,s=f.className),"id"in f&&e(4,l=f.id),"disabled"in f&&e(5,a=f.disabled)},[i,r,o,s,l,a,u,d]}let Ni=class extends Ot{constructor(n){super(),At(this,n,sF,rF,It,{iconClassName:0,buttonText:1,buttonSize:2,className:3,id:4,disabled:5},iF)}};const Ane="";function oF(t){Ut(t,"svelte-1wr2dnj",'.pw.align-right.svelte-1wr2dnj.svelte-1wr2dnj{margin-left:auto}.pw.small-font.svelte-1wr2dnj.svelte-1wr2dnj{font-size:14px}.pw.nano-font.svelte-1wr2dnj.svelte-1wr2dnj{font-size:12px}.pw.pointer.svelte-1wr2dnj.svelte-1wr2dnj{cursor:pointer}.pw.bold-font.svelte-1wr2dnj.svelte-1wr2dnj{font-weight:bold}.pw.error-msg.svelte-1wr2dnj.svelte-1wr2dnj{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-1wr2dnj.svelte-1wr2dnj{text-align:center}.pw.mb-16.svelte-1wr2dnj.svelte-1wr2dnj{margin-top:16px}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.or-separator.svelte-1wr2dnj.svelte-1wr2dnj{display:flex;align-items:center;justify-content:center;margin:4px 64px}.or-separator.svelte-1wr2dnj.svelte-1wr2dnj::after,.or-separator.svelte-1wr2dnj.svelte-1wr2dnj::before{flex:1;content:"";padding:0.1px;background-color:var(--se-true-black, #000000);margin:16px 12px}.config-product-popup.svelte-1wr2dnj.svelte-1wr2dnj{margin-bottom:0}.add-cto-title.svelte-1wr2dnj.svelte-1wr2dnj{font-size:24px;margin:5px 0}.form-class.svelte-1wr2dnj.svelte-1wr2dnj{padding-bottom:15px}.form-class.svelte-1wr2dnj .form-field.svelte-1wr2dnj{margin-bottom:10px}')}function ek(t){let n;return{c(){n=A("se-loading"),w(n,"loading",t[7]),w(n,"full-page","true"),w(n,"overlay","true")},m(e,i){J(e,n,i)},p(e,i){i&128&&w(n,"loading",e[7])},d(e){e&&K(n)}}}function tk(t){let n,e;return{c(){n=A("p"),e=de(t[5]),x(n,"class","pw error-msg bold-font svelte-1wr2dnj")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r&32&&be(e,i[5])},d(i){i&&K(n)}}}function aF(t){let n,e,i,r,o,s,l,a,c=t[6]("bom_manager.add_products")+"",u,d,f,p=t[6]("bom_manager.add_product_message")+"",m,g,h,_,b,y,k,T,R,O,j=t[6]("generic.or").toLocaleUpperCase()+"",q,M,z,D,P,L,C,S,I,N,E,B,U,H=t[7]&&ek(t),Z=t[4]&&tk(t);function V(G){t[16](G)}let ne={type:"text",id:`product-code-list-page-${t[1]}`,placeholder:t[6]("bom_manager.enter_product_code"),disabled:t[2]!==Te};t[3]!==void 0&&(ne.value=t[3]),b=new Yi({props:ne}),_t.push(()=>Ct(b,"value",V));function W(G){t[17](G)}let re={type:"text",id:`config-id-list-page-${t[1]}`,placeholder:t[6]("bom_manager.enter_config_id"),disabled:t[3]!==Te};return t[2]!==void 0&&(re.value=t[2]),D=new Yi({props:re}),_t.push(()=>Ct(D,"value",W)),S=new Gt({props:{buttonText:t[6]("generic.load"),importance:"emphasized",buttonType:"submit",id:`load-list-page-${t[1]}`}}),N=new Gt({props:{buttonText:t[6]("generic.cancel"),buttonType:"button",id:`cancel-config-popup-${t[1]}`}}),N.$on("btnClick",t[18]),{c(){n=A("se-dialog"),e=A("qds-button"),r=Y(),o=A("se-dialog-content"),H&&H.c(),s=Y(),l=A("form"),a=A("h3"),u=de(c),d=Y(),f=A("p"),m=de(p),g=Y(),Z&&Z.c(),h=Y(),_=A("se-form-field"),De(b.$$.fragment),T=Y(),R=A("div"),O=A("p"),q=de(j),M=Y(),z=A("se-form-field"),De(D.$$.fragment),C=Y(),De(S.$$.fragment),I=Y(),De(N.$$.fragment),w(e,"importance","subdued"),w(e,"id",i=`close-config-popup-${t[1]}`),w(e,"icon-name","cross-circle"),w(e,"class","pw pointer align-right svelte-1wr2dnj"),x(a,"class","add-cto-title svelte-1wr2dnj"),x(f,"class","pw small-font bold mb-16 config-product-popup svelte-1wr2dnj"),w(_,"option","stacked"),w(_,"class","pw nano-font bold svelte-1wr2dnj"),w(_,"label",k=t[6]("bom_manager.enter_product_code")),x(O,"class","or-separator svelte-1wr2dnj"),x(R,"class","pw align-center svelte-1wr2dnj"),w(z,"class","pw nano-font bold form-field svelte-1wr2dnj"),w(z,"option","stacked"),w(z,"label",L=t[6]("bom_manager.enter_config_id")),x(l,"class","form-class svelte-1wr2dnj"),w(n,"open",t[0]),w(n,"no-backdrop","true"),w(n,"size","small")},m(G,F){J(G,n,F),v(n,e),v(n,r),v(n,o),H&&H.m(o,null),v(o,s),v(o,l),v(l,a),v(a,u),v(l,d),v(l,f),v(f,m),v(l,g),Z&&Z.m(l,null),v(l,h),v(l,_),Me(b,_,null),v(l,T),v(l,R),v(R,O),v(O,q),v(l,M),v(l,z),Me(D,z,null),v(l,C),Me(S,l,null),v(l,I),Me(N,l,null),E=!0,B||(U=[xe(e,"click",t[15]),xe(l,"submit",Ts(t[19]))],B=!0)},p(G,[F]){(!E||F&2&&i!==(i=`close-config-popup-${G[1]}`))&&w(e,"id",i),G[7]?H?H.p(G,F):(H=ek(G),H.c(),H.m(o,s)):H&&(H.d(1),H=null),(!E||F&64)&&c!==(c=G[6]("bom_manager.add_products")+"")&&be(u,c),(!E||F&64)&&p!==(p=G[6]("bom_manager.add_product_message")+"")&&be(m,p),G[4]?Z?Z.p(G,F):(Z=tk(G),Z.c(),Z.m(l,h)):Z&&(Z.d(1),Z=null);const X={};F&2&&(X.id=`product-code-list-page-${G[1]}`),F&64&&(X.placeholder=G[6]("bom_manager.enter_product_code")),F&4&&(X.disabled=G[2]!==Te),!y&&F&8&&(y=!0,X.value=G[3],Tt(()=>y=!1)),b.$set(X),(!E||F&64&&k!==(k=G[6]("bom_manager.enter_product_code")))&&w(_,"label",k),(!E||F&64)&&j!==(j=G[6]("generic.or").toLocaleUpperCase()+"")&&be(q,j);const le={};F&2&&(le.id=`config-id-list-page-${G[1]}`),F&64&&(le.placeholder=G[6]("bom_manager.enter_config_id")),F&8&&(le.disabled=G[3]!==Te),!P&&F&4&&(P=!0,le.value=G[2],Tt(()=>P=!1)),D.$set(le),(!E||F&64&&L!==(L=G[6]("bom_manager.enter_config_id")))&&w(z,"label",L);const ue={};F&64&&(ue.buttonText=G[6]("generic.load")),F&2&&(ue.id=`load-list-page-${G[1]}`),S.$set(ue);const ee={};F&64&&(ee.buttonText=G[6]("generic.cancel")),F&2&&(ee.id=`cancel-config-popup-${G[1]}`),N.$set(ee),(!E||F&1)&&w(n,"open",G[0])},i(G){E||(Q(b.$$.fragment,G),Q(D.$$.fragment,G),Q(S.$$.fragment,G),Q(N.$$.fragment,G),E=!0)},o(G){se(b.$$.fragment,G),se(D.$$.fragment,G),se(S.$$.fragment,G),se(N.$$.fragment,G),E=!1},d(G){G&&K(n),H&&H.d(),Z&&Z.d(),qe(b),qe(D),qe(S),qe(N),B=!1,An(U)}}}function lF(t,n,e){let i,r,o,s,l,a,c;ye(t,Vt,P=>e(6,i=P)),ye(t,es,P=>e(20,r=P)),ye(t,an,P=>e(21,o=P)),ye(t,ti,P=>e(22,s=P)),ye(t,Ki,P=>e(23,l=P)),ye(t,$r,P=>e(24,a=P)),ye(t,hn,P=>e(7,c=P));let{openPopup:u=!1}=n,{projectData:d}=n,{language:f}=n,{country:p}=n,{apigeeToken:m}=n,{selectAndConfigBearerToken:g}=n,{view:h}=n,_=Te,b=Te,y,k;async function T(){if(of.update(()=>!1),_!==Te){hn.set(!0),e(4,y=!1);const P=await Am(_,g);P.hasError?(e(4,y=!0),e(5,k=i("bom_manager.invalid_config_msg")),hn.set(!1)):(O(),hn.set(!0),b3(_,P,p,f,m).then(async L=>{await R(L)}).catch(()=>{e(4,y=!1),e(5,k="")}))}else b!==Te&&(ho.set(!0),Jo.set(b.trim()),O());Bn("cta_click",{cta_name:"Import",cta_location:r?$i.UCCart:$i.UCList})}function R(P){var N,E,B;let L=E_(P,{}),C;l===qn?C=o:C=a,C.bom||(C.bom={parts:[]});const S=(E=(N=C==null?void 0:C.bom)==null?void 0:N.parts)==null?void 0:E.findIndex(U=>{var H,Z,V,ne;return String(U==null?void 0:U.configurationId)==P.configurationId&&(U==null?void 0:U.productCode)===((H=P==null?void 0:P.extras)==null?void 0:H.codification)||String((Z=U==null?void 0:U.orderingData)==null?void 0:Z.orderingId)==P.configurationId&&((V=U==null?void 0:U.orderingData)==null?void 0:V.productCode)===((ne=P==null?void 0:P.extras)==null?void 0:ne.codification)});let I;S>-1?(I=[L.parts[0]],_3(C,L.parts[0])):(I=L.parts,((B=C.bom).parts??(B.parts=[])).unshift(...L.parts)),l===qn?u_(C,d.id,s).then(async()=>{const U=`list|${P.configurationId}`;Bn(Nn.ADD_TO_LIST,I,"","",!1,U);const H=mn(p,o),Z=gn(f,o);await ci(d.id,H,Z,m).then(function(V){ve.info(V)}),bo(i("bom_manager.products_added_message"))}):Os(C,r).then(async()=>{const U=`cart|uco|${P.configurationId}`;Bn(Nn.ADD_TO_CART,I,"","",!1,U);const H=mn(p,o),Z=gn(f,o);await ci(r,H,Z,m).then(function(V){ve.info(V)}),bo(i("bom_manager.products_added_message"))})}function O(){Oi(Kr),e(0,u=!1),Er.update(()=>!0)}const j=()=>{O()};function q(P){b=P,e(3,b)}function M(P){_=P,e(2,_)}const z=()=>{O()},D=async()=>{await T()};return t.$$set=P=>{"openPopup"in P&&e(0,u=P.openPopup),"projectData"in P&&e(10,d=P.projectData),"language"in P&&e(11,f=P.language),"country"in P&&e(12,p=P.country),"apigeeToken"in P&&e(13,m=P.apigeeToken),"selectAndConfigBearerToken"in P&&e(14,g=P.selectAndConfigBearerToken),"view"in P&&e(1,h=P.view)},[u,h,_,b,y,k,i,c,T,O,d,f,p,m,g,j,q,M,z,D]}class cF extends Ot{constructor(n){super(),At(this,n,lF,aF,It,{openPopup:0,projectData:10,language:11,country:12,apigeeToken:13,selectAndConfigBearerToken:14,view:1},oF)}}const One="",{window:uF}=uo;function fF(t){Ut(t,"svelte-7qixqb",".pw.disabled.svelte-7qixqb.svelte-7qixqb{pointer-events:none;opacity:0.5}.pw.align-right.svelte-7qixqb.svelte-7qixqb{margin-left:auto}.pw.align-left.svelte-7qixqb.svelte-7qixqb{margin-right:auto}.pw.display-flex.svelte-7qixqb.svelte-7qixqb{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-7qixqb.svelte-7qixqb{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-7qixqb.svelte-7qixqb{font-size:16px}.pw.small-font.svelte-7qixqb.svelte-7qixqb{font-size:14px}.pw.nano-font.svelte-7qixqb.svelte-7qixqb{font-size:12px}.pw.pointer.svelte-7qixqb.svelte-7qixqb{cursor:pointer}.pw-snackbar-elem.svelte-7qixqb.svelte-7qixqb{top:30px}.pw.red-color.svelte-7qixqb.svelte-7qixqb{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-7qixqb.svelte-7qixqb{display:none}.pw.width-100.svelte-7qixqb.svelte-7qixqb{width:100%}.pw.bold-font.svelte-7qixqb.svelte-7qixqb{font-weight:bold}.pw.normal-font.svelte-7qixqb.svelte-7qixqb{font-weight:normal;font-size:16px}.pw.error-msg.svelte-7qixqb.svelte-7qixqb{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-7qixqb.svelte-7qixqb{text-align:center}.pw.center-align-items.svelte-7qixqb.svelte-7qixqb{align-items:center}.pw.justify-content-center.svelte-7qixqb.svelte-7qixqb{justify-content:center}.pw.bom-checkbox.svelte-7qixqb.svelte-7qixqb{max-width:16px}.pw.ml-8.svelte-7qixqb.svelte-7qixqb{margin-left:8px}.pw.ml-12.svelte-7qixqb.svelte-7qixqb{margin-left:12px}.pw.ml-36.svelte-7qixqb.svelte-7qixqb{margin-left:36px}.pw.mt-8.svelte-7qixqb.svelte-7qixqb{margin-top:8px}.pw.mt-6.svelte-7qixqb.svelte-7qixqb{margin-top:6px}.pw.mt-32.svelte-7qixqb.svelte-7qixqb{margin-top:32px}.pw.mb-8.svelte-7qixqb.svelte-7qixqb{margin-bottom:8px}.pw.mb-12.svelte-7qixqb.svelte-7qixqb{margin-bottom:12px}.pw.mb-16.svelte-7qixqb.svelte-7qixqb{margin-top:16px}.pw.mb-21.svelte-7qixqb.svelte-7qixqb{margin-bottom:21px}.pw.mr-12.svelte-7qixqb.svelte-7qixqb{margin-right:12px}.pw.p-12.svelte-7qixqb.svelte-7qixqb{padding:12px}.pw.pl-16.svelte-7qixqb.svelte-7qixqb{padding-left:16px}.pw.pr-16.svelte-7qixqb.svelte-7qixqb{padding-right:16px}.position-absolute.svelte-7qixqb.svelte-7qixqb{position:absolute}.flex-wrap.svelte-7qixqb.svelte-7qixqb{flex-wrap:wrap}.justify-content-sp-btw.svelte-7qixqb.svelte-7qixqb{justify-content:space-between}.gp-10.svelte-7qixqb.svelte-7qixqb{gap:10px}.gp-5.svelte-7qixqb.svelte-7qixqb{gap:5px}.desktop-view.svelte-7qixqb.svelte-7qixqb{display:none}.mobile-view.svelte-7qixqb.svelte-7qixqb{display:block}.mobile-view-flx.svelte-7qixqb.svelte-7qixqb{display:flex;flex-direction:column}.rounded-border.svelte-7qixqb.svelte-7qixqb{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-7qixqb.svelte-7qixqb{text-align:right}.bg-color-light-grey.svelte-7qixqb.svelte-7qixqb{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-7qixqb.svelte-7qixqb{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-7qixqb.svelte-7qixqb{padding:8px 0 16px 8px}.country-fr.svelte-7qixqb .config-container.svelte-7qixqb,.country-fr.svelte-7qixqb .excel-container.svelte-7qixqb,.country-pt.svelte-7qixqb .config-container.svelte-7qixqb,.country-pt.svelte-7qixqb .excel-container.svelte-7qixqb{padding-left:5px}.country-fr.svelte-7qixqb .config-container .excel-heading.svelte-7qixqb,.country-fr.svelte-7qixqb .config-container .upload-container.svelte-7qixqb,.country-fr.svelte-7qixqb .excel-container .excel-heading.svelte-7qixqb,.country-fr.svelte-7qixqb .excel-container .upload-container.svelte-7qixqb,.country-pt.svelte-7qixqb .config-container .excel-heading.svelte-7qixqb,.country-pt.svelte-7qixqb .config-container .upload-container.svelte-7qixqb,.country-pt.svelte-7qixqb .excel-container .excel-heading.svelte-7qixqb,.country-pt.svelte-7qixqb .excel-container .upload-container.svelte-7qixqb{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-7qixqb .button-action-section.svelte-7qixqb,.country-pt.svelte-7qixqb .button-action-section.svelte-7qixqb{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-7qixqb .search-label.svelte-7qixqb,.country-fr.svelte-7qixqb .with-icon.svelte-7qixqb,.country-pt.svelte-7qixqb .search-label.svelte-7qixqb,.country-pt.svelte-7qixqb .with-icon.svelte-7qixqb{font-size:var(--p-font-size, 0.87rem)}@media(min-width: 968px){.mobile-view.svelte-7qixqb.svelte-7qixqb,.mobile-view-flx.svelte-7qixqb.svelte-7qixqb{display:none}.desktop-view.svelte-7qixqb.svelte-7qixqb{display:inherit}}.cart-mobile-snackbar.svelte-7qixqb.svelte-7qixqb{position:fixed;top:0;width:100%;height:92px;font-size:12px}.cart-mobile-snackbar.svelte-7qixqb .mobile-snackbar.svelte-7qixqb{flex-direction:column;height:92px;justify-content:center}.cart-mobile-snackbar.svelte-7qixqb .mobile-snackbar .snackbar-btn-class.svelte-7qixqb{max-width:90%;padding:6px;border:solid 2px;cursor:pointer;margin-top:17px;width:90%;text-align:center;border-radius:5px}.desktop-view-snackbar.svelte-7qixqb.svelte-7qixqb,.mobile-view-snackbar.svelte-7qixqb.svelte-7qixqb{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-7qixqb.svelte-7qixqb{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-7qixqb.svelte-7qixqb{display:block}.mobile-snackbar.svelte-7qixqb.svelte-7qixqb{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-7qixqb.svelte-7qixqb{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.snackbar-mobile-div.svelte-7qixqb .snackbar-header.svelte-7qixqb{padding:12px 20px}.snackbar-mobile-div.svelte-7qixqb .close-snackbar.svelte-7qixqb{padding:10px 16px}.snackbar-mobile-div.svelte-7qixqb .snackbar-btn-class-div.svelte-7qixqb{width:90%;border-radius:5px;border:2px solid white;height:34px;margin:5px 18px;justify-content:center;align-items:center}.cross-margin.svelte-7qixqb.svelte-7qixqb{margin:-6px}.bottom-snackbar.svelte-7qixqb.svelte-7qixqb{bottom:30px;top:auto}.hmc-button.svelte-7qixqb.svelte-7qixqb{display:flex;flex-direction:row-reverse;width:200px}.se-reference-container.svelte-7qixqb.svelte-7qixqb{padding:2px 16px;justify-content:flex-start;flex-wrap:wrap;gap:16px}@media(max-width: 768px){.se-reference-container.svelte-7qixqb.svelte-7qixqb{padding:2px 10px 8px}}#template-lbl.svelte-7qixqb.svelte-7qixqb{color:var(--se-medium-blue, #0075a3);font-weight:normal;visibility:visible;margin:0 -2px;padding:0 5px}#template-lbl.svelte-7qixqb.svelte-7qixqb:hover{text-decoration:underline}.excel-container.svelte-7qixqb.svelte-7qixqb{display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:14px;padding-left:5px;height:auto;flex-grow:1;width:unset;padding-top:2px}.upload-container.svelte-7qixqb.svelte-7qixqb{display:-ms-flexbox;display:-webkit-flex;display:flex;color:var(--se-medium-blue, #219bfd);margin-top:16px}@media(max-width: 768px){.upload-container.svelte-7qixqb.svelte-7qixqb{margin:8px 0 10px}}.upload-container-lock.svelte-7qixqb.svelte-7qixqb{display:-ms-flexbox;display:-webkit-flex;display:flex;margin-top:16px}.add-icon.svelte-7qixqb.svelte-7qixqb{top:8px;position:relative;visibility:visible;position:relative;border:1px solid;border-radius:5px}.isLoggedInAddIcon.svelte-7qixqb.svelte-7qixqb{margin-bottom:22px;padding:5px;margin-top:30px}.isNonLoggedInAddIcon.svelte-7qixqb.svelte-7qixqb{margin-bottom:11px}.isLoggedInQuantity.svelte-7qixqb.svelte-7qixqb{margin-bottom:8px}.reference-number-container.svelte-7qixqb.svelte-7qixqb{font-size:16px;box-sizing:border-box;padding-bottom:10px}@media(max-width: 968px){.reference-number-container.svelte-7qixqb.svelte-7qixqb{max-width:calc(100vw - 70px);width:100%}}.input-block.svelte-7qixqb.svelte-7qixqb{margin-top:2px;height:33px}.divider.svelte-7qixqb.svelte-7qixqb{border:1px solid var(--se-ultra-light-grey-1, #ededed)}.excel-heading.svelte-7qixqb.svelte-7qixqb{padding-left:3px}.add-icon-container.svelte-7qixqb.svelte-7qixqb{display:flex;justify-content:center;align-items:flex-start;padding-bottom:1px;width:70px}@media(max-width: 768px){.add-icon-container.svelte-7qixqb.svelte-7qixqb{width:42px;flex-shrink:0}}.guided-search-excel.svelte-7qixqb div.svelte-7qixqb{overflow:hidden}.quant-container.svelte-7qixqb.svelte-7qixqb{width:64px;min-width:38px;align-items:flex-end}@media(max-width: 768px){.quant-container.svelte-7qixqb.svelte-7qixqb{width:50px;flex-shrink:0;align-items:flex-start}}.quantity-input.svelte-7qixqb.svelte-7qixqb{height:calc(var(--qds-control-standard-height) - 4px);border:1px solid var(--se-dark-grey, #626469);border-radius:5px;width:100%;outline:none;text-align:center}.config-container.svelte-7qixqb.svelte-7qixqb{padding-left:0}.mobile-hmc-container.svelte-7qixqb.svelte-7qixqb{gap:16px}@media(max-width: 768px){.mobile-hmc-container.svelte-7qixqb.svelte-7qixqb{width:100%;padding-bottom:10px}}.plus-icon-cls.svelte-7qixqb.svelte-7qixqb{margin-bottom:5px}.quantity-add-container.svelte-7qixqb.svelte-7qixqb{margin-bottom:5px}.btn.svelte-7qixqb.svelte-7qixqb{width:40px;height:42px;border:1px solid var(--se-dark-grey, #626469);justify-content:center;align-items:center}.btn-increase.svelte-7qixqb.svelte-7qixqb{border-radius:5px;width:100%}.bom-heading.svelte-7qixqb.svelte-7qixqb{padding-top:20px}.margin-bottom-5.svelte-7qixqb.svelte-7qixqb{margin-bottom:5px}@media(min-width: 968px){.config-container.svelte-7qixqb.svelte-7qixqb{padding:4px 0 1px 5px}.add-icon-container.svelte-7qixqb.svelte-7qixqb{width:unset}.btn-increase.svelte-7qixqb.svelte-7qixqb{height:30px;width:32px}}@media(max-width: 968px){.isNonLoggedInAddIcon.svelte-7qixqb.svelte-7qixqb{padding:5px}}.cart.svelte-7qixqb .se-reference-container.svelte-7qixqb{gap:6px;padding:6px}@media(max-width: 968px){.cart.svelte-7qixqb .se-reference-container.svelte-7qixqb{flex-direction:column}}@media(max-width: 968px){.cart.svelte-7qixqb .reference-number-container.svelte-7qixqb{max-width:calc(100vw - 68px)}}.cart.svelte-7qixqb .add-icon-container.svelte-7qixqb{width:34px;margin-left:0;margin-right:5px}.cart.svelte-7qixqb .quant-container.svelte-7qixqb{width:64px}@media(max-width: 768px){.cart.svelte-7qixqb .quant-container.svelte-7qixqb{width:50px}}.cart.svelte-7qixqb .reference-number-container.svelte-7qixqb{flex:1;gap:5px;max-width:396px;min-width:320px}@media(max-width: 968px){.cart.svelte-7qixqb .reference-number-container.svelte-7qixqb{min-width:290px}}.cart.svelte-7qixqb .excel-container.svelte-7qixqb{padding-left:0}.cart.svelte-7qixqb .excel-upload-cart.svelte-7qixqb{gap:7px}@media(min-width: 1340px){.cart.svelte-7qixqb .excel-upload-cart.svelte-7qixqb{width:317px}}@media(min-width: 1280px) and (max-width: 1340px){.cart.svelte-7qixqb .excel-upload-cart.svelte-7qixqb{width:265px}}@media(min-width: 1140px) and (max-width: 1280px){.cart.svelte-7qixqb .excel-upload-cart.svelte-7qixqb{width:250px}}@media(min-width: 1024px) and (max-width: 1140px){.cart.svelte-7qixqb .excel-upload-cart.svelte-7qixqb{width:220px}}.cart.svelte-7qixqb .add-config-cart.svelte-7qixqb{gap:3px;width:310px}@media(min-width: 1280px) and (max-width: 1340px){.cart.svelte-7qixqb .add-config-cart.svelte-7qixqb{width:275px}}@media(min-width: 1140px) and (max-width: 1280px){.cart.svelte-7qixqb .add-config-cart.svelte-7qixqb{width:235px}}@media(min-width: 1024px) and (max-width: 1140px){.cart.svelte-7qixqb .add-config-cart.svelte-7qixqb{width:215px}}@media(max-width: 768px){.cart.svelte-7qixqb .add-config-cart.svelte-7qixqb{width:auto;max-width:100%;overflow:hidden}}.loggedIn-reference.svelte-7qixqb .quant-container input.svelte-7qixqb,.loggedIn-reference.svelte-7qixqb .add-icon-container input.svelte-7qixqb{height:29px}.loggedIn-reference.svelte-7qixqb .quant-container .btn-increase.svelte-7qixqb,.loggedIn-reference.svelte-7qixqb .add-icon-container .btn-increase.svelte-7qixqb{height:33px}@media(max-width: 968px){.loggedIn-reference.svelte-7qixqb .quant-container input.svelte-7qixqb,.loggedIn-reference.svelte-7qixqb .quant-container .btn-increase.svelte-7qixqb,.loggedIn-reference.svelte-7qixqb .add-icon-container input.svelte-7qixqb,.loggedIn-reference.svelte-7qixqb .add-icon-container .btn-increase.svelte-7qixqb{height:39px}.loggedIn-reference.svelte-7qixqb .quant-container .btn-increase.svelte-7qixqb,.loggedIn-reference.svelte-7qixqb .add-icon-container .btn-increase.svelte-7qixqb{height:42px}}.non-loggedIn-reference.svelte-7qixqb .quant-container.svelte-7qixqb,.non-loggedIn-reference.svelte-7qixqb .add-icon-container.svelte-7qixqb{height:33px}.non-loggedIn-reference.svelte-7qixqb .quant-container input.svelte-7qixqb,.non-loggedIn-reference.svelte-7qixqb .add-icon-container input.svelte-7qixqb{height:32px}.non-loggedIn-reference.svelte-7qixqb .quant-container .btn-increase.svelte-7qixqb,.non-loggedIn-reference.svelte-7qixqb .add-icon-container .btn-increase.svelte-7qixqb{height:32px;margin-top:1px}@media(max-width: 968px){.non-loggedIn-reference.svelte-7qixqb .quant-container .btn-increase.svelte-7qixqb,.non-loggedIn-reference.svelte-7qixqb .add-icon-container .btn-increase.svelte-7qixqb{height:42px}.non-loggedIn-reference.svelte-7qixqb .quant-container input.svelte-7qixqb,.non-loggedIn-reference.svelte-7qixqb .add-icon-container input.svelte-7qixqb{height:43px}}.text-link.svelte-7qixqb.svelte-7qixqb{color:var(--se-medium-blue, #0075a3)}.add-product-title.svelte-7qixqb.svelte-7qixqb{font-size:22px}.guided-search-right.svelte-7qixqb.svelte-7qixqb{display:flex;flex-direction:column}.guided-search-right_top.pw.svelte-7qixqb.svelte-7qixqb{margin-bottom:18px}.guided-search-right_bottom.svelte-7qixqb.svelte-7qixqb{display:flex;width:103px;gap:5px}@media(max-width: 768px){.guided-search-right_bottom.svelte-7qixqb.svelte-7qixqb{width:auto}}.non-loggedIn-reference.svelte-7qixqb .guided-search-right_top.pw.svelte-7qixqb{margin-bottom:17px}.loggedIn-reference.svelte-7qixqb .guided-search-right_bottom.svelte-7qixqb{height:33px}")}function nk(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O;function j(z){t[31](z)}function q(z){t[32](z)}let M={apigeeToken:t[10],language:t[4],country:t[3],token:t[5],label:t[17]("generic.se_reference_no"),placeholder:t[17]("bom_manager.search_by_se"),stacked:"true",view:t[9],isFromCart:t[8]};return t[0]!==void 0&&(M.cataloginput=t[0]),t[1]!==void 0&&(M.productSearch=t[1]),e=new nF({props:M}),_t.push(()=>Ct(e,"cataloginput",j)),_t.push(()=>Ct(e,"productSearch",q)),e.$on("productSelected",t[33]),{c(){var z,D;n=A("div"),De(e.$$.fragment),o=Y(),s=A("div"),l=A("span"),l.textContent="?",a=Y(),c=A("div"),u=A("div"),d=A("input"),m=Y(),g=A("div"),h=A("span"),_=A("qds-icon"),_.innerHTML="",x(l,"class","pw base-font pw mb-12 search-label guided-search-right_top svelte-7qixqb"),x(d,"class",Nt("quantity-input")+" svelte-7qixqb"),x(d,"id",f=`guided-qty-list-page-${t[9]}`),d.disabled=p=((z=t[18])==null?void 0:z.isArchived)||t[20][pr]===Ae.DISABLED,x(d,"maxlength","4"),x(d,"autocomplete","off"),d.value=t[14],x(u,"class","quant-container display-flex svelte-7qixqb"),w(_,"name","chevron-right"),w(_,"size","small"),w(_,"id","ic-hide-children"),w(_,"classname","large-spacing"),x(h,"class",b=Nt(`pw pointer btn btn-increase display-flex ${t[13]===void 0||Number(t[14])i=!1)),!r&&D[0]&2&&(r=!0,P.productSearch=z[1],Tt(()=>r=!1)),e.$set(P),(!T||D[0]&512&&f!==(f=`guided-qty-list-page-${z[9]}`))&&x(d,"id",f),(!T||D[0]&1310720&&p!==(p=((L=z[18])==null?void 0:L.isArchived)||z[20][pr]===Ae.DISABLED))&&(d.disabled=p),(!T||D[0]&16384&&d.value!==z[14])&&(d.value=z[14]),(!T||D[0]&1368064&&b!==(b=Nt(`pw pointer btn btn-increase display-flex ${z[13]===void 0||Number(z[14])Ct(n,"openPopup",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&262144&&(a.projectData=s[18]),l[0]&16&&(a.language=s[4]),l[0]&8&&(a.country=s[3]),l[0]&1024&&(a.apigeeToken=s[10]),l[0]&128&&(a.selectAndConfigBearerToken=s[7]),l[0]&512&&(a.view=s[9]),!e&&l[0]&65536&&(e=!0,a.openPopup=s[16],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function hF(t){var ae;let n,e,i,r,o,s,l,a=t[17]("cart.add_products")+"",c,u,d,f,p,m,g,h,_,b,y,k,T,R=t[17]("bom_manager.by_config_id")+"",O,j,q,M,z,D,P,L,C,S,I,N,E,B=t[17]("bom_manager.by_machine_application")+"",U,H,Z,V,ne,W,re,G,F,X,le,ue;p=new Gt({props:{buttonSize:"large",id:"btn-hmc-mb-desktop",action:"next",disabled:(ae=t[18])==null?void 0:ae.isArchived,buttonText:t[17]("generic.help_me_choose")}}),p.$on("btnClick",t[30]);let ee=(t[20][pr]===Ae.SHOW||t[20][pr]===Ae.DISABLED)&&nk(t),$=(t[20][mo]===Ae.SHOW||t[20][mo]===Ae.DISABLED)&&ik(t);function he(ie,_e){return ie[20][Hl]===Ae.SHOW||ie[20][Hl]===Ae.DISABLED?pF:dF}let me=he(t),te=me(t),oe=(t[20][to]===Ae.SHOW||t[20][to]===Ae.DISABLED)&&rk(t);Z=new Gt({props:{id:"btn-hmc-mb",buttonText:t[17]("generic.help_me_choose"),iconClassName:"chevron-right",buttonSize:"large"}}),Z.$on("btnClick",t[38]);let ce=t[16]&&sk(t);function ge(ie){t[40](ie)}let fe={projectId:t[6],apigeeToken:t[10],language:t[4],country:t[3],isCart:t[8],view:t[9]};return t[2]!==void 0&&(fe.uploadPopup=t[2]),G=new kz({props:fe}),_t.push(()=>Ct(G,"uploadPopup",ge)),{c(){n=A("se-loading"),e=Y(),i=A("se-block"),r=A("se-block-header"),o=A("div"),s=A("div"),l=A("h4"),c=de(a),d=Y(),f=A("div"),De(p.$$.fragment),m=Y(),g=A("div"),ee&&ee.c(),h=Y(),_=A("div"),b=A("se-divider"),y=Y(),k=A("div"),T=A("span"),O=de(R),q=Y(),$&&$.c(),z=Y(),D=A("div"),P=A("se-divider"),L=Y(),C=A("se-block"),te.c(),S=Y(),oe&&oe.c(),I=Y(),N=A("div"),E=A("div"),U=de(B),H=Y(),De(Z.$$.fragment),W=Y(),ce&&ce.c(),re=Y(),De(G.$$.fragment),w(n,"loading",t[21]),w(n,"overlay","true"),w(n,"full-page","true"),x(l,"id",u=`add-products-head-list-page-${t[9]}`),x(l,"class","add-product-title svelte-7qixqb"),x(f,"class","display-flex svelte-7qixqb"),x(o,"class","pw width-100 display-flex justify-content-sp-btw bom-heading svelte-7qixqb"),w(r,"class","desktop-view svelte-7qixqb"),w(b,"class","divider desktop-view svelte-7qixqb"),x(T,"class",j="excel-heading pw base-font "+(t[8]?`font-${t[4]}`:Te)+" svelte-7qixqb"),x(k,"class",M="config-container "+(t[8]?`padding-${t[4]}`:Te)+" svelte-7qixqb"),x(_,"class","display-flex gp-10 add-config-cart svelte-7qixqb"),w(P,"class","divider svelte-7qixqb"),w(C,"class","excel-container svelte-7qixqb"),x(D,"class","display-flex desktop-view gp-10 excel-upload-cart svelte-7qixqb"),x(E,"class","excel-heading pw base-font svelte-7qixqb"),x(N,"class","mobile-view-flx display-flex mobile-hmc-container svelte-7qixqb"),x(g,"class",V="se-reference-container display-flex "+(t[8]?`pw normal-font country-${t[4]}`:Te)+" svelte-7qixqb"),w(i,"class",ne="pw "+(t[8]?"cart":"")+" svelte-7qixqb")},m(ie,_e){J(ie,n,_e),J(ie,e,_e),J(ie,i,_e),v(i,r),v(r,o),v(o,s),v(s,l),v(l,c),v(o,d),v(o,f),Me(p,f,null),v(i,m),v(i,g),ee&&ee.m(g,null),v(g,h),v(g,_),v(_,b),v(_,y),v(_,k),v(k,T),v(T,O),v(k,q),$&&$.m(k,null),v(g,z),v(g,D),v(D,P),v(D,L),v(D,C),te.m(C,null),v(C,S),oe&&oe.m(C,null),v(g,I),v(g,N),v(N,E),v(E,U),v(N,H),Me(Z,N,null),J(ie,W,_e),ce&&ce.m(ie,_e),J(ie,re,_e),Me(G,ie,_e),X=!0,le||(ue=xe(uF,"CONFIGURATOR_ADD_TO_BOM",t[25]),le=!0)},p(ie,_e){var Se;(!X||_e[0]&2097152)&&w(n,"loading",ie[21]),(!X||_e[0]&131072)&&a!==(a=ie[17]("cart.add_products")+"")&&be(c,a),(!X||_e[0]&512&&u!==(u=`add-products-head-list-page-${ie[9]}`))&&x(l,"id",u);const Ie={};_e[0]&262144&&(Ie.disabled=(Se=ie[18])==null?void 0:Se.isArchived),_e[0]&131072&&(Ie.buttonText=ie[17]("generic.help_me_choose")),p.$set(Ie),ie[20][pr]===Ae.SHOW||ie[20][pr]===Ae.DISABLED?ee?(ee.p(ie,_e),_e[0]&1048576&&Q(ee,1)):(ee=nk(ie),ee.c(),Q(ee,1),ee.m(g,h)):ee&&(Je(),se(ee,1,1,()=>{ee=null}),Qe()),(!X||_e[0]&131072)&&R!==(R=ie[17]("bom_manager.by_config_id")+"")&&be(O,R),(!X||_e[0]&272&&j!==(j="excel-heading pw base-font "+(ie[8]?`font-${ie[4]}`:Te)+" svelte-7qixqb"))&&x(T,"class",j),ie[20][mo]===Ae.SHOW||ie[20][mo]===Ae.DISABLED?$?($.p(ie,_e),_e[0]&1048576&&Q($,1)):($=ik(ie),$.c(),Q($,1),$.m(k,null)):$&&(Je(),se($,1,1,()=>{$=null}),Qe()),(!X||_e[0]&272&&M!==(M="config-container "+(ie[8]?`padding-${ie[4]}`:Te)+" svelte-7qixqb"))&&x(k,"class",M),me===(me=he(ie))&&te?te.p(ie,_e):(te.d(1),te=me(ie),te&&(te.c(),te.m(C,S))),ie[20][to]===Ae.SHOW||ie[20][to]===Ae.DISABLED?oe?(oe.p(ie,_e),_e[0]&1048576&&Q(oe,1)):(oe=rk(ie),oe.c(),Q(oe,1),oe.m(C,null)):oe&&(Je(),se(oe,1,1,()=>{oe=null}),Qe()),(!X||_e[0]&131072)&&B!==(B=ie[17]("bom_manager.by_machine_application")+"")&&be(U,B);const we={};_e[0]&131072&&(we.buttonText=ie[17]("generic.help_me_choose")),Z.$set(we),(!X||_e[0]&272&&V!==(V="se-reference-container display-flex "+(ie[8]?`pw normal-font country-${ie[4]}`:Te)+" svelte-7qixqb"))&&x(g,"class",V),(!X||_e[0]&256&&ne!==(ne="pw "+(ie[8]?"cart":"")+" svelte-7qixqb"))&&w(i,"class",ne),ie[16]?ce?(ce.p(ie,_e),_e[0]&65536&&Q(ce,1)):(ce=sk(ie),ce.c(),Q(ce,1),ce.m(re.parentNode,re)):ce&&(Je(),se(ce,1,1,()=>{ce=null}),Qe());const pe={};_e[0]&64&&(pe.projectId=ie[6]),_e[0]&1024&&(pe.apigeeToken=ie[10]),_e[0]&16&&(pe.language=ie[4]),_e[0]&8&&(pe.country=ie[3]),_e[0]&256&&(pe.isCart=ie[8]),_e[0]&512&&(pe.view=ie[9]),!F&&_e[0]&4&&(F=!0,pe.uploadPopup=ie[2],Tt(()=>F=!1)),G.$set(pe)},i(ie){X||(Q(p.$$.fragment,ie),Q(ee),Q($),Q(oe),Q(Z.$$.fragment,ie),Q(ce),Q(G.$$.fragment,ie),X=!0)},o(ie){se(p.$$.fragment,ie),se(ee),se($),se(oe),se(Z.$$.fragment,ie),se(ce),se(G.$$.fragment,ie),X=!1},d(ie){ie&&(K(n),K(e),K(i),K(W),K(re)),qe(p),ee&&ee.d(),$&&$.d(),te.d(),oe&&oe.d(),qe(Z),ce&&ce.d(ie),qe(G,ie),le=!1,ue()}}}function mF(t,n,e){let i,r,o,s,l,a,c,u,d,f,p,m,g,h;ye(t,Vt,pe=>e(17,i=pe)),ye(t,an,pe=>e(18,r=pe)),ye(t,ti,pe=>e(42,o=pe)),ye(t,tr,pe=>e(43,s=pe)),ye(t,Ki,pe=>e(44,l=pe)),ye(t,nr,pe=>e(45,a=pe)),ye(t,Wi,pe=>e(46,c=pe)),ye(t,es,pe=>e(19,u=pe)),ye(t,ql,pe=>e(47,d=pe)),ye(t,$r,pe=>e(48,f=pe)),ye(t,Ii,pe=>e(20,p=pe)),ye(t,Jt,pe=>e(21,m=pe)),ye(t,wr,pe=>e(22,g=pe)),ye(t,Uc,pe=>e(23,h=pe));let{country:_="us"}=n,{language:b="en"}=n,{token:y}=n,{cataloginput:k=""}=n,{productSearch:T=null}=n,{projectId:R}=n,{selectAndConfigBearerToken:O}=n,{isCart:j}=n,{view:q}=n,{apigeeToken:M}=n,z=null,D=1,P=!0,L,C=!1;Un(()=>{Jt.set(!1),ee()});let{clickOnUpload:S=()=>{I()}}=n,{receiveAction:I=()=>{ve.info("receiveAction called")}}=n;function N(pe){pe.catalogNumber?e(13,z=pe):e(13,z=void 0)}function E(){var pe;if(!(z===void 0||Number(D)!0),Ko.update(()=>!0);else if(z&&z.catalogNumber&&D>=1){if(((pe=B(z.catalogNumber))==null?void 0:pe.quantity)+D>=Rf)return;let Se=r,Le=f;(Le==null?void 0:Le.id)===void 0&&(Se!=null&&Se.id)&&(Le.id=Se.id),e(13,z.quantity=D,z);const Re=j?Nn.ADD_TO_CART:Nn.ADD_TO_LIST,Ee=[{productRef:z.catalogNumber,quantity:D}];Bn(Re,Ee,"","",!1,j?"cart|uco|search_reference":"list|search_reference",!1),H(j?Le:Se,z)}else G()}function B(pe){var Se,Le;return(Le=(Se=r==null?void 0:r.bom)==null?void 0:Se.parts)==null?void 0:Le.find(Re=>(Re==null?void 0:Re.productRef)===pe||(Re==null?void 0:Re.productId)===pe)}function U(){return d.includes($f)}function H(pe,Se){var ke,Ce,Ne,Pe,Ve,ot;(Ce=(ke=pe==null?void 0:pe.bom)==null?void 0:ke.parts)!=null&&Ce.length?(F(pe.bom.parts),P&&V(pe),P=!0):(Ne=pe==null?void 0:pe.bom)!=null&&Ne.parts?pe.bom.parts=Z():(Ve=(Pe=pe.bom)==null?void 0:Pe.groups)!=null&&Ve.length?pe.bom={parts:Z(),groups:[...((ot=pe.bom)==null?void 0:ot.groups)||[]]}:pe.bom={parts:Z()};const Le=String(pe.id),Re={...pe};let Ee=Qc(Re);Ee.description=Ee!=null&&Ee.description?Ee.description:"",j?W(Ee,Le,Se):re(Ee,Le,Se)}function Z(){return[{id:Te,description:String(z.description),productRef:String(z.catalogNumber),quantity:D,source:Du}]}function V(pe){var Se,Le;(Le=(Se=pe==null?void 0:pe.bom)==null?void 0:Se.parts)==null||Le.unshift({id:Te,description:String(z.description),productRef:String(z.catalogNumber),quantity:D,source:Du})}function ne(pe){return(pe==null?void 0:pe.quantity)===1?"{activity_log.message_product_reference}"+cn+Es+String(pe==null?void 0:pe.catalogNumber)+Es:String(pe==null?void 0:pe.quantity)+cn+"{activity_log.message_products}"}async function W(pe,Se,Le){const Re=i("bom_manager.products_added_to_cart_message"),Ee={bom:pe==null?void 0:pe.bom,isTransferred:!1};await Os(Ee,u).then(ke=>{if(ke.error)jt(Wi,c=!0,c),jt(nr,a=i(l===Vn?"validation_check.error_message_cart":"validation_check.error_message_list"),a),jt(tr,s="error",s);else{jt(Wi,c=!0,c),jt(nr,a=Re,a),jt(tr,s=xr,s),X(),e(1,T=null);const Ce=mn(_,r),Ne=gn(b,r);ci(Se,Ce,Ne,M).then(function(Pe){ve.info(Pe),zt()&&ne(Le)}).catch(function(Pe){ve.error(Pe)})}})}function re(pe,Se,Le){const Re=i("edit_list.list_updated_successfully_message");Vi(pe,Se,Re,o).then(Ee=>{var Ne;e(1,T=null);const ke=mn(_,r),Ce=gn(b,r);ci(Se,ke,Ce,M).then(function(Pe){if(ve.info(Pe),zt()){const Ve=ne(Le);Br(Se,"{activity_log.message_product_added_action}","{activity_log.message_product_added_reference_subaction}","{activity_log.message_added_product}"+cn+Ve+cn+"{activity_log.message_via_reference}",[Le])}}).catch(function(Pe){ve.error(Pe)}),(Ne=Ee==null?void 0:Ee.data)!=null&&Ne.id&&(X(),ve.info("Project updated for with ID: ",Se))}).finally(()=>{ve.info("Project updated for with IDfin: ",Se)})}function G(){const pe=z?D<1?String(i("bom_manager.item_greater_than_1")):Te:String(i("bom_manager.search_and_then_search"));pe||Ja(pe)}function F(pe){const Se=pe==null?void 0:pe.findIndex(Le=>{const Re=!Object.prototype.hasOwnProperty.call(Le,"partType")&&!Object.prototype.hasOwnProperty.call(z,"partType"),Ee=Object.prototype.hasOwnProperty.call(Le,"partType")&&Object.prototype.hasOwnProperty.call(z,"partType"),ke=Le.partType==="nonCto"&&!Object.prototype.hasOwnProperty.call(z,"partType")||z.partType==="nonCto"&&!Object.prototype.hasOwnProperty.call(Le,"partType");return Re||Ee||ke?Le.productId===z.catalogNumber||Le.productRef===z.catalogNumber:!1});Se!==-1&&(P=!1,pe[Se].quantity=Number(pe[Se].quantity)+Number(D))}function X(){e(0,k=Te),e(14,D=1),e(13,z=void 0)}function le(){var Se;const pe=rl()?ju:Ru;vf(pe,String(We.language),sh[(Se=We.language)==null?void 0:Se.toLowerCase()])}function ue(pe){ws.set(pe)}function ee(){const pe=document.getElementById("guided-qty"),Se=document.getElementById("btn-hmc-mb"),Le=` .qds-button { display: flex !important; flex-direction: row-reverse; justify-content: space-between !important; width: 200px; } `;pe!=null&&pe.shadowRoot&&kf(pe,` .qds-input { width: 100%; } `),Se!=null&&Se.shadowRoot&&kf(Se,Le)}function $(){Oi(Ds),e(16,C=!0),Er.update(()=>!1)}function he(){if(zt()){const pe=j?"?cart=true":`?list=true&id=${R}`,Se=`${lr}${sA}${pe}`;ve.info("navigate to hmc private :: ",Se),Ar(Se)}else{const pe=j?"?cart=true":"?list=true",Se=`${O1[We.environment]}/${(_??"").toLowerCase()}/${b}/user${oA}${pe}`;ve.info("navigate to hmc public :: ",Se),window.location.href=Se}Bn(Nn.CTA_CLICK,{cta_name:"Help me choose",cta_location:j?$i.UCCart:$i.UCList})}Kn(()=>{ue(!1)});const me=()=>{he(),gs(Ai.HELP_ME_CHOOSE_LIST.action,j?Ai.HELP_ME_CHOOSE_CART.subaction:Ai.HELP_ME_CHOOSE_LIST.subaction,String(g.platform),j?void 0:zt()?r==null?void 0:r.id:void 0,j||zt()||r==null?void 0:r.id,void 0,u),Bn("cta_click",{cta_name:"Help me choose",cta_location:j?$i.UCCart:$i.UCList})};function te(pe){k=pe,e(0,k)}function oe(pe){T=pe,e(1,T)}const ce=({detail:pe})=>{N(pe)},ge=pe=>{jt(Uc,h=cm(pe),h)},fe=pe=>{var Le,Re;const Se=Number((Le=pe==null?void 0:pe.target)==null?void 0:Le.value);isNaN(Se)?e(15,L=1):(e(14,D=(Re=pe==null?void 0:pe.target)==null?void 0:Re.value),e(15,L=Se),jt(Uc,h=D,h))},ae=()=>{$()},ie=()=>{S(),Oi(Ds)},_e=()=>he();function Ie(pe){C=pe,e(16,C)}function we(pe){I=pe,e(2,I)}return t.$$set=pe=>{"country"in pe&&e(3,_=pe.country),"language"in pe&&e(4,b=pe.language),"token"in pe&&e(5,y=pe.token),"cataloginput"in pe&&e(0,k=pe.cataloginput),"productSearch"in pe&&e(1,T=pe.productSearch),"projectId"in pe&&e(6,R=pe.projectId),"selectAndConfigBearerToken"in pe&&e(7,O=pe.selectAndConfigBearerToken),"isCart"in pe&&e(8,j=pe.isCart),"view"in pe&&e(9,q=pe.view),"apigeeToken"in pe&&e(10,M=pe.apigeeToken),"clickOnUpload"in pe&&e(11,S=pe.clickOnUpload),"receiveAction"in pe&&e(2,I=pe.receiveAction)},[k,T,I,_,b,y,R,O,j,q,M,S,N,z,D,L,C,i,r,u,p,m,g,h,E,X,le,$,he,ue,me,te,oe,ce,ge,fe,ae,ie,_e,Ie,we]}class r1 extends Ot{constructor(n){super(),At(this,n,mF,hF,It,{country:3,language:4,token:5,cataloginput:0,productSearch:1,projectId:6,selectAndConfigBearerToken:7,isCart:8,view:9,apigeeToken:10,clickOnUpload:11,receiveAction:2,selectData:12,setSnackbarVisibility:29},fF,[-1,-1])}get selectData(){return this.$$.ctx[12]}get setSnackbarVisibility(){return this.$$.ctx[29]}}const Pne="";function gF(t){Ut(t,"svelte-1uavdqx",".pw.display-flex.svelte-1uavdqx.svelte-1uavdqx{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1uavdqx.svelte-1uavdqx{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.pointer.svelte-1uavdqx.svelte-1uavdqx{cursor:pointer}.pw.bold-font.svelte-1uavdqx.svelte-1uavdqx{font-weight:bold}.desktop-view.svelte-1uavdqx.svelte-1uavdqx{display:none}.mobile-view.svelte-1uavdqx.svelte-1uavdqx{display:block}@media(min-width: 968px){.mobile-view.svelte-1uavdqx.svelte-1uavdqx{display:none}.desktop-view.svelte-1uavdqx.svelte-1uavdqx{display:inherit}}@media(min-width: 768px){}@media(max-width: 767px){}.user-cart.svelte-1uavdqx.svelte-1uavdqx{padding:2px 0 10px}@media(max-width: 768px){.user-cart.svelte-1uavdqx.svelte-1uavdqx{padding:2px 5px 10px}}.user-cart.svelte-1uavdqx .user-buy-options.svelte-1uavdqx{flex-direction:column;width:100%}.user-cart.svelte-1uavdqx .buy-options.svelte-1uavdqx{align-items:center;border:1px solid var(--se-ultra-light-grey-3, #f3f2f2);padding:20px;border-radius:8px}.product-buying-options.svelte-1uavdqx.svelte-1uavdqx{flex-direction:column;padding-right:6px}@media(min-width: 968px){.user-buy-options.svelte-1uavdqx.svelte-1uavdqx{gap:10px}.buy-options.svelte-1uavdqx.svelte-1uavdqx{background-color:var(--se-white, #ffffff);justify-content:space-between}.buy-options.svelte-1uavdqx.svelte-1uavdqx:hover{box-shadow:var(--se-light-grey, #cbcbcb) 0px 4px 12px}.user-cart.svelte-1uavdqx.svelte-1uavdqx{width:100%}}@media(max-width: 968px){.buy-options.svelte-1uavdqx.svelte-1uavdqx{gap:15px;overflow-x:hidden;background-color:var(--se-white, #ffffff);margin-bottom:10px}.select-action.svelte-1uavdqx.svelte-1uavdqx{padding:10px}}.buy-desciption.svelte-1uavdqx.svelte-1uavdqx{font-size:15px;color:var(--se-super-dark-grey, #505559)}.selected-buying.svelte-1uavdqx.svelte-1uavdqx{box-shadow:var(--se-light-grey, #cbcbcb) 0px 2px 6px}")}function ok(t,n,e){const i=t.slice();return i[13]=n[e],i}function ak(t){let n,e,i,r=t[13].buyTitle+"",o,s,l,a,c=t[13].description+"",u,d,f,p,m,g,h,_,b,y,k,T,R,O=t[13].buyTitle+"",j,q,M,z,D=t[13].description+"",P,L,C,S,I,N;function E(){return t[3](t[13])}return{c(){n=A("div"),e=A("div"),i=A("span"),o=de(r),l=Y(),a=A("span"),u=de(c),f=Y(),p=A("div"),m=A("qds-radio"),k=Y(),T=A("div"),R=A("p"),j=de(O),M=Y(),z=A("span"),P=de(D),C=Y(),x(i,"class","pw bold-font svelte-1uavdqx"),x(i,"data-testid",s=t[13].buyTitle),x(a,"class","buy-desciption svelte-1uavdqx"),x(a,"data-testid",d=t[13].description),x(e,"class","display-flex desktop-view product-buying-options svelte-1uavdqx"),w(m,"id",g="buying-"+t[13].value),w(m,"value",h=t[13]),w(m,"checked",_=t[13].selected===!0),w(m,"description",b=t[13].description),w(m,"disabled","false"),w(m,"size","small"),w(m,"data-testid",y="select-buying-"+t[13].buyTitle),w(m,"name","cartOptions"),x(p,"class","display-flex select-option svelte-1uavdqx"),x(R,"class","pw bold-font svelte-1uavdqx"),x(R,"data-testid",q="mobile-"+t[13].buyTitle),x(z,"class","buy-desciption svelte-1uavdqx"),x(z,"data-testid",L="mobile-"+t[13].description),x(T,"class","display-flex mobile-view product-buying-options svelte-1uavdqx"),x(n,"class",S="display-flex buy-options pw pointer "+(t[13].selected?"selected-buying":"")+" svelte-1uavdqx")},m(B,U){J(B,n,U),v(n,e),v(e,i),v(i,o),v(e,l),v(e,a),v(a,u),v(n,f),v(n,p),v(p,m),v(n,k),v(n,T),v(T,R),v(R,j),v(T,M),v(T,z),v(z,P),v(n,C),I||(N=xe(n,"click",E),I=!0)},p(B,U){t=B,U&1&&r!==(r=t[13].buyTitle+"")&&be(o,r),U&1&&s!==(s=t[13].buyTitle)&&x(i,"data-testid",s),U&1&&c!==(c=t[13].description+"")&&be(u,c),U&1&&d!==(d=t[13].description)&&x(a,"data-testid",d),U&1&&g!==(g="buying-"+t[13].value)&&w(m,"id",g),U&1&&h!==(h=t[13])&&w(m,"value",h),U&1&&_!==(_=t[13].selected===!0)&&w(m,"checked",_),U&1&&b!==(b=t[13].description)&&w(m,"description",b),U&1&&y!==(y="select-buying-"+t[13].buyTitle)&&w(m,"data-testid",y),U&1&&O!==(O=t[13].buyTitle+"")&&be(j,O),U&1&&q!==(q="mobile-"+t[13].buyTitle)&&x(R,"data-testid",q),U&1&&D!==(D=t[13].description+"")&&be(P,D),U&1&&L!==(L="mobile-"+t[13].description)&&x(z,"data-testid",L),U&1&&S!==(S="display-flex buy-options pw pointer "+(t[13].selected?"selected-buying":"")+" svelte-1uavdqx")&&x(n,"class",S)},d(B){B&&K(n),I=!1,N()}}}function lk(t){let n,e=t[13].display&&ak(t);return{c(){e&&e.c(),n=wt()},m(i,r){e&&e.m(i,r),J(i,n,r)},p(i,r){i[13].display?e?e.p(i,r):(e=ak(i),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(i){i&&K(n),e&&e.d(i)}}}function _F(t){let n,e=t[1]("cart.select_action")+"",i,r,o,s,l=Dt(t[0]),a=[];for(let c=0;ce(4,i=h)),ye(t,wr,h=>e(5,r=h)),ye(t,Ii,h=>e(6,o=h)),ye(t,Vt,h=>e(1,s=h)),ye(t,Ka,h=>e(7,l=h));const a=Mn();Un(()=>{c()});function c(){switch(l){case Gr.QUOTE:u();break}}function u(){Ka.set(on),a(Qi.SEND_BOM_DATA_TO_CPQ)}function d(h="",_){const b=Iv.UC||{},k=(zt()?b.private:b.public)||{},T=(We==null?void 0:We.country)||"",O=(k[T]||{}).description;let j=!1;return typeof O=="boolean"?j=O:typeof O=="object"&&_!==void 0&&(j=O[_]??!1),j?h:""}Kn(()=>{a(Qi.DESTROY_LIST_OPTIONS)});let f=[{id:1,buyTitle:s("cart.quote_devis"),description:d(s("cart.devis_buy_description"),1),selected:!1,value:Gr.DEVIS,display:o[b2]===Ae.SHOW||o[b2]===Ae.DISABLED},{id:2,buyTitle:s("cart.buy_from_distributor"),description:d(s("cart.distributor_buy_description"),2),selected:!1,value:Gr.DISTRIBUTOR,display:o[g2]===Ae.SHOW||o[g2]===Ae.DISABLED},{id:3,buyTitle:s("cart.from_se"),description:d(s("cart.se_buy_description"),3),selected:!1,value:Gr.BUY_SCHNEIDER_ELECTRIC,display:o[m2]===Ae.SHOW||o[m2]===Ae.DISABLED},{id:4,buyTitle:s("cart.get_quote"),description:d(s("cart.quote_buy_description")),selected:!1,value:Gr.QUOTE,display:o[_2]===Ae.SHOW||o[_2]===Ae.DISABLED},{id:5,buyTitle:s("cart.distributor_store"),description:d(s("cart.distributor_store_description"),5),selected:!1,value:Gr.FIND_A_DISTRIBUTOR,display:o[v2]===Ae.SHOW||o[v2]===Ae.DISABLED}];function p(h){const _=Iv.UC||{},y=(zt()?_.private:_.public)||{},k=(We==null?void 0:We.country)||"",R=(y[k]||{}).sortOrder;return Array.isArray(R)?R.map(O=>h.find(j=>j.id===O)).filter(Boolean):h}f=p(f);function m(h){e(0,f=f.map(_=>String(_==null?void 0:_.value)==String(h==null?void 0:h.value)?{..._,selected:!0}:{..._,selected:!1})),gs(Ai.BUYING_OPTION.action,h,String(r.platform),void 0,void 0,void 0,i),a(xL,{data:h})}return[f,s,m,h=>m(h)]}class ck extends Ot{constructor(n){super(),At(this,n,bF,_F,It,{},gF)}}function vF(t){let n,e,i;return{c(){n=A("qds-checkbox"),w(n,"disabled",t[1]),w(n,"checked",t[2]),w(n,"class",t[9]),w(n,"indeterminate",t[3]),w(n,"id",t[7]),w(n,"inline",t[4]),w(n,"data-testid",t[8]),w(n,"text",t[0]),w(n,"required",t[5]),w(n,"size",t[6]),w(n,"style",t[10])},m(r,o){J(r,n,o),e||(i=xe(n,"qdsChange",t[12]),e=!0)},p(r,[o]){o&2&&w(n,"disabled",r[1]),o&4&&w(n,"checked",r[2]),o&512&&w(n,"class",r[9]),o&8&&w(n,"indeterminate",r[3]),o&128&&w(n,"id",r[7]),o&16&&w(n,"inline",r[4]),o&256&&w(n,"data-testid",r[8]),o&1&&w(n,"text",r[0]),o&32&&w(n,"required",r[5]),o&64&&w(n,"size",r[6]),o&1024&&w(n,"style",r[10])},i:et,o:et,d(r){r&&K(n),e=!1,i()}}}function wF(t,n,e){let{boxText:i=Te}=n,{disabled:r=!1}=n,{checked:o=!1}=n,{indeterminate:s=!1}=n,{inline:l=!1}=n,{required:a=!1}=n,{boxSize:c="standard"}=n,{id:u=Te}=n,{dataTestId:d=Te}=n,{className:f="pw pointer"}=n,{style:p=Te}=n;const m=Mn();function g(_){m(Hn.CLICK_CHECK_BOX,_)}const h=_=>{g(_)};return t.$$set=_=>{"boxText"in _&&e(0,i=_.boxText),"disabled"in _&&e(1,r=_.disabled),"checked"in _&&e(2,o=_.checked),"indeterminate"in _&&e(3,s=_.indeterminate),"inline"in _&&e(4,l=_.inline),"required"in _&&e(5,a=_.required),"boxSize"in _&&e(6,c=_.boxSize),"id"in _&&e(7,u=_.id),"dataTestId"in _&&e(8,d=_.dataTestId),"className"in _&&e(9,f=_.className),"style"in _&&e(10,p=_.style)},[i,r,o,s,l,a,c,u,d,f,p,g,h]}class pa extends Ot{constructor(n){super(),At(this,n,wF,vF,It,{boxText:0,disabled:1,checked:2,indeterminate:3,inline:4,required:5,boxSize:6,id:7,dataTestId:8,className:9,style:10})}}async function B_(t){const n=await kF(t.requestData,Qf),e=SF(t.cartData);return IL(Qf,e,n).map(o=>(o.productRef&&(o.catalogReference=String(o.productRef),delete o.productRef),o))}async function yF(t){const e=await(await fetch(t)).blob();return new Promise((i,r)=>{const o=new FileReader;o.onloadend=()=>{var a;const s=(a=o.result)==null?void 0:a.toString(),l=(s==null?void 0:s.split(",")[1])||"";i(l)},o.onerror=r,o.readAsDataURL(e)})}async function kF(t,n){const e=t.map(async r=>{var o,s;return r.hive2File?{quantity:String(r.quantity),[n]:r.catalogReference?String(r.catalogReference):String(r.productRef),hive:await yF(r.hive2File)}:r.configurationId?{quantity:String(r.quantity),[n]:r.catalogReference?String(r.catalogReference):String(r.productRef),isGCR:!0,configurationId:Number(r.configurationId)}:(r==null?void 0:r.hive2)!==on&&(((o=r==null?void 0:r.orderingData)==null?void 0:o.orderingId)===on||((s=r==null?void 0:r.orderingData)==null?void 0:s.orderingId)===EN)?{quantity:String(r.quantity),[n]:r.productId?String(r.productId):String(r.productRef),hive:btoa(r.hive2)}:r.productId||r.catalogReference?{quantity:String(r.quantity),[n]:r.productId?String(r.productId):String(r.catalogReference),isGCR:!1,secondCharacteristic:r.firstCharacteristic?String(r.firstCharacteristic):on,firstCharacteristic:r.secondCharacteristic?String(r.secondCharacteristic):on}:{quantity:String(r.quantity),[n]:r!=null&&r.catalogReference?String(r.catalogReference):String(r.productRef),isGCR:!1}});return await Promise.all(e)}function SF(t){return t.map(e=>e.masterPactConfigId?{configurationId:e.configurationId?String(e.configurationId):e.masterPactConfigId?String(e.masterPactConfigId):on,quantity:e.quantity?String(e.quantity):"",catalogReference:e.catalogNumber?String(e.catalogNumber):on,isGCR:!0}:e!=null&&e.firstCharacteristic?{firstCharacteristic:e.firstCharacteristic,quantity:e.quantity?String(e.quantity):"",catalogReference:e.catalogNumber?String(e.catalogNumber):on,secondCharacteristic:e!=null&&e.secondCharacteristic?e.secondCharacteristic:on,isGCR:!1}:{quantity:e.quantity?String(e.quantity):"",catalogReference:e.catalogNumber?String(e.catalogNumber):on})}const Nne="";function TF(t){Ut(t,"svelte-1iudnnm",".pw.pointer.svelte-1iudnnm.svelte-1iudnnm{cursor:pointer}.pw.normal-font.svelte-1iudnnm.svelte-1iudnnm{font-weight:normal;font-size:16px}.pw.mb-8.svelte-1iudnnm.svelte-1iudnnm{margin-bottom:8px}.pw.mr-12.svelte-1iudnnm.svelte-1iudnnm{margin-right:12px}h4.heading.svelte-1iudnnm.svelte-1iudnnm{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-margin.svelte-1iudnnm.svelte-1iudnnm{margin:-6px}.cross-icon.svelte-1iudnnm.svelte-1iudnnm{position:absolute;right:8px;top:8px}.heading.svelte-1iudnnm.svelte-1iudnnm{margin-bottom:0.2em;font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px;font-weight:normal}#confirm-text.svelte-1iudnnm.svelte-1iudnnm{font-weight:400;font-size:14px}.dialog-footer-button.svelte-1iudnnm.svelte-1iudnnm{margin-top:12px;margin-left:-4px}.popup-content.svelte-1iudnnm.svelte-1iudnnm{padding:0px 20px;margin-bottom:20px;margin-top:-16px}.quote-modal.svelte-1iudnnm.svelte-1iudnnm{padding:10px 0 30px;--qds-control-button-standard-padding-horizontal:10px}.quote-modal.svelte-1iudnnm se-block.svelte-1iudnnm{padding:0 0 5px 0}.quote-modal.svelte-1iudnnm se-block se-dropdown .selected.svelte-1iudnnm{background-color:var(--text-gray-bg) !important;color:var(--text-gray)}.quote-modal.svelte-1iudnnm se-block se-dropdown qds-button.svelte-1iudnnm{width:480px}.quote-modal-footer.svelte-1iudnnm.svelte-1iudnnm{--qds-control-button-standard-padding-horizontal:8px}")}function uk(t,n,e){const i=t.slice();return i[65]=n[e],i}function CF(t){let n,e=t[12]("bom_manager.confirm_delete_message")+"",i;return{c(){n=A("h4"),i=de(e),x(n,"class","heading svelte-1iudnnm"),x(n,"id","delete-header")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("bom_manager.confirm_delete_message")+"")&&be(i,e)},d(r){r&&K(n)}}}function EF(t){let n,e=t[12]("cpq.begin_quote")+"",i;return{c(){n=A("h4"),i=de(e),x(n,"class","heading svelte-1iudnnm"),x(n,"id","add_to_quote_heading")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("cpq.begin_quote")+"")&&be(i,e)},d(r){r&&K(n)}}}function IF(t){let n,e=t[12]("bom_manager.confirm_transfer")+"",i;return{c(){n=A("h4"),i=de(e),x(n,"class","heading svelte-1iudnnm"),x(n,"id","transfer-header")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("bom_manager.confirm_transfer")+"")&&be(i,e)},d(r){r&&K(n)}}}function AF(t){let n,e=t[12]("bom_manager.move_to_group")+"",i;return{c(){n=A("h4"),i=de(e),x(n,"class","heading svelte-1iudnnm"),x(n,"id","move-header")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("bom_manager.move_to_group")+"")&&be(i,e)},d(r){r&&K(n)}}}function OF(t){let n,e=t[12]("add_to_cart.confirmation")+"",i;return{c(){n=A("h4"),i=de(e),x(n,"class","heading svelte-1iudnnm"),x(n,"id","cart-popup-header")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("add_to_cart.confirmation")+"")&&be(i,e)},d(r){r&&K(n)}}}function PF(t){let n,e=t[12]("generic.add_to_cart")+"",i;return{c(){n=A("h4"),i=de(e),x(n,"class","heading svelte-1iudnnm"),x(n,"id","cart-header")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("generic.add_to_cart")+"")&&be(i,e)},d(r){r&&K(n)}}}function fk(t){var g;let n,e,i=t[12]("cpq.selected_customer_id")+"",r,o,s,l,a,c,u,d,f,p=Dt((g=t[6])==null?void 0:g.Items),m=[];for(let h=0;h{const e=t.shadowRoot.querySelector("button");e&&(e.style.width="100%",e.style.textAlign="left",e.style.padding="0 10px",e.style.margin="0",e.style.justifyContent="space-between",n.disconnect())});n.observe(t.shadowRoot,{childList:!0,subtree:!0})}}function pk(t,n){t.groups&&t.groups.length>0&&t.groups.reduce(function(e,i){return n.id===i.id&&delete i.isSelected,i.groups&&pk(i,n),e},[])}function jF(t,n,e){let i,r,o,s,l,a,c,u,d;ye(t,an,ke=>e(34,i=ke)),ye(t,ti,ke=>e(35,r=ke)),ye(t,Vt,ke=>e(12,o=ke)),ye(t,wr,ke=>e(36,s=ke)),ye(t,td,ke=>e(37,l=ke)),ye(t,Ua,ke=>e(38,a=ke)),ye(t,kg,ke=>e(39,c=ke)),ye(t,id,ke=>e(40,u=ke)),ye(t,qs,ke=>e(41,d=ke));let{projectData:f}=n,{successMsg:p}=n,{errorMsg:m}=n,{confirmTxt:g}=n,{confirmLbl:h}=n,{cancelLbl:_}=n,{isPopupOpen:b}=n,{isCartPopupOpen:y=!1}=n,{groupData:k=null}=n,{popupName:T}=n,{cartInfo:R}=n,{cpqUser:O}=n,j=!1,q=[],M,z,D=[],P=[],L,C,S,I;const N=Mn(),E=(ke,Ce)=>{N(ke,Ce);const Ne=new CustomEvent(ke,{detail:Ce});document.dispatchEvent&&document.dispatchEvent(Ne)};Un(()=>{var ke,Ce,Ne,Pe;T===ps&&(e(10,S=(ke=O==null?void 0:O.Items)!=null&&ke.length?(Ce=O==null?void 0:O.Items[0])==null?void 0:Ce.account_num:Te),e(11,I=(Ne=O==null?void 0:O.Items)!=null&&Ne.length?(Pe=O==null?void 0:O.Items[0])==null?void 0:Pe.name:Te),LF())});async function B(){switch(T){case To:{H();break}case Pl:{if(R.cartData.length){const ke=await B_(R);re(ke)}else H();break}case ps:{Ie(rh.modify);break}case Fa:case Mc:case Nl:case qc:H(),Er.update(()=>!0);break}}function U(ke){var Pe;let Ce=[];ke=te(ke,Ce),f.bom.groups&&e(18,f.bom.groups=ke.groups,f),f.bom.parts&&e(18,f.bom.parts=ke.parts,f),Bn(Nn.VIEW_ITEM_LIST,l,"","remove_from_list",!1,"list",!0),d?e(19,p=o("bom_manager.product_deleted")):e(19,p=o("bom_manager.group_deleted")),e(20,m=o("bom_manager.error_in_deleting_product"));let Ne=d;if(oe(),zt()){const Ve=Ne;if(Ve!==0){const ot=Ve===1?"{activity_log.message_product_reference}"+cn+"'"+((Pe=Ce[0])==null?void 0:Pe.catalogNumber)+"'":String(Ve)+cn+"{activity_log.message_products}";Br(f.id,"{activity_log.message_product_removed_action}",on,"{activity_log.message_removed_product}"+cn+ot+cn+"{activity_log.message_from_list}",Ce)}}Bv.set([]),Xo.update(()=>!1),Er.update(()=>!0)}function H(){E(Qi.CLOSE),e(3,b=!1),T===To&&e(21,k.isSelected=!1,k),Jt.set(!1),Er.update(()=>!0)}function Z(){F()}function V(){let ke={...f==null?void 0:f.bom};switch(T){case To:{ee();break}case Fa:{ue(ke);break}case qc:{U(ke);break}case Mc:{ne();break}case Nl:{Z();break}case ps:{Ie(rh.create);break}default:{re(R.requestData);break}}}function ne(){H(),e(9,C.action=Bu,C),ve.info("Elbridge Products ::",u);let ke=L;ke.value=JSON.stringify({ITEM:u}),C.submit(),zt()&&W()}async function W(){const ke=u.length===1?"{activity_log.message_product_reference}"+cn+"'"+String(u[0].MANUFACTURER_PID)+"'":String(u.length)+cn+"{activity_log.message_products}";Br(f.id,"{activity_log.message_product_added_elbridge_action}",on,"{activity_log.message_added_product}"+cn+ke+cn+"{activity_log.message_to_elbridge}",u),mm(c)}async function re(ke){await G(ke)}async function G(ke){e(7,j=!0);let Ce={orderNumber:String(R.orderNumber)};const Ne=new CustomEvent(Hn.CLEAR_CART_MULTIPLE,{detail:{requestData:Ce,availableServices:a.availableservices,user:a.user}});document.dispatchEvent(Ne);let Pe=Ve=>{Ve.detail.clearCartData&&Ve.detail.clearCartData!=Hi&&(R!=null&&R.orderNumber?X(ke):(e(7,j=!1),Mi(o("add_to_cart.failed_to_clear_product")))),document.removeEventListener(Hn.CLEAR_CART_DATA,Pe)};document.addEventListener(Hn.CLEAR_CART_DATA,Pe)}function F(){e(4,y=!0),e(0,g=R.cartData.length?`${o("generic.you_have")} ${Number(R.cartData.length)} ${o("add_to_cart.empty_cart_message")}`:o("add_to_cart.add_product_to_cart_suggestion")),e(2,_=R.cartData.length?o("add_to_cart.add_to_existing"):o("generic.cancel")),e(1,h=R.cartData.length?o("add_to_cart.replace_items"):o("generic.add")),e(5,T=Pl)}async function X(ke){e(7,j=!0);const Ce=new CustomEvent(Hn.ADD_TO_CART_MULTIPLE,{detail:{postCartItems:ke,location:"ProductBuilder"}});document.dispatchEvent(Ce),H(),Jt.set(!1);let Ne=async Pe=>{if(e(7,j=!1),Pe.detail.itemsAddResults===y1){Bn(Nn.ADD_TO_CART,l,"","",!1,"list");const Ve=ke.reduce((ot,gt)=>{const{isGCR:He,description:Be,...Ye}=gt;return ot.push(Ye),ot},[]);dr({action:og,bom:Ve,cartId:String(sessionStorage.getItem("myse_cartId")),platform:Fo}),le()}else{const Ve=Uw(ke);Ve.flag?await X(Ve.items):(await Wn(!1),Jt.set(!1),Mi(o("add_to_cart.failed_to_add_product")))}document.removeEventListener(Hn.ITEMS_ADD_RESULTS,Ne)};document.addEventListener(Hn.ITEMS_ADD_RESULTS,Ne)}function le(){E(yi.CART_PAGE)}function ue(ke){let Ce;Ce=xw();let Ne;if(Ne=Gw(),Ne===String(nv)?t_(ke,Ce):$g(ke,_a,Ce,Ne),il(f.bom,ke,f,p,m,r),zt()){const Pe=Hw(),Ve={catalogNumber:Pe==null?void 0:Pe.productRef,description:Pe==null?void 0:Pe.description,quantity:Pe==null?void 0:Pe.quantity},ot="'"+String(Ve==null?void 0:Ve.catalogNumber)+"'";Br(f.id,"{activity_log.message_product_removed_action}",on,"{activity_log.message_removed_product}"+cn+ot+cn+"{activity_log.message_from_list}",[Ve])}B()}function ee(){let ke=Te;if(me(),M=_s(f),z=_s(k),pk(M.bom,z),qd(M.bom,D,P,Rc),(D==null?void 0:D.length)>0){let Ne=[],Pe=0,Ve=0;Pe=D.length,D.forEach(ot=>{var gt;((gt=z.groups)==null?void 0:gt.length)>0&&z.groups.forEach(He=>{ot.name===He.name&&Ne.push(He.name)})}),Ve=Pe-Ne.length;for(let ot=0;otNe.name===ke);return Ce>-1&&D.splice(Ce,1),D}function he(ke,Ce,Ne){let Pe;return ke==Ce?ke===1?Pe=o("bom_manager.selected_group_move_msg")+" "+Ne.name:Pe=o("bom_manager.all_selected_groups_move_msg")+" "+Ne.name:ke===0?Pe=o("bom_manager.no_groups_move_msg")+" "+Ne.name:Pe=String(ke)+" "+o("bom_manager.out_of_msg")+" "+String(Ce)+" "+o("bom_manager.some_groups_move_msg")+" "+Ne.name,Pe}function me(){D=[],P=[]}function te(ke,Ce=[]){return f.bom.groups&&(ke.groups=fe(ke.groups)),f.bom.parts&&(ke.parts=ae(f.bom.parts,Ce)),ke}function oe(){q=[],is.update(()=>!1);const ke={...f};let Ce=Qc(ke);il(f.bom,Ce.bom,f,p,m,r),B()}function ce(ke,Ce,Ne=Te,Pe=Te){let Ve=Yn()?o("edit_list.list_updated_successfully_message"):o("edit_project.project_updated_successfully_message");Ne===Rc&&Pe!==Te&&(Ve=Pe),Vi(ke,Ce,Ve,r).then(ot=>{ge(Ce),ot.data.id&&(me(),B(),is.update(()=>!1),ve.info("Project updated for with ID: ",Ce))}).finally(()=>{me(),e(7,j=!1),ve.info("Project updated for with IDfin: ",Ce)})}function ge(ke){const Ce=mn(We.country,i),Ne=gn(We.language,i);ci(ke,Ce,Ne,We.apigeeToken).then(function(Pe){ve.info(Pe)}).catch(function(Pe){ve.error(String(Pe.message))})}function fe(ke){return ke=ke.filter(Ce=>!Ce.isSelected),ke.forEach(Ce=>{Ce.groups&&(Ce.groups=fe(Ce.groups)),Ce.parts&&(Ce.parts=ae(Ce.parts))}),ke}function ae(ke,Ce=[]){let Ne=ke==null?void 0:ke.filter(Ve=>Ve==null?void 0:Ve.isSelected);return q=Xa(Ha,q,Ne),Ne==null||Ne.forEach(Ve=>{Ce==null||Ce.push({catalogNumber:Ve==null?void 0:Ve.productRef,description:Ve==null?void 0:Ve.description,quantity:Ve==null?void 0:Ve.quantity})}),ke==null?void 0:ke.filter(Ve=>!Ve.isSelected)}Kn(()=>{Wn(!1)});function ie(ke,Ce){e(10,S=ke),e(11,I=Ce)}function _e(ke,Ce,Ne){let Pe=ke+(Ce?Ws+Ce:Te);return Ne?py(Pe,Ba.CPQ_DROPDOWN_LENGTH):Pe}async function Ie(ke){e(7,j=!0);const Ce=await yf(f,void 0),Ne={customerId:S,actionType:ke,response:Ce};e(7,j=!1),ve.info("response to cpq",Ne);const Pe=new CustomEvent(yi.ADD_TO_QUOTE,{detail:{requestDataForCPQ:Ne}});gm(Ce,f.id),_m(Ce.data.projectBuilderId,Ce.bom.products),document.dispatchEvent(Pe)}function we(ke){_t[ke?"unshift":"push"](()=>{L=ke,e(8,L)})}function pe(ke){_t[ke?"unshift":"push"](()=>{C=ke,e(9,C)})}const Se=()=>{H()},Le=ke=>ie(ke.account_num,ke.name),Re=()=>{V()},Ee=()=>{B()};return t.$$set=ke=>{"projectData"in ke&&e(18,f=ke.projectData),"successMsg"in ke&&e(19,p=ke.successMsg),"errorMsg"in ke&&e(20,m=ke.errorMsg),"confirmTxt"in ke&&e(0,g=ke.confirmTxt),"confirmLbl"in ke&&e(1,h=ke.confirmLbl),"cancelLbl"in ke&&e(2,_=ke.cancelLbl),"isPopupOpen"in ke&&e(3,b=ke.isPopupOpen),"isCartPopupOpen"in ke&&e(4,y=ke.isCartPopupOpen),"groupData"in ke&&e(21,k=ke.groupData),"popupName"in ke&&e(5,T=ke.popupName),"cartInfo"in ke&&e(22,R=ke.cartInfo),"cpqUser"in ke&&e(6,O=ke.cpqUser)},[g,h,_,b,y,T,O,j,L,C,S,I,o,B,H,V,ie,_e,f,p,m,k,R,we,pe,Se,Le,Re,Ee]}class ha extends Ot{constructor(n){super(),At(this,n,jF,NF,It,{projectData:18,successMsg:19,errorMsg:20,confirmTxt:0,confirmLbl:1,cancelLbl:2,isPopupOpen:3,isCartPopupOpen:4,groupData:21,popupName:5,cartInfo:22,cpqUser:6},TF,[-1,-1,-1])}}const Lne="";function RF(t){Ut(t,"svelte-wujj40",".pw.pointer.svelte-wujj40{cursor:pointer}h4.heading.svelte-wujj40{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-wujj40{position:absolute;right:8px;top:8px}.heading.svelte-wujj40{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px}.dialog-footer-button.svelte-wujj40{margin-top:12px;margin-left:-4px}.popup-content.svelte-wujj40{padding:0px 20px;margin-bottom:20px;margin-top:-16px}")}function MF(t){let n=t[6]("bom_manager.confirm_delete_message")+"",e;return{c(){e=de(n)},m(i,r){J(i,e,r)},p(i,r){r&64&&n!==(n=i[6]("bom_manager.confirm_delete_message")+"")&&be(e,n)},d(i){i&&K(e)}}}function qF(t){let n;return{c(){n=de(t[5])},m(e,i){J(e,n,i)},p(e,i){i&32&&be(n,e[5])},d(e){e&&K(n)}}}function DF(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b;function y(R,O){return R[5]?qF:MF}let k=y(t),T=k(t);return p=new Gt({props:{id:"cart-btn-confirm-yes",dataTestId:"cart-btn-confirm-yes",buttonText:t[2],importance:"emphasized"}}),p.$on("btnClick",t[8]),g=new Gt({props:{id:"cart-btn-confirm-cancel",dataTestId:"cart-btn-confirm-cancel",buttonText:t[3]}}),g.$on("btnClick",t[10]),{c(){n=A("se-dialog"),e=A("h4"),T.c(),i=Y(),r=A("qds-button"),o=Y(),s=A("se-dialog-content"),l=A("se-loading"),a=Y(),c=A("span"),u=de(t[1]),d=Y(),f=A("div"),De(p.$$.fragment),m=Y(),De(g.$$.fragment),x(e,"class","heading svelte-wujj40"),x(e,"id","uc-common-popup-header"),x(e,"data-testid","uc-common-popup-header"),w(r,"importance","subdued"),w(r,"icon-name","cross-circle"),w(r,"id","close-popup"),w(r,"class","cross-icon pw pointer svelte-wujj40"),w(r,"data-testid","cross-button-close"),w(l,"loading",t[4]),w(l,"overlay","true"),x(c,"id","cart-confirm-text"),x(f,"class","dialog-footer-button svelte-wujj40"),w(s,"class","popup-content svelte-wujj40"),w(n,"id","dialog-confirm"),w(n,"open",t[0]),w(n,"can-backdrop","false")},m(R,O){J(R,n,O),v(n,e),T.m(e,null),v(n,i),v(n,r),v(n,o),v(n,s),v(s,l),v(s,a),v(s,c),v(c,u),v(s,d),v(s,f),Me(p,f,null),v(f,m),Me(g,f,null),h=!0,_||(b=xe(r,"click",t[9]),_=!0)},p(R,[O]){k===(k=y(R))&&T?T.p(R,O):(T.d(1),T=k(R),T&&(T.c(),T.m(e,null))),(!h||O&16)&&w(l,"loading",R[4]),(!h||O&2)&&be(u,R[1]);const j={};O&4&&(j.buttonText=R[2]),p.$set(j);const q={};O&8&&(q.buttonText=R[3]),g.$set(q),(!h||O&1)&&w(n,"open",R[0])},i(R){h||(Q(p.$$.fragment,R),Q(g.$$.fragment,R),h=!0)},o(R){se(p.$$.fragment,R),se(g.$$.fragment,R),h=!1},d(R){R&&K(n),T.d(),qe(p),qe(g),_=!1,b()}}}function BF(t,n,e){let i;ye(t,Vt,g=>e(6,i=g));let{isPopupOpen:r}=n,{confirmTxt:o}=n,{confirmLbl:s}=n,{cancelLbl:l}=n,{isLoading:a=!1}=n,{title:c=Te}=n;const u=Mn();Un(()=>{Oi(Ds)}),Kn(()=>{Oi(Kr)});function d(){u(Qi.CLOSE)}function f(){u(Qi.CONFIRM_ACTION,{type:ph})}const p=()=>{d()},m=()=>{d()};return t.$$set=g=>{"isPopupOpen"in g&&e(0,r=g.isPopupOpen),"confirmTxt"in g&&e(1,o=g.confirmTxt),"confirmLbl"in g&&e(2,s=g.confirmLbl),"cancelLbl"in g&&e(3,l=g.cancelLbl),"isLoading"in g&&e(4,a=g.isLoading),"title"in g&&e(5,c=g.title)},[r,o,s,l,a,c,i,d,f,p,m]}class Pf extends Ot{constructor(n){super(),At(this,n,BF,DF,It,{isPopupOpen:0,confirmTxt:1,confirmLbl:2,cancelLbl:3,isLoading:4,title:5},RF)}}const jne="";function UF(t){Ut(t,"svelte-13yp42u",".pw.pointer.svelte-13yp42u{cursor:pointer}h4.heading.svelte-13yp42u{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-13yp42u{position:absolute;right:8px;top:8px}.heading.svelte-13yp42u{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-bottom:12px;margin-left:16px;padding:0px 20px}.popup-content.svelte-13yp42u{padding:0px 20px;margin-bottom:20px;margin-top:-16px}.display-block.svelte-13yp42u{display:block}")}function zF(t){let n,e,i,r,o,s=t[3]("product_substitution.substitute_popup_header")+"",l,a,c,u,d,f,p,m;return{c(){n=A("script"),n.innerHTML="",i=Y(),r=A("se-dialog"),o=A("h4"),l=de(s),a=Y(),c=A("se-icon"),c.textContent="action_delete_cross",u=Y(),d=A("se-dialog-content"),f=A("substitution-product-listing"),rr(n.src,e="https://www.se.com/ww/en/product-substitution/wc-resource/substitution-product-listing-pb.js?v=2.18.0")||x(n,"src",e),x(o,"class","heading svelte-13yp42u"),x(o,"id","substitute-header"),w(c,"role","button"),w(c,"tabindex","0"),w(c,"id","substitute-close-popup"),w(c,"class","cross-icon pw pointer svelte-13yp42u"),w(c,"color","standard"),w(f,"id","svleteListingTag"),w(f,"apiendpointdetails",t[2]),w(f,"searchvalue",t[1]),w(f,"guidedflag","true"),w(f,"class","display-block svelte-13yp42u"),w(d,"class","popup-content svelte-13yp42u"),w(r,"id","dialog-substitute-product"),w(r,"open",t[0]),w(r,"can-backdrop","false"),w(r,"size","xlarge")},m(g,h){v(document.head,n),J(g,i,h),J(g,r,h),v(r,o),v(o,l),v(r,a),v(r,c),v(r,u),v(r,d),v(d,f),p||(m=[xe(c,"click",t[12]),xe(c,"keydown",t[13])],p=!0)},p(g,[h]){h&8&&s!==(s=g[3]("product_substitution.substitute_popup_header")+"")&&be(l,s),h&4&&w(f,"apiendpointdetails",g[2]),h&2&&w(f,"searchvalue",g[1]),h&1&&w(r,"open",g[0])},i:et,o:et,d(g){g&&(K(i),K(r)),K(n),p=!1,An(m)}}}function hk(t){}function FF(t,n,e){let i,r;ye(t,ti,D=>e(16,i=D)),ye(t,Vt,D=>e(3,r=D));let{projectData:o}=n,{isPopupOpen:s}=n,{searchValue:l}=n,{initialQtyBeforeSub:a}=n,{language:c}=n,{country:u}=n,{apigeeToken:d}=n,f,p,m=[];Un(()=>{u==="GB"&&e(6,u="UK"),e(2,p=g(c.toLowerCase(),u.toLowerCase())),ve.info("Final Subs URL: "+p),j()});function g(D,P){return iN.replace(/{path}/g,Jf[We.environment])+"::"+(P==null?void 0:P.toLowerCase())+"::"+(D==null?void 0:D.toLowerCase())+"::"+h(rN,P.toLowerCase(),D.toLowerCase())}function h(D,P,L){return D.replace(/{path}/g,Jf[We.environment]).replace(/{cc}/g,P).replace(/{lc}/g,L)}function _(D){var L;m=(L=D==null?void 0:D.detail)==null?void 0:L.products;let P=[];if(b(P,m),o!=null&&o.bom){f=_s(o==null?void 0:o.bom);let C;C=T();let S;S=R(),S==="-1"?(t_(f,C),f.parts=Xa(Ha,f.parts,P)):f=zw(f,_a,C,String(S),P)}e(5,o.bom=f,o),y(o),O()}function b(D,P){for(let L=0;L{ci(P,u,c,d).then(function(S){ve.info(S)}).catch(function(S){ve.error(S)})}).finally(()=>{ve.info("Project updated for with ID: ",P)})}function T(){let D;return vg.subscribe(P=>{D=String(P)}),D}function R(){let D;return wg.subscribe(P=>{D=String(P)}),D}function O(){e(0,s=!1)}function j(){window.addEventListener(yi.PRODUCT_REF_REPLACE,_),window.addEventListener(yi.PRODUCT_RANGE_REPLACE,hk)}function q(){window.removeEventListener(yi.PRODUCT_REF_REPLACE,_),window.removeEventListener(yi.PRODUCT_RANGE_REPLACE,hk)}Kn(()=>{Wn(!1),q()});const M=()=>{O()},z=D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),O())};return t.$$set=D=>{"projectData"in D&&e(5,o=D.projectData),"isPopupOpen"in D&&e(0,s=D.isPopupOpen),"searchValue"in D&&e(1,l=D.searchValue),"initialQtyBeforeSub"in D&&e(7,a=D.initialQtyBeforeSub),"language"in D&&e(8,c=D.language),"country"in D&&e(6,u=D.country),"apigeeToken"in D&&e(9,d=D.apigeeToken)},[s,l,p,r,O,o,u,a,c,d,T,R,M,z]}class mk extends Ot{constructor(n){super(),At(this,n,FF,zF,It,{projectData:5,isPopupOpen:0,searchValue:1,initialQtyBeforeSub:7,language:8,country:6,apigeeToken:9,getSubstituteProductIdFromStore:10,getSubstituteProductParentIdFromStore:11},UF)}get getSubstituteProductIdFromStore(){return this.$$.ctx[10]}get getSubstituteProductParentIdFromStore(){return this.$$.ctx[11]}}function Gs(t){window.location.assign(U_(void 0,void 0,t))}function s1(t,n,e){Bn(Nn.CTA_CLICK,{cta_name:t,cta_location:n,cta_link:U_(void 0,void 0,e),cta_category:"Login"})}function U_(t,n,e){const i=Yn()?Kf.uc:Kf.pb;let r=Te;if(Ka.subscribe(s=>{r=s}),r===Gr.BUY_SCHNEIDER_ELECTRIC&&Yn())return`${i[We.environment]}/${Vn}${ZN}`;if(r===Gr.QUOTE&&Yn())return`${i[We.environment]}/${Vn}${VN}&cartid=${e==null?void 0:e.id}`;if(r===Gr.DEVIS&&Yn())return`${i[We.environment]}/${Vn}${$N}&cartid=${e==null?void 0:e.id}`;let o=localStorage.getItem(Uu);if(!o&&o!==cn&&(o=ZP),Yn())return i[We.environment]+xN;{const s=e?e.id:t,l=e?e.platform:n;return i[We.environment]+jc+GP+s+HP+l+WP+YP+o}}function js(t){let n=t;return typeof t===Vs&&(t.overwritePrice?n=(t==null?void 0:t.value)||0:n=(t==null?void 0:t.pbValue)||0),n}function xF(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),listId:i};return Pn(r,o)}async function GF(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),listId:i};return Pn(r,o)}async function HF(t,n,e,i,r,o){const s=i+r+t+"/"+e+(o?s2:""),l={method:er.GET,unsecure:!1,apigeeTokenWithoutBearer:n,listId:e};return Pn(s,l)}async function WF(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),listId:i};return Pn(r,o)}async function VF(t,n,e){const i={method:er.PUT,unsecure:!1,body:t,headers:e};return Yu(n,i)}async function YF(t,n,e,i,r,o,s){const l=e+"/"+i,a={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),country:r,language:o,listId:s};return Pn(l,a)}async function ZF(t,n,e,i){const r=n+e,o={method:er.POST,unsecure:!1,body:JSON.stringify(t),listId:i};return Pn(r,o)}async function gk(t,n,e,i,r){const o=e+i,s={method:er.PATCH,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),listId:r};return Pn(o,s)}async function XF(t,n,e,i,r){const o=n+e+i,s={method:er.POST,unsecure:!1,body:JSON.stringify(t),listId:r};return Pn(o,s)}async function KF(t,n,e,i){const r=e+Xv+Kv,o={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:t,body:JSON.stringify({listId:n,name:i}),listId:n};return Pn(r,o)}async function JF(t,n,e,i,r,o){const s=e+i+r,l={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),listId:o};return Pn(s,l)}async function QF(t,n,e,i,r,o){const s=e+i+r+Io+o,l={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),listId:o};return Pn(s,l)}async function $F(t,n,e,i,r,o){const s=e+i+encodeURIComponent(r)+Io+o+Jv,l={method:er.POST,unsecure:!1,apigeeTokenWithoutBearer:n,body:JSON.stringify(t),listId:o};return Pn(s,l)}async function z_(t,n,e,i,r){try{oo(!1);let o=await xF(t,n,e,r);if(o.hasError)hc(ks(o,i)),o=o;else return o.data}catch(o){ve.error("document management.task :: add new folder: error:: ",o)}}async function ex(t,n,e,i,r,o){try{oo(!1);let s=await gk(t,n,e,i,o);if(s.hasError)hc(ks(s,r)),s=s;else return s.data}catch(s){ve.error("document management.task :: rename file error :: ",s),hc(s)}}async function Hs(t,n,e,i,r,o=!1){try{let s=await HF(t,n,e,i,r,o);if(s.hasError)s=s;else return s.data.map(l=>{l.name=tn(String(l.name))}),s.data}catch(s){ve.error("document management.task :: fetch docs error:: ",s)}}async function _k(t,n,e,i){try{let r=await WF(t,n,e,i);if(r.hasError)r=r,hc(r.message);else return r.data}catch(r){ve.error("document management.task :: upload documents to project builder error:: ",r)}}async function tx(t,n,e){try{return await VF(t,n,e)}catch(i){ve.error("document management.task :: upload documents using presigned url:error::",i)}}async function nx(t,n,e,i){try{let r=await GF(t,n,e,i);return r.hasError?(r=r,ve.error("Document management download.task :: file download :: ",r.message)):r=r.data,r}catch(r){ve.error("document management.task :: save documents to project builder error:: ",r)}}async function F_(t,n,e,i,r,o,s){try{ka.set(!1);const l={productIds:t,languageCode:e.toLowerCase()===bl.EN&&i.toLowerCase()===bl.DE?bl.DE:e,countryCode:i};v3.update(()=>!1);let a=await YF(l,n,r,o,e,i,s);if(a.hasError)a=a,ve.error("Document management download.task :: file download :: ",a.message),qa.update(()=>!1);else return ve.info("document management.task :: file download :: ",a),a.data}catch(l){ve.error("document management.task :: download documents from project builder error:: ",l)}}async function ix(t,n,e,i){try{oo(!1);let r=await ZF(t,n,e,i);r.hasError?(r=r,Wt.update(()=>!1)):r=r.data}catch(r){ve.error("document management.task :: delete documents from project builder error:: ",r)}}async function rx(t,n,e,i,r){try{let o=await XF(t,n,e,i,r);if(o.hasError)o=o;else return o.data}catch(o){Wt.update(()=>!1),ve.error("project bom.task :: fetch docs error:: ",o)}}function al(t){oo(!0),ac.set(t2),lc.set(t)}function bk(t){oo(!0),ac.set(n2),lc.set(t)}function hc(t){oo(!0),ac.set(e2),lc.set(t)}function oo(t){Vm.set(t)}function ou(t){for(let n=0;nt)}function Nf(t){let n=ft;return(t==null?void 0:t.indexOf(ai))>0?n=t.replace(ai,kr):n=t,n}async function sx(t,n,e,i){try{let r=await KF(t,n,e,i);if(r.hasError)r=r;else return r.data.Items}catch(r){ve.error("project bom.task :: search docs error:: ",r)}}async function ox(t,n,e,i,r,o){const s=await JF(t,n,e,i,r,o);if(s.hasError)throw new Error(String(s==null?void 0:s.message));return Ym.update(()=>s.data),s.data}async function ax(t,n,e,i,r,o){const s=await QF(t,n,e,i,r,o);if(s.hasError)throw new Error(String(s==null?void 0:s.message));return Uo.update(()=>{var l,a;return(a=(l=s==null?void 0:s.data)==null?void 0:l.Attributes)==null?void 0:a.restrictUser}),s.data}async function lx(t,n,e,i,r,o){const s=await $F(t,n,e,i,r,o);if(s.hasError)throw new Error(String(s==null?void 0:s.message));return Uo.update(()=>{var l,a;return(a=(l=s==null?void 0:s.data)==null?void 0:l.Attributes)==null?void 0:a.restrictUser}),s.data}async function vk(t,n,e,i,r){try{oo(!1);let o=await gk(t,n,e,i,r);if(o!=null&&o.hasError)throw o=o,new Error(String(o));return o.data}catch(o){ve.error("document management.task :: mark favourite file error :: ",o),hc(String(o))}}async function cx(t,n,e,i){let r=0;const o=15,s=l=>new Promise(a=>setTimeout(a,l));for(;r0)return l;r++,ve.info(`Attempt ${r} failed, retrying in 7 seconds...`),await s(7e3)}throw ve.info("pooling error"),{statusCode:504}}const Rne="";function ux(t){Ut(t,"svelte-1lnzvvq",".pw.align-left.svelte-1lnzvvq{margin-right:auto}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.lock-button.svelte-1lnzvvq{width:fit-content}.bom-options.svelte-1lnzvvq{padding-left:10px}.bom-options.svelte-1lnzvvq:first-of-type{padding-left:0px !important}.sub-heading-lbl.svelte-1lnzvvq{font-size:14px}.sub-heading-icons.svelte-1lnzvvq{position:relative;top:4px;background-color:var(--se-super-light-grey, #e6e6e6);border-radius:10%}")}function fx(t){let n,e,i;return e=new Gt({props:{id:t[2]+"-locked",iconClassName:"lock-closed",buttonText:t[0]===on?Ll:t[0],buttonSize:"large"}}),e.$on("btnClick",t[6]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw align-left lock-button qds-button svelte-1lnzvvq")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o&4&&(s.id=r[2]+"-locked"),o&1&&(s.buttonText=r[0]===on?Ll:r[0]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function dx(t){let n,e,i;return e=new Gt({props:{id:t[2]+"-locked",importance:"emphasized",iconClassName:"lock-closed",buttonText:t[0]===on?Ll:t[0],buttonSize:"large"}}),e.$on("btnClick",t[5]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw align-left lock-button qds-button svelte-1lnzvvq")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o&4&&(s.id=r[2]+"-locked"),o&1&&(s.buttonText=r[0]===on?Ll:r[0]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function px(t){let n,e,i,r,o,s,l,a;return{c(){n=A("span"),e=A("se-icon"),e.textContent="action_lock_on",i=Y(),r=A("span"),o=de(t[0]),w(e,"class","sub-heading-icons svelte-1lnzvvq"),x(r,"class","sub-heading-lbl svelte-1lnzvvq"),x(n,"class","bom-options svelte-1lnzvvq"),x(n,"id",s=t[2]+"-locked")},m(c,u){J(c,n,u),v(n,e),v(n,i),v(n,r),v(r,o),l||(a=xe(n,"click",t[3]),l=!0)},p(c,u){u&1&&be(o,c[0]),u&4&&s!==(s=c[2]+"-locked")&&x(n,"id",s)},i:et,o:et,d(c){c&&K(n),l=!1,a()}}}function hx(t){let n,e,i,r;const o=[px,dx,fx],s=[];function l(a,c){return a[1]===Wa?0:a[1]===ug?1:2}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,[c]){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function mx(t,n,e){let{lockMessage:i=on}=n,{buttonType:r=on}=n,{buttonId:o}=n,{action:s}=n;function l(){Ca.set(!1),Ca.set(!0),localStorage.setItem(Uu,s)}const a=()=>{l()},c=()=>{l()};return t.$$set=u=>{"lockMessage"in u&&e(0,i=u.lockMessage),"buttonType"in u&&e(1,r=u.buttonType),"buttonId"in u&&e(2,o=u.buttonId),"action"in u&&e(4,s=u.action)},[i,r,o,l,s,a,c]}let wk=class extends Ot{constructor(n){super(),At(this,n,mx,hx,It,{lockMessage:0,buttonType:1,buttonId:2,action:4},ux)}};const Mne="";function gx(t){Ut(t,"svelte-qe77zi",".pw.pointer.svelte-qe77zi{cursor:pointer}.pw.normal-font.svelte-qe77zi{font-weight:normal;font-size:16px}.pw.mr-12.svelte-qe77zi{margin-right:12px}h4.heading.svelte-qe77zi{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-qe77zi{position:absolute;right:8px;top:8px}.heading.svelte-qe77zi{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px}#dialog-text.svelte-qe77zi{font-weight:400;font-size:14px}.dialog-footer-button.svelte-qe77zi{margin-top:12px}.dialog-content.svelte-qe77zi{padding:0px 20px;margin-bottom:20px;margin-top:-16px}")}function yk(t){let n,e,i;return e=new Gt({props:{id:"save-local",buttonText:t[3],importance:"emphasized"}}),e.$on("btnClick",t[21]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw normal-font pw mr-12 svelte-qe77zi")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&8&&(s.buttonText=r[3]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function _x(t){let n,e;return n=new wk({props:{listId:t[5],lockMessage:t[4],buttonId:"save-in-project-builder",action:"save_in_project_builder"}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&32&&(o.listId=i[5]),r[0]&16&&(o.lockMessage=i[4]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function bx(t){let n,e,i;return e=new Gt({props:{id:"save-in-project-builder",buttonText:t[4]}}),e.$on("btnClick",t[23]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw normal-font svelte-qe77zi")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&16&&(s.buttonText=r[4]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function vx(t){let n,e,i;return e=new Gt({props:{id:"save-in-project-builder",buttonText:t[4]}}),e.$on("btnClick",t[22]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw normal-font svelte-qe77zi")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&16&&(s.buttonText=r[4]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function wx(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y=t[7][Nh]===Ae.SHOW&&yk(t);const k=[vx,bx,_x],T=[];function R(O,j){var q,M;return j[0]&64&&(p=null),O[7][Lh]===Ae.SHOW?0:(p==null&&(p=!!(!zt()&&((M=(q=O[6])==null?void 0:q.supportedFeatures)!=null&&M.documentManagment))),p?1:O[7][Lh]===Ae.LOCK?2:-1)}return~(m=R(t,[-1,-1]))&&(g=T[m]=k[m](t)),{c(){n=A("se-dialog"),e=A("h4"),i=de(t[2]),r=Y(),o=A("se-icon"),o.textContent="action_delete_cross",s=Y(),l=A("se-dialog-content"),a=A("span"),c=de(t[1]),u=Y(),d=A("div"),y&&y.c(),f=Y(),g&&g.c(),x(e,"class","heading svelte-qe77zi"),x(e,"id","download-doc-header"),w(o,"id","close-popup"),w(o,"class","cross-icon pw pointer svelte-qe77zi"),w(o,"color","standard"),x(a,"id","dialog-text"),x(a,"class","svelte-qe77zi"),x(d,"class","dialog-footer-button svelte-qe77zi"),w(l,"class","dialog-content svelte-qe77zi"),w(n,"id","dialog-confirm"),w(n,"open",t[0]),w(n,"can-backdrop","false"),w(n,"size","large")},m(O,j){J(O,n,j),v(n,e),v(e,i),v(n,r),v(n,o),v(n,s),v(n,l),v(l,a),v(a,c),v(l,u),v(l,d),y&&y.m(d,null),v(d,f),~m&&T[m].m(d,null),h=!0,_||(b=xe(o,"click",t[20]),_=!0)},p(O,j){(!h||j[0]&4)&&be(i,O[2]),(!h||j[0]&2)&&be(c,O[1]),O[7][Nh]===Ae.SHOW?y?(y.p(O,j),j[0]&128&&Q(y,1)):(y=yk(O),y.c(),Q(y,1),y.m(d,f)):y&&(Je(),se(y,1,1,()=>{y=null}),Qe());let q=m;m=R(O,j),m===q?~m&&T[m].p(O,j):(g&&(Je(),se(T[q],1,1,()=>{T[q]=null}),Qe()),~m?(g=T[m],g?g.p(O,j):(g=T[m]=k[m](O),g.c()),Q(g,1),g.m(d,null)):g=null),(!h||j[0]&1)&&w(n,"open",O[0])},i(O){h||(Q(y),Q(g),h=!0)},o(O){se(y),se(g),h=!1},d(O){O&&K(n),y&&y.d(),~m&&T[m].d(),_=!1,b()}}}function yx(t,n,e){let i,r,o,s,l;ye(t,an,E=>e(24,i=E)),ye(t,wr,E=>e(6,r=E)),ye(t,Vt,E=>e(25,o=E)),ye(t,Qn,E=>e(26,s=E)),ye(t,Ii,E=>e(7,l=E));let{product:a}=n,{selectedProductRefs:c}=n,{dialogBoxTxt:u}=n,{heading:d}=n,{saveLocalLbl:f}=n,{saveInListLbl:p}=n,{isDialogOpen:m}=n,{popupName:g}=n,{listId:h}=n,{language:_}=n,{country:b}=n,{apigeeToken:y}=n,{documentManagementBasePath:k}=n,{documentGetEndpoint:T}=n,{documentDownloadEndpoint:R}=n;Un(()=>{zt()||(e(0,m=!1),D())});const O=(E,B)=>{var U,H,Z;for(const V of E)B[(U=V==null?void 0:V.value)==null?void 0:U.productId]?B[(H=V==null?void 0:V.value)==null?void 0:H.productId].push(V):B[(Z=V==null?void 0:V.value)==null?void 0:Z.productId]=[V];return B};function j(E){var B;L(),hn.update(()=>!0),((B=a==null?void 0:a.parts)==null?void 0:B.length)>0&&(E=a.parts.map(U=>String(U==null?void 0:U.productRef))),F_(E,String(y),String(_),String(b),k,R,h).then(U=>{const H=o("bom_manager.no_data_to_download"),Z=o("bom_manager.file_is_processing_message");hn.update(()=>!1),Zm(U,!1,H,Z,o("bom_manager.error_in_processing_documents")).then(async V=>{var W;let ne={};V&&(ne=O(V,ne)),U&&await Xm(ne,((W=Object.keys(ne))==null?void 0:W.length)===1?Object.keys(ne)[0]:o("bom_manager.product_documentation"),o("bom_manager.error_in_processing_documents")).catch(re=>{ve.error(re),ys(re)})}).catch(V=>{ve.error(V),ys(H)})}).catch(U=>{ve.error(U),hn.update(()=>!1)})}function q(E){if(L(),Wn(!1),(E==null?void 0:E.length)>0){let B=E.filter(U=>!bs(U,s,yr.NAME,ut.folder));(B==null?void 0:B.length)===0?Mi(o("document_management.duplicate_folder_download_list")):(hn.update(()=>!0),qa.update(()=>!0),F_(B,String(y),String(_),String(b),k,R,h).then(U=>{const H=o("bom_manager.no_data_to_download"),Z=o("bom_manager.file_in_download");hn.update(()=>!1);let V={data:U,listId:h};U&&Object.keys(U).length>0?(bo(Z),nx(V,k,T,h).then(async ne=>{try{if(ve.info("document response: ",ne),ne!=null&&ne.hasError){const W=await cx(y,h,T,k);return Qn.update(()=>W),E!=null&&E.length&&M(W,E),W}else Qn.update(()=>ne),E!=null&&E.length&&M(ne,E);tp()}catch{const re=o("document_management.pooling_error");Mi(re)}finally{qa.update(()=>!1)}})):(hn.update(()=>!1),ys(H))}).catch(U=>{ve.error(U),qa.update(()=>!1)}))}}function M(E,B){Wn(!1),(E==null?void 0:E.length)===(B==null?void 0:B.length)?bo(`${E.length} ${o("generic.out_of")} ${B.length} ${o("bom_manager.product_reference_documents_downloaded")}`):ys(`${E==null?void 0:E.length} ${o("generic.out_of")} ${B.length} ${o("bom_manager.product_reference_documents_downloaded")}`)}function z(){const E=c;L(),hn.update(()=>!0),(E==null?void 0:E.length)>0&&F_(E,String(y),String(_),String(b),k,R,h).then(B=>{if(B===void 0){ys(o("bom_manager.no_data_to_download"));return}const U=o("bom_manager.no_data_to_download"),H=o("bom_manager.file_is_processing_message");hn.update(()=>!1),Zm(B,!1,U,H,o("bom_manager.error_in_processing_documents")).then(async Z=>{var ne;let V={};Z&&(V=O(Z,V)),Wn(!1),E&&E.length&&M(Object.values(V),E),await Xm(V,((ne=Object.keys(V))==null?void 0:ne.length)===1?Object.keys(V)[0]:o("bom_manager.product_documentation"),o("bom_manager.error_in_processing_documents")).catch(W=>{ve.error(W),ys(W)})}).catch(Z=>{ve.error(Z),ys(Z)})}).catch(B=>{ve.error(B),hn.update(()=>!1),ys(B)})}function D(){switch(gs(Ai.DOWNLOAD_LOCAL.action,Ai.DOWNLOAD_LOCAL.subaction,String(r.platform),zt()?i==null?void 0:i.id:void 0,zt()||i==null?void 0:i.id),g){case kh:{j([String(a.productRef)]);break}case Sh:{z();break}}}function P(){switch(gs(Ai.DOWNLOAD_IN_LIST.action,Ai.DOWNLOAD_IN_LIST.subaction,String(r.platform),String(i==null?void 0:i.id)),g){case kh:{q([String(a.productRef)]);break}case Sh:{q(c);break}}}function L(){e(0,m=!1)}const C=()=>{L()},S=()=>{D()},I=()=>{P()},N=()=>{P()};return t.$$set=E=>{"product"in E&&e(11,a=E.product),"selectedProductRefs"in E&&e(12,c=E.selectedProductRefs),"dialogBoxTxt"in E&&e(1,u=E.dialogBoxTxt),"heading"in E&&e(2,d=E.heading),"saveLocalLbl"in E&&e(3,f=E.saveLocalLbl),"saveInListLbl"in E&&e(4,p=E.saveInListLbl),"isDialogOpen"in E&&e(0,m=E.isDialogOpen),"popupName"in E&&e(13,g=E.popupName),"listId"in E&&e(5,h=E.listId),"language"in E&&e(14,_=E.language),"country"in E&&e(15,b=E.country),"apigeeToken"in E&&e(16,y=E.apigeeToken),"documentManagementBasePath"in E&&e(17,k=E.documentManagementBasePath),"documentGetEndpoint"in E&&e(18,T=E.documentGetEndpoint),"documentDownloadEndpoint"in E&&e(19,R=E.documentDownloadEndpoint)},[m,u,d,f,p,h,r,l,D,P,L,a,c,g,_,b,y,k,T,R,C,S,I,N]}class x_ extends Ot{constructor(n){super(),At(this,n,yx,wx,It,{product:11,selectedProductRefs:12,dialogBoxTxt:1,heading:2,saveLocalLbl:3,saveInListLbl:4,isDialogOpen:0,popupName:13,listId:5,language:14,country:15,apigeeToken:16,documentManagementBasePath:17,documentGetEndpoint:18,documentDownloadEndpoint:19},gx,[-1,-1])}}const qne="";function kx(t){Ut(t,"svelte-1n1ojvs",".pw.disabled.svelte-1n1ojvs{pointer-events:none;opacity:0.5}.pw.align-right.svelte-1n1ojvs{margin-left:auto}.pw.align-left.svelte-1n1ojvs{margin-right:auto}.pw.display-flex.svelte-1n1ojvs{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1n1ojvs{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-1n1ojvs{font-size:16px}.pw.small-font.svelte-1n1ojvs{font-size:14px}.pw.nano-font.svelte-1n1ojvs{font-size:12px}.pw.pointer.svelte-1n1ojvs{cursor:pointer}.pw-snackbar-elem.svelte-1n1ojvs{top:30px}.pw.red-color.svelte-1n1ojvs{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-1n1ojvs{display:none}.pw.width-100.svelte-1n1ojvs{width:100%}.pw.bold-font.svelte-1n1ojvs{font-weight:bold}.pw.normal-font.svelte-1n1ojvs{font-weight:normal;font-size:16px}.pw.error-msg.svelte-1n1ojvs{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-1n1ojvs{text-align:center}.pw.center-align-items.svelte-1n1ojvs{align-items:center}.pw.justify-content-center.svelte-1n1ojvs{justify-content:center}.pw.bom-checkbox.svelte-1n1ojvs{max-width:16px}.pw.ml-8.svelte-1n1ojvs{margin-left:8px}.pw.ml-12.svelte-1n1ojvs{margin-left:12px}.pw.ml-36.svelte-1n1ojvs{margin-left:36px}.pw.mt-8.svelte-1n1ojvs{margin-top:8px}.pw.mt-6.svelte-1n1ojvs{margin-top:6px}.pw.mt-32.svelte-1n1ojvs{margin-top:32px}.pw.mb-8.svelte-1n1ojvs{margin-bottom:8px}.pw.mb-12.svelte-1n1ojvs{margin-bottom:12px}.pw.mb-16.svelte-1n1ojvs{margin-top:16px}.pw.mb-21.svelte-1n1ojvs{margin-bottom:21px}.pw.mr-12.svelte-1n1ojvs{margin-right:12px}.pw.p-12.svelte-1n1ojvs{padding:12px}.pw.pl-16.svelte-1n1ojvs{padding-left:16px}.pw.pr-16.svelte-1n1ojvs{padding-right:16px}.position-absolute.svelte-1n1ojvs{position:absolute}.flex-wrap.svelte-1n1ojvs{flex-wrap:wrap}.justify-content-sp-btw.svelte-1n1ojvs{justify-content:space-between}.gp-10.svelte-1n1ojvs{gap:10px}.gp-5.svelte-1n1ojvs{gap:5px}.desktop-view.svelte-1n1ojvs{display:none}.mobile-view.svelte-1n1ojvs{display:block}.mobile-view-flx.svelte-1n1ojvs{display:flex;flex-direction:column}.rounded-border.svelte-1n1ojvs{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-1n1ojvs{text-align:right}.bg-color-light-grey.svelte-1n1ojvs{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-1n1ojvs{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-1n1ojvs{padding:8px 0 16px 8px}@media(min-width: 968px){.mobile-view.svelte-1n1ojvs,.mobile-view-flx.svelte-1n1ojvs{display:none}.desktop-view.svelte-1n1ojvs{display:inherit}}.cart-mobile-snackbar.svelte-1n1ojvs{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-1n1ojvs,.mobile-view-snackbar.svelte-1n1ojvs{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-1n1ojvs{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-1n1ojvs{display:block}.mobile-snackbar.svelte-1n1ojvs{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-1n1ojvs{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-1n1ojvs{margin:-6px}.bottom-snackbar.svelte-1n1ojvs{bottom:30px;top:auto}.btn.svelte-1n1ojvs{width:40px;height:40px;border:1px solid var(--se-black, #9fa0a4);justify-content:center;align-items:center;background-color:var(--se-white, #ffffff)}.btn-30.svelte-1n1ojvs{width:30px;height:30px}.btn-qty.svelte-1n1ojvs{width:40px;height:30px}.btn-decrease.svelte-1n1ojvs{border-radius:5px 0 0 5px;border-right:transparent}.btn-increase.svelte-1n1ojvs{border-radius:0 5px 5px 0;border-left:transparent}.quantity-section.svelte-1n1ojvs{overflow:hidden}.config-quantity-section.svelte-1n1ojvs{overflow:hidden}.row-qty.svelte-1n1ojvs{width:50px;height:auto;padding:0px;text-align:center;border:1px solid var(--se-medium-grey, #9fa0a4)}@media(max-width: 968px){.row-qty.svelte-1n1ojvs{border-top:1px solid var(--se-medium-grey, #9fa0a4);border-bottom:1px solid var(--se-medium-grey, #9fa0a4)}}")}function Sx(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y;return{c(){var k,T,R;n=A("div"),e=A("span"),i=A("se-icon"),r=de("electricity_polarity_negative_minus"),l=Y(),a=A("input"),d=Y(),f=A("span"),p=A("se-icon"),m=de("electricity_polarity_positive_plus"),w(i,"size","medium"),w(i,"color","standard"),w(i,"disabled",o=((k=t[1])==null?void 0:k.quantity)==_p),x(e,"class",s=Nt(`pw pointer btn btn-decrease display-flex ${t[2]?"btn-30":Te}`)+" svelte-1n1ojvs"),x(a,"id",c="row-qty-"+t[1].serialNum),x(a,"class","row-qty svelte-1n1ojvs"),x(a,"maxlength",DN),a.value=u=(T=t[1])==null?void 0:T.quantity,w(p,"size","medium"),w(p,"color","standard"),w(p,"disabled",g=((R=t[1])==null?void 0:R.quantity)>=Rf),x(f,"class",h=Nt(`pw pointer btn btn-increase display-flex ${t[2]?"btn-30":Te}`)+" svelte-1n1ojvs"),x(n,"class",_="display-flex "+(t[3]?"config-quantity-section":"quantity-section")+" svelte-1n1ojvs")},m(k,T){J(k,n,T),v(n,e),v(e,i),v(i,r),v(n,l),v(n,a),v(n,d),v(n,f),v(f,p),v(p,m),b||(y=[xe(e,"click",t[7]),xe(a,"keypress",t[8]),xe(a,"blur",t[9]),xe(a,"paste",Aw),xe(a,"drop",Aw),xe(f,"click",t[10])],b=!0)},p(k,[T]){var R,O,j;T&2&&o!==(o=((R=k[1])==null?void 0:R.quantity)==_p)&&w(i,"disabled",o),T&4&&s!==(s=Nt(`pw pointer btn btn-decrease display-flex ${k[2]?"btn-30":Te}`)+" svelte-1n1ojvs")&&x(e,"class",s),T&2&&c!==(c="row-qty-"+k[1].serialNum)&&x(a,"id",c),T&2&&u!==(u=(O=k[1])==null?void 0:O.quantity)&&a.value!==u&&(a.value=u),T&2&&g!==(g=((j=k[1])==null?void 0:j.quantity)>=Rf)&&w(p,"disabled",g),T&4&&h!==(h=Nt(`pw pointer btn btn-increase display-flex ${k[2]?"btn-30":Te}`)+" svelte-1n1ojvs")&&x(f,"class",h),T&8&&_!==(_="display-flex "+(k[3]?"config-quantity-section":"quantity-section")+" svelte-1n1ojvs")&&x(n,"class",_)},i:et,o:et,d(k){k&&K(n),b=!1,An(y)}}}function Tx(t,n,e){let i;ye(t,Ki,g=>e(11,i=g));let{updateQuantity:r}=n,{product:o}=n,{isTableRow:s=!1}=n,{isConfigProduct:l=!1}=n;const a=()=>{(o==null?void 0:o.quantity){(o==null?void 0:o.quantity)>_p&&(r(Number(o==null?void 0:o.quantity)-1,o),u("decrease",1))};function u(g,h=0){const _=i===qn,b=_?`list_${g}`:`cart_${g}`,y=_?"list|quantity":"cart|uco|quantity",k=h>0?{...o,quantity:h}:o;Bn(Nn.VIEW_ITEM_LIST,[k],"",b,!1,y)}const d=()=>c(),f=g=>{cm(g)},p=g=>{var _;const h=Number(((_=g==null?void 0:g.target)==null?void 0:_.value)??0);if(h>=_p&&h<=Rf&&h!=(o==null?void 0:o.quantity)){const b=h>(o==null?void 0:o.quantity),y=Math.abs(h-(o==null?void 0:o.quantity));u(b?"increase":"decrease",y),r(h,o)}},m=()=>a();return t.$$set=g=>{"updateQuantity"in g&&e(0,r=g.updateQuantity),"product"in g&&e(1,o=g.product),"isTableRow"in g&&e(2,s=g.isTableRow),"isConfigProduct"in g&&e(3,l=g.isConfigProduct)},[r,o,s,l,a,c,u,d,f,p,m]}class o1 extends Ot{constructor(n){super(),At(this,n,Tx,Sx,It,{updateQuantity:0,product:1,isTableRow:2,isConfigProduct:3},kx)}}const Dne="";function Cx(t){Ut(t,"svelte-1lnzvvq",".pw.align-left.svelte-1lnzvvq{margin-right:auto}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.lock-button.svelte-1lnzvvq{width:fit-content}.bom-options.svelte-1lnzvvq{padding-left:10px}.bom-options.svelte-1lnzvvq:first-of-type{padding-left:0px !important}.sub-heading-lbl.svelte-1lnzvvq{font-size:14px}.sub-heading-icons.svelte-1lnzvvq{position:relative;top:4px;background-color:var(--se-super-light-grey, #e6e6e6);border-radius:10%}")}function Ex(t){let n,e,i;return e=new Gt({props:{id:t[2]+"-locked",iconClassName:"lock-closed",buttonText:t[0]===on?Ll:t[0],buttonSize:"large",className:t[3]}}),e.$on("btnClick",t[7]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw align-left lock-button qds-button svelte-1lnzvvq")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o&4&&(s.id=r[2]+"-locked"),o&1&&(s.buttonText=r[0]===on?Ll:r[0]),o&8&&(s.className=r[3]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function Ix(t){let n,e,i;return e=new Gt({props:{id:t[2]+"-locked",importance:"emphasized",iconClassName:"lock-closed",buttonText:t[0]===on?Ll:t[0],buttonSize:"large",className:t[3]}}),e.$on("btnClick",t[6]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw align-left lock-button qds-button svelte-1lnzvvq")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o&4&&(s.id=r[2]+"-locked"),o&1&&(s.buttonText=r[0]===on?Ll:r[0]),o&8&&(s.className=r[3]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function Ax(t){let n,e,i,r,o,s,l,a;return{c(){n=A("span"),e=A("se-icon"),e.textContent="action_lock_on",i=Y(),r=A("span"),o=de(t[0]),w(e,"class","sub-heading-icons svelte-1lnzvvq"),x(r,"class","sub-heading-lbl svelte-1lnzvvq"),x(n,"class","bom-options svelte-1lnzvvq"),x(n,"id",s=t[2]+"-locked")},m(c,u){J(c,n,u),v(n,e),v(n,i),v(n,r),v(r,o),l||(a=xe(n,"click",t[4]),l=!0)},p(c,u){u&1&&be(o,c[0]),u&4&&s!==(s=c[2]+"-locked")&&x(n,"id",s)},i:et,o:et,d(c){c&&K(n),l=!1,a()}}}function Ox(t){let n,e,i,r;const o=[Ax,Ix,Ex],s=[];function l(a,c){return a[1]===Wa?0:a[1]===ug?1:2}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,[c]){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function Px(t,n,e){let{lockMessage:i=on}=n,{buttonType:r=on}=n,{buttonId:o}=n,{action:s}=n,{className:l=""}=n;function a(){Ca.set(!1),Ca.set(!0),localStorage.setItem(Uu,s)}const c=()=>{a()},u=()=>{a()};return t.$$set=d=>{"lockMessage"in d&&e(0,i=d.lockMessage),"buttonType"in d&&e(1,r=d.buttonType),"buttonId"in d&&e(2,o=d.buttonId),"action"in d&&e(5,s=d.action),"className"in d&&e(3,l=d.className)},[i,r,o,l,a,s,c,u]}class wo extends Ot{constructor(n){super(),At(this,n,Px,Ox,It,{lockMessage:0,buttonType:1,buttonId:2,action:5,className:3},Cx)}}const Bne="";function Nx(t){Ut(t,"svelte-9gu7v9",".pw.disabled.svelte-9gu7v9.svelte-9gu7v9{pointer-events:none;opacity:0.5}.pw.align-right.svelte-9gu7v9.svelte-9gu7v9{margin-left:auto}.pw.align-left.svelte-9gu7v9.svelte-9gu7v9{margin-right:auto}.pw.display-flex.svelte-9gu7v9.svelte-9gu7v9{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-9gu7v9.svelte-9gu7v9{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-9gu7v9.svelte-9gu7v9{font-size:16px}.pw.small-font.svelte-9gu7v9.svelte-9gu7v9{font-size:14px}.pw.nano-font.svelte-9gu7v9.svelte-9gu7v9{font-size:12px}.pw.pointer.svelte-9gu7v9.svelte-9gu7v9{cursor:pointer}.pw-snackbar-elem.svelte-9gu7v9.svelte-9gu7v9{top:30px}.pw.red-color.svelte-9gu7v9.svelte-9gu7v9{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-9gu7v9.svelte-9gu7v9{display:none}.pw.width-100.svelte-9gu7v9.svelte-9gu7v9{width:100%}.pw.bold-font.svelte-9gu7v9.svelte-9gu7v9{font-weight:bold}.pw.normal-font.svelte-9gu7v9.svelte-9gu7v9{font-weight:normal;font-size:16px}.pw.error-msg.svelte-9gu7v9.svelte-9gu7v9{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-9gu7v9.svelte-9gu7v9{text-align:center}.pw.center-align-items.svelte-9gu7v9.svelte-9gu7v9{align-items:center}.pw.justify-content-center.svelte-9gu7v9.svelte-9gu7v9{justify-content:center}.pw.bom-checkbox.svelte-9gu7v9.svelte-9gu7v9{max-width:16px}.pw.ml-8.svelte-9gu7v9.svelte-9gu7v9{margin-left:8px}.pw.ml-12.svelte-9gu7v9.svelte-9gu7v9{margin-left:12px}.pw.ml-36.svelte-9gu7v9.svelte-9gu7v9{margin-left:36px}.pw.mt-8.svelte-9gu7v9.svelte-9gu7v9{margin-top:8px}.pw.mt-6.svelte-9gu7v9.svelte-9gu7v9{margin-top:6px}.pw.mt-32.svelte-9gu7v9.svelte-9gu7v9{margin-top:32px}.pw.mb-8.svelte-9gu7v9.svelte-9gu7v9{margin-bottom:8px}.pw.mb-12.svelte-9gu7v9.svelte-9gu7v9{margin-bottom:12px}.pw.mb-16.svelte-9gu7v9.svelte-9gu7v9{margin-top:16px}.pw.mb-21.svelte-9gu7v9.svelte-9gu7v9{margin-bottom:21px}.pw.mr-12.svelte-9gu7v9.svelte-9gu7v9{margin-right:12px}.pw.p-12.svelte-9gu7v9.svelte-9gu7v9{padding:12px}.pw.pl-16.svelte-9gu7v9.svelte-9gu7v9{padding-left:16px}.pw.pr-16.svelte-9gu7v9.svelte-9gu7v9{padding-right:16px}.position-absolute.svelte-9gu7v9.svelte-9gu7v9{position:absolute}.flex-wrap.svelte-9gu7v9.svelte-9gu7v9{flex-wrap:wrap}.justify-content-sp-btw.svelte-9gu7v9.svelte-9gu7v9{justify-content:space-between}.gp-10.svelte-9gu7v9.svelte-9gu7v9{gap:10px}.gp-5.svelte-9gu7v9.svelte-9gu7v9{gap:5px}.desktop-view.svelte-9gu7v9.svelte-9gu7v9{display:none}.mobile-view.svelte-9gu7v9.svelte-9gu7v9{display:block}.mobile-view-flx.svelte-9gu7v9.svelte-9gu7v9{display:flex;flex-direction:column}.rounded-border.svelte-9gu7v9.svelte-9gu7v9{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-9gu7v9.svelte-9gu7v9{text-align:right}.bg-color-light-grey.svelte-9gu7v9.svelte-9gu7v9{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-9gu7v9.svelte-9gu7v9{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-9gu7v9.svelte-9gu7v9{padding:8px 0 16px 8px}.country-fr.svelte-9gu7v9 .config-container.svelte-9gu7v9,.country-fr.svelte-9gu7v9 .excel-container.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .config-container.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .excel-container.svelte-9gu7v9{padding-left:5px}.country-fr.svelte-9gu7v9 .config-container .excel-heading.svelte-9gu7v9,.country-fr.svelte-9gu7v9 .config-container .upload-container.svelte-9gu7v9,.country-fr.svelte-9gu7v9 .excel-container .excel-heading.svelte-9gu7v9,.country-fr.svelte-9gu7v9 .excel-container .upload-container.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .config-container .excel-heading.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .config-container .upload-container.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .excel-container .excel-heading.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .excel-container .upload-container.svelte-9gu7v9{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-9gu7v9 .button-action-section.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .button-action-section.svelte-9gu7v9{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-9gu7v9 .search-label.svelte-9gu7v9,.country-fr.svelte-9gu7v9 .with-icon.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .search-label.svelte-9gu7v9,.country-pt.svelte-9gu7v9 .with-icon.svelte-9gu7v9{font-size:var(--p-font-size, 0.87rem)}@media(min-width: 968px){.mobile-view.svelte-9gu7v9.svelte-9gu7v9,.mobile-view-flx.svelte-9gu7v9.svelte-9gu7v9{display:none}.desktop-view.svelte-9gu7v9.svelte-9gu7v9{display:inherit}}.cart-mobile-snackbar.svelte-9gu7v9.svelte-9gu7v9{position:fixed;top:0;width:100%;height:92px;font-size:12px}.cart-mobile-snackbar.svelte-9gu7v9 .mobile-snackbar.svelte-9gu7v9{flex-direction:column;height:92px;justify-content:center}.cart-mobile-snackbar.svelte-9gu7v9 .mobile-snackbar .snackbar-btn-class.svelte-9gu7v9{max-width:90%;padding:6px;border:solid 2px;cursor:pointer;margin-top:17px;width:90%;text-align:center;border-radius:5px}.desktop-view-snackbar.svelte-9gu7v9.svelte-9gu7v9,.mobile-view-snackbar.svelte-9gu7v9.svelte-9gu7v9{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-9gu7v9.svelte-9gu7v9{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-9gu7v9.svelte-9gu7v9{display:block}.mobile-snackbar.svelte-9gu7v9.svelte-9gu7v9{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-9gu7v9.svelte-9gu7v9{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.snackbar-mobile-div.svelte-9gu7v9 .snackbar-header.svelte-9gu7v9{padding:12px 20px}.snackbar-mobile-div.svelte-9gu7v9 .close-snackbar.svelte-9gu7v9{padding:10px 16px}.snackbar-mobile-div.svelte-9gu7v9 .snackbar-btn-class-div.svelte-9gu7v9{width:90%;border-radius:5px;border:2px solid white;height:34px;margin:5px 18px;justify-content:center;align-items:center}.cross-margin.svelte-9gu7v9.svelte-9gu7v9{margin:-6px}.bottom-snackbar.svelte-9gu7v9.svelte-9gu7v9{bottom:30px;top:auto}.is-parent.svelte-9gu7v9.svelte-9gu7v9{padding:10px 0;border:none}.eol-date.svelte-9gu7v9.svelte-9gu7v9{color:#333;font-weight:normal}.table-row-grp.svelte-9gu7v9.svelte-9gu7v9{padding:10px 0;border-bottom:none;border-top:solid 1px var(--se-divider, #e6e6e6)}.table-row-grp.is-parent.svelte-9gu7v9.svelte-9gu7v9{border-top:solid 1px var(--se-divider, #e6e6e6)}.table-row-grp.parts.svelte-9gu7v9.svelte-9gu7v9{border-top:none}.table-row-grp.svelte-9gu7v9.svelte-9gu7v9:first-child{border-top:none}.middle-align.svelte-9gu7v9.svelte-9gu7v9:not(:last-of-type){padding-left:unset;margin:auto}.middle-align.svelte-9gu7v9.svelte-9gu7v9:nth-of-type(2){margin:0 0 0 20px}.middle-align.svelte-9gu7v9.svelte-9gu7v9:first-of-type{margin-left:0;margin-right:0}.middle-align.svelte-9gu7v9.svelte-9gu7v9:last-of-type{margin-top:auto;margin-bottom:auto}.action-btns.svelte-9gu7v9.svelte-9gu7v9{padding-right:32px}.action-btns-container.svelte-9gu7v9.svelte-9gu7v9{display:flex;justify-content:center;gap:15px}.action-btns-with-icon.svelte-9gu7v9.svelte-9gu7v9{display:flex;align-items:center}.quantity-field.svelte-9gu7v9.svelte-9gu7v9{width:40%;margin-left:4px}.input-fields.svelte-9gu7v9.svelte-9gu7v9{height:32px}.align-center.svelte-9gu7v9.svelte-9gu7v9{text-align:center}.description-txt.svelte-9gu7v9.svelte-9gu7v9{word-break:break-word;max-width:300px;white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:18px}.description-txt-for-parents.svelte-9gu7v9.svelte-9gu7v9{width:210px;word-break:break-all;white-space:normal}.padding-bottom-small.svelte-9gu7v9.svelte-9gu7v9{padding-bottom:4px}.padding-left-large.svelte-9gu7v9.svelte-9gu7v9{width:120px}.sub-heading-lbl.svelte-9gu7v9.svelte-9gu7v9{margin-top:5px;margin-left:4px;word-break:break-word;white-space:break-spaces;font-weight:bold}.menu-left-margin.svelte-9gu7v9.svelte-9gu7v9{margin-left:4px}.bom-product-checkbox.svelte-9gu7v9.svelte-9gu7v9{max-width:20px}.setting-icon.svelte-9gu7v9.svelte-9gu7v9{margin-top:10px;visibility:initial}.edit-icon-container.svelte-9gu7v9.svelte-9gu7v9{text-align:right;width:30px}.group-items-container-grid.svelte-9gu7v9.svelte-9gu7v9{display:grid;grid-template-columns:80px 210px 30px}.input-container.svelte-9gu7v9.svelte-9gu7v9{width:210px}@media screen and (min-width: 1024px){.input-container.svelte-9gu7v9.svelte-9gu7v9{width:300px}}.checkbox-alignment-top.svelte-9gu7v9.svelte-9gu7v9{--se-table-item-padding:16px}.margin-auto.svelte-9gu7v9.svelte-9gu7v9{margin:auto}.tooltip_content.svelte-9gu7v9.svelte-9gu7v9{margin:10px}.quant-container.svelte-9gu7v9.svelte-9gu7v9{text-align-last:center;margin-left:6px}.plus-btn.svelte-9gu7v9.svelte-9gu7v9{margin:0.8px 0.4px;padding:4px}.info_icon.svelte-9gu7v9.svelte-9gu7v9{margin-top:3px;margin-left:3px}.error-msg.svelte-9gu7v9.svelte-9gu7v9{text-wrap:wrap}.eol.svelte-9gu7v9.svelte-9gu7v9{margin-top:2px;margin-left:4px;color:rgb(177, 0, 67)}.orange-status.svelte-9gu7v9.svelte-9gu7v9{color:var(--se-orange, #e47f00)}.green-status.svelte-9gu7v9.svelte-9gu7v9{color:var(--se-life-green, #3dcd58)}.yellow-status.svelte-9gu7v9.svelte-9gu7v9{color:var(--se-sunflower-yellow, #ffd100)}.product-image.svelte-9gu7v9.svelte-9gu7v9{width:68px;height:68px;background-color:var(--se-black, rgba(0, 0, 0, 0.0509803922))}.quantity-table-item.svelte-9gu7v9.svelte-9gu7v9{width:94px;padding:16px;font-size:16px}.product-details-table-item.svelte-9gu7v9.svelte-9gu7v9{width:330px;min-width:330px}.item-price.svelte-9gu7v9.svelte-9gu7v9{padding:16px;height:72px;margin:auto !important}.item-price-text.svelte-9gu7v9.svelte-9gu7v9{font-weight:bold}.display-price-section.svelte-9gu7v9.svelte-9gu7v9{width:100%;display:flex;justify-content:end}.item-price-text-per-item.svelte-9gu7v9.svelte-9gu7v9{color:#626469}.product-price.svelte-9gu7v9.svelte-9gu7v9{font-weight:bolder}.eol-section.svelte-9gu7v9.svelte-9gu7v9{padding-top:4px}.cart.svelte-9gu7v9 .product-details-table-item.svelte-9gu7v9{width:280px;min-width:280px}.cart.svelte-9gu7v9 .group-items-container-grid.svelte-9gu7v9{padding-left:12px}.cart-eolstatus.svelte-9gu7v9.svelte-9gu7v9{padding-left:12px}.visible-row.svelte-9gu7v9.svelte-9gu7v9{visibility:visible}.product-data.svelte-9gu7v9.svelte-9gu7v9{margin-bottom:5px}.tooltip_content_eol{background-color:#fff;padding:20px;max-width:900px;width:600px;color:#333;box-sizing:border-box;overflow-wrap:break-word;word-wrap:break-word;white-space:normal;font-family:Arial, sans-serif;font-size:14px;line-height:1.6;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.tooltip_content_eol ul{list-style-type:none;padding:10px;margin:0;width:100%;overflow-wrap:break-word;word-wrap:break-word;white-space:normal}.tooltip_content_eol li{margin-bottom:18px;width:100%;overflow-wrap:break-word;word-wrap:break-word;white-space:normal;font-weight:700;line-height:1.6}.tooltip_content_eol li p{margin:10px 0 0 0;font-size:13px;font-weight:normal;line-height:1.6;width:100%;overflow-wrap:break-word;word-wrap:break-word;white-space:normal;display:block}.tooltip_content_eol a{color:#007bff;text-decoration:none;overflow-wrap:break-word;word-wrap:break-word;white-space:normal}.tooltip_content_eol a:hover{text-decoration:underline}")}function kk(t,n,e){const i=t.slice();return i[72]=n[e],i[74]=e,i}function Sk(t){let n,e,i;function r(s){t[45](s)}let o={projectData:t[1],bomData:t[1].bom,successMsg:t[19]("bom_manager.product_deleted"),errorMsg:t[19]("bom_manager.error_in_deleting_product"),confirmTxt:t[19]("list_manager.remove_selected_produts_message"),confirmLbl:t[19]("generic.delete"),cancelLbl:t[19]("generic.cancel"),popupName:Fa};return t[7]!==void 0&&(o.isPopupOpen=t[7]),n=new ha({props:o}),_t.push(()=>Ct(n,"isPopupOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&2&&(a.projectData=s[1]),l[0]&2&&(a.bomData=s[1].bom),l[0]&524288&&(a.successMsg=s[19]("bom_manager.product_deleted")),l[0]&524288&&(a.errorMsg=s[19]("bom_manager.error_in_deleting_product")),l[0]&524288&&(a.confirmTxt=s[19]("list_manager.remove_selected_produts_message")),l[0]&524288&&(a.confirmLbl=s[19]("generic.delete")),l[0]&524288&&(a.cancelLbl=s[19]("generic.cancel")),!e&&l[0]&128&&(e=!0,a.isPopupOpen=s[7],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function Tk(t){let n,e,i;function r(s){t[46](s)}let o={projectData:t[1],bomData:t[1].bom,successMsg:t[19]("product_substitution.success_msg"),errorMsg:t[19]("product_substitution.error_msg"),searchValue:t[14],parentId:t[2],initialQtyBeforeSub:t[13],language:gn(We.language,t[21]),country:mn(We.country,t[21]),apigeeToken:We.apigeeToken};return t[8]!==void 0&&(o.isPopupOpen=t[8]),n=new mk({props:o}),_t.push(()=>Ct(n,"isPopupOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&2&&(a.projectData=s[1]),l[0]&2&&(a.bomData=s[1].bom),l[0]&524288&&(a.successMsg=s[19]("product_substitution.success_msg")),l[0]&524288&&(a.errorMsg=s[19]("product_substitution.error_msg")),l[0]&16384&&(a.searchValue=s[14]),l[0]&4&&(a.parentId=s[2]),l[0]&8192&&(a.initialQtyBeforeSub=s[13]),l[0]&2097152&&(a.language=gn(We.language,s[21])),l[0]&2097152&&(a.country=mn(We.country,s[21])),!e&&l[0]&256&&(e=!0,a.isPopupOpen=s[8],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function Ck(t){let n,e,i;function r(s){t[47](s)}let o={product:t[0],listId:t[4],selectedProductRefs:Li,heading:t[19]("bom_manager.save_documents_heading"),dialogBoxTxt:t[19]("bom_manager.download_documentation_dialog_text_list"),saveLocalLbl:t[19]("bom_manager.save_in_local_lbl"),saveInListLbl:t[19]("bom_manager.keep_within_my_list"),popupName:ng,language:gn(We.language,t[21]),country:mn(We.country,t[21]),apigeeToken:We.apigeeToken,documentManagementBasePath:We.basePath,documentGetEndpoint:li.DOCUMENT_API,documentDownloadEndpoint:li.DOWNLOAD_DOCUMENT_API};return t[9]!==void 0&&(o.isDialogOpen=t[9]),n=new x_({props:o}),_t.push(()=>Ct(n,"isDialogOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&1&&(a.product=s[0]),l[0]&16&&(a.listId=s[4]),l[0]&524288&&(a.heading=s[19]("bom_manager.save_documents_heading")),l[0]&524288&&(a.dialogBoxTxt=s[19]("bom_manager.download_documentation_dialog_text_list")),l[0]&524288&&(a.saveLocalLbl=s[19]("bom_manager.save_in_local_lbl")),l[0]&524288&&(a.saveInListLbl=s[19]("bom_manager.keep_within_my_list")),l[0]&2097152&&(a.language=gn(We.language,s[21])),l[0]&2097152&&(a.country=mn(We.country,s[21])),!e&&l[0]&512&&(e=!0,a.isDialogOpen=s[9],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function Ek(t){let n,e;return n=new Pf({props:{isPopupOpen:t[17],confirmTxt:t[19]("cart.remove_selected_product_message"),confirmLbl:t[19]("generic.delete"),cancelLbl:t[19]("generic.cancel")}}),n.$on("close",t[48]),n.$on("confirmAction",t[41]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&131072&&(o.isPopupOpen=i[17]),r[0]&524288&&(o.confirmTxt=i[19]("cart.remove_selected_product_message")),r[0]&524288&&(o.confirmLbl=i[19]("generic.delete")),r[0]&524288&&(o.cancelLbl=i[19]("generic.cancel")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function Ik(t){let n;return{c(){n=A("se-loading"),w(n,"loading",!0),w(n,"overlay","true"),w(n,"full-page","true")},m(e,i){J(e,n,i)},d(e){e&&K(n)}}}function Ak(t){let n,e,i=t[23]===qn&&Ok(t);return{c(){n=A("se-table-item"),i&&i.c(),w(n,"width","52px"),w(n,"class","checkbox-alignment-top svelte-9gu7v9")},m(r,o){J(r,n,o),i&&i.m(n,null),e=!0},p(r,o){r[23]===qn?i?(i.p(r,o),o[0]&8388608&&Q(i,1)):(i=Ok(r),i.c(),Q(i,1),i.m(n,null)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d()}}}function Ok(t){var s;let n,e=!((s=t[0].serialNum)!=null&&s.includes("-")),i,r,o=e&&Pk(t);return{c(){n=A("se-block"),o&&o.c(),w(n,"id",i="check-"+t[0].serialNum),w(n,"class","bom-product-checkbox svelte-9gu7v9")},m(l,a){J(l,n,a),o&&o.m(n,null),r=!0},p(l,a){var c;a[0]&1&&(e=!((c=l[0].serialNum)!=null&&c.includes("-"))),e?o?(o.p(l,a),a[0]&1&&Q(o,1)):(o=Pk(l),o.c(),Q(o,1),o.m(n,null)):o&&(Je(),se(o,1,1,()=>{o=null}),Qe()),(!r||a[0]&1&&i!==(i="check-"+l[0].serialNum))&&w(n,"id",i)},i(l){r||(Q(o),r=!0)},o(l){se(o),r=!1},d(l){l&&K(n),o&&o.d()}}}function Pk(t){var i,r,o;let n,e;return n=new pa({props:{id:"chk-"+t[0].serialNum,disabled:((i=t[0])==null?void 0:i.isDisabled)||nc(t[0])&&!((r=t[0])!=null&&r.isParent)||t[24][Gc]===Ae.DISABLED,checked:(o=t[0])==null?void 0:o.isSelected,boxSize:"small",className:"row-checkbox"}}),n.$on("clickCheckBox",t[49]),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),e=!0},p(s,l){var c,u,d;const a={};l[0]&1&&(a.id="chk-"+s[0].serialNum),l[0]&16777217&&(a.disabled=((c=s[0])==null?void 0:c.isDisabled)||nc(s[0])&&!((u=s[0])!=null&&u.isParent)||s[24][Gc]===Ae.DISABLED),l[0]&1&&(a.checked=(d=s[0])==null?void 0:d.isSelected),n.$set(a)},i(s){e||(Q(n.$$.fragment,s),e=!0)},o(s){se(n.$$.fragment,s),e=!1},d(s){qe(n,s)}}}function Nk(t){let n,e,i,r,o;return{c(){n=A("img"),x(n,"loading","eager"),x(n,"class","product-image svelte-9gu7v9"),rr(n.src,e=t[40](t[11],Bl.size["1X"],!1))||x(n,"src",e),x(n,"alt",i=t[0].productRef||t[0].productId)},m(s,l){J(s,n,l),r||(o=xe(n,"error",t[50]),r=!0)},p(s,l){l[0]&2048&&!rr(n.src,e=s[40](s[11],Bl.size["1X"],!1))&&x(n,"src",e),l[0]&1&&i!==(i=s[0].productRef||s[0].productId)&&x(n,"alt",i)},d(s){s&&K(n),r=!1,o()}}}function Lx(t){let n,e=(t[0].productRef||t[0].productId)+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","pw bold-font small-font svelte-9gu7v9")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&1&&e!==(e=(r[0].productRef||r[0].productId)+"")&&be(i,e)},d(r){r&&K(n)}}}function jx(t){let n,e=(t[0].productRef||t[0].productId)+"",i,r,o,s;return{c(){var l;n=A("qds-inline-link"),i=de(e),w(n,"class","pw pointer svelte-9gu7v9"),w(n,"href",r=vo((l=t[0])==null?void 0:l.pdpUrl)),w(n,"target","_blank"),w(n,"rel","external")},m(l,a){J(l,n,a),v(n,i),o||(s=xe(n,"click",t[51]),o=!0)},p(l,a){var c;a[0]&1&&e!==(e=(l[0].productRef||l[0].productId)+"")&&be(i,e),a[0]&1&&r!==(r=vo((c=l[0])==null?void 0:c.pdpUrl))&&w(n,"href",r)},d(l){l&&K(n),o=!1,s()}}}function Rx(t){var g,h,_,b,y,k,T,R,O,j,q,M;let n,e=((g=t[0])!=null&&g.description?t[0].description:Te)+"",i,r,o,s,l,a,c,u,d=(!((_=(h=t[0])==null?void 0:h.eolStatus)!=null&&_.length)&&t[12]||((b=t[0].eolStatus)==null?void 0:b.length)&&t[0].eolStatus[0]!==gi&&t[12])&&Lk(t),f=((k=(y=t[0])==null?void 0:y.customization)==null?void 0:k.custom_configuredReference1)&&((R=(T=t[0])==null?void 0:T.customization)==null?void 0:R.custom_configuredReference2)&&jk(t),p=((j=(O=t[0])==null?void 0:O.orderingData)==null?void 0:j.orderingId)&&Rk(t),m=((M=(q=t[0])==null?void 0:q.orderingData)==null?void 0:M.productCode)&&Mk(t);return{c(){n=A("div"),i=de(e),r=Y(),o=A("div"),d&&d.c(),s=Y(),f&&f.c(),l=Y(),p&&p.c(),a=Y(),m&&m.c(),c=wt(),x(n,"class","description-txt svelte-9gu7v9"),x(n,"data-testid","description-lbl"),x(o,"class","description-txt svelte-9gu7v9"),x(o,"data-testid","substitute-lbl"),x(o,"id","substitute-lbl")},m(z,D){J(z,n,D),v(n,i),J(z,r,D),J(z,o,D),d&&d.m(o,null),J(z,s,D),f&&f.m(z,D),J(z,l,D),p&&p.m(z,D),J(z,a,D),m&&m.m(z,D),J(z,c,D),u=!0},p(z,D){var P,L,C,S,I,N,E,B,U,H,Z,V;(!u||D[0]&1)&&e!==(e=((P=z[0])!=null&&P.description?z[0].description:Te)+"")&&be(i,e),!((C=(L=z[0])==null?void 0:L.eolStatus)!=null&&C.length)&&z[12]||(S=z[0].eolStatus)!=null&&S.length&&z[0].eolStatus[0]!==gi&&z[12]?d?(d.p(z,D),D[0]&4097&&Q(d,1)):(d=Lk(z),d.c(),Q(d,1),d.m(o,null)):d&&(Je(),se(d,1,1,()=>{d=null}),Qe()),(N=(I=z[0])==null?void 0:I.customization)!=null&&N.custom_configuredReference1&&((B=(E=z[0])==null?void 0:E.customization)!=null&&B.custom_configuredReference2)?f?f.p(z,D):(f=jk(z),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null),(H=(U=z[0])==null?void 0:U.orderingData)!=null&&H.orderingId?p?p.p(z,D):(p=Rk(z),p.c(),p.m(a.parentNode,a)):p&&(p.d(1),p=null),(V=(Z=z[0])==null?void 0:Z.orderingData)!=null&&V.productCode?m?m.p(z,D):(m=Mk(z),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(z){u||(Q(d),u=!0)},o(z){se(d),u=!1},d(z){z&&(K(n),K(r),K(o),K(s),K(l),K(a),K(c)),d&&d.d(),f&&f.d(z),p&&p.d(z),m&&m.d(z)}}}function Mx(t){let n;return{c(){n=A("se-skeleton"),w(n,"width","200px"),w(n,"height","15px"),w(n,"count","1")},m(e,i){J(e,n,i)},p:et,i:et,o:et,d(e){e&&K(n)}}}function Lk(t){let n,e,i,r;const o=[Dx,qx],s=[];function l(a,c){return a[24][Aa]===Ae.SHOW||a[24][Aa]===Ae.DISABLED?0:a[24][Aa]===Ae.LOCK?1:-1}return~(n=l(t))&&(e=s[n]=o[n](t)),{c(){e&&e.c(),i=wt()},m(a,c){~n&&s[n].m(a,c),J(a,i,c),r=!0},p(a,c){let u=n;n=l(a),n===u?~n&&s[n].p(a,c):(e&&(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe()),~n?(e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i)):e=null)},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),~n&&s[n].d(a)}}}function qx(t){let n,e;return n=new wo({props:{projectId:t[4],lockMessage:t[19]("product_substitution.view_sub_link_text"),buttonId:`lnk-view-substitute-${t[0].serialNum}`,action:"product_substitude"}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&16&&(o.projectId=i[4]),r[0]&524288&&(o.lockMessage=i[19]("product_substitution.view_sub_link_text")),r[0]&1&&(o.buttonId=`lnk-view-substitute-${i[0].serialNum}`),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function Dx(t){let n,e,i;return e=new xi({props:{id:"lnk-view-substitute-"+t[0].serialNum,dataTestId:"lnk-view-substitute",linkText:t[19]("product_substitution.view_sub_link_text"),linkSize:"small",disabled:t[24][Aa]===Ae.DISABLED}}),e.$on("linkClick",t[52]),{c(){n=A("span"),De(e.$$.fragment),x(n,"class","pw pointer svelte-9gu7v9")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&1&&(s.id="lnk-view-substitute-"+r[0].serialNum),o[0]&524288&&(s.linkText=r[19]("product_substitution.view_sub_link_text")),o[0]&16777216&&(s.disabled=r[24][Aa]===Ae.DISABLED),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function jk(t){var h,_,b,y;let n,e,i=t[19]("bom_manager.personalization_id")+"",r,o,s=((_=(h=t[0])==null?void 0:h.customization)==null?void 0:_.custom_configuredReference1)+"",l,a,c,u,d=t[19]("bom_manager.product")+"",f,p,m=((y=(b=t[0])==null?void 0:b.customization)==null?void 0:y.custom_configuredReference2)+"",g;return{c(){n=A("div"),e=A("span"),r=de(i),o=de(`: `),l=de(s),a=Y(),c=A("div"),u=A("span"),f=de(d),p=de(`: `),g=de(m),x(e,"class","pw bold-font svelte-9gu7v9"),x(n,"class","description-txt-for-parents svelte-9gu7v9"),x(n,"data-testid","personalization-id-lbl"),x(u,"class","pw bold-font svelte-9gu7v9"),x(c,"class","description-txt-for-parents svelte-9gu7v9"),x(c,"data-testid","product-id-lbl")},m(k,T){J(k,n,T),v(n,e),v(e,r),v(e,o),v(n,l),J(k,a,T),J(k,c,T),v(c,u),v(u,f),v(u,p),v(c,g)},p(k,T){var R,O,j,q;T[0]&524288&&i!==(i=k[19]("bom_manager.personalization_id")+"")&&be(r,i),T[0]&1&&s!==(s=((O=(R=k[0])==null?void 0:R.customization)==null?void 0:O.custom_configuredReference1)+"")&&be(l,s),T[0]&524288&&d!==(d=k[19]("bom_manager.product")+"")&&be(f,d),T[0]&1&&m!==(m=((q=(j=k[0])==null?void 0:j.customization)==null?void 0:q.custom_configuredReference2)+"")&&be(g,m)},d(k){k&&(K(n),K(a),K(c))}}}function Rk(t){var a,c;let n,e,i=t[19]("bom_manager.config_id")+"",r,o,s=((c=(a=t[0])==null?void 0:a.orderingData)!=null&&c.orderingId?t[0].orderingData.orderingId:Te)+"",l;return{c(){n=A("div"),e=A("span"),r=de(i),o=de(`: `),l=de(s),x(e,"class","pw bold-font svelte-9gu7v9"),x(n,"class","description-txt-for-parents svelte-9gu7v9"),x(n,"data-testid","config-id-lbl")},m(u,d){J(u,n,d),v(n,e),v(e,r),v(e,o),v(n,l)},p(u,d){var f,p;d[0]&524288&&i!==(i=u[19]("bom_manager.config_id")+"")&&be(r,i),d[0]&1&&s!==(s=((p=(f=u[0])==null?void 0:f.orderingData)!=null&&p.orderingId?u[0].orderingData.orderingId:Te)+"")&&be(l,s)},d(u){u&&K(n)}}}function Mk(t){var a,c;let n,e,i=t[19]("bom_manager.product_code")+"",r,o,s=((c=(a=t[0])==null?void 0:a.orderingData)!=null&&c.productCode?t[0].orderingData.productCode:Te)+"",l;return{c(){n=A("div"),e=A("span"),r=de(i),o=de(`: `),l=de(s),x(e,"class","pw bold-font svelte-9gu7v9"),x(n,"class","description-txt-for-parents svelte-9gu7v9"),x(n,"data-testid","product-code-lbl")},m(u,d){J(u,n,d),v(n,e),v(e,r),v(e,o),v(n,l)},p(u,d){var f,p;d[0]&524288&&i!==(i=u[19]("bom_manager.product_code")+"")&&be(r,i),d[0]&1&&s!==(s=((p=(f=u[0])==null?void 0:f.orderingData)!=null&&p.productCode?u[0].orderingData.productCode:Te)+"")&&be(l,s)},d(u){u&&K(n)}}}function qk(t){let n,e,i,r,o,s;return{c(){n=A("se-icon"),e=de("action_settings1"),w(n,"id","ic-show-configurator"),w(n,"title",i=t[19]("generic.edit")),w(n,"class",r="primary pw pointer setting-icon "+(t[21].isArchived||t[24][qh]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9"),w(n,"size","small")},m(l,a){J(l,n,a),v(n,e),o||(s=xe(n,"click",t[53]),o=!0)},p(l,a){a[0]&524288&&i!==(i=l[19]("generic.edit"))&&w(n,"title",i),a[0]&18874368&&r!==(r="primary pw pointer setting-icon "+(l[21].isArchived||l[24][qh]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9")&&w(n,"class",r)},d(l){l&&K(n),o=!1,s()}}}function Dk(t){let n;function e(o,s){var l,a,c,u,d;if((l=o[0])!=null&&l.isLoading||o[22])return Fx;if(!((c=(a=o[0])==null?void 0:a.eolStatus)!=null&&c.length)||o[0].eolStatus[0]===Ga)return zx;if((u=o[0].eolStatus)!=null&&u.length)return Ux;if(!((d=o[0])!=null&&d.eolStatus))return Bx}let i=e(t),r=i&&i(t);return{c(){r&&r.c(),n=wt()},m(o,s){r&&r.m(o,s),J(o,n,s)},p(o,s){i===(i=e(o))&&r?r.p(o,s):(r&&r.d(1),r=i&&i(o),r&&(r.c(),r.m(n.parentNode,n)))},d(o){o&&K(n),r&&r.d(o)}}}function Bx(t){let n,e,i,r,o=t[19]("bom_manager.status_unavailable")+"",s;function l(u,d){return u[20].showCartIcon?Gx:xx}let a=l(t),c=a(t);return{c(){n=A("div"),e=A("div"),c.c(),i=Y(),r=A("span"),s=de(o),x(r,"class","sub-heading-lbl svelte-9gu7v9"),x(r,"id","eol-title-non-commercial"),x(r,"data-testid","eol-lbl-non-commercial"),x(e,"class","pw display-flex svelte-9gu7v9"),x(n,"class","pw nano-font svelte-9gu7v9")},m(u,d){J(u,n,d),v(n,e),c.m(e,null),v(e,i),v(e,r),v(r,s)},p(u,d){a===(a=l(u))&&c?c.p(u,d):(c.d(1),c=a(u),c&&(c.c(),c.m(e,i))),d[0]&524288&&o!==(o=u[19]("bom_manager.status_unavailable")+"")&&be(s,o)},d(u){u&&K(n),c.d()}}}function Ux(t){let n,e,i=Dt(t[0].eolStatus),r=[];for(let o=0;o0?0:1}return e=u(t),i=c[e]=a[e](t),{c(){n=A("div"),i.c(),r=Y(),o=A("div"),o.textContent="??????",x(n,"class",s="pw display-flex action-btns-container "+(t[5]?Te:"action-btns-spacing")+" svelte-9gu7v9")},m(d,f){J(d,n,f),c[e].m(n,null),v(n,r),v(n,o),l=!0},p(d,f){let p=e;e=u(d),e===p?c[e].p(d,f):(Je(),se(c[p],1,1,()=>{c[p]=null}),Qe(),i=c[e],i?i.p(d,f):(i=c[e]=a[e](d),i.c()),Q(i,1),i.m(n,r)),(!l||f[0]&32&&s!==(s="pw display-flex action-btns-container "+(d[5]?Te:"action-btns-spacing")+" svelte-9gu7v9"))&&x(n,"class",s)},i(d){l||(Q(i),l=!0)},o(d){se(i),l=!1},d(d){d&&K(n),c[e].d()}}}function nG(t){let n=Ra(t[0]),e,i=t[23]===qn&&Ra(t[0]),r,o,s=n&&$k(t),l=i&&t4(t);return{c(){s&&s.c(),e=Y(),l&&l.c(),r=wt()},m(a,c){s&&s.m(a,c),J(a,e,c),l&&l.m(a,c),J(a,r,c),o=!0},p(a,c){c[0]&1&&(n=Ra(a[0])),n?s?(s.p(a,c),c[0]&1&&Q(s,1)):(s=$k(a),s.c(),Q(s,1),s.m(e.parentNode,e)):s&&(Je(),se(s,1,1,()=>{s=null}),Qe()),c[0]&8388609&&(i=a[23]===qn&&Ra(a[0])),i?l?l.p(a,c):(l=t4(a),l.c(),l.m(r.parentNode,r)):l&&(l.d(1),l=null)},i(a){o||(Q(s),o=!0)},o(a){se(s),o=!1},d(a){a&&(K(e),K(r)),s&&s.d(a),l&&l.d(a)}}}function iG(t){let n,e,i,r,o=!t[28]&&n4(t),s=(t[24][ui]===Ae.SHOW||t[24][ui]===Ae.DISABLED)&&i4(t);return{c(){o&&o.c(),n=Y(),e=A("div"),s&&s.c(),x(e,"class",i="action-btns-with-icon menu-left-margin "+(t[24][ui]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9")},m(l,a){o&&o.m(l,a),J(l,n,a),J(l,e,a),s&&s.m(e,null),r=!0},p(l,a){l[28]?o&&(Je(),se(o,1,1,()=>{o=null}),Qe()):o?(o.p(l,a),a[0]&268435456&&Q(o,1)):(o=n4(l),o.c(),Q(o,1),o.m(n.parentNode,n)),l[24][ui]===Ae.SHOW||l[24][ui]===Ae.DISABLED?s?(s.p(l,a),a[0]&16777216&&Q(s,1)):(s=i4(l),s.c(),Q(s,1),s.m(e,null)):s&&(Je(),se(s,1,1,()=>{s=null}),Qe()),(!r||a[0]&16777216&&i!==(i="action-btns-with-icon menu-left-margin "+(l[24][ui]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9"))&&x(e,"class",i)},i(l){r||(Q(o),Q(s),r=!0)},o(l){se(o),se(s),r=!1},d(l){l&&(K(n),K(e)),o&&o.d(l),s&&s.d()}}}function $k(t){let n,e,i,r=t[24][ui]===Ae.SHOW&&e4(t);return{c(){n=A("div"),r&&r.c(),x(n,"class",e="action-btns-with-icon menu-left-margin "+(t[1].isArchived||t[24][ui]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9")},m(o,s){J(o,n,s),r&&r.m(n,null),i=!0},p(o,s){o[24][ui]===Ae.SHOW?r?(r.p(o,s),s[0]&16777216&&Q(r,1)):(r=e4(o),r.c(),Q(r,1),r.m(n,null)):r&&(Je(),se(r,1,1,()=>{r=null}),Qe()),(!i||s[0]&16777218&&e!==(e="action-btns-with-icon menu-left-margin "+(o[1].isArchived||o[24][ui]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9"))&&x(n,"class",e)},i(o){i||(Q(r),i=!0)},o(o){se(r),i=!1},d(o){o&&K(n),r&&r.d()}}}function e4(t){let n,e;return n=new Ni({props:{iconClassName:"trash-can",buttonSize:"medium",className:"primary icon pw pointer",id:"delete-product-btn-"+t[0].serialNum}}),n.$on("btnClick",t[56]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1&&(o.id="delete-product-btn-"+i[0].serialNum),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function t4(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m;return{c(){n=A("div"),e=A("se-dropdown"),i=A("se-icon"),r=de("other_vertical"),s=Y(),l=A("se-list"),a=A("se-list-item"),w(i,"id",o="ic-document-menu-"+t[0].serialNum),w(i,"slot","trigger"),w(i,"option","button"),w(a,"id",c="lst-download-document-"+t[0].serialNum+"-1"),w(a,"item",u=t[19]("bom_manager.download_documentation_button")),w(l,"option","dropdown"),w(e,"alignment","right"),w(e,"class",d=Nt(t[24][Qu]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9"),w(e,"id",f="dropdown-table-row-bom-options-"+t[0].serialNum),x(n,"class","action-btns-with-icon menu-left-margin svelte-9gu7v9")},m(g,h){J(g,n,h),v(n,e),v(e,i),v(i,r),v(e,s),v(e,l),v(l,a),p||(m=xe(a,"click",t[57]),p=!0)},p(g,h){h[0]&1&&o!==(o="ic-document-menu-"+g[0].serialNum)&&w(i,"id",o),h[0]&1&&c!==(c="lst-download-document-"+g[0].serialNum+"-1")&&w(a,"id",c),h[0]&524288&&u!==(u=g[19]("bom_manager.download_documentation_button"))&&w(a,"item",u),h[0]&16777216&&d!==(d=Nt(g[24][Qu]===Ae.DISABLED?"pw disabled":Te)+" svelte-9gu7v9")&&w(e,"class",d),h[0]&1&&f!==(f="dropdown-table-row-bom-options-"+g[0].serialNum)&&w(e,"id",f)},d(g){g&&K(n),p=!1,m()}}}function n4(t){let n,e,i,r;const o=[sG,rG],s=[];function l(a,c){return a[3]?0:1}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,c){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function rG(t){let n;return{c(){n=A("div"),n.innerHTML="",x(n,"class","action-btns-with-icon svelte-9gu7v9")},m(e,i){J(e,n,i)},p:et,i:et,o:et,d(e){e&&K(n)}}}function sG(t){let n,e,i;return e=new Ni({props:{iconClassName:"chevron-up",buttonText:t[19]("generic.hide_details"),buttonSize:"small",id:"ic-hide-children",className:"large-spacing"}}),e.$on("btnClick",t[54]),{c(){n=A("div"),De(e.$$.fragment),x(n,"class","action-btns-with-icon svelte-9gu7v9")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&524288&&(s.buttonText=r[19]("generic.hide_details")),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function i4(t){let n,e;return n=new Ni({props:{iconClassName:"trash-can",buttonSize:"medium",className:"primary icon pw pointer",id:"delete-product-btn-"+t[0].serialNum,disabled:JSON.parse(String(t[24][ui]===Ae.DISABLED))}}),n.$on("btnClick",t[55]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1&&(o.id="delete-product-btn-"+i[0].serialNum),r[0]&16777216&&(o.disabled=JSON.parse(String(i[24][ui]===Ae.DISABLED))),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function oG(t){var te,oe,ce,ge,fe;let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k=t[24][$u]===Ae.SHOW&&!t[29](),T,R,O,j,q,M,z,D,P,L,C,S=t[7]&&Sk(t),I=t[8]&&t[15]!==Te&&t[16]!==Te&&Tk(t),N=t[9]&&Ck(t),E=t[23]===Vn&&t[17]&&Ek(t),B=(((te=t[0])==null?void 0:te.isLoading)||t[22])&&Ik(),U=t[23]!==Vn&&Ak(t),H=t[25]&&Nk(t);function Z(ae,ie){var _e;return(_e=ae[0])!=null&&_e.pdpUrl?jx:Lx}let V=Z(t),ne=V(t);const W=[Mx,Rx],re=[];function G(ae,ie){return ae[26]?0:1}g=G(t),h=re[g]=W[g](t);let F=t[0].isParent&&(((ce=(oe=t[0])==null?void 0:oe.orderingData)==null?void 0:ce.productCode)||((fe=(ge=t[0])==null?void 0:ge.customization)==null?void 0:fe.custom_configuredReference1))&&qk(t),X=k&&Dk(t);const le=[Jx,Kx],ue=[];function ee(ae,ie){return ie[0]&16777217&&(O=null),O==null&&(O=!!(Ra(ae[0])&&ae[24][Us]!==Ae.DISABLED)),O?0:1}j=ee(t,[-1,-1,-1]),q=ue[j]=le[j](t);let $=t[10]<=0&&Xk(t),he=(t[24][bi]===Ae.SHOW||t[24][bi]===Ae.DISABLED)&&Kk(t),me=t[27]&&Qk(t);return{c(){S&&S.c(),n=Y(),I&&I.c(),e=Y(),N&&N.c(),i=Y(),E&&E.c(),r=Y(),B&&B.c(),o=Y(),s=A("se-table-group"),U&&U.c(),l=Y(),a=A("se-table-item"),c=A("div"),H&&H.c(),u=Y(),d=A("div"),f=A("div"),p=A("div"),ne.c(),m=Y(),h.c(),_=Y(),b=A("div"),F&&F.c(),y=Y(),X&&X.c(),T=Y(),R=A("se-table-item"),q.c(),M=Y(),$&&$.c(),z=Y(),he&&he.c(),D=Y(),P=A("se-table-item"),me&&me.c(),x(p,"class","product-data svelte-9gu7v9"),x(d,"class","input-container pw small-font svelte-9gu7v9"),x(b,"class","edit-icon-container svelte-9gu7v9"),x(c,"class","group-items-container-grid svelte-9gu7v9"),w(a,"flex","2"),w(a,"class","product-details-table-item svelte-9gu7v9"),w(R,"class","quantity-table-item middle-align svelte-9gu7v9"),w(R,"width","148px"),w(P,"flex","1"),w(P,"class","middle-align svelte-9gu7v9"),w(s,"class",L="table-row-grp pw small-font visible-row "+(t[1].isArchived?"pw disabled":Te)+" "+(t[23]===Vn?"cart":"")+" "+((t[0].isParent??!0)===!1?"is-parent":"")+" "+t[6]+" svelte-9gu7v9")},m(ae,ie){S&&S.m(ae,ie),J(ae,n,ie),I&&I.m(ae,ie),J(ae,e,ie),N&&N.m(ae,ie),J(ae,i,ie),E&&E.m(ae,ie),J(ae,r,ie),B&&B.m(ae,ie),J(ae,o,ie),J(ae,s,ie),U&&U.m(s,null),v(s,l),v(s,a),v(a,c),H&&H.m(c,null),v(c,u),v(c,d),v(d,f),v(f,p),ne.m(p,null),v(f,m),re[g].m(f,null),v(c,_),v(c,b),F&&F.m(b,null),v(a,y),X&&X.m(a,null),v(s,T),v(s,R),ue[j].m(R,null),v(R,M),$&&$.m(R,null),v(s,z),he&&he.m(s,null),v(s,D),v(s,P),me&&me.m(P,null),C=!0},p(ae,ie){var we,pe,Se,Le,Re;ae[7]?S?(S.p(ae,ie),ie[0]&128&&Q(S,1)):(S=Sk(ae),S.c(),Q(S,1),S.m(n.parentNode,n)):S&&(Je(),se(S,1,1,()=>{S=null}),Qe()),ae[8]&&ae[15]!==Te&&ae[16]!==Te?I?(I.p(ae,ie),ie[0]&98560&&Q(I,1)):(I=Tk(ae),I.c(),Q(I,1),I.m(e.parentNode,e)):I&&(Je(),se(I,1,1,()=>{I=null}),Qe()),ae[9]?N?(N.p(ae,ie),ie[0]&512&&Q(N,1)):(N=Ck(ae),N.c(),Q(N,1),N.m(i.parentNode,i)):N&&(Je(),se(N,1,1,()=>{N=null}),Qe()),ae[23]===Vn&&ae[17]?E?(E.p(ae,ie),ie[0]&8519680&&Q(E,1)):(E=Ek(ae),E.c(),Q(E,1),E.m(r.parentNode,r)):E&&(Je(),se(E,1,1,()=>{E=null}),Qe()),(we=ae[0])!=null&&we.isLoading||ae[22]?B||(B=Ik(),B.c(),B.m(o.parentNode,o)):B&&(B.d(1),B=null),ae[23]!==Vn?U?(U.p(ae,ie),ie[0]&8388608&&Q(U,1)):(U=Ak(ae),U.c(),Q(U,1),U.m(s,l)):U&&(Je(),se(U,1,1,()=>{U=null}),Qe()),ae[25]?H?H.p(ae,ie):(H=Nk(ae),H.c(),H.m(c,u)):H&&(H.d(1),H=null),V===(V=Z(ae))&&ne?ne.p(ae,ie):(ne.d(1),ne=V(ae),ne&&(ne.c(),ne.m(p,null)));let _e=g;g=G(ae),g===_e?re[g].p(ae,ie):(Je(),se(re[_e],1,1,()=>{re[_e]=null}),Qe(),h=re[g],h?h.p(ae,ie):(h=re[g]=W[g](ae),h.c()),Q(h,1),h.m(f,null)),ae[0].isParent&&((Se=(pe=ae[0])==null?void 0:pe.orderingData)!=null&&Se.productCode||(Re=(Le=ae[0])==null?void 0:Le.customization)!=null&&Re.custom_configuredReference1)?F?F.p(ae,ie):(F=qk(ae),F.c(),F.m(b,null)):F&&(F.d(1),F=null),ie[0]&16777216&&(k=ae[24][$u]===Ae.SHOW&&!ae[29]()),k?X?X.p(ae,ie):(X=Dk(ae),X.c(),X.m(a,null)):X&&(X.d(1),X=null);let Ie=j;j=ee(ae,ie),j===Ie?ue[j].p(ae,ie):(Je(),se(ue[Ie],1,1,()=>{ue[Ie]=null}),Qe(),q=ue[j],q?q.p(ae,ie):(q=ue[j]=le[j](ae),q.c()),Q(q,1),q.m(R,M)),ae[10]<=0?$?$.p(ae,ie):($=Xk(ae),$.c(),$.m(R,null)):$&&($.d(1),$=null),ae[24][bi]===Ae.SHOW||ae[24][bi]===Ae.DISABLED?he?he.p(ae,ie):(he=Kk(ae),he.c(),he.m(s,D)):he&&(he.d(1),he=null),ae[27]?me?(me.p(ae,ie),ie[0]&134217728&&Q(me,1)):(me=Qk(ae),me.c(),Q(me,1),me.m(P,null)):me&&(Je(),se(me,1,1,()=>{me=null}),Qe()),(!C||ie[0]&8388675&&L!==(L="table-row-grp pw small-font visible-row "+(ae[1].isArchived?"pw disabled":Te)+" "+(ae[23]===Vn?"cart":"")+" "+((ae[0].isParent??!0)===!1?"is-parent":"")+" "+ae[6]+" svelte-9gu7v9"))&&w(s,"class",L)},i(ae){C||(Q(S),Q(I),Q(N),Q(E),Q(U),Q(h),Q(q),Q(me),C=!0)},o(ae){se(S),se(I),se(N),se(E),se(U),se(h),se(q),se(me),C=!1},d(ae){ae&&(K(n),K(e),K(i),K(r),K(o),K(s)),S&&S.d(ae),I&&I.d(ae),N&&N.d(ae),E&&E.d(ae),B&&B.d(ae),U&&U.d(),H&&H.d(),ne.d(),re[g].d(),F&&F.d(),X&&X.d(),ue[j].d(),$&&$.d(),he&&he.d(),me&&me.d()}}}function aG(t,n,e){let i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y;ye(t,$r,He=>e(58,r=He)),ye(t,es,He=>e(59,o=He)),ye(t,Vt,He=>e(19,s=He)),ye(t,Gu,He=>e(60,l=He)),ye(t,Ua,He=>e(20,a=He)),ye(t,Ap,He=>e(61,c=He)),ye(t,an,He=>e(21,u=He)),ye(t,Ji,He=>e(22,d=He)),ye(t,ti,He=>e(62,f=He)),ye(t,Ki,He=>e(23,p=He)),ye(t,C2,He=>e(63,m=He)),ye(t,Ii,He=>e(24,g=He)),ye(t,Dl,He=>e(25,h=He)),ye(t,Dv,He=>e(26,_=He)),ye(t,Xr,He=>e(27,b=He)),ye(t,Pc,He=>e(28,y=He));let{apigeeToken:k}=n,{language:T}=n,{country:R}=n,{product:O}=n,{parentId:j}=n,{projectData:q}=n,{viewChildren:M}=n,{projectId:z}=n,{isConfigChild:D=!1}=n,{isChildClass:P=""}=n,L=!1,C=!1,S=!1,I=1,N,E=!1,B=1;const U=Mn();let H,Z=T,V=R,ne=!1;Un(()=>{G()});async function W(){var Be,Ye;const He=O.productRef||O.productId;if(m[He]){const Ue=m[He],rt=Ue==null?void 0:Ue.subs;e(12,E=(rt==null?void 0:rt.length)!==0&&((Ye=rt[0])==null?void 0:Ye.replacementType)!==null),e(11,N=Ue==null?void 0:Ue.pictureDocumentReference)}else{const Ue=eg.replace(/{path}/g,Jf[We.environment]).replace(/{cc}/g,V.toLowerCase()).replace(/{lc}/g,Z)+(O.productRef||O.productId);ve.info("subs final api is: "+Ue);const rt=await f_(Ue),ze=rt==null?void 0:rt.subs;e(12,E=(ze==null?void 0:ze.length)!==0&&((Be=ze[0])==null?void 0:Be.replacementType)!==null),e(11,N=rt==null?void 0:rt.pictureDocumentReference),jt(C2,m[He]=rt,m)}}function re(){return Object.hasOwn(O,"hive2File")&&(O==null?void 0:O.hive2File)!==kA}function G(){const He=new MutationObserver(()=>{let Be="row-qty-"+O.serialNum;const Ye=document.getElementById(Be);Ye&&(Ye!=null&&Ye.shadowRoot)&&requestAnimationFrame(()=>{var rt;const Ue=(rt=Ye==null?void 0:Ye.shadowRoot)==null?void 0:rt.querySelector(".qds-input");Ue&&(Ue.style.width="100%",He.disconnect())})});He.observe(document.body,{childList:!0,subtree:!0})}h1(async()=>{R===v1.en_UK?e(16,V=vl.UK.toLowerCase()):e(16,V=R);const He=g_(C1.SUBSTITUTION,R);ve.info("country object after fallback lookup: "+JSON.stringify(He)),(He==null?void 0:He.length)>0&&!He[0].supportedLanguages.includes(T)?(e(15,Z=String(He[0].fallbackLanguage)),ve.info("went into fallback condition. fallback lang is "+Z)):(Z!==Te&&e(15,Z=T),ve.info("Dit not go into fallback condition. lang is "+Z))});function F(He){var Ye,Ue;const Be=He.target.checked;e(0,O.isSelected=Be,O),Fd(O,He.target.checked),Be||(e(1,q.bom.isSelected=Be,q),(Ue=(Ye=q==null?void 0:q.bom)==null?void 0:Ye.groups)==null||Ue.forEach(rt=>{xd(rt)})),tc(_s(q.bom)),an.update(()=>q)}function X(He,Be,Ye){oh.set(He),ah.set(Be),Gu.set(Ye),p===qn?e(7,L=!0):p===Vn&&e(17,ne=!0)}function le(He,Be,Ye){e(14,H=Ye.productRef||Ye.productId),e(8,C=!0),e(13,B=Ye.quantity),vg.set(He),wg.set(Be)}function ue(){e(9,S=!0)}function ee(He,Be){var Ue,rt,ze;const Ye=Number(He);if(Math.floor(Ye)!==Ye)e(10,I=0);else if(Ye>0){if(ja([Be]),e(10,I=Ye),Ye!==Be.quantity){if(Be!=null&&Be.parts&&((Ue=Be.parts)==null?void 0:Ue.length)>0){if((Be==null?void 0:Be.quantity)>0){let tt=(rt=Be.parts)==null?void 0:rt.map(je=>je.quantity/Be.quantity*Ye);(ze=Be==null?void 0:Be.parts)==null||ze.forEach((je,nt)=>{je.quantity=tt[nt]}),Be.quantity=Number(Ye)}}else Be.quantity=Number(Ye);try{const tt=String(q.id),je={...q};let nt=Qc(je);$(nt,tt)}catch(tt){ve.info("fetchCaseProduct: catch",tt)}}}else Ye===0&&e(10,I=Ye)}function $(He,Be){jt(Ji,d=!0,d);const Ye=s("edit_list.list_updated_successfully_message"),Ue=mn(R,u),rt=gn(T,u);p===qn?Vi(He,Be,Ye,f).then(async()=>{e(0,O.isLoading=!0,O),await ci(Be,Ue,rt,k,!0).then(function(ze){e(0,O.isLoading=!1,O),jt(Ji,d=!1,d),ve.info(ze)}).catch(function(ze){e(0,O.isLoading=!1,O),ve.error(ze)}),ve.info("Project updated for with ID : ",Be)}).finally(()=>{ve.info("Project updated for with ID: ",Be)}):Os(He,o).then(async()=>{e(0,O.isLoading=!0,O),await ci(o,Ue,rt,k,!0).then(function(ze){e(0,O.isLoading=!1,O),jt(Ji,d=!1,d),ve.info(ze)}).catch(function(ze){e(0,O.isLoading=!1,O),ve.error(ze)}),ve.info("Project updated for with ID : ",Be)}).finally(()=>{ve.info("Project updated for with ID: ",Be)})}function he(He){oe(He);const{price:Be,currency:Ye}=He;return js(Be)&&(Ye||We.country)?fr(gn(We.language,u),mn(We.country,u),String(js(Be))):_r}function me(He){oe(He);const{price:Be,currency:Ye}=He;return js(Be)&&(Ye||We.country)?fr(gn(We.language,u),mn(We.country,u),(js(Be)*He.quantity).toString()):_r}function te(He){var Be;return(Be=He==null?void 0:He.parts)==null?void 0:Be.reduce((Ye,Ue)=>{const rt=js(Ue==null?void 0:Ue.price),ze=rt?Number(rt):0;return Ye+ze},0)}function oe(He){He.isParent&&He.parts&&He.parts.length>0&&(typeof He.price===Vs?He.price.value=te(He):He.price=te(He))}function ce(){Zs.update(()=>O),ho.update(()=>!0)}function ge(He){U(ig,{condition:He})}function fe(He){return typeof He!==za?s(`BACKEND.${He==null?void 0:He.name}`)+`: ${He==null?void 0:He.value}`:He}function ae(He){let Be="red-status";if(He!=null&&He.length&&typeof He[0]===Tu)He[0]===Ga||He[0]===sg?Be="yellow-status":He[0]===gi&&(Be="green-status");else if(He!=null&&He.length){for(let Ye=0;Ye!0);const He=Kg(r);Wh([{id:(l==null?void 0:l.id)||Te,quantity:(l==null?void 0:l.quantity)||0}],o,He).then(async Be=>{Be!=null&&Be.error?(tr.update(()=>mr),Wi.update(()=>!0),nr.update(()=>Be==null?void 0:Be.message)):(Bn(Nn.REMOVE_FROM_CART,[l],"","",!1,"cart|uco|delete",!1),tr.update(()=>xr),Wi.update(()=>!0),nr.update(()=>s("cart.delete_products_message")),await ci(o,mn(R,r),gn(T,r),k,!0).then(function(Ye){ve.info(Ye)}).catch(function(Ye){ve.error(Ye)}))}).catch(Be=>ve.error(Be==null?void 0:Be.message)).finally(()=>ki.update(()=>!1))}Kn(()=>{Wn(!1)});function we(He){L=He,e(7,L)}function pe(He){C=He,e(8,C)}function Se(He){S=He,e(9,S)}const Le=()=>e(17,ne=!1),Re=He=>{F(He==null?void 0:He.detail)},Ee=He=>Zg(He),ke=()=>{Bn("cta_click",{cta_name:"Product",cta_location:p===qn?$i.UCList:$i.UCCart,cta_link:vo(O==null?void 0:O.pdpUrl),cta_id:(O==null?void 0:O.productRef)||(O==null?void 0:O.productId),cta_category:"Products"})},Ce=()=>{le(String(O.id),String(j),O)},Ne=()=>{ce()},Pe=()=>ge(!1),Ve=()=>{X(String(O.id),String(j),O)},ot=()=>{X(String(O.id),String(j),O)},gt=()=>ue();return t.$$set=He=>{"apigeeToken"in He&&e(42,k=He.apigeeToken),"language"in He&&e(43,T=He.language),"country"in He&&e(44,R=He.country),"product"in He&&e(0,O=He.product),"parentId"in He&&e(2,j=He.parentId),"projectData"in He&&e(1,q=He.projectData),"viewChildren"in He&&e(3,M=He.viewChildren),"projectId"in He&&e(4,z=He.projectId),"isConfigChild"in He&&e(5,D=He.isConfigChild),"isChildClass"in He&&e(6,P=He.isChildClass)},t.$$.update=()=>{t.$$.dirty[0]&1&&O&&(e(10,I=O.quantity),e(11,N=O.pictureDocumentReference),W()),t.$$.dirty[0]&1&&e(18,i=ae(O.eolStatus)??Te)},[O,q,j,M,z,D,P,L,C,S,I,N,E,B,H,Z,V,ne,i,s,a,u,d,p,g,h,_,b,y,re,F,X,le,ue,ee,he,me,ce,ge,ie,_e,Ie,k,T,R,we,pe,Se,Le,Re,Ee,ke,Ce,Ne,Pe,Ve,ot,gt]}class G_ extends Ot{constructor(n){super(),At(this,n,aG,oG,It,{apigeeToken:42,language:43,country:44,product:0,parentId:2,projectData:1,viewChildren:3,projectId:4,isConfigChild:5,isChildClass:6},Nx,[-1,-1,-1])}}const Une="";function lG(t){Ut(t,"svelte-kwv54b",".info-icon.svelte-kwv54b.svelte-kwv54b{margin:0 6px}.tooltip-content.svelte-kwv54b.svelte-kwv54b{display:flex;width:320px;height:220px;flex-direction:column;align-items:flex-start;padding:14px;overflow-y:scroll}.tooltip-content.svelte-kwv54b .cto-characteristic.svelte-kwv54b{list-style-type:disc;padding-left:22px}.wrap-text.svelte-kwv54b.svelte-kwv54b{word-wrap:break-word;overflow-wrap:break-word;white-space:normal}")}function r4(t,n,e){const i=t.slice();return i[4]=n[e],i}function s4(t){var a,c;let n,e=((a=t[4])==null?void 0:a.name)+"",i,r,o=((c=t[4])==null?void 0:c.value)+"",s,l;return{c(){n=A("li"),i=de(e),r=Y(),s=de(o),l=Y(),x(n,"class","wrap-text svelte-kwv54b")},m(u,d){J(u,n,d),v(n,i),v(n,r),v(n,s),v(n,l)},p(u,d){var f,p;d&1&&e!==(e=((f=u[4])==null?void 0:f.name)+"")&&be(i,e),d&1&&o!==(o=((p=u[4])==null?void 0:p.value)+"")&&be(s,o)},d(u){u&&K(n)}}}function o4(t){let n,e;return n=new Ni({props:{buttonText:t[3]("product.summary_selector"),buttonSize:"small",id:"ic-hide-children",className:"large-spacing view-product"}}),n.$on("btnClick",function(){ul(t[2])&&t[2].apply(this,arguments)}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){t=i;const o={};r&8&&(o.buttonText=t[3]("product.summary_selector")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function cG(t){let n,e,i,r,o,s,l,a=Dt(t[0]),c=[];for(let d=0;d{u=null}),Qe())},i(d){l||(Q(u),l=!0)},o(d){se(u),l=!1},d(d){d&&K(n),Ln(c,d),u&&u.d()}}}function uG(t,n,e){let i;ye(t,Vt,l=>e(3,i=l));let{characteristics:r=[]}=n,{showSummaryButton:o=!1}=n,{onSummaryClick:s=()=>{}}=n;return t.$$set=l=>{"characteristics"in l&&e(0,r=l.characteristics),"showSummaryButton"in l&&e(1,o=l.showSummaryButton),"onSummaryClick"in l&&e(2,s=l.onSummaryClick)},[r,o,s,i]}class a4 extends Ot{constructor(n){super(),At(this,n,uG,cG,It,{characteristics:0,showSummaryButton:1,onSummaryClick:2},lG)}}function fG(t){let n,e;return n=new Ni({props:{iconClassName:"page-xml",buttonSize:"hero",className:"primary icon pw pointer",id:"download-xml-product-btn-"+t[0].serialNum}}),n.$on("btnClick",t[4]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&1&&(o.id="download-xml-product-btn-"+i[0].serialNum),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function dG(t){let n,e;return n=new Ni({props:{iconClassName:"page-xml",buttonSize:"hero",className:"primary icon pw pointer",id:"download-xml-product-btn-"+t[0].serialNum}}),n.$on("btnClick",t[3]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&1&&(o.id="download-xml-product-btn-"+i[0].serialNum),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function pG(t){let n,e,i,r;const o=[dG,fG],s=[];function l(a,c){return a[0]&&a[0].hive2?0:1}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,[c]){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function hG(t,n,e){let{product:i}=n,{downloadXmlofCTO:r}=n,{getHive2:o}=n;const s=()=>r(i.hive2),l=()=>o(i);return t.$$set=a=>{"product"in a&&e(0,i=a.product),"downloadXmlofCTO"in a&&e(1,r=a.downloadXmlofCTO),"getHive2"in a&&e(2,o=a.getHive2)},[i,r,o,s,l]}class l4 extends Ot{constructor(n){super(),At(this,n,hG,pG,It,{product:0,downloadXmlofCTO:1,getHive2:2})}}const zne="";function mG(t){Ut(t,"svelte-s68tfk",".pw.disabled.svelte-s68tfk.svelte-s68tfk{pointer-events:none;opacity:0.5}.pw.align-right.svelte-s68tfk.svelte-s68tfk{margin-left:auto}.pw.align-left.svelte-s68tfk.svelte-s68tfk{margin-right:auto}.pw.display-flex.svelte-s68tfk.svelte-s68tfk{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-s68tfk.svelte-s68tfk{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-s68tfk.svelte-s68tfk{font-size:16px}.pw.small-font.svelte-s68tfk.svelte-s68tfk{font-size:14px}.pw.nano-font.svelte-s68tfk.svelte-s68tfk{font-size:12px}.pw.pointer.svelte-s68tfk.svelte-s68tfk{cursor:pointer}.pw-snackbar-elem.svelte-s68tfk.svelte-s68tfk{top:30px}.pw.red-color.svelte-s68tfk.svelte-s68tfk{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-s68tfk.svelte-s68tfk{display:none}.pw.width-100.svelte-s68tfk.svelte-s68tfk{width:100%}.pw.bold-font.svelte-s68tfk.svelte-s68tfk{font-weight:bold}.pw.normal-font.svelte-s68tfk.svelte-s68tfk{font-weight:normal;font-size:16px}.pw.error-msg.svelte-s68tfk.svelte-s68tfk{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-s68tfk.svelte-s68tfk{text-align:center}.pw.center-align-items.svelte-s68tfk.svelte-s68tfk{align-items:center}.pw.justify-content-center.svelte-s68tfk.svelte-s68tfk{justify-content:center}.pw.bom-checkbox.svelte-s68tfk.svelte-s68tfk{max-width:16px}.pw.ml-8.svelte-s68tfk.svelte-s68tfk{margin-left:8px}.pw.ml-12.svelte-s68tfk.svelte-s68tfk{margin-left:12px}.pw.ml-36.svelte-s68tfk.svelte-s68tfk{margin-left:36px}.pw.mt-8.svelte-s68tfk.svelte-s68tfk{margin-top:8px}.pw.mt-6.svelte-s68tfk.svelte-s68tfk{margin-top:6px}.pw.mt-32.svelte-s68tfk.svelte-s68tfk{margin-top:32px}.pw.mb-8.svelte-s68tfk.svelte-s68tfk{margin-bottom:8px}.pw.mb-12.svelte-s68tfk.svelte-s68tfk{margin-bottom:12px}.pw.mb-16.svelte-s68tfk.svelte-s68tfk{margin-top:16px}.pw.mb-21.svelte-s68tfk.svelte-s68tfk{margin-bottom:21px}.pw.mr-12.svelte-s68tfk.svelte-s68tfk{margin-right:12px}.pw.p-12.svelte-s68tfk.svelte-s68tfk{padding:12px}.pw.pl-16.svelte-s68tfk.svelte-s68tfk{padding-left:16px}.pw.pr-16.svelte-s68tfk.svelte-s68tfk{padding-right:16px}.position-absolute.svelte-s68tfk.svelte-s68tfk{position:absolute}.flex-wrap.svelte-s68tfk.svelte-s68tfk{flex-wrap:wrap}.justify-content-sp-btw.svelte-s68tfk.svelte-s68tfk{justify-content:space-between}.gp-10.svelte-s68tfk.svelte-s68tfk{gap:10px}.gp-5.svelte-s68tfk.svelte-s68tfk{gap:5px}.desktop-view.svelte-s68tfk.svelte-s68tfk{display:none}.mobile-view.svelte-s68tfk.svelte-s68tfk{display:block}.mobile-view-flx.svelte-s68tfk.svelte-s68tfk{display:flex;flex-direction:column}.rounded-border.svelte-s68tfk.svelte-s68tfk{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-s68tfk.svelte-s68tfk{text-align:right}.bg-color-light-grey.svelte-s68tfk.svelte-s68tfk{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-s68tfk.svelte-s68tfk{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-s68tfk.svelte-s68tfk{padding:8px 0 16px 8px}.country-fr.svelte-s68tfk .config-container.svelte-s68tfk,.country-fr.svelte-s68tfk .excel-container.svelte-s68tfk,.country-pt.svelte-s68tfk .config-container.svelte-s68tfk,.country-pt.svelte-s68tfk .excel-container.svelte-s68tfk{padding-left:5px}.country-fr.svelte-s68tfk .config-container .excel-heading.svelte-s68tfk,.country-fr.svelte-s68tfk .config-container .upload-container.svelte-s68tfk,.country-fr.svelte-s68tfk .excel-container .excel-heading.svelte-s68tfk,.country-fr.svelte-s68tfk .excel-container .upload-container.svelte-s68tfk,.country-pt.svelte-s68tfk .config-container .excel-heading.svelte-s68tfk,.country-pt.svelte-s68tfk .config-container .upload-container.svelte-s68tfk,.country-pt.svelte-s68tfk .excel-container .excel-heading.svelte-s68tfk,.country-pt.svelte-s68tfk .excel-container .upload-container.svelte-s68tfk{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-s68tfk .button-action-section.svelte-s68tfk,.country-pt.svelte-s68tfk .button-action-section.svelte-s68tfk{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-s68tfk .search-label.svelte-s68tfk,.country-fr.svelte-s68tfk .with-icon.svelte-s68tfk,.country-pt.svelte-s68tfk .search-label.svelte-s68tfk,.country-pt.svelte-s68tfk .with-icon.svelte-s68tfk{font-size:var(--p-font-size, 0.87rem)}@media(min-width: 968px){.mobile-view.svelte-s68tfk.svelte-s68tfk,.mobile-view-flx.svelte-s68tfk.svelte-s68tfk{display:none}.desktop-view.svelte-s68tfk.svelte-s68tfk{display:inherit}}.cart-mobile-snackbar.svelte-s68tfk.svelte-s68tfk{position:fixed;top:0;width:100%;height:92px;font-size:12px}.cart-mobile-snackbar.svelte-s68tfk .mobile-snackbar.svelte-s68tfk{flex-direction:column;height:92px;justify-content:center}.cart-mobile-snackbar.svelte-s68tfk .mobile-snackbar .snackbar-btn-class.svelte-s68tfk{max-width:90%;padding:6px;border:solid 2px;cursor:pointer;margin-top:17px;width:90%;text-align:center;border-radius:5px}.desktop-view-snackbar.svelte-s68tfk.svelte-s68tfk,.mobile-view-snackbar.svelte-s68tfk.svelte-s68tfk{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-s68tfk.svelte-s68tfk{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-s68tfk.svelte-s68tfk{display:block}.mobile-snackbar.svelte-s68tfk.svelte-s68tfk{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-s68tfk.svelte-s68tfk{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.snackbar-mobile-div.svelte-s68tfk .snackbar-header.svelte-s68tfk{padding:12px 20px}.snackbar-mobile-div.svelte-s68tfk .close-snackbar.svelte-s68tfk{padding:10px 16px}.snackbar-mobile-div.svelte-s68tfk .snackbar-btn-class-div.svelte-s68tfk{width:90%;border-radius:5px;border:2px solid white;height:34px;margin:5px 18px;justify-content:center;align-items:center}.cross-margin.svelte-s68tfk.svelte-s68tfk{margin:-6px}.bottom-snackbar.svelte-s68tfk.svelte-s68tfk{bottom:30px;top:auto}.table-row-grp.svelte-s68tfk.svelte-s68tfk{padding:10px 0}.margin-align.svelte-s68tfk.svelte-s68tfk{display:flex;align-items:start}.middle-align.svelte-s68tfk.svelte-s68tfk:not(:last-of-type){padding-left:unset}.middle-align.svelte-s68tfk.svelte-s68tfk:nth-of-type(2){margin:0 0 0 20px}.middle-align.svelte-s68tfk.svelte-s68tfk:first-of-type{margin-left:0;margin-right:0}.middle-align.svelte-s68tfk.svelte-s68tfk:last-of-type{margin-top:4px;margin-bottom:auto}.action-btns.svelte-s68tfk.svelte-s68tfk{padding-right:32px}.action-btns-container.svelte-s68tfk.svelte-s68tfk{display:flex;justify-content:center;gap:15px;align-items:center}.action-btns-with-icon.svelte-s68tfk.svelte-s68tfk{display:flex;align-items:center}.quantity-field.svelte-s68tfk.svelte-s68tfk{width:40%;margin-left:4px}.input-fields.svelte-s68tfk.svelte-s68tfk{height:32px}.description-txt.svelte-s68tfk.svelte-s68tfk{word-break:break-word;max-width:300px;white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;line-clamp:2}.description-txt-for-parents.svelte-s68tfk.svelte-s68tfk{width:300px;word-break:break-all;white-space:normal}.padding-bottom-small.svelte-s68tfk.svelte-s68tfk{padding-bottom:4px}.padding-left-large.svelte-s68tfk.svelte-s68tfk{padding-left:16px}.sub-heading-lbl.svelte-s68tfk.svelte-s68tfk{margin-top:5px;margin-left:4px;word-break:break-word;white-space:break-spaces}.menu-left-margin.svelte-s68tfk.svelte-s68tfk{margin-left:4px}.bom-product-checkbox.svelte-s68tfk.svelte-s68tfk{max-width:20px;max-height:20px}.setting-icon.svelte-s68tfk.svelte-s68tfk{margin-top:10px;visibility:initial}.edit-icon-container.svelte-s68tfk.svelte-s68tfk{text-align:right;width:30px}.group-items-container-grid.svelte-s68tfk.svelte-s68tfk{display:grid;grid-template-columns:80px 210px 30px}.input-container.svelte-s68tfk.svelte-s68tfk{width:210px}@media screen and (min-width: 1024px){.input-container.svelte-s68tfk.svelte-s68tfk{width:300px}}.checkbox-alignment-top.svelte-s68tfk.svelte-s68tfk{--se-table-item-padding:16px;height:auto;max-height:60px}.margin-auto.svelte-s68tfk.svelte-s68tfk{margin:auto}.tooltip_content.svelte-s68tfk.svelte-s68tfk{margin:10px}.quant-container.svelte-s68tfk.svelte-s68tfk{text-align-last:center;margin-left:6px}.plus-btn.svelte-s68tfk.svelte-s68tfk{margin:0.8px 0.4px;padding:4px}.error-msg.svelte-s68tfk.svelte-s68tfk{text-wrap:wrap}.red-status.svelte-s68tfk.svelte-s68tfk{color:var(--se-fuchsia-red, #b10043)}.orange-status.svelte-s68tfk.svelte-s68tfk{color:#e47f00}.product-image.svelte-s68tfk.svelte-s68tfk{width:68px;height:68px;background-color:var(--se-black, rgba(0, 0, 0, 0.0509803922))}.quantity-table-item.svelte-s68tfk.svelte-s68tfk{width:94px;padding:0 16px 16px 0;height:65px;margin:0}.product-details-table-item.svelte-s68tfk.svelte-s68tfk{width:330px;min-width:330px;padding-left:12px}.item-price.svelte-s68tfk.svelte-s68tfk{padding:16px;height:35px}.item-price-text.svelte-s68tfk.svelte-s68tfk{font-weight:bold}.display-price-section.svelte-s68tfk.svelte-s68tfk{width:100%;display:flex;justify-content:end}.item-price-text-per-item.svelte-s68tfk.svelte-s68tfk{color:var(--se-black, #626469)}.product-price.svelte-s68tfk.svelte-s68tfk{font-weight:bolder}.eol-section.svelte-s68tfk.svelte-s68tfk{padding-top:4px}.table-group-section.svelte-s68tfk.svelte-s68tfk{margin-left:-32px;padding-left:32px;border-bottom:none;border-top:solid 1px var(--se-divider, #e6e6e6)}.table-group-section.svelte-s68tfk.svelte-s68tfk:first-child{border-top:none}.config-section.svelte-s68tfk.svelte-s68tfk{display:flex;align-items:center;gap:1rem}.config-section-paragraph.svelte-s68tfk.svelte-s68tfk{color:var(--se-black, #000);font-weight:700}.checkbox-section.svelte-s68tfk.svelte-s68tfk{padding-left:10px !important}.checkbox-parent-align.svelte-s68tfk.svelte-s68tfk{padding-top:1.5rem}.collapse-icon-section.svelte-s68tfk.svelte-s68tfk{display:flex;align-items:center;padding:0 1rem}.pd-lt-ust.svelte-s68tfk.svelte-s68tfk{padding-left:unset}.cto-details.svelte-s68tfk.svelte-s68tfk{flex-direction:column;padding:4px 0}.cto-details.svelte-s68tfk p.svelte-s68tfk{font-size:14px;margin-bottom:2px}.cto-details.svelte-s68tfk .cto-description.svelte-s68tfk{margin:0 0 5px;display:flex;align-items:center}.hide-children_border.svelte-s68tfk.svelte-s68tfk{border-bottom-width:1px;border-bottom-style:solid;border-color:var(--se-divider, #e6e6e6)}.display-hide.svelte-s68tfk.svelte-s68tfk{display:none}.wrap-text.svelte-s68tfk.svelte-s68tfk{word-wrap:break-word;overflow-wrap:break-word;white-space:normal}.personalization-id-lbl.svelte-s68tfk.svelte-s68tfk{display:flex;align-items:center}.product-code-span.svelte-s68tfk.svelte-s68tfk{display:flex}.product-code-wrap.svelte-s68tfk.svelte-s68tfk{max-width:80%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.tooltip-icon.svelte-s68tfk.svelte-s68tfk{font-size:1rem}.gcr-code.svelte-s68tfk.svelte-s68tfk{display:flex;align-items:center;margin-top:10px}.gcr-code.with-icon.svelte-s68tfk.svelte-s68tfk{margin-top:0}")}function c4(t){let n,e,i;function r(s){t[38](s)}let o={projectData:t[1],bomData:t[1].bom,successMsg:t[16]("bom_manager.product_deleted"),errorMsg:t[16]("bom_manager.error_in_deleting_product"),confirmTxt:t[16]("list_manager.remove_selected_produts_message"),confirmLbl:t[16]("generic.delete"),cancelLbl:t[16]("generic.cancel"),popupName:Fa};return t[7]!==void 0&&(o.isPopupOpen=t[7]),n=new ha({props:o}),_t.push(()=>Ct(n,"isPopupOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&2&&(a.projectData=s[1]),l[0]&2&&(a.bomData=s[1].bom),l[0]&65536&&(a.successMsg=s[16]("bom_manager.product_deleted")),l[0]&65536&&(a.errorMsg=s[16]("bom_manager.error_in_deleting_product")),l[0]&65536&&(a.confirmTxt=s[16]("list_manager.remove_selected_produts_message")),l[0]&65536&&(a.confirmLbl=s[16]("generic.delete")),l[0]&65536&&(a.cancelLbl=s[16]("generic.cancel")),!e&&l[0]&128&&(e=!0,a.isPopupOpen=s[7],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function u4(t){let n,e,i;function r(s){t[39](s)}let o={product:t[0],listId:t[4],selectedProductRefs:Li,heading:t[16]("bom_manager.save_documents_heading"),dialogBoxTxt:t[16]("bom_manager.download_documentation_dialog_text_list"),saveLocalLbl:t[16]("bom_manager.save_in_local_lbl"),saveInListLbl:t[16]("bom_manager.keep_within_my_list"),popupName:ng,language:gn(We.language,t[17]),country:mn(We.country,t[17]),apigeeToken:We.apigeeToken,documentManagementBasePath:We.basePath,documentGetEndpoint:li.DOCUMENT_API,documentDownloadEndpoint:li.DOWNLOAD_DOCUMENT_API};return t[8]!==void 0&&(o.isDialogOpen=t[8]),n=new x_({props:o}),_t.push(()=>Ct(n,"isDialogOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&1&&(a.product=s[0]),l[0]&16&&(a.listId=s[4]),l[0]&65536&&(a.heading=s[16]("bom_manager.save_documents_heading")),l[0]&65536&&(a.dialogBoxTxt=s[16]("bom_manager.download_documentation_dialog_text_list")),l[0]&65536&&(a.saveLocalLbl=s[16]("bom_manager.save_in_local_lbl")),l[0]&65536&&(a.saveInListLbl=s[16]("bom_manager.keep_within_my_list")),l[0]&131072&&(a.language=gn(We.language,s[17])),l[0]&131072&&(a.country=mn(We.country,s[17])),!e&&l[0]&256&&(e=!0,a.isDialogOpen=s[8],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function f4(t){let n;return{c(){n=A("se-loading"),w(n,"loading",!0),w(n,"overlay","true"),w(n,"full-page","true")},m(e,i){J(e,n,i)},d(e){e&&K(n)}}}function d4(t){let n,e,i,r,o;return i=new pa({props:{id:"chk-"+t[0].serialNum,disabled:t[32](),checked:t[0].isSelected,boxSize:"small",className:"row-checkbox"}}),i.$on("clickCheckBox",t[40]),{c(){n=A("se-table-item"),e=A("se-block"),De(i.$$.fragment),w(e,"id",r="check-"+t[0].serialNum),w(e,"class","bom-product-checkbox middle-align svelte-s68tfk"),w(n,"width","52px"),w(n,"class","checkbox-alignment-top middle-align svelte-s68tfk")},m(s,l){J(s,n,l),v(n,e),Me(i,e,null),o=!0},p(s,l){const a={};l[0]&1&&(a.id="chk-"+s[0].serialNum),l[0]&1&&(a.checked=s[0].isSelected),i.$set(a),(!o||l[0]&1&&r!==(r="check-"+s[0].serialNum))&&w(e,"id",r)},i(s){o||(Q(i.$$.fragment,s),o=!0)},o(s){se(i.$$.fragment,s),o=!1},d(s){s&&K(n),qe(i)}}}function p4(t){let n,e,i;return e=new Ni({props:{buttonText:t[16]("generic.edit"),buttonSize:"small",id:"ic-hide-children",className:"large-spacing"}}),e.$on("btnClick",t[29]),{c(){n=A("div"),De(e.$$.fragment)},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&65536&&(s.buttonText=r[16]("generic.edit")),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function h4(t){var l;let n,e=(((l=t[0])==null?void 0:l.description)||"")+"",i,r,o,s=t[5]&&m4(t);return{c(){n=A("p"),i=de(e),r=Y(),s&&s.c(),x(n,"class","cto-description svelte-s68tfk")},m(a,c){J(a,n,c),v(n,i),v(n,r),s&&s.m(n,null),o=!0},p(a,c){var u;(!o||c[0]&1)&&e!==(e=(((u=a[0])==null?void 0:u.description)||"")+"")&&be(i,e),a[5]?s?(s.p(a,c),c[0]&32&&Q(s,1)):(s=m4(a),s.c(),Q(s,1),s.m(n,null)):s&&(Je(),se(s,1,1,()=>{s=null}),Qe())},i(a){o||(Q(s),o=!0)},o(a){se(s),o=!1},d(a){a&&K(n),s&&s.d()}}}function m4(t){let n,e;return n=new a4({props:{characteristics:t[5],showSummaryButton:t[14],onSummaryClick:t[29]}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&32&&(o.characteristics=i[5]),r[0]&16384&&(o.showSummaryButton=i[14]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function g4(t){var p,m;let n,e=t[16]("product.gcr_code")+"",i,r,o=t[6].gcrCode+"",s,l,a,c,u,d=!((p=t[0])!=null&&p.description)&&_4(t),f=!((m=t[6])!=null&&m.productCode)&&v4(t);return{c(){var g;n=A("p"),i=de(e),r=de(": "),s=de(o),l=Y(),d&&d.c(),a=Y(),f&&f.c(),x(n,"class",c="gcr-code "+(!((g=t[6])!=null&&g.productCode)&&t[5]?"with-icon":"")+" svelte-s68tfk")},m(g,h){J(g,n,h),v(n,i),v(n,r),v(n,s),v(n,l),d&&d.m(n,null),v(n,a),f&&f.m(n,null),u=!0},p(g,h){var _,b,y;(!u||h[0]&65536)&&e!==(e=g[16]("product.gcr_code")+"")&&be(i,e),(!u||h[0]&64)&&o!==(o=g[6].gcrCode+"")&&be(s,o),(_=g[0])!=null&&_.description?d&&(Je(),se(d,1,1,()=>{d=null}),Qe()):d?(d.p(g,h),h[0]&1&&Q(d,1)):(d=_4(g),d.c(),Q(d,1),d.m(n,a)),(b=g[6])!=null&&b.productCode?f&&(Je(),se(f,1,1,()=>{f=null}),Qe()):f?(f.p(g,h),h[0]&64&&Q(f,1)):(f=v4(g),f.c(),Q(f,1),f.m(n,null)),(!u||h[0]&96&&c!==(c="gcr-code "+(!((y=g[6])!=null&&y.productCode)&&g[5]?"with-icon":"")+" svelte-s68tfk"))&&x(n,"class",c)},i(g){u||(Q(d),Q(f),u=!0)},o(g){se(d),se(f),u=!1},d(g){g&&K(n),d&&d.d(),f&&f.d()}}}function _4(t){let n,e,i=t[5]&&b4(t);return{c(){i&&i.c(),n=wt()},m(r,o){i&&i.m(r,o),J(r,n,o),e=!0},p(r,o){r[5]?i?(i.p(r,o),o[0]&32&&Q(i,1)):(i=b4(r),i.c(),Q(i,1),i.m(n.parentNode,n)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(r)}}}function b4(t){let n,e;return n=new a4({props:{characteristics:t[5],showSummaryButton:t[14],onSummaryClick:t[29]}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&32&&(o.characteristics=i[5]),r[0]&16384&&(o.showSummaryButton=i[14]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function v4(t){let n,e;return n=new l4({props:{product:t[0],downloadXmlofCTO:t[21],getHive2:t[31]}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1&&(o.product=i[0]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function w4(t){var R,O;let n,e,i=t[16]("bom_manager.personalization_id")+"",r,o,s=t[0].customization.custom_configuredReference1+"",l,a,c,u,d,f,p,m,g=t[16]("bom_manager.product")+"",h,_,b,y=((O=(R=t[0])==null?void 0:R.customization)==null?void 0:O.custom_configuredReference2)+"",k,T;return d=new Ni({props:{iconClassName:"pages-double",buttonSize:"hero",className:"primary icon pw pointer",id:"copy-product-btn-"+t[0].serialNum}}),d.$on("btnClick",t[41]),{c(){n=A("p"),e=A("span"),r=de(i),o=de(` : `),l=de(s),c=Y(),u=A("span"),De(d.$$.fragment),f=Y(),p=A("p"),m=A("span"),h=de(g),_=de(":"),b=Y(),k=de(y),x(e,"class","product-code-wrap svelte-s68tfk"),x(e,"id",a="personalization-id-"+t[0].serialNum),x(u,"class","product-code-span svelte-s68tfk"),x(n,"data-testid","personalization-id-lbl"),x(n,"class","personalization-id-lbl svelte-s68tfk"),x(p,"data-testid","product-id-lbl"),x(p,"class","svelte-s68tfk")},m(j,q){J(j,n,q),v(n,e),v(e,r),v(e,o),v(e,l),v(n,c),v(n,u),Me(d,u,null),J(j,f,q),J(j,p,q),v(p,m),v(m,h),v(m,_),v(p,b),v(p,k),T=!0},p(j,q){var z,D;(!T||q[0]&65536)&&i!==(i=j[16]("bom_manager.personalization_id")+"")&&be(r,i),(!T||q[0]&1)&&s!==(s=j[0].customization.custom_configuredReference1+"")&&be(l,s),(!T||q[0]&1&&a!==(a="personalization-id-"+j[0].serialNum))&&x(e,"id",a);const M={};q[0]&1&&(M.id="copy-product-btn-"+j[0].serialNum),d.$set(M),(!T||q[0]&65536)&&g!==(g=j[16]("bom_manager.product")+"")&&be(h,g),(!T||q[0]&1)&&y!==(y=((D=(z=j[0])==null?void 0:z.customization)==null?void 0:D.custom_configuredReference2)+"")&&be(k,y)},i(j){T||(Q(d.$$.fragment,j),T=!0)},o(j){se(d.$$.fragment,j),T=!1},d(j){j&&(K(n),K(f),K(p)),qe(d)}}}function y4(t){let n,e=t[16]("product.product_code")+"",i,r,o,s=t[6].productCode+"",l,a,c,u,d,f,p,m,g;return f=new Ni({props:{iconClassName:"pages-double",buttonSize:"hero",className:"primary icon pw pointer",id:"copy-product-btn-"+t[0].serialNum}}),f.$on("btnClick",t[42]),m=new l4({props:{product:t[0],downloadXmlofCTO:t[21],getHive2:t[31]}}),{c(){n=A("p"),i=de(e),r=de(`: `),o=A("span"),l=de(s),c=Y(),u=A("span"),d=de(`? `),De(f.$$.fragment),p=Y(),De(m.$$.fragment),x(o,"id",a="product-config-id-"+t[0].serialNum),x(o,"class","product-code-wrap svelte-s68tfk"),x(u,"class","product-code-span svelte-s68tfk"),x(n,"class","personalization-id-lbl svelte-s68tfk")},m(h,_){J(h,n,_),v(n,i),v(n,r),v(n,o),v(o,l),v(n,c),v(n,u),v(u,d),Me(f,u,null),v(n,p),Me(m,n,null),g=!0},p(h,_){(!g||_[0]&65536)&&e!==(e=h[16]("product.product_code")+"")&&be(i,e),(!g||_[0]&64)&&s!==(s=h[6].productCode+"")&&be(l,s),(!g||_[0]&1&&a!==(a="product-config-id-"+h[0].serialNum))&&x(o,"id",a);const b={};_[0]&1&&(b.id="copy-product-btn-"+h[0].serialNum),f.$set(b);const y={};_[0]&1&&(y.product=h[0]),m.$set(y)},i(h){g||(Q(f.$$.fragment,h),Q(m.$$.fragment,h),g=!0)},o(h){se(f.$$.fragment,h),se(m.$$.fragment,h),g=!1},d(h){h&&K(n),qe(f),qe(m)}}}function k4(t){let n,e=t[16]("product.config")+"",i,r,o=t[6].configId+"",s;return{c(){n=A("p"),i=de(e),r=de(": "),s=de(o),x(n,"class","config-id svelte-s68tfk")},m(l,a){J(l,n,a),v(n,i),v(n,r),v(n,s)},p(l,a){a[0]&65536&&e!==(e=l[16]("product.config")+"")&&be(i,e),a[0]&64&&o!==(o=l[6].configId+"")&&be(s,o)},d(l){l&&K(n)}}}function gG(t){var r;let n,e=((r=t[0])==null?void 0:r.quantity)+"",i;return{c(){n=A("span"),i=de(e),x(n,"class","padding-left-large pw align-center svelte-s68tfk")},m(o,s){J(o,n,s),v(n,i)},p(o,s){var l;s[0]&1&&e!==(e=((l=o[0])==null?void 0:l.quantity)+"")&&be(i,e)},i:et,o:et,d(o){o&&K(n)}}}function _G(t){let n,e,i;return e=new o1({props:{isTableRow:!0,product:t[0],updateQuantity:t[25],isConfigProduct:!0}}),{c(){n=A("se-block"),De(e.$$.fragment),w(n,"class","")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&1&&(s.product=r[0]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function S4(t){let n,e=t[16]("bom_manager.valid_quantity")+"",i;return{c(){n=A("div"),i=de(e),x(n,"class","pw error-msg pw small-font svelte-s68tfk")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&65536&&e!==(e=r[16]("bom_manager.valid_quantity")+"")&&be(i,e)},d(r){r&&K(n)}}}function T4(t){let n,e,i;function r(l,a){var c,u,d,f;if(a[0]&1&&(e=null),((c=l[0])!=null&&c.isLoading||l[18])&&((u=l[0])!=null&&u.isParent))return vG;if(e==null&&(e=!!(o_(l[0])||(f=(d=l[0])==null?void 0:d.price)!=null&&f.pbValue)),e)return bG}let o=r(t,[-1,-1]),s=o&&o(t);return{c(){n=A("se-table-item"),s&&s.c(),w(n,"width","224px"),w(n,"align-items","center"),w(n,"class",i="item-price "+(t[15][bi]===Ae.DISABLED?"pw disabled":"product-price")+" svelte-s68tfk"),w(n,"data-testid","product-price"),w(n,"id","product-price")},m(l,a){J(l,n,a),s&&s.m(n,null)},p(l,a){o===(o=r(l,a))&&s?s.p(l,a):(s&&s.d(1),s=o&&o(l),s&&(s.c(),s.m(n,null))),a[0]&32768&&i!==(i="item-price "+(l[15][bi]===Ae.DISABLED?"pw disabled":"product-price")+" svelte-s68tfk")&&w(n,"class",i)},d(l){l&&K(n),s&&s.d()}}}function bG(t){let n,e=(t[27](t[0])===_r?t[16]("bom_manager.price_unavailable"):t[27](t[0]))+"",i,r,o,s,l,a=(t[26](t[0])!==_r?`${t[26](t[0])} ${t[16]("generic.per_item")}`:Te)+"",c;return{c(){n=A("span"),i=de(e),r=Y(),o=A("br"),s=Y(),l=A("span"),c=de(a),x(n,"class","item-price-text svelte-s68tfk"),x(l,"class","item-price-text-per-item svelte-s68tfk")},m(u,d){J(u,n,d),v(n,i),J(u,r,d),J(u,o,d),J(u,s,d),J(u,l,d),v(l,c)},p(u,d){d[0]&65537&&e!==(e=(u[27](u[0])===_r?u[16]("bom_manager.price_unavailable"):u[27](u[0]))+"")&&be(i,e),d[0]&65537&&a!==(a=(u[26](u[0])!==_r?`${u[26](u[0])} ${u[16]("generic.per_item")}`:Te)+"")&&be(c,a)},d(u){u&&(K(n),K(r),K(o),K(s),K(l))}}}function vG(t){let n;return{c(){n=A("se-skeleton"),w(n,"width","200px"),w(n,"height","28px"),w(n,"count","1")},m(e,i){J(e,n,i)},p:et,d(e){e&&K(n)}}}function C4(t){let n,e,i,r,o,s=(t[15][ui]===Ae.SHOW||t[15][ui]===Ae.DISABLED)&&E4(t),l=t[19]===qn&&I4(t);return{c(){n=A("div"),e=A("div"),s&&s.c(),r=Y(),l&&l.c(),x(e,"class",i="action-btns-with-icon menu-left-margin "+(t[15][ui]===Ae.DISABLED?"pw disabled":Te)+" svelte-s68tfk"),x(n,"class","pw display-flex action-btns-container svelte-s68tfk")},m(a,c){J(a,n,c),v(n,e),s&&s.m(e,null),v(n,r),l&&l.m(n,null),o=!0},p(a,c){a[15][ui]===Ae.SHOW||a[15][ui]===Ae.DISABLED?s?(s.p(a,c),c[0]&32768&&Q(s,1)):(s=E4(a),s.c(),Q(s,1),s.m(e,null)):s&&(Je(),se(s,1,1,()=>{s=null}),Qe()),(!o||c[0]&32768&&i!==(i="action-btns-with-icon menu-left-margin "+(a[15][ui]===Ae.DISABLED?"pw disabled":Te)+" svelte-s68tfk"))&&x(e,"class",i),a[19]===qn?l?l.p(a,c):(l=I4(a),l.c(),l.m(n,null)):l&&(l.d(1),l=null)},i(a){o||(Q(s),o=!0)},o(a){se(s),o=!1},d(a){a&&K(n),s&&s.d(),l&&l.d()}}}function E4(t){let n,e;return n=new Ni({props:{iconClassName:"trash-can",buttonSize:"medium",className:"primary icon pw pointer",id:"delete-product-btn-"+t[0].serialNum}}),n.$on("btnClick",t[43]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1&&(o.id="delete-product-btn-"+i[0].serialNum),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function I4(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m;return{c(){n=A("div"),e=A("se-dropdown"),i=A("se-icon"),r=de("other_vertical"),s=Y(),l=A("se-list"),a=A("se-list-item"),w(i,"id",o="ic-document-menu-"+t[0].serialNum),w(i,"slot","trigger"),w(i,"option","button"),w(a,"id",c="lst-download-document-"+t[0].serialNum+"-1"),w(a,"item",u=t[16]("bom_manager.download_documentation_button")),w(l,"option","dropdown"),w(e,"alignment","right"),w(e,"class",d=Nt(t[15][Qu]===Ae.DISABLED?"pw disabled":Te)+" svelte-s68tfk"),w(e,"id",f="dropdown-table-row-bom-options-"+t[0].serialNum),x(n,"class","action-btns-with-icon menu-left-margin svelte-s68tfk")},m(g,h){J(g,n,h),v(n,e),v(e,i),v(i,r),v(e,s),v(e,l),v(l,a),p||(m=xe(a,"click",t[44]),p=!0)},p(g,h){h[0]&1&&o!==(o="ic-document-menu-"+g[0].serialNum)&&w(i,"id",o),h[0]&1&&c!==(c="lst-download-document-"+g[0].serialNum+"-1")&&w(a,"id",c),h[0]&65536&&u!==(u=g[16]("bom_manager.download_documentation_button"))&&w(a,"item",u),h[0]&32768&&d!==(d=Nt(g[15][Qu]===Ae.DISABLED?"pw disabled":Te)+" svelte-s68tfk")&&w(e,"class",d),h[0]&1&&f!==(f="dropdown-table-row-bom-options-"+g[0].serialNum)&&w(e,"id",f)},d(g){g&&K(n),p=!1,m()}}}function wG(t){let n;return{c(){n=A("div"),n.textContent="??????"},m(e,i){J(e,n,i)},p:et,d(e){e&&K(n)}}}function yG(t){let n;function e(o,s){return o[3]?SG:kG}let i=e(t),r=i(t);return{c(){r.c(),n=wt()},m(o,s){r.m(o,s),J(o,n,s)},p(o,s){i===(i=e(o))&&r?r.p(o,s):(r.d(1),r=i(o),r&&(r.c(),r.m(n.parentNode,n)))},d(o){o&&K(n),r.d(o)}}}function kG(t){let n,e,i,r,o;return{c(){var s,l;n=A("se-icon"),e=de("arrow2_down"),w(n,"class","pointer icon-style"),w(n,"title",i=((l=(s=t[0])==null?void 0:s.parts)==null?void 0:l.length)+" "+t[16]("generic.config_items")),w(n,"size","small")},m(s,l){J(s,n,l),v(n,e),r||(o=xe(n,"click",t[46]),r=!0)},p(s,l){var a,c;l[0]&65537&&i!==(i=((c=(a=s[0])==null?void 0:a.parts)==null?void 0:c.length)+" "+s[16]("generic.config_items"))&&w(n,"title",i)},d(s){s&&K(n),r=!1,o()}}}function SG(t){let n,e,i,r,o;return{c(){var s,l;n=A("se-icon"),e=de("arrow2_up"),w(n,"class","pointer icon-style"),w(n,"title",i=((l=(s=t[0])==null?void 0:s.parts)==null?void 0:l.length)+" "+t[16]("generic.config_items")),w(n,"size","small")},m(s,l){J(s,n,l),v(n,e),r||(o=xe(n,"click",t[45]),r=!0)},p(s,l){var a,c;l[0]&65537&&i!==(i=((c=(a=s[0])==null?void 0:a.parts)==null?void 0:c.length)+" "+s[16]("generic.config_items"))&&w(n,"title",i)},d(s){s&&K(n),r=!1,o()}}}function A4(t){let n,e;return n=new Pf({props:{isPopupOpen:t[10],confirmTxt:t[16]("cart.remove_selected_product_message"),confirmLbl:t[16]("generic.delete"),cancelLbl:t[16]("generic.cancel")}}),n.$on("close",t[47]),n.$on("confirmAction",t[30]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1024&&(o.isPopupOpen=i[10]),r[0]&65536&&(o.confirmTxt=i[16]("cart.remove_selected_product_message")),r[0]&65536&&(o.confirmLbl=i[16]("generic.delete")),r[0]&65536&&(o.cancelLbl=i[16]("generic.cancel")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function O4(t){let n,e,i;return{c(){n=A("se-snackbar"),w(n,"open",t[11]),w(n,"message",t[12]),w(n,"type",t[13]),w(n,"class","pw-snackbar-elem svelte-s68tfk"),w(n,"icon","notification_ok_wired"),w(n,"duration",Cs),w(n,"id","snackbar-list-config")},m(r,o){J(r,n,o),e||(i=xe(n,"didClose",t[48]),e=!0)},p(r,o){o[0]&2048&&w(n,"open",r[11]),o[0]&4096&&w(n,"message",r[12]),o[0]&8192&&w(n,"type",r[13])},d(r){r&&K(n),e=!1,i()}}}function TG(t){var fe,ae,ie,_e,Ie,we,pe,Se,Le,Re,Ee,ke;let n,e,i,r,o,s,l,a,c=Bw(t[0],t[16]("product.config_id"),t[6].configId||"")+"",u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,I,N,E,B=t[7]&&c4(t),U=t[8]&&u4(t),H=(((fe=t[0])==null?void 0:fe.isLoading)||t[18])&&f4(),Z=t[19]===qn&&d4(t),V=(((ae=t[6])==null?void 0:ae.productCode)||((ie=t[6])==null?void 0:ie.configId)||((_e=t[0])==null?void 0:_e.kbId))&&p4(t),ne=((Ie=t[0])==null?void 0:Ie.description)&&h4(t),W=((we=t[6])==null?void 0:we.gcrCode)&&!((Se=(pe=t[0])==null?void 0:pe.customization)!=null&&Se.custom_configuredReference1)&&g4(t),re=((Re=(Le=t[0])==null?void 0:Le.customization)==null?void 0:Re.custom_configuredReference1)&&t[0].customization.custom_configuredReference2&&w4(t),G=((Ee=t[6])==null?void 0:Ee.productCode)&&y4(t),F=((ke=t[6])==null?void 0:ke.configId)&&k4(t);const X=[_G,gG],le=[];function ue(Ce,Ne){return Ne[0]&32769&&(k=null),k==null&&(k=!!(Ra(Ce[0])&&Ce[15][Us]!==Ae.DISABLED)),k?0:1}T=ue(t,[-1,-1]),R=le[T]=X[T](t);let ee=t[9]<=0&&S4(t),$=(t[15][bi]===Ae.SHOW||t[15][bi]===Ae.DISABLED)&&T4(t),he=t[20]&&C4(t);function me(Ce,Ne){var Pe;return(Pe=Ce[0])!=null&&Pe.parts?yG:wG}let te=me(t),oe=te(t),ce=t[19]===Vn&&t[10]&&A4(t),ge=t[11]&&O4(t);return{c(){B&&B.c(),n=Y(),U&&U.c(),e=Y(),H&&H.c(),i=Y(),r=A("se-table-group"),Z&&Z.c(),o=Y(),s=A("se-table-item"),l=A("div"),a=A("p"),u=Y(),V&&V.c(),d=Y(),f=A("div"),ne&&ne.c(),p=Y(),W&&W.c(),m=Y(),re&&re.c(),g=Y(),G&&G.c(),h=Y(),F&&F.c(),_=Y(),b=A("se-table-item"),y=A("se-form-field"),R.c(),O=Y(),ee&&ee.c(),j=Y(),$&&$.c(),q=Y(),M=A("se-table-item"),z=A("div"),D=A("div"),he&&he.c(),P=Y(),L=A("div"),oe.c(),S=Y(),ce&&ce.c(),I=Y(),ge&&ge.c(),N=wt(),x(a,"class","config-section-paragraph svelte-s68tfk"),x(l,"class","config-section svelte-s68tfk"),x(f,"class","display-flex cto-details svelte-s68tfk"),w(s,"width","698px"),w(s,"class","product-details-table-item svelte-s68tfk"),w(b,"class","quantity-table-item middle-align svelte-s68tfk"),w(b,"width","148px"),hi(D,"width","100%"),x(D,"class","action-btns-container svelte-s68tfk"),hi(z,"display","flex"),w(M,"width","186px"),w(M,"class","middle-align svelte-s68tfk"),w(r,"class",C="pw small-font table-group-section "+(t[1].isArchived?"pw disabled":Te)+" svelte-s68tfk")},m(Ce,Ne){B&&B.m(Ce,Ne),J(Ce,n,Ne),U&&U.m(Ce,Ne),J(Ce,e,Ne),H&&H.m(Ce,Ne),J(Ce,i,Ne),J(Ce,r,Ne),Z&&Z.m(r,null),v(r,o),v(r,s),v(s,l),v(l,a),a.innerHTML=c,v(l,u),V&&V.m(l,null),v(s,d),v(s,f),ne&&ne.m(f,null),v(f,p),W&&W.m(f,null),v(f,m),re&&re.m(f,null),v(f,g),G&&G.m(f,null),v(f,h),F&&F.m(f,null),v(r,_),v(r,b),v(b,y),le[T].m(y,null),v(b,O),ee&&ee.m(b,null),v(r,j),$&&$.m(r,null),v(r,q),v(r,M),v(M,z),v(z,D),he&&he.m(D,null),v(D,P),v(D,L),oe.m(L,null),J(Ce,S,Ne),ce&&ce.m(Ce,Ne),J(Ce,I,Ne),ge&&ge.m(Ce,Ne),J(Ce,N,Ne),E=!0},p(Ce,Ne){var Ve,ot,gt,He,Be,Ye,Ue,rt,ze,tt,je,nt;Ce[7]?B?(B.p(Ce,Ne),Ne[0]&128&&Q(B,1)):(B=c4(Ce),B.c(),Q(B,1),B.m(n.parentNode,n)):B&&(Je(),se(B,1,1,()=>{B=null}),Qe()),Ce[8]?U?(U.p(Ce,Ne),Ne[0]&256&&Q(U,1)):(U=u4(Ce),U.c(),Q(U,1),U.m(e.parentNode,e)):U&&(Je(),se(U,1,1,()=>{U=null}),Qe()),(Ve=Ce[0])!=null&&Ve.isLoading||Ce[18]?H||(H=f4(),H.c(),H.m(i.parentNode,i)):H&&(H.d(1),H=null),Ce[19]===qn?Z?(Z.p(Ce,Ne),Ne[0]&524288&&Q(Z,1)):(Z=d4(Ce),Z.c(),Q(Z,1),Z.m(r,o)):Z&&(Je(),se(Z,1,1,()=>{Z=null}),Qe()),(!E||Ne[0]&65601)&&c!==(c=Bw(Ce[0],Ce[16]("product.config_id"),Ce[6].configId||"")+"")&&(a.innerHTML=c),(ot=Ce[6])!=null&&ot.productCode||(gt=Ce[6])!=null&>.configId||(He=Ce[0])!=null&&He.kbId?V?(V.p(Ce,Ne),Ne[0]&65&&Q(V,1)):(V=p4(Ce),V.c(),Q(V,1),V.m(l,null)):V&&(Je(),se(V,1,1,()=>{V=null}),Qe()),(Be=Ce[0])!=null&&Be.description?ne?(ne.p(Ce,Ne),Ne[0]&1&&Q(ne,1)):(ne=h4(Ce),ne.c(),Q(ne,1),ne.m(f,p)):ne&&(Je(),se(ne,1,1,()=>{ne=null}),Qe()),(Ye=Ce[6])!=null&&Ye.gcrCode&&!((rt=(Ue=Ce[0])==null?void 0:Ue.customization)!=null&&rt.custom_configuredReference1)?W?(W.p(Ce,Ne),Ne[0]&65&&Q(W,1)):(W=g4(Ce),W.c(),Q(W,1),W.m(f,m)):W&&(Je(),se(W,1,1,()=>{W=null}),Qe()),(tt=(ze=Ce[0])==null?void 0:ze.customization)!=null&&tt.custom_configuredReference1&&Ce[0].customization.custom_configuredReference2?re?(re.p(Ce,Ne),Ne[0]&1&&Q(re,1)):(re=w4(Ce),re.c(),Q(re,1),re.m(f,g)):re&&(Je(),se(re,1,1,()=>{re=null}),Qe()),(je=Ce[6])!=null&&je.productCode?G?(G.p(Ce,Ne),Ne[0]&64&&Q(G,1)):(G=y4(Ce),G.c(),Q(G,1),G.m(f,h)):G&&(Je(),se(G,1,1,()=>{G=null}),Qe()),(nt=Ce[6])!=null&&nt.configId?F?F.p(Ce,Ne):(F=k4(Ce),F.c(),F.m(f,null)):F&&(F.d(1),F=null);let Pe=T;T=ue(Ce,Ne),T===Pe?le[T].p(Ce,Ne):(Je(),se(le[Pe],1,1,()=>{le[Pe]=null}),Qe(),R=le[T],R?R.p(Ce,Ne):(R=le[T]=X[T](Ce),R.c()),Q(R,1),R.m(y,null)),Ce[9]<=0?ee?ee.p(Ce,Ne):(ee=S4(Ce),ee.c(),ee.m(b,null)):ee&&(ee.d(1),ee=null),Ce[15][bi]===Ae.SHOW||Ce[15][bi]===Ae.DISABLED?$?$.p(Ce,Ne):($=T4(Ce),$.c(),$.m(r,q)):$&&($.d(1),$=null),Ce[20]?he?(he.p(Ce,Ne),Ne[0]&1048576&&Q(he,1)):(he=C4(Ce),he.c(),Q(he,1),he.m(D,P)):he&&(Je(),se(he,1,1,()=>{he=null}),Qe()),te===(te=me(Ce))&&oe?oe.p(Ce,Ne):(oe.d(1),oe=te(Ce),oe&&(oe.c(),oe.m(L,null))),(!E||Ne[0]&2&&C!==(C="pw small-font table-group-section "+(Ce[1].isArchived?"pw disabled":Te)+" svelte-s68tfk"))&&w(r,"class",C),Ce[19]===Vn&&Ce[10]?ce?(ce.p(Ce,Ne),Ne[0]&525312&&Q(ce,1)):(ce=A4(Ce),ce.c(),Q(ce,1),ce.m(I.parentNode,I)):ce&&(Je(),se(ce,1,1,()=>{ce=null}),Qe()),Ce[11]?ge?ge.p(Ce,Ne):(ge=O4(Ce),ge.c(),ge.m(N.parentNode,N)):ge&&(ge.d(1),ge=null)},i(Ce){E||(Q(B),Q(U),Q(Z),Q(V),Q(ne),Q(W),Q(re),Q(G),Q(R),Q(he),Q(ce),E=!0)},o(Ce){se(B),se(U),se(Z),se(V),se(ne),se(W),se(re),se(G),se(R),se(he),se(ce),E=!1},d(Ce){Ce&&(K(n),K(e),K(i),K(r),K(S),K(I),K(N)),B&&B.d(Ce),U&&U.d(Ce),H&&H.d(Ce),Z&&Z.d(),V&&V.d(),ne&&ne.d(),W&&W.d(),re&&re.d(),G&&G.d(),F&&F.d(),le[T].d(),ee&&ee.d(),$&&$.d(),he&&he.d(),oe.d(),ce&&ce.d(Ce),ge&&ge.d(Ce)}}}function CG(t,n,e){let i,r,o,s,l,a,c,u,d,f,p;ye(t,Ii,we=>e(15,r=we)),ye(t,Vt,we=>e(16,o=we)),ye(t,$r,we=>e(49,s=we)),ye(t,es,we=>e(50,l=we)),ye(t,Gu,we=>e(51,a=we)),ye(t,an,we=>e(17,c=we)),ye(t,Ji,we=>e(18,u=we)),ye(t,ti,we=>e(52,d=we)),ye(t,Ki,we=>e(19,f=we)),ye(t,Xr,we=>e(20,p=we));let{apigeeToken:m}=n,{language:g}=n,{country:h}=n,{product:_}=n,{parentId:b}=n,{projectData:y}=n,{viewChildren:k}=n,{projectId:T}=n,R=!1,O=!1,j=_.quantity,q=!1;const M=Mn();let z=!1,D,P,L=[],C,S,I;Un(()=>{B(),E()});function N(we){const pe=new Blob([we],{type:"application/xml"}),Se=URL.createObjectURL(pe),Le=document.createElement("a");Le.href=Se;const Re=["Order"];if(I!=null&&I.productCode){const ke=I.productCode.length>16?I.productCode.slice(0,16):I.productCode;Re.push(ke)}else I!=null&&I.gcrCode&&Re.push(I.gcrCode),Re.push(I.configId);const Ee=Re.join("_");Le.download=`${Ee}.xml`,document.body.appendChild(Le),Le.click(),document.body.removeChild(Le),URL.revokeObjectURL(Se)}function E(){var we;e(5,L=(we=_==null?void 0:_.configCharacteristicGroup)==null?void 0:we.slice(0,10))}function B(){const we=new MutationObserver(()=>{let pe="row-qty-"+_.serialNum;const Se=document.getElementById(pe);Se&&(Se!=null&&Se.shadowRoot)&&requestAnimationFrame(()=>{var Re;const Le=(Re=Se==null?void 0:Se.shadowRoot)==null?void 0:Re.querySelector(".qds-input");Le&&(Le.style.width="100%",we.disconnect())})});we.observe(document.body,{childList:!0,subtree:!0})}function U(we){var Se,Le,Re,Ee;const pe=(Se=we==null?void 0:we.target)==null?void 0:Se.checked;e(0,_.isSelected=pe,_),Fd(_,(Le=we==null?void 0:we.target)==null?void 0:Le.checked),pe||(e(1,y.bom.isSelected=pe,y),(Ee=(Re=y==null?void 0:y.bom)==null?void 0:Re.groups)==null||Ee.forEach(ke=>{xd(ke)})),tc(_s(y==null?void 0:y.bom)),an.update(()=>y)}function H(we,pe,Se){oh.set(we),ah.set(pe),Gu.set(Se),f===qn?e(7,R=!0):f===Vn&&e(10,q=!0)}function Z(){e(8,O=!0)}function V(we,pe){var Le,Re;const Se=Number(we);if(Math.floor(Se)!==Se)e(9,j=0);else if(Se>0){if(ja([pe]),e(9,j=Se),Se!==(pe==null?void 0:pe.quantity)){if(pe!=null&&pe.parts&&((Le=pe.parts)==null?void 0:Le.length)>0){if((pe==null?void 0:pe.quantity)>0){let Ee=pe.parts.map(ke=>ke.quantity/pe.quantity*Se);(Re=pe==null?void 0:pe.parts)==null||Re.forEach((ke,Ce)=>{ke.quantity=Ee[Ce]}),pe.quantity=Number(Se)}}else pe.quantity=Number(Se);try{const Ee=String(y.id),ke={...y};let Ce=Qc(ke);ne(Ce,Ee)}catch(Ee){ve.info("fetchCaseProduct: catch",Ee)}}}else Se===0&&e(9,j=Se)}function ne(we,pe){jt(Ji,u=!0,u);const Se=o("edit_list.list_updated_successfully_message");f===qn?Vi(we,pe,Se,d).then(async()=>{e(0,_.isLoading=!0,_);const Le=mn(h,c),Re=gn(g,c);await ci(pe,Le,Re,m,!0).then(function(Ee){e(0,_.isLoading=!1,_),jt(Ji,u=!1,u),ve.info(Ee)}).catch(function(Ee){e(0,_.isLoading=!1,_),ve.error(Ee)}),ve.info("Project updated for with ID : ",pe)}).finally(()=>{ve.info("Project updated for with ID: ",pe)}):Os(we,l).then(async()=>{e(0,_.isLoading=!0,_);const Le=mn(h,c),Re=gn(g,c);await ci(l,Le,Re,m,!0).then(function(Ee){e(0,_.isLoading=!1,_),jt(Ji,u=!1,u),ve.info(Ee)}).catch(function(Ee){e(0,_.isLoading=!1,_),ve.error(Ee)}),ve.info("Project updated for with ID : ",pe)}).finally(()=>{ve.info("Project updated for with ID: ",pe)})}function W(we){F(we);const{price:pe,currency:Se,isParent:Le,isCTOItemPriceMissing:Re}=we;return Le&&Re?_r:js(pe)&&(Se||We!=null&&We.country)?fr(gn(We.language,c),mn(We.country,c),String(js(pe))):_r}function re(we){F(we);const{price:pe,currency:Se,isParent:Le,isCTOItemPriceMissing:Re}=we;return Le&&Re?_r:js(pe)&&(Se||We.country)?fr(gn(We.language,c),mn(We.country,c),(js(pe)*we.quantity).toString()):_r}function G(we={}){const pe=we.parts||[];return pe.some(Le=>(Le==null?void 0:Le.price)===void 0)?0:pe==null?void 0:pe.reduce((Le,Re)=>{const Ee=js(Re==null?void 0:Re.price),ke=Ee?Number(Ee):0;return Le+ke},0)}function F(we){var pe;we!=null&&we.isParent&&we!=null&&we.parts&&((pe=we.parts)==null?void 0:pe.length)>0&&(typeof we.price===Vs?we.price.value=G(we):we.price=G(we))}function X(we){M(ig,{condition:we})}function le(){I!=null&&I.productCode&&(I==null?void 0:I.productCode)!==Te?(Zs.update(()=>_),of.update(()=>!0),ho.set(!0),Jo.set(I==null?void 0:I.productCode)):I!=null&&I.configId&&(I==null?void 0:I.configId)!==Te?(Zs.update(()=>_),of.update(()=>!0),ho.set(!0),Lg.set(I==null?void 0:I.configId)):(_==null?void 0:_.kbId)!==Te&&(Zs.update(()=>_),of.update(()=>!0),ho.set(!0),Ng.set(_==null?void 0:_.kbId))}function ue(){e(10,q=!1),ki.update(()=>!0);const we=Kg(s);Wh([{id:(a==null?void 0:a.id)||Te,quantity:(a==null?void 0:a.quantity)||0}],l,we).then(async pe=>{pe!=null&&pe.error?(tr.update(()=>mr),Wi.update(()=>!0),nr.update(()=>pe==null?void 0:pe.message)):(Bn(Nn.REMOVE_FROM_CART,[a],"","",!1,"cart|uco|delete",!1),tr.update(()=>xr),Wi.update(()=>!0),nr.update(()=>o("cart.delete_products_message")),await ci(l,mn(h,s),gn(g,s),m,!0).then(function(Se){ve.info(Se)}).catch(function(Se){ve.error(Se)}))}).catch(pe=>ve.error(pe==null?void 0:pe.message)).finally(()=>ki.update(()=>!1))}async function ee(we){try{ki.update(()=>!0);const pe=await UM(we,Ec[We.environment].selectAndConfigBearerToken);ki.update(()=>!1),pe?N(pe):(e(11,z=!0),e(12,D=o("bom_manager.details_not_available_for_product")),e(13,P=mr))}catch{ki.update(()=>!1),e(11,z=!0),e(12,D=o("bom_manager.details_not_available_for_product")),e(13,P=mr)}}function $(){var pe;const we=nc(_);if(_.isDisabled)return!0;if(we){if(((pe=_.customization)==null?void 0:pe.configuredReference)!=="")return!1;if(!_.isParent||r[Gc]===Ae.DISABLED)return!0}}Kn(()=>{Wn(!1)});function he(we){R=we,e(7,R)}function me(we){O=we,e(8,O)}const te=we=>{U(we==null?void 0:we.detail)},oe=()=>{Vg(`personalization-id-${_.serialNum}`)&&(e(11,z=!0),e(12,D=o("product.text_copied")),e(13,P=xr))},ce=()=>{Vg(`product-config-id-${_.serialNum}`)&&(e(11,z=!0),e(12,D=o("product.text_copied")),e(13,P=xr))},ge=()=>{H(String(_.id),String(b),_)},fe=()=>{Z()},ae=()=>X(!1),ie=()=>X(!0),_e=()=>e(10,q=!1),Ie=()=>e(11,z=!1);return t.$$set=we=>{"apigeeToken"in we&&e(33,m=we.apigeeToken),"language"in we&&e(34,g=we.language),"country"in we&&e(35,h=we.country),"product"in we&&e(0,_=we.product),"parentId"in we&&e(2,b=we.parentId),"projectData"in we&&e(1,y=we.projectData),"viewChildren"in we&&e(3,k=we.viewChildren),"projectId"in we&&e(4,T=we.projectId)},t.$$.update=()=>{var we;t.$$.dirty[0]&1|t.$$.dirty[1]&96&&_&&(e(36,C=_||{}),e(37,S=C.orderingData||{}),e(6,I={configId:C.configurationId||S.orderingId,productCode:C.productCode||(S==null?void 0:S.productCode),gcrCode:C.productRef||C.productId})),t.$$.dirty[0]&32&&(L||E()),t.$$.dirty[0]&65&&e(14,i=((we=_==null?void 0:_.configCharacteristicGroup)==null?void 0:we.length)>10&&(!!(I!=null&&I.productCode)||!!(I!=null&&I.configId)||!!(_!=null&&_.kbId)))},[_,y,b,k,T,L,I,R,O,j,q,z,D,P,i,r,o,c,u,f,p,N,U,H,Z,V,W,re,X,le,ue,ee,$,m,g,h,C,S,he,me,te,oe,ce,ge,fe,ae,ie,_e,Ie]}class EG extends Ot{constructor(n){super(),At(this,n,CG,TG,It,{apigeeToken:33,language:34,country:35,product:0,parentId:2,projectData:1,viewChildren:3,projectId:4},mG,[-1,-1])}}function P4(t,n,e){const i=t.slice();return i[12]=n[e],i}function N4(t,n,e){const i=t.slice();return i[12]=n[e],i}function IG(t){var s,l;let n,e,i,r;n=new EG({props:{projectData:t[1],product:t[0],parentId:t[2],projectId:t[6],apigeeToken:t[3],language:t[4],country:t[5],viewChildren:t[8]}}),n.$on("SHOW_CHILDREN",t[10]);let o=((s=t[0])==null?void 0:s.parts)&&((l=t[0].parts)==null?void 0:l.length)>0&&t[8]&&L4(t);return{c(){De(n.$$.fragment),e=Y(),o&&o.c(),i=wt()},m(a,c){Me(n,a,c),J(a,e,c),o&&o.m(a,c),J(a,i,c),r=!0},p(a,c){var d,f;const u={};c&2&&(u.projectData=a[1]),c&1&&(u.product=a[0]),c&4&&(u.parentId=a[2]),c&64&&(u.projectId=a[6]),c&8&&(u.apigeeToken=a[3]),c&16&&(u.language=a[4]),c&32&&(u.country=a[5]),c&256&&(u.viewChildren=a[8]),n.$set(u),(d=a[0])!=null&&d.parts&&((f=a[0].parts)==null?void 0:f.length)>0&&a[8]?o?(o.p(a,c),c&257&&Q(o,1)):(o=L4(a),o.c(),Q(o,1),o.m(i.parentNode,i)):o&&(Je(),se(o,1,1,()=>{o=null}),Qe())},i(a){r||(Q(n.$$.fragment,a),Q(o),r=!0)},o(a){se(n.$$.fragment,a),se(o),r=!1},d(a){a&&(K(e),K(i)),qe(n,a),o&&o.d(a)}}}function AG(t){var s,l;let n,e,i,r;n=new G_({props:{projectData:t[1],product:t[0],parentId:t[2],projectId:t[6],apigeeToken:t[3],language:t[4],country:t[5],viewChildren:t[7]}}),n.$on("SHOW_CHILDREN",t[9]);let o=((s=t[0])==null?void 0:s.parts)&&((l=t[0].parts)==null?void 0:l.length)>0&&t[7]&&R4(t);return{c(){De(n.$$.fragment),e=Y(),o&&o.c(),i=wt()},m(a,c){Me(n,a,c),J(a,e,c),o&&o.m(a,c),J(a,i,c),r=!0},p(a,c){var d,f;const u={};c&2&&(u.projectData=a[1]),c&1&&(u.product=a[0]),c&4&&(u.parentId=a[2]),c&64&&(u.projectId=a[6]),c&8&&(u.apigeeToken=a[3]),c&16&&(u.language=a[4]),c&32&&(u.country=a[5]),c&128&&(u.viewChildren=a[7]),n.$set(u),(d=a[0])!=null&&d.parts&&((f=a[0].parts)==null?void 0:f.length)>0&&a[7]?o?(o.p(a,c),c&129&&Q(o,1)):(o=R4(a),o.c(),Q(o,1),o.m(i.parentNode,i)):o&&(Je(),se(o,1,1,()=>{o=null}),Qe())},i(a){r||(Q(n.$$.fragment,a),Q(o),r=!0)},o(a){se(n.$$.fragment,a),se(o),r=!1},d(a){a&&(K(e),K(i)),qe(n,a),o&&o.d(a)}}}function L4(t){let n,e,i=Dt(t[0].parts),r=[];for(let s=0;sse(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;sse(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function PG(t,n,e){let{part:i}=n,{projectData:r}=n,{parentId:o}=n,{apigeeToken:s}=n,{language:l}=n,{country:a}=n,{projectId:c}=n,u=!0,d=!1;function f(m){var g;e(7,u=(g=m==null?void 0:m.detail)==null?void 0:g.condition)}function p(m){var g;e(8,d=(g=m==null?void 0:m.detail)==null?void 0:g.condition)}return t.$$set=m=>{"part"in m&&e(0,i=m.part),"projectData"in m&&e(1,r=m.projectData),"parentId"in m&&e(2,o=m.parentId),"apigeeToken"in m&&e(3,s=m.apigeeToken),"language"in m&&e(4,l=m.language),"country"in m&&e(5,a=m.country),"projectId"in m&&e(6,c=m.projectId)},t.$$.update=()=>{t.$$.dirty&1&&i!=null&&i.configurationId},[i,r,o,s,l,a,c,u,d,f,p]}class NG extends Ot{constructor(n){super(),At(this,n,PG,OG,It,{part:0,projectData:1,parentId:2,apigeeToken:3,language:4,country:5,projectId:6})}}function q4(t,n,e){const i=t.slice();return i[8]=n[e],i}function D4(t){let n,e;return n=new NG({props:{projectData:t[1],part:t[8],parentId:t[2],apigeeToken:t[3],language:t[4],country:t[5],projectId:t[6]}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&2&&(o.projectData=i[1]),r&1&&(o.part=i[8]),r&4&&(o.parentId=i[2]),r&8&&(o.apigeeToken=i[3]),r&16&&(o.language=i[4]),r&32&&(o.country=i[5]),r&64&&(o.projectId=i[6]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function B4(t){let n,e,i=!t[7]&&D4(t);return{c(){i&&i.c(),n=wt()},m(r,o){i&&i.m(r,o),J(r,n,o),e=!0},p(r,o){r[7]?i&&(Je(),se(i,1,1,()=>{i=null}),Qe()):i?(i.p(r,o),o&128&&Q(i,1)):(i=D4(r),i.c(),Q(i,1),i.m(n.parentNode,n))},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(r)}}}function LG(t){let n,e,i=Dt(t[0]),r=[];for(let s=0;sse(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;se(7,i=d));let{parts:r}=n,{projectData:o}=n,{parentId:s}=n,{apigeeToken:l}=n,{language:a}=n,{country:c}=n,{projectId:u}=n;return t.$$set=d=>{"parts"in d&&e(0,r=d.parts),"projectData"in d&&e(1,o=d.projectData),"parentId"in d&&e(2,s=d.parentId),"apigeeToken"in d&&e(3,l=d.apigeeToken),"language"in d&&e(4,a=d.language),"country"in d&&e(5,c=d.country),"projectId"in d&&e(6,u=d.projectId)},[r,o,s,l,a,c,u,i]}class H_ extends Ot{constructor(n){super(),At(this,n,jG,LG,It,{parts:0,projectData:1,parentId:2,apigeeToken:3,language:4,country:5,projectId:6})}}const Fne="";function RG(t){Ut(t,"svelte-jih7n0",".pw.display-flex.svelte-jih7n0{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-jih7n0{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.normal-font.svelte-jih7n0{font-weight:normal;font-size:16px}.pw.error-msg.svelte-jih7n0{color:var(--se-red, #dc0a0a)}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.input-box.svelte-jih7n0{width:34%}.create-grp-container.svelte-jih7n0{background-color:var(--se-ultra-light-grey-2, #f7f7f7);padding:12px;overflow:hidden;position:sticky;top:32px;z-index:10}.create-grp-sub-container.svelte-jih7n0{-webkit-box-pack:justify;-moz-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}")}function U4(t){let n,e,i=(t[7]&&t[2]===Ti||t[8]&&t[2]===ya&&t[9]===t[1])&&z4(t);return{c(){i&&i.c(),n=wt()},m(r,o){i&&i.m(r,o),J(r,n,o),e=!0},p(r,o){r[7]&&r[2]===Ti||r[8]&&r[2]===ya&&r[9]===r[1]?i?(i.p(r,o),o&902&&Q(i,1)):(i=z4(r),i.c(),Q(i,1),i.m(n.parentNode,n)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(r)}}}function z4(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R=(t[3]||t[4])&&F4(t),O=t[5]&&x4(t);function j(M){t[15](M)}let q={type:"text",id:"txtGroupName",name:"txtGroupName",className:"grp-name-input",maxLength:Ol};return t[0]!==void 0&&(q.value=t[0]),l=new Yi({props:q}),_t.push(()=>Ct(l,"value",j)),h=new Gt({props:{id:"btn-cancel-group",buttonText:t[6]("generic.cancel")}}),h.$on("btnClick",t[16]),k=new Gt({props:{importance:"emphasized",id:"btn-create-group",disabled:!t[0],buttonText:t[6]("generic.create")}}),k.$on("btnClick",t[17]),{c(){n=A("div"),R&&R.c(),e=Y(),O&&O.c(),i=Y(),r=A("div"),o=A("div"),s=A("se-form-field"),De(l.$$.fragment),c=Y(),u=A("div"),d=Y(),f=A("div"),p=A("div"),m=A("se-form-field"),g=A("span"),De(h.$$.fragment),_=Y(),b=A("se-form-field"),y=A("span"),De(k.$$.fragment),w(s,"block",""),w(s,"label",""),w(s,"option","stacked"),x(o,"class","input-box svelte-jih7n0"),x(g,"class","pw normal-font svelte-jih7n0"),w(m,"block",""),w(m,"label",""),w(m,"option","stacked"),x(y,"class","pw normal-font svelte-jih7n0"),w(b,"block",""),w(b,"label",""),w(b,"option","stacked"),x(p,"class","pw display-flex svelte-jih7n0"),x(r,"class","pw display-flex create-grp-sub-container svelte-jih7n0"),x(n,"class","create-grp-container svelte-jih7n0")},m(M,z){J(M,n,z),R&&R.m(n,null),v(n,e),O&&O.m(n,null),v(n,i),v(n,r),v(r,o),v(o,s),Me(l,s,null),v(r,c),v(r,u),v(r,d),v(r,f),v(f,p),v(p,m),v(m,g),Me(h,g,null),v(p,_),v(p,b),v(b,y),Me(k,y,null),T=!0},p(M,z){M[3]||M[4]?R?R.p(M,z):(R=F4(M),R.c(),R.m(n,e)):R&&(R.d(1),R=null),M[5]?O?O.p(M,z):(O=x4(M),O.c(),O.m(n,i)):O&&(O.d(1),O=null);const D={};!a&&z&1&&(a=!0,D.value=M[0],Tt(()=>a=!1)),l.$set(D);const P={};z&64&&(P.buttonText=M[6]("generic.cancel")),h.$set(P);const L={};z&1&&(L.disabled=!M[0]),z&64&&(L.buttonText=M[6]("generic.create")),k.$set(L)},i(M){T||(Q(l.$$.fragment,M),Q(h.$$.fragment,M),Q(k.$$.fragment,M),T=!0)},o(M){se(l.$$.fragment,M),se(h.$$.fragment,M),se(k.$$.fragment,M),T=!1},d(M){M&&K(n),R&&R.d(),O&&O.d(),qe(l),qe(h),qe(k)}}}function F4(t){let n,e=t[6]("bom_manager.group_already_exist_message")+"",i;return{c(){n=A("div"),i=de(e),x(n,"class","pw error-msg svelte-jih7n0")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o&64&&e!==(e=r[6]("bom_manager.group_already_exist_message")+"")&&be(i,e)},d(r){r&&K(n)}}}function x4(t){let n,e=t[6]("bom_manager.group_name_characters_limit_message")+"",i;return{c(){n=A("div"),i=de(e),x(n,"class","pw error-msg svelte-jih7n0")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o&64&&e!==(e=r[6]("bom_manager.group_name_characters_limit_message")+"")&&be(i,e)},d(r){r&&K(n)}}}function MG(t){let n,e,i=(t[7]||t[8])&&U4(t);return{c(){i&&i.c(),n=wt()},m(r,o){i&&i.m(r,o),J(r,n,o),e=!0},p(r,[o]){r[7]||r[8]?i?(i.p(r,o),o&384&&Q(i,1)):(i=U4(r),i.c(),Q(i,1),i.m(n.parentNode,n)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(r)}}}function qG(t,n,e){let i,r,o,s,l,a;ye(t,Vt,z=>e(6,i=z)),ye(t,wr,z=>e(20,r=z)),ye(t,ti,z=>e(21,o=z)),ye(t,Sa,z=>e(7,s=z)),ye(t,Ta,z=>e(8,l=z)),ye(t,Fu,z=>e(9,a=z));let{bomData:c}=n,{projectData:u}=n,{parentId:d}=n,{type:f}=n,{parentGroup:p}=n,{newGroupName:m}=n,g=!1,h=!1,_=!1,b=[],y=[];function k(z){Xr.set(!1),b=[],y=[];let D=_s(c);if(z.length>Ol)e(5,_=!0);else if(m!=null&&m.length){e(5,_=!1);let P=um(f===Ti?u.bom:p,fs,z.toLocaleLowerCase()),L=fm(f,P);e(3,g=L.groupExists),e(4,h=L.subGroupExists),P||(e(3,g=!1),e(4,h=!1),qd(D,b,y,tg),Dd(D,b),y=bf(y),f===Ti?(D.groups=D!=null&&D.groups?[...D.groups]:[],D.groups.unshift({name:z,id:Te,groups:b,parts:y})):e_(D,_a,d,z,b,y),il(c,D,u,dm(f,i("bom_manager.group_added_successfully"),i("bom_manager.subgroup_added_successfully")),pm(f,i("bom_manager.group_adding_error"),i("bom_manager.subgroup_adding_error")),o),Br(u.id,"{activity_log.message_create_group}"+cn,on,"{activity_log.message_create_group}"+cn+Es+z+Es+cn+"{activity_log.message_in_list}",[]),O(f))}gs(Ai.CREATE_GROUP.action,Ai.CREATE_GROUP.subaction,String(r.platform),zt()?u.id:void 0,zt()?void 0:u.id),Bn(Nn.CTA_CLICK,{cta_name:"Create group",cta_location:$i.UCList}),xu.set(!1)}function T(){e(3,g=!1),e(4,h=!1),xu.set(!1),R(),O(f)}function R(){e(0,m=f===Ti?qo(u.bom,i("bom_manager.custom_group"),fs,gr):qo(p,i("bom_manager.custom_subgroup"),fs,gr))}function O(z){z===Ti?Sa.set(!1):(Ta.set(!1),Fu.set(Te)),Xr.set(!0)}function j(z){m=z,e(0,m)}const q=()=>{T()},M=()=>{k(m==null?void 0:m.trim())};return t.$$set=z=>{"bomData"in z&&e(12,c=z.bomData),"projectData"in z&&e(13,u=z.projectData),"parentId"in z&&e(1,d=z.parentId),"type"in z&&e(2,f=z.type),"parentGroup"in z&&e(14,p=z.parentGroup),"newGroupName"in z&&e(0,m=z.newGroupName)},[m,d,f,g,h,_,i,s,l,a,k,T,c,u,p,j,q,M]}class G4 extends Ot{constructor(n){super(),At(this,n,qG,MG,It,{bomData:12,projectData:13,parentId:1,type:2,parentGroup:14,newGroupName:0},RG)}}const xne="",{Boolean:DG}=uo;function BG(t){Ut(t,"svelte-1yucbkr",".pw.disabled.svelte-1yucbkr{pointer-events:none;opacity:0.5}.pw.align-right.svelte-1yucbkr{margin-left:auto}.pw.align-left.svelte-1yucbkr{margin-right:auto}.pw.display-flex.svelte-1yucbkr{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1yucbkr{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-1yucbkr{font-size:16px}.pw.small-font.svelte-1yucbkr{font-size:14px}.pw.nano-font.svelte-1yucbkr{font-size:12px}.pw.pointer.svelte-1yucbkr{cursor:pointer}.pw-snackbar-elem.svelte-1yucbkr{top:30px}.pw.red-color.svelte-1yucbkr{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-1yucbkr{display:none}.pw.width-100.svelte-1yucbkr{width:100%}.pw.bold-font.svelte-1yucbkr{font-weight:bold}.pw.normal-font.svelte-1yucbkr{font-weight:normal;font-size:16px}.pw.error-msg.svelte-1yucbkr{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-1yucbkr{text-align:center}.pw.center-align-items.svelte-1yucbkr{align-items:center}.pw.justify-content-center.svelte-1yucbkr{justify-content:center}.pw.bom-checkbox.svelte-1yucbkr{max-width:16px}.pw.ml-8.svelte-1yucbkr{margin-left:8px}.pw.ml-12.svelte-1yucbkr{margin-left:12px}.pw.ml-36.svelte-1yucbkr{margin-left:36px}.pw.mt-8.svelte-1yucbkr{margin-top:8px}.pw.mt-6.svelte-1yucbkr{margin-top:6px}.pw.mt-32.svelte-1yucbkr{margin-top:32px}.pw.mb-8.svelte-1yucbkr{margin-bottom:8px}.pw.mb-12.svelte-1yucbkr{margin-bottom:12px}.pw.mb-16.svelte-1yucbkr{margin-top:16px}.pw.mb-21.svelte-1yucbkr{margin-bottom:21px}.pw.mr-12.svelte-1yucbkr{margin-right:12px}.pw.p-12.svelte-1yucbkr{padding:12px}.pw.pl-16.svelte-1yucbkr{padding-left:16px}.pw.pr-16.svelte-1yucbkr{padding-right:16px}.position-absolute.svelte-1yucbkr{position:absolute}.flex-wrap.svelte-1yucbkr{flex-wrap:wrap}.justify-content-sp-btw.svelte-1yucbkr{justify-content:space-between}.gp-10.svelte-1yucbkr{gap:10px}.gp-5.svelte-1yucbkr{gap:5px}.desktop-view.svelte-1yucbkr{display:none}.mobile-view.svelte-1yucbkr{display:block}.mobile-view-flx.svelte-1yucbkr{display:flex;flex-direction:column}.rounded-border.svelte-1yucbkr{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-1yucbkr{text-align:right}.bg-color-light-grey.svelte-1yucbkr{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-1yucbkr{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-1yucbkr{padding:8px 0 16px 8px}@media(min-width: 968px){.mobile-view.svelte-1yucbkr,.mobile-view-flx.svelte-1yucbkr{display:none}.desktop-view.svelte-1yucbkr{display:inherit}}.cart-mobile-snackbar.svelte-1yucbkr{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-1yucbkr,.mobile-view-snackbar.svelte-1yucbkr{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-1yucbkr{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-1yucbkr{display:block}.mobile-snackbar.svelte-1yucbkr{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-1yucbkr{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-1yucbkr{margin:-6px}.bottom-snackbar.svelte-1yucbkr{bottom:30px;top:auto}.indent-large.svelte-1yucbkr{padding-left:32px}.no-products-div.svelte-1yucbkr{padding:32px}.separator-div.svelte-1yucbkr{height:4px}.input-box.svelte-1yucbkr{width:80%}.options-box.svelte-1yucbkr{width:3%;text-align:right}.grp-name-input.svelte-1yucbkr{height:32px}.create-grp-container.svelte-1yucbkr{background-color:var(--se-ultra-light-grey-2, #f7f7f7);padding:12px;font-weight:100;font-size:14px}#dialog-delete-group.svelte-1yucbkr{font-weight:400}#button-cancel-delete-group.svelte-1yucbkr{margin-left:8px}.hidden-checkbox.svelte-1yucbkr{width:3px;margin:0;visibility:hidden}.checkbox-indent.svelte-1yucbkr{margin:0 0 0 5px}.cart-indent.svelte-1yucbkr{margin-right:5px}.checkbox-space.svelte-1yucbkr{padding-right:17px}")}function H4(t,n,e){const i=t.slice();return i[52]=n[e],i}function W4(t){let n,e,i,r;function o(a){t[36](a)}function s(a){t[37](a)}let l={projectData:t[2],bomData:t[2].bom,successMsg:t[21]("bom_manager.product_moved_successfully"),errorMsg:t[21]("bom_manager.error_in_moving_product"),confirmTxt:t[21]("list_manager.move_selected_product"),confirmLbl:t[21]("generic.move"),cancelLbl:t[21]("generic.cancel"),popupName:To};return t[18]!==void 0&&(l.isPopupOpen=t[18]),t[0]!==void 0&&(l.groupData=t[0]),n=new ha({props:l}),_t.push(()=>Ct(n,"isPopupOpen",o)),_t.push(()=>Ct(n,"groupData",s)),{c(){De(n.$$.fragment)},m(a,c){Me(n,a,c),r=!0},p(a,c){const u={};c[0]&4&&(u.projectData=a[2]),c[0]&4&&(u.bomData=a[2].bom),c[0]&2097152&&(u.successMsg=a[21]("bom_manager.product_moved_successfully")),c[0]&2097152&&(u.errorMsg=a[21]("bom_manager.error_in_moving_product")),c[0]&2097152&&(u.confirmTxt=a[21]("list_manager.move_selected_product")),c[0]&2097152&&(u.confirmLbl=a[21]("generic.move")),c[0]&2097152&&(u.cancelLbl=a[21]("generic.cancel")),!e&&c[0]&262144&&(e=!0,u.isPopupOpen=a[18],Tt(()=>e=!1)),!i&&c[0]&1&&(i=!0,u.groupData=a[0],Tt(()=>i=!1)),n.$set(u)},i(a){r||(Q(n.$$.fragment,a),r=!0)},o(a){se(n.$$.fragment,a),r=!1},d(a){qe(n,a)}}}function V4(t){let n,e,i,r,o,s,l,a;return{c(){var c,u;n=A("qds-checkbox"),w(n,"id",e="chk-"+t[3]+"-"+t[9]),w(n,"style",i=`padding-left:${t[4]===Ti?0:t[9]}px`),w(n,"disabled",r=((c=t[0])==null?void 0:c.isDisabled)||t[23][Rh]===Ae.DISABLED),w(n,"checked",o=(u=t[0])==null?void 0:u.isSelected),w(n,"size","small"),w(n,"slot","start"),w(n,"class",s=(t[2].isArchived?"pw disabled":Te)+" checkbox-indent "+(t[22]===Vn?"":"checkbox-space")+" svelte-1yucbkr")},m(c,u){J(c,n,u),l||(a=xe(n,"click",vc(Ts(t[38]))),l=!0)},p(c,u){var d,f;u[0]&520&&e!==(e="chk-"+c[3]+"-"+c[9])&&w(n,"id",e),u[0]&528&&i!==(i=`padding-left:${c[4]===Ti?0:c[9]}px`)&&w(n,"style",i),u[0]&8388609&&r!==(r=((d=c[0])==null?void 0:d.isDisabled)||c[23][Rh]===Ae.DISABLED)&&w(n,"disabled",r),u[0]&1&&o!==(o=(f=c[0])==null?void 0:f.isSelected)&&w(n,"checked",o),u[0]&4194308&&s!==(s=(c[2].isArchived?"pw disabled":Te)+" checkbox-indent "+(c[22]===Vn?"":"checkbox-space")+" svelte-1yucbkr")&&w(n,"class",s)},d(c){c&&K(n),l=!1,a()}}}function Y4(t){let n,e,i;return{c(){n=A("qds-checkbox"),w(n,"id",e="chk-"+t[3]+"-"+t[9]),w(n,"style",i=`padding-left:${t[4]===Ti?t[8]:t[9]}px;`),w(n,"size","small"),w(n,"slot","start"),w(n,"class","disabled hidden-checkbox svelte-1yucbkr")},m(r,o){J(r,n,o)},p(r,o){o[0]&520&&e!==(e="chk-"+r[3]+"-"+r[9])&&w(n,"id",e),o[0]&784&&i!==(i=`padding-left:${r[4]===Ti?r[8]:r[9]}px;`)&&w(n,"style",i)},d(r){r&&K(n)}}}function Z4(t){let n,e,i=t[22]===qn&&V4(t),r=t[22]===Vn&&Y4(t);return{c(){i&&i.c(),n=Y(),r&&r.c(),e=wt()},m(o,s){i&&i.m(o,s),J(o,n,s),r&&r.m(o,s),J(o,e,s)},p(o,s){o[22]===qn?i?i.p(o,s):(i=V4(o),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),o[22]===Vn?r?r.p(o,s):(r=Y4(o),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(o){o&&(K(n),K(e)),i&&i.d(o),r&&r.d(o)}}}function X4(t){var k;let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b=!((k=t[0])!=null&&k.isHideSubgroupButton)&&t[22]!==Vn&&K4(t),y=t[22]!==Vn&&J4(t);return{c(){n=A("se-dropdown"),e=A("se-icon"),i=de("other_vertical"),o=Y(),s=A("se-list"),l=A("se-divider"),a=Y(),b&&b.c(),c=Y(),y&&y.c(),u=Y(),d=A("se-list-item"),w(e,"id",r="ic-group-menu-"+t[3]+"-"+t[9]),w(e,"slot","trigger"),w(e,"option","button"),w(e,"class","svelte-1yucbkr"),w(d,"id",f="lst-delete-group-"+t[3]+"-"+t[9]),w(d,"item",p=t[21]("generic.delete")),w(d,"class","svelte-1yucbkr"),w(s,"option","dropdown"),w(n,"alignment","left"),w(n,"slot","end"),w(n,"id",m="dd-group-menu-"+t[3]+"-"+t[9]),w(n,"class",g="options-box pw normal-font "+(t[2].isArchived||t[23][Mh]===Ae.DISABLED?"pw disabled":Te)+" svelte-1yucbkr")},m(T,R){J(T,n,R),v(n,e),v(e,i),v(n,o),v(n,s),v(s,l),v(s,a),b&&b.m(s,null),v(s,c),y&&y.m(s,null),v(s,u),v(s,d),h||(_=xe(d,"click",t[41]),h=!0)},p(T,R){var O;R[0]&520&&r!==(r="ic-group-menu-"+T[3]+"-"+T[9])&&w(e,"id",r),!((O=T[0])!=null&&O.isHideSubgroupButton)&&T[22]!==Vn?b?b.p(T,R):(b=K4(T),b.c(),b.m(s,c)):b&&(b.d(1),b=null),T[22]!==Vn?y?y.p(T,R):(y=J4(T),y.c(),y.m(s,u)):y&&(y.d(1),y=null),R[0]&520&&f!==(f="lst-delete-group-"+T[3]+"-"+T[9])&&w(d,"id",f),R[0]&2097152&&p!==(p=T[21]("generic.delete"))&&w(d,"item",p),R[0]&520&&m!==(m="dd-group-menu-"+T[3]+"-"+T[9])&&w(n,"id",m),R[0]&8388612&&g!==(g="options-box pw normal-font "+(T[2].isArchived||T[23][Mh]===Ae.DISABLED?"pw disabled":Te)+" svelte-1yucbkr")&&w(n,"class",g)},d(T){T&&K(n),b&&b.d(),y&&y.d(),h=!1,_()}}}function K4(t){let n,e,i,r,o,s,l;return{c(){n=A("se-list-item"),r=Y(),o=A("se-divider"),w(n,"id",e="lst-cr-sg-"+t[3]+"-"+t[9]),w(n,"item",i=t[21]("bom_manager.create_subgroup")),w(n,"class","svelte-1yucbkr")},m(a,c){J(a,n,c),J(a,r,c),J(a,o,c),s||(l=xe(n,"click",t[39]),s=!0)},p(a,c){c[0]&520&&e!==(e="lst-cr-sg-"+a[3]+"-"+a[9])&&w(n,"id",e),c[0]&2097152&&i!==(i=a[21]("bom_manager.create_subgroup"))&&w(n,"item",i)},d(a){a&&(K(n),K(r),K(o)),s=!1,l()}}}function J4(t){let n,e,i,r,o,s,l;return{c(){n=A("se-list-item"),r=Y(),o=A("se-divider"),w(n,"id",e="lst-edit-group-sg-"+t[3]+"-"+t[9]),w(n,"item",i=t[4]===Ti?t[21]("bom_manager.edit_group"):t[21]("bom_manager.edit_subgroup")),w(n,"class","svelte-1yucbkr")},m(a,c){J(a,n,c),J(a,r,c),J(a,o,c),s||(l=xe(n,"click",t[40]),s=!0)},p(a,c){c[0]&520&&e!==(e="lst-edit-group-sg-"+a[3]+"-"+a[9])&&w(n,"id",e),c[0]&2097168&&i!==(i=a[4]===Ti?a[21]("bom_manager.edit_group"):a[21]("bom_manager.edit_subgroup"))&&w(n,"item",i)},d(a){a&&(K(n),K(r),K(o)),s=!1,l()}}}function Q4(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R=(t[15]||t[16])&&$4(t),O=t[17]&&e6(t);function j(M){t[42](M)}let q={type:"text",id:"txtGroupName",name:"txtGroupName",className:"grp-name-input",maxLength:Ol};return t[14]!==void 0&&(q.value=t[14]),l=new Yi({props:q}),_t.push(()=>Ct(l,"value",j)),g=new Gt({props:{id:"btn-cancel-update-group",buttonText:t[21]("generic.cancel")}}),g.$on("btnClick",t[43]),k=new Gt({props:{importance:"emphasized",dataTestId:"btn-update-group",id:"btn-update-group",disabled:!t[14],buttonText:t[21]("generic.update")}}),k.$on("btnClick",t[44]),{c(){n=A("div"),R&&R.c(),e=Y(),O&&O.c(),i=Y(),r=A("div"),o=A("div"),s=A("se-form-field"),De(l.$$.fragment),c=Y(),u=A("div"),d=Y(),f=A("div"),p=A("se-form-field"),m=A("span"),De(g.$$.fragment),h=Y(),_=A("div"),b=A("se-form-field"),y=A("span"),De(k.$$.fragment),w(s,"block",""),w(s,"label",""),w(s,"option","stacked"),x(o,"class","input-box svelte-1yucbkr"),x(m,"class","pw normal-font svelte-1yucbkr"),x(y,"class","pw normal-font svelte-1yucbkr"),x(r,"class","pw display-flex svelte-1yucbkr"),x(n,"class","create-grp-container svelte-1yucbkr")},m(M,z){J(M,n,z),R&&R.m(n,null),v(n,e),O&&O.m(n,null),v(n,i),v(n,r),v(r,o),v(o,s),Me(l,s,null),v(r,c),v(r,u),v(r,d),v(r,f),v(f,p),v(p,m),Me(g,m,null),v(r,h),v(r,_),v(_,b),v(b,y),Me(k,y,null),T=!0},p(M,z){M[15]||M[16]?R?R.p(M,z):(R=$4(M),R.c(),R.m(n,e)):R&&(R.d(1),R=null),M[17]?O?O.p(M,z):(O=e6(M),O.c(),O.m(n,i)):O&&(O.d(1),O=null);const D={};!a&&z[0]&16384&&(a=!0,D.value=M[14],Tt(()=>a=!1)),l.$set(D);const P={};z[0]&2097152&&(P.buttonText=M[21]("generic.cancel")),g.$set(P);const L={};z[0]&16384&&(L.disabled=!M[14]),z[0]&2097152&&(L.buttonText=M[21]("generic.update")),k.$set(L)},i(M){T||(Q(l.$$.fragment,M),Q(g.$$.fragment,M),Q(k.$$.fragment,M),T=!0)},o(M){se(l.$$.fragment,M),se(g.$$.fragment,M),se(k.$$.fragment,M),T=!1},d(M){M&&K(n),R&&R.d(),O&&O.d(),qe(l),qe(g),qe(k)}}}function $4(t){let n,e=t[21]("bom_manager.group_already_exist_message")+"",i;return{c(){n=A("div"),i=de(e),x(n,"class","pw error-msg svelte-1yucbkr")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&2097152&&e!==(e=r[21]("bom_manager.group_already_exist_message")+"")&&be(i,e)},d(r){r&&K(n)}}}function e6(t){let n,e=t[21]("bom_manager.group_name_characters_limit_message")+"",i;return{c(){n=A("div"),i=de(e),x(n,"class","pw error-msg svelte-1yucbkr")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&2097152&&e!==(e=r[21]("bom_manager.group_name_characters_limit_message")+"")&&be(i,e)},d(r){r&&K(n)}}}function UG(t){let n;return{c(){n=A("div"),x(n,"class","separator-div svelte-1yucbkr")},m(e,i){J(e,n,i)},p:et,i:et,o:et,d(e){e&&K(n)}}}function zG(t){let n,e=t[21]("bom_manager.no_products_added_message")+"",i,r,o=t[21](`edit_project.${t[4].toLowerCase()}`)+"",s,l,a=t[21]("generic.yet")+"",c;return{c(){n=A("div"),i=de(e),r=Y(),s=de(o),l=Y(),c=de(a),x(n,"class","no-products-div pw normal-font svelte-1yucbkr")},m(u,d){J(u,n,d),v(n,i),v(n,r),v(n,s),v(n,l),v(n,c)},p(u,d){d[0]&2097152&&e!==(e=u[21]("bom_manager.no_products_added_message")+"")&&be(i,e),d[0]&2097168&&o!==(o=u[21](`edit_project.${u[4].toLowerCase()}`)+"")&&be(s,o),d[0]&2097152&&a!==(a=u[21]("generic.yet")+"")&&be(c,a)},i:et,o:et,d(u){u&&K(n)}}}function FG(t){var i;let n,e;return n=new H_({props:{projectData:t[2],parts:t[0].parts,parentId:(i=t[0])==null?void 0:i.id,apigeeToken:t[5],language:t[6],country:t[7],projectId:t[12]}}),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){var l;const s={};o[0]&4&&(s.projectData=r[2]),o[0]&1&&(s.parts=r[0].parts),o[0]&1&&(s.parentId=(l=r[0])==null?void 0:l.id),o[0]&32&&(s.apigeeToken=r[5]),o[0]&64&&(s.language=r[6]),o[0]&128&&(s.country=r[7]),o[0]&4096&&(s.projectId=r[12]),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){qe(n,r)}}}function t6(t){let n,e,i,r,o=Dt(t[0].groups),s=[];for(let a=0;ase(s[a],1,1,()=>{s[a]=null});return{c(){n=A("div"),e=Y();for(let a=0;aCt(n,"parentGroup",r)),{c(){De(n.$$.fragment)},m(l,a){Me(n,l,a),i=!0},p(l,a){var u;const c={};a[0]&4&&(c.projectData=l[2]),a[0]&2&&(c.bomData=l[1]),a[0]&64&&(c.language=l[6]),a[0]&128&&(c.country=l[7]),a[0]&4096&&(c.projectId=l[12]),a[0]&1&&(c.group=l[52]),a[0]&1&&(c.parentId=(u=l[0])==null?void 0:u.id),a[0]&8&&(c.index=l[3]),a[0]&512&&(c.subGroupIndent=l[9]+mh),!e&&a[0]&1&&(e=!0,c.parentGroup=l[0],Tt(()=>e=!1)),n.$set(c)},i(l){i||(Q(n.$$.fragment,l),i=!0)},o(l){se(n.$$.fragment,l),i=!1},d(l){qe(n,l)}}}function xG(t){var P,L,C;let n,e,i,r,o,s=(P=t[0])==null?void 0:P.isSelected,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T=t[18]&&W4(t),R=Z4(t),O=t[24]&&X4(t),j=t[13]&&t[25]&&t[20]===`${t[3]}-${t[9]}`&&Q4(t);u=new G4({props:{projectData:t[2],bomData:t[1],parentId:(L=t[0])==null?void 0:L.id,parentIndex:t[3],type:ya,parentGroup:t[0],newGroupName:t[19],language:t[6],country:t[7],projectId:t[12]}});const q=[FG,zG,UG],M=[];function z(S,I){var N,E,B;return((E=(N=S[0])==null?void 0:N.parts)==null?void 0:E.length)>0?0:!((B=S[0])!=null&&B.groups)||S[0].groups.length===0?1:2}p=z(t),m=M[p]=q[p](t);let D=((C=t[0])==null?void 0:C.groups)&&t6(t);return{c(){var S,I;T&&T.c(),n=Y(),e=A("se-list"),i=A("div"),r=Y(),o=A("se-list-group"),R.c(),l=Y(),O&&O.c(),a=Y(),j&&j.c(),c=Y(),De(u.$$.fragment),d=Y(),f=A("div"),m.c(),_=Y(),D&&D.c(),x(i,"class","separator-div svelte-1yucbkr"),x(f,"class",g="indent-largee "+(t[22]===Vn?"cart-indent":"checkbox-indent")+" svelte-1yucbkr"),x(f,"style",h=`padding-left:${t[4]===Ti?t[8]:t[9]+mh}px`),w(o,"item",b=t[31]((S=t[0])==null?void 0:S.name,(I=t[0])==null?void 0:I.parts)),hi(o,"font-size",(t[4]===Ti?t[10]:t[11])+"px"),w(o,"id",y="selist-"+t[3]+"-"+t[9]),w(o,"class","svelte-1yucbkr"),w(e,"option","headline"),w(e,"can-collapse","true"),w(e,"class","small-top-padding pw bold-font svelte-1yucbkr")},m(S,I){T&&T.m(S,I),J(S,n,I),J(S,e,I),v(e,i),v(e,r),v(e,o),R.m(o,null),v(o,l),O&&O.m(o,null),v(o,a),j&&j.m(o,null),v(o,c),Me(u,o,null),v(o,d),v(o,f),M[p].m(f,null),v(o,_),D&&D.m(o,null),k=!0},p(S,I){var B,U,H,Z,V;S[18]?T?(T.p(S,I),I[0]&262144&&Q(T,1)):(T=W4(S),T.c(),Q(T,1),T.m(n.parentNode,n)):T&&(Je(),se(T,1,1,()=>{T=null}),Qe()),I[0]&1&&It(s,s=(B=S[0])==null?void 0:B.isSelected)?(R.d(1),R=Z4(S),R.c(),R.m(o,l)):R.p(S,I),S[24]?O?O.p(S,I):(O=X4(S),O.c(),O.m(o,a)):O&&(O.d(1),O=null),S[13]&&S[25]&&S[20]===`${S[3]}-${S[9]}`?j?(j.p(S,I),I[0]&34611720&&Q(j,1)):(j=Q4(S),j.c(),Q(j,1),j.m(o,c)):j&&(Je(),se(j,1,1,()=>{j=null}),Qe());const N={};I[0]&4&&(N.projectData=S[2]),I[0]&2&&(N.bomData=S[1]),I[0]&1&&(N.parentId=(U=S[0])==null?void 0:U.id),I[0]&8&&(N.parentIndex=S[3]),I[0]&1&&(N.parentGroup=S[0]),I[0]&524288&&(N.newGroupName=S[19]),I[0]&64&&(N.language=S[6]),I[0]&128&&(N.country=S[7]),I[0]&4096&&(N.projectId=S[12]),u.$set(N);let E=p;p=z(S),p===E?M[p].p(S,I):(Je(),se(M[E],1,1,()=>{M[E]=null}),Qe(),m=M[p],m?m.p(S,I):(m=M[p]=q[p](S),m.c()),Q(m,1),m.m(f,null)),(!k||I[0]&4194304&&g!==(g="indent-largee "+(S[22]===Vn?"cart-indent":"checkbox-indent")+" svelte-1yucbkr"))&&x(f,"class",g),(!k||I[0]&784&&h!==(h=`padding-left:${S[4]===Ti?S[8]:S[9]+mh}px`))&&x(f,"style",h),(H=S[0])!=null&&H.groups?D?(D.p(S,I),I[0]&1&&Q(D,1)):(D=t6(S),D.c(),Q(D,1),D.m(o,null)):D&&(Je(),se(D,1,1,()=>{D=null}),Qe()),(!k||I[0]&1&&b!==(b=S[31]((Z=S[0])==null?void 0:Z.name,(V=S[0])==null?void 0:V.parts)))&&w(o,"item",b),(!k||I[0]&3088)&&hi(o,"font-size",(S[4]===Ti?S[10]:S[11])+"px"),(!k||I[0]&520&&y!==(y="selist-"+S[3]+"-"+S[9]))&&w(o,"id",y)},i(S){k||(Q(T),Q(j),Q(u.$$.fragment,S),Q(m),Q(D),k=!0)},o(S){se(T),se(j),se(u.$$.fragment,S),se(m),se(D),k=!1},d(S){S&&(K(n),K(e)),T&&T.d(S),R.d(S),O&&O.d(),j&&j.d(),qe(u),M[p].d(),D&&D.d()}}}function GG(t,n,e){let i,r,o,s,l,a,c,u;ye(t,ti,ce=>e(47,i=ce)),ye(t,Vt,ce=>e(21,r=ce)),ye(t,is,ce=>e(48,o=ce)),ye(t,an,ce=>e(49,s=ce)),ye(t,Ki,ce=>e(22,l=ce)),ye(t,Ii,ce=>e(23,a=ce)),ye(t,Xr,ce=>e(24,c=ce)),ye(t,Zo,ce=>e(25,u=ce));let{bomData:d}=n,{projectData:f}=n,{group:p}=n,{parentGroup:m=null}=n,{parentId:g}=n,{index:h}=n,{type:_}=n,{apigeeToken:b}=n,{language:y}=n,{country:k}=n,{groupIndent:T}=n,{subGroupIndent:R}=n,{groupHeaderFontSize:O}=n,{subGroupHeaderFontSize:j}=n,{projectId:q}=n,M=!1,z=Te,D=!1,P=!1,L=!1,C=!1,S,I,N;function E(ce,ge,fe){let ae=_s(d);if(ge===fe)V();else{if((fe==null?void 0:fe.length)>Ol)e(17,L=!0);else if(fe!=null&&fe.length){e(17,L=!1),e(13,M=!0),Zo.update(()=>!0),B(d);let ie=um(_===Ti?f.bom:I,fs,fe.toLocaleLowerCase()),_e=fm(_,ie);e(15,D=_e.groupExists),e(16,P=_e.subGroupExists),ie?(Xr.set(!0),gg.set(!1)):(e(20,N=Te),e(15,D=!1),e(16,P=!1),U(ae,ce,fe,dm(_,r("bom_manager.group_updated_successfully"),r("bom_manager.subgroup_updated_successfully")),pm(_,r("bom_manager.group_updating_error"),r("bom_manager.subgroup_updating_error"))))}xu.set(!1)}}function B(ce){var ge;_===ya&&((ge=ce==null?void 0:ce.groups)==null||ge.forEach(fe=>{var ae;g===fe.id&&(I=fe),fe!=null&&fe.groups&&((ae=fe==null?void 0:fe.groups)==null?void 0:ae.length)>0&&B(fe)}))}function U(ce,ge,fe,ae,ie){ce=Jg(ce,_a,ge,fs,fe),il(d,ce,f,ae,ie,i)}function H(ce){e(20,N=`${h}-${R}`),e(13,M=!0),Zo.update(()=>!0),e(14,z=ce),Xr.set(!1)}function Z(ce){Sa.set(!1),Ta.set(!0),Fu.set(ce),Xr.set(!1),e(19,S=Te),e(19,S=qo(p,r("bom_manager.custom_subgroup"),fs,gr))}function V(){e(15,D=!1),e(16,P=!1),e(13,M=!1),Zo.update(()=>!1),Xr.set(!0),e(20,N=Te)}function ne(ce){var ge,fe,ae,ie;if(o)e(18,C=!!ce.target.checked),e(0,p.isSelected=!0,p);else{const _e=ce.target.checked;e(0,p=km(p,_e)),_e===!1&&jt(an,s.bom.isSelected=!1,s),Xo.update(()=>!1),n_(d.groups),Ud((ge=d.groups[h])==null?void 0:ge.groups),e(1,d.groups[h].isHideSubgroupButton=(fe=d.groups[h])==null?void 0:fe.isSelected,d),Bd((ae=d.groups[h])==null?void 0:ae.groups,(ie=d.groups[h])==null?void 0:ie.isSelected),tc(_s(f.bom))}}function W(ce,ge){return o===!0||ge&&(ge.length===1?""+String(ge.length)+gr+r("generic.item"):ge.length>0&&""+String(ge.length)+gr+r("generic.items")),ce}function re(ce){let ge=`selist-${h}-${R}`;document.getElementById(ge).collapsed||ce.stopPropagation()}function G(ce){let ge=_s(d);if(g===Te){const fe=(ge.groups||[]).find(ie=>ie.id===ce.id);let ae=[];ae=Ao(fe,ae),Bn(Nn.VIEW_ITEM_LIST,ae,"","remove_from_list",!1,"list",!0),ge.group=ge.groups.splice(ge.groups.findIndex(ie=>ie.id===ce.id),1)}else ge=Fw(ge,_a,ce.id,g);il(d,ge,f,r("bom_manager.group_deleted"),r("bom_manager.group_deleting_error"),i)}function F(ce){C=ce,e(18,C)}function X(ce){p=ce,e(0,p)}const le=ce=>{ne(ce)},ue=ce=>{Z(p.id),re(ce,p.id)},ee=ce=>{H(p.name.trim()),re(ce,p.id)},$=()=>{G(p)};function he(ce){z=ce,e(14,z)}const me=()=>{V()},te=()=>{E(p.id,p.name.trim(),z.trim())};function oe(ce){p=ce,e(0,p)}return t.$$set=ce=>{"bomData"in ce&&e(1,d=ce.bomData),"projectData"in ce&&e(2,f=ce.projectData),"group"in ce&&e(0,p=ce.group),"parentGroup"in ce&&e(34,m=ce.parentGroup),"parentId"in ce&&e(35,g=ce.parentId),"index"in ce&&e(3,h=ce.index),"type"in ce&&e(4,_=ce.type),"apigeeToken"in ce&&e(5,b=ce.apigeeToken),"language"in ce&&e(6,y=ce.language),"country"in ce&&e(7,k=ce.country),"groupIndent"in ce&&e(8,T=ce.groupIndent),"subGroupIndent"in ce&&e(9,R=ce.subGroupIndent),"groupHeaderFontSize"in ce&&e(10,O=ce.groupHeaderFontSize),"subGroupHeaderFontSize"in ce&&e(11,j=ce.subGroupHeaderFontSize),"projectId"in ce&&e(12,q=ce.projectId)},t.$$.update=()=>{t.$$.dirty[0]&1|t.$$.dirty[1]&8&&m!==null&&m.isSelected&&(p==null?void 0:p.isSelected)===!1&&e(34,m.isSelected=!1,m)},[p,d,f,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,N,r,l,a,c,u,E,H,Z,V,ne,W,re,G,m,g,F,X,le,ue,ee,$,he,me,te,oe]}class i6 extends Ot{constructor(n){super(),At(this,n,GG,xG,It,{bomData:1,projectData:2,group:0,parentGroup:34,parentId:35,index:3,type:4,apigeeToken:5,language:6,country:7,groupIndent:8,subGroupIndent:9,groupHeaderFontSize:10,subGroupHeaderFontSize:11,projectId:12},BG,[-1,-1])}}const Gne="";function HG(t){Ut(t,"svelte-1m4113m","@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.no-data.svelte-1m4113m{text-align:center;vertical-align:middle;font-size:14px;background-color:var(--se-white, #ffffff);padding:16px}.separator-div.svelte-1m4113m{height:4px}")}function r6(t,n,e){const i=t.slice();return i[11]=n[e],i[13]=e,i}function WG(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_=t[8]("list_manager.do_not_have_product_message")+"",b,y,k,T,R=t[8]("list_manager.add_products_section")+"",O;return{c(){n=A("se-table-group"),e=A("se-table-item"),e.textContent="?",i=Y(),r=A("se-table-item"),r.textContent="?",o=Y(),s=A("se-table-item"),s.textContent="?",l=Y(),a=A("se-table-item"),a.textContent="?",c=Y(),u=A("se-table-item"),u.textContent="?",d=Y(),f=A("se-table-item"),f.textContent="?",p=Y(),m=A("div"),g=A("div"),h=A("p"),b=de(_),y=Y(),k=A("br"),T=Y(),O=de(R),x(g,"class","no-data svelte-1m4113m"),x(m,"slot","detail")},m(j,q){J(j,n,q),v(n,e),v(n,i),v(n,r),v(n,o),v(n,s),v(n,l),v(n,a),v(n,c),v(n,u),v(n,d),v(n,f),v(n,p),v(n,m),v(m,g),v(g,h),v(h,b),v(h,y),v(h,k),v(h,T),v(h,O)},p(j,q){q&256&&_!==(_=j[8]("list_manager.do_not_have_product_message")+"")&&be(b,_),q&256&&R!==(R=j[8]("list_manager.add_products_section")+"")&&be(O,R)},i:et,o:et,d(j){j&&K(n)}}}function VG(t){let n,e,i,r;const o=[ZG,YG],s=[];function l(a,c){return a[0].groups&&a[0].groups.length>0?0:1}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,c){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function YG(t){let n,e,i,r;const o=[KG,XG],s=[];function l(a,c){var u;return((u=a[0].parts)==null?void 0:u.length)>0?0:1}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,c){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function ZG(t){let n,e,i,r=t[0].parts&&t[0].parts.length>0&&s6(t),o=Dt(t[0].groups),s=[];for(let a=0;ase(s[a],1,1,()=>{s[a]=null});return{c(){r&&r.c(),n=Y();for(let a=0;a0?r?(r.p(a,c),c&1&&Q(r,1)):(r=s6(a),r.c(),Q(r,1),r.m(n.parentNode,n)):r&&(Je(),se(r,1,1,()=>{r=null}),Qe()),c&1119){o=Dt(a[0].groups);let u;for(u=0;u{a[p]=null}),Qe()),~i?(r=a[i],r?r.p(u,d):(r=a[i]=l[i](u),r.c()),Q(r,1),r.m(o.parentNode,o)):r=null)},i(u){s||(Q(n.$$.fragment,u),Q(r),s=!0)},o(u){se(n.$$.fragment,u),se(r),s=!1},d(u){u&&(K(e),K(o)),qe(n,u),~i&&a[i].d(u)}}}function QG(t,n,e){let i,r,o;ye(t,Ki,m=>e(7,i=m)),ye(t,Vt,m=>e(8,r=m)),ye(t,hn,m=>e(9,o=m));let{bomData:s}=n,{projectData:l}=n,{apigeeToken:a}=n,{language:c}=n,{country:u}=n,{newGroupName:d}=n,{projectId:f}=n,p=iv;return t.$$set=m=>{"bomData"in m&&e(0,s=m.bomData),"projectData"in m&&e(1,l=m.projectData),"apigeeToken"in m&&e(2,a=m.apigeeToken),"language"in m&&e(3,c=m.language),"country"in m&&e(4,u=m.country),"newGroupName"in m&&e(5,d=m.newGroupName),"projectId"in m&&e(6,f=m.projectId)},[s,l,a,c,u,d,f,i,r,o,p]}class $G extends Ot{constructor(n){super(),At(this,n,QG,JG,It,{bomData:0,projectData:1,apigeeToken:2,language:3,country:4,newGroupName:5,projectId:6},HG)}}const Hne="",{window:eH}=uo;function tH(t){Ut(t,"svelte-17bcf7v",".pw.disabled.svelte-17bcf7v{pointer-events:none;opacity:0.5}.pw.align-right.svelte-17bcf7v{margin-left:auto}.pw.align-left.svelte-17bcf7v{margin-right:auto}.pw.display-flex.svelte-17bcf7v{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-17bcf7v{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-17bcf7v{font-size:16px}.pw.small-font.svelte-17bcf7v{font-size:14px}.pw.nano-font.svelte-17bcf7v{font-size:12px}.pw.pointer.svelte-17bcf7v{cursor:pointer}.pw-snackbar-elem.svelte-17bcf7v{top:30px}.pw.red-color.svelte-17bcf7v{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-17bcf7v{display:none}.pw.width-100.svelte-17bcf7v{width:100%}.pw.bold-font.svelte-17bcf7v{font-weight:bold}.pw.normal-font.svelte-17bcf7v{font-weight:normal;font-size:16px}.pw.error-msg.svelte-17bcf7v{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-17bcf7v{text-align:center}.pw.center-align-items.svelte-17bcf7v{align-items:center}.pw.justify-content-center.svelte-17bcf7v{justify-content:center}.pw.bom-checkbox.svelte-17bcf7v{max-width:16px}.pw.ml-8.svelte-17bcf7v{margin-left:8px}.pw.ml-12.svelte-17bcf7v{margin-left:12px}.pw.ml-36.svelte-17bcf7v{margin-left:36px}.pw.mt-8.svelte-17bcf7v{margin-top:8px}.pw.mt-6.svelte-17bcf7v{margin-top:6px}.pw.mt-32.svelte-17bcf7v{margin-top:32px}.pw.mb-8.svelte-17bcf7v{margin-bottom:8px}.pw.mb-12.svelte-17bcf7v{margin-bottom:12px}.pw.mb-16.svelte-17bcf7v{margin-top:16px}.pw.mb-21.svelte-17bcf7v{margin-bottom:21px}.pw.mr-12.svelte-17bcf7v{margin-right:12px}.pw.p-12.svelte-17bcf7v{padding:12px}.pw.pl-16.svelte-17bcf7v{padding-left:16px}.pw.pr-16.svelte-17bcf7v{padding-right:16px}.position-absolute.svelte-17bcf7v{position:absolute}.flex-wrap.svelte-17bcf7v{flex-wrap:wrap}.justify-content-sp-btw.svelte-17bcf7v{justify-content:space-between}.gp-10.svelte-17bcf7v{gap:10px}.gp-5.svelte-17bcf7v{gap:5px}.desktop-view.svelte-17bcf7v{display:none}.mobile-view.svelte-17bcf7v{display:block}.mobile-view-flx.svelte-17bcf7v{display:flex;flex-direction:column}.rounded-border.svelte-17bcf7v{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-17bcf7v{text-align:right}.bg-color-light-grey.svelte-17bcf7v{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-17bcf7v{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-17bcf7v{padding:8px 0 16px 8px}@media(min-width: 968px){.mobile-view.svelte-17bcf7v,.mobile-view-flx.svelte-17bcf7v{display:none}.desktop-view.svelte-17bcf7v{display:inherit}}.cart-mobile-snackbar.svelte-17bcf7v{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-17bcf7v,.mobile-view-snackbar.svelte-17bcf7v{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-17bcf7v{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-17bcf7v{display:block}.mobile-snackbar.svelte-17bcf7v{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-17bcf7v{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-17bcf7v{margin:-6px}.bottom-snackbar.svelte-17bcf7v{bottom:30px;top:auto}.table-header.svelte-17bcf7v{background-color:var(--se-light-grey, #cbcbcb);position:sticky;top:0%}.header-item.svelte-17bcf7v:not(:last-of-type){font-weight:bolder;margin:auto}.header-item.svelte-17bcf7v:nth-of-type(2){margin:0 0 0 10px}.header-item.svelte-17bcf7v:last-of-type{font-weight:bolder}.bom-table-body.svelte-17bcf7v{overflow-y:auto;scroll-behavior:smooth}.header-item-check.svelte-17bcf7v{font-weight:bolder;height:52px;--se-table-item-padding:16px}.table-container.svelte-17bcf7v{margin-top:4px}.remove-left-border.svelte-17bcf7v{border-left:unset}.sub-total-block.svelte-17bcf7v{width:100%}.quantity-header.svelte-17bcf7v{padding:10px 16px;font-weight:bolder}.subtotal-header.svelte-17bcf7v{padding:10px 16px 10px 12px;font-weight:bolder}.group-items-header.svelte-17bcf7v{padding:10px 0 10px 12px;font-weight:bolder}.actions-header.svelte-17bcf7v{padding:10px 0;font-weight:bolder}")}function a6(t){let n,e,i,r;function o(a){t[15](a)}function s(a){t[16](a)}let l={projectData:t[1],bomData:t[1].bom,successMsg:t[9]("bom_manager.product_moved_successfully"),errorMsg:t[9]("bom_manager.error_in_moving_product"),confirmTxt:t[9]("list_manager.move_selected_product"),confirmLbl:t[9]("generic.move"),cancelLbl:t[9]("generic.cancel"),popupName:To};return t[8]!==void 0&&(l.isPopupOpen=t[8]),t[0]!==void 0&&(l.groupData=t[0]),n=new ha({props:l}),_t.push(()=>Ct(n,"isPopupOpen",o)),_t.push(()=>Ct(n,"groupData",s)),{c(){De(n.$$.fragment)},m(a,c){Me(n,a,c),r=!0},p(a,c){const u={};c&2&&(u.projectData=a[1]),c&2&&(u.bomData=a[1].bom),c&512&&(u.successMsg=a[9]("bom_manager.product_moved_successfully")),c&512&&(u.errorMsg=a[9]("bom_manager.error_in_moving_product")),c&512&&(u.confirmTxt=a[9]("list_manager.move_selected_product")),c&512&&(u.confirmLbl=a[9]("generic.move")),c&512&&(u.cancelLbl=a[9]("generic.cancel")),!e&&c&256&&(e=!0,u.isPopupOpen=a[8],Tt(()=>e=!1)),!i&&c&1&&(i=!0,u.groupData=a[0],Tt(()=>i=!1)),n.$set(u)},i(a){r||(Q(n.$$.fragment,a),r=!0)},o(a){se(n.$$.fragment,a),r=!1},d(a){qe(n,a)}}}function l6(t){let n,e,i,r,o,s=t[9]("bom_manager.group_items")+"",l,a,c,u=t[9]("bom_manager.quantity")+"",d,f,p,m,g,h=t[9]("generic.actions")+"",_,b,y,k,T,R=t[11]===qn&&c6(t),O=(t[12][bi]===Ae.SHOW||t[12][bi]===Ae.DISABLED)&&u6(t);return k=new $G({props:{projectData:t[1],bomData:t[0],apigeeToken:t[3],language:t[4],country:t[5],newGroupName:t[6],projectId:t[7]}}),{c(){n=A("se-block"),e=A("se-table"),i=A("se-table-group-header"),R&&R.c(),r=Y(),o=A("se-table-item-header"),l=de(s),a=Y(),c=A("se-table-item-header"),d=de(u),f=Y(),O&&O.c(),p=Y(),m=A("se-table-item-header"),g=A("div"),_=de(h),y=Y(),De(k.$$.fragment),w(o,"class",Nt("group-items-header pw small-font remove-left-border")+" svelte-17bcf7v"),w(o,"flex","2"),w(o,"id","group-heading-lbl"),w(o,"data-testid","sp-group"),w(c,"class",Nt("quantity-header pw small-font remove-left-border")+" svelte-17bcf7v"),w(c,"flex","1"),w(c,"width","288px"),w(c,"id","qty-heading"),x(g,"class","pw align-center svelte-17bcf7v"),w(m,"class",Nt("actions-header pw small-font actions-heading remove-left-border")+" svelte-17bcf7v"),w(m,"width",b=t[11]===qn?"186px":"90px"),w(i,"class","table-header svelte-17bcf7v"),w(e,"class","bom-table-body svelte-17bcf7v"),w(e,"id","bom-table-body"),w(e,"compact","true"),w(n,"class","table-container svelte-17bcf7v")},m(j,q){J(j,n,q),v(n,e),v(e,i),R&&R.m(i,null),v(i,r),v(i,o),v(o,l),v(i,a),v(i,c),v(c,d),v(i,f),O&&O.m(i,null),v(i,p),v(i,m),v(m,g),v(g,_),v(e,y),Me(k,e,null),t[18](e),T=!0},p(j,q){j[11]===qn?R?(R.p(j,q),q&2048&&Q(R,1)):(R=c6(j),R.c(),Q(R,1),R.m(i,r)):R&&(Je(),se(R,1,1,()=>{R=null}),Qe()),(!T||q&512)&&s!==(s=j[9]("bom_manager.group_items")+"")&&be(l,s),(!T||q&512)&&u!==(u=j[9]("bom_manager.quantity")+"")&&be(d,u),j[12][bi]===Ae.SHOW||j[12][bi]===Ae.DISABLED?O?O.p(j,q):(O=u6(j),O.c(),O.m(i,p)):O&&(O.d(1),O=null),(!T||q&512)&&h!==(h=j[9]("generic.actions")+"")&&be(_,h),(!T||q&2048&&b!==(b=j[11]===qn?"186px":"90px"))&&w(m,"width",b);const M={};q&2&&(M.projectData=j[1]),q&1&&(M.bomData=j[0]),q&8&&(M.apigeeToken=j[3]),q&16&&(M.language=j[4]),q&32&&(M.country=j[5]),q&64&&(M.newGroupName=j[6]),q&128&&(M.projectId=j[7]),k.$set(M)},i(j){T||(Q(R),Q(k.$$.fragment,j),T=!0)},o(j){se(R),se(k.$$.fragment,j),T=!1},d(j){j&&K(n),R&&R.d(),O&&O.d(),qe(k),t[18](null)}}}function c6(t){var o,s;let n,e,i,r;return e=new pa({props:{id:"chk-toggle",disabled:((o=t[0])==null?void 0:o.isDisabled)||t[12][jh]===Ae.DISABLED,checked:(s=t[0])==null?void 0:s.isSelected,boxSize:"small",className:"pw bom-checkbox"}}),e.$on("clickCheckBox",t[17]),{c(){var l;n=A("se-table-item-header"),De(e.$$.fragment),w(n,"width","52px"),w(n,"class",i="header-item-check pw small-font "+((l=t[1])!=null&&l.isArchived?"pw disabled":"")+" svelte-17bcf7v")},m(l,a){J(l,n,a),Me(e,n,null),r=!0},p(l,a){var u,d,f;const c={};a&4097&&(c.disabled=((u=l[0])==null?void 0:u.isDisabled)||l[12][jh]===Ae.DISABLED),a&1&&(c.checked=(d=l[0])==null?void 0:d.isSelected),e.$set(c),(!r||a&2&&i!==(i="header-item-check pw small-font "+((f=l[1])!=null&&f.isArchived?"pw disabled":"")+" svelte-17bcf7v"))&&w(n,"class",i)},i(l){r||(Q(e.$$.fragment,l),r=!0)},o(l){se(e.$$.fragment,l),r=!1},d(l){l&&K(n),qe(e)}}}function u6(t){let n,e,i=t[9]("bom_manager.list_price")+"",r,o;return{c(){n=A("se-table-item-header"),e=A("div"),r=de(i),x(e,"class","pw sub-total-block svelte-17bcf7v"),x(e,"id","subtotal-heading-lbl"),w(n,"class",Nt("subtotal-header pw small-font remove-left-border")+" svelte-17bcf7v"),w(n,"flex","1"),w(n,"width",o=t[11]===qn?"224px":"186px"),w(n,"id","price-heading-lbl")},m(s,l){J(s,n,l),v(n,e),v(e,r)},p(s,l){l&512&&i!==(i=s[9]("bom_manager.list_price")+"")&&be(r,i),l&2048&&o!==(o=s[11]===qn?"224px":"186px")&&w(n,"width",o)},d(s){s&&K(n)}}}function nH(t){let n,e,i,r,o,s,l,a=t[8]&&a6(t),c=t[0]&&l6(t);return{c(){a&&a.c(),n=Y(),e=A("se-loading"),i=Y(),c&&c.c(),r=wt(),w(e,"loading",t[10]),w(e,"full-page","true"),w(e,"overlay","true")},m(u,d){a&&a.m(u,d),J(u,n,d),J(u,e,d),J(u,i,d),c&&c.m(u,d),J(u,r,d),o=!0,s||(l=xe(eH,"CONFIGURATOR_ADD_TO_BOM",t[14]),s=!0)},p(u,[d]){u[8]?a?(a.p(u,d),d&256&&Q(a,1)):(a=a6(u),a.c(),Q(a,1),a.m(n.parentNode,n)):a&&(Je(),se(a,1,1,()=>{a=null}),Qe()),(!o||d&1024)&&w(e,"loading",u[10]),u[0]?c?(c.p(u,d),d&1&&Q(c,1)):(c=l6(u),c.c(),Q(c,1),c.m(r.parentNode,r)):c&&(Je(),se(c,1,1,()=>{c=null}),Qe())},i(u){o||(Q(a),Q(c),o=!0)},o(u){se(a),se(c),o=!1},d(u){u&&(K(n),K(e),K(i),K(r)),a&&a.d(u),c&&c.d(u),s=!1,l()}}}function iH(t,n,e){let i,r,o,s,l,a,c,u;ye(t,an,P=>e(20,i=P)),ye(t,ti,P=>e(21,r=P)),ye(t,Vt,P=>e(9,o=P)),ye(t,uh,P=>e(22,s=P)),ye(t,is,P=>e(23,l=P)),ye(t,hn,P=>e(10,a=P)),ye(t,Ki,P=>e(11,c=P)),ye(t,Ii,P=>e(12,u=P));let{bomData:d}=n,{projectData:f}=n,{apigeeToken:p}=n,{language:m}=n,{country:g}=n,{tableBodyRef:h}=n,{newGroupName:_}=n,{projectId:b}=n,y=!1,k=!1;Un(()=>{window.addEventListener("ADD_TO_PROJECT_BOM",O);const P=document.querySelectorAll(".product-name-link");P==null||P.forEach(L=>{L&&(L!=null&&L.shadowRoot)&&kf(L,` .qds-chevron { display: none !important; } .qds-standalone-link { display: flex; flex-direction: row-reverse; font-size: 16px !important; gap: 10px !important; color: #0075A3 !important; } `)})});function T(P){Xo.update(()=>!1);const L=P.target.checked;R(L),tc(_s(f.bom)),Ud(d.groups),Bd(d.groups,d.isSelected)}function R(P){l?e(8,y=P):(e(1,f.bom=km(f.bom,P),f),an.update(()=>f))}function O(P){var I,N,E,B,U,H,Z,V,ne,W,re,G,F,X,le,ue,ee,$,he,me,te,oe;let L;(I=P==null?void 0:P.detail)!=null&&I.easyData&&(L=P==null?void 0:P.detail.easyData,jt(uh,s=((B=(E=(N=P==null?void 0:P.detail)==null?void 0:N.easyData)==null?void 0:E.bom)==null?void 0:B.documentUrl)||[],s)),ve.info("Easy to OL converted data: "+JSON.stringify(L));let C=JSON.parse(JSON.stringify(f));ve.info("Easy to OL: initial proj data"),ve.info(JSON.stringify(C));let S;S=R_(L,su((U=L==null?void 0:L.bom)==null?void 0:U.products[0].applicationSource)?(Z=(H=L==null?void 0:L.bom)==null?void 0:H.products[0])==null?void 0:Z.applicationSource:(ne=(V=P==null?void 0:P.detail)==null?void 0:V.selection)==null?void 0:ne.brickDetails[0],su((W=L==null?void 0:L.bom)==null?void 0:W.products[0].applicationSource)?Te:((G=(re=P==null?void 0:P.detail)==null?void 0:re.selection)==null?void 0:G.brickDetails[1])??Te,(F=L==null?void 0:L.bom)==null?void 0:F.products[0].name,((le=(X=P.detail)==null?void 0:X.selection)==null?void 0:le.configurationMasterId)??Te),ve.info("Easy to OL: convertedDataObj"),ve.info(JSON.stringify(S)),M_(C,S,su((ue=L==null?void 0:L.bom)==null?void 0:ue.products[0].applicationSource)?($=(ee=L==null?void 0:L.bom)==null?void 0:ee.products[0])==null?void 0:$.applicationSource:((me=(he=P.detail)==null?void 0:he.selection)==null?void 0:me.brickDetails[0])??Te,((oe=(te=P.detail)==null?void 0:te.selection)==null?void 0:oe.configurationMasterId)??Te),j(C)}function j(P){let L=P.id;delete P.id,delete P.federatedId;const C=o("edit_list.list_updated_successfully_message");Vi(P,L,C,r,!1).then(async S=>{var E,B;const I=(E=i==null?void 0:i.ownerInfo)!=null&&E.country?String(i.ownerInfo.country):String(g),N=(B=i==null?void 0:i.ownerInfo)!=null&&B.language?String(i.ownerInfo.language):String(m);if(await ci(L,I,N,p).then(function(U){ve.info(U)}),S.data.id){hn.update(()=>!1),k=!0;let U=new CustomEvent(rg,{detail:k});window.dispatchEvent(U)}}).finally(()=>{ve.info("Project updated with ID: ",L)})}document.addEventListener(Hn.DOWNLOAD_SUCCESSFUL,()=>{T({target:{checked:!1}})}),Kn(()=>{Wn(!1)});function q(P){y=P,e(8,y)}function M(P){d=P,e(0,d)}const z=P=>{T(P==null?void 0:P.detail)};function D(P){_t[P?"unshift":"push"](()=>{h=P,e(2,h)})}return t.$$set=P=>{"bomData"in P&&e(0,d=P.bomData),"projectData"in P&&e(1,f=P.projectData),"apigeeToken"in P&&e(3,p=P.apigeeToken),"language"in P&&e(4,m=P.language),"country"in P&&e(5,g=P.country),"tableBodyRef"in P&&e(2,h=P.tableBodyRef),"newGroupName"in P&&e(6,_=P.newGroupName),"projectId"in P&&e(7,b=P.projectId)},[d,f,h,p,m,g,_,b,y,o,a,c,u,T,O,q,M,z,D]}let f6=class extends Ot{constructor(n){super(),At(this,n,iH,nH,It,{bomData:0,projectData:1,apigeeToken:3,language:4,country:5,tableBodyRef:2,newGroupName:6,projectId:7},tH)}};async function W_(t,n){var e;return((e=t.products)==null?void 0:e.length)>0&&(n.groups?W_(t,n.groups[0]):(n.parts=[],await rH(t,n))),n}async function rH(t,n){var i,r;!(t!=null&&t.configCharacteristicGroup)&&(t!=null&&t.configurationId)&&(t.configCharacteristicGroup=await oH(t==null?void 0:t.configurationId,eL[We.environment].selectAndConfigBearerToken)),sH(t)>-1?(V_(t,n.parts,Ei.CUSTOMIZABLE),n.parts[0].parts=[],a1(t,n.parts[0].parts,Te,Ei.CUSTOMIZABLE,!1)):t!=null&&t.configurationId&&(t==null?void 0:t.configurationId)!==Te?(i=t.extras)!=null&&i.codification&&((r=t.extras)==null?void 0:r.codification)!==Te?(V_(t,n.parts,Ei.CONFIGURABLE),n.parts[0].parts=[],a1(t,n.parts[0].parts,Te,Ei.CONFIGURABLE,!1)):(V_(t,n.parts,Ei.CTO),n.parts[0].parts=[],a1(t,n.parts[0].parts,Te,Ei.CTO,!1)):a1(t,n.parts,Te,Ei.DEFAULT,!1)}function sH(t){return t.products.findIndex(n=>n.TC_ID_CUSTO&&n.TC_ID_CUSTO!==Te)}function V_(t,n,e){var i;n.push({pimString:t==null?void 0:t.pimString,productRef:aH(t,e),quantity:t.quantity,description:Te,price:0,source:fv,selectorId:Te,partType:e,isParent:!0,productId:d6(t.products[0],hA),product:d6(t.products[0],pA),productCode:(i=t.extras)!=null&&i.codification?t.extras.codification:Te,configurationId:t.configurationId?t.configurationId:Te,personalizationId:cH(t.products[0]),secondCharacteristic:p6(t.products[0],fA),firstCharacteristic:p6(t.products[0],dA),extras:t.extras||{},kbId:(t==null?void 0:t.kbId)||(t==null?void 0:t.kbName),configCharacteristicGroup:t==null?void 0:t.configCharacteristicGroup})}async function oH(t,n){const e=await Am(t,n);return A_(e==null?void 0:e.characteristicGroups)}function a1(t,n,e,i,r){var s;const o=i===Ei.CUSTOMIZABLE?(s=t==null?void 0:t.products)==null?void 0:s.filter(l=>!(l!=null&&l.extras)):t==null?void 0:t.products;o==null||o.forEach(function(l,a){const c=uH(l,n);c===-1?n.push({productRef:l.reference?String(l.reference):l.productId?String(l.productId):Te,quantity:l.quantity,description:l.description,price:0,source:fv,pimString:t==null?void 0:t.pimString,productId:Te,selectorId:e,partType:i,isParent:r,personalizationId:a>0&&l.TC_ID_CUSTO?l.TC_ID_CUSTO:Te,configurationId:Te,productCode:Te}):n[c].quantity=n[c].quantity+l.quantity})}function aH(t,n){var e,i,r;if(n===Ei.CUSTOMIZABLE)return(e=t==null?void 0:t.products[0])!=null&&e.extras?lH((i=t==null?void 0:t.products[0])==null?void 0:i.extras):Te;if(n===Ei.CONFIGURABLE||n===Ei.CTO)return(r=t.selector)!=null&&r.dataId&&t.selector.dataId.indexOf(yp)>-1?t.selector.dataId.split(yp)[1]:Te}function lH(t){return`${String(t==null?void 0:t[T1.configuredReference])}#${String(t==null?void 0:t[T1.configuredReference1])}#${String(t==null?void 0:t[T1.configuredReference2])}`}function cH(t){return t.TC_ID_CUSTO?t.TC_ID_CUSTO:Te}function d6(t,n){return t[n]?String(t[n]):Te}function p6(t,n){return t.extras?String(t.extras[n]):Te}function uH(t,n){return n.findIndex(e=>e.productRef===t.reference)}const Wne="",{document:h6}=uo;function fH(t){Ut(t,"svelte-12ttpc",".pw.pointer.svelte-12ttpc{cursor:pointer}.pw.mr-12.svelte-12ttpc{margin-right:12px}h4.heading.svelte-12ttpc{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.configurator-wrapper-small.svelte-12ttpc{width:var(--large-screen-up, 1201px);top:20px;left:50%;transform:translateX(-50%);bottom:20px}.configurator-wrapper-large.svelte-12ttpc{inset:0}.logo.svelte-12ttpc{height:50px}.configurator-wrapper.svelte-12ttpc{flex-direction:column;position:fixed;display:flex;background-color:var(--se-white, #ffffff)}.dialog-head-common.svelte-12ttpc{display:flex;justify-content:space-between;background-color:var(--se-life-green, #3dcd58);align-items:center;color:var(--se-white, #ffffff);padding:0 32px}.content-wrapper-common.svelte-12ttpc{display:flex;flex:1 1 0px;margin:16px}.configurator-content.svelte-12ttpc{width:100%;height:100%}.zoom-in-out.svelte-12ttpc{font-size:32px}.cross-icon.svelte-12ttpc{position:absolute;right:8px;top:8px}.heading.svelte-12ttpc{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px}#configurator-close-confirmation-msg.svelte-12ttpc{font-weight:400;font-size:14px}.dialog-footer-button.svelte-12ttpc{margin-top:12px;margin-left:-4px}.popup-content.svelte-12ttpc{padding:0px 20px;margin-bottom:20px;margin-top:-16px}")}function dH(t){let n,e,i;return{c(){n=A("se-icon"),n.textContent="presentation_mode",w(n,"class","cursor-pointer zoom-in-out svelte-12ttpc"),w(n,"size","large"),w(n,"id","toggle-resize-btn")},m(r,o){J(r,n,o),e||(i=xe(n,"click",t[20]),e=!0)},p:et,d(r){r&&K(n),e=!1,i()}}}function pH(t){let n,e,i;return{c(){n=A("se-icon"),n.textContent="exit_presentation",w(n,"class","cursor-pointer zoom-in-out svelte-12ttpc"),w(n,"size","large")},m(r,o){J(r,n,o),e||(i=xe(n,"click",t[19]),e=!0)},p:et,d(r){r&&K(n),e=!1,i()}}}function hH(t){let n,e,i,r,o,s,l=t[3]("reopenProductSelector.close_selector")+"",a,c,u,d,f,p,m=t[3]("reopenProductSelector.selector_close_confirmation_msg")+"",g,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,I,N,E,B,U,H,Z,V,ne;y=new Gt({props:{dataTestId:"btn-delete-group",id:"apply-close-configurator",importance:"emphasized",buttonText:t[3]("generic.apply")}}),y.$on("btnClick",t[17]),T=new Gt({props:{id:"handle-close-popup",dataTestId:"btn-cancel-delete-group",buttonText:t[3]("generic.cancel")}}),T.$on("btnClick",t[18]);function W(F,X){return F[1]?pH:dH}let re=W(t),G=re(t);return I=new Gt({props:{id:"show-cancel-confirm-dialog",buttonText:"?",buttonSize:"large"}}),I.$on("btnClick",t[21]),{c(){n=A("link"),e=A("script"),r=Y(),o=A("se-dialog"),s=A("h4"),a=de(l),c=Y(),u=A("se-icon"),u.textContent="action_delete_cross",d=Y(),f=A("se-dialog-content"),p=A("span"),g=de(m),h=Y(),_=A("div"),b=A("span"),De(y.$$.fragment),k=Y(),De(T.$$.fragment),R=Y(),O=A("div"),j=A("se-loading"),q=Y(),M=A("div"),z=A("span"),D=A("img"),L=Y(),C=A("span"),G.c(),S=Y(),De(I.$$.fragment),N=Y(),E=A("div"),B=A("div"),x(n,"rel","stylesheet"),x(n,"href",We.externalUrls[2]+"/release/wrapper/2.X/wrapper.min.css"),x(e,"type","text/javascript"),rr(e.src,i=We.externalUrls[2]+"/release/wrapper/2.X/wrapper.js")||x(e,"src",i),x(s,"class","heading svelte-12ttpc"),x(s,"id","popup-header"),w(u,"id","close-popup"),w(u,"class","cross-icon pw pointer svelte-12ttpc"),w(u,"color","standard"),x(p,"id","configurator-close-confirmation-msg"),x(p,"class","svelte-12ttpc"),x(b,"class","pw mr-12 svelte-12ttpc"),x(_,"class","dialog-footer-button svelte-12ttpc"),w(f,"class","popup-content svelte-12ttpc"),w(f,"id","configurator-close-confirmation-msg"),w(o,"id","dialog-close-group"),w(o,"open",t[2]),w(j,"loading",t[4]),x(D,"class","logo svelte-12ttpc"),x(D,"id","side-menu-logo"),x(D,"alt","side menu logo"),rr(D.src,P=zt()?_l.SCHNEIDER_LOGO:`${kl.BASE_URL[t[0]]}/icons/svg/Logo.svg`)||x(D,"src",P),x(C,"class","d-flex align-items-center"),x(M,"class","dialog-head-common svelte-12ttpc"),x(B,"id","widgetFrame"),x(B,"class",U="configurator-content "+(t[1]?"configurator-content-large":"configurator-content-small")+" svelte-12ttpc"),x(E,"id","widget"),x(E,"class","content-wrapper-common svelte-12ttpc"),x(O,"id","configurator-widget-trigger"),x(O,"class",H="configurator-wrapper "+(t[1]?"configurator-wrapper-large":"configurator-wrapper-small")+" svelte-12ttpc")},m(F,X){v(h6.head,n),v(h6.head,e),J(F,r,X),J(F,o,X),v(o,s),v(s,a),v(o,c),v(o,u),v(o,d),v(o,f),v(f,p),v(p,g),v(f,h),v(f,_),v(_,b),Me(y,b,null),v(_,k),Me(T,_,null),J(F,R,X),J(F,O,X),v(O,j),v(O,q),v(O,M),v(M,z),v(z,D),v(M,L),v(M,C),G.m(C,null),v(C,S),Me(I,C,null),v(O,N),v(O,E),v(E,B),Z=!0,V||(ne=[xe(e,"load",t[15]),xe(u,"click",t[16])],V=!0)},p(F,X){(!Z||X[0]&8)&&l!==(l=F[3]("reopenProductSelector.close_selector")+"")&&be(a,l),(!Z||X[0]&8)&&m!==(m=F[3]("reopenProductSelector.selector_close_confirmation_msg")+"")&&be(g,m);const le={};X[0]&8&&(le.buttonText=F[3]("generic.apply")),y.$set(le);const ue={};X[0]&8&&(ue.buttonText=F[3]("generic.cancel")),T.$set(ue),(!Z||X[0]&4)&&w(o,"open",F[2]),(!Z||X[0]&16)&&w(j,"loading",F[4]),(!Z||X[0]&1&&!rr(D.src,P=zt()?_l.SCHNEIDER_LOGO:`${kl.BASE_URL[F[0]]}/icons/svg/Logo.svg`))&&x(D,"src",P),re===(re=W(F))&&G?G.p(F,X):(G.d(1),G=re(F),G&&(G.c(),G.m(C,S))),(!Z||X[0]&2&&U!==(U="configurator-content "+(F[1]?"configurator-content-large":"configurator-content-small")+" svelte-12ttpc"))&&x(B,"class",U),(!Z||X[0]&2&&H!==(H="configurator-wrapper "+(F[1]?"configurator-wrapper-large":"configurator-wrapper-small")+" svelte-12ttpc"))&&x(O,"class",H)},i(F){Z||(Q(y.$$.fragment,F),Q(T.$$.fragment,F),Q(I.$$.fragment,F),Z=!0)},o(F){se(y.$$.fragment,F),se(T.$$.fragment,F),se(I.$$.fragment,F),Z=!1},d(F){F&&(K(r),K(o),K(R),K(O)),K(n),K(e),qe(y),qe(T),G.d(),qe(I),V=!1,An(ne)}}}function mH(t,n,e){let i,r,o,s,l,a,c,u,d,f,p,m;ye(t,es,fe=>e(27,i=fe)),ye(t,ti,fe=>e(28,r=fe)),ye(t,Ki,fe=>e(29,o=fe)),ye(t,Vt,fe=>e(3,s=fe)),ye(t,Zs,fe=>e(30,l=fe)),ye(t,$r,fe=>e(31,a=fe)),ye(t,an,fe=>e(32,c=fe)),ye(t,Jo,fe=>e(33,u=fe)),ye(t,of,fe=>e(34,d=fe)),ye(t,Lg,fe=>e(35,f=fe)),ye(t,Ng,fe=>e(36,p=fe)),ye(t,hn,fe=>e(4,m=fe));let{dialogWrapper:g}=n,{countryentries:h}=n,{apigeeToken:_}=n,{ownerLanguage:b}=n,{ownerCountry:y}=n,{env:k}=n,T={window},R=!1,O=!1,j,q,M={};const z=Mn();async function D(){P(),await L(j)}function P(){var fe,ae,ie,_e,Ie;GM(l.partSubType)?j={value:String((fe=l==null?void 0:l.orderingData)==null?void 0:fe.productCode),type:qf}:u&&u!==Te?j={value:u,type:qf}:p!==Te?j={value:p,type:b1}:(ae=l==null?void 0:l.reloadData)!=null&&ae.reloadConfigurationIdSandC?j={type:E0,value:(ie=l.reloadData)==null?void 0:ie.reloadConfigurationIdSandC}:j=(_e=l==null?void 0:l.parts)!=null&&_e.length?{type:E0,value:(Ie=l.parts[0].reloadData)==null?void 0:Ie.reloadConfigurationIdSandC}:{type:Te,value:Te}}async function L(fe){try{window.seWidgetWrapper?await C(fe):await System.import("sewidgetwrapper").then(ae=>{window.seWidgetWrapper=ae,C(fe)})}catch(ae){ve.error(ae.message)}}async function C(fe){var Le;const ae=wp;let ie=Te;d?ie=s(o===qn?"list.update_to_list":"cart.update_to_cart"):ie=s(o===qn?"bom_manager.add_to_list":"generic.add_to_cart");let _e={enableNameConfiguration:(Le=l==null?void 0:l.extras)!=null&&Le.configurationName?l.extras.configurationName:s("generic.my_selection"),buttons:{saveConfiguration:{title:ie}}},Ie=H();const{countryCode:we,languageCode:pe}=Tm(h);let Se=document.querySelector(th+fe.type+nh);Se&&Se.parentNode.removeChild(Se),f!==""?T=window.seWidgetWrapper.loadConfigModelById(f,Ie,_e):T=window.seWidgetWrapper.startWidget(fe,pe,we,ae,Ie,_e),T.addSaveConfigurationListener(async function(Re){Re.pimString=fe,!d&&u!==Te?I(Re):(await E(Re),of.update(()=>!1)),ve.info("data from s&c",Re)})}function S(){o===qn?M=JSON.parse(JSON.stringify(c)):M=JSON.parse(JSON.stringify(a))}async function I(fe){var Ie,we,pe,Se;let ae=await W_(fe,Hi),ie=Nn.ADD_TO_CART,_e=`cart|uco|${fe.configurationId}|${(Ie=fe.extras)==null?void 0:Ie.codification}`;o===qn&&(_e=`list|${fe.configurationId}|${(we=fe.extras)==null?void 0:we.codification}`,ie=Nn.ADD_TO_LIST),Bn(ie,ae.parts,"","",!1,_e),S(),M.bom||(M.bom={parts:[]}),(Se=(pe=M==null?void 0:M.bom)==null?void 0:pe.parts)==null||Se.unshift(...ae.parts),re()}function N(fe){var ae;return(ae=fe==null?void 0:fe.customization)!=null&&ae.configuredReference?fe.customization.configuredReference:Te}async function E(fe){var Ie,we;let ae=l.partSubType,ie,_e;switch(ae){case Ei.CUSTOMIZABLE:ie=Te,((Ie=fe==null?void 0:fe.products)==null?void 0:Ie.length)>0&&fe.products[0]&&(ie=N(fe.products[0])),await Z(fe,ie!==Te);break;case Ei.CONFIGURABLE:(we=fe.extras)!=null&&we.codification&&fe.extras.codification!==on?U(fe):await Z(fe);break;case Ei.CTO:_e=fe.configurationId,await Z(fe,_e!==Te);break;default:await Z(fe,!0);break}}function B(fe){const ae=fe==null?void 0:fe.match(new RegExp(vp,"g"));let ie=0;const _e=fe.split(Ws),Ie=_e[_e.length-1];return isNaN(parseInt(Ie))||(ie=Number(Ie)),ae[ae.length-1]!==Ws?`${fe}-1`:ae.join("")+(Number(ie)+1)}function U(fe){var ie;l.productCode===((ie=fe.extras)==null?void 0:ie.codification)?le():Z(fe,!0)}function H(){return _u+String(We.externalUrls[3])}async function Z(fe,ae){var we,pe;q=await W_(fe,Hi);let ie=Nn.ADD_TO_CART,_e=`cart|uco|${fe.configurationId}|${(we=fe.extras)==null?void 0:we.codification}`;o===qn&&(_e=`list|${fe.configurationId}|${(pe=fe.extras)==null?void 0:pe.codification}`,ie=Nn.ADD_TO_LIST),Bn(ie,q.parts,"","",!1,_e),S();let Ie=M.bom;Ie!=null&&Ie.parts&&Ie.parts.length>0&&W(Ie,ae),ae||(M.bom=Ie),V(Ie,ae),re()}function V(fe,ae){var ie;(ie=fe==null?void 0:fe.groups)==null||ie.forEach((_e,Ie)=>{var we,pe;_e!=null&&_e.parts&&((we=_e==null?void 0:_e.parts)==null?void 0:we.length)>0&&W(_e,ae,Ie),_e!=null&&_e.groups&&((pe=_e==null?void 0:_e.groups)==null?void 0:pe.length)>0&&V(_e,ae)})}function ne(fe){var ae,ie,_e,Ie,we,pe,Se;if((ie=(ae=M.bom.groups[fe])==null?void 0:ae.groups[0])!=null&&ie.groups){const Le=JSON.parse(JSON.stringify((Ie=(_e=M.bom.groups[fe])==null?void 0:_e.groups[0])==null?void 0:Ie.groups));Le.sort((Ee,ke)=>{const Ce=R0,[,Ne,Pe]=Ee.name.match(Ce)||Li,[,Ve,ot]=ke.name.match(Ce)||Li;return NeVe?1:(parseInt(Pe)||0)-(parseInt(ot)||0)});const Re=Le[Le.length-1];Re.id=Te,Re.name=B(Re.name),Re.parts=q.parts,(Se=(pe=(we=M.bom.groups[fe])==null?void 0:we.groups[0])==null?void 0:pe.groups)==null||Se.push(Re)}}function W(fe,ae,ie){let _e=fe.parts.findIndex(Ie=>(l==null?void 0:l.id)===Ie.id);_e>=0&&(ae?(fe.parts.splice(_e,1),fe.parts.splice(_e,0,...q.parts)):ne(ie))}function re(){hn.update(()=>!0);let fe=M.id;delete M.id,delete M.federatedId;const ae=s("edit_list.list_updated_successfully_message");if(o===qn)Vi(M,fe,ae,r,!1).then(async ie=>{await ci(fe,y,b,_).then(function(){var _e;(_e=ie==null?void 0:ie.data)!=null&&_e.id&&G(!0)}).catch(()=>{G(!0)})}).catch(()=>{G(!1)}).finally(()=>{ve.info("Project updated with ID: ",fe)});else{let ie={bom:M==null?void 0:M.bom,isTransferred:!1};Os(ie,i).then(async _e=>{await ci(fe,y,b,_).then(function(){_e!=null&&_e.error||G(!0)}).catch(()=>{G(!0)})}).catch(()=>{G(!1)}).finally(()=>{ve.info("Project updated with ID: ",fe)})}}function G(fe){hn.update(()=>!1),le(),F(fe)}function F(fe){z("configurableCustomizableProdAdded",{isProductUpdated:fe})}function X(){e(1,R=!R)}function le(){e(1,R=!1),e(10,g=!1),ee(),T&&(T==null||T.destroy()),ho.update(()=>!1),Zs.set({})}function ue(){e(2,O=!0)}function ee(){e(2,O=!1)}Kn(()=>{Wn(!1),Jo.set(Te),Ng.set(Te),Lg.set(Te)});const $=()=>D(),he=()=>{ee()},me=()=>{le()},te=()=>{ee()},oe=()=>X(),ce=()=>X(),ge=()=>{ue()};return t.$$set=fe=>{"dialogWrapper"in fe&&e(10,g=fe.dialogWrapper),"countryentries"in fe&&e(11,h=fe.countryentries),"apigeeToken"in fe&&e(12,_=fe.apigeeToken),"ownerLanguage"in fe&&e(13,b=fe.ownerLanguage),"ownerCountry"in fe&&e(14,y=fe.ownerCountry),"env"in fe&&e(0,k=fe.env)},[k,R,O,s,m,D,X,le,ue,ee,g,h,_,b,y,$,he,me,te,oe,ce,ge]}class Y_ extends Ot{constructor(n){super(),At(this,n,mH,hH,It,{dialogWrapper:10,countryentries:11,apigeeToken:12,ownerLanguage:13,ownerCountry:14,env:0},fH,[-1,-1])}}const Vne="";function gH(t){Ut(t,"svelte-1rcb144",".display-flex.svelte-1rcb144.svelte-1rcb144{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.small-font.svelte-1rcb144.svelte-1rcb144{font-size:14px}.pw.pointer.svelte-1rcb144.svelte-1rcb144{cursor:pointer}.pw-snackbar-elem.svelte-1rcb144.svelte-1rcb144{top:30px}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.mobile-config-container.svelte-1rcb144 .product-name.svelte-1rcb144{font-size:18px;font-weight:700}.mobile-config-container.svelte-1rcb144 .product-price.svelte-1rcb144{font-size:18px;margin-top:5px;font-weight:bolder;padding-bottom:10px}.mobile-config-container.svelte-1rcb144 .action-buttons-container.svelte-1rcb144{padding-top:10px;margin-bottom:0.5rem;gap:1rem}.mobile-config-container.svelte-1rcb144 .se-line.svelte-1rcb144{padding:12px 0}.mobile-config-container.svelte-1rcb144 .product-child-container.svelte-1rcb144{display:flex;gap:10px;padding:10px 0}.mobile-config-container.svelte-1rcb144 .description-txt.svelte-1rcb144{word-break:break-word;white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;line-clamp:2;color:var(--se-black, #626469);font-size:14px}.mobile-config-container.svelte-1rcb144 .product-image.svelte-1rcb144{width:68px;height:68px;background-color:var(--se-black, rgba(0, 0, 0, 0.0509803922))}.mobile-config-container.svelte-1rcb144 .child-detail-section.svelte-1rcb144{display:flex;gap:5px;flex-direction:column}.cto-details.svelte-1rcb144.svelte-1rcb144{flex-direction:column;padding:12px 0;gap:6px p;gap-font-size:14px}.top-content.svelte-1rcb144.svelte-1rcb144{justify-content:space-between}.show-bottom.svelte-1rcb144.svelte-1rcb144{bottom:30px;top:auto}.mobile-config-container.svelte-1rcb144 .top-content.svelte-1rcb144{display:flex}.mobile-config-container.svelte-1rcb144 .top-content .config-title.svelte-1rcb144{flex:1}.mobile-config-container.svelte-1rcb144 .top-content .action-cta.svelte-1rcb144{width:60px;display:flex;justify-content:space-around;align-items:center}")}function m6(t,n,e){const i=t.slice();return i[38]=n[e],i}function g6(t){let n,e;return{c(){var i;n=A("se-loading"),w(n,"loading",e=(i=t[1])==null?void 0:i.isLoading),w(n,"overlay","true"),w(n,"full-page","true")},m(i,r){J(i,n,r)},p(i,r){var o;r[0]&2&&e!==(e=(o=i[1])==null?void 0:o.isLoading)&&w(n,"loading",e)},d(i){i&&K(n)}}}function _H(t){let n,e=t[11]("product.gcr_code")+"",i,r,o=t[20].gcrCode+"",s;return{c(){n=A("p"),i=de(e),r=de(": "),s=de(o)},m(l,a){J(l,n,a),v(n,i),v(n,r),v(n,s)},p(l,a){a[0]&2048&&e!==(e=l[11]("product.gcr_code")+"")&&be(i,e)},d(l){l&&K(n)}}}function bH(t){let n,e=t[11]("product.config")+"",i,r,o=t[20].configId+"",s;return{c(){n=A("p"),i=de(e),r=de(": "),s=de(o),x(n,"class","config-id")},m(l,a){J(l,n,a),v(n,i),v(n,r),v(n,s)},p(l,a){a[0]&2048&&e!==(e=l[11]("product.config")+"")&&be(i,e)},d(l){l&&K(n)}}}function vH(t){let n,e=t[11]("product.product_code")+"",i,r,o,s=t[20].productCode+"",l,a;return{c(){n=A("p"),i=de(e),r=de(`: `),o=A("span"),l=de(s),x(o,"id",a="product-config-id-"+t[1].serialNum)},m(c,u){J(c,n,u),v(n,i),v(n,r),v(n,o),v(o,l)},p(c,u){u[0]&2048&&e!==(e=c[11]("product.product_code")+"")&&be(i,e),u[0]&2&&a!==(a="product-config-id-"+c[1].serialNum)&&x(o,"id",a)},d(c){c&&K(n)}}}function _6(t){let n;function e(o,s){return o[13]?yH:wH}let i=e(t),r=i(t);return{c(){r.c(),n=wt()},m(o,s){r.m(o,s),J(o,n,s)},p(o,s){i===(i=e(o))&&r?r.p(o,s):(r.d(1),r=i(o),r&&(r.c(),r.m(n.parentNode,n)))},d(o){o&&K(n),r.d(o)}}}function wH(t){let n,e;return{c(){n=A("div"),e=de(t[2]),x(n,"class","product-price svelte-1rcb144")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r[0]&4&&be(e,i[2])},d(i){i&&K(n)}}}function yH(t){let n;return{c(){n=A("se-skeleton"),w(n,"width","150px"),w(n,"height","28px"),w(n,"count","1")},m(e,i){J(e,n,i)},p:et,d(e){e&&K(n)}}}function b6(t){let n,e=Dt(t[1].parts),i=[];for(let r=0;rCt(n,"isPopupOpen",r)),n.$on("close",t[31]),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&24&&(a.projectData={...s[3],bom:{parts:s[4]}}),l[0]&2048&&(a.successMsg=s[11]("bom_manager.product_deleted")),l[0]&2048&&(a.errorMsg=s[11]("bom_manager.error_in_deleting_product")),l[0]&2048&&(a.confirmTxt=s[11]("list_manager.remove_selected_produts_message")),l[0]&2048&&(a.confirmLbl=s[11]("generic.delete")),l[0]&2048&&(a.cancelLbl=s[11]("generic.cancel")),!e&&l[0]&32&&(e=!0,a.isPopupOpen=s[5],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function k6(t){let n,e,i;return e=new Y_({props:{apigeeToken:We.apigeeToken,ownerLanguage:t[19],ownerCountry:t[18],dialogWrapper:l1,countryentries:t[16],env:We.environment}}),{c(){n=A("se-dialog"),De(e.$$.fragment),w(n,"pagescroll","true"),w(n,"can-backdrop","false"),w(n,"size","xlarge"),w(n,"open",l1)},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&65536&&(s.countryentries=r[16]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function S6(t){let n,e;return n=new Pf({props:{isPopupOpen:t[6],confirmTxt:t[11]("cart.remove_selected_product_message"),confirmLbl:t[11]("generic.delete"),cancelLbl:t[11]("generic.cancel")}}),n.$on("close",t[32]),n.$on("confirmAction",t[33]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&64&&(o.isPopupOpen=i[6]),r[0]&2048&&(o.confirmTxt=i[11]("cart.remove_selected_product_message")),r[0]&2048&&(o.confirmLbl=i[11]("generic.delete")),r[0]&2048&&(o.cancelLbl=i[11]("generic.cancel")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function T6(t){let n,e,i;return{c(){n=A("se-snackbar"),w(n,"open",t[7]),w(n,"message",t[8]),w(n,"type",t[9]),w(n,"class","pw-snackbar-elem show-bottom svelte-1rcb144"),w(n,"icon","notification_ok_wired"),w(n,"duration",Cs),w(n,"id","snackbar-list-config")},m(r,o){J(r,n,o),e||(i=xe(n,"didClose",t[34]),e=!0)},p(r,o){o[0]&128&&w(n,"open",r[7]),o[0]&256&&w(n,"message",r[8]),o[0]&512&&w(n,"type",r[9])},d(r){r&&K(n),e=!1,i()}}}function kH(t){var fe,ae,ie,_e,Ie,we,pe,Se,Le;let n,e,i,r,o,s,l,a=t[11]("product.config_Id")+"",c,u,d,f=(((fe=t[1])==null?void 0:fe.configurationId)||((ie=(ae=t[1])==null?void 0:ae.orderingData)==null?void 0:ie.orderingId)||Te)+"",p,m,g,h,_,b,y,k,T,R,O,j=(String((_e=t[1])==null?void 0:_e.description).toUpperCase()||"")+"",q,M,z,D,P,L,C,S,I,N,E,B,U,H,Z,V,ne,W,re,G,F,X,le=((Ie=t[1])==null?void 0:Ie.isLoading)&&g6(t);h=new Ni({props:{iconClassName:"trash-can",buttonSize:"medium",className:"primary icon pw pointer"}}),h.$on("btnClick",t[25]);let ue=((we=t[20])==null?void 0:we.gcrCode)&&_H(t),ee=((pe=t[20])==null?void 0:pe.configId)&&bH(t),$=((Se=t[20])==null?void 0:Se.productCode)&&vH(t),he=(t[12][bi]===Ae.SHOW||t[12][bi]===Ae.DISABLED)&&_6(t);C=new o1({props:{product:t[1],updateQuantity:t[27]}}),E=new Ni({props:{iconClassName:"pages-double",buttonText:t[11]("product.Copy_ID"),buttonSize:"small",id:"ic-hide-children",className:"large-spacing"}}),E.$on("btnClick",t[28]);let me=((Le=t[1])==null?void 0:Le.parts)&&b6(t),te=t[5]&&y6(t),oe=t[15]&&l1&&k6(t),ce=t[10]===Vn&&t[6]&&S6(t),ge=t[7]&&T6(t);return{c(){n=A("se-dialog"),le&&le.c(),e=Y(),i=A("se-dialog-content"),r=A("div"),o=A("div"),s=A("div"),l=A("div"),c=de(a),u=Y(),d=A("div"),p=de(f),m=Y(),g=A("div"),De(h.$$.fragment),_=Y(),b=A("qds-button"),y=Y(),k=A("se-divider"),T=Y(),R=A("div"),O=A("p"),q=de(j),M=Y(),ue&&ue.c(),z=Y(),ee&&ee.c(),D=Y(),$&&$.c(),P=Y(),he&&he.c(),L=Y(),De(C.$$.fragment),S=Y(),I=A("div"),N=A("div"),De(E.$$.fragment),B=Y(),U=A("se-divider"),H=Y(),me&&me.c(),Z=Y(),te&&te.c(),V=Y(),oe&&oe.c(),ne=Y(),ce&&ce.c(),W=Y(),ge&&ge.c(),re=wt(),x(l,"class","product-name svelte-1rcb144"),x(d,"class","pw small-font svelte-1rcb144"),x(d,"id","product-config-id"),x(s,"class","config-title svelte-1rcb144"),w(b,"importance","subdued"),w(b,"icon-name","cross-circle"),w(b,"class","pw pointer svelte-1rcb144"),w(b,"id","close-popup-config"),x(g,"class","action-cta svelte-1rcb144"),x(o,"class","display-flex top-content svelte-1rcb144"),x(O,"class","cto-description"),x(R,"class","display-flex cto-details svelte-1rcb144"),x(I,"class","display-flex action-buttons-container svelte-1rcb144"),w(U,"class","se-line svelte-1rcb144"),x(r,"class","mobile-config-container svelte-1rcb144"),w(i,"class","popup-content"),w(n,"id","dialog-confirm"),w(n,"open",t[0]),w(n,"can-backdrop","false"),w(n,"size","fill")},m(Re,Ee){J(Re,n,Ee),le&&le.m(n,null),v(n,e),v(n,i),v(i,r),v(r,o),v(o,s),v(s,l),v(l,c),v(s,u),v(s,d),v(d,p),v(o,m),v(o,g),Me(h,g,null),v(g,_),v(g,b),v(r,y),v(r,k),v(r,T),v(r,R),v(R,O),v(O,q),v(R,M),ue&&ue.m(R,null),v(R,z),ee&&ee.m(R,null),v(R,D),$&&$.m(R,null),v(r,P),he&&he.m(r,null),v(r,L),Me(C,r,null),v(r,S),v(r,I),v(I,N),Me(E,N,null),v(r,B),v(r,U),v(r,H),me&&me.m(r,null),J(Re,Z,Ee),te&&te.m(Re,Ee),J(Re,V,Ee),oe&&oe.m(Re,Ee),J(Re,ne,Ee),ce&&ce.m(Re,Ee),J(Re,W,Ee),ge&&ge.m(Re,Ee),J(Re,re,Ee),G=!0,F||(X=xe(b,"click",t[26]),F=!0)},p(Re,Ee){var Ne,Pe,Ve,ot,gt,He,Be,Ye,Ue;(Ne=Re[1])!=null&&Ne.isLoading?le?le.p(Re,Ee):(le=g6(Re),le.c(),le.m(n,e)):le&&(le.d(1),le=null),(!G||Ee[0]&2048)&&a!==(a=Re[11]("product.config_Id")+"")&&be(c,a),(!G||Ee[0]&2)&&f!==(f=(((Pe=Re[1])==null?void 0:Pe.configurationId)||((ot=(Ve=Re[1])==null?void 0:Ve.orderingData)==null?void 0:ot.orderingId)||Te)+"")&&be(p,f),(!G||Ee[0]&2)&&j!==(j=(String((gt=Re[1])==null?void 0:gt.description).toUpperCase()||"")+"")&&be(q,j),(He=Re[20])!=null&&He.gcrCode&&ue.p(Re,Ee),(Be=Re[20])!=null&&Be.configId&&ee.p(Re,Ee),(Ye=Re[20])!=null&&Ye.productCode&&$.p(Re,Ee),Re[12][bi]===Ae.SHOW||Re[12][bi]===Ae.DISABLED?he?he.p(Re,Ee):(he=_6(Re),he.c(),he.m(r,L)):he&&(he.d(1),he=null);const ke={};Ee[0]&2&&(ke.product=Re[1]),C.$set(ke);const Ce={};Ee[0]&2048&&(Ce.buttonText=Re[11]("product.Copy_ID")),E.$set(Ce),(Ue=Re[1])!=null&&Ue.parts?me?me.p(Re,Ee):(me=b6(Re),me.c(),me.m(r,null)):me&&(me.d(1),me=null),(!G||Ee[0]&1)&&w(n,"open",Re[0]),Re[5]?te?(te.p(Re,Ee),Ee[0]&32&&Q(te,1)):(te=y6(Re),te.c(),Q(te,1),te.m(V.parentNode,V)):te&&(Je(),se(te,1,1,()=>{te=null}),Qe()),Re[15]&&l1?oe?(oe.p(Re,Ee),Ee[0]&32768&&Q(oe,1)):(oe=k6(Re),oe.c(),Q(oe,1),oe.m(ne.parentNode,ne)):oe&&(Je(),se(oe,1,1,()=>{oe=null}),Qe()),Re[10]===Vn&&Re[6]?ce?(ce.p(Re,Ee),Ee[0]&1088&&Q(ce,1)):(ce=S6(Re),ce.c(),Q(ce,1),ce.m(W.parentNode,W)):ce&&(Je(),se(ce,1,1,()=>{ce=null}),Qe()),Re[7]?ge?ge.p(Re,Ee):(ge=T6(Re),ge.c(),ge.m(re.parentNode,re)):ge&&(ge.d(1),ge=null)},i(Re){G||(Q(h.$$.fragment,Re),Q(C.$$.fragment,Re),Q(E.$$.fragment,Re),Q(te),Q(oe),Q(ce),G=!0)},o(Re){se(h.$$.fragment,Re),se(C.$$.fragment,Re),se(E.$$.fragment,Re),se(te),se(oe),se(ce),G=!1},d(Re){Re&&(K(n),K(Z),K(V),K(ne),K(W),K(re)),le&&le.d(),qe(h),ue&&ue.d(),ee&&ee.d(),$&&$.d(),he&&he.d(),qe(C),qe(E),me&&me.d(),te&&te.d(Re),oe&&oe.d(Re),ce&&ce.d(Re),ge&&ge.d(Re),F=!1,X()}}}let l1=!1;function SH(t,n,e){let i,r,o,s,l,a,c,u;ye(t,Ki,ne=>e(10,i=ne)),ye(t,an,ne=>e(35,r=ne)),ye(t,Vt,ne=>e(11,o=ne)),ye(t,Ii,ne=>e(12,s=ne)),ye(t,Ji,ne=>e(13,l=ne)),ye(t,Dl,ne=>e(14,a=ne)),ye(t,ho,ne=>e(15,c=ne)),ye(t,T2,ne=>e(16,u=ne));let{isPopupOpen:d}=n,{product:f}=n,{productPrice:p}=n,{country:m}=n,{language:g}=n,{projectData:h}=n,_=Li,b=!1,y=!1;const k=Mn();let T=mn(m,r),R=gn(g,r),O=!1,j,q;const M=f||{},z=M.orderingData||{};let D={configId:M.configurationId||z.orderingId||"",productCode:M.productCode||z.productCode||"",gcrCode:M.productRef||M.productId||""};Un(()=>{Oi(Ds)}),Kn(()=>{Oi(Kr)});function P(){k(Qi.CLOSE)}function L(){var ne,W;i===Vn?e(6,y=!0):(e(4,_=(W=(ne=h==null?void 0:h.bom)==null?void 0:ne.parts)==null?void 0:W.filter(re=>(re==null?void 0:re.productRef)!==(f==null?void 0:f.productRef))),e(5,b=!0))}const C=()=>{L()},S=()=>{P()},I=(ne,W)=>k(Qi.UPDATE_QUANTITY,{val:ne,product:W}),N=()=>{Vg("product-config-id")&&(e(7,O=!0),e(8,j=o("product.text_copied")),e(9,q=xr))},E=ne=>Zg(ne);function B(ne){b=ne,e(5,b)}const U=()=>P(),H=()=>e(6,y=!1),Z=()=>{k(Qi.REMOVE_PRODUCT),e(6,y=!1)},V=()=>e(7,O=!1);return t.$$set=ne=>{"isPopupOpen"in ne&&e(0,d=ne.isPopupOpen),"product"in ne&&e(1,f=ne.product),"productPrice"in ne&&e(2,p=ne.productPrice),"country"in ne&&e(23,m=ne.country),"language"in ne&&e(24,g=ne.language),"projectData"in ne&&e(3,h=ne.projectData)},[d,f,p,h,_,b,y,O,j,q,i,o,s,l,a,c,u,k,T,R,D,P,L,m,g,C,S,I,N,E,B,U,H,Z,V]}class TH extends Ot{constructor(n){super(),At(this,n,SH,kH,It,{isPopupOpen:0,product:1,productPrice:2,country:23,language:24,projectData:3},gH,[-1,-1])}}const Yne="";function CH(t){Ut(t,"svelte-t4dkxa",".pw.display-flex.svelte-t4dkxa.svelte-t4dkxa{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-t4dkxa.svelte-t4dkxa{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.small-font.svelte-t4dkxa.svelte-t4dkxa{font-size:14px}.pw.nano-font.svelte-t4dkxa.svelte-t4dkxa{font-size:12px}.pw.pointer.svelte-t4dkxa.svelte-t4dkxa{cursor:pointer}.justify-content-sp-btw.svelte-t4dkxa.svelte-t4dkxa{justify-content:space-between}.gp-10.svelte-t4dkxa.svelte-t4dkxa{gap:10px}.gp-5.svelte-t4dkxa.svelte-t4dkxa{gap:5px}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.product.svelte-t4dkxa.svelte-t4dkxa{padding:15px 20px 20px;margin:0 20px 0 20px;background-color:#ffffff;border:1px solid transparent;border-radius:8px}@media(max-width: 768px){.product.svelte-t4dkxa.svelte-t4dkxa{padding:15px 7px 20px}}.product-image.svelte-t4dkxa.svelte-t4dkxa{min-width:50px;max-height:60px}@media(max-width: 768px){.product-image.svelte-t4dkxa.svelte-t4dkxa{width:55px}}@media(max-width: 768px){.product-image.svelte-t4dkxa .img.svelte-t4dkxa{width:95%}}.product-name.svelte-t4dkxa.svelte-t4dkxa{color:var(--se-medium-blue, #0075a3);font-size:18px;margin-bottom:5px}.product-price.svelte-t4dkxa.svelte-t4dkxa{font-size:18px;margin-top:5px;font-weight:bolder}.empty-box.svelte-t4dkxa.svelte-t4dkxa{height:154px;width:100%}.action-buttons-container.svelte-t4dkxa.svelte-t4dkxa{margin-top:30px}.product-container.svelte-t4dkxa.svelte-t4dkxa{gap:20px}.cart-eolstatus.svelte-t4dkxa.svelte-t4dkxa{padding-left:12px}.eol-products.svelte-t4dkxa.svelte-t4dkxa{padding-top:6px}.eol-date.svelte-t4dkxa.svelte-t4dkxa{color:#333;font-weight:normal}")}function C6(t,n,e){const i=t.slice();return i[42]=n[e],i[44]=e,i}function E6(t){let n,e;return n=new pa({props:{id:"chk-"+t[0].serialNum,disabled:t[0].isDisabled||nc(t[0])&&!t[0].isParent||t[15][Gc]===Ae.DISABLED,checked:t[0].isSelected,boxSize:"small",className:"row-checkbox"}}),n.$on("clickCheckBox",t[23]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1&&(o.id="chk-"+i[0].serialNum),r[0]&32769&&(o.disabled=i[0].isDisabled||nc(i[0])&&!i[0].isParent||i[15][Gc]===Ae.DISABLED),r[0]&1&&(o.checked=i[0].isSelected),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function EH(t){var b,y,k,T,R;let n,e,i,r=(((b=t[0])==null?void 0:b.name)||(((y=t[0])==null?void 0:y.productRef)??((k=t[0])==null?void 0:k.productId)))+"",o,s,l,a,c=(((T=t[0])==null?void 0:T.description)??((R=t[0])==null?void 0:R.id))+"",u,d,f,p,m=!t[5]&&t[14]&&I6(t);function g(O,j){var q;if(O[15][bi]===Ae.SHOW||O[15][bi]===Ae.DISABLED)return OH;if((q=O[0].eolStatus)!=null&&q.length)return AH}let h=g(t),_=h&&h(t);return{c(){var O;m&&m.c(),n=Y(),e=A("div"),i=A("qds-inline-link"),o=de(r),l=Y(),a=A("div"),u=de(c),d=Y(),_&&_.c(),w(i,"class","pw pointer svelte-t4dkxa"),w(i,"data-id","product-name"),w(i,"href",s=vo((O=t[0])==null?void 0:O.pdpUrl)),w(i,"target","_blank"),w(i,"rel","external"),x(a,"data-id","product-description"),x(a,"class","pw small-font svelte-t4dkxa"),x(e,"class","product-container svelte-t4dkxa")},m(O,j){m&&m.m(O,j),J(O,n,j),J(O,e,j),v(e,i),v(i,o),v(e,l),v(e,a),v(a,u),v(e,d),_&&_.m(e,null),f||(p=xe(i,"click",t[26]),f=!0)},p(O,j){var q,M,z,D,P,L;!O[5]&&O[14]?m?m.p(O,j):(m=I6(O),m.c(),m.m(n.parentNode,n)):m&&(m.d(1),m=null),j[0]&1&&r!==(r=(((q=O[0])==null?void 0:q.name)||(((M=O[0])==null?void 0:M.productRef)??((z=O[0])==null?void 0:z.productId)))+"")&&be(o,r),j[0]&1&&s!==(s=vo((D=O[0])==null?void 0:D.pdpUrl))&&w(i,"href",s),j[0]&1&&c!==(c=(((P=O[0])==null?void 0:P.description)??((L=O[0])==null?void 0:L.id))+"")&&be(u,c),h===(h=g(O))&&_?_.p(O,j):(_&&_.d(1),_=h&&h(O),_&&(_.c(),_.m(e,null)))},d(O){O&&(K(n),K(e)),m&&m.d(O),_&&_.d(),f=!1,p()}}}function IH(t){var p,m,g;let n,e,i=t[12]("product.config_Id")+"",r,o,s,l=(((p=t[0])==null?void 0:p.configurationId)||((g=(m=t[0])==null?void 0:m.orderingData)==null?void 0:g.orderingId)||Te)+"",a,c,u,d,f=(t[15][bi]===Ae.SHOW||t[15][bi]===Ae.DISABLED)&&M6(t);return{c(){n=A("div"),e=A("div"),r=de(i),o=Y(),s=A("div"),a=de(l),c=Y(),f&&f.c(),x(e,"class","product-name svelte-t4dkxa"),x(s,"class","pw small-font svelte-t4dkxa"),x(n,"class","product-container pw pointer svelte-t4dkxa")},m(h,_){J(h,n,_),v(n,e),v(e,r),v(n,o),v(n,s),v(s,a),v(n,c),f&&f.m(n,null),u||(d=xe(n,"click",t[24]),u=!0)},p(h,_){var b,y,k;_[0]&4096&&i!==(i=h[12]("product.config_Id")+"")&&be(r,i),_[0]&1&&l!==(l=(((b=h[0])==null?void 0:b.configurationId)||((k=(y=h[0])==null?void 0:y.orderingData)==null?void 0:k.orderingId)||Te)+"")&&be(a,l),h[15][bi]===Ae.SHOW||h[15][bi]===Ae.DISABLED?f?f.p(h,_):(f=M6(h),f.c(),f.m(n,null)):f&&(f.d(1),f=null)},d(h){h&&K(n),f&&f.d(),u=!1,d()}}}function I6(t){let n,e,i,r,o,s;return{c(){var l,a;n=A("div"),e=A("img"),x(e,"loading","eager"),x(e,"class","img svelte-t4dkxa"),rr(e.src,i=am(t[10],Js.size[Fv],!1))||x(e,"src",i),x(e,"alt",r=((l=t[0])==null?void 0:l.productRef)??((a=t[0])==null?void 0:a.productId)),x(n,"class","product-image svelte-t4dkxa")},m(l,a){J(l,n,a),v(n,e),o||(s=xe(e,"error",t[25]),o=!0)},p(l,a){var c,u;a[0]&1024&&!rr(e.src,i=am(l[10],Js.size[Fv],!1))&&x(e,"src",i),a[0]&1&&r!==(r=((c=l[0])==null?void 0:c.productRef)??((u=l[0])==null?void 0:u.productId))&&x(e,"alt",r)},d(l){l&&K(n),o=!1,s()}}}function AH(t){let n,e,i=Dt(t[0].eolStatus),r=[];for(let o=0;oCt(n,"isPopupOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&514&&(a.projectData={...s[1],bom:{parts:s[9]}}),l[0]&4096&&(a.successMsg=s[12]("bom_manager.product_deleted")),l[0]&4096&&(a.errorMsg=s[12]("bom_manager.error_in_deleting_product")),l[0]&4096&&(a.confirmTxt=s[12]("list_manager.remove_selected_produts_message")),l[0]&4096&&(a.confirmLbl=s[12]("generic.delete")),l[0]&4096&&(a.cancelLbl=s[12]("generic.cancel")),!e&&l[0]&256&&(e=!0,a.isPopupOpen=s[8],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function B6(t){let n,e;return n=new Pf({props:{isPopupOpen:t[7],confirmTxt:t[12]("cart.remove_selected_product_message"),confirmLbl:t[12]("generic.delete"),cancelLbl:t[12]("generic.cancel")}}),n.$on("close",t[29]),n.$on("confirmAction",t[19]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&128&&(o.isPopupOpen=i[7]),r[0]&4096&&(o.confirmTxt=i[12]("cart.remove_selected_product_message")),r[0]&4096&&(o.confirmLbl=i[12]("generic.delete")),r[0]&4096&&(o.cancelLbl=i[12]("generic.cancel")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function U6(t){let n;return{c(){n=A("div"),x(n,"class","product empty-box svelte-t4dkxa")},m(e,i){J(e,n,i)},d(e){e&&K(n)}}}function z6(t){let n,e;return n=new TH({props:{isPopupOpen:t[6],product:t[0],projectData:t[1],country:t[2],language:t[3],productPrice:t[17](t[0])===_r?t[12]("bom_manager.price_unavailable"):t[17](t[0])}}),n.$on("updateQuantity",t[30]),n.$on("removeProduct",t[31]),n.$on("close",t[32]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&64&&(o.isPopupOpen=i[6]),r[0]&1&&(o.product=i[0]),r[0]&2&&(o.projectData=i[1]),r[0]&4&&(o.country=i[2]),r[0]&8&&(o.language=i[3]),r[0]&4097&&(o.productPrice=i[17](i[0])===_r?i[12]("bom_manager.price_unavailable"):i[17](i[0])),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function RH(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h=t[11]===qn&&E6(t);function _(q,M){var z,D;return(z=q[0])!=null&&z.configurationId||((D=q[0])==null?void 0:D.partType)===Ei.CTO?IH:EH}let b=_(t),y=b(t);a=new Gt({props:{className:"btn-remove",iconClassName:"trash-can",buttonText:t[12]("generic.remove"),importance:"subdued",buttonSize:"small"}}),a.$on("btnClick",t[27]);let k=!t[5]&&q6(t),T=t[8]&&D6(t),R=t[11]===Vn&&t[7]&&B6(t),O=t[4]&&U6(),j=t[6]&&z6(t);return{c(){n=A("div"),e=A("div"),i=A("span"),h&&h.c(),r=Y(),y.c(),o=Y(),s=A("div"),l=A("div"),De(a.$$.fragment),c=Y(),k&&k.c(),u=Y(),T&&T.c(),d=Y(),R&&R.c(),f=Y(),O&&O.c(),p=Y(),j&&j.c(),m=wt(),x(i,"class","display-flex justify-content-sp-btw gp-10 svelte-t4dkxa"),x(e,"class","display-flex gp-10 svelte-t4dkxa"),x(s,"class","display-flex justify-content-sp-btw action-buttons-container svelte-t4dkxa"),x(n,"class","product svelte-t4dkxa")},m(q,M){J(q,n,M),v(n,e),v(e,i),h&&h.m(i,null),v(i,r),y.m(i,null),v(n,o),v(n,s),v(s,l),Me(a,l,null),v(s,c),k&&k.m(s,null),J(q,u,M),T&&T.m(q,M),J(q,d,M),R&&R.m(q,M),J(q,f,M),O&&O.m(q,M),J(q,p,M),j&&j.m(q,M),J(q,m,M),g=!0},p(q,M){q[11]===qn?h?(h.p(q,M),M[0]&2048&&Q(h,1)):(h=E6(q),h.c(),Q(h,1),h.m(i,r)):h&&(Je(),se(h,1,1,()=>{h=null}),Qe()),b===(b=_(q))&&y?y.p(q,M):(y.d(1),y=b(q),y&&(y.c(),y.m(i,null)));const z={};M[0]&4096&&(z.buttonText=q[12]("generic.remove")),a.$set(z),q[5]?k&&(Je(),se(k,1,1,()=>{k=null}),Qe()):k?(k.p(q,M),M[0]&32&&Q(k,1)):(k=q6(q),k.c(),Q(k,1),k.m(s,null)),q[8]?T?(T.p(q,M),M[0]&256&&Q(T,1)):(T=D6(q),T.c(),Q(T,1),T.m(d.parentNode,d)):T&&(Je(),se(T,1,1,()=>{T=null}),Qe()),q[11]===Vn&&q[7]?R?(R.p(q,M),M[0]&2176&&Q(R,1)):(R=B6(q),R.c(),Q(R,1),R.m(f.parentNode,f)):R&&(Je(),se(R,1,1,()=>{R=null}),Qe()),q[4]?O||(O=U6(),O.c(),O.m(p.parentNode,p)):O&&(O.d(1),O=null),q[6]?j?(j.p(q,M),M[0]&64&&Q(j,1)):(j=z6(q),j.c(),Q(j,1),j.m(m.parentNode,m)):j&&(Je(),se(j,1,1,()=>{j=null}),Qe())},i(q){g||(Q(h),Q(a.$$.fragment,q),Q(k),Q(T),Q(R),Q(j),g=!0)},o(q){se(h),se(a.$$.fragment,q),se(k),se(T),se(R),se(j),g=!1},d(q){q&&(K(n),K(u),K(d),K(f),K(p),K(m)),h&&h.d(),y.d(),qe(a),k&&k.d(),T&&T.d(q),R&&R.d(q),O&&O.d(q),j&&j.d(q)}}}function MH(t,n,e){let i,r,o,s,l,a,c,u,d;ye(t,Ki,F=>e(11,i=F)),ye(t,$r,F=>e(33,r=F)),ye(t,es,F=>e(34,o=F)),ye(t,Vt,F=>e(12,s=F)),ye(t,Ji,F=>e(13,l=F)),ye(t,ti,F=>e(35,a=F)),ye(t,an,F=>e(36,c=F)),ye(t,Dl,F=>e(14,u=F)),ye(t,Ii,F=>e(15,d=F));let{product:f}=n,{country:p}=n,{language:m}=n,{insertEmptyBox:g=!1}=n,{projectData:h}=n,{apigeeToken:_}=n,{isForGroup:b=!1}=n,y=!1,k=!1,T=!1,R=[],O;Un(async()=>{await I(),jt(Dl,u=!0,u)});function j(F){q(F);const{price:X,currency:le,quantity:ue}=F;return js(X)&&(le||p)?fr(gn(m,c),mn(p,c),String(Number(js(X))*ue)):null}function q(F){F!=null&&F.isParent&&F.parts&&F.parts.length>0&&(typeof F.price===Vs?F.price.value=M(F):F.price=M(F))}function M(F){var X;return(X=F==null?void 0:F.parts)==null?void 0:X.reduce((le,ue)=>{const ee=js(ue==null?void 0:ue.price),$=ee?Number(ee):0;return le+$},0)}function z(){var F,X;i===Vn?e(7,k=!0):(e(9,R=(X=(F=h==null?void 0:h.bom)==null?void 0:F.parts)==null?void 0:X.filter(le=>(le==null?void 0:le.productRef)!==(f==null?void 0:f.productRef))),e(8,T=!0)),Er.update(()=>!1)}function D(F){var ue,ee;const{isParent:X,isCTOItemPriceMissing:le}=F;if(X&&le)return _r;if(!(F!=null&&F.price))return s("bom_manager.price_unavailable");if(F!=null&&F.price)return j(F);if(F!=null&&F.parts)return(ue=F==null?void 0:F.parts)==null?void 0:ue.reduce(($,he)=>j(he),null);if(F!=null&&F.groups)return(ee=F==null?void 0:F.groups)==null?void 0:ee.reduce(($,he)=>D(he),null)}function P(F,X){var ue,ee,$;const le=Number(F);if(Math.floor(le)!==le)ve.info("updateQuantity: value is not an integer, value: "+le);else if(le>0&&(ja([X]),le!==X.quantity)){if(X!=null&&X.parts&&((ue=X.parts)==null?void 0:ue.length)>0){if((X==null?void 0:X.quantity)>0){let he=(ee=X.parts)==null?void 0:ee.map(me=>me.quantity/(X==null?void 0:X.quantity)*le);($=X==null?void 0:X.parts)==null||$.forEach((me,te)=>{me.quantity=he[te]}),X.quantity=Number(le)}}else X.quantity=Number(le);try{const he=String(h==null?void 0:h.id),me={...h};let te=Qc(me);L(te,he)}catch(he){ve.info("fetchCaseProduct: catch",he)}}}function L(F,X){jt(Ji,l=!0,l);const le=s("edit_list.list_updated_successfully_message"),ue=mn(p,c),ee=gn(m,c);i===qn?Vi(F,X,le,a).then(async()=>{await ci(X,ue,ee,_,!0).then(function($){e(0,f.isLoading=!1,f),jt(Ji,l=!1,l),ve.info($)}).catch(function($){e(0,f.isLoading=!1,f),ve.error($)}),ve.info("Project updated for with ID : ",X)}).finally(()=>{ve.info("Project updated for with ID: ",X)}):Os(F,o).then(async()=>{await ci(o,ue,ee,_,!0).then(function($){e(0,f.isLoading=!1,f),jt(Ji,l=!1,l),ve.info($)}).catch(function($){e(0,f.isLoading=!1,f),ve.error($)}),ve.info("Project updated for with ID : ",X)}).finally(()=>{ve.info("Project updated for with ID: ",X)})}function C(){e(7,k=!1),hn.update(()=>!0);const F=Kg(r);Wh([{id:(f==null?void 0:f.id)||Te,quantity:(f==null?void 0:f.quantity)||0}],o,F).then(async X=>{X!=null&&X.error?(tr.update(()=>mr),Wi.update(()=>!0),nr.update(()=>X==null?void 0:X.message)):(Bn(Nn.REMOVE_FROM_CART,[f],"","",!1,"cart|uco|delete",!1),tr.update(()=>xr),Wi.update(()=>!0),nr.update(()=>s("cart.delete_products_message")),await ci(o,mn(p,r),gn(m,r),_,!0).then(function(le){ve.info(le)}).catch(function(le){ve.error(le)}))}).catch(X=>ve.error(X==null?void 0:X.message)).finally(()=>{hn.update(()=>!1),Er.update(()=>!0)})}function S(F){var le,ue;const X=F.target.checked;e(0,f.isSelected=X,f),Fd(f,X),X||(e(1,h.bom.isSelected=X,h),(ue=(le=h==null?void 0:h.bom)==null?void 0:le.groups)==null||ue.forEach(ee=>{xd(ee)})),tc(_s(h.bom)),an.update(()=>h)}async function I(){let F,X;p===v1.en_UK?F=vl.UK.toLowerCase():F=p;const le=g_(C1.SUBSTITUTION,p);ve.info("country object after fallback lookup: "+JSON.stringify(le)),(le==null?void 0:le.length)>0&&!le[0].supportedLanguages.includes(m)?(X=String(le[0].fallbackLanguage),ve.info("went into fallback condition. fallback lang is "+X)):(X!==Te&&(X=m),ve.info("Dit not go into fallback condition. lang is "+X));const ue=eg.replace(/{path}/g,Jf[We.environment]).replace(/{cc}/g,F.toLowerCase()).replace(/{lc}/g,X)+f.productRef||f.productId;ve.info("subs final api is: "+ue);const ee=await f_(ue);e(10,O=ee==null?void 0:ee.pictureDocumentReference)}function N(){Bn(Nn.CTA_CLICK,{cta_name:"Product",cta_location:i===qn?$i.UCList:$i.UCCart,cta_id:f.productRef||f.productId,cta_link:vo(f==null?void 0:f.pdpUrl),cta_category:"Products"})}const E=F=>{S(F==null?void 0:F.detail)},B=()=>{var F;(f!=null&&f.configurationId||(F=f==null?void 0:f.orderingData)!=null&&F.orderingId)&&(e(6,y=!0),Er.update(()=>!1))},U=F=>Zg(F),H=()=>{N()},Z=()=>{z()};function V(F){T=F,e(8,T)}const ne=()=>{e(7,k=!1),Er.update(()=>!0)},W=({detail:F})=>{F&&P(F.val,F.product)},re=()=>{C(),e(6,y=!1),Er.update(()=>!0)},G=()=>{e(6,y=!1),Er.update(()=>!0)};return t.$$set=F=>{"product"in F&&e(0,f=F.product),"country"in F&&e(2,p=F.country),"language"in F&&e(3,m=F.language),"insertEmptyBox"in F&&e(4,g=F.insertEmptyBox),"projectData"in F&&e(1,h=F.projectData),"apigeeToken"in F&&e(22,_=F.apigeeToken),"isForGroup"in F&&e(5,b=F.isForGroup)},[f,h,p,m,g,b,y,k,T,R,O,i,s,l,u,d,z,D,P,C,S,N,_,E,B,U,H,Z,V,ne,W,re,G]}class F6 extends Ot{constructor(n){super(),At(this,n,MH,RH,It,{product:0,country:2,language:3,insertEmptyBox:4,projectData:1,apigeeToken:22,isForGroup:5},CH,[-1,-1])}}const Zne="";function qH(t){Ut(t,"svelte-bhvhzl",".display-flex.svelte-bhvhzl.svelte-bhvhzl{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.pointer.svelte-bhvhzl.svelte-bhvhzl{cursor:pointer}h4.heading.svelte-bhvhzl.svelte-bhvhzl{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.heading.svelte-bhvhzl.svelte-bhvhzl{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px}.cross-icon.svelte-bhvhzl.svelte-bhvhzl{position:absolute;right:16px;top:16px}.share-bom-content.svelte-bhvhzl.svelte-bhvhzl{padding:0px 20px;margin-bottom:20px}.receive-content-text.svelte-bhvhzl.svelte-bhvhzl{color:var(--se-anthracite-grey, #333333);font-size:14px}.input-field.svelte-bhvhzl.svelte-bhvhzl{flex-direction:column;position:relative;margin-top:12px}.plus-icon-email.svelte-bhvhzl.svelte-bhvhzl{position:absolute;right:-44px;bottom:0px}.error.svelte-bhvhzl.svelte-bhvhzl{color:var(--se-red, #dc0a0a);font-size:12px;padding-top:10px}.pointer-event-none.svelte-bhvhzl.svelte-bhvhzl{pointer-events:none;opacity:0.5}.all-selectedEmail-list.svelte-bhvhzl.svelte-bhvhzl{display:flex;flex-wrap:wrap;margin-top:10px;max-height:100px;overflow:auto}.all-selectedEmail-list.svelte-bhvhzl p.svelte-bhvhzl{background:var(--se-dark-grey, #626469);padding:8px 20px;color:var(--se-white, #ffffff);border-radius:50px;margin:0px 12px 10px 0px;font-size:14px;padding-right:12px;height:fit-content}.all-selectedEmail-list.svelte-bhvhzl p span.svelte-bhvhzl{font-size:12px;padding-left:8px;padding-right:8px}.dialog-footer-button.svelte-bhvhzl.svelte-bhvhzl{margin-top:12px;margin-left:-4px}.dialog-content-width.svelte-bhvhzl.svelte-bhvhzl{width:75%}.share-list-desc.svelte-bhvhzl.svelte-bhvhzl{width:100%;height:100%;outline:none;border-radius:4px}#btn-cancel.svelte-bhvhzl.svelte-bhvhzl{margin-left:8px}@media(max-width: 968px){.plus-icon-email.svelte-bhvhzl.svelte-bhvhzl{bottom:5px}}")}function x6(t,n,e){const i=t.slice();return i[40]=n[e],i[42]=e,i}function G6(t){let n,e=t[5]("share_bill_of_materials.email_already_exist")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-bhvhzl")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&32&&e!==(e=r[5]("share_bill_of_materials.email_already_exist")+"")&&be(i,e)},d(r){r&&K(n)}}}function H6(t){let n,e;return{c(){n=A("p"),e=de(t[4]),x(n,"class","error svelte-bhvhzl")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r[0]&16&&be(e,i[4])},d(i){i&&K(n)}}}function W6(t){let n,e=t[5]("share_list.user_already_have_access_to_this_list")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-bhvhzl")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&32&&e!==(e=r[5]("share_list.user_already_have_access_to_this_list")+"")&&be(i,e)},d(r){r&&K(n)}}}function V6(t){let n,e=Dt(t[0]),i=[];for(let r=0;r0&&!Si((ae=t[2])==null?void 0:ae.email),N,E=La((ie=t[2])==null?void 0:ie.email,t[1]),B,U,H,Z,V,ne,W,re,G,F,X,le,ue,ee,$,he;function me(Ee){t[20](Ee)}let te={id:"input-email",className:"form-field",type:"text",name:"name",placeholder:t[5]("share_list.enter_email_address")};t[2].email!==void 0&&(te.value=t[2].email),O=new Yi({props:te}),_t.push(()=>Ct(O,"value",me)),O.$on("onKeyDown",t[21]),O.$on("qdsInput",t[22]);let oe=t[3]&&G6(t),ce=I&&H6(t),ge=E&&W6(t),fe=((_e=t[0])==null?void 0:_e.length)!=0&&V6(t);return X=new Gt({props:{id:"btn-send",dataTestId:"send-button-share-bom",buttonType:"button",disabled:!Si((Ie=t[2])==null?void 0:Ie.email)&&!((we=t[0])!=null&&we.length)||((Se=(pe=t[2])==null?void 0:pe.email)==null?void 0:Se.length)&&!Si((Le=t[2])==null?void 0:Le.email)||La((Re=t[2])==null?void 0:Re.email,t[1])||t[3],buttonSize:"medium",importance:"emphasized",buttonText:t[5]("generic.send")}}),X.$on("btnClick",t[25]),ue=new Gt({props:{id:"btn-cancel",dataTestId:"cancel-button-share-bom",buttonType:"button",buttonSize:"medium",buttonText:t[5]("generic.cancel")}}),ue.$on("btnClick",t[26]),{c(){var Ee,ke,Ce,Ne,Pe,Ve;n=A("se-loading"),e=Y(),i=A("se-dilog-header"),r=A("h4"),s=de(o),l=Y(),a=A("se-icon"),a.textContent="action_close",c=Y(),u=A("se-dialog-content"),d=A("p"),p=de(f),m=de("."),g=Y(),h=A("p"),b=de(_),y=de("."),k=Y(),T=A("form"),R=A("div"),De(O.$$.fragment),q=Y(),M=A("se-icon"),M.textContent="action_add_flat",z=Y(),D=A("p"),L=de(P),C=Y(),oe&&oe.c(),S=Y(),ce&&ce.c(),N=Y(),ge&&ge.c(),B=Y(),fe&&fe.c(),U=Y(),H=A("div"),Z=A("qds-label"),ne=Y(),W=A("qds-textarea"),G=Y(),F=A("div"),De(X.$$.fragment),le=Y(),De(ue.$$.fragment),w(n,"loading",t[6]),x(r,"class","heading svelte-bhvhzl"),x(r,"data-testid","share-bom-heading"),w(a,"data-testid","close-button-share-bom"),w(a,"id","ic-close"),w(a,"class","cross-icon pw pointer svelte-bhvhzl"),w(a,"color","standard"),w(i,"class","pw"),x(d,"class","receive-content-text svelte-bhvhzl"),x(h,"class","receive-content-text svelte-bhvhzl"),w(M,"data-testid","plus-email-button"),w(M,"id","ic-add-email"),w(M,"size","medium"),w(M,"class","cursor-pointer plus-icon-email svelte-bhvhzl"),w(M,"color","secondary"),sr(M,"pointer-event-none",!Si((Ee=t[2])==null?void 0:Ee.email)&&!((ke=t[0])!=null&&ke.length)||((Ne=(Ce=t[2])==null?void 0:Ce.email)==null?void 0:Ne.length)&&!Si((Pe=t[2])==null?void 0:Pe.email)||La((Ve=t[2])==null?void 0:Ve.email,t[1])||t[3]),x(R,"class","input-field display-flex dialog-content-width svelte-bhvhzl"),x(D,"class","error svelte-bhvhzl"),w(Z,"inline",""),w(Z,"text",V=t[5]("bom_manager.add_your_message")),w(W,"class","share-list-desc svelte-bhvhzl"),w(W,"id","description"),w(W,"type","text"),w(W,"name","description"),w(W,"value",re=t[2].description),w(W,"rows","5"),w(W,"maxlength",Nu),x(H,"class","input-field display-flex dialog-content-width svelte-bhvhzl"),x(F,"class","dialog-footer-button svelte-bhvhzl"),x(T,"class","form-share-bom"),w(u,"class","share-bom-content svelte-bhvhzl")},m(Ee,ke){J(Ee,n,ke),J(Ee,e,ke),J(Ee,i,ke),v(i,r),v(r,s),v(i,l),v(i,a),J(Ee,c,ke),J(Ee,u,ke),v(u,d),v(d,p),v(d,m),v(u,g),v(u,h),v(h,b),v(h,y),v(u,k),v(u,T),v(T,R),Me(O,R,null),v(R,q),v(R,M),v(T,z),v(T,D),v(D,L),v(T,C),oe&&oe.m(T,null),v(T,S),ce&&ce.m(T,null),v(T,N),ge&&ge.m(T,null),v(T,B),fe&&fe.m(T,null),v(T,U),v(T,H),v(H,Z),v(H,ne),v(H,W),v(T,G),v(T,F),Me(X,F,null),v(F,le),Me(ue,F,null),ee=!0,$||(he=[xe(a,"click",t[19]),xe(M,"click",t[23]),xe(T,"submit",BH)],$=!0)},p(Ee,ke){var Ve,ot,gt,He,Be,Ye,Ue,rt,ze,tt,je,nt,$e,mt,lt;(!ee||ke[0]&64)&&w(n,"loading",Ee[6]),(!ee||ke[0]&32)&&o!==(o=Ee[5]("project_listing.share_list")+"")&&be(s,o),(!ee||ke[0]&32)&&f!==(f=Ee[5]("share_list.enter_email_message")+"")&&be(p,f),(!ee||ke[0]&32)&&_!==(_=Ee[5]("share_bill_of_materials.personal_data_in_our_system")+"")&&be(b,_);const Ce={};ke[0]&32&&(Ce.placeholder=Ee[5]("share_list.enter_email_address")),!j&&ke[0]&4&&(j=!0,Ce.value=Ee[2].email,Tt(()=>j=!1)),O.$set(Ce),(!ee||ke[0]&15)&&sr(M,"pointer-event-none",!Si((Ve=Ee[2])==null?void 0:Ve.email)&&!((ot=Ee[0])!=null&&ot.length)||((He=(gt=Ee[2])==null?void 0:gt.email)==null?void 0:He.length)&&!Si((Be=Ee[2])==null?void 0:Be.email)||La((Ye=Ee[2])==null?void 0:Ye.email,Ee[1])||Ee[3]),(!ee||ke[0]&32)&&P!==(P=Ee[5]("share_bill_of_materials.receive_a_reply_lbl")+"")&&be(L,P),Ee[3]?oe?oe.p(Ee,ke):(oe=G6(Ee),oe.c(),oe.m(T,S)):oe&&(oe.d(1),oe=null),ke[0]&20&&(I=Ee[4]&&Ee[4].length>0&&!Si((Ue=Ee[2])==null?void 0:Ue.email)),I?ce?ce.p(Ee,ke):(ce=H6(Ee),ce.c(),ce.m(T,N)):ce&&(ce.d(1),ce=null),ke[0]&6&&(E=La((rt=Ee[2])==null?void 0:rt.email,Ee[1])),E?ge?ge.p(Ee,ke):(ge=W6(Ee),ge.c(),ge.m(T,B)):ge&&(ge.d(1),ge=null),((ze=Ee[0])==null?void 0:ze.length)!=0?fe?fe.p(Ee,ke):(fe=V6(Ee),fe.c(),fe.m(T,U)):fe&&(fe.d(1),fe=null),(!ee||ke[0]&32&&V!==(V=Ee[5]("bom_manager.add_your_message")))&&w(Z,"text",V),(!ee||ke[0]&4&&re!==(re=Ee[2].description))&&w(W,"value",re);const Ne={};ke[0]&15&&(Ne.disabled=!Si((tt=Ee[2])==null?void 0:tt.email)&&!((je=Ee[0])!=null&&je.length)||(($e=(nt=Ee[2])==null?void 0:nt.email)==null?void 0:$e.length)&&!Si((mt=Ee[2])==null?void 0:mt.email)||La((lt=Ee[2])==null?void 0:lt.email,Ee[1])||Ee[3]),ke[0]&32&&(Ne.buttonText=Ee[5]("generic.send")),X.$set(Ne);const Pe={};ke[0]&32&&(Pe.buttonText=Ee[5]("generic.cancel")),ue.$set(Pe)},i(Ee){ee||(Q(O.$$.fragment,Ee),Q(X.$$.fragment,Ee),Q(ue.$$.fragment,Ee),ee=!0)},o(Ee){se(O.$$.fragment,Ee),se(X.$$.fragment,Ee),se(ue.$$.fragment,Ee),ee=!1},d(Ee){Ee&&(K(n),K(e),K(i),K(c),K(u)),qe(O),oe&&oe.d(),ce&&ce.d(),ge&&ge.d(),fe&&fe.d(),qe(X),qe(ue),$=!1,An(he)}}}const BH=t=>{t.preventDefault()};function UH(t,n,e){let i,r,o,s,l;ye(t,Vt,re=>e(5,r=re)),ye(t,an,re=>e(33,o=re)),ye(t,ti,re=>e(34,s=re)),ye(t,Jt,re=>e(6,l=re));let{bomData:a}=n,{projectData:c}=n,{language:u}=n,{country:d}=n,{selectedProductParts:f}=n,{allEmails:p}=n,{apigeeToken:m}=n,{user:g}=n,h={email:Te,description:Te},_=null,b,y=!1,k=Li,T=Li,R,O;const j=Mn();Un(()=>{Oi(Ds)}),Kn(()=>{Oi(Kr)});function q(re){j("closePopupEvent",{action:re}),N()}function M(){var G;(p==null?void 0:p.includes(String(h==null?void 0:h.email)))?e(3,y=!0):e(3,y=!1),((G=h==null?void 0:h.email)==null?void 0:G.length)>0&&(/@.{2,}/.test(h==null?void 0:h.email)||!Si(h==null?void 0:h.email))?e(4,i=r("generic.invalid_email")):e(4,i=Te)}function z(re){var G,F;b=(G=re==null?void 0:re.target)==null?void 0:G.value,e(3,y=!1),_=Si(b),(re.key===Ys||re.key===cn||re.key===ba)&&(re.preventDefault(),b=(F=b==null?void 0:b.replace(ba,on))==null?void 0:F.trim(),_&&(e(2,h.email=b,h),D()))}function D(){(p==null?void 0:p.includes(String(h==null?void 0:h.email)))?e(3,y=!0):(e(0,p=[...p,String(h==null?void 0:h.email)]),e(2,h.email=Te,h),_=null,e(3,y=!1),e(4,i=Te))}function P(re){p==null||p.splice(re,1),e(0,p=[...p]);let G=p==null?void 0:p.includes(String(h==null?void 0:h.email));e(3,y=!!G)}async function L(){var F;ve.info("Share BOM form submitted"),h!=null&&h.email&&!(p!=null&&p.includes(h==null?void 0:h.email))&&(p==null||p.push(h==null?void 0:h.email)),R=$d(),Wn(!1),Jt.update(()=>!0),((F=Object.getOwnPropertyNames(a))==null?void 0:F.length)!==0?await If(a,s,o).then(X=>{O=X}):await S_(f,s,o),T=ep(c),S(),C();const re=I(),G=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:re,module:fo.SHARE_BOM}});document.dispatchEvent(G),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,X=>{var le,ue,ee,$;try{if(((le=X==null?void 0:X.detail)==null?void 0:le.module)===fo.SHARE_BOM){const he=(ue=X==null?void 0:X.detail)==null?void 0:ue.emailResp;if((($=JSON.parse(String((ee=he==null?void 0:he.data)==null?void 0:ee.bulkNotification)))==null?void 0:$.statusCode)===200)bo((f==null?void 0:f.length)===0?r("share_list.list_shared_message"):r("share_list.list_shared_with_distributor_message")),q(Qi.CLOSE);else{const me=String(r("generic.error_message"));Mi(me)}j(w_)}}catch{q(Qi.CLOSE)}finally{Jt.update(()=>!1),k=Li}})}async function C(){let re=(f==null?void 0:f.length)===0?T:f;(f==null?void 0:f.length)===0?T=re:e(13,f=re)}function S(){p==null||p.forEach(re=>{k==null||k.push({data:{username:"user"},emailId:re,language:u,country:d})})}function I(){return{notifications:[{[ca]:SD,[la]:JSON.stringify({[Zd]:R,[Bm]:c==null?void 0:c.company,[Ty]:tn(c==null?void 0:c.description),[Gm]:tn(c==null?void 0:c.name),[Xd]:h.description?h.description:Te,[nu]:c==null?void 0:c.owner,[Jd]:(f==null?void 0:f.length)===0?T:f,[Vd]:[{[Yd]:String(O),[Kd]:`${tn(c==null?void 0:c.name)}-(BOM)-${oc(new Date,Zf)}.xlsx`}]}),[iu]:JSON.stringify(k)}]}}function N(){e(2,h={email:Te,description:Te}),e(0,p=Li),e(3,y=!1),Jt.update(()=>!1)}const E=()=>{q(Qi.CLOSE)};function B(re){t.$$.not_equal(h.email,re)&&(h.email=re,e(2,h))}const U=re=>z(re.detail),H=()=>M(),Z=()=>{D()},V=re=>{P(re)},ne=re=>{L()},W=()=>{q(Qi.CLOSE)};return t.$$set=re=>{"bomData"in re&&e(14,a=re.bomData),"projectData"in re&&e(15,c=re.projectData),"language"in re&&e(16,u=re.language),"country"in re&&e(17,d=re.country),"selectedProductParts"in re&&e(13,f=re.selectedProductParts),"allEmails"in re&&e(0,p=re.allEmails),"apigeeToken"in re&&e(18,m=re.apigeeToken),"user"in re&&e(1,g=re.user)},e(4,i=Te),[p,g,h,y,i,r,l,q,M,z,D,P,L,f,a,c,u,d,m,E,B,U,H,Z,V,ne,W]}class Z_ extends Ot{constructor(n){super(),At(this,n,UH,DH,It,{bomData:14,projectData:15,language:16,country:17,selectedProductParts:13,allEmails:0,apigeeToken:18,user:1},qH,[-1,-1])}}const Xne="";function zH(t){Ut(t,"svelte-15x8c5q",".mobile-view-flx.svelte-15x8c5q{display:flex;flex-direction:column}@media(min-width: 968px){.mobile-view-flx.svelte-15x8c5q{display:none}}@media(min-width: 768px){}@media(max-width: 767px){}@media(max-width: 768px){}.product-container.svelte-15x8c5q{gap:20px;margin-bottom:140px}")}function Z6(t,n,e){const i=t.slice();return i[8]=n[e],i}function X6(t,n,e){const i=t.slice();return i[36]=n[e],i}function K6(t){let n;return{c(){n=A("se-loading"),w(n,"loading",t[16]),w(n,"full-page","true"),w(n,"overlay","true")},m(e,i){J(e,n,i)},p(e,i){i[0]&65536&&w(n,"loading",e[16])},d(e){e&&K(n)}}}function J6(t){let n,e,i,r,o=t[0]&&Q6(t),s=t[9]&&i8(t),l=t[14]&&r8(t);return{c(){n=A("div"),o&&o.c(),e=Y(),s&&s.c(),i=Y(),l&&l.c(),x(n,"class","product-container mobile-view-flx svelte-15x8c5q")},m(a,c){J(a,n,c),o&&o.m(n,null),v(n,e),s&&s.m(n,null),v(n,i),l&&l.m(n,null),r=!0},p(a,c){a[0]?o?(o.p(a,c),c[0]&1&&Q(o,1)):(o=Q6(a),o.c(),Q(o,1),o.m(n,e)):o&&(Je(),se(o,1,1,()=>{o=null}),Qe()),a[9]?s?(s.p(a,c),c[0]&512&&Q(s,1)):(s=i8(a),s.c(),Q(s,1),s.m(n,i)):s&&(Je(),se(s,1,1,()=>{s=null}),Qe()),a[14]?l?(l.p(a,c),c[0]&16384&&Q(l,1)):(l=r8(a),l.c(),Q(l,1),l.m(n,null)):l&&(Je(),se(l,1,1,()=>{l=null}),Qe())},i(a){r||(Q(o),Q(s),Q(l),r=!0)},o(a){se(o),se(s),se(l),r=!1},d(a){a&&K(n),o&&o.d(),s&&s.d(),l&&l.d()}}}function Q6(t){var s,l;let n,e,i,r=((s=t[0])==null?void 0:s.groups)&&$6(t),o=((l=t[0])==null?void 0:l.parts)&&t8(t);return{c(){r&&r.c(),n=Y(),o&&o.c(),e=wt()},m(a,c){r&&r.m(a,c),J(a,n,c),o&&o.m(a,c),J(a,e,c),i=!0},p(a,c){var u,d;(u=a[0])!=null&&u.groups?r?(r.p(a,c),c[0]&1&&Q(r,1)):(r=$6(a),r.c(),Q(r,1),r.m(n.parentNode,n)):r&&(Je(),se(r,1,1,()=>{r=null}),Qe()),(d=a[0])!=null&&d.parts?o?(o.p(a,c),c[0]&1&&Q(o,1)):(o=t8(a),o.c(),Q(o,1),o.m(e.parentNode,e)):o&&(Je(),se(o,1,1,()=>{o=null}),Qe())},i(a){i||(Q(r),Q(o),i=!0)},o(a){se(r),se(o),i=!1},d(a){a&&(K(n),K(e)),r&&r.d(a),o&&o.d(a)}}}function $6(t){let n,e,i=Dt(t[0].groups),r=[];for(let s=0;sse(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;sse(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;sCt(n,"isPopupOpen",r)),n.$on("goToCart",t[19]),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&2&&(a.projectData={...s[1],bom:{parts:Li}}),l[0]&1024&&(a.confirmTxt=s[10]),l[0]&8192&&(a.popupName=s[13]),l[0]&64&&(a.cpqUser=s[6]),l[0]&4096&&(a.confirmLbl=s[12]),l[0]&2048&&(a.cancelLbl=s[11]),l[0]&131072&&(a.successMsg=s[17]("add_to_cart.products_added_to_cart")),l[0]&131072&&(a.errorMsg=s[17]("add_to_cart.error_adding_product")),l[0]&32&&(a.cartInfo=s[5]),!e&&l[0]&16384&&(e=!0,a.isPopupOpen=s[14],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function FH(t){let n,e,i,r=t[16]&&K6(t),o=t[15]&&J6(t);return{c(){r&&r.c(),n=Y(),o&&o.c(),e=wt()},m(s,l){r&&r.m(s,l),J(s,n,l),o&&o.m(s,l),J(s,e,l),i=!0},p(s,l){s[16]?r?r.p(s,l):(r=K6(s),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null),s[15]?o?(o.p(s,l),l[0]&32768&&Q(o,1)):(o=J6(s),o.c(),Q(o,1),o.m(e.parentNode,e)):o&&(Je(),se(o,1,1,()=>{o=null}),Qe())},i(s){i||(Q(o),i=!0)},o(s){se(o),i=!1},d(s){s&&(K(n),K(e)),r&&r.d(s),o&&o.d(s)}}}function xH(t,n,e){let i,r,o;ye(t,hn,U=>e(16,i=U)),ye(t,Dl,U=>e(29,r=U)),ye(t,Vt,U=>e(17,o=U));let{addToCartBtn:s}=n,{bomData:l}=n,{projectData:a}=n,{product:c}=n,{apigeeToken:u}=n,{language:d}=n,{country:f}=n,{existingCartData:p}=n,{newGroupName:m}=n,{selectedProductRefs:g}=n,{projectId:h}=n,{availableservices:_=Li}=n,{cpqUser:b}=n,{selectAndConfigBearerToken:y}=n,{user:k}=n,{mobileActions:T=Te}=n,R=!1,O,j,q,M,z=!1,D=!1;const P=Mn();function L(){e(10,O=o("list_manager.delete_confirmation_message")),e(11,j=o("generic.cancel")),e(12,q=o("generic.delete")),e(13,M=qc),e(14,z=!0),qs.set(1)}function C(U){switch(U){case zv:e(9,R=!0),P(Qi.RESET_MOBILE_ACTION);break;case ph:Er.update(()=>!1),L(),P(Qi.RESET_MOBILE_ACTION);break;case Uv:Dl.set(!r),P(Qi.RESET_MOBILE_ACTION);break}}Un(()=>{jt(hn,i=!1,i);const U=new MutationObserver(()=>{const H=document.querySelectorAll(".btn-remove");let Z=0;H!=null&&H.length&&(H.forEach(V=>{var ne;if(V!=null&&V.shadowRoot){const W=(ne=V==null?void 0:V.shadowRoot)==null?void 0:ne.querySelector(".qds-button");W&&(W.style.display="flex",W.style.gap="10px",Z++)}}),(H==null?void 0:H.length)===Z&&U.disconnect())});U.observe(document.body,{childList:!0,subtree:!0}),window==null||window.addEventListener("resize",N),N()}),Kn(()=>{window==null||window.removeEventListener("resize",N)});function S(){e(9,R=!1)}function I(){P(yi.CART_PAGE)}function N(){e(15,D=DM())}const E=()=>{S()};function B(U){z=U,e(14,z)}return t.$$set=U=>{"addToCartBtn"in U&&e(20,s=U.addToCartBtn),"bomData"in U&&e(0,l=U.bomData),"projectData"in U&&e(1,a=U.projectData),"product"in U&&e(8,c=U.product),"apigeeToken"in U&&e(2,u=U.apigeeToken),"language"in U&&e(3,d=U.language),"country"in U&&e(4,f=U.country),"existingCartData"in U&&e(5,p=U.existingCartData),"newGroupName"in U&&e(21,m=U.newGroupName),"selectedProductRefs"in U&&e(22,g=U.selectedProductRefs),"projectId"in U&&e(23,h=U.projectId),"availableservices"in U&&e(24,_=U.availableservices),"cpqUser"in U&&e(6,b=U.cpqUser),"selectAndConfigBearerToken"in U&&e(25,y=U.selectAndConfigBearerToken),"user"in U&&e(7,k=U.user),"mobileActions"in U&&e(26,T=U.mobileActions)},t.$$.update=()=>{t.$$.dirty[0]&67108864&&(T==null?void 0:T.length)>0&&C(T)},[l,a,u,d,f,p,b,k,c,R,O,j,q,M,z,D,i,o,S,I,s,m,g,h,_,y,T,E,B]}class s8 extends Ot{constructor(n){super(),At(this,n,xH,FH,It,{addToCartBtn:20,bomData:0,projectData:1,product:8,apigeeToken:2,language:3,country:4,existingCartData:5,newGroupName:21,selectedProductRefs:22,projectId:23,availableservices:24,cpqUser:6,selectAndConfigBearerToken:25,user:7,mobileActions:26},zH,[-1,-1])}}const Kne="";function GH(t){Ut(t,"svelte-15p7o80",".editList.svelte-15p7o80{padding:0px 16px}.shareProject.svelte-15p7o80{padding:8px 32px 8px 0px}.button-font-size.svelte-15p7o80{font-size:var(--p-font-size, 0.87rem)}")}function HH(t){let n,e,i,r,o,s;return{c(){n=A("qds-button"),w(n,"icon-name",t[0]),w(n,"size",t[2]),w(n,"importance","subdued"),w(n,"text",t[1]),w(n,"class",e=Nt(t[3]??Te)+" svelte-15p7o80"),w(n,"id",i=t[4]??Te),w(n,"disabled",r=t[5]??!1)},m(l,a){J(l,n,a),o||(s=xe(n,"click",t[7]),o=!0)},p(l,[a]){a&1&&w(n,"icon-name",l[0]),a&4&&w(n,"size",l[2]),a&2&&w(n,"text",l[1]),a&8&&e!==(e=Nt(l[3]??Te)+" svelte-15p7o80")&&w(n,"class",e),a&16&&i!==(i=l[4]??Te)&&w(n,"id",i),a&32&&r!==(r=l[5]??!1)&&w(n,"disabled",r)},i:et,o:et,d(l){l&&K(n),o=!1,s()}}}function WH(t,n,e){let{iconClassName:i=Te}=n,{buttonText:r=Te}=n,{buttonSize:o=Ov}=n,{className:s=Te}=n,{id:l=Te}=n,{disabled:a=!1}=n;const c=Mn();function u(){c(yi.SUBDUED_BUTTON_CLICK)}const d=()=>{u()};return t.$$set=f=>{"iconClassName"in f&&e(0,i=f.iconClassName),"buttonText"in f&&e(1,r=f.buttonText),"buttonSize"in f&&e(2,o=f.buttonSize),"className"in f&&e(3,s=f.className),"id"in f&&e(4,l=f.id),"disabled"in f&&e(5,a=f.disabled)},[i,r,o,s,l,a,u,d]}class Lf extends Ot{constructor(n){super(),At(this,n,WH,HH,It,{iconClassName:0,buttonText:1,buttonSize:2,className:3,id:4,disabled:5},GH)}}const Jne="";function VH(t){Ut(t,"svelte-1duz7zz",".pw.pointer.svelte-1duz7zz.svelte-1duz7zz{cursor:pointer}h4.heading.svelte-1duz7zz.svelte-1duz7zz{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-1duz7zz.svelte-1duz7zz{position:absolute;right:1rem;top:1rem}.heading.svelte-1duz7zz.svelte-1duz7zz{font-size:30px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 12px}.dialog-footer-button.svelte-1duz7zz.svelte-1duz7zz{margin-top:12px;margin-left:-4px;display:flex;justify-content:end;gap:1rem}.popup-content.svelte-1duz7zz.svelte-1duz7zz{padding:0px 10px;margin-bottom:20px;margin-top:-16px}.list-desc.svelte-1duz7zz.svelte-1duz7zz{width:100%;margin-top:6px;height:100%;outline:none;border-radius:4px}.list-desc-label.svelte-1duz7zz.svelte-1duz7zz{padding-top:17px}.add-list-form.svelte-1duz7zz.svelte-1duz7zz{margin-top:1rem}.list-name.svelte-1duz7zz.svelte-1duz7zz{display:block}.list-dialog-header-section.svelte-1duz7zz.svelte-1duz7zz{display:flex;justify-content:space-between}@media(max-width: 768px){.list-dialog-header-section.svelte-1duz7zz .heading.svelte-1duz7zz{flex:1;padding-right:0px}.list-dialog-header-section.svelte-1duz7zz .cross-icon.svelte-1duz7zz{width:45px;margin-left:10px;position:relative;top:auto;right:auto;margin-top:8px}}")}function YH(t){var N,E;let n,e,i,r=t[6]("project_listing.create_new_list")+"",o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C;function S(B){t[10](B)}let I={type:"text",autoComplete:"off",id:"input-new-list-name",maxLength:Vp,className:"full-width"};return t[5].name!==void 0&&(I.value=t[5].name),g=new Yi({props:I}),_t.push(()=>Ct(g,"value",S)),M=new Gt({props:{buttonText:t[3]}}),M.$on("btnClick",t[12]),D=new Gt({props:{importance:"emphasized",buttonType:"submit",disabled:((E=(N=t[5])==null?void 0:N.name)==null?void 0:E.length)===0,buttonText:t[4]}}),D.$on("btnClick",t[13]),{c(){n=A("se-dialog"),e=A("div"),i=A("h4"),o=de(r),s=Y(),l=A("qds-button"),a=Y(),c=A("se-dialog-content"),u=A("div"),d=A("div"),f=A("qds-label"),m=Y(),De(g.$$.fragment),_=Y(),b=A("div"),y=A("qds-label"),T=Y(),R=A("qds-textarea"),j=Y(),q=A("div"),De(M.$$.fragment),z=Y(),De(D.$$.fragment),x(i,"class","heading svelte-1duz7zz"),x(i,"id","popup-header"),w(l,"importance","subdued"),w(l,"icon-name","cross-circle"),w(l,"class","cross-icon pw pointer svelte-1duz7zz"),w(l,"id","close-popup"),x(e,"class","list-dialog-header-section svelte-1duz7zz"),w(f,"class","list-name svelte-1duz7zz"),w(f,"required",""),w(f,"text",p=t[6]("generic.list_name")),x(d,"class",""),w(y,"class","list-desc-label svelte-1duz7zz"),w(y,"text",k=`${t[6]("generic.description")}:`),w(R,"class","list-desc svelte-1duz7zz"),w(R,"rows","5"),w(R,"maxlength",Nu),w(R,"value",O=t[5].description),x(q,"class","dialog-footer-button svelte-1duz7zz"),x(u,"class","add-list-form svelte-1duz7zz"),w(c,"class","popup-content svelte-1duz7zz"),w(n,"id",t[2]),w(n,"can-backdrop","false"),w(n,"open",t[1])},m(B,U){J(B,n,U),v(n,e),v(e,i),v(i,o),v(e,s),v(e,l),v(n,a),v(n,c),v(c,u),v(u,d),v(d,f),v(d,m),Me(g,d,null),v(u,_),v(u,b),v(b,y),v(b,T),v(b,R),v(u,j),v(u,q),Me(M,q,null),v(q,z),Me(D,q,null),t[14](n),P=!0,L||(C=[xe(l,"click",t[9]),xe(R,"qdsInput",t[11])],L=!0)},p(B,[U]){var ne,W;(!P||U&64)&&r!==(r=B[6]("project_listing.create_new_list")+"")&&be(o,r),(!P||U&64&&p!==(p=B[6]("generic.list_name")))&&w(f,"text",p);const H={};!h&&U&32&&(h=!0,H.value=B[5].name,Tt(()=>h=!1)),g.$set(H),(!P||U&64&&k!==(k=`${B[6]("generic.description")}:`))&&w(y,"text",k),(!P||U&32&&O!==(O=B[5].description))&&w(R,"value",O);const Z={};U&8&&(Z.buttonText=B[3]),M.$set(Z);const V={};U&32&&(V.disabled=((W=(ne=B[5])==null?void 0:ne.name)==null?void 0:W.length)===0),U&16&&(V.buttonText=B[4]),D.$set(V),(!P||U&4)&&w(n,"id",B[2]),(!P||U&2)&&w(n,"open",B[1])},i(B){P||(Q(g.$$.fragment,B),Q(M.$$.fragment,B),Q(D.$$.fragment,B),P=!0)},o(B){se(g.$$.fragment,B),se(M.$$.fragment,B),se(D.$$.fragment,B),P=!1},d(B){B&&K(n),qe(g),qe(M),qe(D),t[14](null),L=!1,An(C)}}}function ZH(t,n,e){let i,r;ye(t,W0,k=>e(15,i=k)),ye(t,Vt,k=>e(6,r=k));const o=Mn();let{wrapper:s}=n,{open:l=!1}=n,{dialogId:a}=n,{leftButtonText:c}=n,{rightButtonText:u}=n,d={name:Te,description:Te};Un(()=>{e(5,d.name=`${qP} ${i+1}`,d),Oi(Ds)}),Kn(()=>{Oi(Kr)});function f(){o(Ag,Hi)}function p(){o(vr.CREATE_LIST_EVENT,d)}const m=()=>{f()};function g(k){t.$$.not_equal(d.name,k)&&(d.name=k,e(5,d))}const h=k=>{var T;return e(5,d.description=(T=k==null?void 0:k.target)==null?void 0:T.value,d)},_=()=>{f()},b=()=>{p()};function y(k){_t[k?"unshift":"push"](()=>{s=k,e(0,s)})}return t.$$set=k=>{"wrapper"in k&&e(0,s=k.wrapper),"open"in k&&e(1,l=k.open),"dialogId"in k&&e(2,a=k.dialogId),"leftButtonText"in k&&e(3,c=k.leftButtonText),"rightButtonText"in k&&e(4,u=k.rightButtonText)},[s,l,a,c,u,d,r,f,p,m,g,h,_,b,y]}class X_ extends Ot{constructor(n){super(),At(this,n,ZH,YH,It,{wrapper:0,open:1,dialogId:2,leftButtonText:3,rightButtonText:4},VH)}}const Qne="";function XH(t){Ut(t,"svelte-1kqruoe",".pw.pointer.svelte-1kqruoe{cursor:pointer}h4.heading.svelte-1kqruoe{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-1kqruoe{position:absolute;right:28px;top:16px}@media screen and (max-width: 768px){.cross-icon.svelte-1kqruoe{right:5px;top:10px}}.heading.svelte-1kqruoe{font-size:22px;color:var(--se-true-black, #000000);margin:16px 40px}@media screen and (max-width: 768px){.heading.svelte-1kqruoe{margin:16px 35px}}.dialog-footer-button.svelte-1kqruoe{display:flex;justify-content:end;margin:32px}@media screen and (max-width: 768px){.dialog-footer-button.svelte-1kqruoe{margin:16px 32px}}.popup-content.svelte-1kqruoe{margin:0 24px;overflow-x:hidden}.list.svelte-1kqruoe{padding:5px 16px;min-height:24px;border:1px solid #d8d6d6;display:flex;justify-content:space-between;max-width:490px;align-items:center;cursor:pointer}@media screen and (min-width: 350px) and (max-width: 500px){.list.svelte-1kqruoe{max-width:260px}}.qds-radio.svelte-1kqruoe{margin-top:4px}")}function o8(t,n,e){const i=t.slice();return i[21]=n[e],i}function a8(t){var m;let n,e,i=((m=t[21])==null?void 0:m.name)+"",r,o,s,l,a,c,u,d,f;function p(){return t[16](t[21])}return{c(){var g,h;n=A("div"),e=A("span"),r=de(i),o=Y(),s=A("span"),l=A("qds-radio"),w(l,"name","list"),w(l,"id",a=`list-${(g=t[21])==null?void 0:g.id}`),w(l,"class","qds-radio svelte-1kqruoe"),w(l,"checked",c=t[6]===t[21].id),w(l,"value",t[6]),x(n,"class","list svelte-1kqruoe"),x(n,"id",u="list-project-tile-"+((h=t[21])==null?void 0:h.id))},m(g,h){J(g,n,h),v(n,e),v(e,r),v(n,o),v(n,s),v(s,l),d||(f=xe(n,"click",p),d=!0)},p(g,h){var _,b,y;t=g,h&512&&i!==(i=((_=t[21])==null?void 0:_.name)+"")&&be(r,i),h&512&&a!==(a=`list-${(b=t[21])==null?void 0:b.id}`)&&w(l,"id",a),h&576&&c!==(c=t[6]===t[21].id)&&w(l,"checked",c),h&64&&w(l,"value",t[6]),h&512&&u!==(u="list-project-tile-"+((y=t[21])==null?void 0:y.id))&&x(n,"id",u)},d(g){g&&K(n),d=!1,f()}}}function l8(t){let n,e;return n=new X_({props:{dialogId:"newListDialog",open:t[7],wrapper:Te,leftButtonText:t[8]("generic.cancel"),rightButtonText:t[8]("generic.create_and_add")}}),n.$on("createListEvent",t[17]),n.$on("closePopupEvent",t[18]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&128&&(o.open=i[7]),r&256&&(o.leftButtonText=i[8]("generic.cancel")),r&256&&(o.rightButtonText=i[8]("generic.create_and_add")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function KH(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k=Dt(t[9]),T=[];for(let O=0;O{R=null}),Qe())},i(O){_||(Q(f.$$.fragment,O),Q(m.$$.fragment,O),Q(R),_=!0)},o(O){se(f.$$.fragment,O),se(m.$$.fragment,O),se(R),_=!1},d(O){O&&(K(n),K(g),K(h)),Ln(T,O),qe(f),qe(m),R&&R.d(O),b=!1,y()}}}function JH(t,n,e){let i,r,o;ye(t,Vt,j=>e(8,i=j)),ye(t,$r,j=>e(19,r=j)),ye(t,Xi,j=>e(9,o=j));let{isPopupOpen:s}=n,{confirmLbl:l}=n,{cancelLbl:a}=n,{title:c=Te}=n;const u=Mn();let d=!1,f=!1,p=Te,m=!1;Un(()=>{Oi(Ds),jt(Xi,o=[],o),e(4,d=!0),io("false","false").catch(j=>{ve.error(j.message)}).finally(()=>{e(4,d=!1)})}),Kn(()=>{Oi(Kr),jt(Xi,o=[],o)});function g(){u(Qi.CLOSE)}function h(){e(7,m=!0),u(vr.ADD_TO_LIST_FROM_UC_CART,{bom:r==null?void 0:r.bom})}function _(){u(vr.GOTO_LIST,{listId:p,action:ur.PROJECT_LISTING}),u(vr.ADD_TO_LIST_FROM_UC_CART,{bom:r==null?void 0:r.bom})}function b(j){e(5,f=!0),e(6,p=j==null?void 0:j.id)}async function y(j,q){try{const M=await Yh(q);j&&typeof j===za&&ia(i("project_listing.list_created_successfully")),u(vr.GOTO_LIST,{listId:M,listType:va})}catch(M){ve.error(M.message)}}const k=()=>{g()},T=j=>b(j),R=({detail:j})=>{y(ur.PROJECT_LISTING,j),e(7,m=!1)},O=()=>e(7,m=!1);return t.$$set=j=>{"isPopupOpen"in j&&e(0,s=j.isPopupOpen),"confirmLbl"in j&&e(1,l=j.confirmLbl),"cancelLbl"in j&&e(2,a=j.cancelLbl),"title"in j&&e(3,c=j.title)},[s,l,a,c,d,f,p,m,i,o,g,h,_,b,y,k,T,R,O]}class QH extends Ot{constructor(n){super(),At(this,n,JH,KH,It,{isPopupOpen:0,confirmLbl:1,cancelLbl:2,title:3},XH)}}const $ne="";function $H(t){Ut(t,"svelte-15nm2zc",".tableHeader.svelte-15nm2zc{background-color:var(--se-light-grey, #cbcbcb);height:32px;padding:10px 0}")}function c8(t,n,e){const i=t.slice();return i[1]=n[e],i[3]=e,i}function u8(t){let n;return{c(){n=A("se-table-group"),n.innerHTML=' '},m(e,i){J(e,n,i)},p:et,d(e){e&&K(n)}}}function eW(t){let n,e,i,r=Dt(Array(t[0])),o=[];for(let s=0;s ',i=Y();for(let s=0;s{"rowCount"in r&&e(0,i=r.rowCount)},[i]}class f8 extends Ot{constructor(n){super(),At(this,n,tW,eW,It,{rowCount:0},$H)}}const eie="";function nW(t){Ut(t,"svelte-1gdtheg",".addOption.svelte-1gdtheg{width:100%;display:flex;flex-direction:column;margin-bottom:25px}")}function iW(t){let n;return{c(){n=A("div"),n.innerHTML=' ',x(n,"class","addOption svelte-1gdtheg")},m(e,i){J(e,n,i)},p:et,i:et,o:et,d(e){e&&K(n)}}}class d8 extends Ot{constructor(n){super(),At(this,n,null,iW,It,{},nW)}}const tie="";function rW(t){Ut(t,"svelte-v04vgg",".rounded-border.svelte-v04vgg{width:100%}")}function sW(t){let n,e,i,r,o,s,l;return r=new d8({}),s=new f8({props:{rowCount:4}}),{c(){n=A("div"),e=A("se-list"),e.innerHTML='
',i=Y(),De(r.$$.fragment),o=Y(),De(s.$$.fragment),x(n,"class","rounded-border svelte-v04vgg")},m(a,c){J(a,n,c),v(n,e),v(n,i),Me(r,n,null),v(n,o),Me(s,n,null),l=!0},p:et,i(a){l||(Q(r.$$.fragment,a),Q(s.$$.fragment,a),l=!0)},o(a){se(r.$$.fragment,a),se(s.$$.fragment,a),l=!1},d(a){a&&K(n),qe(r),qe(s)}}}class oW extends Ot{constructor(n){super(),At(this,n,null,sW,It,{},rW)}}const nie="";function aW(t){Ut(t,"svelte-xa9d9l",".rounded-border.svelte-xa9d9l.svelte-xa9d9l{display:flex;flex-direction:row}.rounded-border.svelte-xa9d9l .row.svelte-xa9d9l{width:80%;margin-right:5%}.rounded-border.svelte-xa9d9l .rightrow.svelte-xa9d9l{width:15%}")}function lW(t){let n,e,i,r,o,s,l,a;return i=new d8({}),o=new f8({props:{rowCount:4}}),{c(){n=A("div"),e=A("div"),De(i.$$.fragment),r=Y(),De(o.$$.fragment),s=Y(),l=A("div"),l.innerHTML='',x(e,"class","row svelte-xa9d9l"),x(l,"class","row rightrow svelte-xa9d9l"),x(n,"class","rounded-border display-flex svelte-xa9d9l")},m(c,u){J(c,n,u),v(n,e),Me(i,e,null),v(e,r),Me(o,e,null),v(n,s),v(n,l),a=!0},p:et,i(c){a||(Q(i.$$.fragment,c),Q(o.$$.fragment,c),a=!0)},o(c){se(i.$$.fragment,c),se(o.$$.fragment,c),a=!1},d(c){c&&K(n),qe(i),qe(o)}}}class cW extends Ot{constructor(n){super(),At(this,n,null,lW,It,{},aW)}}function uW(t){let n;return{c(){n=A("div"),n.innerHTML=' ',x(n,"class","rounded-border")},m(e,i){J(e,n,i)},p:et,i:et,o:et,d(e){e&&K(n)}}}class fW extends Ot{constructor(n){super(),At(this,n,null,uW,It,{})}}function dW(t){let n,e;return n=new oW({}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function pW(t){let n,e;return n=new fW({}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function hW(t){let n,e;return n=new cW({}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function mW(t){let n,e,i,r;const o=[hW,pW,dW],s=[];function l(a,c){return a[0]===Vn?0:a[0]===zo?1:2}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,[c]){let u=n;n=l(a),n!==u&&(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e||(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function gW(t,n,e){let{page:i=""}=n;return t.$$set=r=>{"page"in r&&e(0,i=r.page)},[i]}class K_ extends Ot{constructor(n){super(),At(this,n,gW,mW,It,{page:0})}}const iie="";function _W(t){Ut(t,"svelte-815s6d",".pw.disabled.svelte-815s6d.svelte-815s6d{pointer-events:none;opacity:0.5}.pw.align-right.svelte-815s6d.svelte-815s6d{margin-left:auto}.pw.align-left.svelte-815s6d.svelte-815s6d{margin-right:auto}.pw.display-flex.svelte-815s6d.svelte-815s6d{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-815s6d.svelte-815s6d{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-815s6d.svelte-815s6d{font-size:16px}.pw.small-font.svelte-815s6d.svelte-815s6d{font-size:14px}.pw.nano-font.svelte-815s6d.svelte-815s6d{font-size:12px}.pw.pointer.svelte-815s6d.svelte-815s6d{cursor:pointer}.pw-snackbar-elem.svelte-815s6d.svelte-815s6d{top:30px}.pw.red-color.svelte-815s6d.svelte-815s6d{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-815s6d.svelte-815s6d{display:none}.pw.width-100.svelte-815s6d.svelte-815s6d{width:100%}.pw.bold-font.svelte-815s6d.svelte-815s6d{font-weight:bold}.pw.normal-font.svelte-815s6d.svelte-815s6d{font-weight:normal;font-size:16px}.pw.error-msg.svelte-815s6d.svelte-815s6d{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-815s6d.svelte-815s6d{text-align:center}.pw.center-align-items.svelte-815s6d.svelte-815s6d{align-items:center}.pw.justify-content-center.svelte-815s6d.svelte-815s6d{justify-content:center}.pw.bom-checkbox.svelte-815s6d.svelte-815s6d{max-width:16px}.pw.ml-8.svelte-815s6d.svelte-815s6d{margin-left:8px}.pw.ml-12.svelte-815s6d.svelte-815s6d{margin-left:12px}.pw.ml-36.svelte-815s6d.svelte-815s6d{margin-left:36px}.pw.mt-8.svelte-815s6d.svelte-815s6d{margin-top:8px}.pw.mt-6.svelte-815s6d.svelte-815s6d{margin-top:6px}.pw.mt-32.svelte-815s6d.svelte-815s6d{margin-top:32px}.pw.mb-8.svelte-815s6d.svelte-815s6d{margin-bottom:8px}.pw.mb-12.svelte-815s6d.svelte-815s6d{margin-bottom:12px}.pw.mb-16.svelte-815s6d.svelte-815s6d{margin-top:16px}.pw.mb-21.svelte-815s6d.svelte-815s6d{margin-bottom:21px}.pw.mr-12.svelte-815s6d.svelte-815s6d{margin-right:12px}.pw.p-12.svelte-815s6d.svelte-815s6d{padding:12px}.pw.pl-16.svelte-815s6d.svelte-815s6d{padding-left:16px}.pw.pr-16.svelte-815s6d.svelte-815s6d{padding-right:16px}.position-absolute.svelte-815s6d.svelte-815s6d{position:absolute}.flex-wrap.svelte-815s6d.svelte-815s6d{flex-wrap:wrap}.justify-content-sp-btw.svelte-815s6d.svelte-815s6d{justify-content:space-between}.gp-10.svelte-815s6d.svelte-815s6d{gap:10px}.gp-5.svelte-815s6d.svelte-815s6d{gap:5px}.desktop-view.svelte-815s6d.svelte-815s6d{display:none}.mobile-view.svelte-815s6d.svelte-815s6d{display:block}.mobile-view-flx.svelte-815s6d.svelte-815s6d{display:flex;flex-direction:column}.rounded-border.svelte-815s6d.svelte-815s6d{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-815s6d.svelte-815s6d{text-align:right}.bg-color-light-grey.svelte-815s6d.svelte-815s6d{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-815s6d.svelte-815s6d{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-815s6d.svelte-815s6d{padding:8px 0 16px 8px}@media(min-width: 968px){.mobile-view.svelte-815s6d.svelte-815s6d,.mobile-view-flx.svelte-815s6d.svelte-815s6d{display:none}.desktop-view.svelte-815s6d.svelte-815s6d{display:inherit}}.cart-mobile-snackbar.svelte-815s6d.svelte-815s6d{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-815s6d.svelte-815s6d,.mobile-view-snackbar.svelte-815s6d.svelte-815s6d{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-815s6d.svelte-815s6d{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-815s6d.svelte-815s6d{display:block}.mobile-snackbar.svelte-815s6d.svelte-815s6d{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-815s6d.svelte-815s6d{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-815s6d.svelte-815s6d{margin:-6px}.bottom-snackbar.svelte-815s6d.svelte-815s6d{bottom:30px;top:auto}.distributor-modal.svelte-815s6d .distributor-header-section.svelte-815s6d{line-height:30px;text-align:center;overflow:hidden;background-color:var(--se-life-green, #3dcd58);padding:20px 50px 20px 20px;position:relative}.distributor-modal.svelte-815s6d .heading.svelte-815s6d{font-weight:700;font-size:26px;color:var(--se-white, #ffffff)}.distributor-modal.svelte-815s6d .cross-icon.svelte-815s6d{position:absolute;top:50%;transform:translateY(-50%);right:20px}.distributor-modal.svelte-815s6d .popup-content.svelte-815s6d{padding:0 40px;min-height:40px}@media(max-width: 768px){.distributor-modal.svelte-815s6d .popup-content.svelte-815s6d{padding:0 15px}}.distributor-modal.svelte-815s6d .zipcode-section.svelte-815s6d{text-align:center;padding:1rem;margin-bottom:2rem}.distributor-modal.svelte-815s6d .zipcode-label.svelte-815s6d{margin:10px 0}.distributor-modal.svelte-815s6d .disclaimer-section.svelte-815s6d{background-color:var(--se-orange, rgba(228, 127, 0, 0.1294117647));display:flex;align-items:center;gap:1rem;padding:1rem}.distributor-modal.svelte-815s6d .product-container.svelte-815s6d{position:relative;display:flex;justify-content:space-between;padding:2rem 0}@media(max-width: 768px){.distributor-modal.svelte-815s6d .product-container.svelte-815s6d{padding:10px 0 0;margin-bottom:5px}}.distributor-modal.svelte-815s6d .button-section.svelte-815s6d{display:flex;justify-content:center}.distributor-modal.svelte-815s6d .buy-button.svelte-815s6d{max-width:260px}.distributor-modal.svelte-815s6d .retailer-logo.svelte-815s6d{width:150px;height:90px}.distributor-modal.svelte-815s6d .retail-logo.svelte-815s6d{position:absolute;top:1rem}.distributor-modal.svelte-815s6d .success-status.svelte-815s6d{color:var(--se-life-green, #3dcd58);padding-left:1.5rem}.distributor-modal.svelte-815s6d .items-in-stock-section.svelte-815s6d{position:relative;padding-bottom:1rem}.distributor-modal.svelte-815s6d .notification-ok-icon.svelte-815s6d{position:absolute;left:0}.distributor-modal.svelte-815s6d .items-in-stock.svelte-815s6d{position:relative}.distributor-modal.svelte-815s6d .products-info-section.svelte-815s6d{display:grid;grid-template-columns:1fr 2fr;gap:1rem;padding:2px 0;font-size:14px;color:var(--se-medium-grey, #626469)}.distributor-modal.svelte-815s6d .tooltip-productInfo-container.svelte-815s6d{display:flex;gap:5px}.distributor-modal.svelte-815s6d .tooltip_content.svelte-815s6d{font-size:12px;text-overflow:ellipsis;overflow:hidden}.distributor-modal.svelte-815s6d .product-id.svelte-815s6d{min-width:150px}.distributor-modal.svelte-815s6d .product-status.svelte-815s6d{max-width:400px;display:flex;align-items:center;gap:10px}.distributor-modal.svelte-815s6d .product-status p.svelte-815s6d{font-size:14px}.distributor-modal.svelte-815s6d .green-dot.svelte-815s6d{background-color:var(--se-life-green, #3dcd58);height:5px;width:5px;border-radius:50%}.distributor-modal.svelte-815s6d .grey-dot.svelte-815s6d{background-color:var(--se-medium-grey, #9fa0a4);height:5px;width:5px;border-radius:50%}.distributor-modal.svelte-815s6d .red-dot.svelte-815s6d{background-color:var(--se-red, #dc0a0a);height:5px;width:5px;border-radius:50%}.distributor-modal.svelte-815s6d .image-section img.svelte-815s6d{width:60px;height:60px;display:inline-block;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:pre-wrap}.distributor-modal.svelte-815s6d .retailer-form.svelte-815s6d{display:none}@media(max-width: 979px){.product-container.svelte-815s6d.svelte-815s6d{flex-direction:column;width:300px}.collapse-icon.svelte-815s6d.svelte-815s6d{display:inline-flex}.desktop-view-product.svelte-815s6d.svelte-815s6d{display:none}.mobile-view-product.svelte-815s6d.svelte-815s6d{margin-bottom:1rem}}@media(min-width: 980px){.collapse-icon.svelte-815s6d.svelte-815s6d{display:none}.desktop-view-product.svelte-815s6d.svelte-815s6d{display:block}.mobile-view-product.svelte-815s6d.svelte-815s6d{display:none}}.close-color.svelte-815s6d.svelte-815s6d{color:white;font-size:26px}")}function p8(t,n,e){const i=t.slice();return i[26]=n[e],i}function h8(t,n,e){const i=t.slice();return i[29]=n[e],i[31]=e,i}function m8(t,n,e){const i=t.slice();return i[32]=n[e],i}function g8(t,n,e){const i=t.slice();return i[35]=n[e],i}function _8(t,n,e){const i=t.slice();return i[38]=n[e],i}function b8(t,n,e){const i=t.slice();return i[32]=n[e],i[42]=e,i}function v8(t,n,e){const i=t.slice();return i[35]=n[e],i[44]=e,i}function w8(t,n,e){const i=t.slice();return i[38]=n[e],i[46]=e,i}function y8(t){let n;return{c(){n=A("se-loading"),w(n,"loading",!0),w(n,"full-page","true"),w(n,"overlay","true")},m(e,i){J(e,n,i)},d(e){e&&K(n)}}}function bW(t){let n,e=t[8]("distributor.no_distributor_message")+"",i;return{c(){n=A("se-block"),i=de(e)},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&256&&e!==(e=r[8]("distributor.no_distributor_message")+"")&&be(i,e)},d(r){r&&K(n)}}}function vW(t){let n,e=Dt(t[1]),i=[];for(let r=0;r0&&P8(t),o=((u=(c=t[29])==null?void 0:c.ProductsCarriedOutOfStock)==null?void 0:u.length)>0&&L8(t),s=((f=(d=t[29])==null?void 0:d.ProductsNotCarried)==null?void 0:f.length)>0&&R8(t);return{c(){n=A("div"),r&&r.c(),e=Y(),o&&o.c(),i=Y(),s&&s.c(),x(n,"class","mobile-view-product svelte-815s6d"),x(n,"id","mobile-view-product")},m(p,m){J(p,n,m),r&&r.m(n,null),v(n,e),o&&o.m(n,null),v(n,i),s&&s.m(n,null)},p(p,m){var g,h,_,b,y,k;((h=(g=p[29])==null?void 0:g.ProductsCarriedInStock)==null?void 0:h.length)>0?r?r.p(p,m):(r=P8(p),r.c(),r.m(n,e)):r&&(r.d(1),r=null),((b=(_=p[29])==null?void 0:_.ProductsCarriedOutOfStock)==null?void 0:b.length)>0?o?o.p(p,m):(o=L8(p),o.c(),o.m(n,i)):o&&(o.d(1),o=null),((k=(y=p[29])==null?void 0:y.ProductsNotCarried)==null?void 0:k.length)>0?s?s.p(p,m):(s=R8(p),s.c(),s.m(n,null)):s&&(s.d(1),s=null)},d(p){p&&K(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function P8(t){let n,e=Dt(t[29].ProductsCarriedInStock),i=[];for(let r=0;r0&&S8(t),Z=((X=(F=t[29])==null?void 0:F.ProductsCarriedOutOfStock)==null?void 0:X.length)>0&&C8(t),V=((ue=(le=t[29])==null?void 0:le.ProductsNotCarried)==null?void 0:ue.length)>0&&I8(t),ne=t[3][t[31]]&&O8(t);function W(){return t[16](t[29])}return{c(){var ee,$;n=A("div"),e=A("div"),i=A("img"),l=Y(),a=A("div"),c=A("div"),B&&B.c(),d=Y(),f=A("div"),m=de(p),g=de(" : "),_=de(h),b=Y(),y=A("se-icon"),T=de(k),O=Y(),j=A("div"),H&&H.c(),q=Y(),Z&&Z.c(),M=Y(),V&&V.c(),z=Y(),ne&&ne.c(),D=Y(),P=A("div"),L=A("qds-button"),S=Y(),I=A("se-divider"),rr(i.src,r=t[29].RetailerLogo)||x(i,"src",r),x(i,"alt",o=(ee=t[29])==null?void 0:ee.RetailerName),x(i,"class","retail-logo svelte-815s6d"),x(e,"class","retailer-logo svelte-815s6d"),x(e,"title",s=(($=t[29])==null?void 0:$.RetailerName)||Te),w(y,"id","close-popup"),w(y,"class","pointer collapse-icon svelte-815s6d"),w(y,"size","nano"),x(f,"class","items-in-stock svelte-815s6d"),x(c,"class",R="items-in-stock-section "+(t[10](t[29],!0)?"success-status":Te)+" svelte-815s6d"),x(j,"class","desktop-view-product svelte-815s6d"),x(j,"id","desktop-view-product"),x(a,"class","products-section"),w(L,"buttonsize","large"),w(L,"class","buy-button pw width-100 svelte-815s6d"),w(L,"icon-name","arrow-top-right-on-square"),w(L,"text",C=t[8]("bom_manager.buy_now")),w(L,"type","button"),w(L,"importance","emphasized"),x(P,"class","button-section svelte-815s6d"),x(n,"class","product-container svelte-815s6d"),w(I,"class","se-divider")},m(ee,$){J(ee,n,$),v(n,e),v(e,i),v(n,l),v(n,a),v(a,c),B&&B.m(c,null),v(c,d),v(c,f),v(f,m),v(f,g),v(f,_),v(f,b),v(f,y),v(y,T),v(a,O),v(a,j),H&&H.m(j,null),v(j,q),Z&&Z.m(j,null),v(j,M),V&&V.m(j,null),v(a,z),ne&&ne.m(a,null),v(n,D),v(n,P),v(P,L),J(ee,S,$),J(ee,I,$),N||(E=[xe(f,"click",U),xe(L,"click",W)],N=!0)},p(ee,$){var he,me,te,oe,ce,ge,fe,ae;t=ee,$[0]&2&&!rr(i.src,r=t[29].RetailerLogo)&&x(i,"src",r),$[0]&2&&o!==(o=(he=t[29])==null?void 0:he.RetailerName)&&x(i,"alt",o),$[0]&2&&s!==(s=((me=t[29])==null?void 0:me.RetailerName)||Te)&&x(e,"title",s),$[0]&2&&(u=t[10](t[29],!0)),u?B||(B=k8(),B.c(),B.m(c,d)):B&&(B.d(1),B=null),$[0]&256&&p!==(p=t[8]("distributor.items_in_stock")+"")&&be(m,p),$[0]&2&&h!==(h=t[10](t[29])+"")&&be(_,h),$[0]&8&&k!==(k=t[3][t[31]]?"arrow2_up":"arrow2_down")&&be(T,k),$[0]&2&&R!==(R="items-in-stock-section "+(t[10](t[29],!0)?"success-status":Te)+" svelte-815s6d")&&x(c,"class",R),((oe=(te=t[29])==null?void 0:te.ProductsCarriedInStock)==null?void 0:oe.length)>0?H?H.p(t,$):(H=S8(t),H.c(),H.m(j,q)):H&&(H.d(1),H=null),((ge=(ce=t[29])==null?void 0:ce.ProductsCarriedOutOfStock)==null?void 0:ge.length)>0?Z?Z.p(t,$):(Z=C8(t),Z.c(),Z.m(j,M)):Z&&(Z.d(1),Z=null),((ae=(fe=t[29])==null?void 0:fe.ProductsNotCarried)==null?void 0:ae.length)>0?V?V.p(t,$):(V=I8(t),V.c(),V.m(j,null)):V&&(V.d(1),V=null),t[3][t[31]]?ne?ne.p(t,$):(ne=O8(t),ne.c(),ne.m(a,null)):ne&&(ne.d(1),ne=null),$[0]&256&&C!==(C=t[8]("bom_manager.buy_now"))&&w(L,"text",C)},d(ee){ee&&(K(n),K(S),K(I)),B&&B.d(),H&&H.d(),Z&&Z.d(),V&&V.d(),ne&&ne.d(),N=!1,An(E)}}}function D8(t){let n,e,i,r,o=t[6].Parameters&&B8(t);return{c(){var s;n=A("div"),e=A("form"),o&&o.c(),x(e,"action",i=t[6].Action),x(e,"target",sd),x(e,"method","post"),x(e,"enctype",r=t[6].FormAttributes?(s=t[6].FormAttributes)==null?void 0:s.enctype:null),x(n,"class","retailer-form")},m(s,l){J(s,n,l),v(n,e),o&&o.m(e,null),t[17](e)},p(s,l){var a;s[6].Parameters?o?o.p(s,l):(o=B8(s),o.c(),o.m(e,null)):o&&(o.d(1),o=null),l[0]&64&&i!==(i=s[6].Action)&&x(e,"action",i),l[0]&64&&r!==(r=s[6].FormAttributes?(a=s[6].FormAttributes)==null?void 0:a.enctype:null)&&x(e,"enctype",r)},d(s){s&&K(n),o&&o.d(),t[17](null)}}}function B8(t){let n;function e(o,s){return o[6].DisplayName!==VL.SONEPARFR?yW:wW}let i=e(t),r=i(t);return{c(){r.c(),n=wt()},m(o,s){r.m(o,s),J(o,n,s)},p(o,s){i===(i=e(o))&&r?r.p(o,s):(r.d(1),r=i(o),r&&(r.c(),r.m(n.parentNode,n)))},d(o){o&&K(n),r.d(o)}}}function wW(t){let n,e;return{c(){var i;n=A("input"),x(n,"type","hidden"),x(n,"name",e=(i=t[6].Parameters[0])==null?void 0:i.Products)},m(i,r){J(i,n,r)},p(i,r){var o;r[0]&64&&e!==(e=(o=i[6].Parameters[0])==null?void 0:o.Products)&&x(n,"name",e)},d(i){i&&K(n)}}}function yW(t){let n,e,i,r=Dt(t[6].Parameters),o=[];for(let s=0;s0)return vW;if(((z=j[1])==null?void 0:z.length)===0&&!j[2])return bW}let y=b(t),k=y&&y(t),T=((O=t[6])==null?void 0:O.Action)&&D8(t),R=t[4]&&z8(t);return{c(){n=A("se-dialog"),e=A("div"),i=A("p"),o=de(r),s=Y(),l=A("qds-icon"),l.innerHTML="",a=Y(),_&&_.c(),c=Y(),u=A("se-dialog-content"),k&&k.c(),d=Y(),T&&T.c(),f=Y(),R&&R.c(),p=wt(),x(i,"class","heading svelte-815s6d"),x(i,"id","popup-header"),w(l,"data-testid","close-popup"),w(l,"class","cross-icon pw pointer close-color svelte-815s6d"),w(l,"name","cross-circle"),w(l,"color","standard"),w(l,"id","close-popup"),x(e,"class","distributor-header-section svelte-815s6d"),w(u,"class","popup-content svelte-815s6d"),w(n,"id","distributor-modal"),w(n,"can-backdrop","false"),w(n,"open",t[0]),w(n,"class","distributor-modal svelte-815s6d"),w(n,"size","xlarge")},m(j,q){J(j,n,q),v(n,e),v(e,i),v(i,o),v(e,s),v(e,l),v(n,a),_&&_.m(n,null),v(n,c),v(n,u),k&&k.m(u,null),J(j,d,q),T&&T.m(j,q),J(j,f,q),R&&R.m(j,q),J(j,p,q),m=!0,g||(h=xe(l,"click",t[14]),g=!0)},p(j,q){var M;(!m||q[0]&256)&&r!==(r=j[8]("distributor.buy_online")+"")&&be(o,r),j[2]?_||(_=y8(),_.c(),_.m(n,c)):_&&(_.d(1),_=null),y===(y=b(j))&&k?k.p(j,q):(k&&k.d(1),k=y&&y(j),k&&(k.c(),k.m(u,null))),(!m||q[0]&1)&&w(n,"open",j[0]),(M=j[6])!=null&&M.Action?T?T.p(j,q):(T=D8(j),T.c(),T.m(f.parentNode,f)):T&&(T.d(1),T=null),j[4]?R?(R.p(j,q),q[0]&16&&Q(R,1)):(R=z8(j),R.c(),Q(R,1),R.m(p.parentNode,p)):R&&(Je(),se(R,1,1,()=>{R=null}),Qe())},i(j){m||(Q(R),m=!0)},o(j){se(R),m=!1},d(j){j&&(K(n),K(d),K(f),K(p)),_&&_.d(),k&&k.d(),T&&T.d(j),R&&R.d(j),g=!1,h()}}}function F8(t,n=[]){return t&&Array.isArray(t.groups)&&(t==null||t.groups.forEach(e=>F8(e,n))),t!=null&&t.parts&&Array.isArray(t==null?void 0:t.parts)&&(t==null||t.parts.forEach(e=>{n.push({pid:(e==null?void 0:e.productRef)||(e==null?void 0:e.productId),qty:e==null?void 0:e.quantity})})),n}function SW(t,n,e){let i,r;ye(t,$r,P=>e(21,i=P)),ye(t,Vt,P=>e(8,r=P));const o=Mn();let{open:s=!1}=n,l=Li,a=!1,c=Li,u=!1,d=Hi,f={},p,m=[];Un(()=>{Oi(lA),m=F8(i==null?void 0:i.bom),h()}),Kn(()=>{Oi(Kr)});function g(){o(Qi.CLOSE)}async function h(){e(2,a=!0);try{const P=await _();P.Status===Gv.OK&&(e(1,l=(P==null?void 0:P.RetailerCarts)||Li),e(3,c=Array.from(l).fill(!1))),e(2,a=!1)}catch(P){Yg(),ve.error(P),e(2,a=!1)}}function _(){if((m==null?void 0:m.length)>0){const P={key:zc.API_KEY,mk:zc.MK,lang:zc.LANG,pdata:m,csi_wtbsource:zc.CSI_WTBSOURCE},L=zc.CART_URL,C={method:mi.POST,unsecure:!1,body:JSON.stringify(P)};return Pn(L,C)}}function b(P,L=!1){var I,N,E,B;const C=((I=P==null?void 0:P.ProductsCarriedInStock)==null?void 0:I.length)+((N=P==null?void 0:P.ProductsCarriedOutOfStock)==null?void 0:N.length)+((E=P==null?void 0:P.ProductsNotCarried)==null?void 0:E.length),S=(B=P==null?void 0:P.ProductsCarriedInStock)==null?void 0:B.length;return L?S/C===GN:`${S}/${C}`}function y(P){const L={key:zc.API_KEY,retailerCartID:P,pdata:m},C=zc.TRANSFER_API,S={method:mi.POST,unsecure:!1,body:JSON.stringify(L)};return Pn(C,S)}async function k(){e(4,u=!1),e(2,a=!0);try{const P=await y(d==null?void 0:d.RetailerCartId);e(2,a=!1),P.Status===Gv.SUCCESS&&(e(6,f=P),e(6,f.DisplayName=d==null?void 0:d.DisplayName,f),ve.info(p),P.Action&&setTimeout(()=>{p==null||p.submit()},500))}catch(P){Yg(),ve.error(P,"handleCartTransfer"),e(2,a=!1)}finally{Bn(Nn.VIEW_ITEM_LIST,i,d==null?void 0:d.RetailerName,"buy_from_distributor")}}function T(){var L,C;const P=((C=(L=i==null?void 0:i.bom)==null?void 0:L.parts)==null?void 0:C.filter(S=>{var I,N;return(S==null?void 0:S.configurationId)||((I=S==null?void 0:S.eolStatus)==null?void 0:I[0])===Ga||((N=S==null?void 0:S.eolStatus)==null?void 0:N[0])===sg}))||[];return(P==null?void 0:P.length)>0}function R(P){var C,S;const L=m==null?void 0:m.filter(I=>(I==null?void 0:I.pid)===P);return[vo((C=L==null?void 0:L[0])==null?void 0:C.pdpUrl)||Te,((S=L==null?void 0:L[0])==null?void 0:S.description)||Te]}const O=()=>{g()},j=P=>{const L=[...c];L[P]=!L[P],e(3,c=L)},q=P=>{e(5,d=P),T()?e(4,u=!0):k()};function M(P){_t[P?"unshift":"push"](()=>{p=P,e(7,p)})}const z=()=>e(4,u=!1),D=()=>k();return t.$$set=P=>{"open"in P&&e(0,s=P.open)},[s,l,a,c,u,d,f,p,r,g,b,k,T,R,O,j,q,M,z,D]}class TW extends Ot{constructor(n){super(),At(this,n,SW,kW,It,{open:0},_W,[-1,-1])}}const rie="";function CW(t){Ut(t,"svelte-gwv9xt",".pw.disabled.svelte-gwv9xt.svelte-gwv9xt{pointer-events:none;opacity:0.5}.pw.align-right.svelte-gwv9xt.svelte-gwv9xt{margin-left:auto}.pw.align-left.svelte-gwv9xt.svelte-gwv9xt{margin-right:auto}.pw.display-flex.svelte-gwv9xt.svelte-gwv9xt{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-gwv9xt.svelte-gwv9xt{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-gwv9xt.svelte-gwv9xt{font-size:16px}.pw.small-font.svelte-gwv9xt.svelte-gwv9xt{font-size:14px}.pw.nano-font.svelte-gwv9xt.svelte-gwv9xt{font-size:12px}.pw.pointer.svelte-gwv9xt.svelte-gwv9xt{cursor:pointer}.pw-snackbar-elem.svelte-gwv9xt.svelte-gwv9xt{top:30px}.pw.red-color.svelte-gwv9xt.svelte-gwv9xt{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-gwv9xt.svelte-gwv9xt{display:none}.pw.width-100.svelte-gwv9xt.svelte-gwv9xt{width:100%}.pw.bold-font.svelte-gwv9xt.svelte-gwv9xt{font-weight:bold}.pw.normal-font.svelte-gwv9xt.svelte-gwv9xt{font-weight:normal;font-size:16px}.pw.error-msg.svelte-gwv9xt.svelte-gwv9xt{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-gwv9xt.svelte-gwv9xt{text-align:center}.pw.center-align-items.svelte-gwv9xt.svelte-gwv9xt{align-items:center}.pw.justify-content-center.svelte-gwv9xt.svelte-gwv9xt{justify-content:center}.pw.bom-checkbox.svelte-gwv9xt.svelte-gwv9xt{max-width:16px}.pw.ml-8.svelte-gwv9xt.svelte-gwv9xt{margin-left:8px}.pw.ml-12.svelte-gwv9xt.svelte-gwv9xt{margin-left:12px}.pw.ml-36.svelte-gwv9xt.svelte-gwv9xt{margin-left:36px}.pw.mt-8.svelte-gwv9xt.svelte-gwv9xt{margin-top:8px}.pw.mt-6.svelte-gwv9xt.svelte-gwv9xt{margin-top:6px}.pw.mt-32.svelte-gwv9xt.svelte-gwv9xt{margin-top:32px}.pw.mb-8.svelte-gwv9xt.svelte-gwv9xt{margin-bottom:8px}.pw.mb-12.svelte-gwv9xt.svelte-gwv9xt{margin-bottom:12px}.pw.mb-16.svelte-gwv9xt.svelte-gwv9xt{margin-top:16px}.pw.mb-21.svelte-gwv9xt.svelte-gwv9xt{margin-bottom:21px}.pw.mr-12.svelte-gwv9xt.svelte-gwv9xt{margin-right:12px}.pw.p-12.svelte-gwv9xt.svelte-gwv9xt{padding:12px}.pw.pl-16.svelte-gwv9xt.svelte-gwv9xt{padding-left:16px}.pw.pr-16.svelte-gwv9xt.svelte-gwv9xt{padding-right:16px}h4.heading.svelte-gwv9xt.svelte-gwv9xt{font-weight:500}.position-absolute.svelte-gwv9xt.svelte-gwv9xt{position:absolute}.flex-wrap.svelte-gwv9xt.svelte-gwv9xt{flex-wrap:wrap}.justify-content-sp-btw.svelte-gwv9xt.svelte-gwv9xt{justify-content:space-between}.gp-10.svelte-gwv9xt.svelte-gwv9xt{gap:10px}.gp-5.svelte-gwv9xt.svelte-gwv9xt{gap:5px}.desktop-view.svelte-gwv9xt.svelte-gwv9xt{display:none}.mobile-view.svelte-gwv9xt.svelte-gwv9xt{display:block}.mobile-view-flx.svelte-gwv9xt.svelte-gwv9xt{display:flex;flex-direction:column}.rounded-border.svelte-gwv9xt.svelte-gwv9xt{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-gwv9xt.svelte-gwv9xt{text-align:right}.bg-color-light-grey.svelte-gwv9xt.svelte-gwv9xt{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-gwv9xt.svelte-gwv9xt{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-gwv9xt.svelte-gwv9xt{padding:8px 0 16px 8px}.country-fr.svelte-gwv9xt .config-container.svelte-gwv9xt,.country-fr.svelte-gwv9xt .excel-container.svelte-gwv9xt,.country-pt.svelte-gwv9xt .config-container.svelte-gwv9xt,.country-pt.svelte-gwv9xt .excel-container.svelte-gwv9xt{padding-left:5px}.country-fr.svelte-gwv9xt .config-container .excel-heading.svelte-gwv9xt,.country-fr.svelte-gwv9xt .config-container .upload-container.svelte-gwv9xt,.country-fr.svelte-gwv9xt .excel-container .excel-heading.svelte-gwv9xt,.country-fr.svelte-gwv9xt .excel-container .upload-container.svelte-gwv9xt,.country-pt.svelte-gwv9xt .config-container .excel-heading.svelte-gwv9xt,.country-pt.svelte-gwv9xt .config-container .upload-container.svelte-gwv9xt,.country-pt.svelte-gwv9xt .excel-container .excel-heading.svelte-gwv9xt,.country-pt.svelte-gwv9xt .excel-container .upload-container.svelte-gwv9xt{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-gwv9xt .button-action-section.svelte-gwv9xt,.country-pt.svelte-gwv9xt .button-action-section.svelte-gwv9xt{font-size:var(--p-font-size, 0.87rem)}.country-fr.svelte-gwv9xt .search-label.svelte-gwv9xt,.country-fr.svelte-gwv9xt .with-icon.svelte-gwv9xt,.country-pt.svelte-gwv9xt .search-label.svelte-gwv9xt,.country-pt.svelte-gwv9xt .with-icon.svelte-gwv9xt{font-size:var(--p-font-size, 0.87rem)}@media(min-width: 968px){.mobile-view.svelte-gwv9xt.svelte-gwv9xt,.mobile-view-flx.svelte-gwv9xt.svelte-gwv9xt{display:none}.desktop-view.svelte-gwv9xt.svelte-gwv9xt{display:inherit}}.cart-mobile-snackbar.svelte-gwv9xt.svelte-gwv9xt{position:fixed;top:0;width:100%;height:92px;font-size:12px}.cart-mobile-snackbar.svelte-gwv9xt .mobile-snackbar.svelte-gwv9xt{flex-direction:column;height:92px;justify-content:center}.cart-mobile-snackbar.svelte-gwv9xt .mobile-snackbar .snackbar-btn-class.svelte-gwv9xt{max-width:90%;padding:6px;border:solid 2px;cursor:pointer;margin-top:17px;width:90%;text-align:center;border-radius:5px}.desktop-view-snackbar.svelte-gwv9xt.svelte-gwv9xt,.mobile-view-snackbar.svelte-gwv9xt.svelte-gwv9xt{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-gwv9xt.svelte-gwv9xt{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-gwv9xt.svelte-gwv9xt{display:block}.mobile-snackbar.svelte-gwv9xt.svelte-gwv9xt{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-gwv9xt.svelte-gwv9xt{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.snackbar-mobile-div.svelte-gwv9xt .snackbar-header.svelte-gwv9xt{padding:12px 20px}.snackbar-mobile-div.svelte-gwv9xt .close-snackbar.svelte-gwv9xt{padding:10px 16px}.snackbar-mobile-div.svelte-gwv9xt .snackbar-btn-class-div.svelte-gwv9xt{width:90%;border-radius:5px;border:2px solid white;height:34px;margin:5px 18px;justify-content:center;align-items:center}.cross-margin.svelte-gwv9xt.svelte-gwv9xt{margin:-6px}.bottom-snackbar.svelte-gwv9xt.svelte-gwv9xt{bottom:30px;top:auto}.cart.svelte-gwv9xt.svelte-gwv9xt{padding-bottom:14px;font-size:42px;padding-top:12px}.user-cart.svelte-gwv9xt.svelte-gwv9xt{padding-top:16px;gap:10px}.user-cart.svelte-gwv9xt .add-product.svelte-gwv9xt{width:75%;border-radius:8px;margin:10px 0;flex-direction:column}.user-cart.svelte-gwv9xt .add-config-id.svelte-gwv9xt{border:2px solid var(--se-ultra-light-grey-3, #f3f2f2);border-radius:8px}.user-cart.svelte-gwv9xt .total-items.svelte-gwv9xt{width:25%;margin:10px 0;border-radius:8px;background-color:var(--se-white, #ffffff);flex-direction:column;height:fit-content;border:2px solid var(--se-ultra-light-grey-3, #f3f2f2)}.user-cart.svelte-gwv9xt .cart-options-next.svelte-gwv9xt{width:100%}.user-cart.svelte-gwv9xt .product-price.svelte-gwv9xt{padding:3px}.user-cart.svelte-gwv9xt .button-action-section.svelte-gwv9xt{flex-direction:column;align-items:start;gap:0.25rem;padding:10px 20px}.add-products-accordion.svelte-gwv9xt.svelte-gwv9xt{margin:20px;border:1px solid #e6e6e6;border-radius:8px;background-color:var(--se-white, #ffffff);font-weight:700}.buy-options.svelte-gwv9xt.svelte-gwv9xt{justify-content:space-between;align-items:center;background-color:var(--se-white, #ffffff);padding:20px;border-radius:8px}.product-items.svelte-gwv9xt.svelte-gwv9xt{justify-content:space-between;align-items:center;background-color:var(--se-white, #ffffff);padding:8px;border-radius:8px}@media(max-width: 768px){.product-items.svelte-gwv9xt.svelte-gwv9xt{border-radius:0px}}.back-btn.svelte-gwv9xt.svelte-gwv9xt{width:100%}.user-buy-options.svelte-gwv9xt.svelte-gwv9xt{width:80%;border-radius:8px;margin:10px;flex-direction:column;gap:10px}.padding-10.svelte-gwv9xt.svelte-gwv9xt{padding:10px}.mobile-action-buttons.svelte-gwv9xt.svelte-gwv9xt{font-weight:normal}.visibility.svelte-gwv9xt.svelte-gwv9xt{visibility:visible}@media(max-width: 968px){.mobile-action-buttons.svelte-gwv9xt.svelte-gwv9xt{font-size:13px}.cart.svelte-gwv9xt.svelte-gwv9xt{padding-left:10px;padding-bottom:12px}.total-items.svelte-gwv9xt.svelte-gwv9xt{flex-direction:column;box-shadow:1px 0 5px var(--se-super-light-grey, #e6e6e6);position:fixed;bottom:0;left:0;width:100%;z-index:5}.back-btn.svelte-gwv9xt.svelte-gwv9xt{padding:4px}.product-price.svelte-gwv9xt.svelte-gwv9xt{position:relative;top:2px}.add-product.svelte-gwv9xt.svelte-gwv9xt{flex-direction:column}}.validation-warning.svelte-gwv9xt.svelte-gwv9xt{padding-left:10px;padding-bottom:10px;color:var(--se-red, #dc0a0a);gap:4px}.validation-warning.svelte-gwv9xt .info-container.svelte-gwv9xt{padding-top:2px}.price-mobile-view.svelte-gwv9xt.svelte-gwv9xt{z-index:1000}.cross-icon.svelte-gwv9xt.svelte-gwv9xt{position:absolute;right:8px;top:8px}.heading.svelte-gwv9xt.svelte-gwv9xt{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px}.dialog-footer-button.svelte-gwv9xt.svelte-gwv9xt{margin-top:12px;margin-left:-4px}.popup-content.svelte-gwv9xt.svelte-gwv9xt{padding:0px 20px;margin-bottom:20px;margin-top:-16px}")}function x8(t){let n;return{c(){n=A("se-loading"),w(n,"loading",!0),w(n,"full-page","true"),w(n,"overlay","true")},m(e,i){J(e,n,i)},d(e){e&&K(n)}}}function G8(t){let n,e,i,r,o;return{c(){n=A("div"),e=A("div"),e.innerHTML='action_delete_cross',i=Y(),r=A("div"),o=de(t[22]),x(e,"class","notification-icon-container"),x(r,"class","info-container svelte-gwv9xt"),x(n,"class","validation-warning display-flex center-align-items svelte-gwv9xt")},m(s,l){J(s,n,l),v(n,e),v(n,i),v(n,r),v(r,o)},p(s,l){l[0]&4194304&&be(o,s[22])},d(s){s&&K(n)}}}function EW(t){let n,e=t[30]("generic.cart")+"",i;return{c(){n=A("h1"),i=de(e),x(n,"class","cart svelte-gwv9xt")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&1073741824&&e!==(e=r[30]("generic.cart")+"")&&be(i,e)},d(r){r&&K(n)}}}function IW(t){let n,e;return n=new K_({props:{page:Vn}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p:et,i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function AW(t){var D,P,L,C,S,I;let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h=zt()&&t[27],_,b,y=!t[31]&&!t[28]&&H8(t),k=t[31]&&W8(t),T=!t[31]&&!t[28]&&V8(t),R=t[33]&&(((L=(P=(D=t[11])==null?void 0:D.bom)==null?void 0:P.groups)==null?void 0:L.length)||((I=(S=(C=t[11])==null?void 0:C.bom)==null?void 0:S.parts)==null?void 0:I.length))&&Y8(t),O=!t[31]&&!t[28]&&K8(t),j=t[31]&&J8(t),q=!t[31]&&!t[28]&&Q8(t),M=!t[28]&&$8(t),z=h&&r5();return{c(){n=A("div"),e=A("div"),i=A("div"),y&&y.c(),r=Y(),k&&k.c(),o=Y(),T&&T.c(),s=Y(),R&&R.c(),l=Y(),a=A("div"),c=A("div"),u=A("div"),d=A("div"),O&&O.c(),f=Y(),j&&j.c(),p=Y(),q&&q.c(),m=Y(),M&&M.c(),g=Y(),z&&z.c(),_=wt(),x(e,"class","display-flex add-product svelte-gwv9xt"),x(n,"class","mobile-view svelte-gwv9xt"),x(d,"class","product-content"),x(u,"class","display-flex add-product svelte-gwv9xt"),x(c,"class","user-cart display-flex svelte-gwv9xt"),x(a,"class","desktop-view svelte-gwv9xt")},m(N,E){J(N,n,E),v(n,e),v(e,i),y&&y.m(i,null),v(i,r),k&&k.m(i,null),v(e,o),T&&T.m(e,null),v(n,s),R&&R.m(n,null),J(N,l,E),J(N,a,E),v(a,c),v(c,u),v(u,d),O&&O.m(d,null),v(d,f),j&&j.m(d,null),v(u,p),q&&q.m(u,null),v(c,m),M&&M.m(c,null),J(N,g,E),z&&z.m(N,E),J(N,_,E),b=!0},p(N,E){var B,U,H,Z,V,ne;!N[31]&&!N[28]?y?(y.p(N,E),E[0]&268435456|E[1]&1&&Q(y,1)):(y=H8(N),y.c(),Q(y,1),y.m(i,r)):y&&(Je(),se(y,1,1,()=>{y=null}),Qe()),N[31]?k?(k.p(N,E),E[1]&1&&Q(k,1)):(k=W8(N),k.c(),Q(k,1),k.m(i,null)):k&&(Je(),se(k,1,1,()=>{k=null}),Qe()),!N[31]&&!N[28]?T?(T.p(N,E),E[0]&268435456|E[1]&1&&Q(T,1)):(T=V8(N),T.c(),Q(T,1),T.m(e,null)):T&&(Je(),se(T,1,1,()=>{T=null}),Qe()),N[33]&&((H=(U=(B=N[11])==null?void 0:B.bom)==null?void 0:U.groups)!=null&&H.length||(ne=(V=(Z=N[11])==null?void 0:Z.bom)==null?void 0:V.parts)!=null&&ne.length)?R?R.p(N,E):(R=Y8(N),R.c(),R.m(n,null)):R&&(R.d(1),R=null),!N[31]&&!N[28]?O?(O.p(N,E),E[0]&268435456|E[1]&1&&Q(O,1)):(O=K8(N),O.c(),Q(O,1),O.m(d,f)):O&&(Je(),se(O,1,1,()=>{O=null}),Qe()),N[31]?j?(j.p(N,E),E[1]&1&&Q(j,1)):(j=J8(N),j.c(),Q(j,1),j.m(d,null)):j&&(Je(),se(j,1,1,()=>{j=null}),Qe()),!N[31]&&!N[28]?q?(q.p(N,E),E[0]&268435456|E[1]&1&&Q(q,1)):(q=Q8(N),q.c(),Q(q,1),q.m(u,null)):q&&(Je(),se(q,1,1,()=>{q=null}),Qe()),N[28]?M&&(Je(),se(M,1,1,()=>{M=null}),Qe()):M?(M.p(N,E),E[0]&268435456&&Q(M,1)):(M=$8(N),M.c(),Q(M,1),M.m(c,null)),E[0]&134217728&&(h=zt()&&N[27]),h?z||(z=r5(),z.c(),z.m(_.parentNode,_)):z&&(z.d(1),z=null)},i(N){b||(Q(y),Q(k),Q(T),Q(O),Q(j),Q(q),Q(M),b=!0)},o(N){se(y),se(k),se(T),se(O),se(j),se(q),se(M),b=!1},d(N){N&&(K(n),K(l),K(a),K(g),K(_)),y&&y.d(),k&&k.d(),T&&T.d(),R&&R.d(),O&&O.d(),j&&j.d(),q&&q.d(),M&&M.d(),z&&z.d(N)}}}function H8(t){let n,e,i,r,o;return i=new r1({props:{projectId:t[0],apigeeToken:t[5],language:t[3],country:t[2],token:t[4],businessunit:t[6],selectAndConfigBearerToken:t[8],isCart:!0,view:z0}}),{c(){n=A("se-list"),e=A("se-list-group"),De(i.$$.fragment),w(e,"id","add-products"),w(e,"item",r=t[30]("cart.add_products")),w(e,"class","add-products-accordion svelte-gwv9xt"),w(n,"option","classic"),w(n,"can-collapse","true"),w(n,"selected-color","primary")},m(s,l){J(s,n,l),v(n,e),Me(i,e,null),o=!0},p(s,l){const a={};l[0]&1&&(a.projectId=s[0]),l[0]&32&&(a.apigeeToken=s[5]),l[0]&8&&(a.language=s[3]),l[0]&4&&(a.country=s[2]),l[0]&16&&(a.token=s[4]),l[0]&64&&(a.businessunit=s[6]),l[0]&256&&(a.selectAndConfigBearerToken=s[8]),i.$set(a),(!o||l[0]&1073741824&&r!==(r=s[30]("cart.add_products")))&&w(e,"item",r)},i(s){o||(Q(i.$$.fragment,s),o=!0)},o(s){se(i.$$.fragment,s),o=!1},d(s){s&&K(n),qe(i)}}}function W8(t){let n,e;return n=new ck({}),n.$on("buyOptionSelection",t[56]),n.$on("sendBomDataToCpq",t[57]),n.$on("destroyListOptions",t[58]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p:et,i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function V8(t){let n,e,i;return e=new s8({props:{country:t[2],language:t[3],projectData:t[11],bomData:t[11].bom?t[11].bom:Hi}}),{c(){n=A("div"),De(e.$$.fragment)},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&4&&(s.country=r[2]),o[0]&8&&(s.language=r[3]),o[0]&2048&&(s.projectData=r[11]),o[0]&2048&&(s.bomData=r[11].bom?r[11].bom:Hi),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function Y8(t){let n,e,i,r,o=t[30]("unified_checkout.total_items")+"",s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T=(t[12][hs]===Ae.SHOW||t[12][hs]===Ae.DISABLED)&&Z8(t);function R(q,M){return q[31]?LW:NW}let O=R(t),j=O(t);return{c(){n=A("div"),e=A("div"),i=A("div"),r=A("span"),s=de(o),l=de(":"),a=Y(),c=A("div"),u=A("span"),d=de(t[23]),f=Y(),T&&T.c(),p=Y(),m=A("div"),j.c(),g=Y(),h=A("qds-button"),x(i,"class","display-flex svelte-gwv9xt"),x(c,"class","display-flex select-option svelte-gwv9xt"),x(e,"class","display-flex product-items svelte-gwv9xt"),w(h,"class",_="back-btn "+(t[25]?"pw disabled":Te)+" svelte-gwv9xt"),w(h,"id","show-cart-buying"),w(h,"icon","arrow2_left"),w(h,"disabled",t[25]),w(h,"text",b=t[30]("generic.next")),w(h,"importance","emphasized"),x(m,"class","display-flex product-items svelte-gwv9xt"),x(n,"class","display-flex total-items pw bold-font price-mobile-view svelte-gwv9xt")},m(q,M){J(q,n,M),v(n,e),v(e,i),v(i,r),v(r,s),v(r,l),v(e,a),v(e,c),v(c,u),v(u,d),v(n,f),T&&T.m(n,null),v(n,p),v(n,m),j.m(m,null),v(m,g),v(m,h),y||(k=xe(h,"click",t[64]),y=!0)},p(q,M){M[0]&1073741824&&o!==(o=q[30]("unified_checkout.total_items")+"")&&be(s,o),M[0]&8388608&&be(d,q[23]),q[12][hs]===Ae.SHOW||q[12][hs]===Ae.DISABLED?T?T.p(q,M):(T=Z8(q),T.c(),T.m(n,p)):T&&(T.d(1),T=null),O===(O=R(q))&&j?j.p(q,M):(j.d(1),j=O(q),j&&(j.c(),j.m(m,g))),M[0]&33554432&&_!==(_="back-btn "+(q[25]?"pw disabled":Te)+" svelte-gwv9xt")&&w(h,"class",_),M[0]&33554432&&w(h,"disabled",q[25]),M[0]&1073741824&&b!==(b=q[30]("generic.next"))&&w(h,"text",b)},d(q){q&&K(n),T&&T.d(),j.d(),y=!1,k()}}}function Z8(t){let n,e,i=t[30]("generic.uc_total")+"",r,o,s,l,a,c,u;function d(g,h){return g[32]?PW:OW}let f=d(t),p=f(t),m=t[34]&&!t[32]&&X8(t);return{c(){n=A("div"),e=A("span"),r=de(i),o=de(":"),s=Y(),l=A("div"),a=A("span"),p.c(),c=Y(),u=A("span"),m&&m.c(),x(l,"class","display-flex pw center-align-items select-option svelte-gwv9xt"),x(n,"class","display-flex pw center-align-items product-items svelte-gwv9xt")},m(g,h){J(g,n,h),v(n,e),v(e,r),v(e,o),v(n,s),v(n,l),v(l,a),p.m(a,null),v(l,c),v(l,u),m&&m.m(u,null)},p(g,h){h[0]&1073741824&&i!==(i=g[30]("generic.uc_total")+"")&&be(r,i),f===(f=d(g))&&p?p.p(g,h):(p.d(1),p=f(g),p&&(p.c(),p.m(a,null))),g[34]&&!g[32]?m?m.p(g,h):(m=X8(g),m.c(),m.m(u,null)):m&&(m.d(1),m=null)},d(g){g&&K(n),p.d(),m&&m.d()}}}function OW(t){let n=fr(gn(t[3],t[11]),mn(t[2],t[11]),String(t[11].price))+"",e;return{c(){e=de(n)},m(i,r){J(i,e,r)},p(i,r){r[0]&2060&&n!==(n=fr(gn(i[3],i[11]),mn(i[2],i[11]),String(i[11].price))+"")&&be(e,n)},d(i){i&&K(e)}}}function PW(t){let n;return{c(){n=A("se-skeleton"),w(n,"width","150px"),w(n,"height","28px"),w(n,"count","1")},m(e,i){J(e,n,i)},p:et,d(e){e&&K(n)}}}function X8(t){let n,e,i,r,o=t[30]("generic.price_disclaimer")+"",s;return{c(){n=A("se-tooltip"),e=A("se-icon"),e.textContent="information_stroke",i=Y(),r=A("se-tooltip-content"),s=de(o),w(e,"class","pw pointer svelte-gwv9xt"),w(e,"size","small"),w(e,"id","ic-document-info"),w(e,"slot","trigger"),w(r,"class","tooltip_content"),w(n,"id","tooltip-document-info"),w(n,"action","hover"),w(n,"position","top")},m(l,a){J(l,n,a),v(n,e),v(n,i),v(n,r),v(r,s)},p(l,a){a[0]&1073741824&&o!==(o=l[30]("generic.price_disclaimer")+"")&&be(s,o)},d(l){l&&K(n)}}}function NW(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D;return{c(){var P,L,C,S,I,N;n=A("se-dropdown"),e=A("qds-button"),i=Y(),r=A("div"),o=Y(),s=A("qds-list"),l=A("qds-list-item"),c=Y(),u=A("se-divider"),d=Y(),f=A("qds-list-item"),m=Y(),g=A("se-divider"),h=Y(),_=A("qds-list-item"),y=Y(),k=A("se-divider"),T=Y(),R=A("qds-list-item"),q=Y(),M=A("se-divider"),w(e,"size","small"),w(e,"icon-name","dots-3-horizontal"),w(e,"slot","trigger"),w(l,"icon-name","star"),w(l,"size","small"),w(l,"class","visibility svelte-gwv9xt"),w(l,"text",a=t[30]("cart.save_to_my_lists")),w(f,"class","visibility svelte-gwv9xt"),w(f,"icon-name","arrow-down-tray"),w(f,"size","small"),w(f,"text",p=t[30]("cart.download_list")),w(_,"class","visibility svelte-gwv9xt"),w(_,"icon-name","arrow-down-tray"),w(_,"size","small"),w(_,"text",b=t[30]("bom_manager.download_datasheets")),w(R,"icon-name","trash-can"),w(R,"size","small"),w(R,"text",O=t[30]("cart.remove_all")),w(R,"class",j="visibility "+(((C=(L=(P=t[11])==null?void 0:P.bom)==null?void 0:L.parts)==null?void 0:C.length)>0||((N=(I=(S=t[11])==null?void 0:S.bom)==null?void 0:I.groups)==null?void 0:N.length)>0&&!t[31]?Te:"pw disabled")+" svelte-gwv9xt"),w(s,"option","dropdown"),w(s,"class","mobile-action-buttons svelte-gwv9xt"),w(n,"alignment","left"),w(n,"verticalalignment","top")},m(P,L){J(P,n,L),v(n,e),v(n,i),v(n,r),v(n,o),v(n,s),v(s,l),v(s,c),v(s,u),v(s,d),v(s,f),v(s,m),v(s,g),v(s,h),v(s,_),v(s,y),v(s,k),v(s,T),v(s,R),v(s,q),v(s,M),z||(D=[xe(l,"click",t[60]),xe(f,"click",t[61]),xe(_,"click",t[62]),xe(R,"click",t[63])],z=!0)},p(P,L){var C,S,I,N,E,B;L[0]&1073741824&&a!==(a=P[30]("cart.save_to_my_lists"))&&w(l,"text",a),L[0]&1073741824&&p!==(p=P[30]("cart.download_list"))&&w(f,"text",p),L[0]&1073741824&&b!==(b=P[30]("bom_manager.download_datasheets"))&&w(_,"text",b),L[0]&1073741824&&O!==(O=P[30]("cart.remove_all"))&&w(R,"text",O),L[0]&2048|L[1]&1&&j!==(j="visibility "+(((I=(S=(C=P[11])==null?void 0:C.bom)==null?void 0:S.parts)==null?void 0:I.length)>0||((B=(E=(N=P[11])==null?void 0:N.bom)==null?void 0:E.groups)==null?void 0:B.length)>0&&!P[31]?Te:"pw disabled")+" svelte-gwv9xt")&&w(R,"class",j)},d(P){P&&K(n),z=!1,An(D)}}}function LW(t){let n,e,i;return{c(){n=A("qds-button"),w(n,"buttonsize","large"),w(n,"icon-name","chevron-left")},m(r,o){J(r,n,o),e||(i=xe(n,"click",t[59]),e=!0)},p:et,d(r){r&&K(n),e=!1,i()}}}function K8(t){let n,e,i;return e=new r1({props:{projectId:t[0],apigeeToken:t[5],language:t[3],country:t[2],token:t[4],businessunit:t[6],selectAndConfigBearerToken:t[8],isCart:!0,view:F0}}),{c(){n=A("div"),De(e.$$.fragment),x(n,"class","add-config-id svelte-gwv9xt")},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&1&&(s.projectId=r[0]),o[0]&32&&(s.apigeeToken=r[5]),o[0]&8&&(s.language=r[3]),o[0]&4&&(s.country=r[2]),o[0]&16&&(s.token=r[4]),o[0]&64&&(s.businessunit=r[6]),o[0]&256&&(s.selectAndConfigBearerToken=r[8]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function J8(t){let n,e;return n=new ck({}),n.$on("buyOptionSelection",t[65]),n.$on("sendBomDataToCpq",t[66]),n.$on("destroyListOptions",t[67]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p:et,i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function Q8(t){let n,e,i,r;function o(l){t[68](l)}let s={projectData:t[11],bomData:t[11].bom?t[11].bom:Hi,apigeeToken:t[5],language:t[3],country:t[2],projectId:t[0],newGroupName:t[7]};return t[1]!==void 0&&(s.tableBodyRef=t[1]),e=new f6({props:s}),_t.push(()=>Ct(e,"tableBodyRef",o)),{c(){n=A("div"),De(e.$$.fragment),x(n,"class","product-content bom-table")},m(l,a){J(l,n,a),Me(e,n,null),r=!0},p(l,a){const c={};a[0]&2048&&(c.projectData=l[11]),a[0]&2048&&(c.bomData=l[11].bom?l[11].bom:Hi),a[0]&32&&(c.apigeeToken=l[5]),a[0]&8&&(c.language=l[3]),a[0]&4&&(c.country=l[2]),a[0]&1&&(c.projectId=l[0]),a[0]&128&&(c.newGroupName=l[7]),!i&&a[0]&2&&(i=!0,c.tableBodyRef=l[1],Tt(()=>i=!1)),e.$set(c)},i(l){r||(Q(e.$$.fragment,l),r=!0)},o(l){se(e.$$.fragment,l),r=!1},d(l){l&&K(n),qe(e)}}}function $8(t){var D,P,L,C,S,I;let n,e,i,r,o,s=t[30]("unified_checkout.total_items")+"",l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q=(t[12][hs]===Ae.SHOW||t[12][hs]===Ae.DISABLED)&&e5(t),M=t[31]&&n5(t),z=(((L=(P=(D=t[11])==null?void 0:D.bom)==null?void 0:P.parts)==null?void 0:L.length)>0||((I=(S=(C=t[11])==null?void 0:C.bom)==null?void 0:S.groups)==null?void 0:I.length)>0)&&!t[31]&&i5(t);return{c(){n=A("div"),e=A("div"),i=A("div"),r=A("div"),o=A("span"),l=de(s),a=de(":"),c=Y(),u=A("div"),d=A("span"),f=de(t[23]),p=Y(),q&&q.c(),m=Y(),M&&M.c(),g=Y(),h=A("div"),_=A("qds-button"),k=Y(),z&&z.c(),x(r,"class","display-flex svelte-gwv9xt"),x(u,"class","display-flex select-option svelte-gwv9xt"),x(i,"class","display-flex product-items pw bold-font svelte-gwv9xt"),w(_,"importance","emphasized"),w(_,"disabled",t[25]),w(_,"buttonsize","large"),w(_,"id","show-cart-buying"),w(_,"class",b="back-btn pw width-100 "+(t[25]?"pw disabled":Te)+" svelte-gwv9xt"),w(_,"buttontype","secondary"),w(_,"text",y=t[30]("generic.next")),x(h,"class","display-flex product-items svelte-gwv9xt"),x(e,"class","padding-10 svelte-gwv9xt"),x(n,"class",T="display-flex total-items country-"+t[3]+" svelte-gwv9xt")},m(N,E){J(N,n,E),v(n,e),v(e,i),v(i,r),v(r,o),v(o,l),v(o,a),v(i,c),v(i,u),v(u,d),v(d,f),v(e,p),q&&q.m(e,null),v(e,m),M&&M.m(e,null),v(e,g),v(e,h),v(h,_),v(n,k),z&&z.m(n,null),R=!0,O||(j=xe(_,"click",t[70]),O=!0)},p(N,E){var B,U,H,Z,V,ne;(!R||E[0]&1073741824)&&s!==(s=N[30]("unified_checkout.total_items")+"")&&be(l,s),(!R||E[0]&8388608)&&be(f,N[23]),N[12][hs]===Ae.SHOW||N[12][hs]===Ae.DISABLED?q?q.p(N,E):(q=e5(N),q.c(),q.m(e,m)):q&&(q.d(1),q=null),N[31]?M?M.p(N,E):(M=n5(N),M.c(),M.m(e,g)):M&&(M.d(1),M=null),(!R||E[0]&33554432)&&w(_,"disabled",N[25]),(!R||E[0]&33554432&&b!==(b="back-btn pw width-100 "+(N[25]?"pw disabled":Te)+" svelte-gwv9xt"))&&w(_,"class",b),(!R||E[0]&1073741824&&y!==(y=N[30]("generic.next")))&&w(_,"text",y),(((H=(U=(B=N[11])==null?void 0:B.bom)==null?void 0:U.parts)==null?void 0:H.length)>0||((ne=(V=(Z=N[11])==null?void 0:Z.bom)==null?void 0:V.groups)==null?void 0:ne.length)>0)&&!N[31]?z?(z.p(N,E),E[0]&2048|E[1]&1&&Q(z,1)):(z=i5(N),z.c(),Q(z,1),z.m(n,null)):z&&(Je(),se(z,1,1,()=>{z=null}),Qe()),(!R||E[0]&8&&T!==(T="display-flex total-items country-"+N[3]+" svelte-gwv9xt"))&&x(n,"class",T)},i(N){R||(Q(z),R=!0)},o(N){se(z),R=!1},d(N){N&&K(n),q&&q.d(),M&&M.d(),z&&z.d(),O=!1,j()}}}function e5(t){let n,e,i=t[30]("generic.uc_total")+"",r,o,s,l,a,c,u;function d(g,h){return g[32]?RW:jW}let f=d(t),p=f(t),m=t[34]&&t5(t);return{c(){n=A("div"),e=A("span"),r=de(i),o=de(":"),s=Y(),l=A("div"),a=A("span"),p.c(),c=Y(),u=A("span"),m&&m.c(),x(a,"class","product-price svelte-gwv9xt"),x(l,"class","display-flex select-option svelte-gwv9xt"),x(n,"class","display-flex product-items pw bold-font svelte-gwv9xt")},m(g,h){J(g,n,h),v(n,e),v(e,r),v(e,o),v(n,s),v(n,l),v(l,a),p.m(a,null),v(l,c),v(l,u),m&&m.m(u,null)},p(g,h){h[0]&1073741824&&i!==(i=g[30]("generic.uc_total")+"")&&be(r,i),f===(f=d(g))&&p?p.p(g,h):(p.d(1),p=f(g),p&&(p.c(),p.m(a,null))),g[34]?m?m.p(g,h):(m=t5(g),m.c(),m.m(u,null)):m&&(m.d(1),m=null)},d(g){g&&K(n),p.d(),m&&m.d()}}}function jW(t){let n=fr(gn(t[3],t[11]),mn(t[2],t[11]),String(t[11].price))+"",e;return{c(){e=de(n)},m(i,r){J(i,e,r)},p(i,r){r[0]&2060&&n!==(n=fr(gn(i[3],i[11]),mn(i[2],i[11]),String(i[11].price))+"")&&be(e,n)},d(i){i&&K(e)}}}function RW(t){let n;return{c(){n=A("se-skeleton"),w(n,"width","150px"),w(n,"height","28px"),w(n,"count","1")},m(e,i){J(e,n,i)},p:et,d(e){e&&K(n)}}}function t5(t){let n,e,i,r,o=t[30]("generic.price_disclaimer")+"",s;return{c(){n=A("se-tooltip"),e=A("se-icon"),e.textContent="information_stroke",i=Y(),r=A("se-tooltip-content"),s=de(o),w(e,"class","pw pointer svelte-gwv9xt"),w(e,"size","small"),w(e,"id","ic-document-info"),w(e,"slot","trigger"),w(r,"class","tooltip_content"),w(n,"id","tooltip-document-info"),w(n,"action","hover"),w(n,"position","top")},m(l,a){J(l,n,a),v(n,e),v(n,i),v(n,r),v(r,s)},p(l,a){a[0]&1073741824&&o!==(o=l[30]("generic.price_disclaimer")+"")&&be(s,o)},d(l){l&&K(n)}}}function n5(t){let n,e,i,r,o;return{c(){n=A("div"),e=A("qds-button"),w(e,"buttonsize","large"),w(e,"id","go-back-cart"),w(e,"class","back-btn pw width-100 svelte-gwv9xt"),w(e,"icon-name","chevron-left"),w(e,"text",i=t[30]("generic.go_back")),x(n,"class","display-flex product-items svelte-gwv9xt")},m(s,l){J(s,n,l),v(n,e),r||(o=xe(e,"click",t[69]),r=!0)},p(s,l){l[0]&1073741824&&i!==(i=s[30]("generic.go_back"))&&w(e,"text",i)},d(s){s&&K(n),r=!1,o()}}}function i5(t){let n,e,i,r,o,s,l,a,c,u,d;return r=new Lf({props:{iconClassName:"star",buttonText:t[30]("cart.save_to_my_lists"),buttonSize:t[3]!==wl?"small":"standard",id:"save-to-my-lists-cta",className:"cc-font-size"}}),r.$on("btnClick",t[71]),s=new Lf({props:{iconClassName:"arrow-down-tray",buttonText:t[30]("cart.download_list"),buttonSize:t[3]!==wl?"small":"standard",id:"cart-download-list-cta",className:"cc-font-size"}}),s.$on("btnClick",t[46]),a=new Lf({props:{iconClassName:"arrow-down-tray",buttonText:t[30]("bom_manager.download_datasheets"),buttonSize:t[3]!==wl?"small":"standard",id:"cart-download-datasheet-cta",className:"cc-font-size"}}),a.$on("btnClick",t[72]),u=new Lf({props:{iconClassName:"trash-can",buttonText:t[30]("cart.remove_all"),buttonSize:t[3]!==wl?"small":"standard",id:"cart-remove-all-cta",className:"cc-font-size"}}),u.$on("btnClick",t[73]),{c(){n=A("se-divider"),e=Y(),i=A("div"),De(r.$$.fragment),o=Y(),De(s.$$.fragment),l=Y(),De(a.$$.fragment),c=Y(),De(u.$$.fragment),x(i,"class","pw normal-font display-flex button-action-section svelte-gwv9xt")},m(f,p){J(f,n,p),J(f,e,p),J(f,i,p),Me(r,i,null),v(i,o),Me(s,i,null),v(i,l),Me(a,i,null),v(i,c),Me(u,i,null),d=!0},p(f,p){const m={};p[0]&1073741824&&(m.buttonText=f[30]("cart.save_to_my_lists")),p[0]&8&&(m.buttonSize=f[3]!==wl?"small":"standard"),r.$set(m);const g={};p[0]&1073741824&&(g.buttonText=f[30]("cart.download_list")),p[0]&8&&(g.buttonSize=f[3]!==wl?"small":"standard"),s.$set(g);const h={};p[0]&1073741824&&(h.buttonText=f[30]("bom_manager.download_datasheets")),p[0]&8&&(h.buttonSize=f[3]!==wl?"small":"standard"),a.$set(h);const _={};p[0]&1073741824&&(_.buttonText=f[30]("cart.remove_all")),p[0]&8&&(_.buttonSize=f[3]!==wl?"small":"standard"),u.$set(_)},i(f){d||(Q(r.$$.fragment,f),Q(s.$$.fragment,f),Q(a.$$.fragment,f),Q(u.$$.fragment,f),d=!0)},o(f){se(r.$$.fragment,f),se(s.$$.fragment,f),se(a.$$.fragment,f),se(u.$$.fragment,f),d=!1},d(f){f&&(K(n),K(e),K(i)),qe(r),qe(s),qe(a),qe(u)}}}function r5(t){let n;return{c(){n=A("cpq-addto-quote"),n.innerHTML="",w(n,"source-system","UCCART"),w(n,"hide-button","true")},m(e,i){J(e,n,i)},d(e){e&&K(n)}}}function s5(t){let n,e,i;return{c(){n=A("se-snackbar"),w(n,"open",t[35]),w(n,"message",t[36]),w(n,"type",t[37]),w(n,"class","bottom-snackbar svelte-gwv9xt"),w(n,"icon","notification_ok_wired"),w(n,"duration",Cs),w(n,"id","uc-cart")},m(r,o){J(r,n,o),e||(i=xe(n,"didClose",t[74]),e=!0)},p(r,o){o[1]&16&&w(n,"open",r[35]),o[1]&32&&w(n,"message",r[36]),o[1]&64&&w(n,"type",r[37])},d(r){r&&K(n),e=!1,i()}}}function o5(t){let n,e;return n=new Pf({props:{title:t[30]("cart.confirm_remove_all"),isPopupOpen:t[26],confirmTxt:t[30]("cart.remove_all_product_message"),confirmLbl:t[30]("generic.remove"),cancelLbl:t[30]("generic.cancel"),isLoading:t[29]}}),n.$on("close",t[75]),n.$on("confirmAction",t[76]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1073741824&&(o.title=i[30]("cart.confirm_remove_all")),r[0]&67108864&&(o.isPopupOpen=i[26]),r[0]&1073741824&&(o.confirmTxt=i[30]("cart.remove_all_product_message")),r[0]&1073741824&&(o.confirmLbl=i[30]("generic.remove")),r[0]&1073741824&&(o.cancelLbl=i[30]("generic.cancel")),r[0]&536870912&&(o.isLoading=i[29]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function a5(t){let n,e,i;return e=new Y_({props:{apigeeToken:t[5],ownerLanguage:t[18],ownerCountry:t[17],dialogWrapper:t[13],countryentries:t[9],env:t[10]}}),e.$on("configurableCustomizableProdAdded",t[40]),{c(){n=A("se-dialog"),De(e.$$.fragment),w(n,"pagescroll","true"),w(n,"can-backdrop","false"),w(n,"size","xlarge"),w(n,"open",t[13])},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o[0]&32&&(s.apigeeToken=r[5]),o[0]&262144&&(s.ownerLanguage=r[18]),o[0]&131072&&(s.ownerCountry=r[17]),o[0]&8192&&(s.dialogWrapper=r[13]),o[0]&512&&(s.countryentries=r[9]),o[0]&1024&&(s.env=r[10]),e.$set(s),(!i||o[0]&8192)&&w(n,"open",r[13])},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function l5(t){let n,e,i,r,o;return{c(){var s,l,a,c;n=A("se-snackbar"),w(n,"duration",ag),w(n,"id","snackbar-configurable-customizable"),w(n,"class","bottom-snackbar svelte-gwv9xt"),w(n,"open",t[15]),w(n,"icon","notification_ok_wired"),w(n,"message",e=(l=(s=t[16])==null?void 0:s.detail)!=null&&l.isProductUpdated?t[30]("bom_manager.updated_configuration_success_msg"):t[30]("reopenProductSelector.replaced_product_error_msg")),w(n,"type",i=(c=(a=t[16])==null?void 0:a.detail)!=null&&c.isProductUpdated?xr:mr)},m(s,l){J(s,n,l),r||(o=xe(n,"didClose",t[77]),r=!0)},p(s,l){var a,c,u,d;l[0]&32768&&w(n,"open",s[15]),l[0]&1073807360&&e!==(e=(c=(a=s[16])==null?void 0:a.detail)!=null&&c.isProductUpdated?s[30]("bom_manager.updated_configuration_success_msg"):s[30]("reopenProductSelector.replaced_product_error_msg"))&&w(n,"message",e),l[0]&65536&&i!==(i=(d=(u=s[16])==null?void 0:u.detail)!=null&&d.isProductUpdated?xr:mr)&&w(n,"type",i)},d(s){s&&K(n),r=!1,o()}}}function c5(t){let n,e;return n=new QH({props:{title:t[30]("generic.add_to_my_lists"),isPopupOpen:t[19],confirmLbl:t[30]("project_listing.create_new_list"),cancelLbl:t[30]("generic.add")}}),n.$on("close",t[78]),n.$on("confirmAction",t[79]),n.$on("gotoList",t[44]),n.$on("addToListFromUcCart",t[80]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1073741824&&(o.title=i[30]("generic.add_to_my_lists")),r[0]&524288&&(o.isPopupOpen=i[19]),r[0]&1073741824&&(o.confirmLbl=i[30]("project_listing.create_new_list")),r[0]&1073741824&&(o.cancelLbl=i[30]("generic.add")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function u5(t){let n,e;return n=new TW({props:{open:t[20]}}),n.$on("close",t[81]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&1048576&&(o.open=i[20]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function f5(t){let n,e,i=t[30]("cart.devis_title")+"",r,o,s,l,a,c,u=t[30]("cart.devis_description")+"",d,f,p,m,g,h,_,b,y;return m=new Gt({props:{id:"cart-btn-confirm-yes",dataTestId:"cart-btn-confirm-yes",buttonText:t[30]("generic.confirm"),importance:"emphasized"}}),m.$on("btnClick",t[83]),h=new Gt({props:{id:"cart-btn-confirm-cancel",dataTestId:"cart-btn-confirm-cancel",buttonText:t[30]("generic.cancel")}}),h.$on("btnClick",t[84]),{c(){n=A("se-dialog"),e=A("h4"),r=de(i),o=Y(),s=A("qds-button"),l=Y(),a=A("se-dialog-content"),c=A("span"),d=de(u),f=Y(),p=A("div"),De(m.$$.fragment),g=Y(),De(h.$$.fragment),x(e,"class","heading svelte-gwv9xt"),w(s,"importance","subdued"),w(s,"icon-name","cross-circle"),w(s,"id","close-popup"),w(s,"class","cross-icon pw pointer svelte-gwv9xt"),w(s,"data-testid","cross-button-close"),x(c,"id","cart-confirm-text"),x(p,"class","dialog-footer-button svelte-gwv9xt"),w(a,"class","popup-content svelte-gwv9xt"),w(n,"can-backdrop","false"),w(n,"open",t[14])},m(k,T){J(k,n,T),v(n,e),v(e,r),v(n,o),v(n,s),v(n,l),v(n,a),v(a,c),v(c,d),v(a,f),v(a,p),Me(m,p,null),v(p,g),Me(h,p,null),_=!0,b||(y=xe(s,"click",t[82]),b=!0)},p(k,T){(!_||T[0]&1073741824)&&i!==(i=k[30]("cart.devis_title")+"")&&be(r,i),(!_||T[0]&1073741824)&&u!==(u=k[30]("cart.devis_description")+"")&&be(d,u);const R={};T[0]&1073741824&&(R.buttonText=k[30]("generic.confirm")),m.$set(R);const O={};T[0]&1073741824&&(O.buttonText=k[30]("generic.cancel")),h.$set(O),(!_||T[0]&16384)&&w(n,"open",k[14])},i(k){_||(Q(m.$$.fragment,k),Q(h.$$.fragment,k),_=!0)},o(k){se(m.$$.fragment,k),se(h.$$.fragment,k),_=!1},d(k){k&&K(n),qe(m),qe(h),b=!1,y()}}}function MW(t){let n,e,i=!zt(),r,o,s,l,a,c,u,d,f,p,m,g,h=(t[29]||t[32])&&x8(),_=t[31]&&t[21]&&G8(t),b=i&&EW(t);const y=[AW,IW],k=[];function T(P,L){return P[0]?0:1}o=T(t),s=k[o]=y[o](t);let R=t[35]&&s5(t),O=t[26]&&o5(t),j=t[38]&&t[13]&&a5(t),q=t[15]&&l5(t),M=t[19]&&c5(t),z=t[20]&&u5(t),D=t[14]&&f5(t);return{c(){h&&h.c(),n=Y(),_&&_.c(),e=Y(),b&&b.c(),r=Y(),s.c(),l=Y(),R&&R.c(),a=Y(),O&&O.c(),c=Y(),j&&j.c(),u=Y(),q&&q.c(),d=Y(),M&&M.c(),f=Y(),z&&z.c(),p=Y(),D&&D.c(),m=wt()},m(P,L){h&&h.m(P,L),J(P,n,L),_&&_.m(P,L),J(P,e,L),b&&b.m(P,L),J(P,r,L),k[o].m(P,L),J(P,l,L),R&&R.m(P,L),J(P,a,L),O&&O.m(P,L),J(P,c,L),j&&j.m(P,L),J(P,u,L),q&&q.m(P,L),J(P,d,L),M&&M.m(P,L),J(P,f,L),z&&z.m(P,L),J(P,p,L),D&&D.m(P,L),J(P,m,L),g=!0},p(P,L){P[29]||P[32]?h||(h=x8(),h.c(),h.m(n.parentNode,n)):h&&(h.d(1),h=null),P[31]&&P[21]?_?_.p(P,L):(_=G8(P),_.c(),_.m(e.parentNode,e)):_&&(_.d(1),_=null),i&&b.p(P,L);let C=o;o=T(P),o===C?k[o].p(P,L):(Je(),se(k[C],1,1,()=>{k[C]=null}),Qe(),s=k[o],s?s.p(P,L):(s=k[o]=y[o](P),s.c()),Q(s,1),s.m(l.parentNode,l)),P[35]?R?R.p(P,L):(R=s5(P),R.c(),R.m(a.parentNode,a)):R&&(R.d(1),R=null),P[26]?O?(O.p(P,L),L[0]&67108864&&Q(O,1)):(O=o5(P),O.c(),Q(O,1),O.m(c.parentNode,c)):O&&(Je(),se(O,1,1,()=>{O=null}),Qe()),P[38]&&P[13]?j?(j.p(P,L),L[0]&8192|L[1]&128&&Q(j,1)):(j=a5(P),j.c(),Q(j,1),j.m(u.parentNode,u)):j&&(Je(),se(j,1,1,()=>{j=null}),Qe()),P[15]?q?q.p(P,L):(q=l5(P),q.c(),q.m(d.parentNode,d)):q&&(q.d(1),q=null),P[19]?M?(M.p(P,L),L[0]&524288&&Q(M,1)):(M=c5(P),M.c(),Q(M,1),M.m(f.parentNode,f)):M&&(Je(),se(M,1,1,()=>{M=null}),Qe()),P[20]?z?(z.p(P,L),L[0]&1048576&&Q(z,1)):(z=u5(P),z.c(),Q(z,1),z.m(p.parentNode,p)):z&&(Je(),se(z,1,1,()=>{z=null}),Qe()),P[14]?D?(D.p(P,L),L[0]&16384&&Q(D,1)):(D=f5(P),D.c(),Q(D,1),D.m(m.parentNode,m)):D&&(Je(),se(D,1,1,()=>{D=null}),Qe())},i(P){g||(Q(s),Q(O),Q(j),Q(M),Q(z),Q(D),g=!0)},o(P){se(s),se(O),se(j),se(M),se(z),se(D),g=!1},d(P){P&&(K(n),K(e),K(r),K(l),K(a),K(c),K(u),K(d),K(f),K(p),K(m)),h&&h.d(P),_&&_.d(P),b&&b.d(P),k[o].d(P),R&&R.d(P),O&&O.d(P),j&&j.d(P),q&&q.d(P),M&&M.d(P),z&&z.d(P),D&&D.d(P)}}}function c1(t={}){var e;let n=!1;if(t){const i=(e=t==null?void 0:t.target)==null?void 0:e.closest("qds-list");i&&(window&&window.getComputedStyle(i)).visibility==="hidden"&&(n=!0)}return n}function qW(t,n,e){let i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O;ye(t,$r,Ze=>e(11,o=Ze)),ye(t,Ii,Ze=>e(12,s=Ze)),ye(t,wr,Ze=>e(87,l=Ze)),ye(t,es,Ze=>e(88,a=Ze)),ye(t,ti,Ze=>e(89,c=Ze)),ye(t,ki,Ze=>e(29,u=Ze)),ye(t,Vt,Ze=>e(30,d=Ze)),ye(t,Yl,Ze=>e(31,f=Ze)),ye(t,Jo,Ze=>e(54,p=Ze)),ye(t,Ji,Ze=>e(32,m=Ze)),ye(t,Ki,Ze=>e(90,g=Ze)),ye(t,Gh,Ze=>e(91,h=Ze)),ye(t,Ka,Ze=>e(55,_=Ze)),ye(t,Er,Ze=>e(33,b=Ze)),ye(t,Bc,Ze=>e(34,y=Ze)),ye(t,Wi,Ze=>e(35,k=Ze)),ye(t,nr,Ze=>e(36,T=Ze)),ye(t,tr,Ze=>e(37,R=Ze)),ye(t,ho,Ze=>e(38,O=Ze));let{country:j="US"}=n,{language:q="en"}=n,{token:M}=n,{cartId:z}=n,{apigeeToken:D}=n,{businessunit:P}=n,{bomData:L}=n,{tableBodyRef:C}=n,{newGroupName:S}=n,{selectAndConfigBearerToken:I}=n,{countryentries:N}=n,{env:E}=n,{apigeeUrl:B}=n,{selectAndConfigUrl:U}=n,{viteOcmCaseUrl:H}=n,Z=!1,V=!1,ne=!1,W,re,G,F=!1,X=!1,le=!1,ue="",ee=0;const $=Mn(),he=new BroadcastChannel("UPDATE_EYEBROW_CART");he.onmessage=Ze=>{var kt,nn;(h!==((kt=Ze.data)==null?void 0:kt.tabId)||((nn=Ze.data)==null?void 0:nn.tabId)===void 0)&&(a||zt())&&jo(a)},Un(async()=>{if(window.scrollTo(0,0),jt(Ki,g=Vn,g),We.initializeExternalUrls([B,H,U,I]),jt(Ji,m=!0,m),!nl.getCartId()&&!zt()){let Ze={bom:{parts:[],groups:[]},country:mn(j,o),language:gn(q,o)};await E2(Ze)}await me(),we(),e(17,re=mn(j,o)),e(18,G=gn(q,o)),zt()&&oe(),Bn(Nn.VIEW_CART,o)});async function me(){const Ze=await jo(a);if(Ze.error&&Ze.status===Bf.NOT_FOUND){await _f(j.toLowerCase(),q);const kt=await jo(a);await te(kt)}else await te(Ze);jt(Ji,m=!1,m),e(0,z=a)}async function te(Ze){Ze!=null&&Ze.error?e(25,_e=!0):(ae(),await ci(a,mn(j,o),gn(q,o),D,!0).then(function(kt){jt(Ji,m=!1,m),ve.info(kt)}).catch(function(kt){jt(Ji,m=!1,m),ve.error(kt)}))}Kn(()=>{Yl.update(()=>!1)});function oe(){const kt=new URLSearchParams(window.location.search).get(XN);switch(ve.info("buyingOption==",kt),kt){case Gr.DISTRIBUTOR:ge();break;case Gr.QUOTE:fe();break;case Gr.DEVIS:Re();break;case Gr.BUY_SCHNEIDER_ELECTRIC:ce();break}}function ce(){zt()?(jt(Yl,f=!0,f),e(21,le=!el(s)),ve.info("User is redirected from public journey to private journey"),ve.info("$showBuyingOptions==",f),e(22,ue=d("cart.se_access_error"))):zt()||(Ka.set(Gr.BUY_SCHNEIDER_ELECTRIC),Gs({id:z}))}function ge(){var Ze;xv.includes((Ze=We==null?void 0:We.country)==null?void 0:Ze.toUpperCase())&&(jt(Yl,f=!0,f),e(20,X=!0),Er.update(()=>!1),Ka.set(Te))}async function fe(){if(ve.info("hasCpqAccess==",r),ve.info("$productsInCart==",o),!r&&!el(s))e(21,le=!0),e(22,ue=d("cart.cqp_access_error")),Ka.set(Te);else if(r){const kt=new URLSearchParams(window.location.search).get("cartid");if(kt){const nn=await L2("SE");await dj(kt,nn.token).then(async Ft=>{Ft!=null&&Ft.error||(jd(Ft),Lw(`${j.toLowerCase()}${Fc}`))}).catch(Ft=>{ve.error(Ft)})}else jd(o)}jt(Yl,f=!0,f)}function ae(){var Ze,kt,nn,Ft;!((kt=(Ze=o==null?void 0:o.bom)==null?void 0:Ze.parts)!=null&&kt.length)&&!((Ft=(nn=o==null?void 0:o.bom)==null?void 0:nn.groups)!=null&&Ft.length)?e(25,_e=!0):e(25,_e=!1)}let ie={},_e=!1,Ie=!1;function we(){Zs.subscribe(Ze=>{e(15,ne=!1),Object.keys(Ze).length!==0&&e(13,Z=!0)})}function pe(Ze){var nn;e(16,W=Ze),jo(a),e(15,ne=!0);const kt=(nn=Ze==null?void 0:Ze.detail)!=null&&nn.isProductUpdated?rs.ADD_TO_CART_SUCCESS:rs.ADD_TO_CART_FAILURE;tl(kt,Ze),Rd(rs.UPDATE_EYEBROW_CART)}function Se(Ze){e(24,ie=Ze),e(25,_e=!1)}function Le(){switch(gs(Ai.NEXT_CART.action,Ai.NEXT_CART.subaction,String(l.platform),void 0,void 0,void 0,a),f?Bn(Nn.VIEW_ITEM_LIST,o,ie==null?void 0:ie.value,"choose_checkout_option",!1,"cart|uco"):(jt(Yl,f=!f,f),e(25,_e=!0),Bn(Nn.CTA_CLICK,{cta_name:"Next",cta_location:$i.UCCart})),ie==null?void 0:ie.value){case Gr.DISTRIBUTOR:Ce();break;case Gr.FIND_A_DISTRIBUTOR:ke();break;case Gr.QUOTE:Ee();break;case Gr.DEVIS:Re();break;case Gr.BUY_SCHNEIDER_ELECTRIC:ce();break}}async function Re(){if(zt()&&j.toLowerCase()===vu.FR){const kt=new URLSearchParams(window.location.search).get("cartid");kt?(await hj({businessunit:P,languagecode:q,isox:!1,purchaserid:null},kt),Lw(`${j.toLowerCase()}${Fc}`),await me(),e(14,V=!0)):window.open(`${Vv[We.environment]}`,"_blank")}else Ka.set(Gr.DEVIS),Gs({id:z})}function Ee(){zt()?jd(o):(Ka.set(Gr.QUOTE),Gs({id:z}))}function ke(){if(!zt())j.toLowerCase()===hh.FRANCE_DISTRIBUTOR.country.toLowerCase()&&(window.location.href=hh.FRANCE_DISTRIBUTOR.distrubutorUrl),j.toLowerCase()===hh.BRAZIL_DISTRIBUTOR.country.toLowerCase()&&(window.location.href=hh.BRAZIL_DISTRIBUTOR.distrubutorUrl);else if(zt()){const Ze=n1(),kt=`${lr}/${String(Ze.myCart.cartPage)}/${iA}`;ve.info("find a distributer url ::",kt),Ar(kt)}}function Ce(){var Ze;f&&xv.includes((Ze=We==null?void 0:We.country)==null?void 0:Ze.toUpperCase())&&(e(20,X=!0),Er.update(()=>!1))}function Ne(Ze){const{detail:{type:kt}}=Ze;switch(gs(Ai.REMOVE_ALL.action,Ai.REMOVE_ALL.subaction,String(l.platform),void 0,void 0,void 0,a),kt){case ph:Pe();break}e(26,Ie=!1),Er.update(()=>!0)}function Pe(){var zn,Rn,jn,yn;const Ze=(Rn=(zn=o==null?void 0:o.bom)==null?void 0:zn.parts)==null?void 0:Rn.map(sn=>({id:(sn==null?void 0:sn.id)||Te,quantity:(sn==null?void 0:sn.quantity)||0,productRef:(sn==null?void 0:sn.productId)||(sn==null?void 0:sn.productRef)}));let kt=[];(yn=(jn=o==null?void 0:o.bom)==null?void 0:jn.groups)==null||yn.map(sn=>{nn(sn)});function nn(sn){var dt;if(((dt=sn==null?void 0:sn.parts)==null?void 0:dt.length)>0){let $t=sn==null?void 0:sn.parts.map(dn=>({id:(dn==null?void 0:dn.id)||Te,quantity:(dn==null?void 0:dn.quantity)||0,productRef:(dn==null?void 0:dn.productId)||(dn==null?void 0:dn.productRef)}));kt.push(...$t)}sn!=null&&sn.groups&&(sn==null||sn.groups.forEach($t=>nn($t)))}const Ft=[...Ze,...kt],Zt=Ft.map(sn=>({id:(sn==null?void 0:sn.id)||Te,quantity:(sn==null?void 0:sn.quantity)||0}));Wh(Zt,a,0).then(async sn=>{sn!=null&&sn.error?(tr.update(()=>mr),nr.update(()=>d("generic.error_message")),Wi.update(()=>!0),tl(rs.ADD_TO_CART_FAILURE,sn)):(Bn(Nn.REMOVE_FROM_CART,Ft,"","",!1,"cart|uco|delete",!1),ae(),tl(rs.ADD_TO_CART_SUCCESS,sn),Rd(rs.UPDATE_EYEBROW_CART),ki.update(()=>!0),await ci(a,mn(j,o),gn(q,o),D,!0).then(function(dt){ve.info(dt),tr.update(()=>xr),nr.update(()=>d("cart.all_delele_products_message")),Wi.update(()=>!0)}).catch(function(dt){ve.error(dt)}))}).catch(sn=>ve.error(sn==null?void 0:sn.message)).finally(()=>jt(ki,u=!1,u))}async function Ve(Ze){$(vr.GOTO_LIST,Ze.detail)}function ot(Ze={}){c1(Ze)||(gs(Ai.SAVE_TO_LIST.action,Ai.SAVE_TO_LIST.subaction,String(l.platform),void 0,void 0,void 0,a),Bn("cta_click",{cta_name:"Save to my List",cta_location:$i.UCCart}),Bn(Nn.ADD_TO_LIST,o,"","",!1,"cart|uco"),zt()?(e(19,F=!0),Er.update(()=>!1)):document.dispatchEvent(new CustomEvent(vr.ADD_TO_LIST_FROM_UC_CART_PUBLIC,{bubbles:!0,detail:o==null?void 0:o.bom})))}async function gt(Ze={}){if(c1(Ze))return;gs(Ai.DOWNLOAD_LIST.action,Ai.DOWNLOAD_LIST.subaction,String(l.platform),void 0,void 0,void 0,a),Bn(Nn.VIEW_ITEM_LIST,o,"","download_list",!1,"cart|uco"),await If(o==null?void 0:o.bom,c,o,!0)||Yg()}function He(Ze={}){if(c1(Ze))return;gs(Ai.DOWNLOAD_DATASHEET_CART.action,Ai.DOWNLOAD_DATASHEET_CART.subaction,String(l.platform),void 0,void 0,void 0,a);let kt=zt()?o==null?void 0:o.id:a;Dw(l==null?void 0:l.platform,kt)}function Be(){var Ze;e(23,ee=(Ze=Do(o==null?void 0:o.bom,[]))==null?void 0:Ze.length)}function Ye(){e(14,V=!1),window.open(`${Vv[We.environment]}`,"_blank"),Ue()}function Ue(){if(el(s)){const Ze=`${lr}/cart`;Ar(Ze)}}const rt=Ze=>{var kt;return Se((kt=Ze==null?void 0:Ze.detail)==null?void 0:kt.data)},ze=()=>jd(o),tt=()=>e(24,ie={}),je=()=>{jt(Yl,f=!f,f)},nt=Ze=>{ot(Ze)},$e=Ze=>{gt(Ze)},mt=Ze=>{He(Ze)},lt=Ze=>{c1(Ze)||(e(26,Ie=!0),Er.update(()=>!1))},vt=()=>Le(),Bt=Ze=>{var kt;return Se((kt=Ze==null?void 0:Ze.detail)==null?void 0:kt.data)},Ke=()=>jd(o),pt=()=>e(24,ie={});function bt(Ze){C=Ze,e(1,C)}const qt=()=>{jt(Yl,f=!f,f),ae()},Ht=()=>Le(),St=()=>{ot()},Rt=()=>{He()},st=()=>{e(26,Ie=!0)},Lt=()=>{Wi.update(()=>!1)},Xt=()=>{e(26,Ie=!1),Er.update(()=>!0)},fn=Ze=>Ne(Ze),Sn=()=>{e(15,ne=!1)},Zn=()=>{e(19,F=!1),Er.update(()=>!0)},Gn=Ze=>Ne(Ze);function oi(Ze){ko.call(this,t,Ze)}const $n=()=>{e(20,X=!1),Er.update(()=>!0)},Ci=()=>{e(14,V=!1),Ue()},Xe=()=>Ye(),at=()=>{e(14,V=!1),Ue()};return t.$$set=Ze=>{"country"in Ze&&e(2,j=Ze.country),"language"in Ze&&e(3,q=Ze.language),"token"in Ze&&e(4,M=Ze.token),"cartId"in Ze&&e(0,z=Ze.cartId),"apigeeToken"in Ze&&e(5,D=Ze.apigeeToken),"businessunit"in Ze&&e(6,P=Ze.businessunit),"bomData"in Ze&&e(50,L=Ze.bomData),"tableBodyRef"in Ze&&e(1,C=Ze.tableBodyRef),"newGroupName"in Ze&&e(7,S=Ze.newGroupName),"selectAndConfigBearerToken"in Ze&&e(8,I=Ze.selectAndConfigBearerToken),"countryentries"in Ze&&e(9,N=Ze.countryentries),"env"in Ze&&e(10,E=Ze.env),"apigeeUrl"in Ze&&e(51,B=Ze.apigeeUrl),"selectAndConfigUrl"in Ze&&e(52,U=Ze.selectAndConfigUrl),"viteOcmCaseUrl"in Ze&&e(53,H=Ze.viteOcmCaseUrl)},t.$$.update=()=>{t.$$.dirty[1]&16777216&&e(28,i=_!==Te&&zt()),t.$$.dirty[0]&4096&&e(27,r=s[ef]===Ae.SHOW),t.$$.dirty[0]&2048&&o&&(l_(o),Be()),t.$$.dirty[1]&8388608&&p!==Te&&e(13,Z=!0),t.$$.dirty[0]&2048&&o&&ae()},[z,C,j,q,M,D,P,S,I,N,E,o,s,Z,V,ne,W,re,G,F,X,le,ue,ee,ie,_e,Ie,r,i,u,d,f,m,b,y,k,T,R,O,ae,pe,Se,Le,Ne,Ve,ot,gt,He,Ye,Ue,L,B,U,H,p,_,rt,ze,tt,je,nt,$e,mt,lt,vt,Bt,Ke,pt,bt,qt,Ht,St,Rt,st,Lt,Xt,fn,Sn,Zn,Gn,oi,$n,Ci,Xe,at]}class DW extends Ot{constructor(n){super(),At(this,n,qW,MW,It,{country:2,language:3,token:4,cartId:0,apigeeToken:5,businessunit:6,bomData:50,tableBodyRef:1,newGroupName:7,selectAndConfigBearerToken:8,countryentries:9,env:10,apigeeUrl:51,selectAndConfigUrl:52,viteOcmCaseUrl:53},CW,[-1,-1,-1,-1])}}const sie="";function BW(t){Ut(t,"svelte-pyy9ok",".display-flex.svelte-pyy9ok.svelte-pyy9ok{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.pointer.svelte-pyy9ok.svelte-pyy9ok{cursor:pointer}h4.heading.svelte-pyy9ok.svelte-pyy9ok{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.heading.svelte-pyy9ok.svelte-pyy9ok{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px}.cross-icon.svelte-pyy9ok.svelte-pyy9ok{position:absolute;right:16px;top:16px}.share-bom-content.svelte-pyy9ok.svelte-pyy9ok{padding:0px 20px;margin-bottom:20px}.receive-content-text.svelte-pyy9ok.svelte-pyy9ok{color:var(--se-anthracite-grey, #333333);font-size:14px}.input-field.svelte-pyy9ok.svelte-pyy9ok{flex-direction:column;position:relative;margin-top:12px}.plus-icon-email.svelte-pyy9ok.svelte-pyy9ok{position:absolute;right:-44px;top:26px}.error.svelte-pyy9ok.svelte-pyy9ok{color:var(--se-red, #dc0a0a);font-size:12px;padding-top:10px}.pointer-event-none.svelte-pyy9ok.svelte-pyy9ok{pointer-events:none;opacity:0.5}.all-selectedEmail-list.svelte-pyy9ok.svelte-pyy9ok{display:flex;flex-wrap:wrap;margin-top:10px;max-height:100px;overflow:auto}.all-selectedEmail-list.svelte-pyy9ok p.svelte-pyy9ok{background:var(--se-dark-grey, #626469);padding:8px 20px;color:var(--se-white, #ffffff);border-radius:50px;margin:0px 12px 10px 0px;font-size:14px;padding-right:12px;height:fit-content}.all-selectedEmail-list.svelte-pyy9ok p span.svelte-pyy9ok{font-size:12px;padding-left:8px;padding-right:8px}.dialog-footer-button.svelte-pyy9ok.svelte-pyy9ok{margin-top:12px;margin-left:-4px}.dialog-content-width.svelte-pyy9ok.svelte-pyy9ok{width:75%}#btn-cancel.svelte-pyy9ok.svelte-pyy9ok{margin-left:8px}")}function d5(t,n,e){const i=t.slice();return i[39]=n[e],i[41]=e,i}function p5(t){let n,e=t[8]("share_bill_of_materials.email_already_exist")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-pyy9ok")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&256&&e!==(e=r[8]("share_bill_of_materials.email_already_exist")+"")&&be(i,e)},d(r){r&&K(n)}}}function h5(t){let n,e;return{c(){n=A("p"),e=de(t[7]),x(n,"class","error svelte-pyy9ok")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r[0]&128&&be(e,i[7])},d(i){i&&K(n)}}}function m5(t){let n,e=t[8]("generic.cannot_share_to_owner")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-pyy9ok")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&256&&e!==(e=r[8]("generic.cannot_share_to_owner")+"")&&be(i,e)},d(r){r&&K(n)}}}function g5(t){let n,e=Dt(t[1]),i=[];for(let r=0;rCt(z,"value",ee)),z.$on("onKeyDown",t[21]);let he=t[6]&&p5(t),me=t[7]&&((we=t[7])==null?void 0:we.length)>0&&h5(t),te=N&&m5(t),oe=((pe=t[1])==null?void 0:pe.length)!=0&&g5(t);function ce(Ne,Pe){var Ve;return((Ve=Ne[0])==null?void 0:Ve.length)>0?zW:UW}let ge=ce(t),fe=ge(t);return re=new Gt({props:{id:"btn-send",dataTestId:"send-button-share-bom",buttonType:"submit",disabled:!(Si((Se=t[4])==null?void 0:Se.email)||((Le=t[1])==null?void 0:Le.length)>0)||((Ee=(Re=t[4])==null?void 0:Re.email)==null?void 0:Ee.toLowerCase())===(((Ce=(ke=t[2])==null?void 0:ke.profile)==null?void 0:Ce.email)||Te).toLowerCase(),buttonSize:"medium",importance:"emphasized",buttonText:t[8]("generic.send")}}),re.$on("btnClick",t[25]),F=new Gt({props:{id:"btn-cancel",dataTestId:"cancel-button-share-bom",buttonType:"button",buttonSize:"medium",buttonText:t[8]("generic.cancel")}}),F.$on("btnClick",t[26]),{c(){n=A("se-loading"),e=Y(),i=A("se-dilog-header"),r=A("h4"),s=de(o),l=Y(),a=A("se-icon"),a.textContent="action_close",c=Y(),u=A("se-dialog-content"),d=A("p"),p=de(f),m=de("."),g=Y(),h=A("p"),b=de(_),y=de("."),k=Y(),T=A("form"),R=A("div"),O=A("p"),q=de(j),M=Y(),De(z.$$.fragment),P=Y(),L=A("se-icon"),L.textContent="action_add_flat",C=Y(),he&&he.c(),S=Y(),me&&me.c(),I=Y(),te&&te.c(),E=Y(),oe&&oe.c(),B=Y(),U=A("div"),fe.c(),H=Y(),Z=A("qds-textarea"),ne=Y(),W=A("div"),De(re.$$.fragment),G=Y(),De(F.$$.fragment),w(n,"loading",t[3]),x(r,"class","heading svelte-pyy9ok"),x(r,"data-testid","share-bom-heading"),w(a,"data-testid","close-button-share-bom"),w(a,"id","ic-close"),w(a,"class","cross-icon pw pointer svelte-pyy9ok"),w(a,"color","standard"),w(i,"class","pw"),x(d,"class","receive-content-text svelte-pyy9ok"),x(h,"class","receive-content-text svelte-pyy9ok"),x(O,"class","error svelte-pyy9ok"),w(L,"data-testid","plus-email-button"),w(L,"id","ic-add-email"),w(L,"size","medium"),w(L,"class","cursor-pointer plus-icon-email svelte-pyy9ok"),w(L,"color","secondary"),sr(L,"pointer-event-none",t[5]===null||t[5]===!1),x(R,"class","input-field display-flex dialog-content-width svelte-pyy9ok"),w(Z,"id","description"),w(Z,"name","description"),w(Z,"value",V=t[4].description),w(Z,"rows","5"),x(U,"class","input-field display-flex dialog-content-width svelte-pyy9ok"),x(W,"class","dialog-footer-button svelte-pyy9ok"),x(T,"class","form-share-bom"),w(u,"class","share-bom-content svelte-pyy9ok")},m(Ne,Pe){J(Ne,n,Pe),J(Ne,e,Pe),J(Ne,i,Pe),v(i,r),v(r,s),v(i,l),v(i,a),J(Ne,c,Pe),J(Ne,u,Pe),v(u,d),v(d,p),v(d,m),v(u,g),v(u,h),v(h,b),v(h,y),v(u,k),v(u,T),v(T,R),v(R,O),v(O,q),v(R,M),Me(z,R,null),v(R,P),v(R,L),v(T,C),he&&he.m(T,null),v(T,S),me&&me.m(T,null),v(T,I),te&&te.m(T,null),v(T,E),oe&&oe.m(T,null),v(T,B),v(T,U),fe.m(U,null),v(U,H),v(U,Z),v(T,ne),v(T,W),Me(re,W,null),v(W,G),Me(F,W,null),X=!0,le||(ue=[xe(a,"click",t[19]),xe(L,"click",t[22]),xe(Z,"input",t[24]),xe(T,"submit",xW)],le=!0)},p(Ne,Pe){var He,Be,Ye,Ue,rt,ze,tt,je,nt,$e,mt,lt;(!X||Pe[0]&8)&&w(n,"loading",Ne[3]),(!X||Pe[0]&256)&&o!==(o=Ne[8]("share_cart.share_list_of_parts")+"")&&be(s,o),(!X||Pe[0]&256)&&f!==(f=Ne[8]("share_cart.to_send_cart_details_enter_email_address")+"")&&be(p,f),(!X||Pe[0]&256)&&_!==(_=Ne[8]("share_bill_of_materials.personal_data_in_our_system")+"")&&be(b,_),(!X||Pe[0]&256)&&j!==(j=Ne[8]("share_bill_of_materials.distributor_receive_a_reply_lbl")+"")&&be(q,j);const Ve={};Pe[0]&256&&(Ve.placeholder=Ne[8]("share_bill_of_materials.enter_email_address")),!D&&Pe[0]&16&&(D=!0,Ve.value=Ne[4].email,Tt(()=>D=!1)),z.$set(Ve),(!X||Pe[0]&32)&&sr(L,"pointer-event-none",Ne[5]===null||Ne[5]===!1),Ne[6]?he?he.p(Ne,Pe):(he=p5(Ne),he.c(),he.m(T,S)):he&&(he.d(1),he=null),Ne[7]&&((He=Ne[7])==null?void 0:He.length)>0?me?me.p(Ne,Pe):(me=h5(Ne),me.c(),me.m(T,I)):me&&(me.d(1),me=null),Pe[0]&20&&(N=((Ye=(Be=Ne[4])==null?void 0:Be.email)==null?void 0:Ye.toLowerCase())===(((rt=(Ue=Ne[2])==null?void 0:Ue.profile)==null?void 0:rt.email)||Te).toLowerCase()),N?te?te.p(Ne,Pe):(te=m5(Ne),te.c(),te.m(T,E)):te&&(te.d(1),te=null),((ze=Ne[1])==null?void 0:ze.length)!=0?oe?oe.p(Ne,Pe):(oe=g5(Ne),oe.c(),oe.m(T,B)):oe&&(oe.d(1),oe=null),ge===(ge=ce(Ne))&&fe?fe.p(Ne,Pe):(fe.d(1),fe=ge(Ne),fe&&(fe.c(),fe.m(U,H))),(!X||Pe[0]&16&&V!==(V=Ne[4].description))&&w(Z,"value",V);const ot={};Pe[0]&22&&(ot.disabled=!(Si((tt=Ne[4])==null?void 0:tt.email)||((je=Ne[1])==null?void 0:je.length)>0)||(($e=(nt=Ne[4])==null?void 0:nt.email)==null?void 0:$e.toLowerCase())===(((lt=(mt=Ne[2])==null?void 0:mt.profile)==null?void 0:lt.email)||Te).toLowerCase()),Pe[0]&256&&(ot.buttonText=Ne[8]("generic.send")),re.$set(ot);const gt={};Pe[0]&256&&(gt.buttonText=Ne[8]("generic.cancel")),F.$set(gt)},i(Ne){X||(Q(z.$$.fragment,Ne),Q(re.$$.fragment,Ne),Q(F.$$.fragment,Ne),X=!0)},o(Ne){se(z.$$.fragment,Ne),se(re.$$.fragment,Ne),se(F.$$.fragment,Ne),X=!1},d(Ne){Ne&&(K(n),K(e),K(i),K(c),K(u)),qe(z),he&&he.d(),me&&me.d(),te&&te.d(),oe&&oe.d(),fe.d(),qe(re),qe(F),le=!1,An(ue)}}}const xW=t=>{t.preventDefault()};function GW(t,n,e){let i,r,o,s;ye(t,$r,W=>e(32,r=W)),ye(t,Vt,W=>e(8,o=W)),ye(t,ti,W=>e(33,s=W));let{bomData:l}=n,{projectData:a}=n,{language:c}=n,{country:u}=n,{selectedProductParts:d}=n,{allEmails:f}=n,{apigeeToken:p}=n,{user:m}=n,g=!1,h={email:"",description:""},_=null,b,y=!1,k=[],T=[],R,O;const j=Mn();function q(W){j("closePopupEvent",{action:W}),I()}function M(W){b=W.target.value,e(6,y=!1),/@.{2,}/.test(h==null?void 0:h.email)&&!Si(h==null?void 0:h.email)?e(7,i=o("generic.invalid_email")):e(7,i=Te),e(5,_=Si(b)),(W.key===Ys||W.key===cn||W.key===ba)&&(W.preventDefault(),b=b.replace(ba,on).trim(),_&&(e(4,h.email=b,h),z()))}function z(){f.includes(String(h==null?void 0:h.email))?e(6,y=!0):(e(1,f=[...f,String(h==null?void 0:h.email)]),e(4,h.email="",h),e(5,_=null),e(6,y=!1))}function D(W){f.splice(W,1),e(1,f=[...f]);let re=f.includes(String(h==null?void 0:h.email));e(6,y=!!re)}async function P(W){var F;if(h!=null&&h.email&&!f.includes(h==null?void 0:h.email)&&f.push(h==null?void 0:h.email),R=$d(),Wn(!1),e(3,g=!0),((F=Object.getOwnPropertyNames(l))==null?void 0:F.length)!==0){await If(l,s,r).then(le=>{O=le});const X=ss(Df,q0,Fo,r==null?void 0:r.id,void 0,r==null?void 0:r.bom);dr(X)}else{await S_(d,s,r).then(ue=>{O=ue});const X=mm(d),le=ss(Df,j0,Fo,a==null?void 0:a.id,void 0,d,String(X));dr(le)}T=ep(a),C(),L();const re=S(),G=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:re,module:fo.SHARE_BOM}});document.dispatchEvent(G),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,X=>{var le;try{if(X.detail.module===fo.SHARE_BOM){const ue=X.detail.emailResp;if(JSON.parse(String((le=ue==null?void 0:ue.data)==null?void 0:le.bulkNotification)).statusCode===200)bo(d.length===0?o("share_bill_of_materials.bill_materials_shared_message"):o("share_bill_of_materials.shared_with_distributor_message")),q("close");else{const ee=String(o("generic.error_message"));Mi(ee)}e(3,g=!1),j(w_)}}catch{q("close"),e(3,g=!1)}finally{k=[]}})}async function L(){let W=d.length===0?T:d;d.length===0?T=W:e(0,d=W)}function C(){f.forEach(W=>{k.push({data:{username:"user"},emailId:W,language:c,country:u})})}function S(){return{notifications:[{[ca]:kD,[la]:JSON.stringify({[Zd]:R,[Xd]:h.description?h.description:Te,[nu]:(r==null?void 0:r.owner)||Te,[Jd]:d.length===0?T:d.map(re=>(re.productRef=re.productRef||re.productId,re.url=vo(re.url||re.pdpUrl),re)),[Vd]:[{[Yd]:String(O),[Kd]:`Cart-${oc(new Date,Zf)}.xlsx`}]}),[iu]:JSON.stringify(k)}]}}function I(){e(4,h={email:"",description:""}),e(1,f=[]),e(6,y=!1)}const N=()=>{q("close")};function E(W){t.$$.not_equal(h.email,W)&&(h.email=W,e(4,h))}const B=W=>M(W.detail),U=()=>{z()},H=W=>{D(W)},Z=W=>{var re;e(4,h.description=(re=W==null?void 0:W.target)==null?void 0:re.value,h)},V=W=>{P()},ne=()=>{q("close")};return t.$$set=W=>{"bomData"in W&&e(14,l=W.bomData),"projectData"in W&&e(15,a=W.projectData),"language"in W&&e(16,c=W.language),"country"in W&&e(17,u=W.country),"selectedProductParts"in W&&e(0,d=W.selectedProductParts),"allEmails"in W&&e(1,f=W.allEmails),"apigeeToken"in W&&e(18,p=W.apigeeToken),"user"in W&&e(2,m=W.user)},e(7,i=Te),[d,f,m,g,h,_,y,i,o,q,M,z,D,P,l,a,c,u,p,N,E,B,U,H,Z,V,ne]}class HW extends Ot{constructor(n){super(),At(this,n,GW,FW,It,{bomData:14,projectData:15,language:16,country:17,selectedProductParts:0,allEmails:1,apigeeToken:18,user:2},BW,[-1,-1])}}const oie="",{document:WW}=uo;function VW(t){Ut(t,"svelte-1r60jtn",".pw.display-flex.svelte-1r60jtn.svelte-1r60jtn{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1r60jtn.svelte-1r60jtn{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.center-align-items.svelte-1r60jtn.svelte-1r60jtn{align-items:center}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.validation-warning.svelte-1r60jtn.svelte-1r60jtn{padding-left:10px;padding-bottom:10px;color:var(--se-red, #dc0a0a);gap:4px}.validation-warning.svelte-1r60jtn .info-container.svelte-1r60jtn{padding-top:2px}")}function b5(t){let n,e;return{c(){n=A("uiaas-locator"),w(n,"cc",t[12]()),w(n,"lc",We.language),w(n,"latitude",t[6]),w(n,"longitude",t[7]),w(n,"locatorid",hv[We.country]),w(n,"stylepath",wv),w(n,"apiserver",yv),w(n,"usedefaultcontainer","false"),w(n,"accountselectionbuttonlabel",e=t[11]("share_cart.share_list_of_parts")),w(n,"enableaccountselection","true"),w(n,"breadcrumbs",on),w(n,"imagesurl",Pv)},m(i,r){J(i,n,r)},p(i,r){r&64&&w(n,"latitude",i[6]),r&128&&w(n,"longitude",i[7]),r&2048&&e!==(e=i[11]("share_cart.share_list_of_parts"))&&w(n,"accountselectionbuttonlabel",e)},d(i){i&&K(n)}}}function v5(t){let n,e,i,r;const o=[ZW,YW],s=[];function l(a,c){return a[4]?0:1}return e=l(t),i=s[e]=o[e](t),{c(){n=A("se-dialog"),i.c(),w(n,"pagescroll","true"),w(n,"can-backdrop","false"),w(n,"size","large"),w(n,"open",t[9])},m(a,c){J(a,n,c),s[e].m(n,null),r=!0},p(a,c){let u=e;e=l(a),e===u?s[e].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),i=s[e],i?i.p(a,c):(i=s[e]=o[e](a),i.c()),Q(i,1),i.m(n,null)),(!r||c&512)&&w(n,"open",a[9])},i(a){r||(Q(i),r=!0)},o(a){se(i),r=!1},d(a){a&&K(n),s[e].d()}}}function YW(t){let n,e;return n=new HW({props:{projectData:t[5],bomData:t[5].bom,language:t[0],apigeeToken:t[2],country:t[1],selectedProductParts:t[10],allEmails:t[8],user:t[3]}}),n.$on("closePopupEvent",t[15]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&32&&(o.projectData=i[5]),r&32&&(o.bomData=i[5].bom),r&1&&(o.language=i[0]),r&4&&(o.apigeeToken=i[2]),r&2&&(o.country=i[1]),r&1024&&(o.selectedProductParts=i[10]),r&256&&(o.allEmails=i[8]),r&8&&(o.user=i[3]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function ZW(t){let n,e,i,r,o,s,l,a;return{c(){n=A("div"),e=A("div"),i=A("se-icon"),i.textContent="action_delete_cross",r=Y(),o=A("div"),s=de(t[4]),w(i,"id","close-popup"),x(e,"class","notification-icon-container"),x(o,"class","info-container svelte-1r60jtn"),x(n,"class","validation-warning display-flex pw center-align-items svelte-1r60jtn")},m(c,u){J(c,n,u),v(n,e),v(e,i),v(n,r),v(n,o),v(o,s),l||(a=xe(i,"click",t[14]),l=!0)},p(c,u){u&16&&be(s,c[4])},i:et,o:et,d(c){c&&K(n),l=!1,a()}}}function XW(t){let n,e,i,r=t[6],o,s,l,a=b5(t),c=t[9]&&v5(t);return{c(){n=A("script"),i=Y(),a.c(),o=Y(),c&&c.c(),s=wt(),x(n,"type","module"),rr(n.src,e=kv)||x(n,"src",e)},m(u,d){v(WW.head,n),J(u,i,d),a.m(u,d),J(u,o,d),c&&c.m(u,d),J(u,s,d),l=!0},p(u,[d]){d&64&&It(r,r=u[6])?(a.d(1),a=b5(u),a.c(),a.m(o.parentNode,o)):a.p(u,d),u[9]?c?(c.p(u,d),d&512&&Q(c,1)):(c=v5(u),c.c(),Q(c,1),c.m(s.parentNode,s)):c&&(Je(),se(c,1,1,()=>{c=null}),Qe())},i(u){l||(Q(c),l=!0)},o(u){se(c),l=!1},d(u){u&&(K(i),K(o),K(s)),K(n),a.d(u),c&&c.d(u)}}}function KW(t,n,e){let i,r;ye(t,es,R=>e(16,i=R)),ye(t,Vt,R=>e(11,r=R));let{language:o}=n,{country:s}=n,{apigeeToken:l}=n,{user:a}=n,c,u,d,f,p,m=!1,g;Un(async()=>{h()}),$r.subscribe(async R=>{var O,j,q,M;if(R&&(R!=null&&R.bom)){e(5,u=R),((j=(O=u==null?void 0:u.bom)==null?void 0:O.parts)==null?void 0:j.length)===0&&((M=(q=u==null?void 0:u.bom)==null?void 0:q.groups)==null?void 0:M.length)===0&&e(4,c=r("share_cart.no_product_in_cart"));return}else try{let z=await jo(i);if(z!=null&&z.error){e(4,c=z.message);return}}catch(z){e(4,c=z.message),ve.error(z.message)}});function h(){"geolocation"in navigator?navigator.geolocation.getCurrentPosition(function(R){e(6,d=R.coords.latitude),e(7,f=R.coords.longitude)},function(R){switch(R.code){case R.PERMISSION_DENIED:ve.error("User denied the request for geolocation.");break;case R.POSITION_UNAVAILABLE:ve.error("Location information is unavailable.");break;case R.TIMEOUT:ve.error("The request to get user location timed out.");break}}):ve.error("Geolocation is not available in this browser.")}function _(){return We.country===Sv?Tv:We.country}function b(){e(9,m=!1)}function y(){const R=n1();Ar(`${lr}/${String(R.myCart.cartPage)}`)}document.addEventListener(mv,R=>{if(e(9,m=!0),!c){e(10,g=fd(u,void 0,!0));const j=R==null?void 0:R.detail;e(8,p=j.map(q=>String(q==null?void 0:q.email))),e(8,p=uy(p))}}),document.addEventListener(gv,()=>{y()});const k=()=>{b()},T=()=>{b()};return t.$$set=R=>{"language"in R&&e(0,o=R.language),"country"in R&&e(1,s=R.country),"apigeeToken"in R&&e(2,l=R.apigeeToken),"user"in R&&e(3,a=R.user)},[o,s,l,a,c,u,d,f,p,m,g,r,_,b,k,T]}class JW extends Ot{constructor(n){super(),At(this,n,KW,XW,It,{language:0,country:1,apigeeToken:2,user:3},VW)}}const aie="";function QW(t){Ut(t,"svelte-pyy9ok",".display-flex.svelte-pyy9ok.svelte-pyy9ok{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.pointer.svelte-pyy9ok.svelte-pyy9ok{cursor:pointer}h4.heading.svelte-pyy9ok.svelte-pyy9ok{font-weight:500}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.heading.svelte-pyy9ok.svelte-pyy9ok{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px}.cross-icon.svelte-pyy9ok.svelte-pyy9ok{position:absolute;right:16px;top:16px}.share-bom-content.svelte-pyy9ok.svelte-pyy9ok{padding:0px 20px;margin-bottom:20px}.receive-content-text.svelte-pyy9ok.svelte-pyy9ok{color:var(--se-anthracite-grey, #333333);font-size:14px}.input-field.svelte-pyy9ok.svelte-pyy9ok{flex-direction:column;position:relative;margin-top:12px}.plus-icon-email.svelte-pyy9ok.svelte-pyy9ok{position:absolute;right:-44px;top:26px}.error.svelte-pyy9ok.svelte-pyy9ok{color:var(--se-red, #dc0a0a);font-size:12px;padding-top:10px}.pointer-event-none.svelte-pyy9ok.svelte-pyy9ok{pointer-events:none;opacity:0.5}.all-selectedEmail-list.svelte-pyy9ok.svelte-pyy9ok{display:flex;flex-wrap:wrap;margin-top:10px;max-height:100px;overflow:auto}.all-selectedEmail-list.svelte-pyy9ok p.svelte-pyy9ok{background:var(--se-dark-grey, #626469);padding:8px 20px;color:var(--se-white, #ffffff);border-radius:50px;margin:0px 12px 10px 0px;font-size:14px;padding-right:12px;height:fit-content}.all-selectedEmail-list.svelte-pyy9ok p span.svelte-pyy9ok{font-size:12px;padding-left:8px;padding-right:8px}.dialog-footer-button.svelte-pyy9ok.svelte-pyy9ok{margin-top:12px;margin-left:-4px}.dialog-content-width.svelte-pyy9ok.svelte-pyy9ok{width:75%}#btn-cancel.svelte-pyy9ok.svelte-pyy9ok{margin-left:8px}")}function w5(t,n,e){const i=t.slice();return i[39]=n[e],i[41]=e,i}function y5(t){let n,e=t[7]("share_bill_of_materials.email_already_exist")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-pyy9ok")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&128&&e!==(e=r[7]("share_bill_of_materials.email_already_exist")+"")&&be(i,e)},d(r){r&&K(n)}}}function k5(t){let n,e;return{c(){n=A("p"),e=de(t[6]),x(n,"class","error svelte-pyy9ok")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r[0]&64&&be(e,i[6])},d(i){i&&K(n)}}}function S5(t){let n,e=t[7]("generic.cannot_share_to_owner")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-pyy9ok")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&128&&e!==(e=r[7]("generic.cannot_share_to_owner")+"")&&be(i,e)},d(r){r&&K(n)}}}function T5(t){let n,e=Dt(t[1]),i=[];for(let r=0;rCt(M,"value",ue)),M.$on("onKeyDown",t[21]);let $=t[5]&&y5(t),he=t[6]&&t[6].length>0&&k5(t),me=I&&S5(t),te=t[1].length!=0&&T5(t);function oe(Ee,ke){var Ce;return((Ce=Ee[0])==null?void 0:Ce.length)>0?eV:$W}let ce=oe(t),ge=ce(t);return W=new Gt({props:{id:"btn-send",dataTestId:"send-button-share-bom",buttonType:"submit",disabled:!(Si((Ie=t[3])==null?void 0:Ie.email)||((we=t[1])==null?void 0:we.length)>0)||((Se=(pe=t[3])==null?void 0:pe.email)==null?void 0:Se.toLowerCase())===(((Re=(Le=t[2])==null?void 0:Le.profile)==null?void 0:Re.email)||Te).toLowerCase(),buttonSize:"medium",importance:"emphasized",buttonText:t[7]("generic.send")}}),G=new Gt({props:{id:"btn-cancel",dataTestId:"cancel-button-share-bom",buttonType:"button",buttonSize:"medium",buttonText:t[7]("generic.cancel")}}),G.$on("btnClick",t[25]),{c(){n=A("se-loading"),e=Y(),i=A("se-dilog-header"),r=A("h4"),s=de(o),l=Y(),a=A("se-icon"),a.textContent="action_close",c=Y(),u=A("se-dialog-content"),d=A("p"),p=de(f),m=de("."),g=Y(),h=A("p"),b=de(_),y=de("."),k=Y(),T=A("form"),R=A("div"),O=A("qds-label"),q=Y(),De(M.$$.fragment),D=Y(),P=A("se-icon"),P.textContent="action_add_flat",L=Y(),$&&$.c(),C=Y(),he&&he.c(),S=Y(),me&&me.c(),N=Y(),te&&te.c(),E=Y(),B=A("div"),ge.c(),U=Y(),H=A("qds-textarea"),V=Y(),ne=A("div"),De(W.$$.fragment),re=Y(),De(G.$$.fragment),w(n,"loading",t[8]),x(r,"class","heading svelte-pyy9ok"),x(r,"data-testid","share-bom-heading"),w(a,"data-testid","close-button-share-bom"),w(a,"id","ic-close"),w(a,"class","cross-icon pw pointer svelte-pyy9ok"),w(a,"color","standard"),w(i,"class","pw"),x(d,"class","receive-content-text svelte-pyy9ok"),x(h,"class","receive-content-text svelte-pyy9ok"),w(O,"inline",""),w(O,"text",j=t[7]("share_bill_of_materials.enter_email_address")),w(P,"data-testid","plus-email-button"),w(P,"id","ic-add-email"),w(P,"size","medium"),w(P,"class","cursor-pointer plus-icon-email svelte-pyy9ok"),w(P,"color","secondary"),sr(P,"pointer-event-none",t[4]===null||t[4]===!1),x(R,"class","input-field display-flex dialog-content-width svelte-pyy9ok"),w(H,"id","description"),w(H,"name","description"),w(H,"value",Z=t[3].description),w(H,"rows","5"),x(B,"class","input-field display-flex dialog-content-width svelte-pyy9ok"),x(ne,"class","dialog-footer-button svelte-pyy9ok"),x(T,"class","form-share-bom"),w(u,"class","share-bom-content svelte-pyy9ok")},m(Ee,ke){J(Ee,n,ke),J(Ee,e,ke),J(Ee,i,ke),v(i,r),v(r,s),v(i,l),v(i,a),J(Ee,c,ke),J(Ee,u,ke),v(u,d),v(d,p),v(d,m),v(u,g),v(u,h),v(h,b),v(h,y),v(u,k),v(u,T),v(T,R),v(R,O),v(R,q),Me(M,R,null),v(R,D),v(R,P),v(T,L),$&&$.m(T,null),v(T,C),he&&he.m(T,null),v(T,S),me&&me.m(T,null),v(T,N),te&&te.m(T,null),v(T,E),v(T,B),ge.m(B,null),v(B,U),v(B,H),v(T,V),v(T,ne),Me(W,ne,null),v(ne,re),Me(G,ne,null),F=!0,X||(le=[xe(a,"click",t[19]),xe(P,"click",t[22]),xe(H,"input",t[24]),xe(T,"submit",Ts(t[26]))],X=!0)},p(Ee,ke){var Ve,ot,gt,He,Be,Ye,Ue,rt,ze,tt;(!F||ke[0]&256)&&w(n,"loading",Ee[8]),(!F||ke[0]&128)&&o!==(o=Ee[7]("share_bill_of_materials.share_bill_of_materials_text")+"")&&be(s,o),(!F||ke[0]&128)&&f!==(f=Ee[7]("share_bill_of_materials.send_bill_of_materials_message")+"")&&be(p,f),(!F||ke[0]&128)&&_!==(_=Ee[7]("share_bill_of_materials.personal_data_in_our_system")+"")&&be(b,_),(!F||ke[0]&128&&j!==(j=Ee[7]("share_bill_of_materials.enter_email_address")))&&w(O,"text",j);const Ce={};ke[0]&128&&(Ce.placeholder=Ee[7]("share_bill_of_materials.enter_email_address")),!z&&ke[0]&8&&(z=!0,Ce.value=Ee[3].email,Tt(()=>z=!1)),M.$set(Ce),(!F||ke[0]&16)&&sr(P,"pointer-event-none",Ee[4]===null||Ee[4]===!1),Ee[5]?$?$.p(Ee,ke):($=y5(Ee),$.c(),$.m(T,C)):$&&($.d(1),$=null),Ee[6]&&Ee[6].length>0?he?he.p(Ee,ke):(he=k5(Ee),he.c(),he.m(T,S)):he&&(he.d(1),he=null),ke[0]&12&&(I=((ot=(Ve=Ee[3])==null?void 0:Ve.email)==null?void 0:ot.toLowerCase())===(((He=(gt=Ee[2])==null?void 0:gt.profile)==null?void 0:He.email)||Te).toLowerCase()),I?me?me.p(Ee,ke):(me=S5(Ee),me.c(),me.m(T,N)):me&&(me.d(1),me=null),Ee[1].length!=0?te?te.p(Ee,ke):(te=T5(Ee),te.c(),te.m(T,E)):te&&(te.d(1),te=null),ce===(ce=oe(Ee))&&ge?ge.p(Ee,ke):(ge.d(1),ge=ce(Ee),ge&&(ge.c(),ge.m(B,U))),(!F||ke[0]&8&&Z!==(Z=Ee[3].description))&&w(H,"value",Z);const Ne={};ke[0]&14&&(Ne.disabled=!(Si((Be=Ee[3])==null?void 0:Be.email)||((Ye=Ee[1])==null?void 0:Ye.length)>0)||((rt=(Ue=Ee[3])==null?void 0:Ue.email)==null?void 0:rt.toLowerCase())===(((tt=(ze=Ee[2])==null?void 0:ze.profile)==null?void 0:tt.email)||Te).toLowerCase()),ke[0]&128&&(Ne.buttonText=Ee[7]("generic.send")),W.$set(Ne);const Pe={};ke[0]&128&&(Pe.buttonText=Ee[7]("generic.cancel")),G.$set(Pe)},i(Ee){F||(Q(M.$$.fragment,Ee),Q(W.$$.fragment,Ee),Q(G.$$.fragment,Ee),F=!0)},o(Ee){se(M.$$.fragment,Ee),se(W.$$.fragment,Ee),se(G.$$.fragment,Ee),F=!1},d(Ee){Ee&&(K(n),K(e),K(i),K(c),K(u)),qe(M),$&&$.d(),he&&he.d(),me&&me.d(),te&&te.d(),ge.d(),qe(W),qe(G),X=!1,An(le)}}}function nV(t,n,e){let i,r,o,s,l;ye(t,Vt,W=>e(7,r=W)),ye(t,an,W=>e(32,o=W)),ye(t,ti,W=>e(33,s=W)),ye(t,Jt,W=>e(8,l=W));let{bomData:a}=n,{projectData:c}=n,{language:u}=n,{country:d}=n,{selectedProductParts:f}=n,{allEmails:p}=n,{apigeeToken:m}=n,{user:g}=n,h={email:"",description:""},_=null,b,y=!1,k=[],T=[],R,O;const j=Mn();function q(W){j("closePopupEvent",{action:W}),I()}function M(W){b=W.target.value,e(5,y=!1),/@.{2,}/.test(h==null?void 0:h.email)&&!Si(h==null?void 0:h.email)?e(6,i=r("generic.invalid_email")):e(6,i=Te),e(4,_=Si(b)),(W.key===Ys||W.key===cn||W.key===ba)&&(W.preventDefault(),b=b.replace(ba,on).trim(),_&&(e(3,h.email=b,h),z()))}function z(){p.includes(String(h==null?void 0:h.email))?e(5,y=!0):(e(1,p=[...p,String(h==null?void 0:h.email)]),e(3,h.email="",h),e(4,_=null),e(5,y=!1))}function D(W){p.splice(W,1),e(1,p=[...p]);let re=p.includes(String(h==null?void 0:h.email));e(5,y=!!re)}async function P(W){var F;if(h!=null&&h.email&&!p.includes(h==null?void 0:h.email)&&p.push(h==null?void 0:h.email),R=$d(),Wn(!1),Jt.update(()=>!0),((F=Object.getOwnPropertyNames(a))==null?void 0:F.length)!==0){O=await If(a,s,o);const X=ss(Df,q0,Fo,o==null?void 0:o.id,void 0,o==null?void 0:o.bom);dr(X)}else{O=await S_(f,s,o);const X=mm(f),le=ss(Df,j0,Fo,c==null?void 0:c.id,void 0,f,String(X));dr(le)}T=ep(c),C(),L();const re=S(),G=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:re,module:fo.SHARE_BOM}});document.dispatchEvent(G),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,X=>{var le;try{if(X.detail.module===fo.SHARE_BOM){const ue=X.detail.emailResp;if(JSON.parse(String((le=ue==null?void 0:ue.data)==null?void 0:le.bulkNotification)).statusCode===200)bo(f.length===0?r("share_bill_of_materials.bill_materials_shared_message"):r("share_bill_of_materials.shared_with_distributor_message")),q("close");else{const ee=String(r("generic.error_message"));Mi(ee)}Jt.update(()=>!1),j(w_)}}catch{q("close"),Jt.update(()=>!1)}finally{k=[]}})}async function L(){let W=f.length===0?T:f;f.length===0?T=W:e(0,f=W)}function C(){p.forEach(W=>{k.push({data:{username:"user"},emailId:W,language:u,country:d})})}function S(){return{notifications:[{[ca]:Um,[la]:JSON.stringify({[Ef]:tn(c==null?void 0:c.name),[Xd]:h.description?h.description:Te,[nu]:c.owner,[Sy]:tn(c==null?void 0:c.description),[Bm]:c.company,[Zd]:R,[Jd]:f.length===0?T:f.map(re=>(re.productRef=re.productRef||re.productId,re.url=vo(re.url||re.pdpUrl),re)),[Vd]:[{[Yd]:String(O),[Kd]:`${tn(c==null?void 0:c.name)}-(BOM)-${oc(new Date,Zf)}.xlsx`}]}),[iu]:JSON.stringify(k)}]}}function I(){e(3,h={email:"",description:""}),e(1,p=[]),e(5,y=!1),Jt.update(()=>!1)}const N=()=>{q("close")};function E(W){t.$$.not_equal(h.email,W)&&(h.email=W,e(3,h))}const B=W=>M(W.detail),U=()=>{z()},H=W=>{D(W)},Z=W=>{var re;e(3,h.description=(re=W==null?void 0:W.target)==null?void 0:re.value,h)},V=()=>{q("close")},ne=W=>{P()};return t.$$set=W=>{"bomData"in W&&e(14,a=W.bomData),"projectData"in W&&e(15,c=W.projectData),"language"in W&&e(16,u=W.language),"country"in W&&e(17,d=W.country),"selectedProductParts"in W&&e(0,f=W.selectedProductParts),"allEmails"in W&&e(1,p=W.allEmails),"apigeeToken"in W&&e(18,m=W.apigeeToken),"user"in W&&e(2,g=W.user)},e(6,i=Te),[f,p,g,h,_,y,i,r,l,q,M,z,D,P,a,c,u,d,m,N,E,B,U,H,Z,V,ne]}class J_ extends Ot{constructor(n){super(),At(this,n,nV,tV,It,{bomData:14,projectData:15,language:16,country:17,selectedProductParts:0,allEmails:1,apigeeToken:18,user:2},QW,[-1,-1])}}const{document:iV}=uo;function E5(t){let n,e;return{c(){n=A("uiaas-locator"),w(n,"cc",t[11]()),w(n,"lc",We.language),w(n,"latitude",t[4]),w(n,"longitude",t[5]),w(n,"locatorid",hv[We.country]),w(n,"stylepath",wv),w(n,"apiserver",yv),w(n,"usedefaultcontainer","true"),w(n,"accountselectionbuttonlabel",e=t[9]("bom_manager.share_bom")),w(n,"enableaccountselection","true"),w(n,"breadcrumbs",on),w(n,"imagesurl",Pv)},m(i,r){J(i,n,r)},p(i,r){r&16&&w(n,"latitude",i[4]),r&32&&w(n,"longitude",i[5]),r&512&&e!==(e=i[9]("bom_manager.share_bom"))&&w(n,"accountselectionbuttonlabel",e)},d(i){i&&K(n)}}}function I5(t){let n,e,i;return e=new J_({props:{projectData:t[10],bomData:{},language:t[0],apigeeToken:t[2],country:t[1],selectedProductParts:t[8],allEmails:t[6],user:t[3]}}),e.$on("closePopupEvent",t[14]),e.$on("closeReseller",t[15]),{c(){n=A("se-dialog"),De(e.$$.fragment),w(n,"pagescroll","true"),w(n,"can-backdrop","false"),w(n,"size","large"),w(n,"open",t[7])},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o&1&&(s.language=r[0]),o&4&&(s.apigeeToken=r[2]),o&2&&(s.country=r[1]),o&256&&(s.selectedProductParts=r[8]),o&64&&(s.allEmails=r[6]),o&8&&(s.user=r[3]),e.$set(s),(!i||o&128)&&w(n,"open",r[7])},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function rV(t){let n,e,i,r=t[4],o,s,l,a=E5(t),c=t[7]&&I5(t);return{c(){n=A("script"),i=Y(),a.c(),o=Y(),c&&c.c(),s=wt(),x(n,"type","module"),rr(n.src,e=kv)||x(n,"src",e)},m(u,d){v(iV.head,n),J(u,i,d),a.m(u,d),J(u,o,d),c&&c.m(u,d),J(u,s,d),l=!0},p(u,[d]){d&16&&It(r,r=u[4])?(a.d(1),a=E5(u),a.c(),a.m(o.parentNode,o)):a.p(u,d),u[7]?c?(c.p(u,d),d&128&&Q(c,1)):(c=I5(u),c.c(),Q(c,1),c.m(s.parentNode,s)):c&&(Je(),se(c,1,1,()=>{c=null}),Qe())},i(u){l||(Q(c),l=!0)},o(u){se(c),l=!1},d(u){u&&(K(i),K(o),K(s)),K(n),a.d(u),c&&c.d(u)}}}function sV(){let n=window.location.pathname.split("/projects/")[1];return n=n.split("/")[0],n}function oV(t,n,e){let i,r;ye(t,an,T=>e(16,i=T)),ye(t,Vt,T=>e(9,r=T));let{language:o}=n,{country:s}=n,{apigeeToken:l}=n,{user:a}=n,c=i,u,d,f,p=!1,m;Un(()=>{g()});function g(){"geolocation"in navigator?navigator.geolocation.getCurrentPosition(function(T){e(4,u=T.coords.latitude),e(5,d=T.coords.longitude)},function(T){switch(T.code){case T.PERMISSION_DENIED:ve.error("User denied the request for geolocation.");break;case T.POSITION_UNAVAILABLE:ve.error("Location information is unavailable.");break;case T.TIMEOUT:ve.error("The request to get user location timed out.");break}}):ve.error("Geolocation is not available in this browser.")}function h(){return We.country===Sv?Tv:We.country}function _(){e(7,p=!1)}function b(){const T=n1(),R=sV();Ar(`${lr}${String(T.projects.projectsPage)}/${String(R)}`)}document.addEventListener(mv,T=>{e(8,m=fd(c)),e(7,p=!0);const R=T==null?void 0:T.detail;e(6,f=R.map(O=>String(O==null?void 0:O.email))),e(6,f=uy(f))}),document.addEventListener(gv,()=>{b()});const y=()=>{_()},k=()=>{b()};return t.$$set=T=>{"language"in T&&e(0,o=T.language),"country"in T&&e(1,s=T.country),"apigeeToken"in T&&e(2,l=T.apigeeToken),"user"in T&&e(3,a=T.user)},[o,s,l,a,u,d,f,p,m,r,c,h,_,b,y,k]}class aV extends Ot{constructor(n){super(),At(this,n,oV,rV,It,{language:0,country:1,apigeeToken:2,user:3})}}const lie="";function lV(t){Ut(t,"svelte-5dj9vm",".pw.disabled.svelte-5dj9vm{pointer-events:none;opacity:0.5}.pw.align-right.svelte-5dj9vm{margin-left:auto}.pw.align-left.svelte-5dj9vm{margin-right:auto}.pw.display-flex.svelte-5dj9vm{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-5dj9vm{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-5dj9vm{font-size:16px}.pw.small-font.svelte-5dj9vm{font-size:14px}.pw.nano-font.svelte-5dj9vm{font-size:12px}.pw.pointer.svelte-5dj9vm{cursor:pointer}.pw-snackbar-elem.svelte-5dj9vm{top:30px}.pw.red-color.svelte-5dj9vm{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-5dj9vm{display:none}.pw.width-100.svelte-5dj9vm{width:100%}.pw.bold-font.svelte-5dj9vm{font-weight:bold}.pw.normal-font.svelte-5dj9vm{font-weight:normal;font-size:16px}.pw.error-msg.svelte-5dj9vm{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-5dj9vm{text-align:center}.pw.center-align-items.svelte-5dj9vm{align-items:center}.pw.justify-content-center.svelte-5dj9vm{justify-content:center}.pw.bom-checkbox.svelte-5dj9vm{max-width:16px}.pw.ml-8.svelte-5dj9vm{margin-left:8px}.pw.ml-12.svelte-5dj9vm{margin-left:12px}.pw.ml-36.svelte-5dj9vm{margin-left:36px}.pw.mt-8.svelte-5dj9vm{margin-top:8px}.pw.mt-6.svelte-5dj9vm{margin-top:6px}.pw.mt-32.svelte-5dj9vm{margin-top:32px}.pw.mb-8.svelte-5dj9vm{margin-bottom:8px}.pw.mb-12.svelte-5dj9vm{margin-bottom:12px}.pw.mb-16.svelte-5dj9vm{margin-top:16px}.pw.mb-21.svelte-5dj9vm{margin-bottom:21px}.pw.mr-12.svelte-5dj9vm{margin-right:12px}.pw.p-12.svelte-5dj9vm{padding:12px}.pw.pl-16.svelte-5dj9vm{padding-left:16px}.pw.pr-16.svelte-5dj9vm{padding-right:16px}h4.heading.svelte-5dj9vm{font-weight:500}.position-absolute.svelte-5dj9vm{position:absolute}.flex-wrap.svelte-5dj9vm{flex-wrap:wrap}.justify-content-sp-btw.svelte-5dj9vm{justify-content:space-between}.gp-10.svelte-5dj9vm{gap:10px}.gp-5.svelte-5dj9vm{gap:5px}.desktop-view.svelte-5dj9vm{display:none}.mobile-view.svelte-5dj9vm{display:block}.mobile-view-flx.svelte-5dj9vm{display:flex;flex-direction:column}.rounded-border.svelte-5dj9vm{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-5dj9vm{text-align:right}.bg-color-light-grey.svelte-5dj9vm{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-5dj9vm{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-5dj9vm{padding:8px 0 16px 8px}@media(min-width: 968px){.mobile-view.svelte-5dj9vm,.mobile-view-flx.svelte-5dj9vm{display:none}.desktop-view.svelte-5dj9vm{display:inherit}}.cart-mobile-snackbar.svelte-5dj9vm{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-5dj9vm,.mobile-view-snackbar.svelte-5dj9vm{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-5dj9vm{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-5dj9vm{display:block}.mobile-snackbar.svelte-5dj9vm{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-5dj9vm{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-5dj9vm{margin:-6px}.bottom-snackbar.svelte-5dj9vm{bottom:30px;top:auto}.cross-icon.svelte-5dj9vm{position:absolute;right:8px;top:8px}.heading.svelte-5dj9vm{font-size:22px;color:var(--se-true-black, #000000);margin-top:16px;margin-left:16px;padding:0px 20px}#confirm-text.svelte-5dj9vm{font-weight:400;font-size:14px}.dialog-footer-button.svelte-5dj9vm{margin-top:12px;margin-left:-4px}.popup-content.svelte-5dj9vm{padding:0px 20px;margin-bottom:20px;margin-top:-16px}.small-text.svelte-5dj9vm{font-size:12px}.margin-top-10.svelte-5dj9vm{margin-top:10px}.margin-top-neg-10.svelte-5dj9vm{margin-top:-10px}")}function A5(t){let n,e,i=t[7]("unified_checkout.user_list_remove")+"",r;return{c(){n=A("p"),e=de("*"),r=de(i),x(n,"class","small-text margin-top-10 svelte-5dj9vm")},m(o,s){J(o,n,s),v(n,e),v(n,r)},p(o,s){s&128&&i!==(i=o[7]("unified_checkout.user_list_remove")+"")&&be(r,i)},d(o){o&&K(n)}}}function cV(t){let n,e,i=t[7]("generic.confirm")+"",r,o,s,l,a,c,u,d,f=t[7]("project_listing.add_project_message")+"",p,m,g,h,_,b,y=t[6]===t[7]("project_listing.archive"),k,T,R,O,j,q,M,z,D,P,L,C=y&&A5(t);return O=new Gt({props:{importance:"emphasized",dataTestId:"uc-list-dialog-yes-btn",buttonText:t[7]("generic.yes")}}),O.$on("btnClick",t[11]),M=new Gt({props:{buttonText:t[7]("generic.no")}}),M.$on("btnClick",t[12]),{c(){n=A("se-dialog"),e=A("h4"),r=de(i),o=Y(),s=de(t[6]),l=Y(),a=A("qds-button"),c=Y(),u=A("se-dialog-content"),d=A("span"),p=de(f),m=Y(),g=de(t[6]),h=Y(),_=de(t[3]),b=de(`? `),C&&C.c(),k=Y(),T=A("div"),R=A("span"),De(O.$$.fragment),j=Y(),q=A("span"),De(M.$$.fragment),x(e,"class","heading svelte-5dj9vm"),x(e,"id","popup-header"),w(a,"importance","subdued"),w(a,"icon-name","cross-circle"),w(a,"class","cross-icon pw pointer svelte-5dj9vm"),w(a,"id","close-popup"),x(d,"id","confirm-text"),x(d,"class","svelte-5dj9vm"),x(R,"class","popup-button"),x(q,"class","popup-button"),x(T,"class","dialog-footer-button svelte-5dj9vm"),w(u,"class",z="popup-content "+(t[6]===S0?"margin-top-neg-10":Te)+" svelte-5dj9vm"),w(n,"id",t[5]),w(n,"can-backdrop","false"),w(n,"open",t[4]),w(n,"class","svelte-5dj9vm")},m(S,I){J(S,n,I),v(n,e),v(e,r),v(e,o),v(e,s),v(n,l),v(n,a),v(n,c),v(n,u),v(u,d),v(d,p),v(d,m),v(d,g),v(d,h),v(d,_),v(d,b),C&&C.m(d,null),v(u,k),v(u,T),v(T,R),Me(O,R,null),v(T,j),v(T,q),Me(M,q,null),t[13](n),D=!0,P||(L=xe(a,"click",t[10]),P=!0)},p(S,[I]){(!D||I&128)&&i!==(i=S[7]("generic.confirm")+"")&&be(r,i),(!D||I&64)&&be(s,S[6]),(!D||I&128)&&f!==(f=S[7]("project_listing.add_project_message")+"")&&be(p,f),(!D||I&64)&&be(g,S[6]),(!D||I&8)&&be(_,S[3]),I&192&&(y=S[6]===S[7]("project_listing.archive")),y?C?C.p(S,I):(C=A5(S),C.c(),C.m(d,null)):C&&(C.d(1),C=null);const N={};I&128&&(N.buttonText=S[7]("generic.yes")),O.$set(N);const E={};I&128&&(E.buttonText=S[7]("generic.no")),M.$set(E),(!D||I&64&&z!==(z="popup-content "+(S[6]===S0?"margin-top-neg-10":Te)+" svelte-5dj9vm"))&&w(u,"class",z),(!D||I&32)&&w(n,"id",S[5]),(!D||I&16)&&w(n,"open",S[4])},i(S){D||(Q(O.$$.fragment,S),Q(M.$$.fragment,S),D=!0)},o(S){se(O.$$.fragment,S),se(M.$$.fragment,S),D=!1},d(S){S&&K(n),C&&C.d(),qe(O),qe(M),t[13](null),P=!1,L()}}}function uV(t,n,e){let i;ye(t,Vt,b=>e(7,i=b));const r=Mn();let{wrapper:o}=n,{archiveStatus:s}=n,{projectId:l}=n,{projectName:a}=n,{open:c=!1}=n,{dialogId:u}=n,{dialogType:d}=n;Kn(()=>{Oi(Kr)});function f(b,y,k,T){r("updateListEvent",{wrapper:b,archiveStatus:!!y,projectId:String(k),projectName:String(T)})}function p(b,y){r("closeUpdatePopupEvent",{wrapperarchiveUnarchive:b,archiveDialogId:String(y)})}const m=()=>{p(o,u)},g=()=>{f(o,s,String(l),String(a))},h=()=>{p(o,u)};function _(b){_t[b?"unshift":"push"](()=>{o=b,e(0,o)})}return t.$$set=b=>{"wrapper"in b&&e(0,o=b.wrapper),"archiveStatus"in b&&e(1,s=b.archiveStatus),"projectId"in b&&e(2,l=b.projectId),"projectName"in b&&e(3,a=b.projectName),"open"in b&&e(4,c=b.open),"dialogId"in b&&e(5,u=b.dialogId),"dialogType"in b&&e(6,d=b.dialogType)},[o,s,l,a,c,u,d,i,f,p,m,g,h,_]}class fV extends Ot{constructor(n){super(),At(this,n,uV,cV,It,{wrapper:0,archiveStatus:1,projectId:2,projectName:3,open:4,dialogId:5,dialogType:6},lV)}}const cie="";function dV(t){Ut(t,"svelte-1obj3ee",".display-flex.svelte-1obj3ee.svelte-1obj3ee{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.pointer.svelte-1obj3ee.svelte-1obj3ee{cursor:pointer}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.drop-down.svelte-1obj3ee.svelte-1obj3ee{height:2.8em;border:none;font-weight:400;color:var(--text-dark-gray);font-size:0.875rem;line-height:1.429;padding:8px}@media screen and (max-width: 768px){.drop-down.svelte-1obj3ee.svelte-1obj3ee{padding:0}}.dialog-content-width.svelte-1obj3ee.svelte-1obj3ee{position:relative;overflow-x:hidden;min-height:150px;max-height:200px;padding-right:8px}.error.svelte-1obj3ee.svelte-1obj3ee{color:var(--se-red, #dc0a0a);font-size:12px}.custom-search.svelte-1obj3ee.svelte-1obj3ee{position:relative;width:90%}.custom-search-button.svelte-1obj3ee.svelte-1obj3ee{border:0;outline:none;margin:0;z-index:2;color:var(--se-medium-blue, #219bfd);top:0px}.divtext.svelte-1obj3ee.svelte-1obj3ee{border:0px;width:100%;padding:10px 0;line-height:1;box-sizing:border-box;outline:none;background-color:transparent}.three-dots-icon.svelte-1obj3ee.svelte-1obj3ee{position:absolute;right:0px;top:8px}.flexbox.svelte-1obj3ee.svelte-1obj3ee{display:flex;width:100%;align-items:center}.move-right.svelte-1obj3ee.svelte-1obj3ee{flex-grow:1;position:relative;padding:5px 0px 2px;width:100%;display:flex;align-items:center;gap:8px}@media screen and (max-width: 768px){.move-right.svelte-1obj3ee.svelte-1obj3ee{flex-direction:column;gap:0px}}.user-logo.svelte-1obj3ee.svelte-1obj3ee{left:10px;position:absolute;border-radius:100%;border-color:gray;border-width:1px;border-style:solid}.user-email.svelte-1obj3ee.svelte-1obj3ee{right:0px;position:absolute;padding-right:50px}.mt-14.svelte-1obj3ee.svelte-1obj3ee{margin-top:14px}.email-center.svelte-1obj3ee.svelte-1obj3ee{margin-top:3px;margin-left:42px}.can-edit-center.svelte-1obj3ee.svelte-1obj3ee{top:-6px}.add-users-form.svelte-1obj3ee.svelte-1obj3ee{margin-top:16px}.share-with-info.svelte-1obj3ee.svelte-1obj3ee{margin-top:16px;font-size:14px;margin-bottom:10px}.share-country-list-button.svelte-1obj3ee.svelte-1obj3ee{color:var(--se-medium-blue, #219bfd);cursor:pointer}.add-team-member-section.svelte-1obj3ee.svelte-1obj3ee{position:relative;width:100%}.flexbox.svelte-1obj3ee.svelte-1obj3ee{display:flex;width:100%;align-items:center}.add-team-member-permission-dropdown.svelte-1obj3ee.svelte-1obj3ee{width:110px;position:absolute;right:0;top:1px}#dropdown-change-collaborator-permission.svelte-1obj3ee.svelte-1obj3ee{margin-right:0.2em}.all-selectedEmail-list.svelte-1obj3ee.svelte-1obj3ee{display:flex;flex-wrap:wrap;margin-top:10px;max-height:100px;overflow:auto}.all-selectedEmail-list.svelte-1obj3ee p.svelte-1obj3ee{border:1px solid var(--se-dark-grey, #626469);background:var(--se-white, #ffffff);padding:8px 20px;border-radius:50px;margin:0px 12px 10px 0px;font-size:14px;padding-right:12px;height:fit-content}.all-selectedEmail-list.svelte-1obj3ee p span.svelte-1obj3ee{font-size:12px;padding-left:8px;padding-right:8px}.permission-btn.svelte-1obj3ee.svelte-1obj3ee{width:150px}.email-added.svelte-1obj3ee.svelte-1obj3ee{display:flex;word-break:break-all;width:70%}.user-email-section.svelte-1obj3ee.svelte-1obj3ee{display:flex;width:100%;align-items:center}@media screen and (max-width: 768px){.share-button-email.svelte-1obj3ee.svelte-1obj3ee{margin-top:2px;width:100%}}@media screen and (max-width: 768px){.list-owner.svelte-1obj3ee.svelte-1obj3ee{flex-direction:column;align-items:flex-start}.list-owner.svelte-1obj3ee .user-email.svelte-1obj3ee{position:relative;padding:0;margin-top:20px}.list-owner.svelte-1obj3ee .user-logo.svelte-1obj3ee{left:0px;margin-right:10px}.list-owner.svelte-1obj3ee .email-center.svelte-1obj3ee{margin-left:20px}}")}function O5(t,n,e){const i=t.slice();return i[6]=n[e],i[46]=e,i}function P5(t,n,e){const i=t.slice();return i[47]=n[e],i[46]=e,i}function N5(t){let n,e=t[12]("share_list.user_already_have_access_to_this_list")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-1obj3ee"),x(n,"id","p-list-access-error"),x(n,"data-testid","duplicate-email-error")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("share_list.user_already_have_access_to_this_list")+"")&&be(i,e)},d(r){r&&K(n)}}}function L5(t){let n,e=t[12]("share_project.email_already_exist")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","error svelte-1obj3ee"),x(n,"id","p-duplicate-email-error"),x(n,"data-testid","duplicate-email-error")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&4096&&e!==(e=r[12]("share_project.email_already_exist")+"")&&be(i,e)},d(r){r&&K(n)}}}function j5(t){let n,e;return{c(){n=A("p"),e=de(t[10]),x(n,"class","error svelte-1obj3ee")},m(i,r){J(i,n,r),v(n,e)},p(i,r){r[0]&1024&&be(e,i[10])},d(i){i&&K(n)}}}function R5(t){let n,e=Dt(t[1]),i=[];for(let r=0;ruser_standard',r=Y(),o=A("span"),l=de(s),a=Y(),c=A("span"),u=A("se-dropdown"),d=A("qds-button"),p=Y(),m=A("se-list"),g=A("se-divider"),h=Y(),_=A("se-list-item"),y=Y(),k=A("se-divider"),T=Y(),R=A("se-list-item"),j=Y(),q=A("se-divider"),M=Y(),z=A("se-list-item"),P=Y(),L=A("se-divider"),C=Y(),x(i,"class","user-logo svelte-1obj3ee"),x(o,"class","email-center email-added svelte-1obj3ee"),x(o,"id","span-collaborator-email"),x(e,"class","user-email-section svelte-1obj3ee"),w(d,"class","custom-search-button permission-btn svelte-1obj3ee"),w(d,"slot","trigger"),w(d,"action","dropdown"),w(d,"type","button"),w(d,"id",`button-update-collaborator-permission-${t[46]}`),w(d,"text",f=t[6].canEdit?t[12]("share_project.can_edit"):t[12]("share_project.can_view")),w(_,"id",`item-update-can-view-permission-${t[46]}`),w(_,"item",b=t[12]("share_project.can_view")),w(_,"data-testid",`item-update-can-view-permission-${t[46]}`),w(_,"class","svelte-1obj3ee"),w(R,"id","item-update-can-edit-permission"),w(R,"item",O=t[12]("share_project.can_edit")),w(z,"id","item-remove-permission"),w(z,"item",D=t[12]("generic.remove")),w(m,"option","dropdown"),w(m,"id",`list-update-collaborator-permission-${t[46]}`),w(m,"class","permission-btn svelte-1obj3ee"),w(u,"alignment","right"),w(u,"id","dropdown-change-collaborator-permission"),w(u,"class","drop-down three-dots-icon can-edit-center svelte-1obj3ee"),x(c,"class","user-email svelte-1obj3ee"),x(n,"class","mt-14 display-flex svelte-1obj3ee")},m(U,H){J(U,n,H),v(n,e),v(e,i),v(e,r),v(e,o),v(o,l),v(n,a),v(n,c),v(c,u),v(u,d),v(u,p),v(u,m),v(m,g),v(m,h),v(m,_),v(m,y),v(m,k),v(m,T),v(m,R),v(m,j),v(m,q),v(m,M),v(m,z),v(m,P),v(m,L),v(n,C),S||(I=[xe(_,"click",N),xe(R,"click",E),xe(z,"click",B)],S=!0)},p(U,H){t=U,H[0]&2048&&s!==(s=t[6].email+"")&&be(l,s),H[0]&6144&&f!==(f=t[6].canEdit?t[12]("share_project.can_edit"):t[12]("share_project.can_view"))&&w(d,"text",f),H[0]&4096&&b!==(b=t[12]("share_project.can_view"))&&w(_,"item",b),H[0]&4096&&O!==(O=t[12]("share_project.can_edit"))&&w(R,"item",O),H[0]&4096&&D!==(D=t[12]("generic.remove"))&&w(z,"item",D)},d(U){U&&K(n),S=!1,An(I)}}}function B5(t){let n,e,i;function r(s){t[32](s)}let o={popupName:kp.DELETE,confirmTxt:t[12]("share_project.are_you_sure_remove_user"),confirmLbl:t[12]("generic.remove"),cancelLbl:t[12]("generic.cancel"),title:t[12]("share_project.remove_user"),payload:{linkId:t[5],email:t[9]},isLoading:t[7],emailBody:t[15](t[13],xm)};return t[8]!==void 0&&(o.isPopupOpen=t[8]),n=new qy({props:o}),_t.push(()=>Ct(n,"isPopupOpen",r)),{c(){De(n.$$.fragment)},m(s,l){Me(n,s,l),i=!0},p(s,l){const a={};l[0]&4096&&(a.confirmTxt=s[12]("share_project.are_you_sure_remove_user")),l[0]&4096&&(a.confirmLbl=s[12]("generic.remove")),l[0]&4096&&(a.cancelLbl=s[12]("generic.cancel")),l[0]&4096&&(a.title=s[12]("share_project.remove_user")),l[0]&544&&(a.payload={linkId:s[5],email:s[9]}),l[0]&128&&(a.isLoading=s[7]),l[0]&8192&&(a.emailBody=s[15](s[13],xm)),!e&&l[0]&256&&(e=!0,a.isPopupOpen=s[8],Tt(()=>e=!1)),n.$set(a)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){se(n.$$.fragment,s),i=!1},d(s){qe(n,s)}}}function pV(t){var ze,tt,je,nt;let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,I,N,E,B=La(t[0],t[6]),U,H,Z=t[10]&&t[10].length>0&&!Si(t[0]),V,ne,W,re,G,F,X,le,ue=t[4].owner+"",ee,$,he=t[12]("generic.you")+"",me,te,oe,ce,ge=t[12]("share_project.owner")+"",fe,ae,ie,_e,Ie=t[12]("share_list.please_make_sure_collaborators_blong_france_brazil_germany")+"",we,pe,Se,Le=t[12]("generic.here")+"",Re,Ee,ke,Ce,Ne,Pe;function Ve($e){t[23]($e)}let ot={type:"text",autoComplete:"off",id:"list-input-add-user-email",className:"pw width-100",placeholder:t[12]("share_bill_of_materials.enter_email_address")};t[0]!==void 0&&(ot.value=t[0]),L=new Yi({props:ot}),_t.push(()=>Ct(L,"value",Ve)),L.$on("onKeyDown",t[24]),L.$on("qdsInput",t[25]),N=new Gt({props:{dataTestId:"add-email-button",id:"list-button-add-user-email",buttonSize:"large",disabled:!((ze=t[1])!=null&&ze.length)&&!Si(t[0])||((tt=t[0])==null?void 0:tt.length)&&!Si(t[0])||La(t[0],t[6])||t[2],buttonType:"submit",importance:"standard",buttonText:t[12]("share_project.share")}}),N.$on("btnClick",t[26]);let gt=B&&N5(t),He=t[2]&&L5(t),Be=Z&&j5(t),Ye=((je=t[1])==null?void 0:je.length)>0&&R5(t),Ue=((nt=t[11])==null?void 0:nt.length)!=0&&q5(t),rt=t[8]&&B5(t);return{c(){n=A("se-loading"),e=Y(),i=A("div"),r=A("qds-label"),s=Y(),l=A("div"),a=A("div"),c=A("div"),u=A("div"),d=A("se-dropdown"),f=A("qds-button"),m=Y(),g=A("se-list"),h=A("se-divider"),_=Y(),b=A("se-list-item"),k=Y(),T=A("se-divider"),R=Y(),O=A("se-list-item"),q=Y(),M=A("se-divider"),z=Y(),D=A("div"),P=A("div"),De(L.$$.fragment),S=Y(),I=A("div"),De(N.$$.fragment),E=Y(),gt&>.c(),U=Y(),He&&He.c(),H=Y(),Be&&Be.c(),V=Y(),Ye&&Ye.c(),ne=Y(),W=A("div"),re=A("div"),G=A("div"),F=A("span"),F.innerHTML='user_standard',X=Y(),le=A("span"),ee=de(ue),$=de(" ("),me=de(he),te=de(")"),oe=Y(),ce=A("span"),fe=de(ge),ae=Y(),Ue&&Ue.c(),ie=Y(),_e=A("div"),we=de(Ie),pe=Y(),Se=A("span"),Re=de(Le),Ee=de(" ."),ke=Y(),rt&&rt.c(),w(n,"loading",t[7]),w(n,"overlay","true"),w(r,"inline",""),w(r,"id","label-collabotaor-list-text"),w(r,"text",o=t[12]("share_project.add_team_members")),w(f,"action","dropdown"),w(f,"class","custom-search-button svelte-1obj3ee"),w(f,"data-testid","permission-button-share-list"),w(f,"slot","trigger"),w(f,"id","button-share-list-permission"),w(f,"type","button"),w(f,"importance","subdued"),w(f,"text",p=t[3]?t[12]("share_project.can_edit"):t[12]("share_project.can_view")),w(b,"item",y=t[12]("share_project.can_view")),w(b,"id","item-share-list-can-view-permission"),w(O,"id","item-share-list-can-edit-permission"),w(O,"item",j=t[12]("share_project.can_edit")),w(g,"option","dropdown"),w(g,"id","list-share-list-permission"),w(d,"alignment","right"),w(d,"id","dropdown-share-list-permission-email"),w(d,"class","drop-down three-dots-icon svelte-1obj3ee"),x(u,"class","add-team-member-permission-dropdown svelte-1obj3ee"),x(P,"class","divtext svelte-1obj3ee"),x(D,"class","add-email-block"),x(c,"class","add-team-member-section svelte-1obj3ee"),x(I,"class","share-button-email svelte-1obj3ee"),x(a,"class","move-right svelte-1obj3ee"),x(l,"class","custom-search flexbox svelte-1obj3ee"),x(F,"class","user-logo svelte-1obj3ee"),x(le,"class","email-center svelte-1obj3ee"),x(le,"id","span-list-owner-name"),x(ce,"class","user-email svelte-1obj3ee"),x(ce,"id","span-list-owner-text"),x(ce,"data-testid","uc-span-list-owner-name"),x(re,"class","mt-14 display-flex list-owner svelte-1obj3ee"),x(re,"data-testid","list-owner-label"),x(W,"class","dialog-content-width svelte-1obj3ee"),x(Se,"class","share-country-list-button svelte-1obj3ee"),x(_e,"class","share-with-info svelte-1obj3ee"),x(i,"class","form-share-bom add-users-form svelte-1obj3ee")},m($e,mt){J($e,n,mt),J($e,e,mt),J($e,i,mt),v(i,r),v(i,s),v(i,l),v(l,a),v(a,c),v(c,u),v(u,d),v(d,f),v(d,m),v(d,g),v(g,h),v(g,_),v(g,b),v(g,k),v(g,T),v(g,R),v(g,O),v(g,q),v(g,M),v(c,z),v(c,D),v(D,P),Me(L,P,null),v(a,S),v(a,I),Me(N,I,null),v(i,E),gt&>.m(i,null),v(i,U),He&&He.m(i,null),v(i,H),Be&&Be.m(i,null),v(i,V),Ye&&Ye.m(i,null),v(i,ne),v(i,W),v(W,re),v(re,G),v(G,F),v(G,X),v(G,le),v(le,ee),v(le,$),v(le,me),v(le,te),v(re,oe),v(re,ce),v(ce,fe),v(W,ae),Ue&&Ue.m(W,null),v(i,ie),v(i,_e),v(_e,we),v(_e,pe),v(_e,Se),v(Se,Re),v(_e,Ee),v(i,ke),rt&&rt.m(i,null),Ce=!0,Ne||(Pe=[xe(b,"click",t[21]),xe(O,"click",t[22]),xe(Se,"click",t[31])],Ne=!0)},p($e,mt){var Bt,Ke,pt,bt;(!Ce||mt[0]&128)&&w(n,"loading",$e[7]),(!Ce||mt[0]&4096&&o!==(o=$e[12]("share_project.add_team_members")))&&w(r,"text",o),(!Ce||mt[0]&4104&&p!==(p=$e[3]?$e[12]("share_project.can_edit"):$e[12]("share_project.can_view")))&&w(f,"text",p),(!Ce||mt[0]&4096&&y!==(y=$e[12]("share_project.can_view")))&&w(b,"item",y),(!Ce||mt[0]&4096&&j!==(j=$e[12]("share_project.can_edit")))&&w(O,"item",j);const lt={};mt[0]&4096&&(lt.placeholder=$e[12]("share_bill_of_materials.enter_email_address")),!C&&mt[0]&1&&(C=!0,lt.value=$e[0],Tt(()=>C=!1)),L.$set(lt);const vt={};mt[0]&71&&(vt.disabled=!((Bt=$e[1])!=null&&Bt.length)&&!Si($e[0])||((Ke=$e[0])==null?void 0:Ke.length)&&!Si($e[0])||La($e[0],$e[6])||$e[2]),mt[0]&4096&&(vt.buttonText=$e[12]("share_project.share")),N.$set(vt),mt[0]&65&&(B=La($e[0],$e[6])),B?gt?gt.p($e,mt):(gt=N5($e),gt.c(),gt.m(i,U)):gt&&(gt.d(1),gt=null),$e[2]?He?He.p($e,mt):(He=L5($e),He.c(),He.m(i,H)):He&&(He.d(1),He=null),mt[0]&1025&&(Z=$e[10]&&$e[10].length>0&&!Si($e[0])),Z?Be?Be.p($e,mt):(Be=j5($e),Be.c(),Be.m(i,V)):Be&&(Be.d(1),Be=null),((pt=$e[1])==null?void 0:pt.length)>0?Ye?Ye.p($e,mt):(Ye=R5($e),Ye.c(),Ye.m(i,ne)):Ye&&(Ye.d(1),Ye=null),(!Ce||mt[0]&16)&&ue!==(ue=$e[4].owner+"")&&be(ee,ue),(!Ce||mt[0]&4096)&&he!==(he=$e[12]("generic.you")+"")&&be(me,he),(!Ce||mt[0]&4096)&&ge!==(ge=$e[12]("share_project.owner")+"")&&be(fe,ge),((bt=$e[11])==null?void 0:bt.length)!=0?Ue?Ue.p($e,mt):(Ue=q5($e),Ue.c(),Ue.m(W,null)):Ue&&(Ue.d(1),Ue=null),(!Ce||mt[0]&4096)&&Ie!==(Ie=$e[12]("share_list.please_make_sure_collaborators_blong_france_brazil_germany")+"")&&be(we,Ie),(!Ce||mt[0]&4096)&&Le!==(Le=$e[12]("generic.here")+"")&&be(Re,Le),$e[8]?rt?(rt.p($e,mt),mt[0]&256&&Q(rt,1)):(rt=B5($e),rt.c(),Q(rt,1),rt.m(i,null)):rt&&(Je(),se(rt,1,1,()=>{rt=null}),Qe())},i($e){Ce||(Q(L.$$.fragment,$e),Q(N.$$.fragment,$e),Q(rt),Ce=!0)},o($e){se(L.$$.fragment,$e),se(N.$$.fragment,$e),se(rt),Ce=!1},d($e){$e&&(K(n),K(e),K(i)),qe(L),qe(N),gt&>.d(),He&&He.d(),Be&&Be.d(),Ye&&Ye.d(),Ue&&Ue.d(),rt&&rt.d(),Ne=!1,An(Pe)}}}function hV(){const t=document.getElementById("list-input-add-user-email");if(t&&(t!=null&&t.shadowRoot)){const n=document.createElement("style");n.textContent=` .qds-input { height:40px !important; padding-right: 110px !important; }`,t.shadowRoot.appendChild(n)}}function mV(t,n,e){let i,r,o,s,l,a,c,u;ye(t,Lr,ue=>e(11,r=ue)),ye(t,Vt,ue=>e(12,o=ue)),ye(t,Ho,ue=>e(39,s=ue)),ye(t,an,ue=>e(13,l=ue)),ye(t,ti,ue=>e(40,a=ue)),ye(t,wr,ue=>e(41,c=ue)),ye(t,Ki,ue=>e(42,u=ue));let{currentEmail:d=Te}=n,{allEmails:f=[]}=n,{isEmailDuplicate:p=!1}=n,{canEdit:m=!1}=n,{projDetails:g={id:"",name:""}}=n,{previewLinkShare:h}=n,{user:_}=n,b=!1,y=!1,k,T,R=[],O,j=[],q={email:"",description:""},M=Te;Un(()=>{Wg("button-share-list-permission"),hV(),z()});function z(){r==null||r.forEach((ue,ee)=>Wg(`button-update-collaborator-permission-${ee}`))}function D(ue){e(2,p=!1),e(1,f=f.filter(ee=>(ee==null?void 0:ee.toLowerCase())!==(ue==null?void 0:ue.toLowerCase())))}function P(ue,ee,$){const he={notifications:[{[iu]:JSON.stringify(j)}]};return ee===y_?(he.notifications[0][ca]=y_,he.notifications[0][la]=JSON.stringify({[Gm]:tn(ue==null?void 0:ue.name),[Xd]:q!=null&&q.description?q.description:Te,[nu]:ue==null?void 0:ue.owner,[Ey]:$,[Ty]:tn(ue==null?void 0:ue.description),[Bm]:ue==null?void 0:ue.company,[Zd]:O,[Jd]:R,[Vd]:[{[Yd]:String(T),[Kd]:`${tn(ue==null?void 0:ue.name)}-(BOM)-${oc(new Date,Zf)}.xlsx`}]})):ee===Fm?(he.notifications[0][ca]=Fm,he.notifications[0][la]=JSON.stringify({[Gm]:tn(ue==null?void 0:ue.name),[nu]:ue==null?void 0:ue.owner,[Ey]:$})):ee===xm&&(he.notifications[0][ca]=xm,he.notifications[0][la]=JSON.stringify({[Gm]:tn(ue==null?void 0:ue.name)})),he}async function L(){e(10,i=Te),e(7,b=!0),d&&(d==null?void 0:d.length)>0&&Si(d)&&Si(M)&&(f!=null&&f.includes(d)||f.push(d.trim().toLowerCase()),M=Te,e(0,d=Te));const ue={linkId:h,emails:f,canEdit:m,canView:!m},ee=o("share_list.list_shared_successfully");j=[];const $=r;P2(ue,ee,a).catch(he=>{e(7,b=!1),ve.error(he.message)}).then(async()=>{if(u===zo&&await ro(s==null?void 0:s.projectId),e(7,b=!1),$==null||$.forEach(function(he){e(1,f=f==null?void 0:f.filter(function(me){var te,oe,ce;if(((te=me==null?void 0:me.toLowerCase())==null?void 0:te.trim())!==((ce=(oe=he==null?void 0:he.email)==null?void 0:oe.toLowerCase())==null?void 0:ce.trim()))return!0;if((he==null?void 0:he.canEdit)!==m){e(1,f=[me]),Qd(f,j);const ge=P(l,Fm,String(m?s==null?void 0:s.canEditLink:s==null?void 0:s.canViewLink)),fe=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:ge,module:fo.ADD_USER}});document.dispatchEvent(fe),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,ae=>{ve.info("email response",ae.detail.emailResp)})}return j=[],q.description="",e(1,f=[]),!1}))}),f.length){O=$d(),await If(l==null?void 0:l.bom,a,l).then(te=>T=te),R=ep(l),Qd(f,j);const he=P(l,y_,String(m?s==null?void 0:s.canEditLink:s==null?void 0:s.canViewLink)),me=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:he,module:fo.ADD_USER}});document.dispatchEvent(me),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,te=>{ve.info("email response",te.detail.emailResp)}),j=[],e(1,f=[]),q.description=""}}).finally(()=>{e(7,b=!1),e(1,f=[]),q.description="",ve.info("Users status: ",ue)}),gs(Ai.SHARE_LIST.action,Ai.SHARE_LIST.subaction,String(c.platform),zt()?l==null?void 0:l.id:void 0,zt()||l==null?void 0:l.id),Bn(Nn.CTA_CLICK,{cta_location:$i.UCList,cta_name:"Share List"})}function C(ue,ee){e(7,b=!0),e(9,k=ee.toLowerCase());let $={linkId:h,email:ee==null?void 0:ee.toLowerCase()};ue===Il.CAN_VIEW?($.canEdit=!1,$.canView=!0):ue===Il.CAN_EDIT?($.canEdit=!0,$.canView=!1):$.isDelete=!0;const he=o("share_project.permission_updated_seccessfully");jg($,he,a).catch(me=>{e(7,b=!1),ve.error(me.message)}).then(()=>{e(7,b=!1),e(1,f=[k]),Qd(f,j);const me=P(l,Fm,String(m?s==null?void 0:s.canEditLink:s==null?void 0:s.canViewLink)),te=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:me,module:fo.ADD_USER}});document.dispatchEvent(te),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,oe=>{ve.info("email response",oe.detail.emailResp)}),j=[],e(1,f=[])}).finally(()=>{e(7,b=!1),ve.info("Users status: ",$)})}function S(ue){e(8,y=!0),e(9,k=ue==null?void 0:ue.toLowerCase()),j=[],e(1,f=[k]),Qd(f,j),e(1,f=[])}function I(){var ee;M=d;const ue=[...(r??[]).map($=>($==null?void 0:$.email)||Te),...f];ue!=null&&ue.includes((ee=M==null?void 0:M.trim())==null?void 0:ee.toLowerCase())?e(2,p=!0):e(2,p=!1),(d==null?void 0:d.length)>0&&(/@.{2,}/.test(M)||!Si(M))?e(10,i=o("generic.invalid_email")):e(10,i=Te)}function N(ue){var ee;dy(ue)&&Si(d.trim())&&((ee=ue==null?void 0:ue.detail)==null||ee.preventDefault(),e(10,i=Te),E())}function E(){var ee,$;e(2,p=!1);const ue=[...(r??[]).map(he=>(he==null?void 0:he.email)||Te),...f];ue!=null&&ue.length&&(ue==null?void 0:ue.indexOf(d==null?void 0:d.toLowerCase()))!==-1?e(2,p=!0):(d==null?void 0:d.toLowerCase())!==(($=((ee=_==null?void 0:_.profile)==null?void 0:ee.email)||Te)==null?void 0:$.toLowerCase())&&(e(1,f=[...f,d==null?void 0:d.toLowerCase()]),e(0,d=Te),e(10,i=Te))}const B=()=>{e(3,m=!1)},U=()=>{e(3,m=!0)};function H(ue){d=ue,e(0,d)}const Z=ue=>{N(ue)},V=()=>I(),ne=()=>{L()},W=ue=>{D(ue)},re=ue=>C(Il.CAN_VIEW,String(ue.email)),G=ue=>C(Il.CAN_EDIT,String(ue.email)),F=ue=>S(String(ue.email)),X=()=>ED();function le(ue){y=ue,e(8,y)}return t.$$set=ue=>{"currentEmail"in ue&&e(0,d=ue.currentEmail),"allEmails"in ue&&e(1,f=ue.allEmails),"isEmailDuplicate"in ue&&e(2,p=ue.isEmailDuplicate),"canEdit"in ue&&e(3,m=ue.canEdit),"projDetails"in ue&&e(4,g=ue.projDetails),"previewLinkShare"in ue&&e(5,h=ue.previewLinkShare),"user"in ue&&e(6,_=ue.user)},e(10,i=Te),[d,f,p,m,g,h,_,b,y,k,i,r,o,l,D,P,L,C,S,I,N,B,U,H,Z,V,ne,W,re,G,F,X,le]}class gV extends Ot{constructor(n){super(),At(this,n,mV,pV,It,{currentEmail:0,allEmails:1,isEmailDuplicate:2,canEdit:3,projDetails:4,previewLinkShare:5,user:6},dV,[-1,-1])}}const uie="";function _V(t){Ut(t,"svelte-csr0qj","@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.copy-link-lbl.svelte-csr0qj.svelte-csr0qj{padding:12px;background-color:var(--se-ultra-light-grey-3, #f3f2f2);display:flex}@media(max-width: 768px){.copy-link-lbl.svelte-csr0qj.svelte-csr0qj{flex-direction:column}}.share-global-icon.svelte-csr0qj.svelte-csr0qj{position:relative;top:4px}.copy-link-block.svelte-csr0qj.svelte-csr0qj{display:flex;background-color:var(--se-ultra-light-grey-3, #f3f2f2)}.copy-link-input.svelte-csr0qj.svelte-csr0qj{max-width:615px;flex:1;color:var(--se-light-grey, #cbcbcb);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid #ccc;padding:8px;background-color:#f9f9f9;font-family:Arial, sans-serif;box-sizing:border-box}@media(max-width: 768px){.copy-link-input.svelte-csr0qj.svelte-csr0qj{max-width:calc(100vw - 100px)}}.custom-search-button.svelte-csr0qj.svelte-csr0qj{border:0;outline:none;margin:0;z-index:2;color:var(--se-medium-blue, #219bfd);top:0px}.share-list-link-class.svelte-csr0qj.svelte-csr0qj{height:2.8em;border:none;font-weight:400;color:var(--text-dark-gray);font-size:0.875rem;line-height:1.429;padding:8px}.share-link-block.svelte-csr0qj h4.svelte-csr0qj{font-weight:400}")}function bV(t){let n,e,i=t[2]("project_listing.share_list_link")+"",r,o,s,l,a,c,u,d,f=t[2]("share_project.anyone_with_link")+"",p,m,g,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,I,N,E,B,U;return N=new Gt({props:{buttonSize:"large",dataTestId:"copy-link-button",id:"button-copy-list-link",importance:"emphasized",buttonText:t[2]("share_project.copy_link")}}),N.$on("btnClick",t[4]),{c(){n=A("div"),e=A("h4"),r=de(i),o=Y(),s=A("div"),l=A("div"),a=A("div"),c=A("span"),c.innerHTML='earth_pacific',u=Y(),d=A("span"),p=de(f),m=Y(),g=A("span"),h=A("se-dropdown"),_=A("qds-button"),y=Y(),k=A("se-list"),T=A("se-list-item"),O=Y(),j=A("se-divider"),q=Y(),M=A("se-list-item"),D=Y(),P=A("se-divider"),L=Y(),C=A("div"),S=A("p"),I=Y(),De(N.$$.fragment),x(e,"class","svelte-csr0qj"),x(c,"class","share-global-icon svelte-csr0qj"),x(d,"class","copy-label-text"),x(d,"id","span-copy-label-text"),w(_,"action","dropdown"),w(_,"class","custom-search-button svelte-csr0qj"),w(_,"id","button-permission-button-share-list"),w(_,"data-testid","permission-button-share-list"),w(_,"slot","trigger"),w(_,"importance","subdued"),w(_,"text",b=t[1]?t[2]("share_project.can_edit"):t[2]("share_project.can_view")),w(T,"item",R=t[2]("share_project.can_view")),w(T,"id","item-can-view-list-permission"),w(T,"data-testid","item-can-view-list-permission"),w(M,"id","item-can-edit-list-permission"),w(M,"item",z=t[2]("share_project.can_edit")),w(k,"option","dropdown"),w(k,"id","list-permission-share-list-link"),w(h,"alignment",""),w(h,"id","dropdown-share-list-link"),w(h,"class","share-list-link-class svelte-csr0qj"),x(g,"class","pw"),x(l,"class","copy-link-lbl pw svelte-csr0qj"),x(S,"class","copy-link-input svelte-csr0qj"),x(S,"data-testid","copy-link-input"),x(S,"id","input-copy-list-link"),x(C,"class","copy-link-block svelte-csr0qj"),x(n,"class","share-link-block svelte-csr0qj")},m(H,Z){J(H,n,Z),v(n,e),v(e,r),v(n,o),v(n,s),v(s,l),v(l,a),v(a,c),v(a,u),v(a,d),v(d,p),v(l,m),v(l,g),v(g,h),v(h,_),v(h,y),v(h,k),v(k,T),v(k,O),v(k,j),v(k,q),v(k,M),v(k,D),v(k,P),v(s,L),v(s,C),v(C,S),t[9](S),v(C,I),Me(N,C,null),E=!0,B||(U=[xe(T,"click",t[7]),xe(M,"click",t[8]),xe(S,"focus",t[3])],B=!0)},p(H,[Z]){(!E||Z&4)&&i!==(i=H[2]("project_listing.share_list_link")+"")&&be(r,i),(!E||Z&4)&&f!==(f=H[2]("share_project.anyone_with_link")+"")&&be(p,f),(!E||Z&6&&b!==(b=H[1]?H[2]("share_project.can_edit"):H[2]("share_project.can_view")))&&w(_,"text",b),(!E||Z&4&&R!==(R=H[2]("share_project.can_view")))&&w(T,"item",R),(!E||Z&4&&z!==(z=H[2]("share_project.can_edit")))&&w(M,"item",z);const V={};Z&4&&(V.buttonText=H[2]("share_project.copy_link")),N.$set(V)},i(H){E||(Q(N.$$.fragment,H),E=!0)},o(H){se(N.$$.fragment,H),E=!1},d(H){H&&K(n),t[9](null),qe(N),B=!1,An(U)}}}function vV(t,n,e){let i,r;ye(t,Ho,m=>e(10,i=m)),ye(t,Vt,m=>e(2,r=m));let{previewLink:o}=n,s,l=!1;Un(()=>{u(Kp),Wg("button-permission-button-share-list")});function a(){const m=document.createRange();m.selectNodeContents(s);const g=window.getSelection();g.removeAllRanges(),g.addRange(m)}async function c(){var g;const m=s==null?void 0:s.textContent;a(),await((g=navigator==null?void 0:navigator.clipboard)==null?void 0:g.writeText(m))}function u(m){const g=i[m]?String(i[m]):Te;s&&e(0,s.textContent=g,s),e(6,o=i!=null&&i.id?String(i.id):Te),e(1,l=m===Xp)}const d=()=>{u(Kp)},f=()=>{u(Xp)};function p(m){_t[m?"unshift":"push"](()=>{s=m,e(0,s)})}return t.$$set=m=>{"previewLink"in m&&e(6,o=m.previewLink)},[s,l,r,a,c,u,o,d,f,p]}class wV extends Ot{constructor(n){super(),At(this,n,vV,bV,It,{previewLink:6},_V)}}const fie="";function yV(t){Ut(t,"svelte-tzva2u",".pw.align-right.svelte-tzva2u.svelte-tzva2u{margin-left:auto}.pw.pointer.svelte-tzva2u.svelte-tzva2u{cursor:pointer}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.cross-icon.svelte-tzva2u.svelte-tzva2u{position:relative;right:8px}.loading.svelte-tzva2u.svelte-tzva2u{padding:0px 20px}.share-list-dialog-container.svelte-tzva2u.svelte-tzva2u{max-width:730px}@media(max-width: 768px){.share-list-dialog-container.svelte-tzva2u.svelte-tzva2u{max-width:calc(100vw - 60px)}}#dialog-header-share-list.svelte-tzva2u h3.svelte-tzva2u{font-weight:400;flex:1}#dialog-header-share-list.svelte-tzva2u .cross-icon.svelte-tzva2u{margin-left:10px;width:45px}")}function kV(t){let n,e,i,r,o,s,l;function a(f){t[11](f)}let c={};t[7]!==void 0&&(c.previewLink=t[7]),e=new wV({props:c}),_t.push(()=>Ct(e,"previewLink",a));function u(f){t[12](f)}let d={user:t[2],projDetails:t[1],currentEmail:t[3],allEmails:t[4],isEmailDuplicate:t[5],canEdit:t[6]};return t[7]!==void 0&&(d.previewLinkShare=t[7]),o=new gV({props:d}),_t.push(()=>Ct(o,"previewLinkShare",u)),o.$on("closePopupEvent",t[13]),{c(){n=A("div"),De(e.$$.fragment),r=Y(),De(o.$$.fragment),x(n,"class","share-list-dialog-container svelte-tzva2u")},m(f,p){J(f,n,p),Me(e,n,null),v(n,r),Me(o,n,null),l=!0},p(f,p){const m={};!i&&p&128&&(i=!0,m.previewLink=f[7],Tt(()=>i=!1)),e.$set(m);const g={};p&4&&(g.user=f[2]),p&2&&(g.projDetails=f[1]),p&8&&(g.currentEmail=f[3]),p&16&&(g.allEmails=f[4]),p&32&&(g.isEmailDuplicate=f[5]),p&64&&(g.canEdit=f[6]),!s&&p&128&&(s=!0,g.previewLinkShare=f[7],Tt(()=>s=!1)),o.$set(g)},i(f){l||(Q(e.$$.fragment,f),Q(o.$$.fragment,f),l=!0)},o(f){se(e.$$.fragment,f),se(o.$$.fragment,f),l=!1},d(f){f&&K(n),qe(e),qe(o)}}}function SV(t){let n;return{c(){n=A("se-loading"),w(n,"class","share-popup-loader"),w(n,"loading",t[0]),w(n,"overlay","true")},m(e,i){J(e,n,i)},p(e,i){i&1&&w(n,"loading",e[0])},i:et,o:et,d(e){e&&K(n)}}}function TV(t){let n,e,i=t[8]("project_listing.share_list")+"",r,o,s,l,a,c,u,d,f,p;const m=[SV,kV],g=[];function h(_,b){return _[0]?0:1}return c=h(t),u=g[c]=m[c](t),{c(){n=A("se-dialog-header"),e=A("h3"),r=de(i),o=Y(),s=A("se-icon"),s.textContent="action_close",l=Y(),a=A("se-dialog-content"),u.c(),x(e,"class","svelte-tzva2u"),w(s,"class","cross-icon pw align-right pointer svelte-tzva2u"),w(s,"color","standard"),w(s,"size","micro"),w(s,"id","ic-close-button-share-list"),w(s,"data-testid","close-button-share-list"),w(n,"color","alternative"),w(n,"id","dialog-header-share-list"),w(n,"class","svelte-tzva2u"),w(a,"id","dialog-content-share-list"),w(a,"class","svelte-tzva2u"),sr(a,"loading",t[0])},m(_,b){J(_,n,b),v(n,e),v(e,r),v(n,o),v(n,s),J(_,l,b),J(_,a,b),g[c].m(a,null),d=!0,f||(p=xe(s,"click",t[10]),f=!0)},p(_,[b]){(!d||b&256)&&i!==(i=_[8]("project_listing.share_list")+"")&&be(r,i);let y=c;c=h(_),c===y?g[c].p(_,b):(Je(),se(g[y],1,1,()=>{g[y]=null}),Qe(),u=g[c],u?u.p(_,b):(u=g[c]=m[c](_),u.c()),Q(u,1),u.m(a,null)),(!d||b&1)&&sr(a,"loading",_[0])},i(_){d||(Q(u),d=!0)},o(_){se(u),d=!1},d(_){_&&(K(n),K(l),K(a)),g[c].d(),f=!1,p()}}}function CV(t,n,e){let i;ye(t,Vt,b=>e(8,i=b));const r=Mn();let o=Te,s=[],l=!1,a=!1,{isLoading:c}=n,{projDetails:u}=n,d,{user:f}=n;function p(b){e(3,o=Te),e(4,s=[]),e(5,l=!1),e(6,a=!1),Lr.update(()=>[]);const y={};Ho.update(()=>y),r("closePopupEvent",{action:b}),Oi(Kr)}const m=()=>{p("close")};function g(b){d=b,e(7,d)}function h(b){d=b,e(7,d)}const _=()=>{p("close")};return t.$$set=b=>{"isLoading"in b&&e(0,c=b.isLoading),"projDetails"in b&&e(1,u=b.projDetails),"user"in b&&e(2,f=b.user)},[c,u,f,o,s,l,a,d,i,p,m,g,h,_]}class U5 extends Ot{constructor(n){super(),At(this,n,CV,TV,It,{isLoading:0,projDetails:1,user:2},yV)}}const die="";function EV(t){Ut(t,"svelte-1g6excn",".pw.pointer.svelte-1g6excn{cursor:pointer}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.edit-heading.svelte-1g6excn{font-size:30px;color:var(--se-true-black, #000000);padding:0px 20px;font-weight:400}.dialog-footer-button.svelte-1g6excn{margin-top:12px;margin-left:-4px;display:flex;justify-content:end;gap:1rem}.popup-content.svelte-1g6excn{padding:0px 20px;margin-bottom:20px;margin-top:-16px;margin-top:1rem}.clone-error-message.svelte-1g6excn{font-size:12px;margin:4px 0px;color:var(--se-black, #0f0f0f)}.list-desc.svelte-1g6excn{width:100%;height:100%;outline:none;border-radius:4px;margin-top:5px}.list-desc-label.svelte-1g6excn{padding-top:17px}.edit-list-name.svelte-1g6excn{display:block}.edit-list-dialog-header-section.svelte-1g6excn{display:flex;justify-content:space-between;align-items:center}")}function IV(t){let n=t[6]("edit_list.edit_list_details")+"",e;return{c(){e=de(n)},m(i,r){J(i,e,r)},p(i,r){r&64&&n!==(n=i[6]("edit_list.edit_list_details")+"")&&be(e,n)},d(i){i&&K(e)}}}function AV(t){let n=t[6]("project_listing.clone_list")+"",e;return{c(){e=de(n)},m(i,r){J(i,e,r)},p(i,r){r&64&&n!==(n=i[6]("project_listing.clone_list")+"")&&be(e,n)},d(i){i&&K(e)}}}function z5(t){let n,e=t[6]("edit_list.list_title_reach_maximum")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","clone-error-message svelte-1g6excn")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o&64&&e!==(e=r[6]("edit_list.list_title_reach_maximum")+"")&&be(i,e)},d(r){r&&K(n)}}}function OV(t){var N,E;let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_,b,y,k,T,R,O,j,q,M,z;function D(B,U){return B[4]?AV:IV}let P=D(t),L=P(t),C=t[5]&&z5(t);function S(B){t[12](B)}let I={type:"text",autoComplete:"off",id:"input-edit-list-name",className:"full-width",maxLength:Vp};return t[0].name!==void 0&&(I.value=t[0].name),f=new Yi({props:I}),_t.push(()=>Ct(f,"value",S)),f.$on("qdsInput",t[9]),R=new Gt({props:{buttonText:t[6]("generic.cancel"),buttonType:"button"}}),R.$on("btnClick",t[14]),j=new Gt({props:{importance:"emphasized",buttonType:"submit",disabled:((E=(N=t[0])==null?void 0:N.name)==null?void 0:E.length)===0||JSON.stringify(Ma(t[3]))===JSON.stringify(t[1]),buttonText:t[6]("generic.save")}}),{c(){n=A("se-block"),e=A("div"),i=A("p"),L.c(),r=Y(),o=A("qds-button"),s=Y(),l=A("form"),C&&C.c(),a=Y(),c=A("qds-label"),d=Y(),De(f.$$.fragment),m=Y(),g=A("qds-label"),_=Y(),b=A("qds-textarea"),k=Y(),T=A("div"),De(R.$$.fragment),O=Y(),De(j.$$.fragment),x(i,"class","edit-heading svelte-1g6excn"),x(i,"id","popup-header"),w(o,"importance","subdued"),w(o,"icon-name","cross-circle"),w(o,"class","cross-icon pw pointer svelte-1g6excn"),w(o,"id","close-popup"),x(e,"class","edit-list-dialog-header-section svelte-1g6excn"),w(c,"class","edit-list-name svelte-1g6excn"),w(c,"required",""),w(c,"text",u=t[6]("generic.list_name")),w(g,"class","list-desc-label svelte-1g6excn"),w(g,"text",h=`${t[6]("generic.description")}:`),w(b,"readonly",t[4]),w(b,"class","list-desc svelte-1g6excn"),w(b,"id","new-list-textarea-description"),w(b,"name","description"),w(b,"rows","5"),w(b,"maxlength",Nu),w(b,"value",y=t[0].description),x(T,"class","dialog-footer-button svelte-1g6excn"),x(l,"class","popup-content svelte-1g6excn")},m(B,U){J(B,n,U),v(n,e),v(e,i),L.m(i,null),v(e,r),v(e,o),v(n,s),v(n,l),C&&C.m(l,null),v(l,a),v(l,c),v(l,d),Me(f,l,null),v(l,m),v(l,g),v(l,_),v(l,b),v(l,k),v(l,T),Me(R,T,null),v(T,O),Me(j,T,null),q=!0,M||(z=[xe(o,"click",t[11]),xe(b,"qdsInput",t[13]),xe(l,"submit",Ts(t[8]))],M=!0)},p(B,[U]){var ne,W;P===(P=D(B))&&L?L.p(B,U):(L.d(1),L=P(B),L&&(L.c(),L.m(i,null))),B[5]?C?C.p(B,U):(C=z5(B),C.c(),C.m(l,a)):C&&(C.d(1),C=null),(!q||U&64&&u!==(u=B[6]("generic.list_name")))&&w(c,"text",u);const H={};!p&&U&1&&(p=!0,H.value=B[0].name,Tt(()=>p=!1)),f.$set(H),(!q||U&64&&h!==(h=`${B[6]("generic.description")}:`))&&w(g,"text",h),(!q||U&16)&&w(b,"readonly",B[4]),(!q||U&1&&y!==(y=B[0].description))&&w(b,"value",y);const Z={};U&64&&(Z.buttonText=B[6]("generic.cancel")),R.$set(Z);const V={};U&11&&(V.disabled=((W=(ne=B[0])==null?void 0:ne.name)==null?void 0:W.length)===0||JSON.stringify(Ma(B[3]))===JSON.stringify(B[1])),U&64&&(V.buttonText=B[6]("generic.save")),j.$set(V)},i(B){q||(Q(f.$$.fragment,B),Q(R.$$.fragment,B),Q(j.$$.fragment,B),q=!0)},o(B){se(f.$$.fragment,B),se(R.$$.fragment,B),se(j.$$.fragment,B),q=!1},d(B){B&&K(n),L.d(),C&&C.d(),qe(f),qe(R),qe(j),M=!1,An(z)}}}function PV(t,n,e){let i,r,o,s,l,a;ye(t,Vt,O=>e(6,r=O)),ye(t,ti,O=>e(15,o=O)),ye(t,wa,O=>e(4,s=O)),ye(t,an,O=>e(16,l=O)),ye(t,wr,O=>e(17,a=O));const c=Mn();let{copyOfListDetails:u=Hi}=n,{errors:d=Hi}=n,{dialogId:f}=n,{projectData:p}=n,{listDetails:m={name:Te,description:Te}}=n;function g(O){wa.update(()=>!1),e(5,i=!1),c(Qi.CLOSE_LIST_UPDATE_POPUP_EVENT,Hi),Oi(Kr)}function h(){var O,j,q;if(gs(Ai.EDIT_LIST.action,Ai.EDIT_LIST.subaction,String(a.platform),String(l==null?void 0:l.id)),Bn(Nn.CTA_CLICK,{cta_location:$i.UCList,cta_name:"Edit list"}),((O=p==null?void 0:p.name)==null?void 0:O.length)===0)e(10,d.name=r("edit_project.enter_project_name_message"),d);else if(((j=p==null?void 0:p.name)==null?void 0:j.length)>Vp)e(10,d.name=r("edit_project.please_enter_only_30_characters"),d);else if(((q=p==null?void 0:p.description)==null?void 0:q.length)>Nu)e(10,d.description=r("edit_project.please_enter_only_350_characters"),d);else if(s)_();else{Jt.update(()=>!0);const M={name:String(p==null?void 0:p.name),description:p!=null&&p.description?String(p.description):Te,status:String(p==null?void 0:p.status),company:p!=null&&p.company?String(p.company):r("bom_manager.not_available_txt"),owner:p!=null&&p.owner?String(p.owner):r("bom_manager.not_available_txt"),isArchived:!!(p!=null&&p.isArchived),country:We==null?void 0:We.country,language:We==null?void 0:We.language},z=r("project_listing.list_updated_successfully");Vi(M,String(p.id),z,o,!0,!0).catch(()=>{xo.set("error"),Go.set(r("generic.error_message"))}).then(()=>{c(Qi.CLOSE_LIST_UPDATE_POPUP_EVENT,{action:"submit"})}).finally(()=>{ve.info("List updated for with ID: ",M)}),e(10,d=Hi)}}function _(){c(Gb,{action:m})}function b(){var O;((O=m==null?void 0:m.name)==null?void 0:O.length)===0&&e(5,i=!1)}const y=()=>{g()};function k(O){t.$$.not_equal(m.name,O)&&(m.name=O,e(0,m))}const T=O=>{var j;return e(0,m.description=(j=O==null?void 0:O.target)==null?void 0:j.value,m)},R=()=>{g()};return t.$$set=O=>{"copyOfListDetails"in O&&e(1,u=O.copyOfListDetails),"errors"in O&&e(10,d=O.errors),"dialogId"in O&&e(2,f=O.dialogId),"projectData"in O&&e(3,p=O.projectData),"listDetails"in O&&e(0,m=O.listDetails)},t.$$.update=()=>{t.$$.dirty&16&&e(5,i=s)},[m,u,f,p,s,i,r,g,h,b,d,y,k,T,R]}class F5 extends Ot{constructor(n){super(),At(this,n,PV,OV,It,{copyOfListDetails:1,errors:10,dialogId:2,projectData:3,listDetails:0},EV)}}const pie="";function NV(t){Ut(t,"svelte-1w6d2y7",".pw.disabled.svelte-1w6d2y7{pointer-events:none;opacity:0.5}.pw.align-right.svelte-1w6d2y7{margin-left:auto}.display-flex.svelte-1w6d2y7{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.pointer.svelte-1w6d2y7{cursor:pointer}.pw-snackbar-elem.svelte-1w6d2y7{top:30px}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.block-section.svelte-1w6d2y7{min-height:330px}@media(max-width: 768px){.block-section.svelte-1w6d2y7{min-height:340px}}@media(max-width: 768px){.block-section.create-list.svelte-1w6d2y7{min-height:270px}}.font-bold.svelte-1w6d2y7{font-weight:bold}.flex-font-5.svelte-1w6d2y7{display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:16px}.mt-10.svelte-1w6d2y7{margin-top:10px}.center-icon.svelte-1w6d2y7{align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);opacity:0.7}.border-dash.svelte-1w6d2y7{border:1px dashed var(--se-sky-blue, #42b4e6) !important}.margin-1p.svelte-1w6d2y7{margin:1px}.background-blue.svelte-1w6d2y7{background-color:var(--se-sky-blue-10p, #ecf7fc);border-radius:8px}.project-name.svelte-1w6d2y7{display:flex;align-items:center;font-weight:bolder;font-size:22px;height:60px;white-space:normal;overflow-wrap:break-word;line-height:30px}.project-attributes.svelte-1w6d2y7{color:var(--se-anthracite-grey, #333333);font-size:14px;line-height:20px}.project-description.svelte-1w6d2y7{color:var(--se-anthracite-grey, #333333);font-size:14px;line-height:20px;height:120px;white-space:pre-wrap;overflow-y:auto;text-overflow:ellipsis;word-break:break-word}.project-price.svelte-1w6d2y7{font-weight:bolder;font-size:14px;line-height:20px;height:48px;padding-left:17px;align-items:center}.flex-font-5.svelte-1w6d2y7{display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:16px}.flex-center.svelte-1w6d2y7{display:flex;align-items:center;justify-content:center;height:300px}.project-card-head.svelte-1w6d2y7,.project-card-content.svelte-1w6d2y7{background-color:var(--se-ultra-light-grey-4, #fafafa)}.project-card-item.svelte-1w6d2y7{position:relative;background:var(--se-ultra-light-grey-4, #fafafa);border-top:3px solid transparent;border-radius:4px}.project-card-item.svelte-1w6d2y7:hover{border-top:3px solid var(--se-life-green, #3dcd58);border-radius:0}.three-dots-icon.svelte-1w6d2y7{position:absolute;right:22px;bottom:26px}.share-icon.svelte-1w6d2y7:hover{background-color:var(--se-light-grey, #cbcbcb);border-radius:2px}.height-40.svelte-1w6d2y7{max-height:40px}.infinite-loader-wait.svelte-1w6d2y7{margin-left:16px;margin-bottom:8px}.list-container.svelte-1w6d2y7{display:grid;grid-template-columns:repeat(auto-fill, minmax(360px, 1fr));overflow:hidden}@media(max-width: 768px){.list-container.svelte-1w6d2y7{grid-template-columns:repeat(auto-fill, minmax(300px, 1fr))}}.first-project-section.svelte-1w6d2y7{min-height:371px;width:380px}@media(max-width: 768px){.first-project-section.svelte-1w6d2y7{min-height:350px}}.electric-plus.svelte-1w6d2y7{height:100%;display:flex;justify-content:center}@media(max-width: 360px){.block-section.svelte-1w6d2y7{width:300px}}")}function x5(t,n,e){const i=t.slice();return i[73]=n[e],i[75]=e,i}function LV(t){let n,e,i,r,o;const s=[MV,RV],l=[];function a(u,d){return u[6].length===0?0:1}n=a(t),e=l[n]=s[n](t);let c=t[15]&&t7(t);return{c(){e.c(),i=Y(),c&&c.c(),r=wt()},m(u,d){l[n].m(u,d),J(u,i,d),c&&c.m(u,d),J(u,r,d),o=!0},p(u,d){let f=n;n=a(u),n===f?l[n].p(u,d):(Je(),se(l[f],1,1,()=>{l[f]=null}),Qe(),e=l[n],e?e.p(u,d):(e=l[n]=s[n](u),e.c()),Q(e,1),e.m(i.parentNode,i)),u[15]?c?(c.p(u,d),d[0]&32768&&Q(c,1)):(c=t7(u),c.c(),Q(c,1),c.m(r.parentNode,r)):c&&(Je(),se(c,1,1,()=>{c=null}),Qe())},i(u){o||(Q(e),Q(c),o=!0)},o(u){se(e),se(c),o=!1},d(u){u&&(K(i),K(r)),l[n].d(u),c&&c.d(u)}}}function jV(t){let n=t[16]("generic.please_wait")+"",e;return{c(){e=de(n)},m(i,r){J(i,e,r)},p(i,r){r[0]&65536&&n!==(n=i[16]("generic.please_wait")+"")&&be(e,n)},i:et,o:et,d(i){i&&K(e)}}}function RV(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g,h,_=t[3]==="false"&&t[4]==="false"&&G5(t),b=Dt(t[6]),y=[];for(let O=0;OCt(u,"isLoading",k)),u.$on("closePopupEvent",t[53]),p=new fV({props:{dialogType:t[1],dialogId:t[0],wrapper:t[7],archiveStatus:t[8],projectId:t[9],projectName:t[10],open:t[20]}}),p.$on("updateListEvent",t[33]),p.$on("closeUpdatePopupEvent",t[34]);let R=t[14]&&$5(t);return{c(){n=A("se-container"),_&&_.c(),e=Y();for(let O=0;Od=!1)),u.$set(M);const z={};j[0]&2&&(z.dialogType=O[1]),j[0]&1&&(z.dialogId=O[0]),j[0]&128&&(z.wrapper=O[7]),j[0]&256&&(z.archiveStatus=O[8]),j[0]&512&&(z.projectId=O[9]),j[0]&1024&&(z.projectName=O[10]),j[0]&1048576&&(z.open=O[20]),p.$set(z),O[14]?R?R.p(O,j):(R=$5(O),R.c(),R.m(g.parentNode,g)):R&&(R.d(1),R=null)},i(O){h||(Q(s.$$.fragment,O),Q(u.$$.fragment,O),Q(p.$$.fragment,O),h=!0)},o(O){se(s.$$.fragment,O),se(u.$$.fragment,O),se(p.$$.fragment,O),h=!1},d(O){O&&(K(n),K(m),K(g)),_&&_.d(),Ln(y,O),qe(s),t[51](null),qe(u),t[54](null),qe(p),R&&R.d(O)}}}function MV(t){let n;function e(o,s){return o[3]==="false"&&o[4]==="false"?zV:o[4]==="true"?UV:BV}let i=e(t),r=i(t);return{c(){r.c(),n=wt()},m(o,s){r.m(o,s),J(o,n,s)},p(o,s){i===(i=e(o))&&r?r.p(o,s):(r.d(1),r=i(o),r&&(r.c(),r.m(n.parentNode,n)))},i:et,o:et,d(o){o&&K(n),r.d(o)}}}function G5(t){let n,e=(t[19][Cr]===Ae.SHOW||t[19][Cr]===Ae.DISABLED)&&H5(t);return{c(){e&&e.c(),n=wt()},m(i,r){e&&e.m(i,r),J(i,n,r)},p(i,r){i[19][Cr]===Ae.SHOW||i[19][Cr]===Ae.DISABLED?e?e.p(i,r):(e=H5(i),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(i){i&&K(n),e&&e.d(i)}}}function H5(t){let n,e,i,r,o;return{c(){n=A("se-block"),e=A("se-block-header"),e.innerHTML='
electricity_polarity_positive_plus
',w(e,"class","background-blue border-dash margin-1p electric-plus svelte-1w6d2y7"),w(n,"outline","false"),w(n,"color","standard"),w(n,"option","card"),w(n,"class",i="block-section create-list pw pointer "+(t[19][Cr]===Ae.DISABLED?"disabled":"")+" svelte-1w6d2y7")},m(s,l){J(s,n,l),v(n,e),r||(o=xe(n,"click",t[41]),r=!0)},p(s,l){l[0]&524288&&i!==(i="block-section create-list pw pointer "+(s[19][Cr]===Ae.DISABLED?"disabled":"")+" svelte-1w6d2y7")&&w(n,"class",i)},d(s){s&&K(n),r=!1,o()}}}function W5(t){let n,e,i,r,o;function s(){return t[42](t[73])}return{c(){n=A("se-icon"),e=de("action_share"),w(n,"id","ic-proj-list-share-"+t[75]),w(n,"color","secondary"),w(n,"class",i="primary pw align-right pw pointer share-icon "+(t[19][eo]===Ae.DISABLED?"pw disabled":"")+" svelte-1w6d2y7"),w(n,"size","small")},m(l,a){J(l,n,a),v(n,e),r||(o=xe(n,"click",vc(s)),r=!0)},p(l,a){t=l,a[0]&524288&&i!==(i="primary pw align-right pw pointer share-icon "+(t[19][eo]===Ae.DISABLED?"pw disabled":"")+" svelte-1w6d2y7")&&w(n,"class",i)},d(l){l&&K(n),r=!1,o()}}}function V5(t){var r,o,s,l,a,c,u,d,f;let n,e=((r=t[73])!=null&&r.price&&Number((o=t[73])==null?void 0:o.price)>0?fr((l=(s=t[73])==null?void 0:s.ownerInfo)!=null&&l.language&&((a=t[73])!=null&&a.user)?String(t[73].ownerInfo.language):We.language,(u=(c=t[73])==null?void 0:c.ownerInfo)!=null&&u.country&&((d=t[73])!=null&&d.user)?String(t[73].ownerInfo.country):We.country,String((f=t[73])==null?void 0:f.price)):Te)+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","project-price display-flex svelte-1w6d2y7"),x(n,"id","price-"+t[75])},m(p,m){J(p,n,m),v(n,i)},p(p,m){var g,h,_,b,y,k,T,R,O;m[0]&64&&e!==(e=((g=p[73])!=null&&g.price&&Number((h=p[73])==null?void 0:h.price)>0?fr((b=(_=p[73])==null?void 0:_.ownerInfo)!=null&&b.language&&((y=p[73])!=null&&y.user)?String(p[73].ownerInfo.language):We.language,(T=(k=p[73])==null?void 0:k.ownerInfo)!=null&&T.country&&((R=p[73])!=null&&R.user)?String(p[73].ownerInfo.country):We.country,String((O=p[73])==null?void 0:O.price)):Te)+"")&&be(i,e)},d(p){p&&K(n)}}}function qV(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m=!t[73].isArchived&&t[19][Fh]===Ae.SHOW&&Y5(t),g=t[73].isArchived&&Z5(t),h=t[19][Uh]===Ae.SHOW&&X5(t),_=!t[73].isArchived&&t[19][ms]===Ae.SHOW&&K5(t),b=t[73].owner&&t[73].owner!==Te&&J5(t);return{c(){n=A("se-dropdown"),e=A("se-icon"),e.textContent="other_vertical",i=Y(),r=A("se-list"),o=A("se-divider"),s=Y(),m&&m.c(),l=Y(),g&&g.c(),a=Y(),h&&h.c(),c=Y(),u=A("se-divider"),d=Y(),_&&_.c(),f=Y(),b&&b.c(),w(e,"slot","trigger"),w(e,"id","ic-three-dot-"+t[75]),w(e,"option","button"),w(r,"option","dropdown"),w(n,"alignment","left"),w(n,"class",p="three-dots-icon "+(t[19][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-1w6d2y7")},m(y,k){J(y,n,k),v(n,e),v(n,i),v(n,r),v(r,o),v(r,s),m&&m.m(r,null),v(r,l),g&&g.m(r,null),v(r,a),h&&h.m(r,null),v(r,c),v(r,u),v(r,d),_&&_.m(r,null),v(r,f),b&&b.m(r,null)},p(y,k){!y[73].isArchived&&y[19][Fh]===Ae.SHOW?m?m.p(y,k):(m=Y5(y),m.c(),m.m(r,l)):m&&(m.d(1),m=null),y[73].isArchived?g?g.p(y,k):(g=Z5(y),g.c(),g.m(r,a)):g&&(g.d(1),g=null),y[19][Uh]===Ae.SHOW?h?h.p(y,k):(h=X5(y),h.c(),h.m(r,c)):h&&(h.d(1),h=null),!y[73].isArchived&&y[19][ms]===Ae.SHOW?_?_.p(y,k):(_=K5(y),_.c(),_.m(r,f)):_&&(_.d(1),_=null),y[73].owner&&y[73].owner!==Te?b?b.p(y,k):(b=J5(y),b.c(),b.m(r,null)):b&&(b.d(1),b=null),k[0]&524288&&p!==(p="three-dots-icon "+(y[19][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-1w6d2y7")&&w(n,"class",p)},d(y){y&&K(n),m&&m.d(),g&&g.d(),h&&h.d(),_&&_.d(),b&&b.d()}}}function DV(t){let n,e,i,r,o,s,l,a,c,u,d,f,p;function m(){return t[44](t[73])}return{c(){n=A("se-dropdown"),e=A("se-icon"),e.textContent="other_vertical",i=Y(),r=A("se-list"),o=A("se-divider"),s=Y(),l=A("se-list-item"),c=Y(),u=A("se-divider"),w(e,"slot","trigger"),w(e,"id","ic-three-dot-"+t[75]),w(e,"option","button"),w(l,"id","lst-edit-proj-share-"+t[75]),w(l,"item",a=t[16]("project_listing.edit_list")),w(r,"option","dropdown"),w(n,"alignment","left"),w(n,"class",d="three-dots-icon "+(t[19][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-1w6d2y7")},m(g,h){J(g,n,h),v(n,e),v(n,i),v(n,r),v(r,o),v(r,s),v(r,l),v(r,c),v(r,u),f||(p=xe(l,"click",m),f=!0)},p(g,h){t=g,h[0]&65536&&a!==(a=t[16]("project_listing.edit_list"))&&w(l,"item",a),h[0]&524288&&d!==(d="three-dots-icon "+(t[19][xl]===Ae.DISABLED?"pw disabled":"")+" svelte-1w6d2y7")&&w(n,"class",d)},d(g){g&&K(n),f=!1,p()}}}function Y5(t){let n,e,i,r,o,s;function l(){return t[45](t[73])}return{c(){n=A("se-list-item"),i=Y(),r=A("se-divider"),w(n,"id","lst-archive-"+t[75]),w(n,"item",e=t[16]("project_listing.archive_list"))},m(a,c){J(a,n,c),J(a,i,c),J(a,r,c),o||(s=xe(n,"click",l),o=!0)},p(a,c){t=a,c[0]&65536&&e!==(e=t[16]("project_listing.archive_list"))&&w(n,"item",e)},d(a){a&&(K(n),K(i),K(r)),o=!1,s()}}}function Z5(t){let n,e,i,r,o,s;function l(){return t[46](t[73])}return{c(){n=A("se-list-item"),i=Y(),r=A("se-divider"),w(n,"id","lst-unarchive-"+t[75]),w(n,"item",e=t[16]("project_listing.unarchive_list"))},m(a,c){J(a,n,c),J(a,i,c),J(a,r,c),o||(s=xe(n,"click",l),o=!0)},p(a,c){t=a,c[0]&65536&&e!==(e=t[16]("project_listing.unarchive_list"))&&w(n,"item",e)},d(a){a&&(K(n),K(i),K(r)),o=!1,s()}}}function X5(t){let n,e,i,r;function o(){return t[47](t[73])}return{c(){n=A("se-list-item"),w(n,"id","lst-clone-"+t[75]),w(n,"item",e=t[16]("project_listing.clone_list"))},m(s,l){J(s,n,l),i||(r=xe(n,"click",o),i=!0)},p(s,l){t=s,l[0]&65536&&e!==(e=t[16]("project_listing.clone_list"))&&w(n,"item",e)},d(s){s&&K(n),i=!1,r()}}}function K5(t){let n,e,i,r,o,s;function l(){return t[48](t[73])}return{c(){n=A("se-list-item"),i=Y(),r=A("se-divider"),w(n,"id","lst-edit-proj-list-"+t[75]),w(n,"item",e=t[16]("project_listing.edit_list"))},m(a,c){J(a,n,c),J(a,i,c),J(a,r,c),o||(s=xe(n,"click",l),o=!0)},p(a,c){t=a,c[0]&65536&&e!==(e=t[16]("project_listing.edit_list"))&&w(n,"item",e)},d(a){a&&(K(n),K(i),K(r)),o=!1,s()}}}function J5(t){let n,e,i,r;function o(){return t[49](t[73])}return{c(){n=A("se-list-item"),w(n,"id","lst-delete-proj-list-"+t[75]),w(n,"item",e=t[16]("project_listing.delete_list"))},m(s,l){J(s,n,l),i||(r=xe(n,"click",o),i=!0)},p(s,l){t=s,l[0]&65536&&e!==(e=t[16]("project_listing.delete_list"))&&w(n,"item",e)},d(s){s&&K(n),i=!1,r()}}}function Q5(t){let n,e,i,r,o,s=tn(String(t[73].name))+"",l,a,c,u,d,f,p,m=t[16]("edit_project.last_modified")+"",g,h,_,b=(t[73].modifiedDate?qi(Number(t[73].modifiedDate)):qi(Number(t[73].createdDate)))+"",y,k,T,R,O=(t[73].description?tn(String(t[73].description)):Te)+"",j,q,M,z,D,P=t[16]("generic.date")+"",L,C,S=(t[73].createdDate?qi(Number(t[73].createdDate)):Te)+"",I,N,E,B=t[16]("edit_project.end_users_company")+"",U,H,Z=(t[73].company?t[73].company:t[16]("generic.not_set"))+"",V,ne,W,re=t[16]("unified_checkout.list_owner")+"",G,F,X=(t[73].owner?t[73].owner:t[16]("generic.not_set"))+"",le,ue,ee,$,he,me=!t[73].isArchived&&t[4]==="false"&&W5(t),te=(t[19][bi]===Ae.SHOW||t[19][bi]===Ae.DISABLED)&&V5(t);function oe(){return t[43](t[73])}function ce(ae,ie){var _e,Ie;if(((Ie=(_e=ae[73])==null?void 0:_e.user)==null?void 0:Ie.canEdit)===!0&&ae[4]==="true"&&ae[19][ms]===Ae.SHOW)return DV;if(ae[4]==="false")return qV}let ge=ce(t),fe=ge&&ge(t);return{c(){n=A("se-block"),e=A("div"),i=A("se-block-header"),r=A("p"),o=A("span"),l=de(s),c=Y(),me&&me.c(),u=Y(),d=A("se-block-content"),f=A("p"),p=A("strong"),g=de(m),h=de("?"),_=de(":??"),y=de(b),k=Y(),T=A("div"),R=A("p"),j=de(O),q=Y(),M=A("div"),z=A("p"),D=A("strong"),L=de(P),C=de("?:??"),I=de(S),N=Y(),E=A("p"),U=de(B),H=de("?:??"),V=de(Z),ne=Y(),W=A("p"),G=de(re),F=de("?:??"),le=de(X),ue=Y(),te&&te.c(),ee=Y(),fe&&fe.c(),x(r,"title",a=tn(String(t[73].name))),x(r,"class","project-name pw pointer svelte-1w6d2y7"),x(r,"id","project-name-"+t[75]),w(i,"id","projectHeader-"+t[75]),w(i,"class","project-card-head svelte-1w6d2y7"),x(f,"class","project-attributes flex-font-5 svelte-1w6d2y7"),x(f,"id","last-modified-"+t[75]),x(R,"class","project-description svelte-1w6d2y7"),x(R,"id","description-"+t[75]),x(T,"class","mt-10 svelte-1w6d2y7"),x(z,"class","project-attributes svelte-1w6d2y7"),x(z,"id","created-date-"+t[75]),x(E,"class","project-attributes height-40 svelte-1w6d2y7"),x(E,"id","company-"+t[75]),x(W,"class","project-attributes svelte-1w6d2y7"),x(W,"id","owner-"+t[75]),x(M,"class","mt-10 svelte-1w6d2y7"),w(d,"class","project-card-content svelte-1w6d2y7"),x(e,"class","project-card-item cursor-pointer svelte-1w6d2y7"),x(e,"id","block-inner-project-tile-"+t[75]),w(n,"option","card"),w(n,"outline","true"),w(n,"class","block-section svelte-1w6d2y7"),w(n,"id","block-project-tile-"+t[75])},m(ae,ie){J(ae,n,ie),v(n,e),v(e,i),v(i,r),v(r,o),v(o,l),v(i,c),me&&me.m(i,null),v(e,u),v(e,d),v(d,f),v(f,p),v(p,g),v(p,h),v(f,_),v(f,y),v(d,k),v(d,T),v(T,R),v(R,j),v(d,q),v(d,M),v(M,z),v(z,D),v(D,L),v(z,C),v(z,I),v(M,N),v(M,E),v(E,U),v(E,H),v(E,V),v(M,ne),v(M,W),v(W,G),v(W,F),v(W,le),v(e,ue),te&&te.m(e,null),v(n,ee),fe&&fe.m(n,null),$||(he=xe(e,"click",oe),$=!0)},p(ae,ie){t=ae,ie[0]&64&&s!==(s=tn(String(t[73].name))+"")&&be(l,s),ie[0]&64&&a!==(a=tn(String(t[73].name)))&&x(r,"title",a),!t[73].isArchived&&t[4]==="false"?me?me.p(t,ie):(me=W5(t),me.c(),me.m(i,null)):me&&(me.d(1),me=null),ie[0]&65536&&m!==(m=t[16]("edit_project.last_modified")+"")&&be(g,m),ie[0]&64&&b!==(b=(t[73].modifiedDate?qi(Number(t[73].modifiedDate)):qi(Number(t[73].createdDate)))+"")&&be(y,b),ie[0]&64&&O!==(O=(t[73].description?tn(String(t[73].description)):Te)+"")&&be(j,O),ie[0]&65536&&P!==(P=t[16]("generic.date")+"")&&be(L,P),ie[0]&64&&S!==(S=(t[73].createdDate?qi(Number(t[73].createdDate)):Te)+"")&&be(I,S),ie[0]&65536&&B!==(B=t[16]("edit_project.end_users_company")+"")&&be(U,B),ie[0]&65600&&Z!==(Z=(t[73].company?t[73].company:t[16]("generic.not_set"))+"")&&be(V,Z),ie[0]&65536&&re!==(re=t[16]("unified_checkout.list_owner")+"")&&be(G,re),ie[0]&65600&&X!==(X=(t[73].owner?t[73].owner:t[16]("generic.not_set"))+"")&&be(le,X),t[19][bi]===Ae.SHOW||t[19][bi]===Ae.DISABLED?te?te.p(t,ie):(te=V5(t),te.c(),te.m(e,null)):te&&(te.d(1),te=null),ge===(ge=ce(t))&&fe?fe.p(t,ie):(fe&&fe.d(1),fe=ge&&ge(t),fe&&(fe.c(),fe.m(n,null)))},d(ae){ae&&K(n),me&&me.d(),te&&te.d(),fe&&fe.d(),$=!1,he()}}}function $5(t){let n,e=t[16]("generic.please_wait")+"",i;return{c(){n=A("se-container"),i=de(e),w(n,"class","infinite-loader-wait svelte-1w6d2y7")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&65536&&e!==(e=r[16]("generic.please_wait")+"")&&be(i,e)},d(r){r&&K(n)}}}function BV(t){let n,e,i,r=t[16]("project_listing.you_have_not_archived_any_list")+"",o;return{c(){n=A("se-container"),e=A("center"),i=A("p"),o=de(r),w(n,"class","flex-center svelte-1w6d2y7"),w(n,"direction","column")},m(s,l){J(s,n,l),v(n,e),v(e,i),v(i,o)},p(s,l){l[0]&65536&&r!==(r=s[16]("project_listing.you_have_not_archived_any_list")+"")&&be(o,r)},d(s){s&&K(n)}}}function UV(t){let n,e,i,r=t[16]("share_project.you_do_not_have_any_project_to_shared")+"",o;return{c(){n=A("se-container"),e=A("center"),i=A("p"),o=de(r),w(n,"class","flex-center svelte-1w6d2y7"),w(n,"direction","column")},m(s,l){J(s,n,l),v(n,e),v(e,i),v(i,o)},p(s,l){l[0]&65536&&r!==(r=s[16]("share_project.you_do_not_have_any_project_to_shared")+"")&&be(o,r)},d(s){s&&K(n)}}}function zV(t){let n,e=(t[19][Cr]===Ae.SHOW||t[19][Cr]===Ae.DISABLED)&&e7(t);return{c(){e&&e.c(),n=wt()},m(i,r){e&&e.m(i,r),J(i,n,r)},p(i,r){i[19][Cr]===Ae.SHOW||i[19][Cr]===Ae.DISABLED?e?e.p(i,r):(e=e7(i),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(i){i&&K(n),e&&e.d(i)}}}function e7(t){let n,e,i,r,o,s=t[16]("unified_checkout.start_first_project_message")+"",l,a,c,u;return{c(){n=A("se-container"),e=A("center"),i=A("div"),i.innerHTML='electricity_polarity_positive_plus',r=Y(),o=A("p"),l=de(s),x(i,"class","border-dash first-project-section background-blue pw pointer margin-1p svelte-1w6d2y7"),x(o,"class","font-bold svelte-1w6d2y7"),w(n,"class",a="pw "+(t[19][Cr]===Ae.DISABLED?"disabled":"")+" svelte-1w6d2y7"),w(n,"direction","column")},m(d,f){J(d,n,f),v(n,e),v(e,i),v(e,r),v(e,o),v(o,l),c||(u=xe(i,"click",t[40]),c=!0)},p(d,f){f[0]&65536&&s!==(s=d[16]("unified_checkout.start_first_project_message")+"")&&be(l,s),f[0]&524288&&a!==(a="pw "+(d[19][Cr]===Ae.DISABLED?"disabled":"")+" svelte-1w6d2y7")&&w(n,"class",a)},d(d){d&&K(n),c=!1,u()}}}function t7(t){let n,e;return n=new X_({props:{dialogId:"newListDialog",open:t[15],wrapper:Te,leftButtonText:t[16]("generic.cancel"),rightButtonText:t[16]("generic.create")}}),n.$on("createListEvent",t[55]),n.$on("closePopupEvent",t[56]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&32768&&(o.open=i[15]),r[0]&65536&&(o.leftButtonText=i[16]("generic.cancel")),r[0]&65536&&(o.rightButtonText=i[16]("generic.create")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function n7(t){let n;return{c(){n=A("se-snackbar"),w(n,"open",t[21]),w(n,"message",t[22]),w(n,"type",t[23]),w(n,"class","pw-snackbar-elem svelte-1w6d2y7"),w(n,"icon","notification_ok_wired"),w(n,"duration",Cs),w(n,"id","snackbar-project-listing")},m(e,i){J(e,n,i)},p(e,i){i[0]&2097152&&w(n,"open",e[21]),i[0]&4194304&&w(n,"message",e[22]),i[0]&8388608&&w(n,"type",e[23])},d(e){e&&K(n)}}}function FV(t){let n,e,i,r,o;const s=[jV,LV],l=[];function a(u,d){return u[18]?0:u[6]?1:-1}~(n=a(t))&&(e=l[n]=s[n](t));let c=t[21]&&n7(t);return{c(){e&&e.c(),i=Y(),c&&c.c(),r=wt()},m(u,d){~n&&l[n].m(u,d),J(u,i,d),c&&c.m(u,d),J(u,r,d),o=!0},p(u,d){let f=n;n=a(u),n===f?~n&&l[n].p(u,d):(e&&(Je(),se(l[f],1,1,()=>{l[f]=null}),Qe()),~n?(e=l[n],e?e.p(u,d):(e=l[n]=s[n](u),e.c()),Q(e,1),e.m(i.parentNode,i)):e=null),u[21]?c?c.p(u,d):(c=n7(u),c.c(),c.m(r.parentNode,r)):c&&(c.d(1),c=null)},i(u){o||(Q(e),o=!0)},o(u){se(e),o=!1},d(u){u&&(K(i),K(r)),~n&&l[n].d(u),c&&c.d(u)}}}function xV(t){t.open=!1}function GV(t,n,e){let i,r,o,s,l,a,c,u,d,f,p,m,g;ye(t,P1,Be=>e(58,i=Be)),ye(t,Vt,Be=>e(16,r=Be)),ye(t,wa,Be=>e(59,o=Be)),ye(t,ti,Be=>e(60,s=Be)),ye(t,an,Be=>e(17,l=Be)),ye(t,Lr,Be=>e(61,a=Be)),ye(t,Xi,Be=>e(6,c=Be)),ye(t,Jt,Be=>e(18,u=Be)),ye(t,Ii,Be=>e(19,d=Be)),ye(t,Yr,Be=>e(20,f=Be)),ye(t,ws,Be=>e(21,p=Be)),ye(t,Go,Be=>e(22,m=Be)),ye(t,xo,Be=>e(23,g=Be));let{dialogId:h=Gp}=n,{dialogType:_="unarchive "}=n,{isArchive:b="true"}=n,{isShared:y}=n,{projectListOptions:k=Yf}=n,{user:T}=n,{businessUnit:R}=n,{singleProject:O}=n;const j=Ub;let q,M,z,D,P,L,C,S=!1,I=[];const N=Mn();let E=!1,B=!1;const U={threshold:k.projectLoadThreshold},H=new IntersectionObserver((Be,Ye)=>{var Ue;(Ue=Be[0])!=null&&Ue.isIntersecting&&(c==null?void 0:c.length)%((k==null?void 0:k.projectListSize)+Zp)===(k==null?void 0:k.projectListSize)&&(Ye.unobserve(Be[0].target),e(14,E=!0),io(b,y,k.projectListSize+Zp,i,!1).catch(rt=>{ve.error(rt.message)}).finally(()=>{e(14,E=!1)}))},U);Un(async()=>{await gl(),Rr(!1),y===cr?io(b,y):io(b,y,Fb,i==null?void 0:i.id).catch(Be=>{ve.error(Be.message)})}),Kn(()=>{Rr(!1),Xi.set(Li)});const Z=(Be,Ye)=>{N(Be,Ye);const Ue=new CustomEvent(Be,{detail:Ye});document.dispatchEvent&&document.dispatchEvent(Ue)};function V(Be,Ye,Ue,rt,ze,tt){e(1,_=ze),e(8,M=Ye),e(9,z=Ue),e(10,D=tn(rt)),e(0,h=Gp),tt&&an.update(()=>tt),Yr.set(!0),Oi(Ds)}function ne(Be,Ye,Ue,rt,ze,tt){e(1,_=ze),e(9,z=Ue),e(10,D=tn(rt)),e(0,h=Hp),tt&&an.update(()=>tt),Yr.set(!0),Oi(Ds)}function W(Be,Ye,Ue,rt){Rr(!1),Yr.set(!1),Oi(Kr),Zl(Ue,R).catch(ze=>{e(13,S=!1),ve.error(ze.message)}).then(()=>{e(13,S=!1)}).finally(()=>{e(13,S=!1),ve.info("Copy link api")}),I2(Ye,Ue).catch(ze=>{ve.error(ze.message)}).then(ze=>{if(re(ze,tn(rt),Ye),Ye&&a!=null&&a.length){const tt=a==null?void 0:a.map($e=>$e==null?void 0:$e.email);Qd(tt,I);const je=CD(l,I),nt=new CustomEvent(Hn.EMAIL_NOTIFICATION,{detail:{emailBody:je,module:"projectList"}});document.dispatchEvent(nt),document.addEventListener(Hn.EMAIL_NOTIFICATION_RESP,$e=>{ve.info("email response",$e.detail.emailResp)})}}).finally(()=>{Oi(Kr),Yr.set(!1),ve.info("Project status changed for project: ",rt),Lr.update(()=>[])})}function re(Be,Ye,Ue){if(Be.error)Ja(ks(String(Be==null?void 0:Be.message),s));else{const rt=Ye+gr+r(Ue?"project_listing.archived":"project_listing.unarchived")+gr+r("generic.successfully");ia(rt),setTimeout(()=>{oe(Ue?Vf:Lc)},1e3)}}function G(Be,Ye,Ue){Ye&&((Ue?String(Ue.detail.action):"")===zp?F("false",r("project_listing.list_updated_successfully")):Rr(!1),Be&&(Be.open=!1),Yr.set(!1),Oi(Kr))}function F(Be,Ye){Xi.set(Li),io(Be,y,k.projectListSize).then(()=>{wa.update(()=>!1),ia(Ye)}).catch(Ue=>{ve.error(Ue.message)})}async function X(Be,Ye){try{const Ue=await Yh(Ye);Be&&typeof Be===za&&ia(r("project_listing.list_created_successfully")),Z(vr.GOTO_LIST,{listId:Ue,listType:va})}catch(Ue){ve.error(Ue.message)}}function le(Be,Ye){const Ue=Be.id;Z(vr.GOTO_LIST,{listId:Ue,action:Ye})}function ue(Be,Ye){Rr(!1),e(2,O={...Be}),e(2,O.name=tn(O.name),O),e(2,O.description=O!=null&&O.description?tn(O.description):"",O),e(2,O.owner=O.owner?O.owner:r("bom_manager.not_available_txt"),O),e(2,O.company=O.company?O.company:r("bom_manager.not_available_txt"),O),Ye.open=!0,Oi(Ds)}function ee(Be,Ye){const Ue={};Ho.update(()=>Ue),Lr.update(()=>[]),an.update(()=>Be),Rr(!1),e(13,S=!0),Zl(Be==null?void 0:Be.id,R).catch(rt=>{e(13,S=!1),ve.error(rt.message)}).then(()=>{e(13,S=!1)}).finally(()=>{e(13,S=!1),ve.info("Copy link api")}),Ye.open=!0,Oi(Ds)}function $(Be,Ye,Ue,rt,ze){e(1,_=r("generic.clone")+gr),e(7,q=Be),e(10,D=tn(rt)),e(8,M=Ye),e(9,z=Ue),e(0,h=xp),L=ze,Yr.set(!0),Oi(Ds)}function he(Be,Ye,Ue){Rr(!1),Yr.set(!1),Oi(Kr),O2(Ye,Ue,o).catch(rt=>{ve.error(rt.message)}).then(rt=>{me(rt,Ue,Be)}).finally(()=>{ve.info("List cloned for List: ",Ue)})}function me(Be,Ye,Ue){if(Be.error){Ue&&oe(Lc);const rt=Ye+gr+r("project_listing.cloned_success_message");te(rt)}else Be.message&&(wa.update(()=>!0),ue(L,P))}function te(Be){F(b,Be)}function oe(Be){N("activateTab",{id:String(Be)})}function ce(Be){h===xp?he(M,String(Be.detail.projectId),String(Be.detail.projectName)):h===Hp?ge(String(Be.detail.projectId),String(Be.detail.projectName),!0):W(Be.detail.wrapper,!Be.detail.archiveStatus,String(Be.detail.projectId),String(Be.detail.projectName))}function ge(Be,Ye,Ue){Rr(!1),Yr.set(!1),Oi(Kr),A2(Be,Ye,Ue).catch(rt=>{ve.error(rt.message)}).then(rt=>{if(!rt.error){const ze=Ye+gr+r("project_listing.project_deleted_message");ve.info("Project deleted with ID: ",Be),ia(ze),Xi.set(Li),io(b,y,Fb+Zp,i,!0,!1).catch(tt=>{ve.error(tt.message)})}}).finally(()=>{Yr.set(!1),Oi(Kr)})}function fe(Be){G(Be.detail.wrapperarchiveUnarchive,String(Be.detail.archiveDialogId))}function ae(Be){he(Be.detail.action.isArchived,String(Be.detail.action.id),String(Be.detail.action.name))}const ie=()=>{e(15,B=!0)},_e=()=>{e(15,B=!0)},Ie=Be=>{ee(Be,C)},we=Be=>{le(Be,ur.PROJECT_LISTING)},pe=Be=>{ue(Be,P)},Se=Be=>{V(q,!!Be.isArchived,String(Be.id),String(Be.name),r("project_listing.archive"),Be)},Le=Be=>{V(q,!!Be.isArchived,String(Be.id),String(Be.name),r("project_listing.unarchive"),Be)},Re=Be=>{$(q,!!Be.isArchived,String(Be.id),String(Be.name),Be)},Ee=Be=>{ue(Be,P)},ke=Be=>{ne(q,!0,String(Be.id),String(Be.name),Zb,Be)},Ce=Be=>{G(P,j,Be)};function Ne(Be){_t[Be?"unshift":"push"](()=>{P=Be,e(11,P)})}function Pe(Be){S=Be,e(13,S)}const Ve=()=>{xV(C)};function ot(Be){_t[Be?"unshift":"push"](()=>{C=Be,e(12,C)})}const gt=({detail:Be})=>{X(ur.PROJECT_LISTING,Be),e(15,B=!1)},He=()=>e(15,B=!1);return t.$$set=Be=>{"dialogId"in Be&&e(0,h=Be.dialogId),"dialogType"in Be&&e(1,_=Be.dialogType),"isArchive"in Be&&e(3,b=Be.isArchive),"isShared"in Be&&e(4,y=Be.isShared),"projectListOptions"in Be&&e(36,k=Be.projectListOptions),"user"in Be&&e(5,T=Be.user),"businessUnit"in Be&&e(37,R=Be.businessUnit),"singleProject"in Be&&e(2,O=Be.singleProject)},t.$$.update=()=>{t.$$.dirty[0]&80&&(c==null?void 0:c.length)>0&&y!==cr&&gl().then(()=>{H==null||H.observe(document.getElementById("block-project-tile-"+String(c.length-1)))})},[h,_,O,b,y,T,c,q,M,z,D,P,C,S,E,B,r,l,u,d,f,p,m,g,j,V,ne,G,X,le,ue,ee,$,ce,fe,ae,k,R,W,ge,ie,_e,Ie,we,pe,Se,Le,Re,Ee,ke,Ce,Ne,Pe,Ve,ot,gt,He]}class Q_ extends Ot{constructor(n){super(),At(this,n,GV,FV,It,{dialogId:0,dialogType:1,isArchive:3,isShared:4,projectListOptions:36,user:5,businessUnit:37,singleProject:2,updateProject:38,deleteListFunc:39},NV,[-1,-1,-1])}get updateProject(){return this.$$.ctx[38]}get deleteListFunc(){return this.$$.ctx[39]}}const hie="";function HV(t){Ut(t,"svelte-1whhzat",".pw.disabled.svelte-1whhzat{pointer-events:none;opacity:0.5}.pw.align-right.svelte-1whhzat{margin-left:auto}.pw.align-left.svelte-1whhzat{margin-right:auto}.pw.display-flex.svelte-1whhzat{display:-ms-flexbox;display:-webkit-flex;display:flex}.display-flex.svelte-1whhzat{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw.base-font.svelte-1whhzat{font-size:16px}.pw.small-font.svelte-1whhzat{font-size:14px}.pw.nano-font.svelte-1whhzat{font-size:12px}.pw.pointer.svelte-1whhzat{cursor:pointer}.pw-snackbar-elem.svelte-1whhzat{top:30px}.pw.red-color.svelte-1whhzat{color:var(--se-red, #dc0a0a)}.pw.hidden.svelte-1whhzat{display:none}.pw.width-100.svelte-1whhzat{width:100%}.pw.bold-font.svelte-1whhzat{font-weight:bold}.pw.normal-font.svelte-1whhzat{font-weight:normal;font-size:16px}.pw.error-msg.svelte-1whhzat{color:var(--se-red, #dc0a0a)}.pw.align-center.svelte-1whhzat{text-align:center}.pw.center-align-items.svelte-1whhzat{align-items:center}.pw.justify-content-center.svelte-1whhzat{justify-content:center}.pw.bom-checkbox.svelte-1whhzat{max-width:16px}.pw.ml-8.svelte-1whhzat{margin-left:8px}.pw.ml-12.svelte-1whhzat{margin-left:12px}.pw.ml-36.svelte-1whhzat{margin-left:36px}.pw.mt-8.svelte-1whhzat{margin-top:8px}.pw.mt-6.svelte-1whhzat{margin-top:6px}.pw.mt-32.svelte-1whhzat{margin-top:32px}.pw.mb-8.svelte-1whhzat{margin-bottom:8px}.pw.mb-12.svelte-1whhzat{margin-bottom:12px}.pw.mb-16.svelte-1whhzat{margin-top:16px}.pw.mb-21.svelte-1whhzat{margin-bottom:21px}.pw.mr-12.svelte-1whhzat{margin-right:12px}.pw.p-12.svelte-1whhzat{padding:12px}.pw.pl-16.svelte-1whhzat{padding-left:16px}.pw.pr-16.svelte-1whhzat{padding-right:16px}.position-absolute.svelte-1whhzat{position:absolute}.flex-wrap.svelte-1whhzat{flex-wrap:wrap}.justify-content-sp-btw.svelte-1whhzat{justify-content:space-between}.gp-10.svelte-1whhzat{gap:10px}.gp-5.svelte-1whhzat{gap:5px}.desktop-view.svelte-1whhzat{display:none}.mobile-view.svelte-1whhzat{display:block}.mobile-view-flx.svelte-1whhzat{display:flex;flex-direction:column}.rounded-border.svelte-1whhzat{border:1px solid #d9d9d9;border-radius:12px}.txt-right.svelte-1whhzat{text-align:right}.bg-color-light-grey.svelte-1whhzat{background-color:var(--se-ultra-light-grey-2, #f7f7f7) !important}.bg-color-white.svelte-1whhzat{background-color:var(--se-white, #ffffff) !important}.pd-lt16-rt0-tp-bt-8.svelte-1whhzat{padding:8px 0 16px 8px}@media(min-width: 968px){.mobile-view.svelte-1whhzat,.mobile-view-flx.svelte-1whhzat{display:none}.desktop-view.svelte-1whhzat{display:inherit}}.cart-mobile-snackbar.svelte-1whhzat{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-1whhzat,.mobile-view-snackbar.svelte-1whhzat{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-1whhzat{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-1whhzat{display:block}.mobile-snackbar.svelte-1whhzat{width:calc(100vw - 70px)}}.snackbar-mobile-div.svelte-1whhzat{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.cross-margin.svelte-1whhzat{margin:-6px}.bottom-snackbar.svelte-1whhzat{bottom:30px;top:auto}.header.svelte-1whhzat{padding:0 12px}.se-content-section.svelte-1whhzat{background-color:var(--se-white, #ffffff);border:1px solid;border-top:0px;border-color:var(--se-super-light-grey, #e6e6e6);min-height:300px}.active.svelte-1whhzat{font-weight:bold}.align-survey-btn.svelte-1whhzat{margin-left:auto;margin-top:12px}.header-div.svelte-1whhzat{margin-bottom:24px}")}function WV(t){let n,e=t[4]("project_listing.my_lists")+"",i;return{c(){n=A("h3"),i=de(e),x(n,"class","header svelte-1whhzat"),x(n,"data-testid","list-header")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o&16&&e!==(e=r[4]("project_listing.my_lists")+"")&&be(i,e)},d(r){r&&K(n)}}}function VV(t){let n,e,i,r,o;return r=new Q_({props:{isArchive:"false",isShared:"true",businessUnit:t[2],projectListOptions:JSON.parse(t[3])}}),r.$on("gotoList",t[8]),r.$on("activateTab",t[10]),{c(){n=A("se-block-content"),e=A("se-block"),i=Y(),De(r.$$.fragment),w(n,"outline","true"),w(n,"class","se-content-section svelte-1whhzat")},m(s,l){J(s,n,l),v(n,e),v(n,i),Me(r,n,null),o=!0},p(s,l){const a={};l&4&&(a.businessUnit=s[2]),l&8&&(a.projectListOptions=JSON.parse(s[3])),r.$set(a)},i(s){o||(Q(r.$$.fragment,s),o=!0)},o(s){se(r.$$.fragment,s),o=!1},d(s){s&&K(n),qe(r)}}}function YV(t){let n,e,i,r,o;return r=new Q_({props:{isArchive:"true",isShared:"false",businessUnit:t[2],projectListOptions:JSON.parse(t[3])}}),r.$on("gotoList",t[8]),r.$on("activateTab",t[10]),{c(){n=A("se-block-content"),e=A("se-block"),i=Y(),De(r.$$.fragment),w(n,"outline","true"),w(n,"class","se-content-section svelte-1whhzat")},m(s,l){J(s,n,l),v(n,e),v(n,i),Me(r,n,null),o=!0},p(s,l){const a={};l&4&&(a.businessUnit=s[2]),l&8&&(a.projectListOptions=JSON.parse(s[3])),r.$set(a)},i(s){o||(Q(r.$$.fragment,s),o=!0)},o(s){se(r.$$.fragment,s),o=!1},d(s){s&&K(n),qe(r)}}}function ZV(t){let n,e,i,r,o;return r=new Q_({props:{isArchive:"false",isShared:"false",businessUnit:t[2],user:t[1],projectListOptions:JSON.parse(t[3])}}),r.$on("gotoList",t[8]),r.$on("editProject",t[9]),r.$on("activateTab",t[10]),{c(){n=A("se-block-content"),e=A("se-block"),i=Y(),De(r.$$.fragment),w(n,"outline","true"),w(n,"class","se-content-section svelte-1whhzat")},m(s,l){J(s,n,l),v(n,e),v(n,i),Me(r,n,null),o=!0},p(s,l){const a={};l&4&&(a.businessUnit=s[2]),l&2&&(a.user=s[1]),l&8&&(a.projectListOptions=JSON.parse(s[3])),r.$set(a)},i(s){o||(Q(r.$$.fragment,s),o=!0)},o(s){se(r.$$.fragment,s),o=!1},d(s){s&&K(n),qe(r)}}}function XV(t){let n,e=!zt(),i,r,o,s,l,a,c,u,d=t[4]("project_listing.all_lists")+"",f,p,m,g,h,_=t[4]("project_listing.archived_lists")+"",b,y,k,T,R,O=t[4]("project_listing.shared_projects")+"",j,q,M,z,D,P,L,C,S=e&&WV(t);const I=[ZV,YV,VV],N=[];function E(B,U){return B[0]===Lc?0:B[0]===Vf?1:B[0]===Fp?2:-1}return~(z=E(t))&&(D=N[z]=I[z](t)),{c(){n=A("div"),S&&S.c(),i=Y(),r=A("se-container"),o=A("se-block"),s=A("se-block-header"),l=A("se-tabbar"),a=A("nav"),c=A("span"),u=A("span"),f=de(d),m=Y(),g=A("span"),h=A("span"),b=de(_),k=Y(),T=A("span"),R=A("span"),j=de(O),M=Y(),D&&D.c(),x(n,"class","display-flex justify-content-between header-div svelte-1whhzat"),x(c,"id","link-active-tab"),x(c,"data-testid","link-active-tab"),x(c,"class",p=(t[0]==Lc?"active":Te)+" "+(t[5]?"pw disabled":Te)+" svelte-1whhzat"),x(g,"id","lnk-archive-tab"),x(g,"data-testid","link-archive-tab"),x(g,"class",y=(t[0]===Vf?"active":Te)+" "+(t[6][Dh]===Ae.DISABLED||t[5]?"pw disabled":Te)+" svelte-1whhzat"),x(T,"id","link-shared-tab"),x(T,"data-testid","link-shared-tab"),x(T,"class",q=(t[0]===Fp?"active":Te)+" "+(t[6][Bh]===Ae.DISABLED||t[5]?"pw disabled":Te)+" svelte-1whhzat"),w(l,"option","content"),w(l,"color","alternative"),w(s,"option","fill"),w(s,"outline","false"),w(s,"class","se-home-header"),w(o,"color","standard"),w(o,"divider","false"),w(r,"option","fill")},m(B,U){J(B,n,U),S&&S.m(n,null),J(B,i,U),J(B,r,U),v(r,o),v(o,s),v(s,l),v(l,a),v(a,c),v(c,u),v(u,f),v(a,m),v(a,g),v(g,h),v(h,b),v(a,k),v(a,T),v(T,R),v(R,j),v(o,M),~z&&N[z].m(o,null),P=!0,L||(C=[xe(c,"click",t[11]),xe(g,"click",t[12]),xe(T,"click",t[13])],L=!0)},p(B,[U]){e&&S.p(B,U),(!P||U&16)&&d!==(d=B[4]("project_listing.all_lists")+"")&&be(f,d),(!P||U&33&&p!==(p=(B[0]==Lc?"active":Te)+" "+(B[5]?"pw disabled":Te)+" svelte-1whhzat"))&&x(c,"class",p),(!P||U&16)&&_!==(_=B[4]("project_listing.archived_lists")+"")&&be(b,_),(!P||U&97&&y!==(y=(B[0]===Vf?"active":Te)+" "+(B[6][Dh]===Ae.DISABLED||B[5]?"pw disabled":Te)+" svelte-1whhzat"))&&x(g,"class",y),(!P||U&16)&&O!==(O=B[4]("project_listing.shared_projects")+"")&&be(j,O),(!P||U&97&&q!==(q=(B[0]===Fp?"active":Te)+" "+(B[6][Bh]===Ae.DISABLED||B[5]?"pw disabled":Te)+" svelte-1whhzat"))&&x(T,"class",q);let H=z;z=E(B),z===H?~z&&N[z].p(B,U):(D&&(Je(),se(N[H],1,1,()=>{N[H]=null}),Qe()),~z?(D=N[z],D?D.p(B,U):(D=N[z]=I[z](B),D.c()),Q(D,1),D.m(o,null)):D=null)},i(B){P||(Q(D),P=!0)},o(B){se(D),P=!1},d(B){B&&(K(n),K(i),K(r)),S&&S.d(),~z&&N[z].d(),L=!1,An(C)}}}function KV(t,n,e){let i,r,o;ye(t,Vt,b=>e(4,i=b)),ye(t,Jt,b=>e(5,r=b)),ye(t,Ii,b=>e(6,o=b));let{activeTab:s=Lc}=n,{user:l}=n,{businessunit:a}=n,{projectListOptions:c}=n;new URLSearchParams(window.location.search);const u=Mn();function d(b){e(0,s=b)}async function f(b){u(vr.GOTO_LIST,b.detail)}function p(b){u(vr.EDIT_PROJECT,b.detail)}function m(b){d(String(b.detail.id))}const g=()=>(d(Lc),!1),h=()=>(d(Vf),!1),_=()=>(d(Fp),!1);return t.$$set=b=>{"activeTab"in b&&e(0,s=b.activeTab),"user"in b&&e(1,l=b.user),"businessunit"in b&&e(2,a=b.businessunit),"projectListOptions"in b&&e(3,c=b.projectListOptions)},[s,l,a,c,i,r,o,d,f,p,m,g,h,_]}class JV extends Ot{constructor(n){super(),At(this,n,KV,XV,It,{activeTab:0,user:1,businessunit:2,projectListOptions:3},HV)}}const mie="";function QV(t){Ut(t,"svelte-exibny",".display-flex.svelte-exibny.svelte-exibny{display:-ms-flexbox;display:-webkit-flex;display:flex}h4.heading.svelte-exibny.svelte-exibny{font-weight:500}.justify-content-sp-btw.svelte-exibny.svelte-exibny{justify-content:space-between}@media(min-width: 968px){}@media(min-width: 768px){}@media(max-width: 767px){}.close-dialog.svelte-exibny.svelte-exibny{display:block;margin-left:auto;margin-top:-3px}.header-content.svelte-exibny.svelte-exibny{margin-bottom:5px;align-items:flex-start}.no-project-found.svelte-exibny.svelte-exibny{font-size:14px;color:var(--se-anthracite-grey, #333333)}.country-warning.svelte-exibny.svelte-exibny{display:flex;align-items:center;padding-top:12px}.menu-left-margin.svelte-exibny.svelte-exibny{margin-left:8px}.heading.svelte-exibny.svelte-exibny{font-size:22px;color:var(--se-true-black, #000000);margin:0 0 10px 10px}.dialog-footer-button.svelte-exibny.svelte-exibny{display:flex;justify-content:end;margin:32px;gap:10px}.popup-content.svelte-exibny.svelte-exibny{margin:0 5px;overflow-x:hidden}.list.svelte-exibny.svelte-exibny{padding:16px;height:24px;border:1px solid #d8d6d6;display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer}.dialog-select-list.svelte-exibny.svelte-exibny{display:flex;flex-direction:column;max-height:80vh;overflow:hidden}.dialog-select-list.svelte-exibny .dialog-footer-button.svelte-exibny{height:42px;flex-shrink:0}@media(max-width: 768px){.dialog-select-list.svelte-exibny .dialog-footer-button.svelte-exibny{height:110px}}.dialog-select-list.svelte-exibny .popup-content.svelte-exibny{flex:1;overflow-y:auto}.dialog-select-list.svelte-exibny .heading.svelte-exibny{height:30px;flex-shrink:0}.dialog-select-list.svelte-exibny se-icon.svelte-exibny{height:24px;flex-shrink:0;margin-top:-8px}@media screen and (min-width: 350px) and (max-width: 500px){.list.svelte-exibny.svelte-exibny{max-width:260px}}.qds-radio.svelte-exibny.svelte-exibny{margin-top:4px}@media(max-width: 968px){.dialog-footer-button.svelte-exibny.svelte-exibny{flex-direction:column;margin:10px 0}}")}function i7(t,n,e){const i=t.slice();return i[37]=n[e],i}function r7(t){var q;let n,e,i,r,o=(t[0]?t[5]("list.import_product_from_list"):t[5]("generic.add_to_my_lists"))+"",s,l,a,c,u,d,f,p,m,g,h,_,b,y;function k(M,z){var D;if(M[6])return eY;if(((D=M[6])==null?void 0:D.length)===0)return $V}let T=k(t),R=T&&T(t),O=t[4]&&o7(t),j=!t[0]&&a7(t);return h=new Gt({props:{id:"add-to-project-button",disabled:((q=t[6])==null?void 0:q.length)===0||t[1]===Te,importance:"emphasized",buttonText:t[0]?t[5]("list.import_list"):t[5]("bom_manager.add_to_list")}}),h.$on("btnClick",t[24]),{c(){n=A("div"),e=A("div"),i=A("div"),r=A("h4"),s=de(o),l=Y(),a=A("div"),c=A("qds-button"),u=Y(),d=A("div"),R&&R.c(),f=Y(),O&&O.c(),p=Y(),m=A("div"),j&&j.c(),g=Y(),De(h.$$.fragment),x(r,"class","heading svelte-exibny"),x(r,"data-testid","heading-add-bom-project"),w(c,"importance","subdued"),w(c,"icon-name","cross-circle"),w(c,"class","align-middle close-dialog cursor-pointer svelte-exibny"),w(c,"data-testid","cross-button-close"),x(e,"class","display-flex justify-content-sp-btw header-content svelte-exibny"),x(d,"class","popup-content dialog-center svelte-exibny"),x(m,"class","dialog-footer-button svelte-exibny"),x(n,"class","dialog-select-list svelte-exibny")},m(M,z){J(M,n,z),v(n,e),v(e,i),v(i,r),v(r,s),v(e,l),v(e,a),v(a,c),v(n,u),v(n,d),R&&R.m(d,null),v(d,f),O&&O.m(d,null),v(n,p),v(n,m),j&&j.m(m,null),v(m,g),Me(h,m,null),_=!0,b||(y=xe(c,"click",t[21]),b=!0)},p(M,z){var P;(!_||z[0]&33)&&o!==(o=(M[0]?M[5]("list.import_product_from_list"):M[5]("generic.add_to_my_lists"))+"")&&be(s,o),T===(T=k(M))&&R?R.p(M,z):(R&&R.d(1),R=T&&T(M),R&&(R.c(),R.m(d,f))),M[4]?O?O.p(M,z):(O=o7(M),O.c(),O.m(d,null)):O&&(O.d(1),O=null),M[0]?j&&(Je(),se(j,1,1,()=>{j=null}),Qe()):j?(j.p(M,z),z[0]&1&&Q(j,1)):(j=a7(M),j.c(),Q(j,1),j.m(m,g));const D={};z[0]&66&&(D.disabled=((P=M[6])==null?void 0:P.length)===0||M[1]===Te),z[0]&33&&(D.buttonText=M[0]?M[5]("list.import_list"):M[5]("bom_manager.add_to_list")),h.$set(D)},i(M){_||(Q(j),Q(h.$$.fragment,M),_=!0)},o(M){se(j),se(h.$$.fragment,M),_=!1},d(M){M&&K(n),R&&R.d(),O&&O.d(),j&&j.d(),qe(h),b=!1,y()}}}function $V(t){let n,e=t[5]("list.no_list_found")+"",i;return{c(){n=A("p"),i=de(e),x(n,"class","no-project-found svelte-exibny")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[0]&32&&e!==(e=r[5]("list.no_list_found")+"")&&be(i,e)},d(r){r&&K(n)}}}function eY(t){let n,e=Dt(t[6]),i=[];for(let r=0;r{s=null}),Qe()),a[3]?l?(l.p(a,c),c[0]&8&&Q(l,1)):(l=l7(a),l.c(),Q(l,1),l.m(r.parentNode,r)):l&&(Je(),se(l,1,1,()=>{l=null}),Qe())},i(a){o||(Q(s),Q(l),o=!0)},o(a){se(s),se(l),o=!1},d(a){a&&(K(n),K(e),K(i),K(r)),s&&s.d(a),l&&l.d(a)}}}let nY="false";function iY(t,n,e){let i,r,o,s,l,a,c;ye(t,an,V=>e(29,i=V)),ye(t,ti,V=>e(30,r=V)),ye(t,Vt,V=>e(5,o=V)),ye(t,es,V=>e(31,s=V)),ye(t,$r,V=>e(32,l=V)),ye(t,Xi,V=>e(6,a=V)),ye(t,Jt,V=>e(7,c=V));let u="",d=!1,f=!1,p=!0,m=!1,{language:g}=n,{country:h}=n,{apigeeToken:_}=n,{getConfiguratorsDetails:b}=n,{getConfiguratorsCountry:y}=n,{isImportList:k}=n,{isList:T}=n,{selectAndConfigBearerToken:R}=n,{entryPoint:O}=n;const j=Mn();let q=!1;Un(async()=>{var V;if(e(2,p=!1),ve.info("Event detail: "+JSON.stringify(b==null?void 0:b.detail)),await gl(),T||k){Xi.set(Li),await io(nY).catch(W=>{ve.error(W.message)});let ne=new URLSearchParams(window.location.search);if(ne.size>0){const W=!!ne.get("list");let re=ne.get("id");const G=(V=a.find(F=>F.id==re))==null?void 0:V.id;W==!0&&re===G?(e(2,p=!1),e(1,u=re),D()):e(2,p=!0),Jt.update(()=>!1),e(4,q=y!==We.country)}else e(2,p=!0)}else if(!T){e(2,p=!1),Jt.set(!0);const ne=await jo(s);ne!=null&&ne.error&&ne.status===Bf.NOT_FOUND&&await _f(mn(We.country,i),gn(We.language,i));let W=JSON.parse(JSON.stringify(l));await pc(W,b,R),await Os(W,s).then(re=>{var G;if(!re.error){const X=((G=t1(b).bom)==null?void 0:G.products)||[];Bn(Nn.ADD_TO_CART,X,"","",!1,O),j("cartProductAdded",W)}}).catch(re=>{ve.error(re.message)}),Jt.set(!0),Ya.update(()=>!1)}});function M(V){j("closePopupEvent",V)}function z(V){e(1,u=V.id)}function D(){u!==Te&&(d=!0,L().catch(V=>{ve.error(V.message)}))}async function P(V){Jt.update(()=>!0);try{e(1,u=Te),e(1,u=await Yh({name:V==null?void 0:V.name,description:V==null?void 0:V.description})),f=!0,d=!1,C(),ve.info("New List created with ID: ",u)}catch(ne){Jt.update(()=>!1),ve.error(ne.message)}}async function L(){try{Jt.update(()=>!0),await ro(u),C()}catch{Jt.update(()=>!1)}}async function C(){var ne;let V=JSON.parse(JSON.stringify(i));if(k){const W=Hg(V,!1),re=new CustomEvent(uv,{detail:{data:W,success:!0,message:"List data imported successfully"}});document.dispatchEvent(re),ve.info("List data dispatched::",re),M({productAdded:!1})}else{await pc(V,b,R);let W=u;V==null||delete V.id,V==null||delete V.federatedId;const re=T?Nn.ADD_TO_LIST:Nn.ADD_TO_CART,F=((ne=t1(b).bom)==null?void 0:ne.products)||[];Bn(re,F,"","",!1,O),await S(V,W)}}function S(V,ne){const W=o("edit_list.list_updated_successfully_message");Vi({bom:V.bom},ne,W,r).then(async re=>{Jt.update(()=>!0);const G=mn(h,i),F=gn(g,i);await ci(ne,G,F,_).then(function(X){ve.info(X)}),re.data.id&&(Jt.update(()=>!1),M({productAdded:d,selectedProjectId:u,newProjectCreated:f}))}).finally(()=>{Jt.update(()=>!1),ve.info("Project updated for with ID: ",ne)})}function I(V){ws.set(V)}Kn(()=>{I(!1),Xi.set(Li)});const N=()=>{M({productAdded:!1})},E=V=>z(V),B=()=>{e(3,m=!0)},U=()=>{D()},H=({detail:V})=>{P(V),e(3,m=!1)},Z=()=>e(3,m=!1);return t.$$set=V=>{"language"in V&&e(12,g=V.language),"country"in V&&e(13,h=V.country),"apigeeToken"in V&&e(14,_=V.apigeeToken),"getConfiguratorsDetails"in V&&e(15,b=V.getConfiguratorsDetails),"getConfiguratorsCountry"in V&&e(16,y=V.getConfiguratorsCountry),"isImportList"in V&&e(0,k=V.isImportList),"isList"in V&&e(17,T=V.isList),"selectAndConfigBearerToken"in V&&e(18,R=V.selectAndConfigBearerToken),"entryPoint"in V&&e(19,O=V.entryPoint)},[k,u,p,m,q,o,a,c,M,z,D,P,g,h,_,b,y,T,R,O,I,N,E,B,U,H,Z]}class c7 extends Ot{constructor(n){super(),At(this,n,iY,tY,It,{language:12,country:13,apigeeToken:14,getConfiguratorsDetails:15,getConfiguratorsCountry:16,isImportList:0,isList:17,selectAndConfigBearerToken:18,entryPoint:19,setSnackbarVisibility:20},QV,[-1,-1])}get setSnackbarVisibility(){return this.$$.ctx[20]}}const gie="";function rY(t){Ut(t,"svelte-xow9zx",".dialog-bom-project.svelte-xow9zx{z-index:11000;position:absolute}")}function sY(t){let n,e;return n=new c7({props:{apigeeToken:t[3],language:t[0],country:t[1],getConfiguratorsDetails:t[2],getConfiguratorsCountry:t[10],isImportList:t[4],isList:t[5],entryPoint:t[7],selectAndConfigBearerToken:t[6]}}),n.$on("closePopupEvent",t[11]),n.$on("cartProductAdded",t[12]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r&8&&(o.apigeeToken=i[3]),r&1&&(o.language=i[0]),r&2&&(o.country=i[1]),r&4&&(o.getConfiguratorsDetails=i[2]),r&1024&&(o.getConfiguratorsCountry=i[10]),r&16&&(o.isImportList=i[4]),r&32&&(o.isList=i[5]),r&128&&(o.entryPoint=i[7]),r&64&&(o.selectAndConfigBearerToken=i[6]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function oY(t){let n,e,i=t[9]&&u7(t);return{c(){n=A("se-dialog"),i&&i.c(),w(n,"page-scroll","false"),w(n,"can-backdrop","false"),w(n,"size","medium"),w(n,"class","dialog-bom-project svelte-xow9zx")},m(r,o){J(r,n,o),i&&i.m(n,null),t[15](n),e=!0},p(r,o){r[9]?i?(i.p(r,o),o&512&&Q(i,1)):(i=u7(r),i.c(),Q(i,1),i.m(n,null)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(),t[15](null)}}}function u7(t){let n,e,i;return e=new c7({props:{apigeeToken:t[3],language:t[0],country:t[1],getConfiguratorsDetails:t[2],getConfiguratorsCountry:t[10],isImportList:t[4],isList:t[5],entryPoint:t[7],selectAndConfigBearerToken:t[6]}}),e.$on("closePopupEvent",t[11]),{c(){n=A("se-dialog-content"),De(e.$$.fragment)},m(r,o){J(r,n,o),Me(e,n,null),i=!0},p(r,o){const s={};o&8&&(s.apigeeToken=r[3]),o&1&&(s.language=r[0]),o&2&&(s.country=r[1]),o&4&&(s.getConfiguratorsDetails=r[2]),o&1024&&(s.getConfiguratorsCountry=r[10]),o&16&&(s.isImportList=r[4]),o&32&&(s.isList=r[5]),o&128&&(s.entryPoint=r[7]),o&64&&(s.selectAndConfigBearerToken=r[6]),e.$set(s)},i(r){i||(Q(e.$$.fragment,r),i=!0)},o(r){se(e.$$.fragment,r),i=!1},d(r){r&&K(n),qe(e)}}}function aY(t){let n,e,i,r,o;const s=[oY,sY],l=[];function a(c,u){return u&48&&(n=null),n==null&&(n=!!(c[5]&&!$_()||c[4])),n?0:1}return e=a(t,-1),i=l[e]=s[e](t),{c(){i.c(),r=wt()},m(c,u){l[e].m(c,u),J(c,r,u),o=!0},p(c,[u]){let d=e;e=a(c,u),e===d?l[e].p(c,u):(Je(),se(l[d],1,1,()=>{l[d]=null}),Qe(),i=l[e],i?i.p(c,u):(i=l[e]=s[e](c),i.c()),Q(i,1),i.m(r.parentNode,r))},i(c){o||(Q(i),o=!0)},o(c){se(i),o=!1},d(c){c&&K(r),l[e].d(c)}}}function $_(){return!!new URLSearchParams(window.location.search).get("list")}function lY(t,n,e){let{language:i}=n,{country:r}=n,{dataConfig:o}=n,{apigeeToken:s}=n,{apigeeUrl:l}=n,{viteOcmCaseUrl:a}=n,{isImportList:c}=n,{isList:u}=n,{selectAndConfigBearerToken:d}=n,{entryPoint:f}=n,p,m=!1,g,h;const _=Mn();Un(()=>{var O;We.initializeExternalUrls([l,a]),u&&!$_()||c?b():!u&&!c&&e(10,h=(O=o==null?void 0:o.detail)==null?void 0:O.country)});function b(){var O;e(8,p.open=!0,p),e(9,m=!0),e(10,h=(O=o==null?void 0:o.detail)==null?void 0:O.country)}function y(O){var j,q;Ya.update(()=>!1),(u&&!$_()||c)&&e(8,p.open=!1,p),!c&&u?(g=O.detail,((j=O==null?void 0:O.detail)!=null&&j.productAdded||(q=O==null?void 0:O.detail)!=null&&q.newProjectCreated)&&T()):!u&&!c&&k(O.detail)}function k(O){_("productAddedCart",{data:O})}function T(){_("configuratorsProductAdded",{projectId:String(g.selectedProjectId),getProductAddedDetails:g})}function R(O){_t[O?"unshift":"push"](()=>{p=O,e(8,p)})}return t.$$set=O=>{"language"in O&&e(0,i=O.language),"country"in O&&e(1,r=O.country),"dataConfig"in O&&e(2,o=O.dataConfig),"apigeeToken"in O&&e(3,s=O.apigeeToken),"apigeeUrl"in O&&e(13,l=O.apigeeUrl),"viteOcmCaseUrl"in O&&e(14,a=O.viteOcmCaseUrl),"isImportList"in O&&e(4,c=O.isImportList),"isList"in O&&e(5,u=O.isList),"selectAndConfigBearerToken"in O&&e(6,d=O.selectAndConfigBearerToken),"entryPoint"in O&&e(7,f=O.entryPoint)},[i,r,o,s,c,u,d,f,p,m,h,y,k,l,a,R]}class cY extends Ot{constructor(n){super(),At(this,n,lY,aY,It,{language:0,country:1,dataConfig:2,apigeeToken:3,apigeeUrl:13,viteOcmCaseUrl:14,isImportList:4,isList:5,selectAndConfigBearerToken:6,entryPoint:7},rY)}}let au;async function e0(t,n,e,i){let r={};try{if(e){const o=sessionStorage.getItem("myse_cognitoToken");return o&&typeof o=="string"?JSON.parse(o):null}else return r=await Yu(`${Sp[We.environment]}/myse-cart/authorize?languageCode=${We.language.toLowerCase()} &businessUnit=${i}&purchaserId=${t}&taa=${n}&punchout=${e}`,{headers:{"x-se-myse-url":`${Tp[We.environment]}`,"x-se-idms-token":We.accessToken}}),typeof r=="string"&&(r=JSON.parse(r)),au=r==null?void 0:r.cognitoToken,r==null?void 0:r.cognitoToken}catch(o){return ve.info("Exception from cart.js: ",o),au={error:"Failed to fecth token"},au}}async function f7(t,n){var l,a;const e=n.defaultpurchaser,i=!!n.temporaryPurchaser,r=!!n.isPunchout,o=au||await e0(e,i,r,n.mysebusinessunit),s=t0();try{let u=await Yu(`${Sp[We.environment]}/myse-cart/${n.mysebusinessunit}/${s}/add-to-cart`,{method:"POST",headers:{"x-se-calling-application":"myHomePage","x-se-user-authorization":o,"x-se-user-authorization-type":"Cognito","Content-Type":"application/json","x-se-myse-url":`${Tp[We.environment]}`},body:JSON.stringify(t)});return typeof u=="string"&&(u=JSON.parse(u)),u}catch(c){ap(((a=(l=c.response)==null?void 0:l.data)==null?void 0:a.message)||c||"Error in add to cart","Error in clearing cart, Please try again!")}}async function uY(t){const n=t.defaultpurchaser,e=!!t.temporaryPurchaser,i=!!t.isPunchout,r=await e0(n,e,i,t.mysebusinessunit);if(r!=null&&r.error)return r.error;const o=t0();try{const s=await Yu(`${Sp[We.environment]}/myse-cart/${t.mysebusinessunit}/${o}?orderNumber=&contractNumber=&taaPurchaserId=&accountSwitch=false"ationNumber=&promotionCode=&promotionOid=&type=ORDER`,{method:"GET",headers:{"x-se-calling-application":"myHomePage","x-se-user-authorization":r,"x-se-user-authorization-type":"Cognito","Content-Type":"application/json","x-se-myse-url":`${Tp[We.environment]}`}});if(s.hasError)ap(s,"Error in adding to cart, Please try again!");else return s}catch(s){ap(s,"Error in adding to cart, Please try again!")}}async function fY(t,n){const e=t.defaultpurchaser,i=!!t.temporaryPurchaser,r=!!t.isPunchout,o=au||await e0(e,i,r,t.mysebusinessunit);if(o.error)return o.error;const s=t0();try{const l=await Yu(`${Sp[We.environment]}/myse-cart/${t.mysebusinessunit}/${s}/clear-cart?type=ORDER`,{method:"POST",headers:{"x-se-calling-application":"myHomePage","x-se-user-authorization":o,"x-se-user-authorization-type":"Cognito","Content-Type":"application/json","x-se-myse-url":`${Tp[We.environment]}`},body:JSON.stringify(n)});if(l.hasError)ap(l,"Error in clearing cart, Please try again!");else return l}catch(l){ap(l,"Error in clearing cart, Please try again!")}}function ap(t,n){var e,i;return{error:((i=(e=t==null?void 0:t.message)==null?void 0:e.message)==null?void 0:i.erroMessage)||n}}function t0(){const t=sessionStorage.getItem("myse_cartId");return t?JSON.parse(t):null}const _ie="";function dY(t){Ut(t,"svelte-19q1r6w",".display-flex.svelte-19q1r6w.svelte-19q1r6w{display:-ms-flexbox;display:-webkit-flex;display:flex}.pw-snackbar-elem.svelte-19q1r6w.svelte-19q1r6w{top:30px}.justify-content-sp-btw.svelte-19q1r6w.svelte-19q1r6w{justify-content:space-between}@media(min-width: 968px){}.cart-mobile-snackbar.svelte-19q1r6w.svelte-19q1r6w{position:fixed;top:0;width:100%;height:92px;font-size:12px}.desktop-view-snackbar.svelte-19q1r6w.svelte-19q1r6w,.mobile-view-snackbar.svelte-19q1r6w.svelte-19q1r6w{display:none}@media(min-width: 768px){.desktop-view-snackbar.svelte-19q1r6w.svelte-19q1r6w{display:block}}@media(max-width: 767px){.mobile-view-snackbar.svelte-19q1r6w.svelte-19q1r6w{display:block}}.snackbar-mobile-div.svelte-19q1r6w.svelte-19q1r6w{width:100%;height:120px;color:white;background-color:#3dcd58;font-size:16px;padding-top:8px}.snackbar-mobile-div.svelte-19q1r6w .snackbar-header.svelte-19q1r6w{padding:12px 20px}.snackbar-mobile-div.svelte-19q1r6w .close-snackbar.svelte-19q1r6w{padding:10px 16px}.snackbar-mobile-div.svelte-19q1r6w .snackbar-btn-class-div.svelte-19q1r6w{width:90%;border-radius:5px;border:2px solid white;height:34px;margin:5px 18px;justify-content:center;align-items:center}.added-product-snackBar.svelte-19q1r6w.svelte-19q1r6w{margin-right:6rem}.snack-bar-product.svelte-19q1r6w.svelte-19q1r6w{z-index:11000}.snackbar-top-50.svelte-19q1r6w.svelte-19q1r6w{top:50px}.dialog-bom-project.svelte-19q1r6w.svelte-19q1r6w{z-index:11000;position:absolute}.snackbar-center.svelte-19q1r6w.svelte-19q1r6w{top:85%}.snackbar-btn.svelte-19q1r6w.svelte-19q1r6w{background:var(--se-white);margin-right:10px;padding:6px;border:solid 2px;float:right;cursor:pointer;margin-top:17px;margin-left:20px;border-radius:5px}.snackbar-btn-qds-child.svelte-19q1r6w.svelte-19q1r6w{margin:17px 0 0;border:0;padding:0;--qds-theme-link-subdued-default:#fff}.snackbar-btn-qds-child.svelte-19q1r6w .snackbar-link.svelte-19q1r6w{color:#fff;border:solid 1px #fff;padding:0px 10px;--qds-theme-link-subdued-default:#fff;--qds-theme-link-subdued-visited:#fff;--qds-theme-link-subdued-hover:#fff;--qds-control-standard-height:2rem}.snackbar-btn-qds-child.svelte-19q1r6w .snackbar-link.svelte-19q1r6w:hover,.snackbar-btn-qds-child.svelte-19q1r6w .snackbar-link.svelte-19q1r6w:visited{color:#fff}.container.svelte-19q1r6w.svelte-19q1r6w{display:flex;justify-content:center;align-items:center;height:25px}.margin-top-17.svelte-19q1r6w.svelte-19q1r6w{margin-top:17px}.show-bottom.svelte-19q1r6w.svelte-19q1r6w{bottom:30px;top:auto}")}function d7(t){t[126]=t[127].default}function p7(t){t[128]=t[127].default}const pY=t=>({}),h7=t=>({slot:"surveyBtn"}),hY=t=>({}),m7=t=>({slot:"surveyBtn"});function mY(t){var N,E,B;let n,e,i,r,o,s=((E=(N=t[44])==null?void 0:N.detail)==null?void 0:E.country)&&t[63]&&T0.includes(t[0]),l,a,c,u,d,f,p,m,g,h,_,b,y=(t[0]===Sc||t[0]===zo)&&g7(t),k=t[0]===So&&t[33]!==Te&&!t[42]&&_7(t),T=t[0]===qn&&t[33]!==Te&&t[42]&&v7(t),R=t[0]===k0&&y7(t),O=t[1]&&!t[0]&&k7(t),j=s&&S7(t),q=t[63]&&t[0]===gu&&T7(t),M=t[45]&&C7(t),z=t[46]&&E7(t),D=t[47]&&I7(t),P=t[50]&&A7(t),L=t[0]===x0&&O7(t),C=t[0]===Vn&&t[21]==="false"&&P7(t),S=((B=t[55])==null?void 0:B.length)&&N7(t),I=t[57]&&L7(t);return{c(){y&&y.c(),n=Y(),k&&k.c(),e=Y(),T&&T.c(),i=Y(),R&&R.c(),r=Y(),O&&O.c(),o=Y(),j&&j.c(),l=Y(),q&&q.c(),a=Y(),M&&M.c(),c=Y(),z&&z.c(),u=Y(),D&&D.c(),d=Y(),P&&P.c(),f=Y(),L&&L.c(),p=Y(),C&&C.c(),m=Y(),S&&S.c(),g=Y(),I&&I.c(),h=Y(),_=A("se-loading"),w(_,"id","cart-loader"),w(_,"loading",t[58]),w(_,"overlay","true"),w(_,"full-page","true")},m(U,H){y&&y.m(U,H),J(U,n,H),k&&k.m(U,H),J(U,e,H),T&&T.m(U,H),J(U,i,H),R&&R.m(U,H),J(U,r,H),O&&O.m(U,H),J(U,o,H),j&&j.m(U,H),J(U,l,H),q&&q.m(U,H),J(U,a,H),M&&M.m(U,H),J(U,c,H),z&&z.m(U,H),J(U,u,H),D&&D.m(U,H),J(U,d,H),P&&P.m(U,H),J(U,f,H),L&&L.m(U,H),J(U,p,H),C&&C.m(U,H),J(U,m,H),S&&S.m(U,H),J(U,g,H),I&&I.m(U,H),J(U,h,H),J(U,_,H),b=!0},p(U,H){var Z,V,ne;U[0]===Sc||U[0]===zo?y?(y.p(U,H),H[0]&1&&Q(y,1)):(y=g7(U),y.c(),Q(y,1),y.m(n.parentNode,n)):y&&(Je(),se(y,1,1,()=>{y=null}),Qe()),U[0]===So&&U[33]!==Te&&!U[42]?k?(k.p(U,H),H[0]&1|H[1]&2052&&Q(k,1)):(k=_7(U),k.c(),Q(k,1),k.m(e.parentNode,e)):k&&(Je(),se(k,1,1,()=>{k=null}),Qe()),U[0]===qn&&U[33]!==Te&&U[42]?T?(T.p(U,H),H[0]&1|H[1]&2052&&Q(T,1)):(T=v7(U),T.c(),Q(T,1),T.m(i.parentNode,i)):T&&(Je(),se(T,1,1,()=>{T=null}),Qe()),U[0]===k0?R?(R.p(U,H),H[0]&1&&Q(R,1)):(R=y7(U),R.c(),Q(R,1),R.m(r.parentNode,r)):R&&(Je(),se(R,1,1,()=>{R=null}),Qe()),U[1]&&!U[0]?O?(O.p(U,H),H[0]&3&&Q(O,1)):(O=k7(U),O.c(),Q(O,1),O.m(o.parentNode,o)):O&&(Je(),se(O,1,1,()=>{O=null}),Qe()),H[0]&1|H[1]&8192|H[2]&2&&(s=((V=(Z=U[44])==null?void 0:Z.detail)==null?void 0:V.country)&&U[63]&&T0.includes(U[0])),s?j?(j.p(U,H),H[0]&1|H[1]&8192|H[2]&2&&Q(j,1)):(j=S7(U),j.c(),Q(j,1),j.m(l.parentNode,l)):j&&(Je(),se(j,1,1,()=>{j=null}),Qe()),U[63]&&U[0]===gu?q?(q.p(U,H),H[0]&1|H[2]&2&&Q(q,1)):(q=T7(U),q.c(),Q(q,1),q.m(a.parentNode,a)):q&&(Je(),se(q,1,1,()=>{q=null}),Qe()),U[45]?M?(M.p(U,H),H[1]&16384&&Q(M,1)):(M=C7(U),M.c(),Q(M,1),M.m(c.parentNode,c)):M&&(Je(),se(M,1,1,()=>{M=null}),Qe()),U[46]?z?z.p(U,H):(z=E7(U),z.c(),z.m(u.parentNode,u)):z&&(z.d(1),z=null),U[47]?D?D.p(U,H):(D=I7(U),D.c(),D.m(d.parentNode,d)):D&&(D.d(1),D=null),U[50]?P?P.p(U,H):(P=A7(U),P.c(),P.m(f.parentNode,f)):P&&(P.d(1),P=null),U[0]===x0?L?(L.p(U,H),H[0]&1&&Q(L,1)):(L=O7(U),L.c(),Q(L,1),L.m(p.parentNode,p)):L&&(Je(),se(L,1,1,()=>{L=null}),Qe()),U[0]===Vn&&U[21]==="false"?C?(C.p(U,H),H[0]&2097153&&Q(C,1)):(C=P7(U),C.c(),Q(C,1),C.m(m.parentNode,m)):C&&(Je(),se(C,1,1,()=>{C=null}),Qe()),(ne=U[55])!=null&&ne.length?S?S.p(U,H):(S=N7(U),S.c(),S.m(g.parentNode,g)):S&&(S.d(1),S=null),U[57]?I?I.p(U,H):(I=L7(U),I.c(),I.m(h.parentNode,h)):I&&(I.d(1),I=null),(!b||H[1]&134217728)&&w(_,"loading",U[58])},i(U){b||(Q(y),Q(k),Q(T),Q(R),Q(O),Q(j),Q(q),Q(M),Q(L),Q(C),b=!0)},o(U){se(y),se(k),se(T),se(R),se(O),se(j),se(q),se(M),se(L),se(C),b=!1},d(U){U&&(K(n),K(e),K(i),K(r),K(o),K(l),K(a),K(c),K(u),K(d),K(f),K(p),K(m),K(g),K(h),K(_)),y&&y.d(U),k&&k.d(U),T&&T.d(U),R&&R.d(U),O&&O.d(U),j&&j.d(U),q&&q.d(U),M&&M.d(U),z&&z.d(U),D&&D.d(U),P&&P.d(U),L&&L.d(U),C&&C.d(U),S&&S.d(U),I&&I.d(U)}}}function gY(t){let n,e,i,r,o,s;function l(u){t[79](u)}function a(u){t[80](u)}let c={projectPage:t[14],redirectedFromPlatform:t[51],anonymousProjectId:t[52],language:t[4],country:t[5],apigeeToken:t[2]};return t[0]!==void 0&&(c.page=t[0]),t[50]!==void 0&&(c.isProjectConversionSnackbar=t[50]),i=new bz({props:c}),_t.push(()=>Ct(i,"page",l)),_t.push(()=>Ct(i,"isProjectConversionSnackbar",a)),{c(){n=A("se-dialog"),e=A("se-dialog-content"),De(i.$$.fragment),w(n,"page-scroll","false"),w(n,"no-backdrop","true"),w(n,"size","medium"),w(n,"open",t[61]),w(n,"class","dialog-bom-project svelte-19q1r6w")},m(u,d){J(u,n,d),v(n,e),Me(i,e,null),s=!0},p(u,d){const f={};d[0]&16384&&(f.projectPage=u[14]),d[1]&1048576&&(f.redirectedFromPlatform=u[51]),d[1]&2097152&&(f.anonymousProjectId=u[52]),d[0]&16&&(f.language=u[4]),d[0]&32&&(f.country=u[5]),d[0]&4&&(f.apigeeToken=u[2]),!r&&d[0]&1&&(r=!0,f.page=u[0],Tt(()=>r=!1)),!o&&d[1]&524288&&(o=!0,f.isProjectConversionSnackbar=u[50],Tt(()=>o=!1)),i.$set(f),(!s||d[1]&1073741824)&&w(n,"open",u[61])},i(u){s||(Q(i.$$.fragment,u),s=!0)},o(u){se(i.$$.fragment,u),s=!1},d(u){u&&K(n),qe(i)}}}function g7(t){let n,e,i,r,o;const s=[bY,_Y],l=[];function a(c,u){var d;return u[0]&2|u[1]&262144&&(n=null),n==null&&(n=!c[1]||!((d=c[49])!=null&&d.has(Xf))),n?0:1}return e=a(t,[-1,-1,-1,-1,-1]),i=l[e]=s[e](t),{c(){i.c(),r=wt()},m(c,u){l[e].m(c,u),J(c,r,u),o=!0},p(c,u){let d=e;e=a(c,u),e===d?l[e].p(c,u):(Je(),se(l[d],1,1,()=>{l[d]=null}),Qe(),i=l[e],i?i.p(c,u):(i=l[e]=s[e](c),i.c()),Q(i,1),i.m(r.parentNode,r))},i(c){o||(Q(i),o=!0)},o(c){se(i),o=!1},d(c){c&&K(r),l[e].d(c)}}}function _Y(t){let n;return{c(){n=A("se-loading"),w(n,"loading","true"),w(n,"overlay","true"),w(n,"full-page","true")},m(e,i){J(e,n,i)},p:et,i:et,o:et,d(e){e&&K(n)}}}function bY(t){let n,e,i,r;const o=[wY,vY],s=[];function l(a,c){return a[42]?1:0}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,c){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function vY(t){let n,e,i={user:t[6],businessunit:t[18],projectListOptions:t[31]};return n=new JV({props:i}),t[82](n),n.$on("gotoList",t[66]),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){const s={};o[0]&64&&(s.user=r[6]),o[0]&262144&&(s.businessunit=r[18]),o[1]&1&&(s.projectListOptions=r[31]),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){t[82](null),qe(n,r)}}}function wY(t){let n,e,i={user:t[6],businessunit:t[18],projectListOptions:t[31],platform:t[22],$$slots:{surveyBtn:[yY]},$$scope:{ctx:t}};return n=new FB({props:i}),t[81](n),n.$on("gotoProject",t[66]),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){const s={};o[0]&64&&(s.user=r[6]),o[0]&262144&&(s.businessunit=r[18]),o[1]&1&&(s.projectListOptions=r[31]),o[0]&4194304&&(s.platform=r[22]),o[3]&1&&(s.$$scope={dirty:o,ctx:r}),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){t[81](null),qe(n,r)}}}function yY(t){let n;const e=t[78].surveyBtn,i=fl(e,t,t[93],m7);return{c(){i&&i.c()},m(r,o){i&&i.m(r,o),n=!0},p(r,o){i&&i.p&&(!n||o[3]&1)&&pl(i,e,r,r[93],n?dl(e,r[93],o,hY):hl(r[93]),m7)},i(r){n||(Q(i,r),n=!0)},o(r){se(i,r),n=!1},d(r){i&&i.d(r)}}}function _7(t){let n,e,i=t[43]&&b7(t);return{c(){i&&i.c(),n=wt()},m(r,o){i&&i.m(r,o),J(r,n,o),e=!0},p(r,o){r[43]?i?(i.p(r,o),o[1]&4096&&Q(i,1)):(i=b7(r),i.c(),Q(i,1),i.m(n.parentNode,n)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(r)}}}function b7(t){let n,e,i,r={ctx:t,current:null,token:null,hasCatch:!1,pending:CY,then:SY,catch:kY,value:127,blocks:[,,,]};return mp(e=t[43],r),{c(){n=wt(),r.block.c()},m(o,s){J(o,n,s),r.block.m(o,r.anchor=s),r.mount=()=>n.parentNode,r.anchor=n,i=!0},p(o,s){t=o,r.ctx=t,s[1]&4096&&e!==(e=t[43])&&mp(e,r)||b0(r,t,s)},i(o){i||(Q(r.block),i=!0)},o(o){for(let s=0;s<3;s+=1){const l=r.blocks[s];se(l)}i=!1},d(o){o&&K(n),r.block.d(o),r.token=null,r=null}}}function kY(t){return{c:et,m:et,p:et,i:et,o:et,d:et}}function SY(t){p7(t);let n,e,i={env:We.environment||t[23],projectId:t[41],token:t[62],apigeeToken:t[2],countryentries:t[8],language:t[4],country:t[5],apigeeUrl:t[10],viteOcmCaseUrl:t[11],showCartIcon:t[9],availableservices:t[7],user:t[6],channel:t[15],subchannel:t[16],selectAndConfigBearerToken:t[12],selectAndConfigUrl:t[13],languageChange:t[17],businessunit:t[18],externalBomData:t[19],mode:t[20],silent:t[21],platform:t[22],configuratorLandingUrl:t[24],eabProjectId:t[25],eabBackUrl:t[26],pbRefreshProjData:t[27],hmcVersion:t[32],loadHMC:t[28],cpqUser:t[29],cpqEnabled:t[30],hmcWCUrl:t[33],addToCartBtn:t[34],isStandAlone:t[35],showPublicPage:t[37],$$slots:{surveyBtn:[TY]},$$scope:{ctx:t}};return n=new t[128]({props:i}),t[83](n),n.$on("goToCart",t[64]),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){p7(r);const s={};o[0]&8388608&&(s.env=We.environment||r[23]),o[1]&1024&&(s.projectId=r[41]),o[2]&1&&(s.token=r[62]),o[0]&4&&(s.apigeeToken=r[2]),o[0]&256&&(s.countryentries=r[8]),o[0]&16&&(s.language=r[4]),o[0]&32&&(s.country=r[5]),o[0]&1024&&(s.apigeeUrl=r[10]),o[0]&2048&&(s.viteOcmCaseUrl=r[11]),o[0]&512&&(s.showCartIcon=r[9]),o[0]&128&&(s.availableservices=r[7]),o[0]&64&&(s.user=r[6]),o[0]&32768&&(s.channel=r[15]),o[0]&65536&&(s.subchannel=r[16]),o[0]&4096&&(s.selectAndConfigBearerToken=r[12]),o[0]&8192&&(s.selectAndConfigUrl=r[13]),o[0]&131072&&(s.languageChange=r[17]),o[0]&262144&&(s.businessunit=r[18]),o[0]&524288&&(s.externalBomData=r[19]),o[0]&1048576&&(s.mode=r[20]),o[0]&2097152&&(s.silent=r[21]),o[0]&4194304&&(s.platform=r[22]),o[0]&16777216&&(s.configuratorLandingUrl=r[24]),o[0]&33554432&&(s.eabProjectId=r[25]),o[0]&67108864&&(s.eabBackUrl=r[26]),o[0]&134217728&&(s.pbRefreshProjData=r[27]),o[1]&2&&(s.hmcVersion=r[32]),o[0]&268435456&&(s.loadHMC=r[28]),o[0]&536870912&&(s.cpqUser=r[29]),o[0]&1073741824&&(s.cpqEnabled=r[30]),o[1]&4&&(s.hmcWCUrl=r[33]),o[1]&8&&(s.addToCartBtn=r[34]),o[1]&16&&(s.isStandAlone=r[35]),o[1]&64&&(s.showPublicPage=r[37]),o[3]&1&&(s.$$scope={dirty:o,ctx:r}),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){t[83](null),qe(n,r)}}}function TY(t){let n;const e=t[78].surveyBtn,i=fl(e,t,t[93],h7);return{c(){i&&i.c()},m(r,o){i&&i.m(r,o),n=!0},p(r,o){i&&i.p&&(!n||o[3]&1)&&pl(i,e,r,r[93],n?dl(e,r[93],o,pY):hl(r[93]),h7)},i(r){n||(Q(i,r),n=!0)},o(r){se(i,r),n=!1},d(r){i&&i.d(r)}}}function CY(t){return{c:et,m:et,p:et,i:et,o:et,d:et}}function v7(t){let n,e,i=t[43]&&w7(t);return{c(){i&&i.c(),n=wt()},m(r,o){i&&i.m(r,o),J(r,n,o),e=!0},p(r,o){r[43]?i?(i.p(r,o),o[1]&4096&&Q(i,1)):(i=w7(r),i.c(),Q(i,1),i.m(n.parentNode,n)):i&&(Je(),se(i,1,1,()=>{i=null}),Qe())},i(r){e||(Q(i),e=!0)},o(r){se(i),e=!1},d(r){r&&K(n),i&&i.d(r)}}}function w7(t){let n,e,i,r={ctx:t,current:null,token:null,hasCatch:!1,pending:AY,then:IY,catch:EY,value:127,blocks:[,,,]};return mp(e=t[43],r),{c(){n=wt(),r.block.c()},m(o,s){J(o,n,s),r.block.m(o,r.anchor=s),r.mount=()=>n.parentNode,r.anchor=n,i=!0},p(o,s){t=o,r.ctx=t,s[1]&4096&&e!==(e=t[43])&&mp(e,r)||b0(r,t,s)},i(o){i||(Q(r.block),i=!0)},o(o){for(let s=0;s<3;s+=1){const l=r.blocks[s];se(l)}i=!1},d(o){o&&K(n),r.block.d(o),r.token=null,r=null}}}function EY(t){return{c:et,m:et,p:et,i:et,o:et,d:et}}function IY(t){d7(t);let n,e,i={env:We.environment||t[23],projectId:t[41],token:t[62],apigeeToken:t[2],countryentries:t[8],language:t[4],country:t[5],apigeeUrl:t[10],viteOcmCaseUrl:t[11],showCartIcon:t[9],availableservices:t[7],user:t[6],channel:t[15],subchannel:t[16],selectAndConfigBearerToken:t[12],selectAndConfigUrl:t[13],languageChange:t[17],businessunit:t[18],externalBomData:t[19],mode:t[20],silent:t[21],platform:t[22],configuratorLandingUrl:t[24],hmcVersion:t[32],loadHMC:t[28],cpqUser:t[29],cpqEnabled:t[30],hmcWCUrl:t[33],addToCartBtn:t[34],isStandAlone:t[35],entryPoint:t[36]};return n=new t[126]({props:i}),t[84](n),n.$on("goToCart",t[64]),n.$on("gotoUCCart",t[65]),n.$on("gotoUCCartPublic",t[85]),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){d7(r);const s={};o[0]&8388608&&(s.env=We.environment||r[23]),o[1]&1024&&(s.projectId=r[41]),o[2]&1&&(s.token=r[62]),o[0]&4&&(s.apigeeToken=r[2]),o[0]&256&&(s.countryentries=r[8]),o[0]&16&&(s.language=r[4]),o[0]&32&&(s.country=r[5]),o[0]&1024&&(s.apigeeUrl=r[10]),o[0]&2048&&(s.viteOcmCaseUrl=r[11]),o[0]&512&&(s.showCartIcon=r[9]),o[0]&128&&(s.availableservices=r[7]),o[0]&64&&(s.user=r[6]),o[0]&32768&&(s.channel=r[15]),o[0]&65536&&(s.subchannel=r[16]),o[0]&4096&&(s.selectAndConfigBearerToken=r[12]),o[0]&8192&&(s.selectAndConfigUrl=r[13]),o[0]&131072&&(s.languageChange=r[17]),o[0]&262144&&(s.businessunit=r[18]),o[0]&524288&&(s.externalBomData=r[19]),o[0]&1048576&&(s.mode=r[20]),o[0]&2097152&&(s.silent=r[21]),o[0]&4194304&&(s.platform=r[22]),o[0]&16777216&&(s.configuratorLandingUrl=r[24]),o[1]&2&&(s.hmcVersion=r[32]),o[0]&268435456&&(s.loadHMC=r[28]),o[0]&536870912&&(s.cpqUser=r[29]),o[0]&1073741824&&(s.cpqEnabled=r[30]),o[1]&4&&(s.hmcWCUrl=r[33]),o[1]&8&&(s.addToCartBtn=r[34]),o[1]&16&&(s.isStandAlone=r[35]),o[1]&32&&(s.entryPoint=r[36]),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){t[84](null),qe(n,r)}}}function AY(t){return{c:et,m:et,p:et,i:et,o:et,d:et}}function y7(t){let n,e;return n=new aV({props:{language:t[4],country:t[5],apigeeToken:t[2],user:t[6]}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&16&&(o.language=i[4]),r[0]&32&&(o.country=i[5]),r[0]&4&&(o.apigeeToken=i[2]),r[0]&64&&(o.user=i[6]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function k7(t){let n,e,i={availableservices:t[7]};return n=new uU({props:i}),t[86](n),n.$on("bom",t[68]),n.$on("projectWorkspace",t[74]),n.$on("configurator",t[73]),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){const s={};o[0]&128&&(s.availableservices=r[7]),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){t[86](null),qe(n,r)}}}function S7(t){let n,e;return n=new dz({props:{language:t[4],country:t[5],apigeeToken:t[2],dataConfig:t[44],apigeeUrl:t[10],viteOcmCaseUrl:t[11]}}),n.$on("configuratorsProductAdded",t[70]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&16&&(o.language=i[4]),r[0]&32&&(o.country=i[5]),r[0]&4&&(o.apigeeToken=i[2]),r[1]&8192&&(o.dataConfig=i[44]),r[0]&1024&&(o.apigeeUrl=i[10]),r[0]&2048&&(o.viteOcmCaseUrl=i[11]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function T7(t){let n,e;return n=new cY({props:{language:t[4],country:t[5],apigeeToken:t[2],dataConfig:t[44],apigeeUrl:t[10],viteOcmCaseUrl:t[11],isImportList:t[53],isList:t[54],selectAndConfigBearerToken:t[12],entryPoint:t[36]}}),n.$on("configuratorsProductAdded",t[71]),n.$on("productAddedCart",t[72]),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&16&&(o.language=i[4]),r[0]&32&&(o.country=i[5]),r[0]&4&&(o.apigeeToken=i[2]),r[1]&8192&&(o.dataConfig=i[44]),r[0]&1024&&(o.apigeeUrl=i[10]),r[0]&2048&&(o.viteOcmCaseUrl=i[11]),r[1]&4194304&&(o.isImportList=i[53]),r[1]&8388608&&(o.isList=i[54]),r[0]&4096&&(o.selectAndConfigBearerToken=i[12]),r[1]&32&&(o.entryPoint=i[36]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function C7(t){var a,c,u;let n,e,i=((u=(c=(a=t[48])==null?void 0:a.detail)==null?void 0:c.getProductAddedDetails)!=null&&u.productAdded?t[60]("bom_manager.product_added_to_project"):t[60]("bom_manager.products_added_to_new_project"))+"",r,o,s,l;return s=new xi({props:{linkText:t[60]("configurators.view_bom"),importance:"subdued"}}),s.$on("linkClick",t[87]),{c(){n=A("se-snackbar"),e=A("span"),r=de(i),o=Y(),De(s.$$.fragment),x(e,"class","added-product-snackBar svelte-19q1r6w"),w(n,"class","snack-bar-product svelte-19q1r6w"),w(n,"open",t[45]),w(n,"icon","information_stroke"),w(n,"can-close","true")},m(d,f){J(d,n,f),v(n,e),v(e,r),v(n,o),Me(s,n,null),l=!0},p(d,f){var m,g,h;(!l||f[1]&537001984)&&i!==(i=((h=(g=(m=d[48])==null?void 0:m.detail)==null?void 0:g.getProductAddedDetails)!=null&&h.productAdded?d[60]("bom_manager.product_added_to_project"):d[60]("bom_manager.products_added_to_new_project"))+"")&&be(r,i);const p={};f[1]&536870912&&(p.linkText=d[60]("configurators.view_bom")),s.$set(p),(!l||f[1]&16384)&&w(n,"open",d[45])},i(d){l||(Q(s.$$.fragment,d),l=!0)},o(d){se(s.$$.fragment,d),l=!1},d(d){d&&K(n),qe(s)}}}function E7(t){var P,L,C;let n,e,i,r,o=((C=(L=(P=t[48])==null?void 0:P.detail)==null?void 0:L.getProductAddedDetails)!=null&&C.productAdded?t[60]("list.product_added_to_list"):t[60]("list.products_added_to_new_list"))+"",s,l,a,c,u=t[60]("list.view_list")+"",d,f,p,m,g,h,_=t[60]("list.added_to_list")+"",b,y,k,T,R,O,j,q=t[60]("list.show_list")+"",M,z,D;return{c(){n=A("se-snackbar"),e=A("span"),i=A("div"),r=A("span"),s=de(o),l=Y(),a=A("span"),c=A("qds-standalone-link"),d=de(u),f=Y(),p=A("div"),m=A("div"),g=A("div"),h=A("span"),b=de(_),y=Y(),k=A("div"),T=A("se-icon"),T.textContent="action_delete_cross",R=Y(),O=A("div"),j=A("qds-standalone-link"),M=de(q),x(r,"class","margin-top-17 svelte-19q1r6w"),w(c,"class","snackbar-link svelte-19q1r6w"),w(c,"target","_blank"),w(c,"href",t[76]()),w(c,"importance","subdued"),x(a,"class","snackbar-btn snackbar-btn-qds-child svelte-19q1r6w"),x(i,"class","container svelte-19q1r6w"),x(e,"class","added-product-snackBar svelte-19q1r6w"),w(n,"class","snack-bar-product snackbar-center desktop-view-snackbar svelte-19q1r6w"),w(n,"open",t[46]),w(n,"icon","information_stroke"),w(n,"can-close","true"),w(n,"type","success"),x(g,"class","snackbar-header svelte-19q1r6w"),w(T,"class","cursor-pointer"),x(k,"class","close-snackbar svelte-19q1r6w"),x(m,"class","display-flex justify-content-sp-btw svelte-19q1r6w"),w(j,"class","snackbar-link svelte-19q1r6w"),w(j,"target","_blank"),w(j,"href",t[76]()),w(j,"importance","subdued"),x(O,"class","snackbar-btn-class-div display-flex snackbar-btn-qds-child svelte-19q1r6w"),x(p,"class","snackbar-mobile-div snack-bar-zindex cart-mobile-snackbar display-flex mobile-view-snackbar svelte-19q1r6w")},m(S,I){J(S,n,I),v(n,e),v(e,i),v(i,r),v(r,s),v(i,l),v(i,a),v(a,c),v(c,d),J(S,f,I),J(S,p,I),v(p,m),v(m,g),v(g,h),v(h,b),v(m,y),v(m,k),v(k,T),v(p,R),v(p,O),v(O,j),v(j,M),z||(D=[xe(a,"click",t[88]),xe(T,"click",t[89]),xe(O,"click",t[90])],z=!0)},p(S,I){var N,E,B;I[1]&537001984&&o!==(o=((B=(E=(N=S[48])==null?void 0:N.detail)==null?void 0:E.getProductAddedDetails)!=null&&B.productAdded?S[60]("list.product_added_to_list"):S[60]("list.products_added_to_new_list"))+"")&&be(s,o),I[1]&536870912&&u!==(u=S[60]("list.view_list")+"")&&be(d,u),I[1]&32768&&w(n,"open",S[46]),I[1]&536870912&&_!==(_=S[60]("list.added_to_list")+"")&&be(b,_),I[1]&536870912&&q!==(q=S[60]("list.show_list")+"")&&be(M,q)},d(S){S&&(K(n),K(f),K(p)),z=!1,An(D)}}}function I7(t){let n,e,i,r,o=t[60]("cart.product_added_to_cart")+"",s,l,a,c,u,d,f,p,m,g=t[60]("cart.item_added_cart")+"",h,_,b,y,k,T,R,O,j;function q(C,S){return S[1]&268435456&&(c=null),c==null&&(c=!!el(C[59])),c?PY:OY}let M=q(t,[-1,-1,-1,-1,-1]),z=M(t);function D(C,S){return S[1]&268435456&&(R=null),R==null&&(R=!!el(C[59])),R?LY:NY}let P=D(t,[-1,-1,-1,-1,-1]),L=P(t);return{c(){n=A("se-snackbar"),e=A("span"),i=A("div"),r=A("span"),s=de(o),l=Y(),a=A("span"),z.c(),u=Y(),d=A("div"),f=A("div"),p=A("div"),m=A("span"),h=de(g),_=Y(),b=A("div"),y=A("se-icon"),y.textContent="action_delete_cross",k=Y(),T=A("div"),L.c(),x(r,"class","margin-top-17 svelte-19q1r6w"),x(a,"class","snackbar-btn snackbar-btn-qds-child svelte-19q1r6w"),x(i,"class","container svelte-19q1r6w"),x(e,"class","added-product-snackBar svelte-19q1r6w"),w(n,"class","snack-bar-product snackbar-center desktop-view-snackbar svelte-19q1r6w"),w(n,"open",t[47]),w(n,"icon","information_stroke"),w(n,"can-close","true"),w(n,"type","success"),x(p,"class","snackbar-header svelte-19q1r6w"),w(y,"class","cursor-pointer"),x(b,"class","close-snackbar svelte-19q1r6w"),x(f,"class","display-flex justify-content-sp-btw svelte-19q1r6w"),x(T,"class","snackbar-btn-class-div display-flex snackbar-btn-qds-child svelte-19q1r6w"),x(d,"class","snackbar-mobile-div snack-bar-zindex cart-mobile-snackbar display-flex mobile-view-snackbar svelte-19q1r6w")},m(C,S){J(C,n,S),v(n,e),v(e,i),v(i,r),v(r,s),v(i,l),v(i,a),z.m(a,null),J(C,u,S),J(C,d,S),v(d,f),v(f,p),v(p,m),v(m,h),v(f,_),v(f,b),v(b,y),v(d,k),v(d,T),L.m(T,null),O||(j=xe(y,"click",t[91]),O=!0)},p(C,S){S[1]&536870912&&o!==(o=C[60]("cart.product_added_to_cart")+"")&&be(s,o),M===(M=q(C,S))&&z?z.p(C,S):(z.d(1),z=M(C),z&&(z.c(),z.m(a,null))),S[1]&65536&&w(n,"open",C[47]),S[1]&536870912&&g!==(g=C[60]("cart.item_added_cart")+"")&&be(h,g),P===(P=D(C,S))&&L?L.p(C,S):(L.d(1),L=P(C),L&&(L.c(),L.m(T,null)))},d(C){C&&(K(n),K(u),K(d)),z.d(),L.d(),O=!1,j()}}}function OY(t){let n,e=t[60]("list.view_cart")+"",i;return{c(){n=A("qds-standalone-link"),i=de(e),w(n,"class","snackbar-link svelte-19q1r6w"),w(n,"target","_blank"),w(n,"href",t[76](!0,!1)),w(n,"importance","subdued")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[1]&536870912&&e!==(e=r[60]("list.view_cart")+"")&&be(i,e)},d(r){r&&K(n)}}}function PY(t){let n,e=t[60]("list.view_cart")+"",i;return{c(){n=A("qds-standalone-link"),i=de(e),w(n,"class","snackbar-link svelte-19q1r6w"),w(n,"target","_blank"),w(n,"href",t[76](!0,!0)),w(n,"importance","subdued")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[1]&536870912&&e!==(e=r[60]("list.view_cart")+"")&&be(i,e)},d(r){r&&K(n)}}}function NY(t){let n,e=t[60]("cart.show_cart")+"",i;return{c(){n=A("qds-standalone-link"),i=de(e),w(n,"class","snackbar-link svelte-19q1r6w"),w(n,"target","_blank"),w(n,"href",t[76](!0,!1)),w(n,"importance","subdued")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[1]&536870912&&e!==(e=r[60]("cart.show_cart")+"")&&be(i,e)},d(r){r&&K(n)}}}function LY(t){let n,e=t[60]("cart.show_cart")+"",i;return{c(){n=A("qds-standalone-link"),i=de(e),w(n,"class","snackbar-link svelte-19q1r6w"),w(n,"target","_blank"),w(n,"href",t[76](!0,!0)),w(n,"importance","subdued")},m(r,o){J(r,n,o),v(n,i)},p(r,o){o[1]&536870912&&e!==(e=r[60]("cart.show_cart")+"")&&be(i,e)},d(r){r&&K(n)}}}function A7(t){let n,e;return{c(){n=A("se-snackbar"),w(n,"class","snack-bar-product snackbar-top-50 svelte-19q1r6w"),w(n,"open",t[50]),w(n,"duration",Cs),w(n,"type",mr),w(n,"message",e=t[60]("bom_manager.project_conversion_error"))},m(i,r){J(i,n,r)},p(i,r){r[1]&524288&&w(n,"open",i[50]),r[1]&536870912&&e!==(e=i[60]("bom_manager.project_conversion_error"))&&w(n,"message",e)},d(i){i&&K(n)}}}function O7(t){let n,e;return n=new JW({props:{language:t[4],country:t[5],apigeeToken:t[2],user:t[6]}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&16&&(o.language=i[4]),r[0]&32&&(o.country=i[5]),r[0]&4&&(o.apigeeToken=i[2]),r[0]&64&&(o.user=i[6]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function P7(t){let n,e,i={apigeeToken:t[2],token:t[62],language:t[4],country:t[5],businessunit:t[18],cartId:t[41],selectAndConfigBearerToken:t[12],countryentries:t[8],env:t[23],apigeeUrl:t[10],viteOcmCaseUrl:t[11],selectAndConfigUrl:t[13]};return n=new DW({props:i}),t[92](n),n.$on("gotoList",t[66]),n.$on("addToListFromUcCart",t[75]),n.$on("addToListFromUcCartPublic",t[69]),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){const s={};o[0]&4&&(s.apigeeToken=r[2]),o[2]&1&&(s.token=r[62]),o[0]&16&&(s.language=r[4]),o[0]&32&&(s.country=r[5]),o[0]&262144&&(s.businessunit=r[18]),o[1]&1024&&(s.cartId=r[41]),o[0]&4096&&(s.selectAndConfigBearerToken=r[12]),o[0]&256&&(s.countryentries=r[8]),o[0]&8388608&&(s.env=r[23]),o[0]&1024&&(s.apigeeUrl=r[10]),o[0]&2048&&(s.viteOcmCaseUrl=r[11]),o[0]&8192&&(s.selectAndConfigUrl=r[13]),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){t[92](null),qe(n,r)}}}function N7(t){let n,e;return{c(){var i;n=A("se-snackbar"),w(n,"open",e=(i=t[55])==null?void 0:i.length),w(n,"message",t[55]),w(n,"type",mr),w(n,"class","pw-snackbar-elem svelte-19q1r6w"),w(n,"icon","notification_ok_wired"),w(n,"duration",Cs),w(n,"id","snackbar-cart-error")},m(i,r){J(i,n,r)},p(i,r){var o;r[1]&16777216&&e!==(e=(o=i[55])==null?void 0:o.length)&&w(n,"open",e),r[1]&16777216&&w(n,"message",i[55])},d(i){i&&K(n)}}}function L7(t){let n;return{c(){n=A("se-snackbar"),w(n,"open",t[57]),w(n,"message",t[56]),w(n,"type",mr),w(n,"class","pw-snackbar-elem show-bottom svelte-19q1r6w"),w(n,"icon","notification_ok_wired"),w(n,"duration",Cs),w(n,"id","snackbar-cart-error")},m(e,i){J(e,n,i)},p(e,i){i[1]&67108864&&w(n,"open",e[57]),i[1]&33554432&&w(n,"message",e[56])},d(e){e&&K(n)}}}function jY(t){let n,e,i,r;const o=[gY,mY],s=[];function l(a,c){return a[61]===!0&&!a[42]?0:1}return n=l(t),e=s[n]=o[n](t),{c(){e.c(),i=wt()},m(a,c){s[n].m(a,c),J(a,i,c),r=!0},p(a,c){let u=n;n=l(a),n===u?s[n].p(a,c):(Je(),se(s[u],1,1,()=>{s[u]=null}),Qe(),e=s[n],e?e.p(a,c):(e=s[n]=o[n](a),e.c()),Q(e,1),e.m(i.parentNode,i))},i(a){r||(Q(e),r=!0)},o(a){se(e),r=!1},d(a){a&&K(i),s[n].d(a)}}}function j7(t){const n=window.location.pathname;let e=n==null?void 0:n.split(`/${t}/`)[1];return e=e==null?void 0:e.split("?")[0],e}function RY(t,n,e){let i,r,o,s=et,l=()=>(s(),s=us(fe,it=>e(77,o=it)),fe),a,c,u,d,f,p,m,g,h=et,_=()=>(h(),h=us(O,it=>e(62,g=it)),O),b;ye(t,Pp,it=>e(97,i=it)),ye(t,wr,it=>e(98,r=it)),ye(t,Ii,it=>e(59,a=it)),ye(t,Vt,it=>e(60,c=it)),ye(t,Ua,it=>e(99,u=it)),ye(t,an,it=>e(100,d=it)),ye(t,ti,it=>e(101,f=it)),ye(t,Pc,it=>e(42,p=it)),ye(t,Za,it=>e(61,m=it)),ye(t,Ya,it=>e(63,b=it)),t.$$.on_destroy.push(()=>s()),t.$$.on_destroy.push(()=>h());let{$$slots:y={},$$scope:k}=n,T,{currentApigeeToken:R}=n,{access_token:O=yt("")}=n;_();let{language:j}=n,{country:q}=n,{user:M=yt({})}=n,{availableservices:z}=n,{page:D}=n,{countryentries:P}=n,{showCartIcon:L}=n,{apigeeUrl:C}=n,{viteOcmCaseUrl:S}=n,{selectAndConfigBearerToken:I}=n,{selectAndConfigUrl:N}=n,{showProjectPlacard:E=!0}=n,{projectPage:B}=n,{channel:U}=n,{subchannel:H}=n,{languageChange:Z}=n,{businessunit:V}=n,{externalBomData:ne}=n,{mode:W}=n,{silent:re}=n,{platform:G}=n,{env:F}=n,{configuratorLandingUrl:X}=n,{eabProjectId:le}=n,{eabBackUrl:ue}=n,{pbRefreshProjData:ee}=n,{loadHMC:$}=n,{cpqUser:he}=n,{cpqEnabled:me=!1}=n,{projectListOptions:te}=n,{hmcVersion:oe}=n,{hmcWCUrl:ce}=n,{addToCartBtn:ge}=n,{isStandAlone:fe}=n;l();let{entryPoint:ae}=n,{showPublicPage:ie}=n,_e,Ie=T,we,pe,Se,Le,Re=!1,Ee,ke=`${q.toLowerCase()}`,Ce,Ne=new URLSearchParams(window.location.search),Pe=!1,Ve,ot,gt=!1,He=!1;const Be=zt();let Ye,Ue,rt,ze="",tt="",je=!1,nt=!1;Un(async()=>{ve.info("AuthenticatedUserWrapper mounted"),window.wcloaded=!1,window.pbWCLoaded=!1,ve.info("page name:",D),Ne.size>0&&!p&&(e(51,Ve=Ne.get(ds)),e(52,ot=Ne==null?void 0:Ne.get(Xf)),ot&&await vt(),gt&&Bt()),D===So&&$e(),D===qn&&mt(),ve.info("platform",G),ve.info("page=========>",D),ve.info("app is loaded");const it={isLoaded:!0,List:c("bom_manager.add_to_list"),Cart:c("generic.add_to_cart"),ImportList:c("list.import_list")},rn=new CustomEvent("WCLoaded",{detail:it});document.dispatchEvent(rn),Yn()&&(window.wcloaded=!0),D==="pesSilent"&&(ve.info("inside pesSilent condition"),window.pbWCLoaded=!0),zt()&&Lt()});function $e(){e(43,T=Promise.resolve().then(()=>OC))}function mt(){e(43,T=Promise.resolve().then(()=>Kte))}async function lt(it){var Fe;Za.update(()=>!1);const rn=Yn()?Kf.uc:Kf.pb,ct=String(ot)+Wp+Vb+cr,Pt={platform:Ne.get(ds)},Kt=await Em(ct,Pt),ln=(Fe=Kt==null?void 0:Kt[0])==null?void 0:Fe.bom;ln&&await Vi({bom:ln},it.id,"",f),Ar(`${rn[We.environment]}${jc}/${it.id}?${ds}=${it.platform}`)}async function vt(){var ct;const it=Ne==null?void 0:Ne.get(Xf),rn=String(it)+OP;try{const Pt=await QM(rn);yg.update(()=>Pt),((ct=Pt==null?void 0:Pt[0])==null?void 0:ct.platform)===Dn.EAB?await lt(Pt[0]):Za.update(()=>!0)}catch{Za.update(()=>!1),gt=!0}}async function Bt(){if(Be&&Ke()){const it=Ne==null?void 0:Ne.get(Xf),rn=String(it)+Wp,ct={platform:Ne.get(ds),isPB:!0};Em(rn,ct).then(Pt=>{var Kt;e(0,D=So),G===Dn.EAB?e(41,Ce=(Kt=yg[0])==null?void 0:Kt.projectId):e(41,Ce=String(Pt==null?void 0:Pt.id)),Ar(`${lr}${B}/${String(Ce)}${Ne.get(ds)?`?${ds}=${String(Ne.get(ds))}`:""}`),$e()}).catch(Pt=>{e(0,D=Sc),e(50,Pe=!0),e(49,Ne=new URLSearchParams(Te)),Ar(`${lr}${B}`)})}}function Ke(){return Ne.has(Xf)&&Ne.get(VP)===Wb}function pt(){Ar(`${lr}${String(Ie.externalLinks.orderEntry.cartPage)}`)}function bt(){_e||(e(38,_e={}),e(38,_e.externalLinks=Ac(),_e));const it=el(a)?`${lr}${String(Ie.externalLinks.orderEntry.cartPage)}`:`${lr}/${String(_e.externalLinks.myCart.cartPage)}`;ve.info("link",it),Ar(it)}function qt(it){var rn,ct,Pt,Kt,ln;if(it&&(it!=null&&it.detail))if(o)Ht(So,(rn=it.detail)==null?void 0:rn.projectId);else if(p)if(window.location.hostname===vA||window.location.hostname===wA||window.location.hostname===yA)Ht(qn,(ct=it.detail)==null?void 0:ct.listId);else{if(zt())_e||(e(38,_e={}),e(38,_e.externalLinks=Ac(),_e)),e(41,Ce=it.detail.listId),ve.info("link",`${lr}/${String(_e.externalLinks.myList.listsPage)}/${String(it.detail.listId)}${((Pt=it.detail)==null?void 0:Pt.listType)===va?"?listType=new":""}`),Ar(`${lr}/${String(_e.externalLinks.myList.listsPage)}/${String(it.detail.listId)}${((Kt=it.detail)==null?void 0:Kt.listType)===va?"?listType=new":""}`);else{const Fe=`${O1[F]}/${(q??"").toLowerCase()}/${j}/user/${zo}`;window.location.href=Fe}ve.info("page",D),e(0,D=qn)}else{const Fe=Ne.get(ds)?`?${ds}=${String(Ne.get(ds))}`:"";Ar(`${lr}${String(_e.externalLinks.projects.projectsPage)}/${String(it.detail.projectId)}${Fe} ${((ln=it.detail)==null?void 0:ln.projectType)===va?`${Fe?"&":"?"}projectType=new`:""}`)}}function Ht(it,rn){switch(it){case qn:mt();break;case So:$e();break}e(1,E=!1),e(0,D=it),e(41,Ce=rn)}function St(it){e(0,D=it),e(1,E=!1)}function Rt(it,rn){it&&it.preventDefault(),e(46,Le=!1),e(47,Re=!1),st(rn),clearTimeout(Ue)}function st(it){var Fe,Mt,un,kn;const rn=(Fe=it==null?void 0:it.detail)==null?void 0:Fe.projectId,ct=(Mt=it==null?void 0:it.detail)==null?void 0:Mt.action,Pt=(un=it==null?void 0:it.detail)==null?void 0:un.actionType;ve.info("projectPage",B);const Kt=Ne.get(ds)?`?${ds}=${String(Ne.get(ds))}`:"",ln=`${lr}${Yn()?"/":""}${B}/${rn}${Kt}${((kn=it.detail)==null?void 0:kn.projectType)===va?`${Kt?"&":"?"}projectType=new`:""}`;if(ve.info("navigateToBomUrl",ln),ct&&typeof ct===za&&Pt===ur.REDIRECT){const vn=ss(ur.REDIRECT_TO_PROJECT_DETAIL_PAGE,ct,String(r.platform),rn);dr(vn)}o&&Ht(So,rn),ve.info("navigateToBomUrl=",ln),p||Ar(ln)}function Lt(){cv.forEach(function(it){document.addEventListener(it,Sn)}),document.addEventListener($p,Gn),document.addEventListener(Qp,Zn),document.addEventListener(eh,oi)}document.addEventListener("addToListFromUcCartPublic",Xt);async function Xt(it){const rn=`${ke.toLowerCase()}${Zu}`;e(41,Ce=nl.getCookieValue(rn)),await ro(Ce).catch(ct=>{ve.error(ct.message)}),fn(it==null?void 0:it.detail),qt(it)}function fn(it){var Pt,Kt;const rn=(Pt=it==null?void 0:it.parts)==null?void 0:Pt.length,ct=(Kt=it==null?void 0:it.groups)==null?void 0:Kt.length;if(rn>0||ct>0){let ln=it;const Fe=d==null?void 0:d.bom,Mt=sp(ln==null?void 0:ln.parts,Fe==null?void 0:Fe.parts),un=L3(ln,Fe);let kn=[...Mt];kn=Mt==null?void 0:Mt.map(pi=>{var ls;return pi!=null&&pi.parts&&(pi.parts=(ls=pi.parts)==null?void 0:ls.map(zr=>({...zr,quantity:pi.quantity}))),{...pi}});let vn=Object.assign({},d);vn.bom||(vn.bom={}),vn.bom.parts=kn,vn.bom.groups=un.groups,delete vn.id;const Di=c("edit_list.list_products_successfully_added_message");Vi(vn,Ce,Di,f,!0).then(async pi=>{if(!(pi!=null&&pi.hasError)){const ls=mn(q,d),zr=gn(j,d);await ci(Ce,ls,zr,R,!0).then(function(ao){ve.info(ao)}).catch(function(ao){ve.error(ao)})}}).finally(()=>{ve.info("Project updated for with ID: ",Ce)})}}function Sn(it={}){var rn;ve.info("PB:Data received in standalone private journey:"+JSON.stringify(it)),e(44,pe=it),(rn=pe==null?void 0:pe.detail)!=null&&rn.country||e(44,pe.detail.country=q,pe),Ya.update(()=>!0)}function Zn(it){e(53,He=!1),ve.info("Private Journey UC:Data received on Add to list is ::",it),e(56,tt=""),e(57,je=!1),(lm(it)||{}).success?(e(46,Le=!1),ve.info("Private Journey UC:Data received on Add to list is ::",it),e(44,pe=it),e(54,Ye=!0),Ya.update(()=>!0)):(e(56,tt=c("validation_check.error_message_list")),e(57,je=!0))}async function Gn(it){if(e(47,Re=!1),ve.info("Private Journey UC:Data received on Add to cart ::",it),e(56,tt=""),e(57,je=!1),lm(it).success)if(el(a)){e(55,ze=""),e(58,nt=!0);let ct=await $n(it),Pt=(ct==null?void 0:ct.cartItems)||[];Bn(Nn.ADD_TO_CART,ct.analyticsObj,"","",!1,ae),Pt!=null&&Pt.length?await Ci(Pt):(e(58,nt=!1),e(55,ze=c("add_to_cart.no_product_to_add")))}else e(44,pe=it),e(54,Ye=!1),Ya.update(()=>!0);else e(58,nt=!1),e(56,tt=c("validation_check.error_message_cart")),e(57,je=!0);e(58,nt=!1)}function oi(){ve.info("Import list event fired"),e(53,He=!0),e(54,Ye=!1),Ya.update(()=>!0)}async function $n(it){var ln,Fe;const rn=it!=null&&it.detail?it.detail:it,ct=(rn==null?void 0:rn.payload)||(rn==null?void 0:rn.easyData)||{},Pt=(rn==null?void 0:rn.type)===Su.EASY?((Fe=(ln=ct==null?void 0:ct.easyData)==null?void 0:ln.bom)==null?void 0:Fe.products)||ct.bom.products:(rn==null?void 0:rn.products)||[];Yn()?mf("caller","UC"):mf("caller","");const Kt=await Promise.resolve(im(Pt,Qf));return ve.info("cartItems",Kt),{cartItems:Kt,analyticsObj:Pt}}async function Ci(it){await uY(u).then(async ct=>{await Xe(ct,it)})}async function Xe(it,rn){it!=null&&it.quoteOrderDisplayBean?await at(it,rn):(e(55,ze=c("add_to_cart.failed_to_fetch_cart_detail")),e(58,nt=!1))}async function at(it,rn){rt={allCartInfo:it,requestData:rn,cartData:it.quoteOrderDisplayBean.lineItemList.filter(Kt=>Kt.catalogNumber),orderNumber:String(it.orderNumber)};const ct=await B_(rt);let Pt={orderNumber:String(rt.orderNumber)};await Ze(Pt,ct,rn)}async function Ze(it,rn,ct=[]){let Pt=u;await fY(Pt,it).then(async Kt=>{if(Kt&&Kt!=Hi)await f7(rn,Pt).then(ln=>{kt(ln,rn,ct)});else{const ln=Uw(rn);ln.flag?await f7(rn,ln).then(Fe=>{kt(Fe,rn,ct)}):(e(55,ze=c("add_to_cart.failed_to_clear_product")),e(58,nt=!1))}}),e(58,nt=!1)}function kt(it,rn,ct){if(it===y1){Bn(Nn.ADD_TO_CART,ct,"","",!1,ae),e(58,nt=!1),zn();const Pt=rn.reduce((Kt,ln)=>{const{isGCR:Fe,description:Mt,...un}=ln;return Kt.push(un),Kt},[]);dr({action:og,bom:Pt,cartId:String(sessionStorage.getItem("myse_cartId")),platform:Fo})}else e(55,ze=c("add_to_cart.failed_to_add_product")),e(58,nt=!1)}function nn(it){e(48,Ee=it),e(45,Se=!0)}function Ft(it){e(48,Ee=it),e(46,Le=!0),Ue=setTimeout(()=>{e(46,Le=!1)},6e3)}function Zt(it){e(48,Ee=it),el(a)||zn()}function zn(){e(47,Re=!0),Ue=setTimeout(()=>{e(47,Re=!1)},6e3)}function Rn(){Ar(`${lr}${String(we.externalLinks.configurators.configuratorPage)}`)}function jn(){if(o)St(Sc);else{const it=Ne.get(ds)?`?${ds}=${String(Ne.get(ds))}`:"";Ar(`${lr}${String(we.externalLinks.projects.projectsPage)}${it}`)}}document.addEventListener("IAC-ANALYTICS-EVENT",it=>{var ct,Pt;const rn=ss((ct=it==null?void 0:it.detail)==null?void 0:ct.eventName.toLowerCase(),(Pt=it==null?void 0:it.detail)==null?void 0:Pt.configuratorName,String(r.platform));dr(rn)}),Kn(()=>{e(45,Se=!1),e(50,Pe=!1),Xi.set(Li),yn(),clearTimeout(Ue),window.iswcloaded=!1,window.pbWCLoaded=!1});function yn(){e(46,Le=!1),e(46,Le=!1),Ya.update(()=>!1),cv.forEach(function(it){document.removeEventListener(it,Sn)}),document.removeEventListener($p,Gn),document.removeEventListener(Qp,Zn),document.removeEventListener(eh,oi)}function sn(it){var rn;it&&(it!=null&&it.detail)&&jt(Pp,i=(rn=it.detail)==null?void 0:rn.bom,i)}function dt(it=!1,rn=!1){var Kt;let ct="";const Pt=Kf.uc[We.environment];if(it)ct=`${Pt}/${rn?"cart":"my-cart"}`;else{const ln=(Kt=Ee==null?void 0:Ee.detail)==null?void 0:Kt.projectId;ln&&(ct=`${Pt}/my-list/${String(ln)}`)}return ve.info("redirectURI",ct),ct}function $t(it){D=it,e(0,D)}function dn(it){Pe=it,e(50,Pe)}function On(it){_t[it?"unshift":"push"](()=>{_e=it,e(38,_e)})}function ri(it){_t[it?"unshift":"push"](()=>{_e=it,e(38,_e)})}function ht(it){_t[it?"unshift":"push"](()=>{Ie=it,e(39,Ie)})}function Yt(it){_t[it?"unshift":"push"](()=>{Ie=it,e(39,Ie)})}function Tn(it){ko.call(this,t,it)}function Xn(it){_t[it?"unshift":"push"](()=>{we=it,e(40,we)})}const wi=()=>Rt(event,Ee),bn=()=>{Rt(null,Ee)},_n=()=>{e(46,Le=!1)},di=()=>{Rt(null,Ee)},Gi=()=>{e(47,Re=!1)};function Ur(it){_t[it?"unshift":"push"](()=>{Ie=it,e(39,Ie)})}return t.$$set=it=>{"currentApigeeToken"in it&&e(2,R=it.currentApigeeToken),"access_token"in it&&_(e(3,O=it.access_token)),"language"in it&&e(4,j=it.language),"country"in it&&e(5,q=it.country),"user"in it&&e(6,M=it.user),"availableservices"in it&&e(7,z=it.availableservices),"page"in it&&e(0,D=it.page),"countryentries"in it&&e(8,P=it.countryentries),"showCartIcon"in it&&e(9,L=it.showCartIcon),"apigeeUrl"in it&&e(10,C=it.apigeeUrl),"viteOcmCaseUrl"in it&&e(11,S=it.viteOcmCaseUrl),"selectAndConfigBearerToken"in it&&e(12,I=it.selectAndConfigBearerToken),"selectAndConfigUrl"in it&&e(13,N=it.selectAndConfigUrl),"showProjectPlacard"in it&&e(1,E=it.showProjectPlacard),"projectPage"in it&&e(14,B=it.projectPage),"channel"in it&&e(15,U=it.channel),"subchannel"in it&&e(16,H=it.subchannel),"languageChange"in it&&e(17,Z=it.languageChange),"businessunit"in it&&e(18,V=it.businessunit),"externalBomData"in it&&e(19,ne=it.externalBomData),"mode"in it&&e(20,W=it.mode),"silent"in it&&e(21,re=it.silent),"platform"in it&&e(22,G=it.platform),"env"in it&&e(23,F=it.env),"configuratorLandingUrl"in it&&e(24,X=it.configuratorLandingUrl),"eabProjectId"in it&&e(25,le=it.eabProjectId),"eabBackUrl"in it&&e(26,ue=it.eabBackUrl),"pbRefreshProjData"in it&&e(27,ee=it.pbRefreshProjData),"loadHMC"in it&&e(28,$=it.loadHMC),"cpqUser"in it&&e(29,he=it.cpqUser),"cpqEnabled"in it&&e(30,me=it.cpqEnabled),"projectListOptions"in it&&e(31,te=it.projectListOptions),"hmcVersion"in it&&e(32,oe=it.hmcVersion),"hmcWCUrl"in it&&e(33,ce=it.hmcWCUrl),"addToCartBtn"in it&&e(34,ge=it.addToCartBtn),"isStandAlone"in it&&l(e(35,fe=it.isStandAlone)),"entryPoint"in it&&e(36,ae=it.entryPoint),"showPublicPage"in it&&e(37,ie=it.showPublicPage),"$$scope"in it&&e(93,k=it.$$scope)},t.$$.update=()=>{t.$$.dirty[1]&512&&we&&e(40,we.externalLinks=Ac(),we),t.$$.dirty[1]&128&&_e&&e(38,_e.externalLinks=Ac(),_e),t.$$.dirty[1]&256&&Ie&&e(39,Ie.externalLinks=Ac(),Ie),t.$$.dirty[0]&1|t.$$.dirty[1]&1024|t.$$.dirty[2]&32768&&D===So&&!o&&(Ce||e(41,Ce=Be?j7(Sc):localStorage.getItem(ke))),t.$$.dirty[0]&1|t.$$.dirty[1]&3072|t.$$.dirty[2]&32768&&D===qn&&!o&&p&&(Ce||e(41,Ce=Be?j7(zo):nl.getCookieValue(`${ke.toLowerCase()}${Zu}`)))},[D,E,R,O,j,q,M,z,P,L,C,S,I,N,B,U,H,Z,V,ne,W,re,G,F,X,le,ue,ee,$,he,me,te,oe,ce,ge,fe,ae,ie,_e,Ie,we,Ce,p,T,pe,Se,Le,Re,Ee,Ne,Pe,Ve,ot,He,Ye,ze,tt,je,nt,a,c,m,g,b,pt,bt,qt,Rt,st,Xt,nn,Ft,Zt,Rn,jn,sn,dt,o,y,$t,dn,On,ri,ht,Yt,Tn,Xn,wi,bn,_n,di,Gi,Ur,k]}class MY extends Ot{constructor(n){super(),At(this,n,RY,jY,It,{currentApigeeToken:2,access_token:3,language:4,country:5,user:6,availableservices:7,page:0,countryentries:8,showCartIcon:9,apigeeUrl:10,viteOcmCaseUrl:11,selectAndConfigBearerToken:12,selectAndConfigUrl:13,showProjectPlacard:1,projectPage:14,channel:15,subchannel:16,languageChange:17,businessunit:18,externalBomData:19,mode:20,silent:21,platform:22,env:23,configuratorLandingUrl:24,eabProjectId:25,eabBackUrl:26,pbRefreshProjData:27,loadHMC:28,cpqUser:29,cpqEnabled:30,projectListOptions:31,hmcVersion:32,hmcWCUrl:33,addToCartBtn:34,isStandAlone:35,entryPoint:36,showPublicPage:37},dY,[-1,-1,-1,-1,-1])}}const qY=t=>({}),R7=t=>({slot:"surveyBtn"});function M7(t){let n,e;return n=new K_({props:{page:t[8]}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[0]&256&&(o.page=i[8]),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function DY(t){let n,e,i,r,o,s=!t[41]&&t[39]&&t[20]!="true"&&q7(t);return{c(){n=A("se-loading"),i=Y(),s&&s.c(),r=wt(),w(n,"loading",e=t[41]||!t[39]),w(n,"overlay","true"),w(n,"full-page","false")},m(l,a){J(l,n,a),J(l,i,a),s&&s.m(l,a),J(l,r,a),o=!0},p(l,a){(!o||a[1]&1280&&e!==(e=l[41]||!l[39]))&&w(n,"loading",e),!l[41]&&l[39]&&l[20]!="true"?s?(s.p(l,a),a[0]&1048576|a[1]&1280&&Q(s,1)):(s=q7(l),s.c(),Q(s,1),s.m(r.parentNode,r)):s&&(Je(),se(s,1,1,()=>{s=null}),Qe())},i(l){o||(Q(s),o=!0)},o(l){se(s),o=!1},d(l){l&&(K(n),K(i),K(r)),s&&s.d(l)}}}function BY(t){let n,e,i={currentApigeeToken:t[38],availableservices:t[7],access_token:t[2],language:t[4],country:t[5],user:t[6],page:t[8],countryentries:t[9],showCartIcon:t[10],apigeeUrl:t[40],viteOcmCaseUrl:t[11],selectAndConfigBearerToken:t[12],selectAndConfigUrl:t[13],showProjectPlacard:t[14],projectPage:t[36],channel:t[15],subchannel:t[16],languageChange:t[3],businessunit:t[17],externalBomData:t[18],mode:t[19],silent:t[20],platform:t[0],env:t[1],configuratorLandingUrl:t[21],eabProjectId:t[22],eabBackUrl:t[23],pbRefreshProjData:t[24],hmcVersion:t[25],hmcWCUrl:t[30],cpqUser:t[26],cpqEnabled:t[27],loadHMC:t[28],projectListOptions:t[29],isStandAlone:t[32],addToCartBtn:t[31],entryPoint:t[33],showPublicPage:t[34],$$slots:{surveyBtn:[UY]},$$scope:{ctx:t}};return n=new MY({props:i}),t[50](n),n.$on("gotoUCCartPublic",t[51]),n.$on("addToListFromUcCartPublic",t[52]),{c(){De(n.$$.fragment)},m(r,o){Me(n,r,o),e=!0},p(r,o){const s={};o[1]&128&&(s.currentApigeeToken=r[38]),o[0]&128&&(s.availableservices=r[7]),o[0]&4&&(s.access_token=r[2]),o[0]&16&&(s.language=r[4]),o[0]&32&&(s.country=r[5]),o[0]&64&&(s.user=r[6]),o[0]&256&&(s.page=r[8]),o[0]&512&&(s.countryentries=r[9]),o[0]&1024&&(s.showCartIcon=r[10]),o[1]&512&&(s.apigeeUrl=r[40]),o[0]&2048&&(s.viteOcmCaseUrl=r[11]),o[0]&4096&&(s.selectAndConfigBearerToken=r[12]),o[0]&8192&&(s.selectAndConfigUrl=r[13]),o[0]&16384&&(s.showProjectPlacard=r[14]),o[1]&32&&(s.projectPage=r[36]),o[0]&32768&&(s.channel=r[15]),o[0]&65536&&(s.subchannel=r[16]),o[0]&8&&(s.languageChange=r[3]),o[0]&131072&&(s.businessunit=r[17]),o[0]&262144&&(s.externalBomData=r[18]),o[0]&524288&&(s.mode=r[19]),o[0]&1048576&&(s.silent=r[20]),o[0]&1&&(s.platform=r[0]),o[0]&2&&(s.env=r[1]),o[0]&2097152&&(s.configuratorLandingUrl=r[21]),o[0]&4194304&&(s.eabProjectId=r[22]),o[0]&8388608&&(s.eabBackUrl=r[23]),o[0]&16777216&&(s.pbRefreshProjData=r[24]),o[0]&33554432&&(s.hmcVersion=r[25]),o[0]&1073741824&&(s.hmcWCUrl=r[30]),o[0]&67108864&&(s.cpqUser=r[26]),o[0]&134217728&&(s.cpqEnabled=r[27]),o[0]&268435456&&(s.loadHMC=r[28]),o[0]&536870912&&(s.projectListOptions=r[29]),o[1]&2&&(s.isStandAlone=r[32]),o[1]&1&&(s.addToCartBtn=r[31]),o[1]&4&&(s.entryPoint=r[33]),o[1]&8&&(s.showPublicPage=r[34]),o[1]&4194304&&(s.$$scope={dirty:o,ctx:r}),n.$set(s)},i(r){e||(Q(n.$$.fragment,r),e=!0)},o(r){se(n.$$.fragment,r),e=!1},d(r){t[50](null),qe(n,r)}}}function q7(t){let n,e;return n=new MA({props:{message:t[42]("workspace_homepage.server_not_responding")}}),{c(){De(n.$$.fragment)},m(i,r){Me(n,i,r),e=!0},p(i,r){const o={};r[1]&2048&&(o.message=i[42]("workspace_homepage.server_not_responding")),n.$set(o)},i(i){e||(Q(n.$$.fragment,i),e=!0)},o(i){se(n.$$.fragment,i),e=!1},d(i){qe(n,i)}}}function UY(t){let n;const e=t[49].surveyBtn,i=fl(e,t,t[53],R7);return{c(){i&&i.c()},m(r,o){i&&i.m(r,o),n=!0},p(r,o){i&&i.p&&(!n||o[1]&4194304)&&pl(i,e,r,r[53],n?dl(e,r[53],o,qY):hl(r[53]),R7)},i(r){n||(Q(i,r),n=!0)},o(r){se(i,r),n=!1},d(r){i&&i.d(r)}}}function zY(t){let n=t[37]&&Yn()&&t[20]=="false"&&t[8]!==gu&&!t[38],e,i,r,o,s,l=n&&M7(t);const a=[BY,DY],c=[];function u(d,f){return d[38]&&d[39]?0:1}return i=u(t),r=c[i]=a[i](t),{c(){l&&l.c(),e=Y(),r.c(),o=wt()},m(d,f){l&&l.m(d,f),J(d,e,f),c[i].m(d,f),J(d,o,f),s=!0},p(d,f){f[0]&1048832|f[1]&192&&(n=d[37]&&Yn()&&d[20]=="false"&&d[8]!==gu&&!d[38]),n?l?(l.p(d,f),f[0]&1048832|f[1]&192&&Q(l,1)):(l=M7(d),l.c(),Q(l,1),l.m(e.parentNode,e)):l&&(Je(),se(l,1,1,()=>{l=null}),Qe());let p=i;i=u(d),i===p?c[i].p(d,f):(Je(),se(c[p],1,1,()=>{c[p]=null}),Qe(),r=c[i],r?r.p(d,f):(r=c[i]=a[i](d),r.c()),Q(r,1),r.m(o.parentNode,o))},i(d){s||(Q(l),Q(r),s=!0)},o(d){se(l),se(r),s=!1},d(d){d&&(K(e),K(o)),l&&l.d(d),c[i].d(d)}}}function FY(t,n){let e=new CustomEvent(t,{detail:n});window.dispatchEvent(e)}function xY(t,n,e){let i,r=et,o=()=>(r(),r=us(h,Pe=>e(48,i=Pe)),h),s,l,a,c,u,d,f,p;ye(t,Hu,Pe=>e(38,s=Pe)),ye(t,an,Pe=>e(58,l=Pe)),ye(t,X0,Pe=>e(59,a=Pe)),ye(t,Z0,Pe=>e(60,c=Pe)),ye(t,K0,Pe=>e(39,u=Pe)),ye(t,ch,Pe=>e(40,d=Pe)),ye(t,Jt,Pe=>e(41,f=Pe)),ye(t,Vt,Pe=>e(42,p=Pe)),t.$$.on_destroy.push(()=>r());let{$$slots:m={},$$scope:g}=n,{access_token:h=yt("")}=n;o();let{languageChange:_}=n,{language:b}=n,{country:y}=n,{user:k=yt({})}=n,{availableservices:T}=n,{page:R}=n,{countryentries:O}=n,{showCartIcon:j}=n,{viteOcmCaseUrl:q}=n,{selectAndConfigBearerToken:M}=n,{selectAndConfigUrl:z}=n,{showProjectPlacard:D=!0}=n,{channel:P}=n,{subchannel:L}=n,{businessunit:C}=n,{externalBomData:S={}}=n,{mode:I}=n,{platform:N}=n,{silent:E}=n,{env:B}=n,{configuratorLandingUrl:U}=n,{eabProjectId:H}=n,{eabBackUrl:Z}=n,{pbRefreshProjData:V}=n,{hmcVersion:ne}=n,{cpqUser:W}=n,{cpqEnabled:re=!1}=n,{loadHMC:G="true"}=n,{projectListOptions:F}=n,{hmcWCUrl:X}=n,{addToCartBtn:le}=n,{isStandAlone:ue}=n,{entryPoint:ee}=n,{isinternal:$=!1}=n,{isPunchout:he=!1}=n,{defaultpurchaser:me}=n,{temporaryPurchaser:te}=n,{showPublicPage:oe}=n,ce=k,ge,fe,ae,ie=!0;Un(async()=>{var Pe,Ve;if(ve.info("ProjectWrapper mounted"),(Ve=(Pe=window==null?void 0:window.location)==null?void 0:Pe.href)!=null&&Ve.includes("projectType=new")||an.set(Hi),Cc[B==null?void 0:B.toUpperCase()]||e(1,B=Cc.QA),we(),s||await Ie(),Ee(),zt()&&(pe(),Re()),!u&&!zt()){const ot=`${b}_${y}`;ve.info("localeInfo",ot),Le(ot)}});const _e=Pe=>{var ot;ve.info("Token: access token change event caught in PB at "+sc()),ve.info("Token: token refresh event data in PB at : "+sc()+" "+JSON.stringify(Pe==null?void 0:Pe.detail)),ve.info("Token: current token value in PB at : "+sc()+" "+i),h.set((ot=Pe==null?void 0:Pe.detail)==null?void 0:ot.token),ve.info("Token: New access token set in PB at "+sc()+" : "+i);const Ve=[];Ve.push(Gd(),Im()),Promise.all(Ve).then(gt=>{var He,Be,Ye,Ue,rt;Hu.set((He=gt[0])==null?void 0:He.token),ch.set((Be=gt[0])==null?void 0:Be.bslEndPoint),bg.set((Ye=gt[0])==null?void 0:Ye.hmcPublicToken),Wu.set((Ue=gt[0])==null?void 0:Ue.downloadFileURL),Vu.set((rt=gt[0])==null?void 0:rt.selectAndConfigToken),we(),ve.info("Token: New apigee token set in PB at "+sc()+" : "+s),e(37,ie=!1)}).catch(gt=>{ve.info("Token: error while getting apigee token",gt),Jt.set(!1)}),document.dispatchEvent(new CustomEvent("getNewAccessToken",{bubbles:!0,detail:{accessToken:i}})),document.dispatchEvent(new CustomEvent("getNewApigeeToken",{bubbles:!0,detail:{apigeeToken:s,apigeeUrl:d}})),ve.info("Token: New access and apigee sent in event after refresh at : "+sc()+" "+JSON.stringify({accessToken:i,apigeeToken:s,apigeeUrl:d}))};document.addEventListener("evtAccessTokenRefresh",_e);async function Ie(){const Pe=[];Pe.push(Gd(),Im()),Promise.all(Pe).then(Ve=>{var ot;if(Nm(Ve[0]),e(0,N=(ot=Ve[1])==null?void 0:ot.platform),!u){const gt=`${b}_${y}`;ve.info("localeInfo",gt),Le(gt)}we(),e(37,ie=!1)}).catch(Ve=>{ve.info("error while getting apigee token",Ve),Jt.set(!1)})}function we(){const Pe=d_(P,L);We.bootstrap(We.environment||B,i,s,b,y,Pe)}function pe(){_.subscribe(Pe=>{if(Pe!==void 0){if(ve.info("wbs language ==>",b,Pe,c,u),ve.info("wbs country ==>",y,a),c!==Pe||a!==y){Z0.set(Pe),X0.set(y);const Ve=`${Pe}_${y}`;Le(Ve),We.bootstrap(We.environment||B,i,s,Pe,y),Se().catch(ot=>{ve.error(ot)})}}else ve.info("language is undefined")})}async function Se(){var Pe,Ve;if(Object.keys(l).length>0){const ot=(Pe=l==null?void 0:l.ownerInfo)!=null&&Pe.country?String(l.ownerInfo.country):String(y),gt=(Ve=l==null?void 0:l.ownerInfo)!=null&&Ve.language?String(l.ownerInfo.language):String(We.language);await ci(String(l==null?void 0:l.id),ot,gt,We.apigeeToken)}}function Le(Pe){rq({withLocale:Pe}).then(()=>{ve.info("Language and country received: ",b,y)}).catch(Ve=>{ve.error("Translation Error",Ve)})}function Re(){return T.includes(aA.PROJECT_WORK_SPACE)}function Ee(){h.subscribe(Pe=>{ce.access_token!==Pe&&(We.bootstrap(We.environment||B,Pe,s,b,y),Yn()||FY(cA.GET_NEW_ACCES_TOKEN,Pe))})}Kn(()=>{document.removeEventListener("evtAccessTokenRefresh",_e)});function ke(Pe){_t[Pe?"unshift":"push"](()=>{ge=Pe,e(35,ge),e(36,fe)})}function Ce(Pe){ko.call(this,t,Pe)}function Ne(Pe){ko.call(this,t,Pe)}return t.$$set=Pe=>{"access_token"in Pe&&o(e(2,h=Pe.access_token)),"languageChange"in Pe&&e(3,_=Pe.languageChange),"language"in Pe&&e(4,b=Pe.language),"country"in Pe&&e(5,y=Pe.country),"user"in Pe&&e(6,k=Pe.user),"availableservices"in Pe&&e(7,T=Pe.availableservices),"page"in Pe&&e(8,R=Pe.page),"countryentries"in Pe&&e(9,O=Pe.countryentries),"showCartIcon"in Pe&&e(10,j=Pe.showCartIcon),"viteOcmCaseUrl"in Pe&&e(11,q=Pe.viteOcmCaseUrl),"selectAndConfigBearerToken"in Pe&&e(12,M=Pe.selectAndConfigBearerToken),"selectAndConfigUrl"in Pe&&e(13,z=Pe.selectAndConfigUrl),"showProjectPlacard"in Pe&&e(14,D=Pe.showProjectPlacard),"channel"in Pe&&e(15,P=Pe.channel),"subchannel"in Pe&&e(16,L=Pe.subchannel),"businessunit"in Pe&&e(17,C=Pe.businessunit),"externalBomData"in Pe&&e(18,S=Pe.externalBomData),"mode"in Pe&&e(19,I=Pe.mode),"platform"in Pe&&e(0,N=Pe.platform),"silent"in Pe&&e(20,E=Pe.silent),"env"in Pe&&e(1,B=Pe.env),"configuratorLandingUrl"in Pe&&e(21,U=Pe.configuratorLandingUrl),"eabProjectId"in Pe&&e(22,H=Pe.eabProjectId),"eabBackUrl"in Pe&&e(23,Z=Pe.eabBackUrl),"pbRefreshProjData"in Pe&&e(24,V=Pe.pbRefreshProjData),"hmcVersion"in Pe&&e(25,ne=Pe.hmcVersion),"cpqUser"in Pe&&e(26,W=Pe.cpqUser),"cpqEnabled"in Pe&&e(27,re=Pe.cpqEnabled),"loadHMC"in Pe&&e(28,G=Pe.loadHMC),"projectListOptions"in Pe&&e(29,F=Pe.projectListOptions),"hmcWCUrl"in Pe&&e(30,X=Pe.hmcWCUrl),"addToCartBtn"in Pe&&e(31,le=Pe.addToCartBtn),"isStandAlone"in Pe&&e(32,ue=Pe.isStandAlone),"entryPoint"in Pe&&e(33,ee=Pe.entryPoint),"isinternal"in Pe&&e(43,$=Pe.isinternal),"isPunchout"in Pe&&e(44,he=Pe.isPunchout),"defaultpurchaser"in Pe&&e(45,me=Pe.defaultpurchaser),"temporaryPurchaser"in Pe&&e(46,te=Pe.temporaryPurchaser),"showPublicPage"in Pe&&e(34,oe=Pe.showPublicPage),"$$scope"in Pe&&e(53,g=Pe.$$scope)},t.$$.update=()=>{if(t.$$.dirty[1]&48&&ge&&(e(35,ge.externalLinks=Ac(),ge),ve.info("PB::UC authenticatedUserWrapper externalLinks",ge),e(36,fe=Yn()?ge.externalLinks.myList.listsPage:ge.externalLinks.projects.projectsPage),ve.info("Auth Page==>",fe)),t.$$.dirty[1]&65536,t.$$.dirty[0]&132304|t.$$.dirty[1]&192512&&zt()&&T!=null&&T.length&&T.includes(Ip)&&j){const Pe={isOrderEntry:!1,language:b,token:i,showCartIcon:j,availableservices:T,user:k,isinternal:$,isPunchout:he,defaultpurchaser:me,temporaryPurchaser:te,mysebusinessunit:C};Ua.update(()=>Pe)}},[N,B,h,_,b,y,k,T,R,O,j,q,M,z,D,P,L,C,S,I,E,U,H,Z,V,ne,W,re,G,F,X,le,ue,ee,oe,ge,fe,ie,s,u,d,f,p,$,he,me,te,ae,i,m,ke,Ce,Ne,g]}class u1 extends Ot{constructor(n){super(),At(this,n,xY,zY,It,{access_token:2,languageChange:3,language:4,country:5,user:6,availableservices:7,page:8,countryentries:9,showCartIcon:10,viteOcmCaseUrl:11,selectAndConfigBearerToken:12,selectAndConfigUrl:13,showProjectPlacard:14,channel:15,subchannel:16,businessunit:17,externalBomData:18,mode:19,platform:0,silent:20,env:1,configuratorLandingUrl:21,eabProjectId:22,eabBackUrl:23,pbRefreshProjData:24,hmcVersion:25,cpqUser:26,cpqEnabled:27,loadHMC:28,projectListOptions:29,hmcWCUrl:30,addToCartBtn:31,isStandAlone:32,entryPoint:33,isinternal:43,isPunchout:44,defaultpurchaser:45,temporaryPurchaser:46,showPublicPage:34},null,[-1,-1,-1])}}const bie="";function GY(t){Ut(t,"svelte-1jef2sc",".main.svelte-1jef2sc{display:flex;align-items:center;justify-content:center;flex-direction:column}")}function HY(t){let n,e,i,r,o,s,l,a,c,u,d,f,p,m,g;return{c(){n=A("div"),e=A("h1"),e.textContent="Login Page",i=Y(),r=A("div"),o=A("se-form-field"),s=A("qds-input"),a=Y(),c=A("se-form-field"),u=A("qds-input"),f=Y(),p=A("qds-button"),w(s,"type","text"),w(s,"id","username"),w(s,"value",l=t[0].username),w(o,"block",""),w(o,"label","Username"),w(o,"required","true"),w(u,"type","text"),w(u,"id","access-token"),w(u,"value",d=t[0].access_token),w(c,"block",""),w(c,"label","Access Token"),w(c,"required","true"),x(r,"class","user-details"),w(p,"text","Submit"),w(p,"importance","emphasized"),x(n,"class","main svelte-1jef2sc")},m(h,_){J(h,n,_),v(n,e),v(n,i),v(n,r),v(r,o),v(o,s),v(r,a),v(r,c),v(c,u),v(n,f),v(n,p),m||(g=xe(p,"click",t[2]),m=!0)},p(h,[_]){_&1&&l!==(l=h[0].username)&&w(s,"value",l),_&1&&d!==(d=h[0].access_token)&&w(u,"value",d)},i:et,o:et,d(h){h&&K(n),m=!1,g()}}}function WY(t,n,e){let i;ye(t,PA,a=>e(0,i=a));const r=Mn(),o=[{countryentries:{id:"fr_FR",country:"FR",languagelabel:"Francais",marketoFormURL:null,allowedlocales:["fr","fr_FR"],searchpath:"/fr/fr/",apcsearchpath:null,supportlink:null,faqdetaillanguage:"fr",leadtimecalculator:"/productleadtime",faqadvancedcontentid:null,bslcountry:null,bslLocale:null,casecategorylanguage:null,countryLanguageMapTranslationextendedId:"fr_FR",countryLanguageMapTranslationbaseId:"en_BASE",countryLanguageMapTranslationbase2Id:"fr_BASE",countryLanguageMapMyseconfigId:"fr",productselectorconfig:{language:"FR",isocountry:"FRA"},rewardsadmin:null,direction:"ltr",contentlanguage:"fr_fr",hidePrivacyNotice:!1,activateMultiChannel:!0,myseitbenabled:!0,createdAt:"2020-09-16T11:28:42.588Z",updatedAt:"2020-10-24T17:11:51.479Z",__typename:"CountryLanguageMap",myseconfig:{id:"fr",country:"FR",channel:null,prod:{bu:"MySEFR",path:"https://www.mysefr.schneider-electric.com/",pricefield:"unitNetPrice",displayReturnsDateFilter:!1,timeDifferenceWithUTC:"1",pathToReturnsApp:"https://partner.schneider-electric.com/partners/Menu/P_FR_EP_RetoursProduits_V2?externalApp=mySchneiderWeb",returnDateField:"returnDate",displayReturnsReason:!1,disableReturnsCTA:!0,useRelayURLtoPrint:!1,invoicetransactiontypeswitch:!1,contractstatusattribute:null,displayprojectreferencenumber:!1,displaycontractenddate:!1,displayordermodification:!1,orderrecordscol3:"totalAmount",ispaenabled:!1,pnasingle:!0},sandbox:{bu:"MySEFR2",path:"https://mysefr2.btsec.dev.schneider-electric.com/",pricefield:"unitNetPrice",displayReturnsDateFilter:!1,timeDifferenceWithUTC:"1",pathToReturnsApp:"https://uatbfo19-secommunities.cs17.force.com/partners/Menu/P_FR_EP_RetoursProduits_V2?externalApp=mySchneiderWeb",returnDateField:"returnDate",displayReturnsReason:!1,disableReturnsCTA:!0,useRelayURLtoPrint:!1,invoicetransactiontypeswitch:!1,contractstatusattribute:null,displayprojectreferencenumber:!1,displaycontractenddate:!1,displayordermodification:!1,orderrecordscol3:"totalAmount",ispaenabled:!1,pnasingle:!0},isActivated:!0,createdAt:"2020-09-19T07:18:30.130Z",updatedAt:"2020-09-19T07:18:30.130Z",__typename:"MySEConfig"},translationbase:{id:"en_BASE"},translationbase2:{id:"fr_BASE"},translationextended:{id:"fr_FR"}},channel:"SI2",subChannel:"SI2",country:"FR",language:"fr",availableservices:["Products","DocumentDownloadCenter","ImageLibrary","ProductSubstitution","CompetitorProductTool","ProductSelector","Configurators","PLCConfigurators","MCCConfigurators","TrainingsV3","Chat","OCMAccountInfo","OCM-Enrollment","OCM-CategorySelector","WebCallback","Phone","FAQ","FAQ-Advanced","ContactSupport-Light","MarketoNewsletter","ProjectWorkspace","HelpMeChoose","Exchange","MedalliaSurvey","Favorites-Products","ProductEOL","productFirmware","ProductSafetyandQuality","softwareLicenseExpiryNotification","SoftwareReleaseNotifications","CyberSecurityNotifications","Quicklinks","SearchCOSE","SearchCOSEv2","SearchCoseV2BU","unified","unifiedAllResults","unifiedBanners","ProgramsV3","Rewards","OCM","IBLite","SDLContent","PriceAndAvailability","Orders","MySEOrdersOverview","myseMaxLeadTime","Order-Entry-V2","DraftOrders","SPAs","Invoices","Returns","DeliveryNote","ServiceSelector","ServiceSelectorEcoXpert","QuotesCPQ","OverviewAdminService"],useremail:"se_france_qa@yopmail.com"},{channel:"SI2",subChannel:"SI2",country:"DE",language:"de",useremail:"se_germany_qa@yopmail.com",availableservices:["Products","ProductDatasheet","DocumentDownloadCenter","MassDownload","ImageLibrary","ProductSubstitution","CompetitorProductTool","ProductSelector","Configurators","PLCConfigurators","MCCConfigurators","VSTConfigurators","TrainingsV3","Chat","Phone","FAQ","FAQ-Advanced","ContactSupport-Light","HighlightedTools","MarketoNewsletter","ProjectWorkspace","HelpMeChoose","Exchange","MedalliaSurvey","Favorites-Products","ProductEOL","productFirmware","ProductSafetyandQuality","softwareLicenseExpiryNotification","SoftwareReleaseNotifications","CyberSecurityNotifications","Quicklinks","TrainingsSearch","MySEQuotesSearch","SearchCOSE","SearchCOSEv2","SearchCoseV2BU","SearchCOSEFAQ","MySEQuotesListSearch","ProgramsV3","Rewards","RewardsNonSalesActivities","Opportunities","IBLite","SDLContent","PriceAndAvailability","PricingTools","Orders","MySEOrdersOverview","myseMaxLeadTime","Order-Entry-V2","DraftOrders","SPAs","Invoices","FinancialCredit","Returns","DraftReturns","DeliveryNote","QuotesMySE","MySEQuotesOverview","DraftQuotes","CPQQuotesRegistration","OverviewAdminService"],countryentries:[{id:"en_DE",country:"DE",languagelabel:"English",marketoFormURL:"https://go.schneider-electric.com/WW_202108_Seamless-FullServices-Experience-DemoRequest_CS-LP.html?source=Content&sDetail=Experience-DemoRequest_WW",allowedlocales:["en","en_DE"],searchpath:"/de/de/",apcsearchpath:null,supportlink:null,faqdetaillanguage:"de",leadtimecalculator:"/productleadtime",faqadvancedcontentid:null,bslcountry:null,bslLocale:null,bslLanguage:null,bslSearchPath:null,casecategorylanguage:null,countryLanguageMapTranslationextendedId:"en_DE",countryLanguageMapTranslationbaseId:"en_BASE",countryLanguageMapTranslationbase2Id:"en_US",countryLanguageMapMyseconfigId:"de",productselectorconfig:{language:"DE",isocountry:"DEU"},rewardsadmin:null,direction:"ltr",contentlanguage:"en_ww",hidePrivacyNotice:!1,activateMultiChannel:!1,myseitbenabled:!0,fcPaymentGateway:{link:null,company:null},logoutCountryCode:"de",createdAt:"2020-09-18T08:07:43.906Z",updatedAt:"2020-10-24T17:11:51.255Z",__typename:"CountryLanguageMap",myseconfig:{id:"de",country:"DE",channel:null,prod:{bu:"MySEDE",path:"https://www.mysede.schneider-electric.com",pricefield:"unitNetPrice",displayReturnsDateFilter:!1,timeDifferenceWithUTC:null,pathToReturnsApp:null,returnDateField:null,displayReturnsReason:!1,disableReturnsCTA:!1,useRelayURLtoPrint:!1,invoicetransactiontypeswitch:!1,contractstatusattribute:null,displayprojectreferencenumber:!1,displaycontractenddate:!1,displayordermodification:!1,orderrecordscol3:null,ispaenabled:!1,pnasingle:!1},sandbox:{bu:"MySEDE",path:"https://mysede.btsec.dev.schneider-electric.com",pricefield:"unitNetPrice",displayReturnsDateFilter:!1,timeDifferenceWithUTC:null,pathToReturnsApp:null,returnDateField:null,displayReturnsReason:!1,disableReturnsCTA:!1,useRelayURLtoPrint:!1,invoicetransactiontypeswitch:!1,contractstatusattribute:null,displayprojectreferencenumber:!1,displaycontractenddate:!1,displayordermodification:!1,orderrecordscol3:null,ispaenabled:!1,pnasingle:!1},isActivated:!0,createdAt:"2020-09-24T11:40:53.646Z",updatedAt:"2020-09-24T11:40:53.646Z",__typename:"MySEConfig"},translationbase:{id:"en_BASE"},translationbase2:{id:"en_US"},translationextended:{id:"en_DE"}},{id:"de_DE",country:"DE",languagelabel:"Deutsch",marketoFormURL:"https://go.schneider-electric.com/WW_202108_Seamless-FullServices-Experience-DemoRequest_CS-LP.html?source=Content&sDetail=Experience-DemoRequest_WW",allowedlocales:["de","de_DE"],searchpath:"/ww/en/",apcsearchpath:null,supportlink:null,faqdetaillanguage:"de",leadtimecalculator:"/productleadtime",faqadvancedcontentid:null,bslcountry:"DE",bslLocale:"de_DE",bslLanguage:null,bslSearchPath:null,casecategorylanguage:null,countryLanguageMapTranslationextendedId:"de_DE",countryLanguageMapTranslationbaseId:"en_BASE",countryLanguageMapTranslationbase2Id:"de_BASE",countryLanguageMapMyseconfigId:"de",productselectorconfig:{language:"DE",isocountry:"DEU"},rewardsadmin:null,direction:"ltr",contentlanguage:"de_de",hidePrivacyNotice:!1,activateMultiChannel:!0,myseitbenabled:!0,fcPaymentGateway:{link:null,company:null},logoutCountryCode:"de",createdAt:"2020-09-17T16:34:23.525Z",updatedAt:"2021-02-01T16:17:17.993Z",__typename:"CountryLanguageMap",myseconfig:{id:"de",country:"DE",channel:null,prod:{bu:"MySEDE",path:"https://www.mysede.schneider-electric.com",pricefield:"unitNetPrice",displayReturnsDateFilter:!1,timeDifferenceWithUTC:null,pathToReturnsApp:null,returnDateField:null,displayReturnsReason:!1,disableReturnsCTA:!1,useRelayURLtoPrint:!1,invoicetransactiontypeswitch:!1,contractstatusattribute:null,displayprojectreferencenumber:!1,displaycontractenddate:!1,displayordermodification:!1,orderrecordscol3:null,ispaenabled:!1,pnasingle:!1},sandbox:{bu:"MySEDE",path:"https://mysede.btsec.dev.schneider-electric.com",pricefield:"unitNetPrice",displayReturnsDateFilter:!1,timeDifferenceWithUTC:null,pathToReturnsApp:null,returnDateField:null,displayReturnsReason:!1,disableReturnsCTA:!1,useRelayURLtoPrint:!1,invoicetransactiontypeswitch:!1,contractstatusattribute:null,displayprojectreferencenumber:!1,displaycontractenddate:!1,displayordermodification:!1,orderrecordscol3:null,ispaenabled:!1,pnasingle:!1},isActivated:!0,createdAt:"2020-09-24T11:40:53.646Z",updatedAt:"2020-09-24T11:40:53.646Z",__typename:"MySEConfig"},translationbase:{id:"en_BASE"},translationbase2:{id:"de_BASE"},translationextended:{id:"de_DE"}}]}];function s(){const a=o.find(u=>u.useremail===i.username),c={username:i.username,access_token:i.access_token,userDetails:a};r("loginSuccess",c)}return[i,s,()=>s()]}class D7 extends Ot{constructor(n){super(),At(this,n,WY,HY,It,{},GY)}}function VY(t){let n;return{c(){n=A("h6"),n.textContent="Fetching project details..."},m(e,i){J(e,n,i)},p:et,i:et,o:et,d(e){e&&K(n)}}}function YY(t,n,e){let i,r,o=et,s=()=>(o(),o=us(d,b=>e(7,r=b)),d),l,a=et,c=()=>(a(),a=us(f,b=>e(8,l=b)),f);ye(t,N1,b=>e(6,i=b)),t.$$.on_destroy.push(()=>o()),t.$$.on_destroy.push(()=>a());let{user:u}=n,{apigee_token:d=yt("")}=n;s();let{access_token:f=yt("")}=n;c();let{language:p}=n,{country:m}=n,{env:g}=n;Un(()=>{e(2,u=__(u)),We.bootstrap(We.environment||g,l,r,p,m),h()});function h(){const y={link:String(window.location.origin)+String(window.location.pathname),email:String(u.profile.email)};N2(y).catch(k=>{ve.error(k==null?void 0:k.message)}).then(()=>{ve.info("Loaded::Project Preview")}).finally(()=>{i&&(_(i),zt()&&Br(i,"{activity_log.message_login_via_link}",on,"{activity_log.message_login_via_link}",[]))})}function _(b){const y=Ac();Ar(`${lr}${String(y.projects.projectsPage)}/${String(b)}`)}return t.$$set=b=>{"user"in b&&e(2,u=b.user),"apigee_token"in b&&s(e(0,d=b.apigee_token)),"access_token"in b&&c(e(1,f=b.access_token)),"language"in b&&e(3,p=b.language),"country"in b&&e(4,m=b.country),"env"in b&&e(5,g=b.env)},[d,f,u,p,m,g]}class ZY extends Ot{constructor(n){super(),At(this,n,YY,VY,It,{user:2,apigee_token:0,access_token:1,language:3,country:4,env:5})}}class XY{constructor(n,e,i,r,o,s,l){ei(this,"featuresFromScript");ei(this,"features");ei(this,"isLoggedIn");ei(this,"country");ei(this,"cpqUser");ei(this,"availableServices");ei(this,"showCartIcon");ei(this,"isStandAlone");this.featuresFromScript=n,this.isLoggedIn=e,this.country=i,this.cpqUser=r,this.availableServices=o,this.showCartIcon=s,this.isStandAlone=l}populateFeaturesObj(n,e,i,r){const o=Object.keys(i);for(const s of o){const l=r[i[s]],a=l.getValue,c=l.shortName,u=e?e[c]:void 0;n[i[s]]=this.returnGetValue(u,a)}}populateFeaturesObjAPI(n={},e={},i={}){for(const r in i){let o;const s=i[r]||{},l=e[s.apiPropertyName];if(l!==void 0&&(l===!0?o=1:l===!1&&this.isLoggedIn?o=0:l===!1&&!this.isLoggedIn&&(o=2),n[r]=o),s.overrideBusinessLogic){const a=s.shortName,c=s.overrideBusinessLogic;n[r]=this.returnOverrideLogic(o,c,a)}if(this.isStandAlone&&s.isStandAloneLogic){const a=s.isStandAloneLogic;n[r]=this.returnIsStandAloneLogic(a)}}}returnGetValue(n,e){if(typeof e=="function"){const i={isLoggedIn:this.isLoggedIn,country:this.country,val:n,isStandAlone:this.isStandAlone};return e(i)}return e}returnOverrideLogic(n,e,i){if(typeof e=="function"){const r={apiVal:n,isLoggedIn:this.isLoggedIn,country:this.country,shortName:i,cpqUser:this.cpqUser,availableServices:this.availableServices,showCartIcon:this.showCartIcon,isStandAlone:this.isStandAlone};return e(r)}return e}returnIsStandAloneLogic(n){if(typeof n=="function"){const e={isStandAlone:this.isStandAlone};return n(e)}return n}createFeatureByCategoryFeatureName(n){const e={};for(const i in Vl)if(Vl.hasOwnProperty(i)){const r=Vl[i];r.categoryFeatureName===n&&(e[r.shortName]=i)}return e}createSubPart(n,e){const i={};for(const r in Vl)Vl[r].categoryFeatureName===n&&(i[Vl[r].shortName]=e);return i}checkScriptMapping(n){for(const e in n)typeof n[e]!="object"&&(n[e]=this.createSubPart(e,n[e]))}setupFeatureManagement(){var n,e,i,r;if(this.features={},Object.keys(this.featuresFromScript)){this.checkScriptMapping((e=(n=this.featuresFromScript)==null?void 0:n.features)==null?void 0:e.BOM);const{BOM_MANAGEMENT:o,QUOTE:s,PROJECT:l,BUYING:a,PROJECT_COLLABORATION:c,TRANSLATION:u,DOCUMENT:d,ADD_PRODUCT:f}=((r=(i=this.featuresFromScript)==null?void 0:i.features)==null?void 0:r.BOM)||{},p=[o,s,l,a,c,u,d,f],m=[this.createFeatureByCategoryFeatureName("BOM_MANAGEMENT"),this.createFeatureByCategoryFeatureName("QUOTE"),this.createFeatureByCategoryFeatureName("PROJECT"),this.createFeatureByCategoryFeatureName("BUYING"),this.createFeatureByCategoryFeatureName("PROJECT_COLLABORATION"),this.createFeatureByCategoryFeatureName("TRANSLATION"),this.createFeatureByCategoryFeatureName("DOCUMENT"),this.createFeatureByCategoryFeatureName("ADD_PRODUCT")];for(let g=0,h=p.length;g{this.parseThroughApiData(o)}),Ii.set(this.features)}parseThroughApiData(n){var e;(e=Object.keys((n==null?void 0:n.supportedFeatures)||[]))!=null&&e.length&&this.populateFeaturesObjAPI(this.features,n==null?void 0:n.supportedFeatures,Vl)}}function B7(t,n,e,i,r,o,s){return new XY(t,n,e,i,r,o,s)}const vie="",{document:U7}=uo;function KY(t){Ut(t,"svelte-1ckum8p",":host{height:auto}.parent.svelte-1ckum8p{width:100%}")}const JY=t=>({}),z7=t=>({slot:"surveyBtn"}),QY=t=>({}),F7=t=>({slot:"surveyBtn"});function x7(t){let n,e,i,r,o=`