expedite-components 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(i=>r.set(i)),r}static accessor(n){const r=(this[h0]=this[h0]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=vi(a);r[s]||(N9(i,a),r[s]=!0)}return de.isArray(n)?n.forEach(o):o(n),this}}Ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Ao.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),de.freezeMethods(Ao);const Jt=Ao;function as(e,n){const t=this||is,r=n||t,i=Jt.from(r.headers);let o=r.data;return de.forEach(e,function(s){o=s.call(t,o,i.normalize(),n?n.status:void 0)}),i.normalize(),o}function p0(e){return!!(e&&e.__CANCEL__)}function Pr(e,n,t){Le.call(this,e??"canceled",Le.ERR_CANCELED,n,t),this.name="CanceledError"}de.inherits(Pr,Le,{__CANCEL__:!0});function v0(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new Le("Request failed with status code "+t.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function F9(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function P9(e,n){e=e||10;const t=new Array(e),r=new Array(e);let i=0,o=0,a;return n=n!==void 0?n:1e3,function(u){const f=Date.now(),c=r[o];a||(a=f),t[i]=u,r[i]=f;let v=o,l=0;for(;v!==i;)l+=t[v++],v=v%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-a<n)return;const h=c&&f-c;return h?Math.round(l*1e3/h):void 0}}function M9(e,n){let t=0,r=1e3/n,i,o;const a=(f,c=Date.now())=>{t=c,i=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const c=Date.now(),v=c-t;v>=r?a(f,c):(i=f,o||(o=setTimeout(()=>{o=null,a(i)},r-v)))},()=>i&&a(i)]}const ko=(e,n,t=3)=>{let r=0;const i=P9(50,250);return M9(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,f=i(u),c=a<=s;r=a;const v={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:f||void 0,estimated:f&&s&&c?(s-a)/f:void 0,event:o,lengthComputable:s!=null,[n?"download":"upload"]:!0};e(v)},t)},g0=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},m0=e=>(...n)=>de.asap(()=>e(...n)),q9=yt.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,yt.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,$9=yt.hasStandardBrowserEnv?{write(e,n,t,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(n)}`];de.isNumber(t)&&s.push(`expires=${new Date(t).toUTCString()}`),de.isString(r)&&s.push(`path=${r}`),de.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),de.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function j9(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function H9(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function y0(e,n,t){let r=!j9(n);return e&&(r||t==!1)?H9(e,n):n}const x0=e=>e instanceof Jt?{...e}:e;function lr(e,n){n=n||{};const t={};function r(f,c,v,l){return de.isPlainObject(f)&&de.isPlainObject(c)?de.merge.call({caseless:l},f,c):de.isPlainObject(c)?de.merge({},c):de.isArray(c)?c.slice():c}function i(f,c,v,l){if(de.isUndefined(c)){if(!de.isUndefined(f))return r(void 0,f,v,l)}else return r(f,c,v,l)}function o(f,c){if(!de.isUndefined(c))return r(void 0,c)}function a(f,c){if(de.isUndefined(c)){if(!de.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function s(f,c,v){if(v in n)return r(f,c);if(v in e)return r(void 0,f)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(f,c,v)=>i(x0(f),x0(c),v,!0)};return de.forEach(Object.keys({...e,...n}),function(c){const v=u[c]||i,l=v(e[c],n[c],c);de.isUndefined(l)&&v!==s||(t[c]=l)}),t}const _0=e=>{const n=lr({},e);let{data:t,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=n;if(n.headers=a=Jt.from(a),n.url=c0(y0(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),de.isFormData(t)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(de.isFunction(t.getHeaders)){const u=t.getHeaders(),f=["content-type","content-length"];Object.entries(u).forEach(([c,v])=>{f.includes(c.toLowerCase())&&a.set(c,v)})}}if(yt.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(n)),r||r!==!1&&q9(n.url))){const u=i&&o&&$9.read(o);u&&a.set(i,u)}return n},V9=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,r){const i=_0(e);let o=i.data;const a=Jt.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:f}=i,c,v,l,h,p;function g(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let d=new XMLHttpRequest;d.open(i.method.toUpperCase(),i.url,!0),d.timeout=i.timeout;function m(){if(!d)return;const _=Jt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:_,config:e,request:d};v0(function(A){t(A),g()},function(A){r(A),g()},b),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(r(new Le("Request aborted",Le.ECONNABORTED,e,d)),d=null)},d.onerror=function(x){const b=x&&x.message?x.message:"Network Error",S=new Le(b,Le.ERR_NETWORK,e,d);S.event=x||null,r(S),d=null},d.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const b=i.transitional||f0;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new Le(x,b.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,d)),d=null},o===void 0&&a.setContentType(null),"setRequestHeader"in d&&de.forEach(a.toJSON(),function(x,b){d.setRequestHeader(b,x)}),de.isUndefined(i.withCredentials)||(d.withCredentials=!!i.withCredentials),s&&s!=="json"&&(d.responseType=i.responseType),f&&([l,p]=ko(f,!0),d.addEventListener("progress",l)),u&&d.upload&&([v,h]=ko(u),d.upload.addEventListener("progress",v),d.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=_=>{d&&(r(!_||_.type?new Pr(null,e,d):_),d.abort(),d=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const y=F9(i.url);if(y&&yt.protocols.indexOf(y)===-1){r(new Le("Unsupported protocol "+y+":",Le.ERR_BAD_REQUEST,e));return}d.send(o||null)})},U9=(e,n)=>{const{length:t}=e=e?e.filter(Boolean):[];if(n||t){let r=new AbortController,i;const o=function(f){if(!i){i=!0,s();const c=f instanceof Error?f:this.reason;r.abort(c instanceof Le?c:new Pr(c instanceof Error?c.message:c))}};let a=n&&setTimeout(()=>{a=null,o(new Le(`timeout ${n} of ms exceeded`,Le.ETIMEDOUT))},n);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>de.asap(s),u}},z9=function*(e,n){let t=e.byteLength;if(!n||t<n){yield e;return}let r=0,i;for(;r<t;)i=r+n,yield e.slice(r,i),r=i},K9=async function*(e,n){for await(const t of X9(e))yield*z9(t,n)},X9=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},b0=(e,n,t,r)=>{const i=K9(e,n);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:c}=await i.next();if(f){s(),u.close();return}let v=c.byteLength;if(t){let l=o+=v;t(l)}u.enqueue(new Uint8Array(c))}catch(f){throw s(f),f}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},C0=64*1024,{isFunction:Oo}=de,W9=(({Request:e,Response:n})=>({Request:e,Response:n}))(de.global),{ReadableStream:w0,TextEncoder:E0}=de.global,A0=(e,...n)=>{try{return!!e(...n)}catch{return!1}},G9=e=>{e=de.merge.call({skipUndefined:!0},W9,e);const{fetch:n,Request:t,Response:r}=e,i=n?Oo(n):typeof fetch=="function",o=Oo(t),a=Oo(r);if(!i)return!1;const s=i&&Oo(w0),u=i&&(typeof E0=="function"?(p=>g=>p.encode(g))(new E0):async p=>new Uint8Array(await new t(p).arrayBuffer())),f=o&&s&&A0(()=>{let p=!1;const g=new t(yt.origin,{body:new w0,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),c=a&&s&&A0(()=>de.isReadableStream(new r("").body)),v={stream:c&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!v[p]&&(v[p]=(g,d)=>{let m=g&&g[p];if(m)return m.call(g);throw new Le(`Response type '${p}' is not supported`,Le.ERR_NOT_SUPPORT,d)})});const l=async p=>{if(p==null)return 0;if(de.isBlob(p))return p.size;if(de.isSpecCompliantForm(p))return(await new t(yt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(de.isArrayBufferView(p)||de.isArrayBuffer(p))return p.byteLength;if(de.isURLSearchParams(p)&&(p=p+""),de.isString(p))return(await u(p)).byteLength},h=async(p,g)=>{const d=de.toFiniteNumber(p.getContentLength());return d??l(g)};return async p=>{let{url:g,method:d,data:m,signal:y,cancelToken:_,timeout:x,onDownloadProgress:b,onUploadProgress:S,responseType:A,headers:I,withCredentials:B="same-origin",fetchOptions:O}=_0(p),E=n||fetch;A=A?(A+"").toLowerCase():"text";let k=U9([y,_&&_.toAbortSignal()],x),R=null;const N=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let q;try{if(S&&f&&d!=="get"&&d!=="head"&&(q=await h(I,m))!==0){let w=new t(g,{method:"POST",body:m,duplex:"half"}),D;if(de.isFormData(m)&&(D=w.headers.get("content-type"))&&I.setContentType(D),w.body){const[L,$]=g0(q,ko(m0(S)));m=b0(w.body,C0,L,$)}}de.isString(B)||(B=B?"include":"omit");const G=o&&"credentials"in t.prototype,Y={...O,signal:k,method:d.toUpperCase(),headers:I.normalize().toJSON(),body:m,duplex:"half",credentials:G?B:void 0};R=o&&new t(g,Y);let ne=await(o?E(R,O):E(g,Y));const Q=c&&(A==="stream"||A==="response");if(c&&(b||Q&&N)){const w={};["status","statusText","headers"].forEach(W=>{w[W]=ne[W]});const D=de.toFiniteNumber(ne.headers.get("content-length")),[L,$]=b&&g0(D,ko(m0(b),!0))||[];ne=new r(b0(ne.body,C0,L,()=>{$&&$(),N&&N()}),w)}A=A||"text";let P=await v[de.findKey(v,A)||"text"](ne,p);return!Q&&N&&N(),await new Promise((w,D)=>{v0(w,D,{data:P,headers:Jt.from(ne.headers),status:ne.status,statusText:ne.statusText,config:p,request:R})})}catch(G){throw N&&N(),G&&G.name==="TypeError"&&/Load failed|fetch/i.test(G.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,p,R),{cause:G.cause||G}):Le.from(G,G&&G.code,p,R)}}},Q9=new Map,k0=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:i}=n,o=[r,i,t];let a=o.length,s=a,u,f,c=Q9;for(;s--;)u=o[s],f=c.get(u),f===void 0&&c.set(u,f=s?new Map:G9(n)),c=f;return f};k0();const ss={http:y9,xhr:V9,fetch:{get:k0}};de.forEach(ss,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const O0=e=>`- ${e}`,Z9=e=>de.isFunction(e)||e===null||e===!1;function J9(e,n){e=de.isArray(e)?e:[e];const{length:t}=e;let r,i;const o={};for(let a=0;a<t;a++){r=e[a];let s;if(i=r,!Z9(r)&&(i=ss[(s=String(r)).toLowerCase()],i===void 0))throw new Le(`Unknown adapter '${s}'`);if(i&&(de.isFunction(i)||(i=i.get(n))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
|
|
31
31
|
`+a.map(O0).join(`
|
|
32
32
|
`):" "+O0(a[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}const S0={getAdapter:J9,adapters:ss};function ls(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pr(null,e)}function I0(e){return ls(e),e.headers=Jt.from(e.headers),e.data=as.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),S0.getAdapter(e.adapter||is.adapter,e)(e).then(function(r){return ls(e),r.data=as.call(e,e.transformResponse,r),r.headers=Jt.from(r.headers),r},function(r){return p0(r)||(ls(e),r&&r.response&&(r.response.data=as.call(e,e.transformResponse,r.response),r.response.headers=Jt.from(r.response.headers))),Promise.reject(r)})}const T0="1.13.2",So={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{So[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}});const B0={};So.transitional=function(n,t,r){function i(o,a){return"[Axios v"+T0+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(n===!1)throw new Le(i(a," has been removed"+(t?" in "+t:"")),Le.ERR_DEPRECATED);return t&&!B0[a]&&(B0[a]=!0,console.warn(i(a," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(o,a,s):!0}},So.spelling=function(n){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${n}`),!0)};function Y9(e,n,t){if(typeof e!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=n[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Le("option "+o+" must be "+u,Le.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Le("Unknown option "+o,Le.ERR_BAD_OPTION)}}const Io={assertOptions:Y9,validators:So},fn=Io.validators;class To{constructor(n){this.defaults=n||{},this.interceptors={request:new u0,response:new u0}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
33
|
-
`+o):r.stack=o}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=lr(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Io.assertOptions(r,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),i!=null&&(de.isFunction(i)?t.paramsSerializer={serialize:i}:Io.assertOptions(i,{encode:fn.function,serialize:fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Io.assertOptions(t,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[t.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),t.headers=Jt.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let c,v=0,l;if(!u){const p=[I0.bind(this),void 0];for(p.unshift(...s),p.push(...f),l=p.length,c=Promise.resolve(t);v<l;)c=c.then(p[v++],p[v++]);return c}l=s.length;let h=t;for(;v<l;){const p=s[v++],g=s[v++];try{h=p(h)}catch(d){g.call(this,d);break}}try{c=I0.call(this,h)}catch(p){return Promise.reject(p)}for(v=0,l=f.length;v<l;)c=c.then(f[v++],f[v++]);return c}getUri(n){n=lr(this.defaults,n);const t=y0(n.baseURL,n.url,n.allowAbsoluteUrls);return c0(t,n.params,n.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(n){To.prototype[n]=function(t,r){return this.request(lr(r||{},{method:n,url:t,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(n){function t(r){return function(o,a,s){return this.request(lr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}To.prototype[n]=t(),To.prototype[n+"Form"]=t(!0)});const Bo=To;class cs{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},n(function(o,a,s){r.reason||(r.reason=new Pr(o,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new cs(function(i){n=i}),cancel:n}}}const e4=cs;function t4(e){return function(t){return e.apply(null,t)}}function n4(e){return de.isObject(e)&&e.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([e,n])=>{us[n]=e});const r4=us;function D0(e){const n=new Bo(e),t=Wu(Bo.prototype.request,n);return de.extend(t,Bo.prototype,n,{allOwnKeys:!0}),de.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return D0(lr(e,i))},t}const Ge=D0(is);Ge.Axios=Bo,Ge.CanceledError=Pr,Ge.CancelToken=e4,Ge.isCancel=p0,Ge.VERSION=T0,Ge.toFormData=wo,Ge.AxiosError=Le,Ge.Cancel=Ge.CanceledError,Ge.all=function(n){return Promise.all(n)},Ge.spread=t4,Ge.isAxiosError=n4,Ge.mergeConfig=lr,Ge.AxiosHeaders=Jt,Ge.formToJSON=e=>d0(de.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=S0.getAdapter,Ge.HttpStatusCode=r4,Ge.default=Ge;class i4{constructor(n,t,r,i){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":n,"X-Salesforce-Org-Type":t,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":i,"Content-Type":"application/json"}}}const R0=wt("comShare",()=>{const e=te(""),n=te(""),t=te(""),r=te(""),i=te(""),o=te(""),a=te(""),s=te("Single"),u=me(()=>s.value==="Single");async function f(c){e.value=c.orgType||"Production",n.value=c.orgId||"",t.value=c.userId||"",r.value=c.accountId||"",i.value=c.opportunityId||"",a.value=c.userLocale||"en_US",s.value=c.pricingSchema||"Single"}return{orgType:e,orgId:n,userId:t,accountId:r,opportunityId:i,userLocale:a,pricingSchema:s,quoteId:o,isSinglePricingSchema:u,setSetupData:f}});function o4(e){return e.offerData.pricingTypes.forEach(n=>{n.appliedOnField==="Catalog Price"?(e.catalogPrice=n,e.salesPrice=n.offerPrice,e.price=n.offerPrice):n.appliedOnField==="MRC"?(e.mrcPrice=n,e.mrc=n.offerPrice):n.appliedOnField==="YRC"&&(e.yrcPrice=n,e.yrc=n.offerPrice)}),e}function a4(e){const n=t=>Math.min(...t.options.map(r=>r.relationshipInfo.primarySortOrder));return e.forEach(t=>{t.itemTypes.forEach(r=>{r.options.sort((i,o)=>i.relationshipInfo.primarySortOrder-o.relationshipInfo.primarySortOrder||i.itemName.localeCompare(o.itemName))}),t.itemTypes.sort((r,i)=>n(r)-n(i)||r.itemTypeName.localeCompare(i.itemTypeName))}),e.sort((t,r)=>{const i=Math.min(...t.itemTypes.map(n)),o=Math.min(...r.itemTypes.map(n));return i-o||t.category.localeCompare(r.category)}),e}const s4=(e,n)=>{const t=(r,i)=>typeof i=="function"?void 0:i;return JSON.stringify(e,t)===JSON.stringify(n,t)};class l4 extends i4{constructor(n,t,r,i){super(n,t,r,i)}async getAvailableConfiguration(n){return(await Ge.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,n,{headers:this.headers})).data}async getLineItems({request:n}){const t=await Ge.post(`${this.awsURL}/quoting/getConfiguredLineItems`,n,{headers:this.headers});return console.info("getLineItems:response",t.data),t.data}async maintainQuoteConfiguration({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/maintainConfiguration`,n,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",t.data),t.data}async getProductCrossSells({objectId:n,productItemId:t}){const r=await Ge.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${t}&objectId=${n}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/addLines`,n,{headers:this.headers});return console.info("addLines:response",t.data),t.data}async evaluateConfigurationSelection({request:n}){const t=await Ge.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",n,{headers:this.headers});return console.info("evaluateConfigurationSelection:response",t.data),t.data}}const dn=wt("comConfigurator",()=>{const e=te(null),n=Qt(),t=R0(),r=fi(),i=te(null),o=te(null),a=te(null),s=te(null),u=te(null),f=te([]),c=te(null),v=te([]),l=te([]),h=te(null),p=te(new Map),g=te(!1),d=te({configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),m=te(!1),y=me(()=>_.value&&!t.isSinglePricingSchema),_=me(()=>{var j;if(!s.value||!((j=s.value.categoryOptions)!=null&&j.length)>0)return!1;let M=!0,U=!0,Z=!0,z=null,F=!1;for(const se of s.value.categoryOptions)for(const fe of se.itemTypes)for(const ce of fe.options)ce.billingPeriod&&(z&&z!==ce.billingPeriod&&(Z=!1),z=ce.billingPeriod,!ce.yrcPrice&&ce.billingPeriod==="Monthly"&&(M=!1),!ce.mrcPrice&&ce.billingPeriod==="Yearly"&&(U=!1),F=!0);return M&&U&&Z&&F}),x=me(()=>!s4(s.value,u.value)),b=me(()=>{var U;const M=((U=s.value)==null?void 0:U.categoryOptions)||[];return M.forEach(Z=>{Z.itemTypes.forEach(z=>{z.selectedOptions=z.options.filter(F=>z.selected.includes(F.itemId)),z.totalPrice=function(){return z.selectedOptions.reduce((F,j)=>F+j.price*j.qty,0)||0},z.oneTimePrice=function(){return z.selectedOptions.filter(F=>!F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0},z.recurringPrice=function(){return z.selectedOptions.filter(F=>F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0}}),Z.selectedItemTypes=Z.itemTypes.filter(z=>z.selected.length>0),Z.totalPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.totalPrice(),0)},Z.oneTimePrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.oneTimePrice(),0)},Z.recurringPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.recurringPrice(),0)}}),M.filter(Z=>Z.itemTypes.filter(z=>z.selected.length>0).length>0)}),S=me(()=>b.value.reduce((M,U)=>M+U.totalPrice(),0)),A=me(()=>{if(!s.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const M=b.value.reduce((z,F)=>z+F.totalPrice(),0);let U=b.value.reduce((z,F)=>z+F.oneTimePrice(),0),Z=b.value.reduce((z,F)=>z+F.recurringPrice(),0);return s.value.billingPeriod?Z=(Z+s.value.price)*s.value.qty:U=(U+s.value.price)*s.value.qty,{basePrice:s.value.price,addOns:M,oneTimePrice:U,recurringPrice:Z,total:s.value.price*s.value.qty+M*s.value.qty+U+Z}}),I=me(()=>{var U,Z,z,F;const M=new Map;return(U=c.value)!=null&&U.productLineItem&&M.set((Z=c.value)==null?void 0:Z.productLineItem.XX_ORD1__Item__c,(z=c.value)==null?void 0:z.productLineItem),(F=c.value)==null||F.options.forEach(j=>{M.set(j.XX_ORD1__Item__c,j)}),M}),B=me(()=>{var U;const M=new Map;return s.value&&((U=s.value.categoryOptions)==null?void 0:U.length)>0&&s.value.categoryOptions.forEach(Z=>{Z.itemTypes.forEach(z=>{z.options.forEach(F=>{M.set(F.publishKey,F)})})}),M}),O=me(()=>{if(!s.value)return{};const M=z=>!z||!Array.isArray(z)?[]:z.filter(F=>F.apiName&&F.value!==null&&F.value!==void 0&&F.value!=="").map(F=>({fieldAPIName:F.apiName,value:F.dataType==="BOOLEAN"?F.value?"true":"false":F.dataType==="REFERENCE"?F.referenceRecordId||F.value||"":F.value||""})),U={itemId:s.value.itemId,qliId:s.value.qliId||null,name:s.value.itemName,qty:s.value.qty||1,salesPrice:s.value.price||0,mrc:s.value.mrc||null,yrc:s.value.yrc||null,attributes:M(s.value.attributes)},Z=[];return s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.options.forEach(j=>{F.selected.includes(j.itemId)&&Z.push({itemId:j.itemId,qliId:j.qliId||null,name:j.itemName,qty:j.qty||1,salesPrice:j.price||0,mrc:j.mrc||null,yrc:j.yrc||null,attributes:M(j.attributes)})})})}),{[s.value.itemId]:{product:U,options:Z}}}),E=(M,U)=>{if(!M||!Array.isArray(M))return[];const Z=new Map;return U.forEach(z=>{Z.set(z.fieldAPIName,z.value)}),M.map(z=>(z.value=Z.get(z.fieldAPIName)||null,z))};function k(M,U){U&&(l.value=U.filter(z=>z.product.itemId!==M.product.itemId));const Z=new Map;M.options.forEach(z=>{Z.set(z.itemId,z)}),s.value.itemName=M.product.name,s.value.qty=M.product.qty,s.value.price=M.product.salesPrice,s.value.attributes=E(s.value.attributes,M.product.attributes),s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.selected=[],F.options.forEach(j=>{Z.has(j.itemId)&&(j.itemName=Z.get(j.itemId).name,j.qty=Z.get(j.itemId).qty,j.price=Z.get(j.itemId).salesPrice,j.qliId=Z.get(j.itemId).qliId,j.attributes=E(j.attributes,Z.get(j.itemId).attributes),F.selected.push(j.itemId))})})}),s.value={...s.value}}function R(){return{get getConfig(){return O.value},setConfig:k}}function N(M){s.value.qliId&&(s.value.qliBillingPeriod==="Monthly"&&!M?s.value.price=s.value.salesPrice||s.value.mrc:s.value.qliBillingPeriod==="Yearly"&&M&&(s.value.price=s.value.salesPrice)),s.value.categoryOptions.forEach(U=>{U.itemTypes.forEach(Z=>{Z.options.forEach(z=>{z.billingPeriod&&(z.price=(M?z.yrcPrice.offerPrice:z.mrcPrice.offerPrice)||z.price,z.qliId&&(z.qliBillingPeriod==="Monthly"&&!M?z.price=z.salesPrice||z.mrc:z.qliBillingPeriod==="Yearly"&&M&&(z.price=z.salesPrice)))})})})}function q(){s.value=null,u.value=null,f.value=[],a.value=null,c.value=null,h.value=null,p.value=new Map,g.value=!1,d.value.configuration=!1,d.value.lineItem=!1,d.value.productOptionsPricing=!1,d.value.bestOfferPrice=!1,d.value.lineItemAttributes=!1,d.value.save=!1}function G(M,U,Z,z){e.value=new l4(M,U,Z,z)}async function Y(M,U,Z){console.time("CONFIGURATOR INIT CONFIGURATOR"),q(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),o.value=M,a.value=U,i.value=Z||t.quoteId;const z=await ne();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),s.value=Q(z),await w(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),P(s.value),s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{P(se),(I.value.has(se.itemId)||se.relationshipInfo.relationship==="Kit")&&j.selected.push(se.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4"),u.value=JSON.parse(JSON.stringify(s.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR")}async function ne(){try{const M={accountId:t.accountId,objectId:i.value,itemId:o.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},U=await e.value.getAvailableConfiguration(M);console.info("getAvailableConfiguration:result",U);const Z=U.data.productConfiguration;return Z.categoryOptions=a4(Z.categoryOptions),Z}catch(M){return console.info("error",M.message),!1}}function Q(M){p.value.set(a.value,M.attributes),f.value=M.configRules;const U=new Set;return f.value.forEach(Z=>{const z=JSON.parse(Z.ruleJson);z.optionSelected.forEach(F=>{U.add(F)}),z.affectedOptions.forEach(F=>{U.add(F)})}),console.info("rulesByPublishKey",U),P(M),M.categoryOptions.forEach(Z=>{Z.key=Z.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),Z.itemTypes.forEach(z=>{z.selected=[],z.numberOfColumns||(z.numberOfColumns=1),z.numberOfColumns>1&&(z.lightboxAttributes=!0),z.maxNumber||(z.maxNumber=100),z.minNumber||(z.minNumber=0),z.maxQuantity||(z.maxQuantity=1e4),z.minQuantity||(z.minQuantity=1),z.maxNumber===1?(z.isRadio=!0,z.minMessage="Please select 1 option",z.maxMessage="",z.isKit=z.options.some(F=>F.relationshipInfo.relationship==="Kit")):(z.minMessage=`Minimum of ${z.minNumber} selection${z.minNumber!==1?"s":""} required`,z.maxMessage=`Maximum of ${z.maxNumber} selection${z.maxNumber!==1?"s":""} allowed`),z.options.forEach(F=>{Z.showImage=Z.showImage||!!F.defaultImageURL,F.showAttributesModal=!1,F.calculateRules=U.has("option."+F.publishKey),console.info("option.calculateRules",F.calculateRules),F.qty=z.minQuantity||1,F.getTags=()=>(F.attributes=F.attributes||[],F.attributes.filter(j=>j.value!==null&&j.value!=="").map(j=>({label:j.label,value:j.value}))),Object.defineProperty(F,"isDisabled",{get:function(){return F.relationshipInfo.relationship==="Kit"||(z.isRadio?z.isKit:!z.selected.includes(F.itemId)&&z.maxNumber===z.selected.length)}}),P(F)})})}),M}function P(M){M.isAttributes=M.attributes&&M.attributes.length>0;const U=M.catalogItem;if(I.value.has(M.itemId)){const Z=I.value.get(M.itemId);M.qliId=Z.Id,M.qty=Z.XX_ORD1__QTY__c,M.itemName=Z.XX_ORD1__Line_Description__c,M.billingPeriod=Z.XX_ORD1__Billing_Period__c,M.price=Z.XX_ORD1__Sales_Price__c,M.billingPeriod?M.price=Z.XX_ORD1__Sales_Price__c||Z.XX_ORD1__MRC__c:M.price=Z.XX_ORD1__NRC__c||Z.XX_ORD1__Sales_Price__c,M.salesPrice=Z.XX_ORD1__Sales_Price__c,M.nrc=Z.XX_ORD1__NRC__c,M.mrc=Z.XX_ORD1__MRC__c,M.qliBillingPeriod=Z.XX_ORD1__Billing_Period__c,p.value.set(M.qliId,M.attributes)}else M.itemName=U.XX_ORD1__Line_Description__c||M.itemName,M.price=U.XX_ORD1__Negotiated_Price__c||U.XX_ORD1__NRC_for_New__c,M.nrcPrice=U.XX_ORD1__NRC_for_New__c,M.qty=M.qty||1,o4(M)}async function w(){d.value.lineItem=!0,console.info("getLineItems",i.value,a.value);try{const M={objectId:i.value,filters:{},additionalFields:["Name","XX_ORD1__Line_Description__c","XX_ORD1__SYS_Configuration_Status2__c"],primarySort:{field:"CreatedDate",direction:"DESC"},productPage:{limit:200,offset:0,productLineItemId:a.value}},U=await e.value.getLineItems({request:JSON.stringify(M)});return(U.data.products||[]).forEach(z=>{const F=z.productLineItem;F.Id===a.value?c.value=z:v.value.push(F)}),console.info("lineItem.value",c.value),console.info("configurableLineItems.value",v.value),d.value.lineItem=!1,U}catch(M){return console.info("error",M.message),d.value.lineItem=!1,!1}}async function D(M){console.info("getRecords");try{const U=await window.productManagerController.getRecords({request:JSON.stringify(M)});return console.info("getRecords:result",U),JSON.parse(U.data)}catch(U){return console.info("error",U.message),!1}}async function L(){g.value=!0,d.value.save=!0,console.info("maintainQuoteConfiguration");const M=[],U=[];s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{j.selected.includes(se.itemId)?M.push($(se)):se.qliId&&U.push(se.qliId)})})});const Z={objectId:i.value,eCatalogId:t.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:U,grandFatheredOptionsToRemove:[],productLineItem:{...$(s.value),optionLineItems:M}};console.info("maintainQuoteConfiguration:request",Z);const z=await e.value.maintainQuoteConfiguration({request:JSON.stringify(Z)});if(console.info("maintainQuoteConfiguration:result",z),z!=null&&z.error){const F={title:"Unable to Save Configuration",description:z.error,button:{label:"Back to Configuration",action:()=>{g.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+i.value)}}};n.errorPopup=F}else if(u.value=JSON.parse(JSON.stringify(s.value)),console.info("maintainQuoteConfiguration:result",z),d.value.save=!1,!a.value)return s.value.qliId=z.data.productLineItem.lineItemId,a.value=z.data.productLineItem.lineItemId,z.data.productLineItem.lineItemId;d.value.save=!1}function $(M){const U={};M.isAttributes&&M.attributes.forEach(z=>{!z.apiName.includes(".")&&z.value!==null&&z.value!==void 0&&(z.dataType==="BOOLEAN"?U[z.apiName]=z.value?"true":"false":z.dataType==="REFERENCE"?U[z.apiName]=z.referenceRecordId:U[z.apiName]=z.value)});const Z={attributes:U,itemId:M.itemId,lineItemId:M.qliId,lineDescription:M.itemName,qty:M.qty,billingPeriod:M.billingPeriod,...M.offer};return M.billingPeriod&&_.value&&!t.isSinglePricingSchema&&(Z.billingPeriod=m.value?"Yearly":"Monthly"),!t.isSinglePricingSchema&&!M.billingPeriod?Z.nrcPrice=M.price:(Z.applyOnField="Catalog Price",Z.salesPrice=M.price,Z.nrcPrice=M.nrcPrice),Z}async function W(){const M={objectId:t.accountId,productItemId:o.value};try{let U=await e.value.getProductCrossSells(M);const{crossSells:Z,offerResult:z}=U.data;if(Z.length===0)return[];const F=new Map;return z.forEach(j=>{F.set(j.eCatalogItemId,{...j,...j.pricingTypes[0]})}),Z.forEach(j=>{j.loading=!1,j.Name=j.XX_ORD1__Line_Description__c||j.XX_ORD1__Item__r.Name,j.Description=j.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,F.has(j.Id)?(j.Price=F.get(j.Id).offerPrice,j.priceFormatted=F.get(j.Id).formattedOfferPrice,j.offer={offerDiscount:F.get(j.Id).offerDiscount,offerId:F.get(j.Id).offerId,offerType:F.get(j.Id).offerType}):(j.Price=j.XX_ORD1__List_Price2__c,j.priceFormatted=j.XX_ORD1__List_Price2__c,j.offer={offerDiscount:0,offerId:null,offerType:null})}),Z}catch(U){return console.info("error",U.message),!1}}const H=M=>!M||!Array.isArray(M)?[]:M.filter(U=>U.apiName&&U.value!==null&&U.value!==void 0&&U.value!=="").map(U=>({attrName:U.apiName,attrValue:U.dataType==="BOOLEAN"?U.value:U.value||"",dataType:U.dataType}));async function X(M,U){const Z={product:{publishKey:s.value.publishKey,attributes:H(s.value.attributes),lineDescription:s.value.itemName,meta:{XX_ORD1__Sales_Price__c:s.value.price,XX_ORD1__MRC__c:s.value.mrc,XX_ORD1__NRC__c:s.value.nrc,XX_ORD1__YRC__c:s.value.yrc,quantity:s.value.qty}},options:[]};s.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(se=>{se.options.forEach(fe=>{se.selected.includes(fe.itemId)&&Z.options.push({publishKey:fe.publishKey,attributes:H(fe.attributes),lineDescription:fe.itemName,meta:{XX_ORD1__Sales_Price__c:fe.price,XX_ORD1__MRC__c:fe.mrc,XX_ORD1__NRC__c:fe.nrc,XX_ORD1__YRC__c:fe.yrc,quantity:fe.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",Z.options);const z={itemId:o.value,currentConfig:Z,selected:M?{publishKey:M==null?void 0:M.publishKey,attributes:H(M.attributes),lineDescription:M.itemName}:{},unselected:U?{publishKey:U==null?void 0:U.publishKey,attributes:H(U.attributes),lineDescription:U.itemName}:{}};return await e.value.evaluateConfigurationSelection({request:JSON.stringify(z)})}async function ee(M){const U={objectId:i.value,lstLIRequest:[{eCatalogItemId:M.Id,quantity:1,offerApplicable:M.offer}]};try{const Z=await e.value.addLines({request:JSON.stringify(U)});console.info("addLines:result",Z)}catch(Z){return console.info("error",Z.message),!1}}return{itemId:o,configuration:s,_configurationCopy:u,lineItem:c,savedScreen:g,loading:d,summary:b,addOns:S,summaryPrices:A,optionByItemId:I,attributesByQLIId:p,optionByPublishKey:B,showYearlyPricing:m,isYearlyPricingExist:_,isChangedConfiguration:x,isRecurringPricingSchema:y,configurableLineItems:v,suggestedConfigurations:l,initializeController:G,exposeProperties:R,updateCurrentConfiguration:k,changePricingScheme:N,addLines:ee,resetConfigurator:q,getRecords:D,getProductCrossSells:W,initConfigurator:Y,maintainQuoteConfiguration:L,evaluateConfigSelection:X}}),c4={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},u4={class:"ect-flex ect-items-center ect-gap-3"},f4={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},d4={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},h4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),p4={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},v4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),g4={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},m4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},"You may consider these products",-1),y4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},x4=["data-test-id"],_4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},b4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},C4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},w4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},E4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},A4={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},k4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),O4={class:"ect-flex ect-flex-col ect-gap-4"},S4=["data-test-id","onClick"],I4={class:"ect-flex ect-items-center ect-justify-center"},T4={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},B4=["data-test-id"],D4=["data-test-id"],R4={__name:"ConfiguratorRecommend",setup(e){const n=dn();fi();const t=me(()=>n.configuration),r=te(!0),i=te(""),o=te([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"}]),a=te(null),s=te([]),u=async p=>{p.loading=!0,await n.addLines(p),p.disabled=!0,p.loading=!1},f=me(()=>{var p;if(((p=n.suggestedConfigurations)==null?void 0:p.length)>0){const g=n.suggestedConfigurations[0];return{Name:g.product.name,Description:g.product.description,Price:g.product.salesPrice,XX_ORD1__Item__c:g.product.itemId}}return null}),c=p=>{p.action==="backToConfiguration"&&(n.savedScreen=!1)};async function v(){const p=n.configurableLineItems,g=p.filter(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;i.value=`(${p.length-g}/${p.length})`;const d=p.find(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&m.Id!=n.qliId);return a.value=d?{Name:d.XX_ORD1__Line_Description__c,Description:d.XX_ORD1__Product_Description__c,Price:d.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:d.XX_ORD1__Item__c,Id:d.Id}:null,p}async function l(){n.resetConfigurator(),await n.initConfigurator(f.value.XX_ORD1__Item__c,null),n.updateCurrentConfiguration(n.suggestedConfigurations[0],n.suggestedConfigurations)}async function h(){n.resetConfigurator(),n.initConfigurator(a.value.XX_ORD1__Item__c,a.value.Id)}return qn(async()=>{r.value=!0;const p=await v(),g=await n.getProductCrossSells(),d=new Set;p.forEach(m=>{d.add(m.XX_ORD1__Item__c)}),g.forEach(m=>{m.disabled=d.has(m.XX_ORD1__Item__c)}),s.value=g||[],r.value=!1}),(p,g)=>(V(),J(be,null,[C("div",c4,[C("div",u4,[he(We,{icon:"arrow",symbol:"",size:12,onClick:g[0]||(g[0]=d=>Ne(n).savedScreen=!1)}),C("h2",f4,xe(t.value.itemName),1)]),Ne(n).loading.save?(V(),J("div",d4,[he(Hu,{svg:""}),h4])):(V(),J("div",p4,[he(We,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),v4]))]),r.value?(V(),Ee($u,{key:0,type:"recommendations",rows:4})):s.value.length>0?(V(),J("div",g4,[m4,C("div",y4,[(V(!0),J(be,null,Me(s.value,(d,m)=>(V(),J("div",{key:d.Id||m,class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":`configurator-recommend-card-${d.Id||m}`},[C("div",_4,[C("h4",b4,xe(d.Name),1),C("p",C4,xe(d.Description),1)]),C("div",w4,[C("div",E4,xe(Ne(Pt)(d.Price)),1),he(Ut,{btype:d.disabled?"secondary":"primary","button-style":d.disabled?"normal":"outlined",size:"medium",class:we({"ect-w-[120px]":d.loading}),loading:d.loading,disabled:d.disabled||d.loading,"data-test-id":`configurator-recommend-button-add-${d.Id||m}`,onClick:y=>u(d)},{default:Ve(()=>[Fe(xe(d.loading?"":d.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,x4))),128))])])):(V(),J("div",A4,[k4,C("div",O4,[(V(!0),J(be,null,Me(o.value,(d,m)=>(V(),J("div",{key:d.title||m,class:"ect-bg-white ect-border ect-border-[#DEDEDE] ect-rounded-xl ect-p-4 md:ect-p-5 lg:ect-p-6 ect-flex ect-flex-col ect-items-center ect-gap-4 md:ect-gap-6 lg:ect-gap-8 ect-cursor-pointer ect-transition-all ect-duration-200 hover:ect-shadow-md hover:ect-border-gray-400","data-test-id":`configurator-recommend-redirect-card-${m}`,onClick:y=>c(d)},[C("div",I4,[he(We,{icon:d.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${m}`},null,8,["icon","data-test-id"])]),C("div",T4,[C("h4",{class:"ect-text-sm ect-font-semibold ect-text-[#5F5F5F] ect-text-center ect-leading-[1.43]","data-test-id":`configurator-recommend-redirect-title-${m}`},xe(d.title),9,B4),C("p",{class:"ect-text-sm ect-font-normal ect-text-[#828282] ect-text-center ect-leading-[1.71]","data-test-id":`configurator-recommend-redirect-description-${m}`},xe(d.description),9,D4)])],8,S4))),128))])])),f.value?(V(),Ee(ju,{key:3,title:"Configuere next AI suggested product","configuered-product":f.value,"count-configued-product-string":i.value,onConfigureNextProduct:l},null,8,["configuered-product","count-configued-product-string"])):(V(),Ee(ju,{key:4,title:`Configuere next product from your quote ${i.value}`,"configuered-product":a.value,"count-configued-product-string":i.value,onConfigureNextProduct:h},null,8,["title","configuered-product","count-configued-product-string"]))],64))}},L4=["data-test-id"],N4=Re({__name:"AppPill",props:{variant:{type:String,default:"",validator:e=>["success","error",""].includes(e)},dataTestId:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("span",{class:we(["ect-pill",{"ect-pill-success":e.variant==="success","ect-pill-error":e.variant==="error","ect-pill-default":!e.variant}]),"data-test-id":e.dataTestId},[Je(n.$slots,"default",{},void 0,!0)],10,L4))}},[["__scopeId","data-v-c7f05fa0"]]),F4=["data-test-id"],P4=["data-test-id"],M4=["data-test-id","onClick"],q4=["data-test-id"],$4=Re({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:e=>e.every(n=>typeof n=="object"&&n.title&&n.key&&(n.sections===void 0||Array.isArray(n.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>{var a;return t.modelValue||((a=t.tabs[0])==null?void 0:a.key)||""}),o=a=>{r("update:modelValue",a),r("tab-change",a)};return(a,s)=>(V(),J("div",{class:"ect-page-tabs","data-test-id":e.dataTestId},[e.showTabs?(V(),J("div",{key:0,class:we(["ect-page-tabs-header",[{"ect-tab-border":e.border}]]),"data-test-id":`${e.dataTestId}-header`},[(V(!0),J(be,null,Me(e.tabs,u=>(V(),J("button",{key:u.key,class:we(["ect-page-tab-button",`ect-page-tab-button${i.value===u.key?"-active":""} ${u.tabClass||""}`]),"data-test-id":`${e.dataTestId}-tab-${u.key}`,onClick:f=>o(u.key)},[Fe(xe(u.title)+" ",1),u.pill!==void 0&&u.pill!==null?(V(),Ee(N4,{key:0,class:"ect-ml-2",variant:u.pillStyle,"data-test-id":`${e.dataTestId}-tab-${u.key}-pill`},{default:Ve(()=>[Fe(xe(u.pill),1)]),_:2},1032,["variant","data-test-id"])):ge("",!0)],10,M4))),128))],10,P4)):ge("",!0),C("div",{class:"ect-page-tab-content","data-test-id":`${e.dataTestId}-content`},null,8,q4)],8,F4))}},[["__scopeId","data-v-f22cb1ed"]]),j4=["data-test-id"],H4=["disabled","data-test-id"],V4=["value","disabled","data-test-id"],U4=["disabled","data-test-id"],Do={__name:"CounterButton",props:{value:{type:Number,required:!0,default:null},min:{type:Number,default:1},max:{type:Number,default:999},empty:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:value","change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.min==null?0:t.min),o=me(()=>t.max==null?999:t.max),a=(x,b,S)=>Math.min(Math.max(x,b),S),s=x=>{if(x==null||x==="")return NaN;const b=Number(x);return Number.isFinite(b)?b:NaN},u=te(null),f=te(t.value??i.value),c=x=>{f.value=a(x,i.value,o.value)};t.value!==null&&c(t.value);const v=me(()=>f.value),l=me(()=>u.value!=null?u.value:String(v.value)),h=me(()=>t.disabled||v.value<=i.value),p=me(()=>t.disabled||v.value>=o.value);function g(x){x!==t.value&&(f.value=x,r("update:value",x),r("change",x))}function d(){if(h.value)return;const x=a(v.value-1,i.value,o.value);u.value=null,g(x)}function m(){if(p.value)return;const x=a(v.value+1,i.value,o.value);u.value=null,g(x)}function y(x){const S=String(x.target.value??"").replace(/\D+/g,"");u.value=S}function _(){const x=s(u.value),b=i.value,S=a(Number.isNaN(x)?b:x,i.value,o.value);u.value=null,g(S)}return(x,b)=>(V(),J("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":e.dataTestId},[C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":h.value,"ect-cursor-not-allowed":h.value}]),disabled:h.value,"data-test-id":`${e.dataTestId}-decrement`,onClick:d}," - ",10,H4),C("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:e.empty?"":l.value,disabled:e.disabled,class:"ect-h-7 ect-w-[48px] ect-px-2 ect-border ect-border-gray ect-rounded-md ect-text-center ect-text-sm ect-font-medium ect-text-gray-900 focus:ect-outline-none focus:ect-border-gray-400 ect-bg-white","data-test-id":`${e.dataTestId}-input`,onInput:y,onBlur:_},null,40,V4),C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":p.value,"ect-cursor-not-allowed":p.value}]),disabled:p.value,"data-test-id":`${e.dataTestId}-increment`,onClick:m}," + ",10,U4)],8,j4))}},z4={class:"ect-flex ect-justify-end ect-items-center ect-gap-2.5 ect-px-6 ect-py-4 ect-bg-white ect-border-t ect-border-gray-300 ect-shadow-[0_-2px_4px_0px_rgba(0,0,0,0.11)]","data-test-id":"configurator-footer"},K4={"data-test-id":"configurator-footer-quantity"},X4={class:"ect-flex ect-justify-end ect-items-center ect-gap-6 ect-px-8 ect-py-0 ect-flex-1","data-test-id":"configurator-footer-prices"},W4=["data-test-id"],G4=["data-test-id"],Q4=["data-test-id"],Z4=["data-test-id"],J4={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(e,{emit:n}){const t=dn(),r=e,i=te(r.item),o=me(()=>{const u=t.summaryPrices,f=[];return t.isRecurringPricingSchema?(f.push({label:"One Time Price",value:u.oneTimePrice,highlight:!1}),f.push({label:t.showYearlyPricing?"Yearly Price":"Monthly Price",value:u.recurringPrice,highlight:!1})):(f.push({label:"Base Price",value:u.basePrice,highlight:!1}),f.push({label:"Add Ons",value:u.addOns,highlight:!1}),f.push({label:"Total Price",value:u.total,highlight:!1})),f}),a=n,s=()=>{r.disabled||a("continue")};return(u,f)=>(V(),J("footer",z4,[C("div",K4,[he(Do,{value:i.value.qty,"onUpdate:value":f[0]||(f[0]=c=>i.value.qty=c),min:1,max:999,disabled:e.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),C("div",X4,[(V(!0),J(be,null,Me(o.value,(c,v)=>(V(),J(be,{key:v},[C("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${v}`},[C("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${v}`},xe(c.label),9,G4),C("span",{class:we(["ect-text-left",c.highlight?"ect-text-lg ect-font-bold ect-text-green-700":"ect-text-sm ect-font-medium ect-text-gray-800 "]),"data-test-id":`configurator-footer-price-value-${v}`},xe(Ne(Pt)(c.value)),11,Q4)],8,W4),v<o.value.length-1?(V(),J("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${v}`},null,8,Z4)):ge("",!0)],64))),128))]),he(Ut,{class:"ect-min-w-[100px]",btype:e.disabled?"secondary":"primary",disabled:e.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:s},{default:Ve(()=>[Fe(xe(e.btnText),1)]),_:1},8,["btype","disabled"])]))}},Y4={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},e6={class:"ect-sticky ect-top-0 ect-z-30 ect-bg-white ect-shadow-sm ect-p-3 ect-px-4 ect-border-b ect-border-gray-200 ect-flex ect-justify-between ect-items-center","data-test-id":"configurator-type-header-sticky"},t6={class:"ect-flex ect-flex-col"},n6={class:"ect-font-bold ect-text-text-success ect-leading-tight"},r6=["innerHTML"],i6={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},o6={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},a6={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},s6={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("section",Y4,[C("header",e6,[C("div",t6,[C("h2",n6,xe(e.title),1),e.description?(V(),J("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:e.description},null,8,r6)):ge("",!0)]),e.message?(V(),J("div",i6,[he(We,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),C("span",o6,xe(e.message),1)])):ge("",!0)]),C("div",a6,[Je(n.$slots,"default")])]))}},l6={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(e){const n=e,t=te(null);let r=null;return Ft(()=>{t.value&&!r&&(r=t.value.attachShadow({mode:"open"}),r.innerHTML=n.content)}),Ye(()=>n.content,i=>{r&&(r.innerHTML=i)}),(i,o)=>(V(),J("div",{ref_key:"host",ref:t},null,512))}},c6=["data-test-id"],u6=["data-test-id"],f6=["data-test-id"],d6=[C("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[C("g",{id:"Group"},[C("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),C("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],h6=["data-test-id"],p6=["data-test-id"],v6=["data-test-id"],g6=["data-test-id"],m6=["data-test-id"],y6=["data-test-id","innerHTML"],hn={__name:"Tag",props:{label:{type:String,default:""},value:{type:String,default:""},addButton:{type:Boolean,default:!1},editButton:{type:Boolean,default:!1},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>{const r=n.value;if(typeof r!="string")return!1;const i=new DOMParser().parseFromString(r,"text/html");return Array.from(i.body.childNodes).some(o=>o.nodeType===1)});return(r,i)=>e.addButton?(V(),J("div",{key:0,class:"ect-bg-orange-4 ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-orange-secondary","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-orange-secondary ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},[C("div",{"data-test-id":`${e.dataTestId}-add-icon`},d6,8,f6),Fe(" "+xe(e.label),1)],8,u6)],8,c6)):e.editButton?(V(),J("div",{key:1,class:"ect-bg-white ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-success","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-success ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},xe(e.label),9,p6)],8,h6)):(V(),J("div",{key:2,class:"ect-bg-white ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-rounded-md ect-border ect-border-solid ect-border-neutral-200","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-label`},xe(e.label),9,g6),e.value?(V(),J("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-separator`}," : ",8,m6)):ge("",!0),t.value?(V(),Ee(l6,{key:1,content:e.value},null,8,["content"])):e.value?(V(),J("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${e.dataTestId}-value`,innerHTML:e.value},null,8,y6)):ge("",!0)],8,v6))}},x6=["data-test-id"],_6=["data-test-id"],b6=["data-test-id"],C6=["type","step","min","data-test-id"],fs=Re({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:e=>["string","number","currency"].includes(e)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(e,{expose:n,emit:t}){const r=e,i=t,o=te(!1),a=te(!1),s=te(""),u=te(null),f=me(()=>r.type==="currency"?m(r.modelValue):r.type==="number"?y(r.modelValue):r.modelValue),c=me(()=>r.type==="string"?"text":"number"),v=me(()=>r.type==="currency"?"0.01":void 0),l=me(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?s.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?s.value=parseFloat(r.modelValue)||"0":s.value=r.modelValue,o.value=!0,sn(()=>{u.value&&(u.value.focus(),u.value.select())}))},p=()=>{let _=s.value;if(r.type==="number"||r.type==="currency"){const x=parseFloat(s.value);isNaN(x)?_=r.modelValue:_=r.type==="currency"?x.toFixed(2):x.toString()}_!==r.modelValue&&(i("update:modelValue",_),i("change",_)),o.value=!1},g=()=>{s.value=r.modelValue,o.value=!1},d=()=>{o.value&&p()},m=_=>!_||isNaN(_)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(_)),y=_=>!_||isNaN(_)?"0":new Intl.NumberFormat("en-US").format(parseFloat(_));return Ye(()=>r.modelValue,_=>{o.value||(s.value=_)}),n({startEditing:h,saveChanges:p,cancelEditing:g}),(_,x)=>{const b=l1("click-outside");return V(),J("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":e.dataTestId,onMouseenter:x[1]||(x[1]=S=>a.value=!0),onMouseleave:x[2]||(x[2]=S=>a.value=!1)},[o.value?ln((V(),J("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${e.dataTestId}-input-wrapper`},[ln(C("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":x[0]||(x[0]=S=>s.value=S),type:c.value,step:v.value,min:l.value,class:we(["ect-w-full ect-h-full ect-px-3 ect-bg-white ect-border ect-border-green-500 ect-rounded-sm ect-text-gray-700 ect-text-base ect-font-sans ect-outline-none ect-duration-200",_.$attrs.class]),"data-test-id":`${e.dataTestId}-input`,onKeyup:[ir(p,["enter"]),ir(g,["esc"])],onBlur:p},null,42,C6),[[Oh,s.value]])],8,b6)),[[b,d]]):(V(),J("div",{key:0,class:we(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!e.disabled}]),"data-test-id":`${e.dataTestId}-display`,onClick:h},[(V(),Ee(Wi(e.tag),ao(_.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${e.dataTestId}-text`}),{default:Ve(()=>[Fe(xe(f.value)+" ",1),he(We,{class:we(a.value&&!e.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${e.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,_6))],40,x6)}}},[["__scopeId","data-v-5cd60070"]]),L0=e=>(jt("data-v-b9675cf1"),e=e(),Ht(),e),w6=["data-test-id","data-publish-key"],E6={key:0,class:"ect-text-xs ect-text-gray-500 ect-text-white ect-font-medium ect-leading-tight ect-absolute ect-top-[-.7rem] ect-left-[-1rem] ect-bg-text-success ect-rounded-xl ect-px-2 ect-py-1"},A6={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},k6={key:0,class:"ect-w-16 ect-h-16 ect-flex ect-items-center ect-justify-center ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0"},O6=["src","alt"],S6={class:"ect-flex-1 ect-min-w-0"},I6={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},T6={class:"ect-flex ect-flex-row ect-gap-3"},B6=L0(()=>C("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1)),D6={class:"ect-flex ect-flex-col ect-max-w-[125px]"},R6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},L6=["innerHTML"],N6={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},F6=["data-test-id"],P6=["data-test-id"],M6={key:1,class:"ect-inline-block ect-mb-2"},q6={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},$6={class:"ect-flex ect-items-start ect-gap-2"},j6={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},H6=["src","alt"],V6={class:"ect-flex-1 ect-min-w-0"},U6={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},z6=["innerHTML"],K6={class:"temp-hidden"},X6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},W6={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},G6=["data-test-id"],Q6=["data-test-id"],Z6={key:1,class:"ect-inline-block ect-mb-2"},J6={class:"ect-flex ect-justify-between ect-items-center"},Y6={class:"ect-flex ect-flex-col"},e8=L0(()=>C("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1)),t8={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},n8=Re({__name:"ConfiguratorItem",props:{item:{type:Object,required:!0},name:{type:String,required:!0},description:{type:String,default:""},imageUrl:{type:String,default:""},price:{type:Number,required:!0},quantity:{type:Number,default:1},selected:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},attributes:{type:Array,default:()=>[]},size:{type:Number,default:1},minQuantity:{type:Number,default:null},maxQuantity:{type:Number,default:null},showImage:{type:Boolean,default:!1},option:{type:Object,default:null},isAttributes:{type:Boolean,default:!1},showAttributes:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:quantity","update:name","edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=te(null),o=te(0),a=te(t.item),s=me(()=>a.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":t.disabled?"ect-bg-light-bg-x ect-border-gray-200":t.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),u=me({get:()=>t.quantity,set:p=>r("update:quantity",p)}),f=me({get:()=>t.name,set:p=>r("update:name",p)}),c=p=>{r("update:quantity",p)},v=me(()=>{if(o.value===0)return t.tags;const g=Math.floor(o.value/120);return t.tags.slice(0,Math.max(1,g))}),l=me(()=>Math.max(0,t.tags.length-v.value.length)),h=()=>{if(i.value){const p=i.value,g=80,d=120,m=32,y=64;o.value=p.offsetWidth-g-d-m-y}};return Ft(()=>{sn(()=>{h()})}),Ye(()=>t.tags,()=>{sn(()=>{h()})},{deep:!0}),Ft(()=>{window.addEventListener("resize",h)}),(p,g)=>(V(),J("div",{ref_key:"containerRef",ref:i,class:we(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",s.value]),"data-test-id":`configurator-item-${e.item.itemId}`,"data-publish-key":e.item.publishKey},[e.item.relationshipInfo.relationship==="Kit"?(V(),J("div",E6," KIT ")):ge("",!0),e.size===1?(V(),J("div",A6,[e.showImage?(V(),J("div",k6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:f.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,O6)):(V(),Ee(We,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):ge("",!0),C("div",S6,[C("div",I6,[he(fs,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=d=>f.value=d),tag:"h3","data-test-id":"itemId"+e.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),C("div",T6,[C("div",{onClick:g[2]||(g[2]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[1]||(g[1]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),B6,C("div",D6,[he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[3]||(g[3]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),C("div",R6,[Je(p.$slots,"selection-control",{},void 0,!0)])])]),C("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,L6),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",N6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[4]||(g[4]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,F6)):ge("",!0),e.selected?(V(),J("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[5]||(g[5]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,P6)):ge("",!0)],64)):(V(),J("span",M6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[6]||(g[6]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0)])])):(V(),J("div",q6,[C("div",$6,[e.showImage?(V(),J("div",j6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:e.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,H6)):ge("",!0)])):ge("",!0),C("div",V6,[C("h3",U6,xe(e.name),1),C("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,z6),C("p",K6,xe(e.item.publishKey)+" :: "+xe(e.item.calculateRules),1)]),C("div",X6,[Je(p.$slots,"selection-control",{},void 0,!0)])]),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",W6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[7]||(g[7]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,G6)):ge("",!0),e.selected?(V(),J("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[8]||(g[8]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,Q6)):ge("",!0)],64)):(V(),J("span",Z6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[9]||(g[9]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0),C("div",J6,[C("div",{onClick:g[11]||(g[11]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[10]||(g[10]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),C("div",Y6,[e8,he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[12]||(g[12]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),e.selected&&e.isAttributes?(V(),J("div",t8,[Je(p.$slots,"default",{},void 0,!0)])):ge("",!0)],10,w6))}},[["__scopeId","data-v-b9675cf1"]]),r8={"af-ZA":",","sq-AL":",","ar-DZ":",","ar-BH":"٫","ar-EG":"٫","ar-IQ":"٫","ar-JO":"٫","ar-KW":"٫","ar-LB":"٫","ar-LY":",","ar-MA":",","ar-OM":"٫","ar-QA":"٫","ar-SA":"٫","ar-SD":"٫","ar-SY":"٫","ar-TN":",","ar-AE":"٫","ar-YE":"٫","hy-AM":",","az-AZ":",","bn-BD":".","bn-IN":".","eu-ES":",","be-BY":",","bs-BA":",","bg-BG":",","my-MM":".","ca-ES":",","ca-ES-EURO":",","zh-CN":".","zh-CN-PINYIN":".","zh-CN-STROKE":".","zh-HK":".","zh-HK-STROKE":".","zh-MO":".","zh-SG":".","zh-TW":".","zh-TW-STROKE":".","hr-HR":",","cs-CZ":",","da-DK":",","nl-AW":",","nl-BE":",","nl-NL":",","nl-SR":",","dz-BT":".","en-AG":".","en-AU":".","en-BS":".","en-BB":".","en-BZ":".","en-BM":".","en-BW":".","en-CM":".","en-CA":".","en-DE":",","en-KY":".","en-ER":".","en-FK":".","en-FJ":".","en-GM":".","en-GH":".","en-GI":".","en-GY":".","en-HK":".","en-IN":".","en-ID":".","en-IE":".","en-IE-EURO":".","en-JM":".","en-KE":".","en-LR":".","en-MG":".","en-MW":".","en-MY":".","en-MU":".","en-NA":".","en-NZ":".","en-NG":".","en-PK":".","en-PG":".","en-PH":".","en-RW":".","en-WS":".","en-SC":".","en-SL":".","en-SG":".","en-SX":".","en-SB":".","en-ZA":",","en-SH":".","en-SZ":".","en-TZ":".","en-TO":".","en-TT":".","en-UG":".","en-GB":".","en-US":".","en-VU":".","et-EE":",","fi-FI":",","fi-FI-EURO":",","fr-BE":",","fr-CA":",","fr-KM":",","fr-FR":",","fr-FR-EURO":",","fr-GN":",","fr-HT":",","fr-LU":",","fr-MR":",","fr-MC":",","fr-CH":",","fr-WF":",","ka-GE":",","de-AT":",","de-AT-EURO":",","de-BE":",","de-DE":",","de-DE-EURO":",","de-LU":",","de-LU-EURO":",","de-CH":".","el-GR":",","gu-IN":".","iw-IL":".","hi-IN":".","hu-HU":",","is-IS":",","in-ID":",","ga-IE":".","it-IT":",","it-CH":".","ja-JP":".","kn-IN":".","kk-KZ":",","km-KH":",","ko-KP":".","ko-KR":".","ky-KG":",","lo-LA":",","lv-LV":",","lt-LT":",","lu-CD":",","lb-LU":",","mk-MK":",","ms-BN":",","ms-MY":".","ml-IN":".","mt-MT":".","mi-NZ":".","mr-IN":".","ne-NP":".","no-NO":",","ps-AF":"٫","fa-IR":"٫","pl-PL":",","pt-AO":",","pt-BR":",","pt-CV":",","pt-MZ":",","pt-PT":",","pt-ST":",","ro-MD":",","ro-RO":",","rm-CH":".","rn-BI":",","ru-KZ":",","ru-RU":",","sr-BA":",","sr-RS":",","sh-BA":",","sh-ME":",","sh-ME-USD":",","sh-CS":",","sk-SK":",","sl-SI":",","so-DJ":".","so-SO":".","es-AR":",","es-BO":",","es-CL":",","es-CO":",","es-CR":",","es-CU":".","es-DO":".","es-EC":",","es-SV":".","es-GT":".","es-HN":".","es-MX":".","es-NI":".","es-PA":".","es-PY":",","es-PE":".","es-PR":".","es-ES":",","es-ES-EURO":",","es-US":".","es-UY":",","es-VE":",","sw-KE":".","sv-SE":",","tl-PH":".","tg-TJ":",","ta-IN":".","ta-LK":".","te-IN":".","th-TH":".","ti-ET":".","tr-TR":",","uk-UA":",","ur-PK":".","uz-LATN-UZ":",","vi-VN":",","cy-GB":".","xh-ZA":".","yo-BJ":".","zu-ZA":"."},i8={name:"CustomInput",components:{AppIcon:We},props:{editMode:{type:Boolean,default:!0},type:{type:String,default:"text"},max:{type:Number,default:500},label:{type:String,default:""},name:{type:String,default:""},showLabel:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},highlight:{type:Boolean,default:!1},placeholder:{type:String,default:""},error:{type:[Boolean,String],default:!1},cssClass:{type:Object,default:()=>({})},tooltip:{type:String,default:null},locale:{type:String,default:"en-US"},icon:{type:String,default:null},itooltip:{type:String,default:null},icolor:{type:String,default:"#7d7d7d"},ihover:{type:String,default:"#57c046"},icustom:{type:Boolean,default:!1},idisabled:{type:Boolean,default:!1},height:{type:Number,default:32},textAlignment:{type:String,default:"left"},decimalPrecision:{type:Number,default:0},allowNegatives:{type:Boolean,default:!1},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["update:modelValue","iclick","blur"],data(){return{initialValue:"",decimalSeprator:".",ctrl:!1}},computed:{getValue(){return this.modelValue?this.type==="currency"?String(this.modelValue).replace(".",this.decimalSeprator):String(this.modelValue):""},error_message(){return typeof this.error=="string"?this.error:this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},isHighlight(){return(this.initialValue===""||this.initialValue===null)&&(this.modelValue===""||this.modelValue===null)?!1:this.initialValue!==this.modelValue}},created(){this.initialValue=this.modelValue,this.decimalSeprator=this.type==="currency"?r8[this.locale]:"."},methods:{handlerInput(e){const n=e.target.value;this.type==="currency"?this.$emit("update:modelValue",n.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",n)},preventNonNumeric(e){if(this.type==="number"){const n=this.decimalPrecision,t=e.target.value,r=e.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&n===0){e.preventDefault();return}if(r==="."&&t.includes(".")){e.preventDefault();return}if(r==="."||t.includes(".")&&!t.endsWith(".")&&r!=="Backspace"){const i=t.split(".");if(i.length>1&&i[1].length>=n){e.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){e.preventDefault();return}}if(e.key==="Backspace"||this.ctrl)return!0;if(e.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&e.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(e.key)||e.preventDefault()}return!0},handlerKeyup(e){e.key==="Control"&&(this.ctrl=!1)}}},o8=["data-test-id"],a8=["for","data-test-id"],s8=["data-test-id"],l8=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],c8=["data-test-id"],u8=["data-test-id"];function f8(e,n,t,r,i,o){const a=er("AppIcon");return V(),J("div",{class:"input","data-test-id":t.dataTestId},[t.label&&t.showLabel?(V(),J("label",{key:0,class:we({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,a8)):ge("",!0),t.editMode?(V(),J("div",{key:1,class:we(["input-wrapper ect-w-full",{errorBorder_color:!!t.error,highlight:o.isHighlight&&t.highlight}]),"data-test-id":`${t.dataTestId}-wrapper`},[t.icon?(V(),Ee(a,{key:0,class:"input-wrapper_icon",icon:t.icon,hover:t.ihover,color:t.icolor,size:19,disabled:t.idisabled,custom:t.icustom,tooltip:t.itooltip,"data-test-id":`${t.dataTestId}-icon`,direction:"top-right",onClick:n[0]||(n[0]=s=>e.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):ge("",!0),C("input",{id:t.label,class:we(`ectheme-input-box ${t.size}`),type:t.type,style:ze({width:t.icon?"calc(100% - 36px)":"100%",height:`${t.height}px`,textAlign:t.textAlignment}),name:t.name,disabled:t.disabled,placeholder:t.placeholder,value:o.getValue,maxlength:t.max,readonly:t.isReadOnly,"data-test-id":`${t.dataTestId}-input`,onInput:n[1]||(n[1]=(...s)=>o.handlerInput&&o.handlerInput(...s)),onKeydown:n[2]||(n[2]=(...s)=>o.preventNonNumeric&&o.preventNonNumeric(...s)),onKeyup:n[3]||(n[3]=(...s)=>o.handlerKeyup&&o.handlerKeyup(...s)),onBlur:n[4]||(n[4]=s=>e.$emit("blur"))},null,46,l8)],10,s8)):ge("",!0),t.editMode?ge("",!0):(V(),J("p",{key:2,class:"value","data-test-id":`${t.dataTestId}-value`},xe(o.getValue),9,c8)),o.error_message?(V(),J("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,u8)):ge("",!0)],8,o8)}const d8=Re(i8,[["render",f8],["__scopeId","data-v-032ca141"]]),h8={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},p8=["data-test-id"];function v8(e,n,t,r,i,o){return V(),J("div",{class:"spinner","data-test-id":t.dataTestId},null,8,p8)}const g8={name:"CustomDropdown",components:{AppIcon:We,AtomSpinner:Re(h8,[["render",v8],["__scopeId","data-v-771ed032"]])},props:{label:{type:String,default:""},placeholder:{type:String,default:""},options:{type:Array,default:()=>[]},display:{type:Array,default:()=>[]},modelValue:{type:String,default:""},error:{type:[Boolean,String],default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},select:{type:Boolean,default:!1},lookup:{type:Boolean,default:!1},search:{type:Boolean,default:!1},badge:{type:String,default:void 0},highlight:{type:Boolean,default:!1},property:{type:Object,default:()=>({key:"value",value:"label",assigned:"assigned"})},dropdownTheme:{type:String,default:"light"},icon:{type:String,default:""},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["search","focus-in","focus-out","update:modelValue"],data:()=>({inputFocused:!1,value:"",isHover:!1,highlightedIndex:-1,initialValue:"",teleportStyle:{position:"absolute",top:"0px",left:"0px",width:"0px"}}),computed:{isHighlight(){return(this.initialValue===""||this.initialValue==null)&&(this.modelValue===""||this.modelValue==null)?!1:this.initialValue!==this.modelValue},error_message(){return this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},getOptions(){if(this.select&&this.search){const e=this.value.toLowerCase();return this.options.filter(n=>JSON.stringify(n).toLowerCase().includes(e))}else return this.options},getSelected(){let e=null;if(this.modelValue)e=this.options.find(n=>n[this.property.key]===this.modelValue);else if(!this.search){const n=this.options.find(t=>t[this.property.key]==="");n?e=n:this.placeholder?e={[this.property.value]:this.placeholder,[this.property.key]:""}:e={[this.property.value]:"--Select--",[this.property.key]:""}}return e||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top;return t<n&&r>n},dropdownStyle(){if(!this.$refs.triggerElement)return{};const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;return{position:"absolute",top:i?"auto":"100%",bottom:i?"100%":"auto",left:"0",width:"100%",zIndex:1e3}}},created(){this.initialValue=this.modelValue},mounted(){window.addEventListener("resize",this.updateDropdownPosition),window.addEventListener("scroll",this.updateDropdownPosition,!0)},beforeUnmount(){window.removeEventListener("resize",this.updateDropdownPosition),window.removeEventListener("scroll",this.updateDropdownPosition,!0)},methods:{updateDropdownPosition(){if(!this.$refs.triggerElement)return;const e=this.$refs.triggerElement.getBoundingClientRect(),n=200,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;this.teleportStyle={position:"absolute",top:`${i?e.top-n:e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}},subFieldsText(e){if(!this.display||this.display.length<1)return"";const n=[];return this.display.forEach(t=>{const r=this.subField(e,t);r&&n.push(r)}),n.join(" | ")},subField(e,n){return n?n.split(".").reduce((i,o)=>i[o]||"",e):e},lookupSearchHandler:or(function(e){this.value=e,this.search&&!this.select&&this.$emit("search",e)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(e){e&&(this.value="",this.$emit("update:modelValue",e[this.property.key]),this.search&&!this.select&&!this.lookup&&this.$emit("search",""),this.onInputFocusedOut(!0))},clear(){this.disabled||(this.value="",this.$emit("update:modelValue",null),this.search&&!this.select&&!this.lookup&&this.$emit("search",""))},onInputFocusedOut(e=!1){(!this.isHover||e)&&!this.disabled&&(e?(this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")):setTimeout(()=>{this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")},100))},highlightNextOption(){this.highlightedIndex<this.options.length-1&&this.highlightedIndex++},highlightPreviousOption(){this.highlightedIndex>0&&this.highlightedIndex--}}},m8=["data-test-id"],y8=["for","data-test-id"],x8={class:"input-container-box ect-grow ect-w-full"},_8=["data-test-id"],b8=["placeholder","disabled","data-test-id"],C8=["data-test-id"],w8=["title","data-test-id"],E8=["data-test-id"],A8=["data-test-id"],k8=["data-test-id"],O8=["data-test-id"],S8=["data-test-id","onClick"],I8=["data-test-id"],T8={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},B8=["data-test-id"],D8=["data-test-id"],R8=["data-test-id"],L8=["title","data-test-id"],N8=["data-test-id"];function F8(e,n,t,r,i,o){const a=er("AppIcon"),s=er("AtomSpinner");return V(),J("div",{ref:"dropdownWrapper",class:we(["customdropdown input-container",{dark:t.dropdownTheme==="dark"}]),"data-test-id":t.dataTestId,onMouseenter:n[7]||(n[7]=u=>e.isHover=!0),onMouseleave:n[8]||(n[8]=u=>e.isHover=!1)},[t.label?(V(),J("label",{key:0,class:we(["title_label",{error_color:!!t.error}]),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,y8)):ge("",!0),C("div",x8,[C("div",{ref:"triggerElement",class:we(["input-wrapper ectheme-input-box ect-w-full",{disabled:t.disabled,"input-error":t.error,highlight:o.isHighlight&&t.highlight,"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-trigger`,tabindex:"0",onFocusin:n[2]||(n[2]=(...u)=>o.handlerFocusIn&&o.handlerFocusIn(...u)),onFocusout:n[3]||(n[3]=u=>o.onInputFocusedOut(!1)),onKeydown:[n[4]||(n[4]=ir(u=>o.updateSelected(t.options[e.highlightedIndex]),["enter"])),n[5]||(n[5]=ir(mt((...u)=>o.highlightPreviousOption&&o.highlightPreviousOption(...u),["prevent"]),["up"])),n[6]||(n[6]=ir(mt((...u)=>o.highlightNextOption&&o.highlightNextOption(...u),["prevent"]),["down"]))]},[!t.modelValue&&t.search?ln((V(),J("input",{key:0,ref:"searchInput","onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),type:"text",name:"search",placeholder:t.placeholder,autocomplete:"off",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-input`,onInput:n[1]||(n[1]=mt(u=>o.lookupSearchHandler(u.target.value),["prevent"]))},null,40,b8)),[[li,e.value]]):(V(),J("div",{key:1,class:we(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-selection`},[o.getSelected?(V(),J(be,{key:0},[C("span",{title:o.getSelected[t.property.value],class:we(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!t.modelValue}]),"data-test-id":`${t.dataTestId}-selection-value`},[t.icon?(V(),Ee(a,{key:0,class:"ect-mr-0",icon:t.icon,size:14,color:"#5F5F5F","data-test-id":`${t.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):ge("",!0),Fe(" "+xe(o.getSelected[t.property.value]),1)],10,w8),t.badge&&o.getSelected[t.badge]?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-selection-badge`},xe(o.getSelected[t.badge]),9,E8)):ge("",!0)],64)):ge("",!0)],10,C8)),t.search?(V(),J(be,{key:2},[t.loading?(V(),Ee(s,{key:0,class:"spinner","data-test-id":`${t.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(V(),J("div",{key:1,class:"clear-button","data-test-id":`${t.dataTestId}-action-button`},[e.value||t.modelValue?(V(),Ee(a,{key:0,disabled:t.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${t.dataTestId}-clear-button`,onClick:o.clear},null,8,["disabled","data-test-id","onClick"])):(V(),Ee(a,{key:1,icon:"search",size:14,color:"#acacac",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,A8))],64)):(V(),Ee(a,{key:3,class:"clear-button",color:o.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:t.disabled,"data-test-id":`${t.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,_8),o.error_message?(V(),J("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,k8)):ge("",!0),o.getOptions&&e.inputFocused&&!t.disabled&&(t.select||t.lookup)?(V(),J("div",{key:1,ref:"dropdown",class:we(["dropdown",{"dropdown-above":o.shouldShowAbove}]),style:ze(o.dropdownStyle),"data-test-id":`${t.dataTestId}-dropdown`},[(V(!0),J(be,null,Me(o.getOptions,(u,f)=>(V(),J("div",{key:u[t.property.key],class:we(["dropdown-item",{highlighted:f===e.highlightedIndex,"ect-pointer-events-none":u[t.property.assigned]}]),"data-test-id":`${t.dataTestId}-option-${f}`,onClick:c=>o.updateSelected(u)},[C("div",{class:"name ect-items-center","data-test-id":`${t.dataTestId}-option-${f}-name`},[C("span",T8,[C("span",{class:we({"ect-text-zinc-400":u[t.property.assigned]}),"data-test-id":`${t.dataTestId}-option-${f}-value`},xe(u[t.property.value]==null?"Key and Value is Wrong":u[t.property.value]),11,B8),u[t.property.assigned]?(V(),J("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${t.dataTestId}-option-${f}-assigned`},"Assigned",8,D8)):ge("",!0)]),t.badge?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-option-${f}-badge`},xe(u[t.badge]),9,R8)):ge("",!0)],8,I8),C("div",{class:"info",title:o.subFieldsText(u),"data-test-id":`${t.dataTestId}-option-${f}-info`},[C("span",null,xe(o.subFieldsText(u)),1)],8,L8)],10,S8))),128)),!o.getOptions.length&&!t.loading&&(e.value||t.select)?(V(),J("div",{key:0,class:"no-items-found","data-test-id":`${t.dataTestId}-no-options`}," no options found ",8,N8)):ge("",!0)],14,O8)):ge("",!0)])],42,m8)}const N0=Re(g8,[["render",F8],["__scopeId","data-v-5ae4f6dc"]]);var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function P8(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),t}var F0={exports:{}};/*!
|
|
33
|
+
`+o):r.stack=o}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=lr(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Io.assertOptions(r,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),i!=null&&(de.isFunction(i)?t.paramsSerializer={serialize:i}:Io.assertOptions(i,{encode:fn.function,serialize:fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Io.assertOptions(t,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[t.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),t.headers=Jt.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let c,v=0,l;if(!u){const p=[I0.bind(this),void 0];for(p.unshift(...s),p.push(...f),l=p.length,c=Promise.resolve(t);v<l;)c=c.then(p[v++],p[v++]);return c}l=s.length;let h=t;for(;v<l;){const p=s[v++],g=s[v++];try{h=p(h)}catch(d){g.call(this,d);break}}try{c=I0.call(this,h)}catch(p){return Promise.reject(p)}for(v=0,l=f.length;v<l;)c=c.then(f[v++],f[v++]);return c}getUri(n){n=lr(this.defaults,n);const t=y0(n.baseURL,n.url,n.allowAbsoluteUrls);return c0(t,n.params,n.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(n){To.prototype[n]=function(t,r){return this.request(lr(r||{},{method:n,url:t,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(n){function t(r){return function(o,a,s){return this.request(lr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}To.prototype[n]=t(),To.prototype[n+"Form"]=t(!0)});const Bo=To;class cs{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},n(function(o,a,s){r.reason||(r.reason=new Pr(o,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new cs(function(i){n=i}),cancel:n}}}const e4=cs;function t4(e){return function(t){return e.apply(null,t)}}function n4(e){return de.isObject(e)&&e.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([e,n])=>{us[n]=e});const r4=us;function D0(e){const n=new Bo(e),t=Wu(Bo.prototype.request,n);return de.extend(t,Bo.prototype,n,{allOwnKeys:!0}),de.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return D0(lr(e,i))},t}const Ge=D0(is);Ge.Axios=Bo,Ge.CanceledError=Pr,Ge.CancelToken=e4,Ge.isCancel=p0,Ge.VERSION=T0,Ge.toFormData=wo,Ge.AxiosError=Le,Ge.Cancel=Ge.CanceledError,Ge.all=function(n){return Promise.all(n)},Ge.spread=t4,Ge.isAxiosError=n4,Ge.mergeConfig=lr,Ge.AxiosHeaders=Jt,Ge.formToJSON=e=>d0(de.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=S0.getAdapter,Ge.HttpStatusCode=r4,Ge.default=Ge;class i4{constructor(n,t,r,i){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":n,"X-Salesforce-Org-Type":t,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":i,"Content-Type":"application/json"}}}const R0=wt("comShare",()=>{const e=te(""),n=te(""),t=te(""),r=te(""),i=te(""),o=te(""),a=te(""),s=te("Single"),u=me(()=>s.value==="Single");async function f(c){e.value=c.orgType||"Production",n.value=c.orgId||"",t.value=c.userId||"",r.value=c.accountId||"",i.value=c.opportunityId||"",a.value=c.userLocale||"en_US",s.value=c.pricingSchema||"Single"}return{orgType:e,orgId:n,userId:t,accountId:r,opportunityId:i,userLocale:a,pricingSchema:s,quoteId:o,isSinglePricingSchema:u,setSetupData:f}});function o4(e){return e.offerData.pricingTypes.forEach(n=>{n.appliedOnField==="Catalog Price"?(e.catalogPrice=n,e.salesPrice=n.offerPrice,e.price=n.offerPrice):n.appliedOnField==="MRC"?(e.mrcPrice=n,e.mrc=n.offerPrice):n.appliedOnField==="YRC"&&(e.yrcPrice=n,e.yrc=n.offerPrice)}),e}function a4(e){const n=t=>Math.min(...t.options.map(r=>r.relationshipInfo.primarySortOrder));return e.forEach(t=>{t.itemTypes.forEach(r=>{r.options.sort((i,o)=>i.relationshipInfo.primarySortOrder-o.relationshipInfo.primarySortOrder||i.itemName.localeCompare(o.itemName))}),t.itemTypes.sort((r,i)=>n(r)-n(i)||r.itemTypeName.localeCompare(i.itemTypeName))}),e.sort((t,r)=>{const i=Math.min(...t.itemTypes.map(n)),o=Math.min(...r.itemTypes.map(n));return i-o||t.category.localeCompare(r.category)}),e}const s4=(e,n)=>{const t=(r,i)=>typeof i=="function"?void 0:i;return JSON.stringify(e,t)===JSON.stringify(n,t)};class l4 extends i4{constructor(n,t,r,i){super(n,t,r,i)}async getAvailableConfiguration(n){return(await Ge.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,n,{headers:this.headers})).data}async getLineItems({request:n}){const t=await Ge.post(`${this.awsURL}/quoting/getConfiguredLineItems`,n,{headers:this.headers});return console.info("getLineItems:response",t.data),t.data}async maintainQuoteConfiguration({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/maintainConfiguration`,n,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",t.data),t.data}async getProductCrossSells({objectId:n,productItemId:t}){const r=await Ge.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${t}&objectId=${n}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/addLines`,n,{headers:this.headers});return console.info("addLines:response",t.data),t.data}async evaluateConfigurationSelection({request:n}){const t=await Ge.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",n,{headers:this.headers});return console.info("evaluateConfigurationSelection:response",t.data),t.data}}const dn=wt("comConfigurator",()=>{const e=te(null),n=Qt(),t=R0(),r=fi(),i=te(null),o=te(null),a=te(null),s=te(null),u=te(null),f=te([]),c=te(null),v=te([]),l=te([]),h=te(null),p=te(new Map),g=te(!1),d=te({init:!1,configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),m=te(!1),y=me(()=>_.value&&!t.isSinglePricingSchema),_=me(()=>{var j;if(!s.value||!((j=s.value.categoryOptions)!=null&&j.length)>0)return!1;let M=!0,U=!0,Z=!0,z=null,F=!1;for(const se of s.value.categoryOptions)for(const fe of se.itemTypes)for(const ce of fe.options)ce.billingPeriod&&(z&&z!==ce.billingPeriod&&(Z=!1),z=ce.billingPeriod,!ce.yrcPrice&&ce.billingPeriod==="Monthly"&&(M=!1),!ce.mrcPrice&&ce.billingPeriod==="Yearly"&&(U=!1),F=!0);return M&&U&&Z&&F}),x=me(()=>!s4(s.value,u.value)),b=me(()=>{var U;const M=((U=s.value)==null?void 0:U.categoryOptions)||[];return M.forEach(Z=>{Z.itemTypes.forEach(z=>{z.selectedOptions=z.options.filter(F=>z.selected.includes(F.itemId)),z.totalPrice=function(){return z.selectedOptions.reduce((F,j)=>F+j.price*j.qty,0)||0},z.oneTimePrice=function(){return z.selectedOptions.filter(F=>!F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0},z.recurringPrice=function(){return z.selectedOptions.filter(F=>F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0}}),Z.selectedItemTypes=Z.itemTypes.filter(z=>z.selected.length>0),Z.totalPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.totalPrice(),0)},Z.oneTimePrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.oneTimePrice(),0)},Z.recurringPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.recurringPrice(),0)}}),M.filter(Z=>Z.itemTypes.filter(z=>z.selected.length>0).length>0)}),S=me(()=>b.value.reduce((M,U)=>M+U.totalPrice(),0)),A=me(()=>{if(!s.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const M=b.value.reduce((z,F)=>z+F.totalPrice(),0);let U=b.value.reduce((z,F)=>z+F.oneTimePrice(),0),Z=b.value.reduce((z,F)=>z+F.recurringPrice(),0);return s.value.billingPeriod?Z=(Z+s.value.price)*s.value.qty:U=(U+s.value.price)*s.value.qty,{basePrice:s.value.price,addOns:M,oneTimePrice:U,recurringPrice:Z,total:s.value.price*s.value.qty+M*s.value.qty+U+Z}}),I=me(()=>{var U,Z,z,F;const M=new Map;return(U=c.value)!=null&&U.productLineItem&&M.set((Z=c.value)==null?void 0:Z.productLineItem.XX_ORD1__Item__c,(z=c.value)==null?void 0:z.productLineItem),(F=c.value)==null||F.options.forEach(j=>{M.set(j.XX_ORD1__Item__c,j)}),M}),B=me(()=>{var U;const M=new Map;return s.value&&((U=s.value.categoryOptions)==null?void 0:U.length)>0&&s.value.categoryOptions.forEach(Z=>{Z.itemTypes.forEach(z=>{z.options.forEach(F=>{M.set(F.publishKey,F)})})}),M}),O=me(()=>{if(!s.value)return{};const M=z=>!z||!Array.isArray(z)?[]:z.filter(F=>F.apiName&&F.value!==null&&F.value!==void 0&&F.value!=="").map(F=>({fieldAPIName:F.apiName,value:F.dataType==="BOOLEAN"?F.value?"true":"false":F.dataType==="REFERENCE"?F.referenceRecordId||F.value||"":F.value||""})),U={itemId:s.value.itemId,qliId:s.value.qliId||null,name:s.value.itemName,qty:s.value.qty||1,salesPrice:s.value.price||0,mrc:s.value.mrc||null,yrc:s.value.yrc||null,attributes:M(s.value.attributes)},Z=[];return s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.options.forEach(j=>{F.selected.includes(j.itemId)&&Z.push({itemId:j.itemId,qliId:j.qliId||null,name:j.itemName,qty:j.qty||1,salesPrice:j.price||0,mrc:j.mrc||null,yrc:j.yrc||null,attributes:M(j.attributes)})})})}),{[s.value.itemId]:{product:U,options:Z}}}),E=(M,U)=>{if(!M||!Array.isArray(M))return[];const Z=new Map;return U.forEach(z=>{Z.set(z.fieldAPIName,z.value)}),M.map(z=>(z.value=Z.get(z.fieldAPIName)||null,z))};function k(M,U){console.log("updateCurrentConfiguration:newConfiguration",JSON.stringify(M)),console.log("updateCurrentConfiguration:suggestedConfigurations",JSON.stringify(U)),U&&(l.value=U.filter(z=>z.product.itemId!==M.product.itemId));const Z=new Map;M.options.forEach(z=>{Z.set(z.itemId,z)}),s.value.itemName=M.product.name,s.value.qty=M.product.qty,s.value.price=M.product.salesPrice,s.value.attributes=E(s.value.attributes,M.product.attributes),s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.selected=[],F.options.forEach(j=>{Z.has(j.itemId)&&(j.itemName=Z.get(j.itemId).name,j.qty=Z.get(j.itemId).qty,j.price=Z.get(j.itemId).salesPrice,j.qliId=Z.get(j.itemId).qliId,j.attributes=E(j.attributes,Z.get(j.itemId).attributes),F.selected.push(j.itemId))})})}),s.value={...s.value}}function R(){return{get getConfig(){return O.value},setConfig:k}}function N(M){s.value.qliId&&(s.value.qliBillingPeriod==="Monthly"&&!M?s.value.price=s.value.salesPrice||s.value.mrc:s.value.qliBillingPeriod==="Yearly"&&M&&(s.value.price=s.value.salesPrice)),s.value.categoryOptions.forEach(U=>{U.itemTypes.forEach(Z=>{Z.options.forEach(z=>{z.billingPeriod&&(z.price=(M?z.yrcPrice.offerPrice:z.mrcPrice.offerPrice)||z.price,z.qliId&&(z.qliBillingPeriod==="Monthly"&&!M?z.price=z.salesPrice||z.mrc:z.qliBillingPeriod==="Yearly"&&M&&(z.price=z.salesPrice)))})})})}function q(){s.value=null,u.value=null,f.value=[],a.value=null,c.value=null,h.value=null,p.value=new Map,g.value=!1,d.value.configuration=!1,d.value.lineItem=!1,d.value.productOptionsPricing=!1,d.value.bestOfferPrice=!1,d.value.lineItemAttributes=!1,d.value.save=!1}function G(M,U,Z,z){e.value=new l4(M,U,Z,z)}async function Y(M,U,Z){d.value.init=!0,console.time("CONFIGURATOR INIT CONFIGURATOR"),q(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),o.value=M,a.value=U,i.value=Z||t.quoteId;const z=await ne();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),s.value=Q(z),a.value?(await w(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),P(s.value),s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{P(se),(I.value.has(se.itemId)||se.relationshipInfo.relationship==="Kit")&&j.selected.push(se.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4")):w(),u.value=JSON.parse(JSON.stringify(s.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR"),d.value.init=!1}async function ne(){try{const M={accountId:t.accountId,objectId:i.value,itemId:o.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},U=await e.value.getAvailableConfiguration(M);console.info("getAvailableConfiguration:result",U);const Z=U.data.productConfiguration;return Z.categoryOptions=a4(Z.categoryOptions),Z}catch(M){return console.info("error",M.message),!1}}function Q(M){p.value.set(a.value,M.attributes),f.value=M.configRules;const U=new Set;return f.value.forEach(Z=>{const z=JSON.parse(Z.ruleJson);z.optionSelected.forEach(F=>{U.add(F)}),z.affectedOptions.forEach(F=>{U.add(F)})}),console.info("rulesByPublishKey",U),P(M),M.categoryOptions.forEach(Z=>{Z.key=Z.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),Z.itemTypes.forEach(z=>{z.selected=[],z.numberOfColumns||(z.numberOfColumns=1),z.numberOfColumns>1&&(z.lightboxAttributes=!0),z.maxNumber||(z.maxNumber=100),z.minNumber||(z.minNumber=0),z.maxQuantity||(z.maxQuantity=1e4),z.minQuantity||(z.minQuantity=1),z.maxNumber===1?(z.isRadio=!0,z.minMessage="Please select 1 option",z.maxMessage="",z.isKit=z.options.some(F=>F.relationshipInfo.relationship==="Kit")):(z.minMessage=`Minimum of ${z.minNumber} selection${z.minNumber!==1?"s":""} required`,z.maxMessage=`Maximum of ${z.maxNumber} selection${z.maxNumber!==1?"s":""} allowed`),z.options.forEach(F=>{Z.showImage=Z.showImage||!!F.defaultImageURL,F.showAttributesModal=!1,F.calculateRules=U.has("option."+F.publishKey),console.info("option.calculateRules",F.calculateRules),F.qty=z.minQuantity||1,F.getTags=()=>(F.attributes=F.attributes||[],F.attributes.filter(j=>j.value!==null&&j.value!=="").map(j=>({label:j.label,value:j.value}))),Object.defineProperty(F,"isDisabled",{get:function(){return F.relationshipInfo.relationship==="Kit"||(z.isRadio?z.isKit:!z.selected.includes(F.itemId)&&z.maxNumber===z.selected.length)}}),P(F)})})}),M}function P(M){M.isAttributes=M.attributes&&M.attributes.length>0;const U=M.catalogItem;if(I.value.has(M.itemId)){const Z=I.value.get(M.itemId);M.qliId=Z.Id,M.qty=Z.XX_ORD1__QTY__c,M.itemName=Z.XX_ORD1__Line_Description__c,M.billingPeriod=Z.XX_ORD1__Billing_Period__c,M.price=Z.XX_ORD1__Sales_Price__c,M.billingPeriod?M.price=Z.XX_ORD1__Sales_Price__c||Z.XX_ORD1__MRC__c:M.price=Z.XX_ORD1__NRC__c||Z.XX_ORD1__Sales_Price__c,M.salesPrice=Z.XX_ORD1__Sales_Price__c,M.nrc=Z.XX_ORD1__NRC__c,M.mrc=Z.XX_ORD1__MRC__c,M.qliBillingPeriod=Z.XX_ORD1__Billing_Period__c,p.value.set(M.qliId,M.attributes)}else M.itemName=U.XX_ORD1__Line_Description__c||M.itemName,M.price=U.XX_ORD1__Negotiated_Price__c||U.XX_ORD1__NRC_for_New__c,M.nrcPrice=U.XX_ORD1__NRC_for_New__c,M.qty=M.qty||1,o4(M)}async function w(){d.value.lineItem=!0,console.info("getLineItems",i.value,a.value);try{const M={objectId:i.value,filters:{},additionalFields:["Name","XX_ORD1__Line_Description__c","XX_ORD1__SYS_Configuration_Status2__c"],primarySort:{field:"CreatedDate",direction:"DESC"},productPage:{limit:200,offset:0,productLineItemId:a.value}},U=await e.value.getLineItems({request:JSON.stringify(M)});return(U.data.products||[]).forEach(z=>{const F=z.productLineItem;F.Id===a.value?c.value=z:v.value.push(F)}),console.info("lineItem.value",c.value),console.info("configurableLineItems.value",v.value),d.value.lineItem=!1,U}catch(M){return console.info("error",M.message),d.value.lineItem=!1,!1}}async function D(M){console.info("getRecords");try{const U=await window.productManagerController.getRecords({request:JSON.stringify(M)});return console.info("getRecords:result",U),JSON.parse(U.data)}catch(U){return console.info("error",U.message),!1}}async function L(){g.value=!0,d.value.save=!0,console.info("maintainQuoteConfiguration");const M=[],U=[];s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{j.selected.includes(se.itemId)?M.push($(se)):se.qliId&&U.push(se.qliId)})})});const Z={objectId:i.value,eCatalogId:t.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:U,grandFatheredOptionsToRemove:[],productLineItem:{...$(s.value),optionLineItems:M}};console.info("maintainQuoteConfiguration:request",Z);const z=await e.value.maintainQuoteConfiguration({request:JSON.stringify(Z)});if(console.info("maintainQuoteConfiguration:result",z),z!=null&&z.error){const F={title:"Unable to Save Configuration",description:z.error,button:{label:"Back to Configuration",action:()=>{g.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+i.value)}}};n.errorPopup=F}else if(u.value=JSON.parse(JSON.stringify(s.value)),console.info("maintainQuoteConfiguration:result",z),d.value.save=!1,!a.value)return s.value.qliId=z.data.productLineItem.lineItemId,a.value=z.data.productLineItem.lineItemId,z.data.productLineItem.lineItemId;d.value.save=!1}function $(M){const U={};M.isAttributes&&M.attributes.forEach(z=>{!z.apiName.includes(".")&&z.value!==null&&z.value!==void 0&&(z.dataType==="BOOLEAN"?U[z.apiName]=z.value?"true":"false":z.dataType==="REFERENCE"?U[z.apiName]=z.referenceRecordId:U[z.apiName]=z.value)});const Z={attributes:U,itemId:M.itemId,lineItemId:M.qliId,lineDescription:M.itemName,qty:M.qty,billingPeriod:M.billingPeriod,...M.offer};return M.billingPeriod&&_.value&&!t.isSinglePricingSchema&&(Z.billingPeriod=m.value?"Yearly":"Monthly"),!t.isSinglePricingSchema&&!M.billingPeriod?Z.nrcPrice=M.price:(Z.applyOnField="Catalog Price",Z.salesPrice=M.price,Z.nrcPrice=M.nrcPrice),Z}async function W(){const M={objectId:t.accountId,productItemId:o.value};try{let U=await e.value.getProductCrossSells(M);const{crossSells:Z,offerResult:z}=U.data;if(Z.length===0)return[];const F=new Map;return z.forEach(j=>{F.set(j.eCatalogItemId,{...j,...j.pricingTypes[0]})}),Z.forEach(j=>{j.loading=!1,j.Name=j.XX_ORD1__Line_Description__c||j.XX_ORD1__Item__r.Name,j.Description=j.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,F.has(j.Id)?(j.Price=F.get(j.Id).offerPrice,j.priceFormatted=F.get(j.Id).formattedOfferPrice,j.offer={offerDiscount:F.get(j.Id).offerDiscount,offerId:F.get(j.Id).offerId,offerType:F.get(j.Id).offerType}):(j.Price=j.XX_ORD1__List_Price2__c,j.priceFormatted=j.XX_ORD1__List_Price2__c,j.offer={offerDiscount:0,offerId:null,offerType:null})}),Z}catch(U){return console.info("error",U.message),!1}}const H=M=>!M||!Array.isArray(M)?[]:M.filter(U=>U.apiName&&U.value!==null&&U.value!==void 0&&U.value!=="").map(U=>({attrName:U.apiName,attrValue:U.dataType==="BOOLEAN"?U.value:U.value||"",dataType:U.dataType}));async function X(M,U){const Z={product:{publishKey:s.value.publishKey,attributes:H(s.value.attributes),lineDescription:s.value.itemName,meta:{XX_ORD1__Sales_Price__c:s.value.price,XX_ORD1__MRC__c:s.value.mrc,XX_ORD1__NRC__c:s.value.nrc,XX_ORD1__YRC__c:s.value.yrc,quantity:s.value.qty}},options:[]};s.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(se=>{se.options.forEach(fe=>{se.selected.includes(fe.itemId)&&Z.options.push({publishKey:fe.publishKey,attributes:H(fe.attributes),lineDescription:fe.itemName,meta:{XX_ORD1__Sales_Price__c:fe.price,XX_ORD1__MRC__c:fe.mrc,XX_ORD1__NRC__c:fe.nrc,XX_ORD1__YRC__c:fe.yrc,quantity:fe.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",Z.options);const z={itemId:o.value,currentConfig:Z,selected:M?{publishKey:M==null?void 0:M.publishKey,attributes:H(M.attributes),lineDescription:M.itemName}:{},unselected:U?{publishKey:U==null?void 0:U.publishKey,attributes:H(U.attributes),lineDescription:U.itemName}:{}};return await e.value.evaluateConfigurationSelection({request:JSON.stringify(z)})}async function ee(M){const U={objectId:i.value,lstLIRequest:[{eCatalogItemId:M.Id,quantity:1,offerApplicable:M.offer}]};try{const Z=await e.value.addLines({request:JSON.stringify(U)});console.info("addLines:result",Z)}catch(Z){return console.info("error",Z.message),!1}}return{itemId:o,configuration:s,_configurationCopy:u,lineItem:c,savedScreen:g,loading:d,summary:b,addOns:S,summaryPrices:A,optionByItemId:I,attributesByQLIId:p,optionByPublishKey:B,showYearlyPricing:m,isYearlyPricingExist:_,isChangedConfiguration:x,isRecurringPricingSchema:y,configurableLineItems:v,suggestedConfigurations:l,initializeController:G,exposeProperties:R,updateCurrentConfiguration:k,changePricingScheme:N,addLines:ee,resetConfigurator:q,getRecords:D,getProductCrossSells:W,initConfigurator:Y,maintainQuoteConfiguration:L,evaluateConfigSelection:X}}),c4={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},u4={class:"ect-flex ect-items-center ect-gap-3"},f4={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},d4={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},h4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),p4={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},v4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),g4={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},m4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},"You may consider these products",-1),y4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},x4=["data-test-id"],_4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},b4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},C4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},w4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},E4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},A4={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},k4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),O4={class:"ect-flex ect-flex-col ect-gap-4"},S4=["data-test-id","onClick"],I4={class:"ect-flex ect-items-center ect-justify-center"},T4={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},B4=["data-test-id"],D4=["data-test-id"],R4={__name:"ConfiguratorRecommend",setup(e){const n=dn();fi();const t=me(()=>n.configuration),r=te(!0),i=te(""),o=te([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"}]),a=te(null),s=te([]),u=async p=>{p.loading=!0,await n.addLines(p),p.disabled=!0,p.loading=!1},f=me(()=>{var p;if(((p=n.suggestedConfigurations)==null?void 0:p.length)>0){const g=n.suggestedConfigurations[0];return{Name:g.product.name,Description:g.product.description,Price:g.product.salesPrice,XX_ORD1__Item__c:g.product.itemId}}return null}),c=p=>{p.action==="backToConfiguration"&&(n.savedScreen=!1)};async function v(){const p=n.configurableLineItems,g=p.filter(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;i.value=`(${p.length-g}/${p.length})`;const d=p.find(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&m.Id!=n.qliId);return a.value=d?{Name:d.XX_ORD1__Line_Description__c,Description:d.XX_ORD1__Product_Description__c,Price:d.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:d.XX_ORD1__Item__c,Id:d.Id}:null,p}async function l(){n.resetConfigurator(),await n.initConfigurator(f.value.XX_ORD1__Item__c,null),n.updateCurrentConfiguration(n.suggestedConfigurations[0],n.suggestedConfigurations)}async function h(){n.resetConfigurator(),n.initConfigurator(a.value.XX_ORD1__Item__c,a.value.Id)}return qn(async()=>{r.value=!0;const p=await v(),g=await n.getProductCrossSells(),d=new Set;p.forEach(m=>{d.add(m.XX_ORD1__Item__c)}),g.forEach(m=>{m.disabled=d.has(m.XX_ORD1__Item__c)}),s.value=g||[],r.value=!1}),(p,g)=>(V(),J(be,null,[C("div",c4,[C("div",u4,[he(We,{icon:"arrow",symbol:"",size:12,onClick:g[0]||(g[0]=d=>Ne(n).savedScreen=!1)}),C("h2",f4,xe(t.value.itemName),1)]),Ne(n).loading.save?(V(),J("div",d4,[he(Hu,{svg:""}),h4])):(V(),J("div",p4,[he(We,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),v4]))]),r.value?(V(),Ee($u,{key:0,type:"recommendations",rows:4})):s.value.length>0?(V(),J("div",g4,[m4,C("div",y4,[(V(!0),J(be,null,Me(s.value,(d,m)=>(V(),J("div",{key:d.Id||m,class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":`configurator-recommend-card-${d.Id||m}`},[C("div",_4,[C("h4",b4,xe(d.Name),1),C("p",C4,xe(d.Description),1)]),C("div",w4,[C("div",E4,xe(Ne(Pt)(d.Price)),1),he(Ut,{btype:d.disabled?"secondary":"primary","button-style":d.disabled?"normal":"outlined",size:"medium",class:we({"ect-w-[120px]":d.loading}),loading:d.loading,disabled:d.disabled||d.loading,"data-test-id":`configurator-recommend-button-add-${d.Id||m}`,onClick:y=>u(d)},{default:Ve(()=>[Fe(xe(d.loading?"":d.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,x4))),128))])])):(V(),J("div",A4,[k4,C("div",O4,[(V(!0),J(be,null,Me(o.value,(d,m)=>(V(),J("div",{key:d.title||m,class:"ect-bg-white ect-border ect-border-[#DEDEDE] ect-rounded-xl ect-p-4 md:ect-p-5 lg:ect-p-6 ect-flex ect-flex-col ect-items-center ect-gap-4 md:ect-gap-6 lg:ect-gap-8 ect-cursor-pointer ect-transition-all ect-duration-200 hover:ect-shadow-md hover:ect-border-gray-400","data-test-id":`configurator-recommend-redirect-card-${m}`,onClick:y=>c(d)},[C("div",I4,[he(We,{icon:d.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${m}`},null,8,["icon","data-test-id"])]),C("div",T4,[C("h4",{class:"ect-text-sm ect-font-semibold ect-text-[#5F5F5F] ect-text-center ect-leading-[1.43]","data-test-id":`configurator-recommend-redirect-title-${m}`},xe(d.title),9,B4),C("p",{class:"ect-text-sm ect-font-normal ect-text-[#828282] ect-text-center ect-leading-[1.71]","data-test-id":`configurator-recommend-redirect-description-${m}`},xe(d.description),9,D4)])],8,S4))),128))])])),f.value?(V(),Ee(ju,{key:3,title:"Configuere next AI suggested product","configuered-product":f.value,"count-configued-product-string":i.value,onConfigureNextProduct:l},null,8,["configuered-product","count-configued-product-string"])):(V(),Ee(ju,{key:4,title:`Configuere next product from your quote ${i.value}`,"configuered-product":a.value,"count-configued-product-string":i.value,onConfigureNextProduct:h},null,8,["title","configuered-product","count-configued-product-string"]))],64))}},L4=["data-test-id"],N4=Re({__name:"AppPill",props:{variant:{type:String,default:"",validator:e=>["success","error",""].includes(e)},dataTestId:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("span",{class:we(["ect-pill",{"ect-pill-success":e.variant==="success","ect-pill-error":e.variant==="error","ect-pill-default":!e.variant}]),"data-test-id":e.dataTestId},[Je(n.$slots,"default",{},void 0,!0)],10,L4))}},[["__scopeId","data-v-c7f05fa0"]]),F4=["data-test-id"],P4=["data-test-id"],M4=["data-test-id","onClick"],q4=["data-test-id"],$4=Re({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:e=>e.every(n=>typeof n=="object"&&n.title&&n.key&&(n.sections===void 0||Array.isArray(n.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>{var a;return t.modelValue||((a=t.tabs[0])==null?void 0:a.key)||""}),o=a=>{r("update:modelValue",a),r("tab-change",a)};return(a,s)=>(V(),J("div",{class:"ect-page-tabs","data-test-id":e.dataTestId},[e.showTabs?(V(),J("div",{key:0,class:we(["ect-page-tabs-header",[{"ect-tab-border":e.border}]]),"data-test-id":`${e.dataTestId}-header`},[(V(!0),J(be,null,Me(e.tabs,u=>(V(),J("button",{key:u.key,class:we(["ect-page-tab-button",`ect-page-tab-button${i.value===u.key?"-active":""} ${u.tabClass||""}`]),"data-test-id":`${e.dataTestId}-tab-${u.key}`,onClick:f=>o(u.key)},[Fe(xe(u.title)+" ",1),u.pill!==void 0&&u.pill!==null?(V(),Ee(N4,{key:0,class:"ect-ml-2",variant:u.pillStyle,"data-test-id":`${e.dataTestId}-tab-${u.key}-pill`},{default:Ve(()=>[Fe(xe(u.pill),1)]),_:2},1032,["variant","data-test-id"])):ge("",!0)],10,M4))),128))],10,P4)):ge("",!0),C("div",{class:"ect-page-tab-content","data-test-id":`${e.dataTestId}-content`},null,8,q4)],8,F4))}},[["__scopeId","data-v-f22cb1ed"]]),j4=["data-test-id"],H4=["disabled","data-test-id"],V4=["value","disabled","data-test-id"],U4=["disabled","data-test-id"],Do={__name:"CounterButton",props:{value:{type:Number,required:!0,default:null},min:{type:Number,default:1},max:{type:Number,default:999},empty:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:value","change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.min==null?0:t.min),o=me(()=>t.max==null?999:t.max),a=(x,b,S)=>Math.min(Math.max(x,b),S),s=x=>{if(x==null||x==="")return NaN;const b=Number(x);return Number.isFinite(b)?b:NaN},u=te(null),f=te(t.value??i.value),c=x=>{f.value=a(x,i.value,o.value)};t.value!==null&&c(t.value);const v=me(()=>f.value),l=me(()=>u.value!=null?u.value:String(v.value)),h=me(()=>t.disabled||v.value<=i.value),p=me(()=>t.disabled||v.value>=o.value);function g(x){x!==t.value&&(f.value=x,r("update:value",x),r("change",x))}function d(){if(h.value)return;const x=a(v.value-1,i.value,o.value);u.value=null,g(x)}function m(){if(p.value)return;const x=a(v.value+1,i.value,o.value);u.value=null,g(x)}function y(x){const S=String(x.target.value??"").replace(/\D+/g,"");u.value=S}function _(){const x=s(u.value),b=i.value,S=a(Number.isNaN(x)?b:x,i.value,o.value);u.value=null,g(S)}return(x,b)=>(V(),J("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":e.dataTestId},[C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":h.value,"ect-cursor-not-allowed":h.value}]),disabled:h.value,"data-test-id":`${e.dataTestId}-decrement`,onClick:d}," - ",10,H4),C("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:e.empty?"":l.value,disabled:e.disabled,class:"ect-h-7 ect-w-[48px] ect-px-2 ect-border ect-border-gray ect-rounded-md ect-text-center ect-text-sm ect-font-medium ect-text-gray-900 focus:ect-outline-none focus:ect-border-gray-400 ect-bg-white","data-test-id":`${e.dataTestId}-input`,onInput:y,onBlur:_},null,40,V4),C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":p.value,"ect-cursor-not-allowed":p.value}]),disabled:p.value,"data-test-id":`${e.dataTestId}-increment`,onClick:m}," + ",10,U4)],8,j4))}},z4={class:"ect-flex ect-justify-end ect-items-center ect-gap-2.5 ect-px-6 ect-py-4 ect-bg-white ect-border-t ect-border-gray-300 ect-shadow-[0_-2px_4px_0px_rgba(0,0,0,0.11)]","data-test-id":"configurator-footer"},K4={"data-test-id":"configurator-footer-quantity"},X4={class:"ect-flex ect-justify-end ect-items-center ect-gap-6 ect-px-8 ect-py-0 ect-flex-1","data-test-id":"configurator-footer-prices"},W4=["data-test-id"],G4=["data-test-id"],Q4=["data-test-id"],Z4=["data-test-id"],J4={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(e,{emit:n}){const t=dn(),r=e,i=te(r.item),o=me(()=>{const u=t.summaryPrices,f=[];return t.isRecurringPricingSchema?(f.push({label:"One Time Price",value:u.oneTimePrice,highlight:!1}),f.push({label:t.showYearlyPricing?"Yearly Price":"Monthly Price",value:u.recurringPrice,highlight:!1})):(f.push({label:"Base Price",value:u.basePrice,highlight:!1}),f.push({label:"Add Ons",value:u.addOns,highlight:!1}),f.push({label:"Total Price",value:u.total,highlight:!1})),f}),a=n,s=()=>{r.disabled||a("continue")};return(u,f)=>(V(),J("footer",z4,[C("div",K4,[he(Do,{value:i.value.qty,"onUpdate:value":f[0]||(f[0]=c=>i.value.qty=c),min:1,max:999,disabled:e.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),C("div",X4,[(V(!0),J(be,null,Me(o.value,(c,v)=>(V(),J(be,{key:v},[C("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${v}`},[C("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${v}`},xe(c.label),9,G4),C("span",{class:we(["ect-text-left",c.highlight?"ect-text-lg ect-font-bold ect-text-green-700":"ect-text-sm ect-font-medium ect-text-gray-800 "]),"data-test-id":`configurator-footer-price-value-${v}`},xe(Ne(Pt)(c.value)),11,Q4)],8,W4),v<o.value.length-1?(V(),J("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${v}`},null,8,Z4)):ge("",!0)],64))),128))]),he(Ut,{class:"ect-min-w-[100px]",btype:e.disabled?"secondary":"primary",disabled:e.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:s},{default:Ve(()=>[Fe(xe(e.btnText),1)]),_:1},8,["btype","disabled"])]))}},Y4={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},e6={class:"ect-sticky ect-top-0 ect-z-30 ect-bg-white ect-shadow-sm ect-p-3 ect-px-4 ect-border-b ect-border-gray-200 ect-flex ect-justify-between ect-items-center","data-test-id":"configurator-type-header-sticky"},t6={class:"ect-flex ect-flex-col"},n6={class:"ect-font-bold ect-text-text-success ect-leading-tight"},r6=["innerHTML"],i6={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},o6={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},a6={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},s6={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("section",Y4,[C("header",e6,[C("div",t6,[C("h2",n6,xe(e.title),1),e.description?(V(),J("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:e.description},null,8,r6)):ge("",!0)]),e.message?(V(),J("div",i6,[he(We,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),C("span",o6,xe(e.message),1)])):ge("",!0)]),C("div",a6,[Je(n.$slots,"default")])]))}},l6={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(e){const n=e,t=te(null);let r=null;return Ft(()=>{t.value&&!r&&(r=t.value.attachShadow({mode:"open"}),r.innerHTML=n.content)}),Ye(()=>n.content,i=>{r&&(r.innerHTML=i)}),(i,o)=>(V(),J("div",{ref_key:"host",ref:t},null,512))}},c6=["data-test-id"],u6=["data-test-id"],f6=["data-test-id"],d6=[C("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[C("g",{id:"Group"},[C("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),C("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],h6=["data-test-id"],p6=["data-test-id"],v6=["data-test-id"],g6=["data-test-id"],m6=["data-test-id"],y6=["data-test-id","innerHTML"],hn={__name:"Tag",props:{label:{type:String,default:""},value:{type:String,default:""},addButton:{type:Boolean,default:!1},editButton:{type:Boolean,default:!1},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>{const r=n.value;if(typeof r!="string")return!1;const i=new DOMParser().parseFromString(r,"text/html");return Array.from(i.body.childNodes).some(o=>o.nodeType===1)});return(r,i)=>e.addButton?(V(),J("div",{key:0,class:"ect-bg-orange-4 ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-orange-secondary","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-orange-secondary ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},[C("div",{"data-test-id":`${e.dataTestId}-add-icon`},d6,8,f6),Fe(" "+xe(e.label),1)],8,u6)],8,c6)):e.editButton?(V(),J("div",{key:1,class:"ect-bg-white ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-success","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-success ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},xe(e.label),9,p6)],8,h6)):(V(),J("div",{key:2,class:"ect-bg-white ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-rounded-md ect-border ect-border-solid ect-border-neutral-200","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-label`},xe(e.label),9,g6),e.value?(V(),J("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-separator`}," : ",8,m6)):ge("",!0),t.value?(V(),Ee(l6,{key:1,content:e.value},null,8,["content"])):e.value?(V(),J("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${e.dataTestId}-value`,innerHTML:e.value},null,8,y6)):ge("",!0)],8,v6))}},x6=["data-test-id"],_6=["data-test-id"],b6=["data-test-id"],C6=["type","step","min","data-test-id"],fs=Re({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:e=>["string","number","currency"].includes(e)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(e,{expose:n,emit:t}){const r=e,i=t,o=te(!1),a=te(!1),s=te(""),u=te(null),f=me(()=>r.type==="currency"?m(r.modelValue):r.type==="number"?y(r.modelValue):r.modelValue),c=me(()=>r.type==="string"?"text":"number"),v=me(()=>r.type==="currency"?"0.01":void 0),l=me(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?s.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?s.value=parseFloat(r.modelValue)||"0":s.value=r.modelValue,o.value=!0,sn(()=>{u.value&&(u.value.focus(),u.value.select())}))},p=()=>{let _=s.value;if(r.type==="number"||r.type==="currency"){const x=parseFloat(s.value);isNaN(x)?_=r.modelValue:_=r.type==="currency"?x.toFixed(2):x.toString()}_!==r.modelValue&&(i("update:modelValue",_),i("change",_)),o.value=!1},g=()=>{s.value=r.modelValue,o.value=!1},d=()=>{o.value&&p()},m=_=>!_||isNaN(_)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(_)),y=_=>!_||isNaN(_)?"0":new Intl.NumberFormat("en-US").format(parseFloat(_));return Ye(()=>r.modelValue,_=>{o.value||(s.value=_)}),n({startEditing:h,saveChanges:p,cancelEditing:g}),(_,x)=>{const b=l1("click-outside");return V(),J("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":e.dataTestId,onMouseenter:x[1]||(x[1]=S=>a.value=!0),onMouseleave:x[2]||(x[2]=S=>a.value=!1)},[o.value?ln((V(),J("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${e.dataTestId}-input-wrapper`},[ln(C("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":x[0]||(x[0]=S=>s.value=S),type:c.value,step:v.value,min:l.value,class:we(["ect-w-full ect-h-full ect-px-3 ect-bg-white ect-border ect-border-green-500 ect-rounded-sm ect-text-gray-700 ect-text-base ect-font-sans ect-outline-none ect-duration-200",_.$attrs.class]),"data-test-id":`${e.dataTestId}-input`,onKeyup:[ir(p,["enter"]),ir(g,["esc"])],onBlur:p},null,42,C6),[[Oh,s.value]])],8,b6)),[[b,d]]):(V(),J("div",{key:0,class:we(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!e.disabled}]),"data-test-id":`${e.dataTestId}-display`,onClick:h},[(V(),Ee(Wi(e.tag),ao(_.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${e.dataTestId}-text`}),{default:Ve(()=>[Fe(xe(f.value)+" ",1),he(We,{class:we(a.value&&!e.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${e.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,_6))],40,x6)}}},[["__scopeId","data-v-5cd60070"]]),L0=e=>(jt("data-v-b9675cf1"),e=e(),Ht(),e),w6=["data-test-id","data-publish-key"],E6={key:0,class:"ect-text-xs ect-text-gray-500 ect-text-white ect-font-medium ect-leading-tight ect-absolute ect-top-[-.7rem] ect-left-[-1rem] ect-bg-text-success ect-rounded-xl ect-px-2 ect-py-1"},A6={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},k6={key:0,class:"ect-w-16 ect-h-16 ect-flex ect-items-center ect-justify-center ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0"},O6=["src","alt"],S6={class:"ect-flex-1 ect-min-w-0"},I6={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},T6={class:"ect-flex ect-flex-row ect-gap-3"},B6=L0(()=>C("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1)),D6={class:"ect-flex ect-flex-col ect-max-w-[125px]"},R6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},L6=["innerHTML"],N6={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},F6=["data-test-id"],P6=["data-test-id"],M6={key:1,class:"ect-inline-block ect-mb-2"},q6={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},$6={class:"ect-flex ect-items-start ect-gap-2"},j6={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},H6=["src","alt"],V6={class:"ect-flex-1 ect-min-w-0"},U6={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},z6=["innerHTML"],K6={class:"temp-hidden"},X6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},W6={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},G6=["data-test-id"],Q6=["data-test-id"],Z6={key:1,class:"ect-inline-block ect-mb-2"},J6={class:"ect-flex ect-justify-between ect-items-center"},Y6={class:"ect-flex ect-flex-col"},e8=L0(()=>C("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1)),t8={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},n8=Re({__name:"ConfiguratorItem",props:{item:{type:Object,required:!0},name:{type:String,required:!0},description:{type:String,default:""},imageUrl:{type:String,default:""},price:{type:Number,required:!0},quantity:{type:Number,default:1},selected:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},attributes:{type:Array,default:()=>[]},size:{type:Number,default:1},minQuantity:{type:Number,default:null},maxQuantity:{type:Number,default:null},showImage:{type:Boolean,default:!1},option:{type:Object,default:null},isAttributes:{type:Boolean,default:!1},showAttributes:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:quantity","update:name","edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=te(null),o=te(0),a=te(t.item),s=me(()=>a.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":t.disabled?"ect-bg-light-bg-x ect-border-gray-200":t.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),u=me({get:()=>t.quantity,set:p=>r("update:quantity",p)}),f=me({get:()=>t.name,set:p=>r("update:name",p)}),c=p=>{r("update:quantity",p)},v=me(()=>{if(o.value===0)return t.tags;const g=Math.floor(o.value/120);return t.tags.slice(0,Math.max(1,g))}),l=me(()=>Math.max(0,t.tags.length-v.value.length)),h=()=>{if(i.value){const p=i.value,g=80,d=120,m=32,y=64;o.value=p.offsetWidth-g-d-m-y}};return Ft(()=>{sn(()=>{h()})}),Ye(()=>t.tags,()=>{sn(()=>{h()})},{deep:!0}),Ft(()=>{window.addEventListener("resize",h)}),(p,g)=>(V(),J("div",{ref_key:"containerRef",ref:i,class:we(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",s.value]),"data-test-id":`configurator-item-${e.item.itemId}`,"data-publish-key":e.item.publishKey},[e.item.relationshipInfo.relationship==="Kit"?(V(),J("div",E6," KIT ")):ge("",!0),e.size===1?(V(),J("div",A6,[e.showImage?(V(),J("div",k6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:f.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,O6)):(V(),Ee(We,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):ge("",!0),C("div",S6,[C("div",I6,[he(fs,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=d=>f.value=d),tag:"h3","data-test-id":"itemId"+e.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),C("div",T6,[C("div",{onClick:g[2]||(g[2]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[1]||(g[1]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),B6,C("div",D6,[he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[3]||(g[3]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),C("div",R6,[Je(p.$slots,"selection-control",{},void 0,!0)])])]),C("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,L6),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",N6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[4]||(g[4]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,F6)):ge("",!0),e.selected?(V(),J("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[5]||(g[5]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,P6)):ge("",!0)],64)):(V(),J("span",M6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[6]||(g[6]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0)])])):(V(),J("div",q6,[C("div",$6,[e.showImage?(V(),J("div",j6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:e.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,H6)):ge("",!0)])):ge("",!0),C("div",V6,[C("h3",U6,xe(e.name),1),C("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,z6),C("p",K6,xe(e.item.publishKey)+" :: "+xe(e.item.calculateRules),1)]),C("div",X6,[Je(p.$slots,"selection-control",{},void 0,!0)])]),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",W6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[7]||(g[7]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,G6)):ge("",!0),e.selected?(V(),J("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[8]||(g[8]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,Q6)):ge("",!0)],64)):(V(),J("span",Z6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[9]||(g[9]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0),C("div",J6,[C("div",{onClick:g[11]||(g[11]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[10]||(g[10]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),C("div",Y6,[e8,he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[12]||(g[12]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),e.selected&&e.isAttributes?(V(),J("div",t8,[Je(p.$slots,"default",{},void 0,!0)])):ge("",!0)],10,w6))}},[["__scopeId","data-v-b9675cf1"]]),r8={"af-ZA":",","sq-AL":",","ar-DZ":",","ar-BH":"٫","ar-EG":"٫","ar-IQ":"٫","ar-JO":"٫","ar-KW":"٫","ar-LB":"٫","ar-LY":",","ar-MA":",","ar-OM":"٫","ar-QA":"٫","ar-SA":"٫","ar-SD":"٫","ar-SY":"٫","ar-TN":",","ar-AE":"٫","ar-YE":"٫","hy-AM":",","az-AZ":",","bn-BD":".","bn-IN":".","eu-ES":",","be-BY":",","bs-BA":",","bg-BG":",","my-MM":".","ca-ES":",","ca-ES-EURO":",","zh-CN":".","zh-CN-PINYIN":".","zh-CN-STROKE":".","zh-HK":".","zh-HK-STROKE":".","zh-MO":".","zh-SG":".","zh-TW":".","zh-TW-STROKE":".","hr-HR":",","cs-CZ":",","da-DK":",","nl-AW":",","nl-BE":",","nl-NL":",","nl-SR":",","dz-BT":".","en-AG":".","en-AU":".","en-BS":".","en-BB":".","en-BZ":".","en-BM":".","en-BW":".","en-CM":".","en-CA":".","en-DE":",","en-KY":".","en-ER":".","en-FK":".","en-FJ":".","en-GM":".","en-GH":".","en-GI":".","en-GY":".","en-HK":".","en-IN":".","en-ID":".","en-IE":".","en-IE-EURO":".","en-JM":".","en-KE":".","en-LR":".","en-MG":".","en-MW":".","en-MY":".","en-MU":".","en-NA":".","en-NZ":".","en-NG":".","en-PK":".","en-PG":".","en-PH":".","en-RW":".","en-WS":".","en-SC":".","en-SL":".","en-SG":".","en-SX":".","en-SB":".","en-ZA":",","en-SH":".","en-SZ":".","en-TZ":".","en-TO":".","en-TT":".","en-UG":".","en-GB":".","en-US":".","en-VU":".","et-EE":",","fi-FI":",","fi-FI-EURO":",","fr-BE":",","fr-CA":",","fr-KM":",","fr-FR":",","fr-FR-EURO":",","fr-GN":",","fr-HT":",","fr-LU":",","fr-MR":",","fr-MC":",","fr-CH":",","fr-WF":",","ka-GE":",","de-AT":",","de-AT-EURO":",","de-BE":",","de-DE":",","de-DE-EURO":",","de-LU":",","de-LU-EURO":",","de-CH":".","el-GR":",","gu-IN":".","iw-IL":".","hi-IN":".","hu-HU":",","is-IS":",","in-ID":",","ga-IE":".","it-IT":",","it-CH":".","ja-JP":".","kn-IN":".","kk-KZ":",","km-KH":",","ko-KP":".","ko-KR":".","ky-KG":",","lo-LA":",","lv-LV":",","lt-LT":",","lu-CD":",","lb-LU":",","mk-MK":",","ms-BN":",","ms-MY":".","ml-IN":".","mt-MT":".","mi-NZ":".","mr-IN":".","ne-NP":".","no-NO":",","ps-AF":"٫","fa-IR":"٫","pl-PL":",","pt-AO":",","pt-BR":",","pt-CV":",","pt-MZ":",","pt-PT":",","pt-ST":",","ro-MD":",","ro-RO":",","rm-CH":".","rn-BI":",","ru-KZ":",","ru-RU":",","sr-BA":",","sr-RS":",","sh-BA":",","sh-ME":",","sh-ME-USD":",","sh-CS":",","sk-SK":",","sl-SI":",","so-DJ":".","so-SO":".","es-AR":",","es-BO":",","es-CL":",","es-CO":",","es-CR":",","es-CU":".","es-DO":".","es-EC":",","es-SV":".","es-GT":".","es-HN":".","es-MX":".","es-NI":".","es-PA":".","es-PY":",","es-PE":".","es-PR":".","es-ES":",","es-ES-EURO":",","es-US":".","es-UY":",","es-VE":",","sw-KE":".","sv-SE":",","tl-PH":".","tg-TJ":",","ta-IN":".","ta-LK":".","te-IN":".","th-TH":".","ti-ET":".","tr-TR":",","uk-UA":",","ur-PK":".","uz-LATN-UZ":",","vi-VN":",","cy-GB":".","xh-ZA":".","yo-BJ":".","zu-ZA":"."},i8={name:"CustomInput",components:{AppIcon:We},props:{editMode:{type:Boolean,default:!0},type:{type:String,default:"text"},max:{type:Number,default:500},label:{type:String,default:""},name:{type:String,default:""},showLabel:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},highlight:{type:Boolean,default:!1},placeholder:{type:String,default:""},error:{type:[Boolean,String],default:!1},cssClass:{type:Object,default:()=>({})},tooltip:{type:String,default:null},locale:{type:String,default:"en-US"},icon:{type:String,default:null},itooltip:{type:String,default:null},icolor:{type:String,default:"#7d7d7d"},ihover:{type:String,default:"#57c046"},icustom:{type:Boolean,default:!1},idisabled:{type:Boolean,default:!1},height:{type:Number,default:32},textAlignment:{type:String,default:"left"},decimalPrecision:{type:Number,default:0},allowNegatives:{type:Boolean,default:!1},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["update:modelValue","iclick","blur"],data(){return{initialValue:"",decimalSeprator:".",ctrl:!1}},computed:{getValue(){return this.modelValue?this.type==="currency"?String(this.modelValue).replace(".",this.decimalSeprator):String(this.modelValue):""},error_message(){return typeof this.error=="string"?this.error:this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},isHighlight(){return(this.initialValue===""||this.initialValue===null)&&(this.modelValue===""||this.modelValue===null)?!1:this.initialValue!==this.modelValue}},created(){this.initialValue=this.modelValue,this.decimalSeprator=this.type==="currency"?r8[this.locale]:"."},methods:{handlerInput(e){const n=e.target.value;this.type==="currency"?this.$emit("update:modelValue",n.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",n)},preventNonNumeric(e){if(this.type==="number"){const n=this.decimalPrecision,t=e.target.value,r=e.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&n===0){e.preventDefault();return}if(r==="."&&t.includes(".")){e.preventDefault();return}if(r==="."||t.includes(".")&&!t.endsWith(".")&&r!=="Backspace"){const i=t.split(".");if(i.length>1&&i[1].length>=n){e.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){e.preventDefault();return}}if(e.key==="Backspace"||this.ctrl)return!0;if(e.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&e.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(e.key)||e.preventDefault()}return!0},handlerKeyup(e){e.key==="Control"&&(this.ctrl=!1)}}},o8=["data-test-id"],a8=["for","data-test-id"],s8=["data-test-id"],l8=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],c8=["data-test-id"],u8=["data-test-id"];function f8(e,n,t,r,i,o){const a=er("AppIcon");return V(),J("div",{class:"input","data-test-id":t.dataTestId},[t.label&&t.showLabel?(V(),J("label",{key:0,class:we({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,a8)):ge("",!0),t.editMode?(V(),J("div",{key:1,class:we(["input-wrapper ect-w-full",{errorBorder_color:!!t.error,highlight:o.isHighlight&&t.highlight}]),"data-test-id":`${t.dataTestId}-wrapper`},[t.icon?(V(),Ee(a,{key:0,class:"input-wrapper_icon",icon:t.icon,hover:t.ihover,color:t.icolor,size:19,disabled:t.idisabled,custom:t.icustom,tooltip:t.itooltip,"data-test-id":`${t.dataTestId}-icon`,direction:"top-right",onClick:n[0]||(n[0]=s=>e.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):ge("",!0),C("input",{id:t.label,class:we(`ectheme-input-box ${t.size}`),type:t.type,style:ze({width:t.icon?"calc(100% - 36px)":"100%",height:`${t.height}px`,textAlign:t.textAlignment}),name:t.name,disabled:t.disabled,placeholder:t.placeholder,value:o.getValue,maxlength:t.max,readonly:t.isReadOnly,"data-test-id":`${t.dataTestId}-input`,onInput:n[1]||(n[1]=(...s)=>o.handlerInput&&o.handlerInput(...s)),onKeydown:n[2]||(n[2]=(...s)=>o.preventNonNumeric&&o.preventNonNumeric(...s)),onKeyup:n[3]||(n[3]=(...s)=>o.handlerKeyup&&o.handlerKeyup(...s)),onBlur:n[4]||(n[4]=s=>e.$emit("blur"))},null,46,l8)],10,s8)):ge("",!0),t.editMode?ge("",!0):(V(),J("p",{key:2,class:"value","data-test-id":`${t.dataTestId}-value`},xe(o.getValue),9,c8)),o.error_message?(V(),J("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,u8)):ge("",!0)],8,o8)}const d8=Re(i8,[["render",f8],["__scopeId","data-v-032ca141"]]),h8={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},p8=["data-test-id"];function v8(e,n,t,r,i,o){return V(),J("div",{class:"spinner","data-test-id":t.dataTestId},null,8,p8)}const g8={name:"CustomDropdown",components:{AppIcon:We,AtomSpinner:Re(h8,[["render",v8],["__scopeId","data-v-771ed032"]])},props:{label:{type:String,default:""},placeholder:{type:String,default:""},options:{type:Array,default:()=>[]},display:{type:Array,default:()=>[]},modelValue:{type:String,default:""},error:{type:[Boolean,String],default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},select:{type:Boolean,default:!1},lookup:{type:Boolean,default:!1},search:{type:Boolean,default:!1},badge:{type:String,default:void 0},highlight:{type:Boolean,default:!1},property:{type:Object,default:()=>({key:"value",value:"label",assigned:"assigned"})},dropdownTheme:{type:String,default:"light"},icon:{type:String,default:""},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["search","focus-in","focus-out","update:modelValue"],data:()=>({inputFocused:!1,value:"",isHover:!1,highlightedIndex:-1,initialValue:"",teleportStyle:{position:"absolute",top:"0px",left:"0px",width:"0px"}}),computed:{isHighlight(){return(this.initialValue===""||this.initialValue==null)&&(this.modelValue===""||this.modelValue==null)?!1:this.initialValue!==this.modelValue},error_message(){return this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},getOptions(){if(this.select&&this.search){const e=this.value.toLowerCase();return this.options.filter(n=>JSON.stringify(n).toLowerCase().includes(e))}else return this.options},getSelected(){let e=null;if(this.modelValue)e=this.options.find(n=>n[this.property.key]===this.modelValue);else if(!this.search){const n=this.options.find(t=>t[this.property.key]==="");n?e=n:this.placeholder?e={[this.property.value]:this.placeholder,[this.property.key]:""}:e={[this.property.value]:"--Select--",[this.property.key]:""}}return e||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top;return t<n&&r>n},dropdownStyle(){if(!this.$refs.triggerElement)return{};const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;return{position:"absolute",top:i?"auto":"100%",bottom:i?"100%":"auto",left:"0",width:"100%",zIndex:1e3}}},created(){this.initialValue=this.modelValue},mounted(){window.addEventListener("resize",this.updateDropdownPosition),window.addEventListener("scroll",this.updateDropdownPosition,!0)},beforeUnmount(){window.removeEventListener("resize",this.updateDropdownPosition),window.removeEventListener("scroll",this.updateDropdownPosition,!0)},methods:{updateDropdownPosition(){if(!this.$refs.triggerElement)return;const e=this.$refs.triggerElement.getBoundingClientRect(),n=200,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;this.teleportStyle={position:"absolute",top:`${i?e.top-n:e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}},subFieldsText(e){if(!this.display||this.display.length<1)return"";const n=[];return this.display.forEach(t=>{const r=this.subField(e,t);r&&n.push(r)}),n.join(" | ")},subField(e,n){return n?n.split(".").reduce((i,o)=>i[o]||"",e):e},lookupSearchHandler:or(function(e){this.value=e,this.search&&!this.select&&this.$emit("search",e)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(e){e&&(this.value="",this.$emit("update:modelValue",e[this.property.key]),this.search&&!this.select&&!this.lookup&&this.$emit("search",""),this.onInputFocusedOut(!0))},clear(){this.disabled||(this.value="",this.$emit("update:modelValue",null),this.search&&!this.select&&!this.lookup&&this.$emit("search",""))},onInputFocusedOut(e=!1){(!this.isHover||e)&&!this.disabled&&(e?(this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")):setTimeout(()=>{this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")},100))},highlightNextOption(){this.highlightedIndex<this.options.length-1&&this.highlightedIndex++},highlightPreviousOption(){this.highlightedIndex>0&&this.highlightedIndex--}}},m8=["data-test-id"],y8=["for","data-test-id"],x8={class:"input-container-box ect-grow ect-w-full"},_8=["data-test-id"],b8=["placeholder","disabled","data-test-id"],C8=["data-test-id"],w8=["title","data-test-id"],E8=["data-test-id"],A8=["data-test-id"],k8=["data-test-id"],O8=["data-test-id"],S8=["data-test-id","onClick"],I8=["data-test-id"],T8={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},B8=["data-test-id"],D8=["data-test-id"],R8=["data-test-id"],L8=["title","data-test-id"],N8=["data-test-id"];function F8(e,n,t,r,i,o){const a=er("AppIcon"),s=er("AtomSpinner");return V(),J("div",{ref:"dropdownWrapper",class:we(["customdropdown input-container",{dark:t.dropdownTheme==="dark"}]),"data-test-id":t.dataTestId,onMouseenter:n[7]||(n[7]=u=>e.isHover=!0),onMouseleave:n[8]||(n[8]=u=>e.isHover=!1)},[t.label?(V(),J("label",{key:0,class:we(["title_label",{error_color:!!t.error}]),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,y8)):ge("",!0),C("div",x8,[C("div",{ref:"triggerElement",class:we(["input-wrapper ectheme-input-box ect-w-full",{disabled:t.disabled,"input-error":t.error,highlight:o.isHighlight&&t.highlight,"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-trigger`,tabindex:"0",onFocusin:n[2]||(n[2]=(...u)=>o.handlerFocusIn&&o.handlerFocusIn(...u)),onFocusout:n[3]||(n[3]=u=>o.onInputFocusedOut(!1)),onKeydown:[n[4]||(n[4]=ir(u=>o.updateSelected(t.options[e.highlightedIndex]),["enter"])),n[5]||(n[5]=ir(mt((...u)=>o.highlightPreviousOption&&o.highlightPreviousOption(...u),["prevent"]),["up"])),n[6]||(n[6]=ir(mt((...u)=>o.highlightNextOption&&o.highlightNextOption(...u),["prevent"]),["down"]))]},[!t.modelValue&&t.search?ln((V(),J("input",{key:0,ref:"searchInput","onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),type:"text",name:"search",placeholder:t.placeholder,autocomplete:"off",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-input`,onInput:n[1]||(n[1]=mt(u=>o.lookupSearchHandler(u.target.value),["prevent"]))},null,40,b8)),[[li,e.value]]):(V(),J("div",{key:1,class:we(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-selection`},[o.getSelected?(V(),J(be,{key:0},[C("span",{title:o.getSelected[t.property.value],class:we(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!t.modelValue}]),"data-test-id":`${t.dataTestId}-selection-value`},[t.icon?(V(),Ee(a,{key:0,class:"ect-mr-0",icon:t.icon,size:14,color:"#5F5F5F","data-test-id":`${t.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):ge("",!0),Fe(" "+xe(o.getSelected[t.property.value]),1)],10,w8),t.badge&&o.getSelected[t.badge]?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-selection-badge`},xe(o.getSelected[t.badge]),9,E8)):ge("",!0)],64)):ge("",!0)],10,C8)),t.search?(V(),J(be,{key:2},[t.loading?(V(),Ee(s,{key:0,class:"spinner","data-test-id":`${t.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(V(),J("div",{key:1,class:"clear-button","data-test-id":`${t.dataTestId}-action-button`},[e.value||t.modelValue?(V(),Ee(a,{key:0,disabled:t.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${t.dataTestId}-clear-button`,onClick:o.clear},null,8,["disabled","data-test-id","onClick"])):(V(),Ee(a,{key:1,icon:"search",size:14,color:"#acacac",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,A8))],64)):(V(),Ee(a,{key:3,class:"clear-button",color:o.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:t.disabled,"data-test-id":`${t.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,_8),o.error_message?(V(),J("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,k8)):ge("",!0),o.getOptions&&e.inputFocused&&!t.disabled&&(t.select||t.lookup)?(V(),J("div",{key:1,ref:"dropdown",class:we(["dropdown",{"dropdown-above":o.shouldShowAbove}]),style:ze(o.dropdownStyle),"data-test-id":`${t.dataTestId}-dropdown`},[(V(!0),J(be,null,Me(o.getOptions,(u,f)=>(V(),J("div",{key:u[t.property.key],class:we(["dropdown-item",{highlighted:f===e.highlightedIndex,"ect-pointer-events-none":u[t.property.assigned]}]),"data-test-id":`${t.dataTestId}-option-${f}`,onClick:c=>o.updateSelected(u)},[C("div",{class:"name ect-items-center","data-test-id":`${t.dataTestId}-option-${f}-name`},[C("span",T8,[C("span",{class:we({"ect-text-zinc-400":u[t.property.assigned]}),"data-test-id":`${t.dataTestId}-option-${f}-value`},xe(u[t.property.value]==null?"Key and Value is Wrong":u[t.property.value]),11,B8),u[t.property.assigned]?(V(),J("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${t.dataTestId}-option-${f}-assigned`},"Assigned",8,D8)):ge("",!0)]),t.badge?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-option-${f}-badge`},xe(u[t.badge]),9,R8)):ge("",!0)],8,I8),C("div",{class:"info",title:o.subFieldsText(u),"data-test-id":`${t.dataTestId}-option-${f}-info`},[C("span",null,xe(o.subFieldsText(u)),1)],8,L8)],10,S8))),128)),!o.getOptions.length&&!t.loading&&(e.value||t.select)?(V(),J("div",{key:0,class:"no-items-found","data-test-id":`${t.dataTestId}-no-options`}," no options found ",8,N8)):ge("",!0)],14,O8)):ge("",!0)])],42,m8)}const N0=Re(g8,[["render",F8],["__scopeId","data-v-5ae4f6dc"]]);var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function P8(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),t}var F0={exports:{}};/*!
|
|
34
34
|
* Quill Editor v1.3.7
|
|
35
35
|
* https://quilljs.com/
|
|
36
36
|
* Copyright (c) 2014, Jason Chen
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
* Date: 2023-05-12T08:44:03.742Z
|
|
84
84
|
*/const G0={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},Y8=Pc({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object],required:!1,validator:e=>typeof e=="string"&&e!==""?e.charAt(0)==="#"?!0:Object.keys(G0).indexOf(e)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(e,n)=>{Ft(()=>{o()}),Zi(()=>{t=null});let t,r;const i=te(),o=()=>{var E;if(i.value){if(r=a(),e.modules)if(Array.isArray(e.modules))for(const k of e.modules)hs.register(`modules/${k.name}`,k.module);else hs.register(`modules/${e.modules.name}`,e.modules.module);t=new hs(i.value,r),_(e.content),t.on("text-change",v),t.on("selection-change",h),t.on("editor-change",p),e.theme!=="bubble"&&i.value.classList.remove("ql-bubble"),e.theme!=="snow"&&i.value.classList.remove("ql-snow"),(E=t.getModule("toolbar"))===null||E===void 0||E.container.addEventListener("mousedown",k=>{k.preventDefault()}),n.emit("ready",t)}},a=()=>{const E={};if(e.theme!==""&&(E.theme=e.theme),e.readOnly&&(E.readOnly=e.readOnly),e.placeholder&&(E.placeholder=e.placeholder),e.toolbar&&e.toolbar!==""&&(E.modules={toolbar:(()=>{if(typeof e.toolbar=="object")return e.toolbar;if(typeof e.toolbar=="string")return e.toolbar.charAt(0)==="#"?e.toolbar:G0[e.toolbar]})()}),e.modules){const k=(()=>{var R,N;const q={};if(Array.isArray(e.modules))for(const G of e.modules)q[G.name]=(R=G.options)!==null&&R!==void 0?R:{};else q[e.modules.name]=(N=e.modules.options)!==null&&N!==void 0?N:{};return q})();E.modules=Object.assign({},E.modules,k)}return Object.assign({},e.globalOptions,e.options,E)},s=E=>typeof E=="object"&&E?E.slice():E,u=E=>Object.values(E.ops).some(k=>!k.retain||Object.keys(k).length!==1);let f;const c=E=>{if(typeof f==typeof E){if(E===f)return!0;if(typeof E=="object"&&E&&typeof f=="object"&&f)return!u(f.diff(E))}return!1},v=(E,k,R)=>{f=s(y()),c(e.content)||n.emit("update:content",f),n.emit("textChange",{delta:E,oldContents:k,source:R})},l=te(),h=(E,k,R)=>{l.value=!!(t!=null&&t.hasFocus()),n.emit("selectionChange",{range:E,oldRange:k,source:R})};Ye(l,E=>{E?n.emit("focus",i):n.emit("blur",i)});const p=(...E)=>{E[0]==="text-change"&&n.emit("editorChange",{name:E[0],delta:E[1],oldContents:E[2],source:E[3]}),E[0]==="selection-change"&&n.emit("editorChange",{name:E[0],range:E[1],oldRange:E[2],source:E[3]})},g=()=>i.value,d=()=>{var E;return(E=t==null?void 0:t.getModule("toolbar"))===null||E===void 0?void 0:E.container},m=()=>{if(t)return t;throw`The quill editor hasn't been instantiated yet,
|
|
85
85
|
make sure to call this method when the editor ready
|
|
86
|
-
or use v-on:ready="onReady(quill)" event instead.`},y=(E,k)=>e.contentType==="html"?S():e.contentType==="text"?x(E,k):t==null?void 0:t.getContents(E,k),_=(E,k="api")=>{const R=E||(e.contentType==="delta"?new J8:"");e.contentType==="html"?A(R):e.contentType==="text"?b(R,k):t==null||t.setContents(R,k),f=s(R)},x=(E,k)=>{var R;return(R=t==null?void 0:t.getText(E,k))!==null&&R!==void 0?R:""},b=(E,k="api")=>{t==null||t.setText(E,k)},S=()=>{var E;return(E=t==null?void 0:t.root.innerHTML)!==null&&E!==void 0?E:""},A=E=>{t&&(t.root.innerHTML=E)},I=(E,k="api")=>{const R=t==null?void 0:t.clipboard.convert(E);R&&(t==null||t.setContents(R,k))},B=()=>{t==null||t.focus()},O=()=>{sn(()=>{var E;!n.slots.toolbar&&t&&((E=t.getModule("toolbar"))===null||E===void 0||E.container.remove()),o()})};return Ye(()=>e.content,E=>{if(!t||!E||c(E))return;const k=t.getSelection();k&&sn(()=>t==null?void 0:t.setSelection(k)),_(E)},{deep:!0}),Ye(()=>e.enable,E=>{t&&t.enable(E)}),{editor:i,getEditor:g,getToolbar:d,getQuill:m,getContents:y,setContents:_,getHTML:S,setHTML:A,pasteHTML:I,focus:B,getText:x,setText:b,reinit:O}},render(){var e,n;return[(n=(e=this.$slots).toolbar)===null||n===void 0?void 0:n.call(e),nh("div",{ref:"editor",...this.$attrs})]}}),ep={class:"input"},tp=["for","data-test-id"],np=["data-test-id"],rp=Re({__name:"RichTextEditor",props:{modelValue:{type:String,default:""},editorOptions:{type:Object,default:()=>({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"})},dataTestId:{type:String,default:""},label:{type:String,default:""},required:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:modelValue"],setup(e){const n=e,t=me(()=>typeof n.error=="string"?n.error:n.error===""?!1:n.error===!0?`${n.label||"Field"} is required`:n.error),r=te("");return qn(()=>{r.value=n.modelValue}),(i,o)=>(V(),J("div",ep,[e.label?(V(),J("label",{key:0,class:we({error_color:!!e.error}),for:e.label,"data-test-id":`${e.dataTestId}-label`},[Fe(xe(e.label)+" ",1),e.required?(V(),J("span",{key:0,class:we({error_color:!!e.error})},"*",2)):ge("",!0)],10,tp)):ge("",!0),he(Ne(Y8),{"content-type":"html",toolbar:e.editorOptions,"model-value":e.modelValue,"data-test-id":e.dataTestId,content:r.value,"onUpdate:content":o[0]||(o[0]=a=>i.$emit("update:modelValue",a))},null,8,["toolbar","model-value","data-test-id","content"]),t.value?(V(),J("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${e.dataTestId}-error`},xe(t.value),9,np)):ge("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),ip={class:"ect-w-full ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-rounded-md ect-border-1 ect-border-gray-200 md:ect-gap-5 lg:ect-gap-6","data-test-id":"configurator-inputs-container"},op={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},ap={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},sp={key:0,class:"ect-col-span-2"},lp=["data-test-id"],cp=["id","onUpdate:modelValue","disabled","data-test-id"],up=["for","data-test-id"],fp={key:2,class:"quill-editor-styles"},dp=C("div",{class:"dropdowntp"},null,-1),hp=C("div",{id:"modals"},null,-1),Q0={__name:"InputsContainer",props:{title:{type:String,default:""},lookup:{type:Object,default:()=>null},attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=dn(),t=e,r=te({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),i=te(t.lookup),o=me(()=>{const u=t.lookup.relatedFields.map(f=>f.child);return u.push("Name"),u});function a(u,f){const c=f.options.find(v=>v.Id===u);u===null?(f.options=[],f.value=null,f.relatedFields.forEach(v=>{v.value=null})):(f.value=c.Name,f.relatedFields.forEach(v=>{v.value=c[v.child]}))}const s=or(async function(u,f){f.loading=!0;const c={objectType:f.referenceObject,searchText:u||"",lstFields:o.value||[]},v=await n.getRecords(c);f.options=v,f.loading=!1});return(u,f)=>(V(),J(be,null,[C("div",ip,[e.title?(V(),J("div",op,xe(e.title),1)):ge("",!0),C("div",ap,[i.value?(V(),J("div",sp,[he(N0,{modelValue:i.value.referenceRecordId,"onUpdate:modelValue":[f[0]||(f[0]=c=>i.value.referenceRecordId=c),f[1]||(f[1]=c=>a(c,i.value))],"data-test-id":`configurator-inputs-lookup-${i.value.attRecordId??u.index}`,label:i.value.label,options:i.value.options,disabled:!i.value.editable,required:i.value.required,loading:i.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:f[2]||(f[2]=c=>Ne(s)(c,i.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):ge("",!0),(V(!0),J(be,null,Me(e.attributes,(c,v)=>(V(),J("div",{key:v,class:"attribute-input"},[c.dataType==="PICKLIST"||c.dataType==="MULTIPICKLIST"?(V(),Ee(N0,{key:0,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,placeholder:c.label,disabled:!c.editable,options:c.picklistValues.map(l=>({label:l,value:l})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):c.dataType==="BOOLEAN"?(V(),J("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${c.attRecordId??u.index}`},[ln(C("input",{id:`checkbox-${c.attRecordId??u.index}`,"onUpdate:modelValue":l=>c.value=l,type:"checkbox",disabled:!c.editable,class:"ect-w-4 ect-h-4 ect-accent-success ect-border-gray-300 ect-rounded ect-text-text-success focus:ect-ring-green-500","data-test-id":`configurator-inputs-checkbox-input-${c.attRecordId??u.index}`},null,8,cp),[[Va,c.value]]),C("label",{for:`checkbox-${c.attRecordId??u.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${c.attRecordId??u.index}`},xe(c.label),9,up)],8,lp)):c.dataType==="TEXTAREA"?(V(),J("div",fp,[he(rp,{modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,required:c.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(V(),Ee(d8,{key:3,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,disabled:!c.editable,highlight:"","data-test-id":`configurator-inputs-custom-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),dp,hp],64))}},pp={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},vp={class:"ect-bg-white ect-rounded-lg"},_s={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=e,t=te([]),r=te([]),i=te({});return qn(()=>{const o={},a=[...n.attributes];a.forEach(u=>{u.dataType==="REFERENCE"&&(i.value[u.apiName]=["Name"],u.relatedFields=[],o[u.apiName]=u),u.editable=u.editable&&!u.apiName.includes(".")});let s=null;a.forEach(u=>{if(u.referenceObject==="XX_Base__Location__c"&&(s?u.firstLookup="Copy from "+s.label:s=u),u.apiName.includes(".")){const[f,c]=u.apiName.split(".");u.parent=f,u.child=c,i.value[f]!=null&&(i.value[f].push(c),o[f].relatedFields.push(u))}}),r.value=a.filter(u=>u.dataType==="REFERENCE"),t.value=a.filter(u=>!(u.apiName.includes(".")||u.dataType==="REFERENCE"))}),(o,a)=>(V(),J("div",pp,[C("div",vp,[he(Q0,{attributes:t.value},null,8,["attributes"])]),(V(!0),J(be,null,Me(r.value,s=>(V(),J("div",{key:s.attRecordId,class:"ect-bg-white ect-rounded-lg"},[he(Q0,{title:s.referenceLabel+" Lookup",lookup:s,attributes:s.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},gp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},mp=C("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),yp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},xp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},_p={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},bp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Cp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},wp={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},Ep={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=n,r=e,i=me(()=>JSON.parse(JSON.stringify(r.attributes))),o=()=>{t("close")},a=()=>{t("done",i.value),t("close")};return(s,u)=>(V(),Ee(Wa,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:o},{content:Ve(()=>[C("header",gp,[mp,C("div",yp,[C("p",xp,xe(e.option.itemName),1),C("p",_p,xe(e.option.qty),1),C("p",bp,xe(e.option.price),1)])]),C("main",Cp,[he(_s,{attributes:i.value},null,8,["attributes"])])]),footer:Ve(()=>[C("div",wp,[he(Ut,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:u[0]||(u[0]=f=>t("close"))},{default:Ve(()=>[Fe("Cancel")]),_:1}),he(Ut,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:a},{default:Ve(()=>[Fe("Done")]),_:1})])]),_:1}))}},Ap=["data-test-id"],kp=["data-test-id"],Op=["data-test-id"],Sp={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},Ip={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},Tp={key:0,class:"ect-flex ect-z-0 ect-flex-col ect-gap-4 ect-justify-center ect-py-4 ect-px-6 ect-w-full max-md:ect-px-5 max-md:ect-max-w-full"},Bp={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},Dp={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},Rp={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},Lp={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Np={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Fp={key:1,class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-xs ect-leading-4 ect-text-neutral-700 max-md:ect-px-5 max-md:ect-max-w-full"},Pp={key:2,class:"ect-relative ect-w-full ect-border-t ect-border-solid ect-border-t-neutral-200 max-md:ect-max-w-full"},Mp=Re({__name:"AppModalGen3",props:{title:{type:String,required:!0},description:{type:String,required:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:n}){const t=n;return(r,i)=>(V(),Ee(Fu,{to:"modaltp"},{default:Ve(()=>[C("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[C("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[C("div",{class:"modal-container",style:ze(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[C("div",Sp,[C("div",Ip,[e.header?(V(),J("div",Tp,[C("div",Bp,[C("div",Dp,xe(e.title),1),e.description?(V(),J("div",Rp,xe(e.description),1)):ge("",!0)])])):ge("",!0),C("div",Lp,[C("button",{class:"ect-flex ect-self-stretch ect-my-auto ect-w-6 ect-min-h-6 ect-cursor-pointer hover:ect-bg-gray-100 ect-rounded ect-transition-colors ect-justify-center ect-items-center","aria-label":"Close modal",onClick:i[0]||(i[0]=o=>t("close"))},[he(We,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(V(),J("div",Np,[Je(r.$slots,"content",{},void 0,!0)])):(V(),J("div",Fp,[Je(r.$slots,"default",{},void 0,!0)])),e.footer?(V(),J("div",Pp,[Je(r.$slots,"footer",{},void 0,!0)])):ge("",!0)])],12,Op)],8,kp)],8,Ap)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),cr=e=>(jt("data-v-395645da"),e=e(),Ht(),e),qp={class:"ect-w-[600px]"},$p={class:"ect-px-6 ect-pt-4 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},jp=cr(()=>C("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),Hp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},Vp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Up={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},zp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Kp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-mt-4 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Xp=cr(()=>C("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-supporting-text"}," Above selection requires a configuration change ",-1)),Wp={class:"ect-flex ect-flex-col ect-gap-2"},Gp={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},Qp=cr(()=>C("div",{class:"ect-px-4 ect-py-2"},[C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-add-header"}," This change will add: ")],-1)),Zp={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},Jp={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},Yp={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},e3={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},t3=cr(()=>C("div",{class:"ect-px-4 ect-py-2"},[C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-remove-header"}," This change will remove: ")],-1)),n3={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},r3={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},i3={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},o3={class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-bg-white ect-rounded-md ect-border ect-border-neutral-200 ect-rounded-md"},a3=cr(()=>C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-price-change-label"}," Price change ",-1)),s3={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},l3={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},c3=cr(()=>C("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-500 ect-mb-2","data-test-id":"conflict-modal-summary-supporting-text"}," Price Adjustment Summary ",-1)),u3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-mt-2 ect-bg-neutral-50","data-test-id":"conflict-modal-summary-table"},f3={class:"ect-flex ect-flex-col ect-gap-2"},d3={class:"ect-flex-1"},h3={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},p3={class:"ect-text-center ect-w-28"},v3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},g3={class:"ect-text-center ect-w-28"},m3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},y3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-px-4 ect-py-1 ect-mt-2","data-test-id":"conflict-modal-summary-total"},x3={class:"ect-flex ect-items-center"},_3=cr(()=>C("div",{class:"ect-flex-1"},[C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-summary-total-label"}," Total Price change ")],-1)),b3={class:"ect-text-center ect-w-28"},C3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},w3={class:"ect-text-center ect-w-28"},E3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},A3={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},k3=Re({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=dn(),r=n,i=e,o=me(()=>{const p=t.summaryPrices,g=[];return g.push({label:"Base Price",value:p.basePrice,priceChange:p.basePrice}),g.push({label:"Add Ons",value:p.addOns,priceChange:p.addOns+v.value}),g}),a=me(()=>{const p=t.summaryPrices;return{label:"Total Price",value:p.total,priceChange:p.total+v.value}}),s=me(()=>i.data.inclusions.map(g=>t.optionByPublishKey.get(g))),u=me(()=>s.value.filter(p=>p.itemId!==i.item.itemId)),f=me(()=>i.data.exclusions.map(p=>t.optionByPublishKey.get(p))),c=me(()=>f.value.filter(p=>p.itemId!==i.item.itemId)),v=me(()=>s.value.reduce((p,g)=>p+g.price,0)-f.value.reduce((p,g)=>p+g.price,0)),l=()=>{r("close")},h=()=>{r("done")};return(p,g)=>(V(),Ee(Mp,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:l},{content:Ve(()=>[C("div",qp,[C("header",$p,[jp,C("div",Hp,[C("p",Vp,xe(e.item.itemName),1),C("p",Up,xe(e.item.qty),1),C("p",zp,xe(Ne(Pt)(e.item.price)),1)])]),C("main",Kp,[Xp,C("div",Wp,[u.value.length>0?(V(),J("div",Gp,[Qp,(V(!0),J(be,null,Me(u.value,d=>(V(),J("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[C("p",Zp,xe(d.itemName),1),C("p",Jp,xe(d.qty),1),C("p",Yp," + "+xe(Ne(Pt)(d.price)),1)]))),128))])):ge("",!0),c.value.length>0?(V(),J("div",e3,[t3,(V(!0),J(be,null,Me(c.value,d=>(V(),J("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[C("p",n3,xe(d.itemName),1),C("p",r3,xe(d.qty),1),C("p",i3," - "+xe(Ne(Pt)(d.price)),1)]))),128))])):ge("",!0),C("div",o3,[a3,C("p",s3,xe(Ne(Pt)(v.value)),1)])])]),C("footer",null,[C("div",l3,[c3,C("div",u3,[C("div",f3,[(V(!0),J(be,null,Me(o.value,(d,m)=>(V(),J("div",{key:d.label,class:we(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":m>0}])},[C("div",d3,[C("p",h3,xe(d.label),1)]),C("div",p3,[C("p",v3,xe(Ne(Pt)(d.value)),1)]),C("div",g3,[C("p",m3,xe(Ne(Pt)(d.priceChange)),1)])],2))),128))])]),C("div",y3,[C("div",x3,[_3,C("div",b3,[C("p",C3,xe(Ne(Pt)(a.value.value)),1)]),C("div",w3,[C("p",E3,xe(Ne(Pt)(a.value.priceChange)),1)])])])])])])]),footer:Ve(()=>[C("div",A3,[he(Ut,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:g[0]||(g[0]=d=>r("close"))},{default:Ve(()=>[Fe("Cancel")]),_:1}),he(Ut,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:h},{default:Ve(()=>[Fe("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-395645da"]]),O3={class:"ect-flex ect-flex-col"},S3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],I3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],T3={key:0},B3={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},D3={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(e){const n=dn(),t=e,r=me(()=>t.data.itemTypes||[]),i=me(()=>t.data.showImage||!1),o=te(null),a=te({});let s=te(null),u=te(null);const f=(p,g)=>{p.qty=g},c=(p,g)=>{p.itemName=g},v=()=>{n.configuration.categoryOptions.forEach(p=>{p.itemTypes.forEach(g=>{g.options.forEach(d=>{n.configuration.sysGuidedOptions&&(o.value.hidden.includes(d.publishKey)?d.hidden=!0:d.hidden=!1),o.value.inclusions.includes(d.publishKey)&&!g.selected.includes(d.itemId)&&g.selected.push(d.itemId),o.value.exclusions.includes(d.publishKey)&&g.selected.includes(d.itemId)&&g.selected.splice(g.selected.indexOf(d.itemId),1)})})}),o.value=null,a.value=null},l=async(p,g,d,m)=>{if(p.preventDefault(),p.stopPropagation(),s.value=null,u.value=null,g.calculateRules){m&&m.isRadio?d.includes(g.itemId)?(d.splice(0,d.length),u.value=g.publishKey):(d.splice(0,d.length),d.push(g.itemId),s.value=g.publishKey):d.includes(g.itemId)?(d.splice(d.indexOf(g.itemId),1),u.value=g.publishKey):(d.push(g.itemId),s.value=g.publishKey);const y=u.value?g:null,_=s.value?g:null,x=await n.evaluateConfigSelection(y,_);x.inclusions.length>0||x.exclusions.length>0?(o.value=x,a.value=g,[...x.inclusions,...x.exclusions].includes(g.publishKey)||(s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value))):(o.value=x,s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value),v())}},h=(p,g,d,m)=>{p.target.type==="checkbox"||p.target.type==="radio"||(p.preventDefault(),p.stopPropagation(),m.isRadio?d.includes(g.itemId)?d.splice(0,d.length):(d.splice(0,d.length),d.push(g.itemId)):d.includes(g.itemId)?d.splice(d.indexOf(g.itemId),1):d.push(g.itemId),l(p,g,d,m))};return(p,g)=>(V(),J(be,null,[o.value?(V(),Ee(k3,{key:0,item:a.value,data:o.value,onClose:g[0]||(g[0]=d=>o.value=null),onDone:v},null,8,["item","data"])):ge("",!0),C("div",O3,[(V(!0),J(be,null,Me(r.value,d=>(V(),Ee(s6,{key:d.itemTypeId,title:d.itemTypeName,description:d.description,message:d.isRadio?d.selected?"":d.minMessage:d.selected.length<d.minNumber?d.minMessage:d.selected.length===d.maxNumber?d.maxMessage:""},{default:Ve(()=>[C("div",{class:we([d.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":d.numberOfColumns===2?"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4":"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 lg:ect-grid-cols-3 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4"])},[(V(!0),J(be,null,Me(d.options||[],m=>(V(),J(be,{key:m.itemId},[m.hidden?ge("",!0):(V(),Ee(n8,{key:0,item:m,name:m.itemName,description:m.description||"","min-quantity":d.minQuantity,"max-quantity":d.maxQuantity,"show-image":i.value,selected:d.selected.includes(m.itemId),tags:m.getTags(),price:m.price,quantity:m.qty,"image-url":m.defaultImageURL,attributes:m.attributes||[],size:d.numberOfColumns,"item-id":m.itemId,"item-type":d.itemTypeName||"",category:d.category,"relationship-info":m.relationshipInfo||{},option:Ne(n).optionByItemId.get(m.itemId),"is-attributes":m.isAttributes,"show-attributes":d.lightboxAttributes,disabled:m.isDisabled,"onUpdate:quantity":y=>f(m,y),"onUpdate:name":y=>c(m,y),onEditAttributes:y=>m.showAttributesModal=!0,onClick:y=>d.selected.includes(m.itemId)||m.isDisabled?null:h(y,m,d.selected,d)},{"selection-control":Ve(()=>[d.isRadio?ln((V(),J("input",{key:0,"onUpdate:modelValue":y=>d.selected[0]=y,"data-test-id":`configurator-${d.itemTypeId}-radio-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:m.itemId,disabled:m.isDisabled,onClick:g[1]||(g[1]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,S3)),[[Su,d.selected[0]]]):ln((V(),J("input",{key:1,"onUpdate:modelValue":y=>d.selected=y,"data-test-id":`configurator-${d.itemTypeId}-checkbox-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:m.itemId,disabled:m.isDisabled,onClick:g[2]||(g[2]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,I3)),[[Va,d.selected]])]),default:Ve(()=>[d.lightboxAttributes?(V(),J("div",T3,[m.showAttributesModal?(V(),Ee(Ep,{key:0,option:m,attributes:m.attributes,onDone:y=>m.attributes=y,onClose:y=>m.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):ge("",!0)])):(V(),J("div",B3,[he(_s,{attributes:m.attributes},null,8,["attributes"])]))]),_:2},1032,["item","name","description","min-quantity","max-quantity","show-image","selected","tags","price","quantity","image-url","attributes","size","item-id","item-type","category","relationship-info","option","is-attributes","show-attributes","disabled","onUpdate:quantity","onUpdate:name","onEditAttributes","onClick"]))],64))),128))],2)]),_:2},1032,["title","description","message"]))),128))])],64))}},R3=e=>(jt("data-v-cb7a75a9"),e=e(),Ht(),e),L3={class:"ect-space-y-4"},N3={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},F3={class:"ect-bg-white ect-border-b ect-border-ect-gray-200 ect-px-4 ect-py-4 ect-sticky ect-top-0 ect-z-[5] ect-overflow-hidden ect-rounded-t-lg"},P3={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},M3={class:"ect-bg-white ect-px-4 ect-py-4 ect-pb-3 ect-border-b ect-border-ect-gray-200 ect-top-[53px] ect-z-9 ect-overflow-hidden ect-sticky ect-top-[53px]"},q3={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},$3={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},j3={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},H3={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},V3={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},U3={class:"ect-flex ect-justify-center ect-min-w-[128px]"},z3=R3(()=>C("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),K3={class:"ect-flex ect-justify-center ect-min-w-[100px]"},X3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},W3={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},G3={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},Q3={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},Z3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},J3=Re({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(e){return(n,t)=>(V(),J("div",L3,[(V(!0),J(be,null,Me(e.summary,r=>(V(),J("div",{key:r.key,class:"ect-mb-4"},[C("section",N3,[C("div",F3,[C("h3",P3,xe(r.category),1)]),(V(!0),J(be,null,Me(r.selectedItemTypes,i=>(V(),J("div",{key:i.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[C("div",M3,[C("h4",q3,xe(i.itemTypeName),1)]),(V(!0),J(be,null,Me(i.selectedOptions,o=>(V(),J(be,{key:o.itemId},[C("div",$3,[C("div",j3,[C("span",H3,xe(o.itemName),1)]),C("div",V3,[C("div",U3,[he(Do,{value:o.qty,"onUpdate:value":a=>o.qty=a,min:i.minQuantity,max:i.maxQuantity,"data-test-id":`configurator-summary-counter-${o.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),z3,C("div",K3,[C("span",X3,xe(Ne(Pt)(o.price)),1)])])]),o.isAttributes&&o.getTags().length>0?(V(),J("div",W3,[C("div",G3,[(V(!0),J(be,null,Me(o.getTags(),a=>(V(),Ee(hn,{key:a.attributeId,label:a.label,value:a.value},null,8,["label","value"]))),128))])])):ge("",!0)],64))),128))]))),128)),C("div",Q3,[C("span",Z3," Total : "+xe(Ne(Pt)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),Y3={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},e7={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},t7={class:"ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-absolute ect-bottom-0 ect-left-0 ect-right-0 ect-z-50","data-test-id":"configurator-footer-sticky"},n7=Re({__name:"ConfiguratorTabs",emits:["scroll"],setup(e,{emit:n}){const t=dn(),r=te("billing-options"),i=me(()=>t.configuration.categoryOptions),o=me(()=>{const l=i.value.map(h=>({key:h.key,title:h.category}));return l.push({key:"summary",title:"Summary"}),l}),a=n,s=me(()=>u.value.get(r.value)),u=me(()=>{const l=new Map;return i.value.forEach(h=>{l.set(h.key,h)}),l}),f=()=>{console.info("Continue");const l=o.value.findIndex(h=>h.key===r.value);if(l<o.value.length-1){const h=o.value[l+1];r.value=h.key}else t.maintainQuoteConfiguration()};Ye(r,l=>{c(l),a("scroll",0)});const c=l=>{r.value=l},v=l=>{const h=l.target.scrollTop;a("scroll",h)};return qn(()=>{r.value=o.value[0].key}),(l,h)=>(V(),J("div",Y3,[C("div",e7,[he($4,{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=p=>r.value=p),"show-tabs":!0,border:"",tabs:o.value,"data-test-id":"configurator-tabs-container",onTabChange:c},null,8,["modelValue","tabs"])]),r.value!=="summary"?(V(),J("div",{key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(D3,{data:s.value},null,8,["data"])],32)):(V(),J("div",{key:1,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(J3,{summary:Ne(t).summary},null,8,["summary"])],32)),C("div",t7,[he(J4,{"btn-text":r.value!=="summary"?"Continue":"Save",item:Ne(t).configuration,onContinue:f},null,8,["btn-text","item"])])]))}},[["__scopeId","data-v-89883e06"]]),r7={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},i7={class:"ect-flow-root"},o7=["src","alt"],a7={key:1,class:"ect-mb-2"},s7={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},l7={key:0,class:"ect-mt-2"},c7={class:"ect-inline-block ect-mb-2"},u7={key:1,class:"ect-inline-block ect-mb-2"},f7={key:1,class:"ect-mt-2"},d7={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.config.attributes.map(o=>({label:o.label,value:o.value})).filter(o=>o.value!==null&&o.value!==""));return(o,a)=>(V(),J("div",r7,[C("div",i7,[e.config.defaultImageURL&&e.scroll<50?(V(),J("div",{key:0,class:we(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",e.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[e.config.defaultImageURL?(V(),J("img",{key:0,src:e.config.defaultImageURL,alt:e.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,o7)):ge("",!0)],2)):ge("",!0),e.scroll<50?(V(),J("div",a7,[C("p",s7,xe(e.config.description),1)])):ge("",!0),e.config.isAttributes?(V(),J(be,{key:2},[e.editAttributes?(V(),J("div",f7,[he(_s,{attributes:e.config.attributes},null,8,["attributes"])])):(V(),J("div",l7,[i.value.length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(i.value,(s,u)=>(V(),J("span",{key:u,class:"ect-inline-block ect-mr-2 ect-mb-2"},[he(hn,{label:s.label,value:s.value},null,8,["label","value"])]))),128)),C("span",c7,[C("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:a[0]||(a[0]=s=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})])])],64)):(V(),J("span",u7,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:a[1]||(a[1]=s=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))]))],64)):ge("",!0)])]))}},h7=["data-test-id"],p7=["placeholder","value","data-test-id"],v7=["data-test-id"],g7=["data-test-id","onClick"],m7=Re({__name:"MoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},height:{type:[Number,String],default:32},size:{type:String,default:"regular"},loading:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},iconPosition:{type:String,default:"right",validator:e=>["left","right"].includes(e)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(e,{emit:n}){const t=e,r=n,i=te(""),o=te(null),a=te(!1),s=te(null),u=te(!0),f=me(()=>u.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),c=async()=>{var b;if(await sn(),!s.value)return;const m=s.value.getBoundingClientRect(),_=window.innerHeight-m.bottom,x=Math.min(((b=t.options)==null?void 0:b.length)*40+20,200);u.value=_>=x},v=()=>{o.value=null,r("update:modelValue","")},l=d=>{const m=d.target.value;i.value&&(clearTimeout(i.value),i.value=null),i.value=setTimeout(()=>{r("update:modelValue",m)},500)},h=async()=>{a.value=!0,await c()},p=()=>{setTimeout(()=>{a.value=!1},150)},g=d=>{a.value=!1,i.value&&(clearTimeout(i.value),i.value=null),r("update:modelValue",d.label),r("optionClick",d)};return(d,m)=>{var y;return V(),J("div",{ref_key:"searchContainer",ref:s,class:we(["molecule-search",{"icon-left":e.iconPosition==="left"}]),"data-test-id":e.dataTestId},[e.loading?(V(),Ee(Hu,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${e.dataTestId}-loader`},null,8,["data-test-id"])):e.iconPosition==="left"||!e.modelValue?(V(),Ee(We,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${e.dataTestId}-search`,onClick:v},null,8,["data-test-id"])):ge("",!0),C("input",{class:we(["search-input-box",{large:e.size==="large"}]),type:"text",style:ze({height:`${e.height}px`}),placeholder:t.placeholder,value:e.modelValue,"data-test-id":`${e.dataTestId}-input`,onInput:l,onFocus:h,onBlur:p},null,46,p7),e.modelValue&&!e.loading?(V(),Ee(We,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${e.dataTestId}-close`,onClick:v},null,8,["data-test-id"])):ge("",!0),((y=e.options)==null?void 0:y.length)>0&&a.value?(V(),J("div",{key:3,class:we(["search-options",{"dropdown-top":!u.value}]),style:ze(f.value),"data-test-id":`${e.dataTestId}-dropdown`},[(V(!0),J(be,null,Me(e.options,(_,x)=>(V(),J("div",{key:_.id,class:"search-option","data-test-id":`${e.dataTestId}-option-${x}`,onClick:mt(b=>g(_),["stop"]),onMousedown:m[0]||(m[0]=mt(()=>{},["prevent"]))},[Fe(xe(_.label)+" ",1),C("span",null,xe(_.subLabel),1)],40,g7))),128))],14,v7)):ge("",!0)],10,h7)}}},[["__scopeId","data-v-6cdaa802"]]),y7=["data-test-id"],x7=Re({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:e=>["default","draft","review","active","inactive","in draft","active"].includes(e)},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>({"ect-state-pill--default":n.state==="default","ect-state-pill--draft":n.state==="draft"||n.state==="in draft","ect-state-pill--review":n.state==="review","ect-state-pill--active":n.state==="active","ect-state-pill--inactive":n.state==="inactive"}));return(r,i)=>(V(),J("span",{class:we(["ect-state-pill",t.value]),"data-test-id":e.dataTestId},xe(e.text),11,y7))}},[["__scopeId","data-v-6be678b8"]]),_7=["data-test-id"],b7=["data-test-id"],C7=["data-test-id"],w7=["data-test-id"],E7=["data-test-id","onClick"],A7=["data-test-id"],k7=Re({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"||typeof n.route=="object"))},dataTestId:{type:String,required:!0}},setup(e){const n=fi(),t=r=>{r&&n.push(r)};return(r,i)=>(V(),J("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":e.dataTestId},[C("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${e.dataTestId}-container`},[C("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-breadcrumbs`},[(V(!0),J(be,null,Me(e.links,(o,a)=>(V(),J(be,{key:a},[a>0?(V(),J("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${e.dataTestId}-separator-${a}`}," / ",8,w7)):ge("",!0),o.route?(V(),J("button",{key:1,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal hover:ect-text-[#0076D6] hover:ect-underline ect-transition-colors","data-test-id":`${e.dataTestId}-link-${a}`,onClick:s=>t(o.route)},xe(o.text),9,E7)):(V(),J("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${e.dataTestId}-text-${a}`},xe(o.text),9,A7))],64))),128))],8,C7)],8,b7)],8,_7))}},[["__scopeId","data-v-151ca816"]]),O7={components:{AppIcon:We},props:{direction:{type:String,default:"top",validator:e=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(e)},content:{type:String,default:null},disabled:{type:Boolean,default:!1},width:{type:Number,default:130},icon:{type:String,default:null},dataTestId:{type:String,default:""}},data(){return{show:!1}},computed:{tooltipClass(){return{tooltip:!0,[`tooltip-${this.direction}`]:!0}},styleObj(){return{width:`${this.width}px !important`}}},methods:{showTooltip(){this.disabled||(this.show=!0)},hideTooltip(){this.show=!1}}},S7=["data-test-id"],I7=["data-test-id"];function T7(e,n,t,r,i,o){const a=er("AppIcon");return t.content?(V(),J("div",{key:0,class:"tooltip-container","data-test-id":t.dataTestId,onMouseover:n[0]||(n[0]=(...s)=>o.showTooltip&&o.showTooltip(...s)),onMouseleave:n[1]||(n[1]=(...s)=>o.hideTooltip&&o.hideTooltip(...s))},[Je(e.$slots,"default",{},void 0,!0),ln(C("div",{class:we(o.tooltipClass),style:ze(o.styleObj),"data-test-id":`${t.dataTestId}-content`},[t.icon?(V(),Ee(a,{key:0,icon:t.icon,color:"#57c046",size:14,"data-test-id":`${t.dataTestId}-icon`},null,8,["icon","data-test-id"])):ge("",!0),Fe(" "+xe(t.content),1)],14,I7),[[xu,i.show]])],40,S7)):Je(e.$slots,"default",{key:1},void 0,!0)}const B7=Re(O7,[["render",T7],["__scopeId","data-v-b36acc62"]]),D7=wt("item",()=>{const e=Qt(),n=te([]),t=te([]),r=te(!1),i=te(0),o=te(1),a=te(""),s=te(20),u=te(null),f=te(!1),c=te(null),v=te(!1),l=te(null),h=te(null),p=te(null),g=te(null),d=te(null),m=te({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),y=te([]),_=te({ecatalogIds:[],optionItemsToAdd:[]}),x=te(!1),b=te(null),S=te(0),A=2,I=ee=>{!Array.isArray(ee)||ee.every(U=>{var Z;return U.id&&((Z=U.itemTypes)==null?void 0:Z.every(z=>{var F;return z.id&&((F=z.options)==null?void 0:F.every(j=>j.id))}))})||ee.forEach((U,Z)=>{U.id||(U.id=`category-${Z}-${U.category}`),U.itemTypes&&Array.isArray(U.itemTypes)&&U.itemTypes.forEach((z,F)=>{z.id||(z.id=z.itemTypeId||`itemType-${Z}-${F}-${z.itemTypeName||"unnamed"}`),z.options&&Array.isArray(z.options)&&z.options.forEach((j,se)=>{j.id||(j.id=j.itemId||`option-${Z}-${F}-${se}-${j.itemName||"unnamed"}`)})})})},B=async(ee,M=null)=>{var U;try{v.value=!0;let Z={};if(M)Z={fileId:M};else{const F=y.value.find(se=>se.status==="Draft"),j=y.value.find(se=>se.status==="Active");j?Z={fileId:j.id}:F?Z={fileId:F.id}:Z={itemId:ee}}let z=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(Z)});return z!=null&&z.errorMessage?(e.handleError(z.errorMessage),null):(z=St(z.data),typeof z.data=="string"&&(z=JSON.parse(z.data)),(U=z==null?void 0:z.productItem)!=null&&U.categoryOptions&&I(z.productItem.categoryOptions),u.value=z,v.value=!1,y.value.length===0&&!r.value&&await ne(),z.data)}catch(Z){return v.value=!1,e.handleError("Failed to fetch item configuration. Please try again.",Z),null}},O=async(ee,M="",U="")=>{try{const Z={searchTerm:ee,itemTypeId:M,filterType:U};let z=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(Z)});return z=St(z),z!=null&&z.errorMessage?(e.handleError(z.errorMessage),null):z}catch{return e.handleError("Failed to fetch option list. Please try again."),null}},E=async(ee,M)=>{try{const U={productItemId:d.value,optionItemId:ee,existingItemType:M};let Z=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(U)});return Z=St(Z),Z!=null&&Z.errorMessage?(e.handleError(Z.errorMessage),null):Z}catch{return e.handleError("Failed to fetch option details. Please try again."),null}},k=async()=>{try{const ee=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(ee)}catch{e.handleError("Failed to fetch available attributes. Please try again.")}},R=async ee=>{try{const M=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(ee)});return JSON.parse(M)}catch{e.handleError("Failed to fetch item configuration. Please try again.")}},N=async ee=>{try{const M=JSON.stringify(ee),U=await window.AdminConfiguratorManager.getChildFields({request:M});return JSON.parse(U)}catch(M){throw e.handleError("Failed to fetch child fields. Please try again.",M),M}},q=async()=>{const ee={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(ee)})).data}catch(M){throw e.handleError("Failed to fetch picklist values. Please try again.",M),M}},G=async()=>{var ee,M,U;try{const Z=(M=(ee=u.value)==null?void 0:ee.productItem)==null?void 0:M.itemStatus,F={fileId:(U=y.value.find(se=>se.status===Z))==null?void 0:U.id,itemId:d.value};let j=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(F)});return j!=null&&j.error?(D(j==null?void 0:j.error),null):(j=St(j.data),m.value=j,j)}catch{return D(),null}},Y=async()=>{try{const ee={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(ee)})).data}catch(ee){e.handleError("Failed to fetch e catalogs for product. Please try again.",ee)}},ne=async()=>{try{const ee={productId:d.value},M=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(ee)}),U=JSON.parse(M.data);return y.value=U.data,U}catch(ee){e.handleError("Failed to save item configuration. Please try again.",ee)}},Q=async()=>{try{const ee={ecatalogIds:_.value.ecatalogIds,productItemId:d.value,optionItemsToAdd:_.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(ee)})).data}catch(ee){e.handleError("Failed to save item configuration to catalog. Please try again.",ee)}},P=async()=>{var ee,M,U;try{const Z=(M=(ee=u.value)==null?void 0:ee.productItem)==null?void 0:M.itemStatus,z={itemId:d.value,fileId:(U=y.value.find(fe=>fe.status===Z))==null?void 0:U.id},F=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(z)}),j=JSON.parse(F);await ne(),await B(d.value,j.id);const se=y.value.findIndex(fe=>fe.status==="Draft");return se!==-1?y.value[se]=j:y.value.push(j),j}catch(Z){e.handleError("Failed to create new version. Please try again.",Z)}},w=async()=>{var Z,z;const ee=(Z=y.value.find(F=>F.status==="Inactive"))==null?void 0:Z.id,M=(z=y.value.find(F=>F.status==="Active"))==null?void 0:z.id,U={itemId:d.value,activeVersionId:M,inactiveVersionId:ee};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(U)})).data}catch(F){e.handleError("Failed to rollback item configuration. Please try again.",F)}},D=ee=>{ee?b.value=ee:b.value=null,x.value=!0};return{items:n,loading:r,totalCount:i,currentPage:o,searchTerm:a,itemLimit:s,columns:t,currentItemConfig:u,savingItemConfiguration:f,currentItem:c,configLoader:v,currentItemData:l,currentGroupIndex:h,currentOptionIndex:p,currentOptionData:g,versionInfo:y,activateConfigData:m,activatePayload:_,itemId:d,showActivationErrorModal:x,activationError:b,activationRetryCount:S,maxRetries:A,getItemConfiguration:B,getItemsList:O,getItemDetails:E,getAvailableAttributes:k,addAttribute:R,getChildFields:N,getPicklistValues:q,activateItemConfig:G,getECatalogsForProduct:Y,getversionInfo:ne,saveItemConfigToCatalog:Q,createNewVersion:P,rollbackItemConfig:w,addCrossSell:async ee=>{const M={itemId:ee.id||ee.itemId,primarySortOrder:ee.primarySortOrder};try{const U=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify(M)});return JSON.parse(U.data)}catch(U){return e.handleError("Failed to add cross sell. Please try again.",U),null}},saveItemConfiguration:async()=>{var ee;if(v.value||r.value||f.value||!((ee=u.value)!=null&&ee.productItem))return null;if(!(u.value.productItem.itemStatus==="Active"||u.value.productItem.itemStatus==="Inactive"))try{f.value=!0;const M={itemId:d.value,configurationData:u.value},U=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify(M)});if(U!=null&&U.errorMessage)return e.handleError(U.errorMessage),null;if(!(U!=null&&U.error)){const Z=y.value.findIndex(z=>z.status==="Draft");y.value[Z].id=U.data}return U}catch(M){return e.handleError("Failed to save item configuration. Please try again.",M),null}finally{f.value=!1}},showActivationError:D,hideActivationError:()=>{x.value=!1,S.value=0},incrementRetryCount:()=>{S.value+=1,x.value=!0},canRetry:()=>S.value<A,assignStableIds:I}}),R7={class:"app-filters-main-wrapper"},L7={class:"app-filters-wrapper"},N7={class:"app-filters"},F7={class:"left-section"},P7={class:"ect-flex ect-gap-2 ect-items-center"},M7={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},q7={class:"right-section"},$7={class:"after-search-wrapper"},j7={class:"buttons-wrapper"},H7={class:"before-button-wrapper"},V7={key:0,class:"action-wrapper"},U7={key:1,class:"button-text ect-font-medium"},z7={key:2,class:"count-badge"},K7=Re({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:e=>e.every(n=>(n.icon||n.text)&&typeof n.handler=="function")},searchWidth:{type:String,default:"312px"},showBackButton:{type:Boolean,default:!1},statusText:{type:String,default:""},placeholder:{type:String,default:"Search by name"},breadcrumbLinks:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(e,{emit:n}){const t=D7(),r=e,i=Xr([]);Ft(()=>{o()});const o=()=>{i.splice(0,i.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(l=>{i.push({...l})})};Ye(()=>r.buttons,()=>{o()},{deep:!0});const a=l=>{s("search",l)},s=n,u=te(""),f=(l,h)=>{l.supportsToggle&&(l.isActive=!l.isActive),typeof l.handler=="function"&&l.handler(l,l.isActive)},c=()=>{s("back")},v=()=>{if(!r.recordLink)return;let l=r.recordLink;if(!l){let m=t.itemId;if(!m){const y=new URLSearchParams(window.location.search),_=new URLSearchParams(window.location.hash.split("?")[1]);m=y.get("itemId")||_.get("itemId")}l=m}if(!l)return;const p=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!p){console.info("[ERROR]: Unable to extract base domain from current URL");return}const d=`${p[1]}/${l}`;window.open(d,"_blank")};return(l,h)=>(V(),J("div",R7,[C("div",L7,[C("div",N7,[C("div",F7,[e.breadcrumbLinks&&e.breadcrumbLinks.length>1?(V(),Ee(k7,{key:0,links:e.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):ge("",!0),C("div",P7,[e.showBackButton?(V(),J("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:c},[he(We,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):ge("",!0),e.title?(V(),J("p",{key:1,class:we(["ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200",{"hover:ect-text-[#0076D6] ect-cursor-pointer":e.recordLink}]),"data-test-id":"filter-header-title",onClick:h[0]||(h[0]=p=>e.recordLink?v():null)},[Fe(xe(e.title)+" ",1),e.recordLink?(V(),J(be,{key:0},[he(We,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),C("div",M7,[he(B7,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):ge("",!0)],2)):ge("",!0),e.statusText?(V(),Ee(x7,{key:2,text:e.statusText,state:e.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):ge("",!0),Je(l.$slots,"after-status",{},void 0,!0)])]),C("div",q7,[e.showSearch?(V(),J("div",{key:0,class:"search-wrapper",style:ze({width:e.searchWidth})},[he(m7,{modelValue:u.value,"onUpdate:modelValue":[h[1]||(h[1]=p=>u.value=p),a],class:"search-input",placeholder:e.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):ge("",!0),C("div",$7,[Je(l.$slots,"afterSearch",{},void 0,!0)]),C("div",j7,[C("div",H7,[Je(l.$slots,"before-button",{},void 0,!0)]),l.$slots.buttons?(V(),J("div",V7,[Je(l.$slots,"buttons",{},void 0,!0)])):(V(!0),J(be,{key:1},Me(i,(p,g)=>(V(),J("div",{key:g,class:"action-wrapper"},[he(Ut,{btype:p.type||"primary","button-style":p.style||"outlined",size:"medium",style:ze({minWidth:p.minWidth||"auto"}),class:we([{active:p.isActive},{"icon-only":p.icon&&!p.text},{"text-button":p.text}]),loading:p.loading,disabled:p.disabled,"data-test-id":`filter-header-button-${p.text?p.text.toLowerCase().replace(/\s+/g,"-"):g}`,onClick:d=>f(p)},{default:Ve(()=>[p.icon?(V(),Ee(We,{key:0,icon:p.icon,symbol:"",color:p.color||"#136E05",size:p.size||14},null,8,["icon","color","size"])):ge("",!0),p.text?(V(),J("span",U7,xe(p.isActive?p.altText:p.text),1)):ge("",!0),p.count?(V(),J("span",z7,xe(p.count),1)):ge("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),X7=["data-test-id"],W7=["data-test-id"],G7=["data-test-id"],Q7=["data-test-id"],Z7=["data-test-id"],J7=["data-test-id"],Y7=["data-test-id"],ev=Re({__name:"ecSwitch",props:Hc({text:{type:[String,Object],required:!1,validator:e=>typeof e=="string"?!0:typeof e=="object"&&e!==null?Object.prototype.hasOwnProperty.call(e,"on")&&Object.prototype.hasOwnProperty.call(e,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:e=>["regular","large"].includes(e)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Hc(["update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const t=e,r=th(e,"modelValue"),i=n,o=me(()=>typeof t.text=="string"?t.text:typeof t.text=="object"&&t.text!==null?r.value?t.text.on:t.text.off:""),a=()=>{t.disabled||i("update:modelValue",!r.value)};return(s,u)=>(V(),J("div",{class:we(["ec-switch-container",{disabled:e.disabled}]),"data-test-id":e.dataTestId},[e.leftAlign?(V(),J("span",{key:0,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Fe(xe(o.value)+" ",1),e.subtext?(V(),J("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,G7)):ge("",!0)],8,W7)):ge("",!0),C("div",{class:we(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":e.size==="large"}]),"data-test-id":`${e.dataTestId}-switch`,onClick:a},[C("div",{class:"ec-switch__handle","data-test-id":`${e.dataTestId}-handle`},null,8,Z7)],10,Q7),e.leftAlign?ge("",!0):(V(),J("span",{key:1,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Fe(xe(o.value)+" ",1),e.subtext?(V(),J("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,Y7)):ge("",!0)],8,J7))],10,X7))}},[["__scopeId","data-v-cfefad9a"]]),tv={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},nv={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},rv={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},iv={key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-content-scrollable"},ov=Re({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1}},emits:["action"],setup(e,{emit:n}){const t=dn(),r=te(!1),i=te(0),o=me(()=>t.configuration),a=e,s=n,u=me(()=>r.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>f()}]:[{text:a.qliId?"Save":"Add To Quote",altText:"Save",type:t.isChangedConfiguration?"primary":"secondary",style:"primary",disabled:!t.isChangedConfiguration,handler:()=>c()}]),f=()=>{r.value=!1},c=async()=>{const v=await t.maintainQuoteConfiguration();v?s("action",{event:"add-to-quote",data:v}):s("action",{event:"save"})};return(v,l)=>Ne(t).configuration?(V(),J("div",tv,[Ne(t).savedScreen?(V(),Ee(R4,{key:1})):(V(),J(be,{key:0},[C("div",nv,[C("div",rv,[ge("",!0),he(K7,{title:o.value.itemName,buttons:u.value},{"before-button":Ve(()=>[Ne(t).isYearlyPricingExist?(V(),Ee(ev,{key:0,modelValue:Ne(t).showYearlyPricing,"onUpdate:modelValue":[l[0]||(l[0]=h=>Ne(t).showYearlyPricing=h),Ne(t).changePricingScheme],"left-align":"",class:"ect-text-nowrap",text:{on:"Yearly Price",off:"Monthly Price"},"data-test-id":"configurator-switch-show-yearly-pricing"},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0)]),_:1},8,["title","buttons"])]),C("div",{class:we(r.value?"ect-pb-16":"ect-pb-0")},[he(d7,{config:o.value,"edit-attributes":r.value,scroll:i.value,onEditAttributes:l[1]||(l[1]=h=>r.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),r.value?ge("",!0):(V(),J("div",iv,[he(n7)]))],64))])):ge("",!0)}},[["__scopeId","data-v-78484313"]]),av=["data-item-id","data-qli-id"],sv={key:0,class:"ect-flex-1 ect-min-h-0"},lv={key:1,class:"ect-flex-1 ect-min-h-0"},cv={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1}},emits:["ready","action"],setup(e,{emit:n}){const t=e,r=n,i=te(!0),o=dn();return qn(async()=>{i.value=!0,console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await o.initConfigurator(t.itemId,t.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready"),i.value=!1}),(a,s)=>(V(),J("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":e.itemId,"data-qli-id":e.qliId},[i.value?(V(),J("div",lv,[he($u)])):(V(),J("div",sv,[he(ov,{"qli-id":e.qliId,onAction:s[0]||(s[0]=u=>r("action",u)),onSave:a.handleSave},null,8,["qli-id","onSave"])]))],8,av))}},uv=(e=>(jt("data-v-0a44fa8b"),e=e(),Ht(),e))(()=>C("div",{class:"dropdowntp"},null,-1)),fv=Re({__name:"ExpediteConfigurator",props:{setupData:{type:Object,required:!0},itemId:{type:String,required:!0},qliId:{type:String,required:!1},quoteId:{type:String,required:!1},apiKey:{type:String,required:!0}},emits:["ready","action"],setup(e,{emit:n}){const t=R0(),r=go(),i=Qt(),o=dn(),a=e,s=n,u=()=>{s("ready",o.exposeProperties())};return qn(()=>{const{orgType:f,orgId:c,userId:v}=a.setupData;t.quoteId=a.quoteId,t.setSetupData(a.setupData),o.initializeController(a.apiKey,f,c,v)}),(f,c)=>(V(),J(be,null,[he(B2),he(Ga),Ne(i).errorPopup?(V(),Ee(m2,{key:0,data:Ne(i).errorPopup,onClose:c[0]||(c[0]=v=>Ne(i).errorPopup=null)},null,8,["data"])):ge("",!0),Ne(r).unsavedChanges?(V(),Ee(_2,{key:1,data:Ne(r).unsavedChanges,onClose:c[1]||(c[1]=v=>Ne(r).unsavedChanges=null)},null,8,["data"])):ge("",!0),uv,he(cv,{"item-id":a.itemId,"qli-id":a.qliId,onReady:u,onAction:c[2]||(c[2]=v=>s("action",v))},null,8,["item-id","qli-id"])],64))}},[["__scopeId","data-v-0a44fa8b"]]),dv=wt("mygpt",()=>{const e=te("");async function n(r,i="gpt-3.5-turbo",o=300){var a,s,u;if(!e.value)throw new Error("Secret key is required. Please set it in the store.");try{const f=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.value}`},body:JSON.stringify({model:i,messages:r,max_tokens:Math.min(o,300),temperature:.7})});if(!f.ok){const v=await f.json().catch(()=>({}));throw new Error(((a=v.error)==null?void 0:a.message)||`API Error: ${f.status} ${f.statusText}`)}return((u=(s=(await f.json()).choices[0])==null?void 0:s.message)==null?void 0:u.content)||"No response generated"}catch(f){throw new Error(f.message||"Failed to get response from GPT")}}function t(r){e.value=r}return{secretKey:e,getGptResponse:n,setSecretKey:t}}),xi=e=>(jt("data-v-46273585"),e=e(),Ht(),e),hv={class:"custom-gpt-container"},pv={class:"gpt-header"},vv=xi(()=>C("h3",{class:"gpt-title"},"GPT Chat",-1)),gv={class:"gpt-response-area"},mv={key:0,class:"loading-indicator"},yv=[xi(()=>C("div",{class:"spinner"},null,-1)),xi(()=>C("span",null,"Thinking...",-1))],xv={key:1,class:"error-message"},_v=xi(()=>C("strong",null,"Error:",-1)),bv={key:2,class:"response-content"},Cv={key:3,class:"empty-state"},wv=[xi(()=>C("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],Ev={class:"gpt-input-area"},Av={class:"input-wrapper"},kv=["placeholder","disabled"],Ov=["disabled"],Sv={key:0},Iv={key:1},Tv={key:0,class:"warning-message"},Bv=Re({__name:"ExpediteGPT",props:{secretKey:{type:String,required:!1,default:""},model:{type:String,required:!1,default:"gpt-3.5-turbo"},maxTokens:{type:Number,required:!1,default:300},placeholder:{type:String,required:!1,default:"Enter your message..."}},setup(e){const n=e,t=dv(),r=me(()=>n.secretKey||t.secretKey),i=te(""),o=te(""),a=te(!1),s=te(null),u=te([]),f=me(()=>o.value.trim().length>0),c=me(()=>i.value.trim().length>0&&!a.value&&r.value),v=async()=>{if(!c.value)return;const p=i.value.trim();if(p){a.value=!0,s.value=null,i.value="";try{u.value.push({role:"user",content:p});const g=u.value.reduce((y,_)=>y+Math.ceil(_.content.length/4),0);let d=[...u.value];g>n.maxTokens&&(d=u.value.slice(-3));const m=await t.getGptResponse(d,n.model,n.maxTokens);o.value=m,u.value.push({role:"assistant",content:m})}catch(g){s.value=g.message||"Failed to get response from GPT",console.error("GPT API Error:",g)}finally{a.value=!1}}},l=p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),v())},h=()=>{u.value=[],o.value="",s.value=null};return qn(()=>{t.setSecretKey(n.secretKey)}),(p,g)=>(V(),J("div",hv,[C("div",pv,[vv,f.value||u.value.length>0?(V(),J("button",{key:0,onClick:h,class:"clear-button",type:"button"}," Clear ")):ge("",!0)]),C("div",gv,[a.value?(V(),J("div",mv,yv)):s.value?(V(),J("div",xv,[_v,Fe(" "+xe(s.value),1)])):f.value?(V(),J("div",bv,xe(o.value),1)):(V(),J("div",Cv,wv))]),C("div",Ev,[C("div",Av,[ln(C("textarea",{"onUpdate:modelValue":g[0]||(g[0]=d=>i.value=d),placeholder:e.placeholder,disabled:a.value||!r.value,onKeypress:l,class:"gpt-input",rows:"3"},null,40,kv),[[li,i.value]]),C("button",{onClick:v,disabled:!c.value,class:"send-button",type:"button"},[a.value?(V(),J("span",Sv,"...")):(V(),J("span",Iv,"Send"))],8,Ov)]),r.value?ge("",!0):(V(),J("div",Tv," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]),qo="tsocustomer2.expedite1.com",_i="https://csimqu3mn5g6pjhq6mki4qdayu.appsync-api.us-east-1.amazonaws.com/graphql",$o="da2-vag5nadijfegloywmu7rikapfi";var Z0={exports:{}};function Dv(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bs={exports:{}};const Rv=P8(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var J0;function qe(){return J0||(J0=1,function(e,n){(function(t,r){e.exports=r()})(Se,function(){var t=t||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Se<"u"&&Se.crypto&&(o=Se.crypto),!o&&typeof Dv=="function")try{o=Rv}catch{}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function y(){}return function(_){var x;return y.prototype=_,x=new y,y.prototype=null,x}}(),u={},f=u.lib={},c=f.Base=function(){return{extend:function(y){var _=s(this);return y&&_.mixIn(y),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var _ in y)y.hasOwnProperty(_)&&(this[_]=y[_]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=f.WordArray=c.extend({init:function(y,_){y=this.words=y||[],_!=i?this.sigBytes=_:this.sigBytes=y.length*4},toString:function(y){return(y||h).stringify(this)},concat:function(y){var _=this.words,x=y.words,b=this.sigBytes,S=y.sigBytes;if(this.clamp(),b%4)for(var A=0;A<S;A++){var I=x[A>>>2]>>>24-A%4*8&255;_[b+A>>>2]|=I<<24-(b+A)%4*8}else for(var B=0;B<S;B+=4)_[b+B>>>2]=x[B>>>2];return this.sigBytes+=S,this},clamp:function(){var y=this.words,_=this.sigBytes;y[_>>>2]&=4294967295<<32-_%4*8,y.length=r.ceil(_/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var _=[],x=0;x<y;x+=4)_.push(a());return new v.init(_,y)}}),l=u.enc={},h=l.Hex={stringify:function(y){for(var _=y.words,x=y.sigBytes,b=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;b.push((A>>>4).toString(16)),b.push((A&15).toString(16))}return b.join("")},parse:function(y){for(var _=y.length,x=[],b=0;b<_;b+=2)x[b>>>3]|=parseInt(y.substr(b,2),16)<<24-b%8*4;return new v.init(x,_/2)}},p=l.Latin1={stringify:function(y){for(var _=y.words,x=y.sigBytes,b=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;b.push(String.fromCharCode(A))}return b.join("")},parse:function(y){for(var _=y.length,x=[],b=0;b<_;b++)x[b>>>2]|=(y.charCodeAt(b)&255)<<24-b%4*8;return new v.init(x,_)}},g=l.Utf8={stringify:function(y){try{return decodeURIComponent(escape(p.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return p.parse(unescape(encodeURIComponent(y)))}},d=f.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=g.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var _,x=this._data,b=x.words,S=x.sigBytes,A=this.blockSize,I=A*4,B=S/I;y?B=r.ceil(B):B=r.max((B|0)-this._minBufferSize,0);var O=B*A,E=r.min(O*4,S);if(O){for(var k=0;k<O;k+=A)this._doProcessBlock(b,k);_=b.splice(0,O),x.sigBytes-=E}return new v.init(_,E)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});f.Hasher=d.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(y){return function(_,x){return new y.init(x).finalize(_)}},_createHmacHelper:function(y){return function(_,x){return new m.HMAC.init(y,x).finalize(_)}}});var m=u.algo={};return u}(Math);return t})}(bs)),bs.exports}var Cs={exports:{}},Y0;function jo(){return Y0||(Y0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.Base,s=o.WordArray,u=i.x64={};u.Word=a.extend({init:function(f,c){this.high=f,this.low=c}}),u.WordArray=a.extend({init:function(f,c){f=this.words=f||[],c!=r?this.sigBytes=c:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,c=f.length,v=[],l=0;l<c;l++){var h=f[l];v.push(h.high),v.push(h.low)}return s.create(v,this.sigBytes)},clone:function(){for(var f=a.clone.call(this),c=f.words=this.words.slice(0),v=c.length,l=0;l<v;l++)c[l]=c[l].clone();return f}})}(),t})}(Cs)),Cs.exports}var ws={exports:{}},ef;function Lv(){return ef||(ef=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var f=u.byteLength,c=[],v=0;v<f;v++)c[v>>>2]|=u[v]<<24-v%4*8;a.call(this,c,f)}else a.apply(this,arguments)};s.prototype=o}}(),t.lib.WordArray})}(ws)),ws.exports}var Es={exports:{}},tf;function Nv(){return tf||(tf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Utf16=a.Utf16BE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=f[l>>>2]>>>16-l%4*8&65535;v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=u.charCodeAt(v)<<16-v%2*16;return o.create(c,f*2)}},a.Utf16LE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=s(f[l>>>2]>>>16-l%4*8&65535);v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=s(u.charCodeAt(v)<<16-v%2*16);return o.create(c,f*2)}};function s(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(Es)),Es.exports}var As={exports:{}},nf;function ur(){return nf||(nf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(u){var f=u.words,c=u.sigBytes,v=this._map;u.clamp();for(var l=[],h=0;h<c;h+=3)for(var p=f[h>>>2]>>>24-h%4*8&255,g=f[h+1>>>2]>>>24-(h+1)%4*8&255,d=f[h+2>>>2]>>>24-(h+2)%4*8&255,m=p<<16|g<<8|d,y=0;y<4&&h+y*.75<c;y++)l.push(v.charAt(m>>>6*(3-y)&63));var _=v.charAt(64);if(_)for(;l.length%4;)l.push(_);return l.join("")},parse:function(u){var f=u.length,c=this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var l=0;l<c.length;l++)v[c.charCodeAt(l)]=l}var h=c.charAt(64);if(h){var p=u.indexOf(h);p!==-1&&(f=p)}return s(u,f,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64})}(As)),As.exports}var ks={exports:{}},rf;function Fv(){return rf||(rf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64url={stringify:function(u,f){f===void 0&&(f=!0);var c=u.words,v=u.sigBytes,l=f?this._safe_map:this._map;u.clamp();for(var h=[],p=0;p<v;p+=3)for(var g=c[p>>>2]>>>24-p%4*8&255,d=c[p+1>>>2]>>>24-(p+1)%4*8&255,m=c[p+2>>>2]>>>24-(p+2)%4*8&255,y=g<<16|d<<8|m,_=0;_<4&&p+_*.75<v;_++)h.push(l.charAt(y>>>6*(3-_)&63));var x=l.charAt(64);if(x)for(;h.length%4;)h.push(x);return h.join("")},parse:function(u,f){f===void 0&&(f=!0);var c=u.length,v=f?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var h=0;h<v.length;h++)l[v.charCodeAt(h)]=h}var p=v.charAt(64);if(p){var g=u.indexOf(p);g!==-1&&(c=g)}return s(u,c,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64url})}(ks)),ks.exports}var Os={exports:{}},of;function fr(){return of||(of=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[];(function(){for(var g=0;g<64;g++)f[g]=r.abs(r.sin(g+1))*4294967296|0})();var c=u.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,d){for(var m=0;m<16;m++){var y=d+m,_=g[y];g[y]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var x=this._hash.words,b=g[d+0],S=g[d+1],A=g[d+2],I=g[d+3],B=g[d+4],O=g[d+5],E=g[d+6],k=g[d+7],R=g[d+8],N=g[d+9],q=g[d+10],G=g[d+11],Y=g[d+12],ne=g[d+13],Q=g[d+14],P=g[d+15],w=x[0],D=x[1],L=x[2],$=x[3];w=v(w,D,L,$,b,7,f[0]),$=v($,w,D,L,S,12,f[1]),L=v(L,$,w,D,A,17,f[2]),D=v(D,L,$,w,I,22,f[3]),w=v(w,D,L,$,B,7,f[4]),$=v($,w,D,L,O,12,f[5]),L=v(L,$,w,D,E,17,f[6]),D=v(D,L,$,w,k,22,f[7]),w=v(w,D,L,$,R,7,f[8]),$=v($,w,D,L,N,12,f[9]),L=v(L,$,w,D,q,17,f[10]),D=v(D,L,$,w,G,22,f[11]),w=v(w,D,L,$,Y,7,f[12]),$=v($,w,D,L,ne,12,f[13]),L=v(L,$,w,D,Q,17,f[14]),D=v(D,L,$,w,P,22,f[15]),w=l(w,D,L,$,S,5,f[16]),$=l($,w,D,L,E,9,f[17]),L=l(L,$,w,D,G,14,f[18]),D=l(D,L,$,w,b,20,f[19]),w=l(w,D,L,$,O,5,f[20]),$=l($,w,D,L,q,9,f[21]),L=l(L,$,w,D,P,14,f[22]),D=l(D,L,$,w,B,20,f[23]),w=l(w,D,L,$,N,5,f[24]),$=l($,w,D,L,Q,9,f[25]),L=l(L,$,w,D,I,14,f[26]),D=l(D,L,$,w,R,20,f[27]),w=l(w,D,L,$,ne,5,f[28]),$=l($,w,D,L,A,9,f[29]),L=l(L,$,w,D,k,14,f[30]),D=l(D,L,$,w,Y,20,f[31]),w=h(w,D,L,$,O,4,f[32]),$=h($,w,D,L,R,11,f[33]),L=h(L,$,w,D,G,16,f[34]),D=h(D,L,$,w,Q,23,f[35]),w=h(w,D,L,$,S,4,f[36]),$=h($,w,D,L,B,11,f[37]),L=h(L,$,w,D,k,16,f[38]),D=h(D,L,$,w,q,23,f[39]),w=h(w,D,L,$,ne,4,f[40]),$=h($,w,D,L,b,11,f[41]),L=h(L,$,w,D,I,16,f[42]),D=h(D,L,$,w,E,23,f[43]),w=h(w,D,L,$,N,4,f[44]),$=h($,w,D,L,Y,11,f[45]),L=h(L,$,w,D,P,16,f[46]),D=h(D,L,$,w,A,23,f[47]),w=p(w,D,L,$,b,6,f[48]),$=p($,w,D,L,k,10,f[49]),L=p(L,$,w,D,Q,15,f[50]),D=p(D,L,$,w,O,21,f[51]),w=p(w,D,L,$,Y,6,f[52]),$=p($,w,D,L,I,10,f[53]),L=p(L,$,w,D,q,15,f[54]),D=p(D,L,$,w,S,21,f[55]),w=p(w,D,L,$,R,6,f[56]),$=p($,w,D,L,P,10,f[57]),L=p(L,$,w,D,E,15,f[58]),D=p(D,L,$,w,ne,21,f[59]),w=p(w,D,L,$,B,6,f[60]),$=p($,w,D,L,G,10,f[61]),L=p(L,$,w,D,A,15,f[62]),D=p(D,L,$,w,N,21,f[63]),x[0]=x[0]+w|0,x[1]=x[1]+D|0,x[2]=x[2]+L|0,x[3]=x[3]+$|0},_doFinalize:function(){var g=this._data,d=g.words,m=this._nDataBytes*8,y=g.sigBytes*8;d[y>>>5]|=128<<24-y%32;var _=r.floor(m/4294967296),x=m;d[(y+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,d[(y+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,g.sigBytes=(d.length+1)*4,this._process();for(var b=this._hash,S=b.words,A=0;A<4;A++){var I=S[A];S[A]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return b},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function v(g,d,m,y,_,x,b){var S=g+(d&m|~d&y)+_+b;return(S<<x|S>>>32-x)+d}function l(g,d,m,y,_,x,b){var S=g+(d&y|m&~y)+_+b;return(S<<x|S>>>32-x)+d}function h(g,d,m,y,_,x,b){var S=g+(d^m^y)+_+b;return(S<<x|S>>>32-x)+d}function p(g,d,m,y,_,x,b){var S=g+(m^(d|~y))+_+b;return(S<<x|S>>>32-x)+d}i.MD5=s._createHelper(c),i.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5})}(Os)),Os.exports}var Ss={exports:{}},af;function sf(){return af||(af=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=i.Hasher,s=r.algo,u=[],f=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,v){for(var l=this._hash.words,h=l[0],p=l[1],g=l[2],d=l[3],m=l[4],y=0;y<80;y++){if(y<16)u[y]=c[v+y]|0;else{var _=u[y-3]^u[y-8]^u[y-14]^u[y-16];u[y]=_<<1|_>>>31}var x=(h<<5|h>>>27)+m+u[y];y<20?x+=(p&g|~p&d)+1518500249:y<40?x+=(p^g^d)+1859775393:y<60?x+=(p&g|p&d|g&d)-1894007588:x+=(p^g^d)-899497514,m=d,d=g,g=p<<30|p>>>2,p=h,h=x}l[0]=l[0]+h|0,l[1]=l[1]+p|0,l[2]=l[2]+g|0,l[3]=l[3]+d|0,l[4]=l[4]+m|0},_doFinalize:function(){var c=this._data,v=c.words,l=this._nDataBytes*8,h=c.sigBytes*8;return v[h>>>5]|=128<<24-h%32,v[(h+64>>>9<<4)+14]=Math.floor(l/4294967296),v[(h+64>>>9<<4)+15]=l,c.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var c=a.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=a._createHelper(f),r.HmacSHA1=a._createHmacHelper(f)}(),t.SHA1})}(Ss)),Ss.exports}var Is={exports:{}},lf;function Ts(){return lf||(lf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[],c=[];(function(){function h(m){for(var y=r.sqrt(m),_=2;_<=y;_++)if(!(m%_))return!1;return!0}function p(m){return(m-(m|0))*4294967296|0}for(var g=2,d=0;d<64;)h(g)&&(d<8&&(f[d]=p(r.pow(g,1/2))),c[d]=p(r.pow(g,1/3)),d++),g++})();var v=[],l=u.SHA256=s.extend({_doReset:function(){this._hash=new a.init(f.slice(0))},_doProcessBlock:function(h,p){for(var g=this._hash.words,d=g[0],m=g[1],y=g[2],_=g[3],x=g[4],b=g[5],S=g[6],A=g[7],I=0;I<64;I++){if(I<16)v[I]=h[p+I]|0;else{var B=v[I-15],O=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,E=v[I-2],k=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;v[I]=O+v[I-7]+k+v[I-16]}var R=x&b^~x&S,N=d&m^d&y^m&y,q=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),G=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),Y=A+G+R+c[I]+v[I],ne=q+N;A=S,S=b,b=x,x=_+Y|0,_=y,y=m,m=d,d=Y+ne|0}g[0]=g[0]+d|0,g[1]=g[1]+m|0,g[2]=g[2]+y|0,g[3]=g[3]+_|0,g[4]=g[4]+x|0,g[5]=g[5]+b|0,g[6]=g[6]+S|0,g[7]=g[7]+A|0},_doFinalize:function(){var h=this._data,p=h.words,g=this._nDataBytes*8,d=h.sigBytes*8;return p[d>>>5]|=128<<24-d%32,p[(d+64>>>9<<4)+14]=r.floor(g/4294967296),p[(d+64>>>9<<4)+15]=g,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=s._createHelper(l),i.HmacSHA256=s._createHmacHelper(l)}(Math),t.SHA256})}(Is)),Is.exports}var Bs={exports:{}},cf;function Pv(){return cf||(cf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),Ts())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.algo,s=a.SHA256,u=a.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=s._doFinalize.call(this);return f.sigBytes-=4,f}});r.SHA224=s._createHelper(u),r.HmacSHA224=s._createHmacHelper(u)}(),t.SHA224})}(Bs)),Bs.exports}var Ds={exports:{}},uf;function ff(){return uf||(uf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.Hasher,a=r.x64,s=a.Word,u=a.WordArray,f=r.algo;function c(){return s.create.apply(s,arguments)}var v=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];(function(){for(var p=0;p<80;p++)l[p]=c()})();var h=f.SHA512=o.extend({_doReset:function(){this._hash=new u.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(p,g){for(var d=this._hash.words,m=d[0],y=d[1],_=d[2],x=d[3],b=d[4],S=d[5],A=d[6],I=d[7],B=m.high,O=m.low,E=y.high,k=y.low,R=_.high,N=_.low,q=x.high,G=x.low,Y=b.high,ne=b.low,Q=S.high,P=S.low,w=A.high,D=A.low,L=I.high,$=I.low,W=B,H=O,X=E,ee=k,M=R,U=N,Z=q,z=G,F=Y,j=ne,se=Q,fe=P,ce=w,ie=D,oe=L,le=$,ue=0;ue<80;ue++){var ae,ve,ye=l[ue];if(ue<16)ve=ye.high=p[g+ue*2]|0,ae=ye.low=p[g+ue*2+1]|0;else{var _e=l[ue-15],Ce=_e.high,ke=_e.low,Ae=(Ce>>>1|ke<<31)^(Ce>>>8|ke<<24)^Ce>>>7,$e=(ke>>>1|Ce<<31)^(ke>>>8|Ce<<24)^(ke>>>7|Ce<<25),Te=l[ue-2],Ke=Te.high,dt=Te.low,Xn=(Ke>>>19|dt<<13)^(Ke<<3|dt>>>29)^Ke>>>6,Bt=(dt>>>19|Ke<<13)^(dt<<3|Ke>>>29)^(dt>>>6|Ke<<26),zt=l[ue-7],it=zt.high,st=zt.low,Mt=l[ue-16],qt=Mt.high,kn=Mt.low;ae=$e+st,ve=Ae+it+(ae>>>0<$e>>>0?1:0),ae=ae+Bt,ve=ve+Xn+(ae>>>0<Bt>>>0?1:0),ae=ae+kn,ve=ve+qt+(ae>>>0<kn>>>0?1:0),ye.high=ve,ye.low=ae}var vr=F&se^~F&ce,gn=j&fe^~j&ie,gr=W&X^W&M^X&M,On=H&ee^H&U^ee&U,mr=(W>>>28|H<<4)^(W<<30|H>>>2)^(W<<25|H>>>7),Wn=(H>>>28|W<<4)^(H<<30|W>>>2)^(H<<25|W>>>7),yr=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),mn=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),xr=v[ue],nn=xr.high,Mr=xr.low,ht=le+mn,Kt=oe+yr+(ht>>>0<le>>>0?1:0),ht=ht+gn,Kt=Kt+vr+(ht>>>0<gn>>>0?1:0),ht=ht+Mr,Kt=Kt+nn+(ht>>>0<Mr>>>0?1:0),ht=ht+ae,Kt=Kt+ve+(ht>>>0<ae>>>0?1:0),_r=Wn+On,br=mr+gr+(_r>>>0<Wn>>>0?1:0);oe=ce,le=ie,ce=se,ie=fe,se=F,fe=j,j=z+ht|0,F=Z+Kt+(j>>>0<z>>>0?1:0)|0,Z=M,z=U,M=X,U=ee,X=W,ee=H,H=ht+_r|0,W=Kt+br+(H>>>0<ht>>>0?1:0)|0}O=m.low=O+H,m.high=B+W+(O>>>0<H>>>0?1:0),k=y.low=k+ee,y.high=E+X+(k>>>0<ee>>>0?1:0),N=_.low=N+U,_.high=R+M+(N>>>0<U>>>0?1:0),G=x.low=G+z,x.high=q+Z+(G>>>0<z>>>0?1:0),ne=b.low=ne+j,b.high=Y+F+(ne>>>0<j>>>0?1:0),P=S.low=P+fe,S.high=Q+se+(P>>>0<fe>>>0?1:0),D=A.low=D+ie,A.high=w+ce+(D>>>0<ie>>>0?1:0),$=I.low=$+le,I.high=L+oe+($>>>0<le>>>0?1:0)},_doFinalize:function(){var p=this._data,g=p.words,d=this._nDataBytes*8,m=p.sigBytes*8;g[m>>>5]|=128<<24-m%32,g[(m+128>>>10<<5)+30]=Math.floor(d/4294967296),g[(m+128>>>10<<5)+31]=d,p.sigBytes=g.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=o._createHelper(h),r.HmacSHA512=o._createHmacHelper(h)}(),t.SHA512})}(Ds)),Ds.exports}var Rs={exports:{}},df;function Mv(){return df||(df=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo(),ff())})(Se,function(t){return function(){var r=t,i=r.x64,o=i.Word,a=i.WordArray,s=r.algo,u=s.SHA512,f=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var c=u._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=u._createHelper(f),r.HmacSHA384=u._createHmacHelper(f)}(),t.SHA384})}(Rs)),Rs.exports}var Ls={exports:{}},hf;function qv(){return hf||(hf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.x64,f=u.Word,c=i.algo,v=[],l=[],h=[];(function(){for(var d=1,m=0,y=0;y<24;y++){v[d+5*m]=(y+1)*(y+2)/2%64;var _=m%5,x=(2*d+3*m)%5;d=_,m=x}for(var d=0;d<5;d++)for(var m=0;m<5;m++)l[d+5*m]=m+(2*d+3*m)%5*5;for(var b=1,S=0;S<24;S++){for(var A=0,I=0,B=0;B<7;B++){if(b&1){var O=(1<<B)-1;O<32?I^=1<<O:A^=1<<O-32}b&128?b=b<<1^113:b<<=1}h[S]=f.create(A,I)}})();var p=[];(function(){for(var d=0;d<25;d++)p[d]=f.create()})();var g=c.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var d=this._state=[],m=0;m<25;m++)d[m]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(d,m){for(var y=this._state,_=this.blockSize/2,x=0;x<_;x++){var b=d[m+2*x],S=d[m+2*x+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var A=y[x];A.high^=S,A.low^=b}for(var I=0;I<24;I++){for(var B=0;B<5;B++){for(var O=0,E=0,k=0;k<5;k++){var A=y[B+5*k];O^=A.high,E^=A.low}var R=p[B];R.high=O,R.low=E}for(var B=0;B<5;B++)for(var N=p[(B+4)%5],q=p[(B+1)%5],G=q.high,Y=q.low,O=N.high^(G<<1|Y>>>31),E=N.low^(Y<<1|G>>>31),k=0;k<5;k++){var A=y[B+5*k];A.high^=O,A.low^=E}for(var ne=1;ne<25;ne++){var O,E,A=y[ne],Q=A.high,P=A.low,w=v[ne];w<32?(O=Q<<w|P>>>32-w,E=P<<w|Q>>>32-w):(O=P<<w-32|Q>>>64-w,E=Q<<w-32|P>>>64-w);var D=p[l[ne]];D.high=O,D.low=E}var L=p[0],$=y[0];L.high=$.high,L.low=$.low;for(var B=0;B<5;B++)for(var k=0;k<5;k++){var ne=B+5*k,A=y[ne],W=p[ne],H=p[(B+1)%5+5*k],X=p[(B+2)%5+5*k];A.high=W.high^~H.high&X.high,A.low=W.low^~H.low&X.low}var A=y[0],ee=h[I];A.high^=ee.high,A.low^=ee.low}},_doFinalize:function(){var d=this._data,m=d.words;this._nDataBytes*8;var y=d.sigBytes*8,_=this.blockSize*32;m[y>>>5]|=1<<24-y%32,m[(r.ceil((y+1)/_)*_>>>5)-1]|=128,d.sigBytes=m.length*4,this._process();for(var x=this._state,b=this.cfg.outputLength/8,S=b/8,A=[],I=0;I<S;I++){var B=x[I],O=B.high,E=B.low;O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,A.push(E),A.push(O)}return new a.init(A,b)},clone:function(){for(var d=s.clone.call(this),m=d._state=this._state.slice(0),y=0;y<25;y++)m[y]=m[y].clone();return d}});i.SHA3=s._createHelper(g),i.HmacSHA3=s._createHmacHelper(g)}(Math),t.SHA3})}(Ls)),Ls.exports}var Ns={exports:{}},pf;function $v(){return pf||(pf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){/** @preserve
|
|
86
|
+
or use v-on:ready="onReady(quill)" event instead.`},y=(E,k)=>e.contentType==="html"?S():e.contentType==="text"?x(E,k):t==null?void 0:t.getContents(E,k),_=(E,k="api")=>{const R=E||(e.contentType==="delta"?new J8:"");e.contentType==="html"?A(R):e.contentType==="text"?b(R,k):t==null||t.setContents(R,k),f=s(R)},x=(E,k)=>{var R;return(R=t==null?void 0:t.getText(E,k))!==null&&R!==void 0?R:""},b=(E,k="api")=>{t==null||t.setText(E,k)},S=()=>{var E;return(E=t==null?void 0:t.root.innerHTML)!==null&&E!==void 0?E:""},A=E=>{t&&(t.root.innerHTML=E)},I=(E,k="api")=>{const R=t==null?void 0:t.clipboard.convert(E);R&&(t==null||t.setContents(R,k))},B=()=>{t==null||t.focus()},O=()=>{sn(()=>{var E;!n.slots.toolbar&&t&&((E=t.getModule("toolbar"))===null||E===void 0||E.container.remove()),o()})};return Ye(()=>e.content,E=>{if(!t||!E||c(E))return;const k=t.getSelection();k&&sn(()=>t==null?void 0:t.setSelection(k)),_(E)},{deep:!0}),Ye(()=>e.enable,E=>{t&&t.enable(E)}),{editor:i,getEditor:g,getToolbar:d,getQuill:m,getContents:y,setContents:_,getHTML:S,setHTML:A,pasteHTML:I,focus:B,getText:x,setText:b,reinit:O}},render(){var e,n;return[(n=(e=this.$slots).toolbar)===null||n===void 0?void 0:n.call(e),nh("div",{ref:"editor",...this.$attrs})]}}),ep={class:"input"},tp=["for","data-test-id"],np=["data-test-id"],rp=Re({__name:"RichTextEditor",props:{modelValue:{type:String,default:""},editorOptions:{type:Object,default:()=>({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"})},dataTestId:{type:String,default:""},label:{type:String,default:""},required:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:modelValue"],setup(e){const n=e,t=me(()=>typeof n.error=="string"?n.error:n.error===""?!1:n.error===!0?`${n.label||"Field"} is required`:n.error),r=te("");return qn(()=>{r.value=n.modelValue}),(i,o)=>(V(),J("div",ep,[e.label?(V(),J("label",{key:0,class:we({error_color:!!e.error}),for:e.label,"data-test-id":`${e.dataTestId}-label`},[Fe(xe(e.label)+" ",1),e.required?(V(),J("span",{key:0,class:we({error_color:!!e.error})},"*",2)):ge("",!0)],10,tp)):ge("",!0),he(Ne(Y8),{"content-type":"html",toolbar:e.editorOptions,"model-value":e.modelValue,"data-test-id":e.dataTestId,content:r.value,"onUpdate:content":o[0]||(o[0]=a=>i.$emit("update:modelValue",a))},null,8,["toolbar","model-value","data-test-id","content"]),t.value?(V(),J("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${e.dataTestId}-error`},xe(t.value),9,np)):ge("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),ip={class:"ect-w-full ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-rounded-md ect-border-1 ect-border-gray-200 md:ect-gap-5 lg:ect-gap-6","data-test-id":"configurator-inputs-container"},op={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},ap={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},sp={key:0,class:"ect-col-span-2"},lp=["data-test-id"],cp=["id","onUpdate:modelValue","disabled","data-test-id"],up=["for","data-test-id"],fp={key:2,class:"quill-editor-styles"},dp=C("div",{class:"dropdowntp"},null,-1),hp=C("div",{id:"modals"},null,-1),Q0={__name:"InputsContainer",props:{title:{type:String,default:""},lookup:{type:Object,default:()=>null},attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=dn(),t=e,r=te({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),i=te(t.lookup),o=me(()=>{const u=t.lookup.relatedFields.map(f=>f.child);return u.push("Name"),u});function a(u,f){const c=f.options.find(v=>v.Id===u);u===null?(f.options=[],f.value=null,f.relatedFields.forEach(v=>{v.value=null})):(f.value=c.Name,f.relatedFields.forEach(v=>{v.value=c[v.child]}))}const s=or(async function(u,f){f.loading=!0;const c={objectType:f.referenceObject,searchText:u||"",lstFields:o.value||[]},v=await n.getRecords(c);f.options=v,f.loading=!1});return(u,f)=>(V(),J(be,null,[C("div",ip,[e.title?(V(),J("div",op,xe(e.title),1)):ge("",!0),C("div",ap,[i.value?(V(),J("div",sp,[he(N0,{modelValue:i.value.referenceRecordId,"onUpdate:modelValue":[f[0]||(f[0]=c=>i.value.referenceRecordId=c),f[1]||(f[1]=c=>a(c,i.value))],"data-test-id":`configurator-inputs-lookup-${i.value.attRecordId??u.index}`,label:i.value.label,options:i.value.options,disabled:!i.value.editable,required:i.value.required,loading:i.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:f[2]||(f[2]=c=>Ne(s)(c,i.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):ge("",!0),(V(!0),J(be,null,Me(e.attributes,(c,v)=>(V(),J("div",{key:v,class:"attribute-input"},[c.dataType==="PICKLIST"||c.dataType==="MULTIPICKLIST"?(V(),Ee(N0,{key:0,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,placeholder:c.label,disabled:!c.editable,options:c.picklistValues.map(l=>({label:l,value:l})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):c.dataType==="BOOLEAN"?(V(),J("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${c.attRecordId??u.index}`},[ln(C("input",{id:`checkbox-${c.attRecordId??u.index}`,"onUpdate:modelValue":l=>c.value=l,type:"checkbox",disabled:!c.editable,class:"ect-w-4 ect-h-4 ect-accent-success ect-border-gray-300 ect-rounded ect-text-text-success focus:ect-ring-green-500","data-test-id":`configurator-inputs-checkbox-input-${c.attRecordId??u.index}`},null,8,cp),[[Va,c.value]]),C("label",{for:`checkbox-${c.attRecordId??u.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${c.attRecordId??u.index}`},xe(c.label),9,up)],8,lp)):c.dataType==="TEXTAREA"?(V(),J("div",fp,[he(rp,{modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,required:c.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(V(),Ee(d8,{key:3,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,disabled:!c.editable,highlight:"","data-test-id":`configurator-inputs-custom-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),dp,hp],64))}},pp={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},vp={class:"ect-bg-white ect-rounded-lg"},_s={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=e,t=te([]),r=te([]),i=te({});return qn(()=>{const o={},a=[...n.attributes];a.forEach(u=>{u.dataType==="REFERENCE"&&(i.value[u.apiName]=["Name"],u.relatedFields=[],o[u.apiName]=u),u.editable=u.editable&&!u.apiName.includes(".")});let s=null;a.forEach(u=>{if(u.referenceObject==="XX_Base__Location__c"&&(s?u.firstLookup="Copy from "+s.label:s=u),u.apiName.includes(".")){const[f,c]=u.apiName.split(".");u.parent=f,u.child=c,i.value[f]!=null&&(i.value[f].push(c),o[f].relatedFields.push(u))}}),r.value=a.filter(u=>u.dataType==="REFERENCE"),t.value=a.filter(u=>!(u.apiName.includes(".")||u.dataType==="REFERENCE"))}),(o,a)=>(V(),J("div",pp,[C("div",vp,[he(Q0,{attributes:t.value},null,8,["attributes"])]),(V(!0),J(be,null,Me(r.value,s=>(V(),J("div",{key:s.attRecordId,class:"ect-bg-white ect-rounded-lg"},[he(Q0,{title:s.referenceLabel+" Lookup",lookup:s,attributes:s.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},gp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},mp=C("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),yp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},xp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},_p={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},bp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Cp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},wp={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},Ep={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=n,r=e,i=me(()=>JSON.parse(JSON.stringify(r.attributes))),o=()=>{t("close")},a=()=>{t("done",i.value),t("close")};return(s,u)=>(V(),Ee(Wa,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:o},{content:Ve(()=>[C("header",gp,[mp,C("div",yp,[C("p",xp,xe(e.option.itemName),1),C("p",_p,xe(e.option.qty),1),C("p",bp,xe(e.option.price),1)])]),C("main",Cp,[he(_s,{attributes:i.value},null,8,["attributes"])])]),footer:Ve(()=>[C("div",wp,[he(Ut,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:u[0]||(u[0]=f=>t("close"))},{default:Ve(()=>[Fe("Cancel")]),_:1}),he(Ut,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:a},{default:Ve(()=>[Fe("Done")]),_:1})])]),_:1}))}},Ap=["data-test-id"],kp=["data-test-id"],Op=["data-test-id"],Sp={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},Ip={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},Tp={key:0,class:"ect-flex ect-z-0 ect-flex-col ect-gap-4 ect-justify-center ect-py-4 ect-px-6 ect-w-full max-md:ect-px-5 max-md:ect-max-w-full"},Bp={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},Dp={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},Rp={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},Lp={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Np={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Fp={key:1,class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-xs ect-leading-4 ect-text-neutral-700 max-md:ect-px-5 max-md:ect-max-w-full"},Pp={key:2,class:"ect-relative ect-w-full ect-border-t ect-border-solid ect-border-t-neutral-200 max-md:ect-max-w-full"},Mp=Re({__name:"AppModalGen3",props:{title:{type:String,required:!0},description:{type:String,required:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:n}){const t=n;return(r,i)=>(V(),Ee(Fu,{to:"modaltp"},{default:Ve(()=>[C("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[C("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[C("div",{class:"modal-container",style:ze(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[C("div",Sp,[C("div",Ip,[e.header?(V(),J("div",Tp,[C("div",Bp,[C("div",Dp,xe(e.title),1),e.description?(V(),J("div",Rp,xe(e.description),1)):ge("",!0)])])):ge("",!0),C("div",Lp,[C("button",{class:"ect-flex ect-self-stretch ect-my-auto ect-w-6 ect-min-h-6 ect-cursor-pointer hover:ect-bg-gray-100 ect-rounded ect-transition-colors ect-justify-center ect-items-center","aria-label":"Close modal",onClick:i[0]||(i[0]=o=>t("close"))},[he(We,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(V(),J("div",Np,[Je(r.$slots,"content",{},void 0,!0)])):(V(),J("div",Fp,[Je(r.$slots,"default",{},void 0,!0)])),e.footer?(V(),J("div",Pp,[Je(r.$slots,"footer",{},void 0,!0)])):ge("",!0)])],12,Op)],8,kp)],8,Ap)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),cr=e=>(jt("data-v-395645da"),e=e(),Ht(),e),qp={class:"ect-w-[600px]"},$p={class:"ect-px-6 ect-pt-4 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},jp=cr(()=>C("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),Hp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},Vp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Up={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},zp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Kp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-mt-4 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Xp=cr(()=>C("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-supporting-text"}," Above selection requires a configuration change ",-1)),Wp={class:"ect-flex ect-flex-col ect-gap-2"},Gp={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},Qp=cr(()=>C("div",{class:"ect-px-4 ect-py-2"},[C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-add-header"}," This change will add: ")],-1)),Zp={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},Jp={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},Yp={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},e3={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},t3=cr(()=>C("div",{class:"ect-px-4 ect-py-2"},[C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-remove-header"}," This change will remove: ")],-1)),n3={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},r3={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},i3={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},o3={class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-bg-white ect-rounded-md ect-border ect-border-neutral-200 ect-rounded-md"},a3=cr(()=>C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-price-change-label"}," Price change ",-1)),s3={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},l3={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},c3=cr(()=>C("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-500 ect-mb-2","data-test-id":"conflict-modal-summary-supporting-text"}," Price Adjustment Summary ",-1)),u3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-mt-2 ect-bg-neutral-50","data-test-id":"conflict-modal-summary-table"},f3={class:"ect-flex ect-flex-col ect-gap-2"},d3={class:"ect-flex-1"},h3={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},p3={class:"ect-text-center ect-w-28"},v3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},g3={class:"ect-text-center ect-w-28"},m3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},y3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-px-4 ect-py-1 ect-mt-2","data-test-id":"conflict-modal-summary-total"},x3={class:"ect-flex ect-items-center"},_3=cr(()=>C("div",{class:"ect-flex-1"},[C("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-summary-total-label"}," Total Price change ")],-1)),b3={class:"ect-text-center ect-w-28"},C3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},w3={class:"ect-text-center ect-w-28"},E3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},A3={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},k3=Re({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=dn(),r=n,i=e,o=me(()=>{const p=t.summaryPrices,g=[];return g.push({label:"Base Price",value:p.basePrice,priceChange:p.basePrice}),g.push({label:"Add Ons",value:p.addOns,priceChange:p.addOns+v.value}),g}),a=me(()=>{const p=t.summaryPrices;return{label:"Total Price",value:p.total,priceChange:p.total+v.value}}),s=me(()=>i.data.inclusions.map(g=>t.optionByPublishKey.get(g))),u=me(()=>s.value.filter(p=>p.itemId!==i.item.itemId)),f=me(()=>i.data.exclusions.map(p=>t.optionByPublishKey.get(p))),c=me(()=>f.value.filter(p=>p.itemId!==i.item.itemId)),v=me(()=>s.value.reduce((p,g)=>p+g.price,0)-f.value.reduce((p,g)=>p+g.price,0)),l=()=>{r("close")},h=()=>{r("done")};return(p,g)=>(V(),Ee(Mp,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:l},{content:Ve(()=>[C("div",qp,[C("header",$p,[jp,C("div",Hp,[C("p",Vp,xe(e.item.itemName),1),C("p",Up,xe(e.item.qty),1),C("p",zp,xe(Ne(Pt)(e.item.price)),1)])]),C("main",Kp,[Xp,C("div",Wp,[u.value.length>0?(V(),J("div",Gp,[Qp,(V(!0),J(be,null,Me(u.value,d=>(V(),J("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[C("p",Zp,xe(d.itemName),1),C("p",Jp,xe(d.qty),1),C("p",Yp," + "+xe(Ne(Pt)(d.price)),1)]))),128))])):ge("",!0),c.value.length>0?(V(),J("div",e3,[t3,(V(!0),J(be,null,Me(c.value,d=>(V(),J("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[C("p",n3,xe(d.itemName),1),C("p",r3,xe(d.qty),1),C("p",i3," - "+xe(Ne(Pt)(d.price)),1)]))),128))])):ge("",!0),C("div",o3,[a3,C("p",s3,xe(Ne(Pt)(v.value)),1)])])]),C("footer",null,[C("div",l3,[c3,C("div",u3,[C("div",f3,[(V(!0),J(be,null,Me(o.value,(d,m)=>(V(),J("div",{key:d.label,class:we(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":m>0}])},[C("div",d3,[C("p",h3,xe(d.label),1)]),C("div",p3,[C("p",v3,xe(Ne(Pt)(d.value)),1)]),C("div",g3,[C("p",m3,xe(Ne(Pt)(d.priceChange)),1)])],2))),128))])]),C("div",y3,[C("div",x3,[_3,C("div",b3,[C("p",C3,xe(Ne(Pt)(a.value.value)),1)]),C("div",w3,[C("p",E3,xe(Ne(Pt)(a.value.priceChange)),1)])])])])])])]),footer:Ve(()=>[C("div",A3,[he(Ut,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:g[0]||(g[0]=d=>r("close"))},{default:Ve(()=>[Fe("Cancel")]),_:1}),he(Ut,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:h},{default:Ve(()=>[Fe("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-395645da"]]),O3={class:"ect-flex ect-flex-col"},S3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],I3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],T3={key:0},B3={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},D3={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(e){const n=dn(),t=e,r=me(()=>t.data.itemTypes||[]),i=me(()=>t.data.showImage||!1),o=te(null),a=te({});let s=te(null),u=te(null);const f=(p,g)=>{p.qty=g},c=(p,g)=>{p.itemName=g},v=()=>{n.configuration.categoryOptions.forEach(p=>{p.itemTypes.forEach(g=>{g.options.forEach(d=>{n.configuration.sysGuidedOptions&&(o.value.hidden.includes(d.publishKey)?d.hidden=!0:d.hidden=!1),o.value.inclusions.includes(d.publishKey)&&!g.selected.includes(d.itemId)&&g.selected.push(d.itemId),o.value.exclusions.includes(d.publishKey)&&g.selected.includes(d.itemId)&&g.selected.splice(g.selected.indexOf(d.itemId),1)})})}),o.value=null,a.value=null},l=async(p,g,d,m)=>{if(p.preventDefault(),p.stopPropagation(),s.value=null,u.value=null,g.calculateRules){m&&m.isRadio?d.includes(g.itemId)?(d.splice(0,d.length),u.value=g.publishKey):(d.splice(0,d.length),d.push(g.itemId),s.value=g.publishKey):d.includes(g.itemId)?(d.splice(d.indexOf(g.itemId),1),u.value=g.publishKey):(d.push(g.itemId),s.value=g.publishKey);const y=u.value?g:null,_=s.value?g:null,x=await n.evaluateConfigSelection(y,_);x.inclusions.length>0||x.exclusions.length>0?(o.value=x,a.value=g,[...x.inclusions,...x.exclusions].includes(g.publishKey)||(s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value))):(o.value=x,s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value),v())}},h=(p,g,d,m)=>{p.target.type==="checkbox"||p.target.type==="radio"||(p.preventDefault(),p.stopPropagation(),m.isRadio?d.includes(g.itemId)?d.splice(0,d.length):(d.splice(0,d.length),d.push(g.itemId)):d.includes(g.itemId)?d.splice(d.indexOf(g.itemId),1):d.push(g.itemId),l(p,g,d,m))};return(p,g)=>(V(),J(be,null,[o.value?(V(),Ee(k3,{key:0,item:a.value,data:o.value,onClose:g[0]||(g[0]=d=>o.value=null),onDone:v},null,8,["item","data"])):ge("",!0),C("div",O3,[(V(!0),J(be,null,Me(r.value,d=>(V(),Ee(s6,{key:d.itemTypeId,title:d.itemTypeName,description:d.description,message:d.isRadio?d.selected?"":d.minMessage:d.selected.length<d.minNumber?d.minMessage:d.selected.length===d.maxNumber?d.maxMessage:""},{default:Ve(()=>[C("div",{class:we([d.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":d.numberOfColumns===2?"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4":"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 lg:ect-grid-cols-3 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4"])},[(V(!0),J(be,null,Me(d.options||[],m=>(V(),J(be,{key:m.itemId},[m.hidden?ge("",!0):(V(),Ee(n8,{key:0,item:m,name:m.itemName,description:m.description||"","min-quantity":d.minQuantity,"max-quantity":d.maxQuantity,"show-image":i.value,selected:d.selected.includes(m.itemId),tags:m.getTags(),price:m.price,quantity:m.qty,"image-url":m.defaultImageURL,attributes:m.attributes||[],size:d.numberOfColumns,"item-id":m.itemId,"item-type":d.itemTypeName||"",category:d.category,"relationship-info":m.relationshipInfo||{},option:Ne(n).optionByItemId.get(m.itemId),"is-attributes":m.isAttributes,"show-attributes":d.lightboxAttributes,disabled:m.isDisabled,"onUpdate:quantity":y=>f(m,y),"onUpdate:name":y=>c(m,y),onEditAttributes:y=>m.showAttributesModal=!0,onClick:y=>d.selected.includes(m.itemId)||m.isDisabled?null:h(y,m,d.selected,d)},{"selection-control":Ve(()=>[d.isRadio?ln((V(),J("input",{key:0,"onUpdate:modelValue":y=>d.selected[0]=y,"data-test-id":`configurator-${d.itemTypeId}-radio-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:m.itemId,disabled:m.isDisabled,onClick:g[1]||(g[1]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,S3)),[[Su,d.selected[0]]]):ln((V(),J("input",{key:1,"onUpdate:modelValue":y=>d.selected=y,"data-test-id":`configurator-${d.itemTypeId}-checkbox-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:m.itemId,disabled:m.isDisabled,onClick:g[2]||(g[2]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,I3)),[[Va,d.selected]])]),default:Ve(()=>[d.lightboxAttributes?(V(),J("div",T3,[m.showAttributesModal?(V(),Ee(Ep,{key:0,option:m,attributes:m.attributes,onDone:y=>m.attributes=y,onClose:y=>m.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):ge("",!0)])):(V(),J("div",B3,[he(_s,{attributes:m.attributes},null,8,["attributes"])]))]),_:2},1032,["item","name","description","min-quantity","max-quantity","show-image","selected","tags","price","quantity","image-url","attributes","size","item-id","item-type","category","relationship-info","option","is-attributes","show-attributes","disabled","onUpdate:quantity","onUpdate:name","onEditAttributes","onClick"]))],64))),128))],2)]),_:2},1032,["title","description","message"]))),128))])],64))}},R3=e=>(jt("data-v-cb7a75a9"),e=e(),Ht(),e),L3={class:"ect-space-y-4"},N3={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},F3={class:"ect-bg-white ect-border-b ect-border-ect-gray-200 ect-px-4 ect-py-4 ect-sticky ect-top-0 ect-z-[5] ect-overflow-hidden ect-rounded-t-lg"},P3={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},M3={class:"ect-bg-white ect-px-4 ect-py-4 ect-pb-3 ect-border-b ect-border-ect-gray-200 ect-top-[53px] ect-z-9 ect-overflow-hidden ect-sticky ect-top-[53px]"},q3={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},$3={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},j3={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},H3={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},V3={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},U3={class:"ect-flex ect-justify-center ect-min-w-[128px]"},z3=R3(()=>C("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),K3={class:"ect-flex ect-justify-center ect-min-w-[100px]"},X3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},W3={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},G3={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},Q3={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},Z3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},J3=Re({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(e){return(n,t)=>(V(),J("div",L3,[(V(!0),J(be,null,Me(e.summary,r=>(V(),J("div",{key:r.key,class:"ect-mb-4"},[C("section",N3,[C("div",F3,[C("h3",P3,xe(r.category),1)]),(V(!0),J(be,null,Me(r.selectedItemTypes,i=>(V(),J("div",{key:i.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[C("div",M3,[C("h4",q3,xe(i.itemTypeName),1)]),(V(!0),J(be,null,Me(i.selectedOptions,o=>(V(),J(be,{key:o.itemId},[C("div",$3,[C("div",j3,[C("span",H3,xe(o.itemName),1)]),C("div",V3,[C("div",U3,[he(Do,{value:o.qty,"onUpdate:value":a=>o.qty=a,min:i.minQuantity,max:i.maxQuantity,"data-test-id":`configurator-summary-counter-${o.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),z3,C("div",K3,[C("span",X3,xe(Ne(Pt)(o.price)),1)])])]),o.isAttributes&&o.getTags().length>0?(V(),J("div",W3,[C("div",G3,[(V(!0),J(be,null,Me(o.getTags(),a=>(V(),Ee(hn,{key:a.attributeId,label:a.label,value:a.value},null,8,["label","value"]))),128))])])):ge("",!0)],64))),128))]))),128)),C("div",Q3,[C("span",Z3," Total : "+xe(Ne(Pt)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),Y3={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},e7={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},t7={class:"ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-absolute ect-bottom-0 ect-left-0 ect-right-0 ect-z-50","data-test-id":"configurator-footer-sticky"},n7=Re({__name:"ConfiguratorTabs",emits:["scroll"],setup(e,{emit:n}){const t=dn(),r=te("billing-options"),i=me(()=>t.configuration.categoryOptions),o=me(()=>{const l=i.value.map(h=>({key:h.key,title:h.category}));return l.push({key:"summary",title:"Summary"}),l}),a=n,s=me(()=>u.value.get(r.value)),u=me(()=>{const l=new Map;return i.value.forEach(h=>{l.set(h.key,h)}),l}),f=()=>{console.info("Continue");const l=o.value.findIndex(h=>h.key===r.value);if(l<o.value.length-1){const h=o.value[l+1];r.value=h.key}else t.maintainQuoteConfiguration()};Ye(r,l=>{c(l),a("scroll",0)});const c=l=>{r.value=l},v=l=>{const h=l.target.scrollTop;a("scroll",h)};return qn(()=>{r.value=o.value[0].key}),(l,h)=>(V(),J("div",Y3,[C("div",e7,[he($4,{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=p=>r.value=p),"show-tabs":!0,border:"",tabs:o.value,"data-test-id":"configurator-tabs-container",onTabChange:c},null,8,["modelValue","tabs"])]),r.value!=="summary"?(V(),J("div",{key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(D3,{data:s.value},null,8,["data"])],32)):(V(),J("div",{key:1,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(J3,{summary:Ne(t).summary},null,8,["summary"])],32)),C("div",t7,[he(J4,{"btn-text":r.value!=="summary"?"Continue":"Save",item:Ne(t).configuration,onContinue:f},null,8,["btn-text","item"])])]))}},[["__scopeId","data-v-89883e06"]]),r7={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},i7={class:"ect-flow-root"},o7=["src","alt"],a7={key:1,class:"ect-mb-2"},s7={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},l7={key:0,class:"ect-mt-2"},c7={class:"ect-inline-block ect-mb-2"},u7={key:1,class:"ect-inline-block ect-mb-2"},f7={key:1,class:"ect-mt-2"},d7={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.config.attributes.map(o=>({label:o.label,value:o.value})).filter(o=>o.value!==null&&o.value!==""));return(o,a)=>(V(),J("div",r7,[C("div",i7,[e.config.defaultImageURL&&e.scroll<50?(V(),J("div",{key:0,class:we(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",e.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[e.config.defaultImageURL?(V(),J("img",{key:0,src:e.config.defaultImageURL,alt:e.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,o7)):ge("",!0)],2)):ge("",!0),e.scroll<50?(V(),J("div",a7,[C("p",s7,xe(e.config.description),1)])):ge("",!0),e.config.isAttributes?(V(),J(be,{key:2},[e.editAttributes?(V(),J("div",f7,[he(_s,{attributes:e.config.attributes},null,8,["attributes"])])):(V(),J("div",l7,[i.value.length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(i.value,(s,u)=>(V(),J("span",{key:u,class:"ect-inline-block ect-mr-2 ect-mb-2"},[he(hn,{label:s.label,value:s.value},null,8,["label","value"])]))),128)),C("span",c7,[C("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:a[0]||(a[0]=s=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})])])],64)):(V(),J("span",u7,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:a[1]||(a[1]=s=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))]))],64)):ge("",!0)])]))}},h7=["data-test-id"],p7=["placeholder","value","data-test-id"],v7=["data-test-id"],g7=["data-test-id","onClick"],m7=Re({__name:"MoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},height:{type:[Number,String],default:32},size:{type:String,default:"regular"},loading:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},iconPosition:{type:String,default:"right",validator:e=>["left","right"].includes(e)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(e,{emit:n}){const t=e,r=n,i=te(""),o=te(null),a=te(!1),s=te(null),u=te(!0),f=me(()=>u.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),c=async()=>{var b;if(await sn(),!s.value)return;const m=s.value.getBoundingClientRect(),_=window.innerHeight-m.bottom,x=Math.min(((b=t.options)==null?void 0:b.length)*40+20,200);u.value=_>=x},v=()=>{o.value=null,r("update:modelValue","")},l=d=>{const m=d.target.value;i.value&&(clearTimeout(i.value),i.value=null),i.value=setTimeout(()=>{r("update:modelValue",m)},500)},h=async()=>{a.value=!0,await c()},p=()=>{setTimeout(()=>{a.value=!1},150)},g=d=>{a.value=!1,i.value&&(clearTimeout(i.value),i.value=null),r("update:modelValue",d.label),r("optionClick",d)};return(d,m)=>{var y;return V(),J("div",{ref_key:"searchContainer",ref:s,class:we(["molecule-search",{"icon-left":e.iconPosition==="left"}]),"data-test-id":e.dataTestId},[e.loading?(V(),Ee(Hu,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${e.dataTestId}-loader`},null,8,["data-test-id"])):e.iconPosition==="left"||!e.modelValue?(V(),Ee(We,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${e.dataTestId}-search`,onClick:v},null,8,["data-test-id"])):ge("",!0),C("input",{class:we(["search-input-box",{large:e.size==="large"}]),type:"text",style:ze({height:`${e.height}px`}),placeholder:t.placeholder,value:e.modelValue,"data-test-id":`${e.dataTestId}-input`,onInput:l,onFocus:h,onBlur:p},null,46,p7),e.modelValue&&!e.loading?(V(),Ee(We,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${e.dataTestId}-close`,onClick:v},null,8,["data-test-id"])):ge("",!0),((y=e.options)==null?void 0:y.length)>0&&a.value?(V(),J("div",{key:3,class:we(["search-options",{"dropdown-top":!u.value}]),style:ze(f.value),"data-test-id":`${e.dataTestId}-dropdown`},[(V(!0),J(be,null,Me(e.options,(_,x)=>(V(),J("div",{key:_.id,class:"search-option","data-test-id":`${e.dataTestId}-option-${x}`,onClick:mt(b=>g(_),["stop"]),onMousedown:m[0]||(m[0]=mt(()=>{},["prevent"]))},[Fe(xe(_.label)+" ",1),C("span",null,xe(_.subLabel),1)],40,g7))),128))],14,v7)):ge("",!0)],10,h7)}}},[["__scopeId","data-v-6cdaa802"]]),y7=["data-test-id"],x7=Re({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:e=>["default","draft","review","active","inactive","in draft","active"].includes(e)},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>({"ect-state-pill--default":n.state==="default","ect-state-pill--draft":n.state==="draft"||n.state==="in draft","ect-state-pill--review":n.state==="review","ect-state-pill--active":n.state==="active","ect-state-pill--inactive":n.state==="inactive"}));return(r,i)=>(V(),J("span",{class:we(["ect-state-pill",t.value]),"data-test-id":e.dataTestId},xe(e.text),11,y7))}},[["__scopeId","data-v-6be678b8"]]),_7=["data-test-id"],b7=["data-test-id"],C7=["data-test-id"],w7=["data-test-id"],E7=["data-test-id","onClick"],A7=["data-test-id"],k7=Re({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"||typeof n.route=="object"))},dataTestId:{type:String,required:!0}},setup(e){const n=fi(),t=r=>{r&&n.push(r)};return(r,i)=>(V(),J("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":e.dataTestId},[C("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${e.dataTestId}-container`},[C("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-breadcrumbs`},[(V(!0),J(be,null,Me(e.links,(o,a)=>(V(),J(be,{key:a},[a>0?(V(),J("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${e.dataTestId}-separator-${a}`}," / ",8,w7)):ge("",!0),o.route?(V(),J("button",{key:1,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal hover:ect-text-[#0076D6] hover:ect-underline ect-transition-colors","data-test-id":`${e.dataTestId}-link-${a}`,onClick:s=>t(o.route)},xe(o.text),9,E7)):(V(),J("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${e.dataTestId}-text-${a}`},xe(o.text),9,A7))],64))),128))],8,C7)],8,b7)],8,_7))}},[["__scopeId","data-v-151ca816"]]),O7={components:{AppIcon:We},props:{direction:{type:String,default:"top",validator:e=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(e)},content:{type:String,default:null},disabled:{type:Boolean,default:!1},width:{type:Number,default:130},icon:{type:String,default:null},dataTestId:{type:String,default:""}},data(){return{show:!1}},computed:{tooltipClass(){return{tooltip:!0,[`tooltip-${this.direction}`]:!0}},styleObj(){return{width:`${this.width}px !important`}}},methods:{showTooltip(){this.disabled||(this.show=!0)},hideTooltip(){this.show=!1}}},S7=["data-test-id"],I7=["data-test-id"];function T7(e,n,t,r,i,o){const a=er("AppIcon");return t.content?(V(),J("div",{key:0,class:"tooltip-container","data-test-id":t.dataTestId,onMouseover:n[0]||(n[0]=(...s)=>o.showTooltip&&o.showTooltip(...s)),onMouseleave:n[1]||(n[1]=(...s)=>o.hideTooltip&&o.hideTooltip(...s))},[Je(e.$slots,"default",{},void 0,!0),ln(C("div",{class:we(o.tooltipClass),style:ze(o.styleObj),"data-test-id":`${t.dataTestId}-content`},[t.icon?(V(),Ee(a,{key:0,icon:t.icon,color:"#57c046",size:14,"data-test-id":`${t.dataTestId}-icon`},null,8,["icon","data-test-id"])):ge("",!0),Fe(" "+xe(t.content),1)],14,I7),[[xu,i.show]])],40,S7)):Je(e.$slots,"default",{key:1},void 0,!0)}const B7=Re(O7,[["render",T7],["__scopeId","data-v-b36acc62"]]),D7=wt("item",()=>{const e=Qt(),n=te([]),t=te([]),r=te(!1),i=te(0),o=te(1),a=te(""),s=te(20),u=te(null),f=te(!1),c=te(null),v=te(!1),l=te(null),h=te(null),p=te(null),g=te(null),d=te(null),m=te({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),y=te([]),_=te({ecatalogIds:[],optionItemsToAdd:[]}),x=te(!1),b=te(null),S=te(0),A=2,I=ee=>{!Array.isArray(ee)||ee.every(U=>{var Z;return U.id&&((Z=U.itemTypes)==null?void 0:Z.every(z=>{var F;return z.id&&((F=z.options)==null?void 0:F.every(j=>j.id))}))})||ee.forEach((U,Z)=>{U.id||(U.id=`category-${Z}-${U.category}`),U.itemTypes&&Array.isArray(U.itemTypes)&&U.itemTypes.forEach((z,F)=>{z.id||(z.id=z.itemTypeId||`itemType-${Z}-${F}-${z.itemTypeName||"unnamed"}`),z.options&&Array.isArray(z.options)&&z.options.forEach((j,se)=>{j.id||(j.id=j.itemId||`option-${Z}-${F}-${se}-${j.itemName||"unnamed"}`)})})})},B=async(ee,M=null)=>{var U;try{v.value=!0;let Z={};if(M)Z={fileId:M};else{const F=y.value.find(se=>se.status==="Draft"),j=y.value.find(se=>se.status==="Active");j?Z={fileId:j.id}:F?Z={fileId:F.id}:Z={itemId:ee}}let z=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(Z)});return z!=null&&z.errorMessage?(e.handleError(z.errorMessage),null):(z=St(z.data),typeof z.data=="string"&&(z=JSON.parse(z.data)),(U=z==null?void 0:z.productItem)!=null&&U.categoryOptions&&I(z.productItem.categoryOptions),u.value=z,v.value=!1,y.value.length===0&&!r.value&&await ne(),z.data)}catch(Z){return v.value=!1,e.handleError("Failed to fetch item configuration. Please try again.",Z),null}},O=async(ee,M="",U="")=>{try{const Z={searchTerm:ee,itemTypeId:M,filterType:U};let z=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(Z)});return z=St(z),z!=null&&z.errorMessage?(e.handleError(z.errorMessage),null):z}catch{return e.handleError("Failed to fetch option list. Please try again."),null}},E=async(ee,M)=>{try{const U={productItemId:d.value,optionItemId:ee,existingItemType:M};let Z=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(U)});return Z=St(Z),Z!=null&&Z.errorMessage?(e.handleError(Z.errorMessage),null):Z}catch{return e.handleError("Failed to fetch option details. Please try again."),null}},k=async()=>{try{const ee=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(ee)}catch{e.handleError("Failed to fetch available attributes. Please try again.")}},R=async ee=>{try{const M=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(ee)});return JSON.parse(M)}catch{e.handleError("Failed to fetch item configuration. Please try again.")}},N=async ee=>{try{const M=JSON.stringify(ee),U=await window.AdminConfiguratorManager.getChildFields({request:M});return JSON.parse(U)}catch(M){throw e.handleError("Failed to fetch child fields. Please try again.",M),M}},q=async()=>{const ee={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(ee)})).data}catch(M){throw e.handleError("Failed to fetch picklist values. Please try again.",M),M}},G=async()=>{var ee,M,U;try{const Z=(M=(ee=u.value)==null?void 0:ee.productItem)==null?void 0:M.itemStatus,F={fileId:(U=y.value.find(se=>se.status===Z))==null?void 0:U.id,itemId:d.value};let j=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(F)});return j!=null&&j.error?(D(j==null?void 0:j.error),null):(j=St(j.data),m.value=j,j)}catch{return D(),null}},Y=async()=>{try{const ee={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(ee)})).data}catch(ee){e.handleError("Failed to fetch e catalogs for product. Please try again.",ee)}},ne=async()=>{try{const ee={productId:d.value},M=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(ee)}),U=JSON.parse(M.data);return y.value=U.data,U}catch(ee){e.handleError("Failed to save item configuration. Please try again.",ee)}},Q=async()=>{try{const ee={ecatalogIds:_.value.ecatalogIds,productItemId:d.value,optionItemsToAdd:_.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(ee)})).data}catch(ee){e.handleError("Failed to save item configuration to catalog. Please try again.",ee)}},P=async()=>{var ee,M,U;try{const Z=(M=(ee=u.value)==null?void 0:ee.productItem)==null?void 0:M.itemStatus,z={itemId:d.value,fileId:(U=y.value.find(fe=>fe.status===Z))==null?void 0:U.id},F=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(z)}),j=JSON.parse(F);await ne(),await B(d.value,j.id);const se=y.value.findIndex(fe=>fe.status==="Draft");return se!==-1?y.value[se]=j:y.value.push(j),j}catch(Z){e.handleError("Failed to create new version. Please try again.",Z)}},w=async()=>{var Z,z;const ee=(Z=y.value.find(F=>F.status==="Inactive"))==null?void 0:Z.id,M=(z=y.value.find(F=>F.status==="Active"))==null?void 0:z.id,U={itemId:d.value,activeVersionId:M,inactiveVersionId:ee};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(U)})).data}catch(F){e.handleError("Failed to rollback item configuration. Please try again.",F)}},D=ee=>{ee?b.value=ee:b.value=null,x.value=!0};return{items:n,loading:r,totalCount:i,currentPage:o,searchTerm:a,itemLimit:s,columns:t,currentItemConfig:u,savingItemConfiguration:f,currentItem:c,configLoader:v,currentItemData:l,currentGroupIndex:h,currentOptionIndex:p,currentOptionData:g,versionInfo:y,activateConfigData:m,activatePayload:_,itemId:d,showActivationErrorModal:x,activationError:b,activationRetryCount:S,maxRetries:A,getItemConfiguration:B,getItemsList:O,getItemDetails:E,getAvailableAttributes:k,addAttribute:R,getChildFields:N,getPicklistValues:q,activateItemConfig:G,getECatalogsForProduct:Y,getversionInfo:ne,saveItemConfigToCatalog:Q,createNewVersion:P,rollbackItemConfig:w,addCrossSell:async ee=>{const M={itemId:ee.id||ee.itemId,primarySortOrder:ee.primarySortOrder};try{const U=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify(M)});return JSON.parse(U.data)}catch(U){return e.handleError("Failed to add cross sell. Please try again.",U),null}},saveItemConfiguration:async()=>{var ee;if(v.value||r.value||f.value||!((ee=u.value)!=null&&ee.productItem))return null;if(!(u.value.productItem.itemStatus==="Active"||u.value.productItem.itemStatus==="Inactive"))try{f.value=!0;const M={itemId:d.value,configurationData:u.value},U=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify(M)});if(U!=null&&U.errorMessage)return e.handleError(U.errorMessage),null;if(!(U!=null&&U.error)){const Z=y.value.findIndex(z=>z.status==="Draft");y.value[Z].id=U.data}return U}catch(M){return e.handleError("Failed to save item configuration. Please try again.",M),null}finally{f.value=!1}},showActivationError:D,hideActivationError:()=>{x.value=!1,S.value=0},incrementRetryCount:()=>{S.value+=1,x.value=!0},canRetry:()=>S.value<A,assignStableIds:I}}),R7={class:"app-filters-main-wrapper"},L7={class:"app-filters-wrapper"},N7={class:"app-filters"},F7={class:"left-section"},P7={class:"ect-flex ect-gap-2 ect-items-center"},M7={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},q7={class:"right-section"},$7={class:"after-search-wrapper"},j7={class:"buttons-wrapper"},H7={class:"before-button-wrapper"},V7={key:0,class:"action-wrapper"},U7={key:1,class:"button-text ect-font-medium"},z7={key:2,class:"count-badge"},K7=Re({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:e=>e.every(n=>(n.icon||n.text)&&typeof n.handler=="function")},searchWidth:{type:String,default:"312px"},showBackButton:{type:Boolean,default:!1},statusText:{type:String,default:""},placeholder:{type:String,default:"Search by name"},breadcrumbLinks:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(e,{emit:n}){const t=D7(),r=e,i=Xr([]);Ft(()=>{o()});const o=()=>{i.splice(0,i.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(l=>{i.push({...l})})};Ye(()=>r.buttons,()=>{o()},{deep:!0});const a=l=>{s("search",l)},s=n,u=te(""),f=(l,h)=>{l.supportsToggle&&(l.isActive=!l.isActive),typeof l.handler=="function"&&l.handler(l,l.isActive)},c=()=>{s("back")},v=()=>{if(!r.recordLink)return;let l=r.recordLink;if(!l){let m=t.itemId;if(!m){const y=new URLSearchParams(window.location.search),_=new URLSearchParams(window.location.hash.split("?")[1]);m=y.get("itemId")||_.get("itemId")}l=m}if(!l)return;const p=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!p){console.info("[ERROR]: Unable to extract base domain from current URL");return}const d=`${p[1]}/${l}`;window.open(d,"_blank")};return(l,h)=>(V(),J("div",R7,[C("div",L7,[C("div",N7,[C("div",F7,[e.breadcrumbLinks&&e.breadcrumbLinks.length>1?(V(),Ee(k7,{key:0,links:e.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):ge("",!0),C("div",P7,[e.showBackButton?(V(),J("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:c},[he(We,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):ge("",!0),e.title?(V(),J("p",{key:1,class:we(["ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200",{"hover:ect-text-[#0076D6] ect-cursor-pointer":e.recordLink}]),"data-test-id":"filter-header-title",onClick:h[0]||(h[0]=p=>e.recordLink?v():null)},[Fe(xe(e.title)+" ",1),e.recordLink?(V(),J(be,{key:0},[he(We,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),C("div",M7,[he(B7,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):ge("",!0)],2)):ge("",!0),e.statusText?(V(),Ee(x7,{key:2,text:e.statusText,state:e.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):ge("",!0),Je(l.$slots,"after-status",{},void 0,!0)])]),C("div",q7,[e.showSearch?(V(),J("div",{key:0,class:"search-wrapper",style:ze({width:e.searchWidth})},[he(m7,{modelValue:u.value,"onUpdate:modelValue":[h[1]||(h[1]=p=>u.value=p),a],class:"search-input",placeholder:e.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):ge("",!0),C("div",$7,[Je(l.$slots,"afterSearch",{},void 0,!0)]),C("div",j7,[C("div",H7,[Je(l.$slots,"before-button",{},void 0,!0)]),l.$slots.buttons?(V(),J("div",V7,[Je(l.$slots,"buttons",{},void 0,!0)])):(V(!0),J(be,{key:1},Me(i,(p,g)=>(V(),J("div",{key:g,class:"action-wrapper"},[he(Ut,{btype:p.type||"primary","button-style":p.style||"outlined",size:"medium",style:ze({minWidth:p.minWidth||"auto"}),class:we([{active:p.isActive},{"icon-only":p.icon&&!p.text},{"text-button":p.text}]),loading:p.loading,disabled:p.disabled,"data-test-id":`filter-header-button-${p.text?p.text.toLowerCase().replace(/\s+/g,"-"):g}`,onClick:d=>f(p)},{default:Ve(()=>[p.icon?(V(),Ee(We,{key:0,icon:p.icon,symbol:"",color:p.color||"#136E05",size:p.size||14},null,8,["icon","color","size"])):ge("",!0),p.text?(V(),J("span",U7,xe(p.isActive?p.altText:p.text),1)):ge("",!0),p.count?(V(),J("span",z7,xe(p.count),1)):ge("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),X7=["data-test-id"],W7=["data-test-id"],G7=["data-test-id"],Q7=["data-test-id"],Z7=["data-test-id"],J7=["data-test-id"],Y7=["data-test-id"],ev=Re({__name:"ecSwitch",props:Hc({text:{type:[String,Object],required:!1,validator:e=>typeof e=="string"?!0:typeof e=="object"&&e!==null?Object.prototype.hasOwnProperty.call(e,"on")&&Object.prototype.hasOwnProperty.call(e,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:e=>["regular","large"].includes(e)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Hc(["update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const t=e,r=th(e,"modelValue"),i=n,o=me(()=>typeof t.text=="string"?t.text:typeof t.text=="object"&&t.text!==null?r.value?t.text.on:t.text.off:""),a=()=>{t.disabled||i("update:modelValue",!r.value)};return(s,u)=>(V(),J("div",{class:we(["ec-switch-container",{disabled:e.disabled}]),"data-test-id":e.dataTestId},[e.leftAlign?(V(),J("span",{key:0,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Fe(xe(o.value)+" ",1),e.subtext?(V(),J("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,G7)):ge("",!0)],8,W7)):ge("",!0),C("div",{class:we(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":e.size==="large"}]),"data-test-id":`${e.dataTestId}-switch`,onClick:a},[C("div",{class:"ec-switch__handle","data-test-id":`${e.dataTestId}-handle`},null,8,Z7)],10,Q7),e.leftAlign?ge("",!0):(V(),J("span",{key:1,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Fe(xe(o.value)+" ",1),e.subtext?(V(),J("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,Y7)):ge("",!0)],8,J7))],10,X7))}},[["__scopeId","data-v-cfefad9a"]]),tv={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},nv={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},rv={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},iv={key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-content-scrollable"},ov=Re({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1}},emits:["action"],setup(e,{emit:n}){const t=dn(),r=te(!1),i=te(0),o=me(()=>t.configuration),a=e,s=n,u=me(()=>r.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>f()}]:[{text:a.qliId?"Save":"Add To Quote",altText:"Save",type:t.isChangedConfiguration?"primary":"secondary",style:"primary",disabled:!t.isChangedConfiguration,handler:()=>c()}]),f=()=>{r.value=!1},c=async()=>{const v=await t.maintainQuoteConfiguration();v?s("action",{event:"add-to-quote",data:v}):s("action",{event:"save"})};return(v,l)=>Ne(t).configuration?(V(),J("div",tv,[Ne(t).savedScreen?(V(),Ee(R4,{key:1})):(V(),J(be,{key:0},[C("div",nv,[C("div",rv,[ge("",!0),he(K7,{title:o.value.itemName,buttons:u.value},{"before-button":Ve(()=>[Ne(t).isYearlyPricingExist?(V(),Ee(ev,{key:0,modelValue:Ne(t).showYearlyPricing,"onUpdate:modelValue":[l[0]||(l[0]=h=>Ne(t).showYearlyPricing=h),Ne(t).changePricingScheme],"left-align":"",class:"ect-text-nowrap",text:{on:"Yearly Price",off:"Monthly Price"},"data-test-id":"configurator-switch-show-yearly-pricing"},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0)]),_:1},8,["title","buttons"])]),C("div",{class:we(r.value?"ect-pb-16":"ect-pb-0")},[he(d7,{config:o.value,"edit-attributes":r.value,scroll:i.value,onEditAttributes:l[1]||(l[1]=h=>r.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),r.value?ge("",!0):(V(),J("div",iv,[he(n7)]))],64))])):ge("",!0)}},[["__scopeId","data-v-78484313"]]),av=["data-item-id","data-qli-id"],sv={key:0,class:"ect-flex-1 ect-min-h-0"},lv={key:1,class:"ect-flex-1 ect-min-h-0"},cv={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1}},emits:["ready","action"],setup(e,{emit:n}){const t=e,r=n,i=dn();return qn(async()=>{console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await i.initConfigurator(t.itemId,t.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready")}),(o,a)=>(V(),J("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":e.itemId,"data-qli-id":e.qliId},[Ne(i).loading.init?(V(),J("div",lv,[he($u)])):(V(),J("div",sv,[he(ov,{"qli-id":e.qliId,onAction:a[0]||(a[0]=s=>r("action",s)),onSave:o.handleSave},null,8,["qli-id","onSave"])]))],8,av))}},uv=(e=>(jt("data-v-0a44fa8b"),e=e(),Ht(),e))(()=>C("div",{class:"dropdowntp"},null,-1)),fv=Re({__name:"ExpediteConfigurator",props:{setupData:{type:Object,required:!0},itemId:{type:String,required:!0},qliId:{type:String,required:!1},quoteId:{type:String,required:!1},apiKey:{type:String,required:!0}},emits:["ready","action"],setup(e,{emit:n}){const t=R0(),r=go(),i=Qt(),o=dn(),a=e,s=n,u=()=>{s("ready",o.exposeProperties())};return qn(()=>{const{orgType:f,orgId:c,userId:v}=a.setupData;t.quoteId=a.quoteId,t.setSetupData(a.setupData),o.initializeController(a.apiKey,f,c,v)}),(f,c)=>(V(),J(be,null,[he(B2),he(Ga),Ne(i).errorPopup?(V(),Ee(m2,{key:0,data:Ne(i).errorPopup,onClose:c[0]||(c[0]=v=>Ne(i).errorPopup=null)},null,8,["data"])):ge("",!0),Ne(r).unsavedChanges?(V(),Ee(_2,{key:1,data:Ne(r).unsavedChanges,onClose:c[1]||(c[1]=v=>Ne(r).unsavedChanges=null)},null,8,["data"])):ge("",!0),uv,he(cv,{"item-id":a.itemId,"qli-id":a.qliId,onReady:u,onAction:c[2]||(c[2]=v=>s("action",v))},null,8,["item-id","qli-id"])],64))}},[["__scopeId","data-v-0a44fa8b"]]),dv=wt("mygpt",()=>{const e=te("");async function n(r,i="gpt-3.5-turbo",o=300){var a,s,u;if(!e.value)throw new Error("Secret key is required. Please set it in the store.");try{const f=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.value}`},body:JSON.stringify({model:i,messages:r,max_tokens:Math.min(o,300),temperature:.7})});if(!f.ok){const v=await f.json().catch(()=>({}));throw new Error(((a=v.error)==null?void 0:a.message)||`API Error: ${f.status} ${f.statusText}`)}return((u=(s=(await f.json()).choices[0])==null?void 0:s.message)==null?void 0:u.content)||"No response generated"}catch(f){throw new Error(f.message||"Failed to get response from GPT")}}function t(r){e.value=r}return{secretKey:e,getGptResponse:n,setSecretKey:t}}),xi=e=>(jt("data-v-46273585"),e=e(),Ht(),e),hv={class:"custom-gpt-container"},pv={class:"gpt-header"},vv=xi(()=>C("h3",{class:"gpt-title"},"GPT Chat",-1)),gv={class:"gpt-response-area"},mv={key:0,class:"loading-indicator"},yv=[xi(()=>C("div",{class:"spinner"},null,-1)),xi(()=>C("span",null,"Thinking...",-1))],xv={key:1,class:"error-message"},_v=xi(()=>C("strong",null,"Error:",-1)),bv={key:2,class:"response-content"},Cv={key:3,class:"empty-state"},wv=[xi(()=>C("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],Ev={class:"gpt-input-area"},Av={class:"input-wrapper"},kv=["placeholder","disabled"],Ov=["disabled"],Sv={key:0},Iv={key:1},Tv={key:0,class:"warning-message"},Bv=Re({__name:"ExpediteGPT",props:{secretKey:{type:String,required:!1,default:""},model:{type:String,required:!1,default:"gpt-3.5-turbo"},maxTokens:{type:Number,required:!1,default:300},placeholder:{type:String,required:!1,default:"Enter your message..."}},setup(e){const n=e,t=dv(),r=me(()=>n.secretKey||t.secretKey),i=te(""),o=te(""),a=te(!1),s=te(null),u=te([]),f=me(()=>o.value.trim().length>0),c=me(()=>i.value.trim().length>0&&!a.value&&r.value),v=async()=>{if(!c.value)return;const p=i.value.trim();if(p){a.value=!0,s.value=null,i.value="";try{u.value.push({role:"user",content:p});const g=u.value.reduce((y,_)=>y+Math.ceil(_.content.length/4),0);let d=[...u.value];g>n.maxTokens&&(d=u.value.slice(-3));const m=await t.getGptResponse(d,n.model,n.maxTokens);o.value=m,u.value.push({role:"assistant",content:m})}catch(g){s.value=g.message||"Failed to get response from GPT",console.error("GPT API Error:",g)}finally{a.value=!1}}},l=p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),v())},h=()=>{u.value=[],o.value="",s.value=null};return qn(()=>{t.setSecretKey(n.secretKey)}),(p,g)=>(V(),J("div",hv,[C("div",pv,[vv,f.value||u.value.length>0?(V(),J("button",{key:0,onClick:h,class:"clear-button",type:"button"}," Clear ")):ge("",!0)]),C("div",gv,[a.value?(V(),J("div",mv,yv)):s.value?(V(),J("div",xv,[_v,Fe(" "+xe(s.value),1)])):f.value?(V(),J("div",bv,xe(o.value),1)):(V(),J("div",Cv,wv))]),C("div",Ev,[C("div",Av,[ln(C("textarea",{"onUpdate:modelValue":g[0]||(g[0]=d=>i.value=d),placeholder:e.placeholder,disabled:a.value||!r.value,onKeypress:l,class:"gpt-input",rows:"3"},null,40,kv),[[li,i.value]]),C("button",{onClick:v,disabled:!c.value,class:"send-button",type:"button"},[a.value?(V(),J("span",Sv,"...")):(V(),J("span",Iv,"Send"))],8,Ov)]),r.value?ge("",!0):(V(),J("div",Tv," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]),qo="tsocustomer2.expedite1.com",_i="https://csimqu3mn5g6pjhq6mki4qdayu.appsync-api.us-east-1.amazonaws.com/graphql",$o="da2-vag5nadijfegloywmu7rikapfi";var Z0={exports:{}};function Dv(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bs={exports:{}};const Rv=P8(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var J0;function qe(){return J0||(J0=1,function(e,n){(function(t,r){e.exports=r()})(Se,function(){var t=t||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Se<"u"&&Se.crypto&&(o=Se.crypto),!o&&typeof Dv=="function")try{o=Rv}catch{}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function y(){}return function(_){var x;return y.prototype=_,x=new y,y.prototype=null,x}}(),u={},f=u.lib={},c=f.Base=function(){return{extend:function(y){var _=s(this);return y&&_.mixIn(y),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var _ in y)y.hasOwnProperty(_)&&(this[_]=y[_]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=f.WordArray=c.extend({init:function(y,_){y=this.words=y||[],_!=i?this.sigBytes=_:this.sigBytes=y.length*4},toString:function(y){return(y||h).stringify(this)},concat:function(y){var _=this.words,x=y.words,b=this.sigBytes,S=y.sigBytes;if(this.clamp(),b%4)for(var A=0;A<S;A++){var I=x[A>>>2]>>>24-A%4*8&255;_[b+A>>>2]|=I<<24-(b+A)%4*8}else for(var B=0;B<S;B+=4)_[b+B>>>2]=x[B>>>2];return this.sigBytes+=S,this},clamp:function(){var y=this.words,_=this.sigBytes;y[_>>>2]&=4294967295<<32-_%4*8,y.length=r.ceil(_/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var _=[],x=0;x<y;x+=4)_.push(a());return new v.init(_,y)}}),l=u.enc={},h=l.Hex={stringify:function(y){for(var _=y.words,x=y.sigBytes,b=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;b.push((A>>>4).toString(16)),b.push((A&15).toString(16))}return b.join("")},parse:function(y){for(var _=y.length,x=[],b=0;b<_;b+=2)x[b>>>3]|=parseInt(y.substr(b,2),16)<<24-b%8*4;return new v.init(x,_/2)}},p=l.Latin1={stringify:function(y){for(var _=y.words,x=y.sigBytes,b=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;b.push(String.fromCharCode(A))}return b.join("")},parse:function(y){for(var _=y.length,x=[],b=0;b<_;b++)x[b>>>2]|=(y.charCodeAt(b)&255)<<24-b%4*8;return new v.init(x,_)}},g=l.Utf8={stringify:function(y){try{return decodeURIComponent(escape(p.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return p.parse(unescape(encodeURIComponent(y)))}},d=f.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=g.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var _,x=this._data,b=x.words,S=x.sigBytes,A=this.blockSize,I=A*4,B=S/I;y?B=r.ceil(B):B=r.max((B|0)-this._minBufferSize,0);var O=B*A,E=r.min(O*4,S);if(O){for(var k=0;k<O;k+=A)this._doProcessBlock(b,k);_=b.splice(0,O),x.sigBytes-=E}return new v.init(_,E)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});f.Hasher=d.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(y){return function(_,x){return new y.init(x).finalize(_)}},_createHmacHelper:function(y){return function(_,x){return new m.HMAC.init(y,x).finalize(_)}}});var m=u.algo={};return u}(Math);return t})}(bs)),bs.exports}var Cs={exports:{}},Y0;function jo(){return Y0||(Y0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.Base,s=o.WordArray,u=i.x64={};u.Word=a.extend({init:function(f,c){this.high=f,this.low=c}}),u.WordArray=a.extend({init:function(f,c){f=this.words=f||[],c!=r?this.sigBytes=c:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,c=f.length,v=[],l=0;l<c;l++){var h=f[l];v.push(h.high),v.push(h.low)}return s.create(v,this.sigBytes)},clone:function(){for(var f=a.clone.call(this),c=f.words=this.words.slice(0),v=c.length,l=0;l<v;l++)c[l]=c[l].clone();return f}})}(),t})}(Cs)),Cs.exports}var ws={exports:{}},ef;function Lv(){return ef||(ef=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var f=u.byteLength,c=[],v=0;v<f;v++)c[v>>>2]|=u[v]<<24-v%4*8;a.call(this,c,f)}else a.apply(this,arguments)};s.prototype=o}}(),t.lib.WordArray})}(ws)),ws.exports}var Es={exports:{}},tf;function Nv(){return tf||(tf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Utf16=a.Utf16BE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=f[l>>>2]>>>16-l%4*8&65535;v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=u.charCodeAt(v)<<16-v%2*16;return o.create(c,f*2)}},a.Utf16LE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=s(f[l>>>2]>>>16-l%4*8&65535);v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=s(u.charCodeAt(v)<<16-v%2*16);return o.create(c,f*2)}};function s(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(Es)),Es.exports}var As={exports:{}},nf;function ur(){return nf||(nf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(u){var f=u.words,c=u.sigBytes,v=this._map;u.clamp();for(var l=[],h=0;h<c;h+=3)for(var p=f[h>>>2]>>>24-h%4*8&255,g=f[h+1>>>2]>>>24-(h+1)%4*8&255,d=f[h+2>>>2]>>>24-(h+2)%4*8&255,m=p<<16|g<<8|d,y=0;y<4&&h+y*.75<c;y++)l.push(v.charAt(m>>>6*(3-y)&63));var _=v.charAt(64);if(_)for(;l.length%4;)l.push(_);return l.join("")},parse:function(u){var f=u.length,c=this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var l=0;l<c.length;l++)v[c.charCodeAt(l)]=l}var h=c.charAt(64);if(h){var p=u.indexOf(h);p!==-1&&(f=p)}return s(u,f,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64})}(As)),As.exports}var ks={exports:{}},rf;function Fv(){return rf||(rf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64url={stringify:function(u,f){f===void 0&&(f=!0);var c=u.words,v=u.sigBytes,l=f?this._safe_map:this._map;u.clamp();for(var h=[],p=0;p<v;p+=3)for(var g=c[p>>>2]>>>24-p%4*8&255,d=c[p+1>>>2]>>>24-(p+1)%4*8&255,m=c[p+2>>>2]>>>24-(p+2)%4*8&255,y=g<<16|d<<8|m,_=0;_<4&&p+_*.75<v;_++)h.push(l.charAt(y>>>6*(3-_)&63));var x=l.charAt(64);if(x)for(;h.length%4;)h.push(x);return h.join("")},parse:function(u,f){f===void 0&&(f=!0);var c=u.length,v=f?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var h=0;h<v.length;h++)l[v.charCodeAt(h)]=h}var p=v.charAt(64);if(p){var g=u.indexOf(p);g!==-1&&(c=g)}return s(u,c,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64url})}(ks)),ks.exports}var Os={exports:{}},of;function fr(){return of||(of=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[];(function(){for(var g=0;g<64;g++)f[g]=r.abs(r.sin(g+1))*4294967296|0})();var c=u.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,d){for(var m=0;m<16;m++){var y=d+m,_=g[y];g[y]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var x=this._hash.words,b=g[d+0],S=g[d+1],A=g[d+2],I=g[d+3],B=g[d+4],O=g[d+5],E=g[d+6],k=g[d+7],R=g[d+8],N=g[d+9],q=g[d+10],G=g[d+11],Y=g[d+12],ne=g[d+13],Q=g[d+14],P=g[d+15],w=x[0],D=x[1],L=x[2],$=x[3];w=v(w,D,L,$,b,7,f[0]),$=v($,w,D,L,S,12,f[1]),L=v(L,$,w,D,A,17,f[2]),D=v(D,L,$,w,I,22,f[3]),w=v(w,D,L,$,B,7,f[4]),$=v($,w,D,L,O,12,f[5]),L=v(L,$,w,D,E,17,f[6]),D=v(D,L,$,w,k,22,f[7]),w=v(w,D,L,$,R,7,f[8]),$=v($,w,D,L,N,12,f[9]),L=v(L,$,w,D,q,17,f[10]),D=v(D,L,$,w,G,22,f[11]),w=v(w,D,L,$,Y,7,f[12]),$=v($,w,D,L,ne,12,f[13]),L=v(L,$,w,D,Q,17,f[14]),D=v(D,L,$,w,P,22,f[15]),w=l(w,D,L,$,S,5,f[16]),$=l($,w,D,L,E,9,f[17]),L=l(L,$,w,D,G,14,f[18]),D=l(D,L,$,w,b,20,f[19]),w=l(w,D,L,$,O,5,f[20]),$=l($,w,D,L,q,9,f[21]),L=l(L,$,w,D,P,14,f[22]),D=l(D,L,$,w,B,20,f[23]),w=l(w,D,L,$,N,5,f[24]),$=l($,w,D,L,Q,9,f[25]),L=l(L,$,w,D,I,14,f[26]),D=l(D,L,$,w,R,20,f[27]),w=l(w,D,L,$,ne,5,f[28]),$=l($,w,D,L,A,9,f[29]),L=l(L,$,w,D,k,14,f[30]),D=l(D,L,$,w,Y,20,f[31]),w=h(w,D,L,$,O,4,f[32]),$=h($,w,D,L,R,11,f[33]),L=h(L,$,w,D,G,16,f[34]),D=h(D,L,$,w,Q,23,f[35]),w=h(w,D,L,$,S,4,f[36]),$=h($,w,D,L,B,11,f[37]),L=h(L,$,w,D,k,16,f[38]),D=h(D,L,$,w,q,23,f[39]),w=h(w,D,L,$,ne,4,f[40]),$=h($,w,D,L,b,11,f[41]),L=h(L,$,w,D,I,16,f[42]),D=h(D,L,$,w,E,23,f[43]),w=h(w,D,L,$,N,4,f[44]),$=h($,w,D,L,Y,11,f[45]),L=h(L,$,w,D,P,16,f[46]),D=h(D,L,$,w,A,23,f[47]),w=p(w,D,L,$,b,6,f[48]),$=p($,w,D,L,k,10,f[49]),L=p(L,$,w,D,Q,15,f[50]),D=p(D,L,$,w,O,21,f[51]),w=p(w,D,L,$,Y,6,f[52]),$=p($,w,D,L,I,10,f[53]),L=p(L,$,w,D,q,15,f[54]),D=p(D,L,$,w,S,21,f[55]),w=p(w,D,L,$,R,6,f[56]),$=p($,w,D,L,P,10,f[57]),L=p(L,$,w,D,E,15,f[58]),D=p(D,L,$,w,ne,21,f[59]),w=p(w,D,L,$,B,6,f[60]),$=p($,w,D,L,G,10,f[61]),L=p(L,$,w,D,A,15,f[62]),D=p(D,L,$,w,N,21,f[63]),x[0]=x[0]+w|0,x[1]=x[1]+D|0,x[2]=x[2]+L|0,x[3]=x[3]+$|0},_doFinalize:function(){var g=this._data,d=g.words,m=this._nDataBytes*8,y=g.sigBytes*8;d[y>>>5]|=128<<24-y%32;var _=r.floor(m/4294967296),x=m;d[(y+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,d[(y+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,g.sigBytes=(d.length+1)*4,this._process();for(var b=this._hash,S=b.words,A=0;A<4;A++){var I=S[A];S[A]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return b},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function v(g,d,m,y,_,x,b){var S=g+(d&m|~d&y)+_+b;return(S<<x|S>>>32-x)+d}function l(g,d,m,y,_,x,b){var S=g+(d&y|m&~y)+_+b;return(S<<x|S>>>32-x)+d}function h(g,d,m,y,_,x,b){var S=g+(d^m^y)+_+b;return(S<<x|S>>>32-x)+d}function p(g,d,m,y,_,x,b){var S=g+(m^(d|~y))+_+b;return(S<<x|S>>>32-x)+d}i.MD5=s._createHelper(c),i.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5})}(Os)),Os.exports}var Ss={exports:{}},af;function sf(){return af||(af=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=i.Hasher,s=r.algo,u=[],f=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,v){for(var l=this._hash.words,h=l[0],p=l[1],g=l[2],d=l[3],m=l[4],y=0;y<80;y++){if(y<16)u[y]=c[v+y]|0;else{var _=u[y-3]^u[y-8]^u[y-14]^u[y-16];u[y]=_<<1|_>>>31}var x=(h<<5|h>>>27)+m+u[y];y<20?x+=(p&g|~p&d)+1518500249:y<40?x+=(p^g^d)+1859775393:y<60?x+=(p&g|p&d|g&d)-1894007588:x+=(p^g^d)-899497514,m=d,d=g,g=p<<30|p>>>2,p=h,h=x}l[0]=l[0]+h|0,l[1]=l[1]+p|0,l[2]=l[2]+g|0,l[3]=l[3]+d|0,l[4]=l[4]+m|0},_doFinalize:function(){var c=this._data,v=c.words,l=this._nDataBytes*8,h=c.sigBytes*8;return v[h>>>5]|=128<<24-h%32,v[(h+64>>>9<<4)+14]=Math.floor(l/4294967296),v[(h+64>>>9<<4)+15]=l,c.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var c=a.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=a._createHelper(f),r.HmacSHA1=a._createHmacHelper(f)}(),t.SHA1})}(Ss)),Ss.exports}var Is={exports:{}},lf;function Ts(){return lf||(lf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[],c=[];(function(){function h(m){for(var y=r.sqrt(m),_=2;_<=y;_++)if(!(m%_))return!1;return!0}function p(m){return(m-(m|0))*4294967296|0}for(var g=2,d=0;d<64;)h(g)&&(d<8&&(f[d]=p(r.pow(g,1/2))),c[d]=p(r.pow(g,1/3)),d++),g++})();var v=[],l=u.SHA256=s.extend({_doReset:function(){this._hash=new a.init(f.slice(0))},_doProcessBlock:function(h,p){for(var g=this._hash.words,d=g[0],m=g[1],y=g[2],_=g[3],x=g[4],b=g[5],S=g[6],A=g[7],I=0;I<64;I++){if(I<16)v[I]=h[p+I]|0;else{var B=v[I-15],O=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,E=v[I-2],k=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;v[I]=O+v[I-7]+k+v[I-16]}var R=x&b^~x&S,N=d&m^d&y^m&y,q=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),G=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),Y=A+G+R+c[I]+v[I],ne=q+N;A=S,S=b,b=x,x=_+Y|0,_=y,y=m,m=d,d=Y+ne|0}g[0]=g[0]+d|0,g[1]=g[1]+m|0,g[2]=g[2]+y|0,g[3]=g[3]+_|0,g[4]=g[4]+x|0,g[5]=g[5]+b|0,g[6]=g[6]+S|0,g[7]=g[7]+A|0},_doFinalize:function(){var h=this._data,p=h.words,g=this._nDataBytes*8,d=h.sigBytes*8;return p[d>>>5]|=128<<24-d%32,p[(d+64>>>9<<4)+14]=r.floor(g/4294967296),p[(d+64>>>9<<4)+15]=g,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=s._createHelper(l),i.HmacSHA256=s._createHmacHelper(l)}(Math),t.SHA256})}(Is)),Is.exports}var Bs={exports:{}},cf;function Pv(){return cf||(cf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),Ts())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.algo,s=a.SHA256,u=a.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=s._doFinalize.call(this);return f.sigBytes-=4,f}});r.SHA224=s._createHelper(u),r.HmacSHA224=s._createHmacHelper(u)}(),t.SHA224})}(Bs)),Bs.exports}var Ds={exports:{}},uf;function ff(){return uf||(uf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.Hasher,a=r.x64,s=a.Word,u=a.WordArray,f=r.algo;function c(){return s.create.apply(s,arguments)}var v=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];(function(){for(var p=0;p<80;p++)l[p]=c()})();var h=f.SHA512=o.extend({_doReset:function(){this._hash=new u.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(p,g){for(var d=this._hash.words,m=d[0],y=d[1],_=d[2],x=d[3],b=d[4],S=d[5],A=d[6],I=d[7],B=m.high,O=m.low,E=y.high,k=y.low,R=_.high,N=_.low,q=x.high,G=x.low,Y=b.high,ne=b.low,Q=S.high,P=S.low,w=A.high,D=A.low,L=I.high,$=I.low,W=B,H=O,X=E,ee=k,M=R,U=N,Z=q,z=G,F=Y,j=ne,se=Q,fe=P,ce=w,ie=D,oe=L,le=$,ue=0;ue<80;ue++){var ae,ve,ye=l[ue];if(ue<16)ve=ye.high=p[g+ue*2]|0,ae=ye.low=p[g+ue*2+1]|0;else{var _e=l[ue-15],Ce=_e.high,ke=_e.low,Ae=(Ce>>>1|ke<<31)^(Ce>>>8|ke<<24)^Ce>>>7,$e=(ke>>>1|Ce<<31)^(ke>>>8|Ce<<24)^(ke>>>7|Ce<<25),Te=l[ue-2],Ke=Te.high,dt=Te.low,Xn=(Ke>>>19|dt<<13)^(Ke<<3|dt>>>29)^Ke>>>6,Bt=(dt>>>19|Ke<<13)^(dt<<3|Ke>>>29)^(dt>>>6|Ke<<26),zt=l[ue-7],it=zt.high,st=zt.low,Mt=l[ue-16],qt=Mt.high,kn=Mt.low;ae=$e+st,ve=Ae+it+(ae>>>0<$e>>>0?1:0),ae=ae+Bt,ve=ve+Xn+(ae>>>0<Bt>>>0?1:0),ae=ae+kn,ve=ve+qt+(ae>>>0<kn>>>0?1:0),ye.high=ve,ye.low=ae}var vr=F&se^~F&ce,gn=j&fe^~j&ie,gr=W&X^W&M^X&M,On=H&ee^H&U^ee&U,mr=(W>>>28|H<<4)^(W<<30|H>>>2)^(W<<25|H>>>7),Wn=(H>>>28|W<<4)^(H<<30|W>>>2)^(H<<25|W>>>7),yr=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),mn=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),xr=v[ue],nn=xr.high,Mr=xr.low,ht=le+mn,Kt=oe+yr+(ht>>>0<le>>>0?1:0),ht=ht+gn,Kt=Kt+vr+(ht>>>0<gn>>>0?1:0),ht=ht+Mr,Kt=Kt+nn+(ht>>>0<Mr>>>0?1:0),ht=ht+ae,Kt=Kt+ve+(ht>>>0<ae>>>0?1:0),_r=Wn+On,br=mr+gr+(_r>>>0<Wn>>>0?1:0);oe=ce,le=ie,ce=se,ie=fe,se=F,fe=j,j=z+ht|0,F=Z+Kt+(j>>>0<z>>>0?1:0)|0,Z=M,z=U,M=X,U=ee,X=W,ee=H,H=ht+_r|0,W=Kt+br+(H>>>0<ht>>>0?1:0)|0}O=m.low=O+H,m.high=B+W+(O>>>0<H>>>0?1:0),k=y.low=k+ee,y.high=E+X+(k>>>0<ee>>>0?1:0),N=_.low=N+U,_.high=R+M+(N>>>0<U>>>0?1:0),G=x.low=G+z,x.high=q+Z+(G>>>0<z>>>0?1:0),ne=b.low=ne+j,b.high=Y+F+(ne>>>0<j>>>0?1:0),P=S.low=P+fe,S.high=Q+se+(P>>>0<fe>>>0?1:0),D=A.low=D+ie,A.high=w+ce+(D>>>0<ie>>>0?1:0),$=I.low=$+le,I.high=L+oe+($>>>0<le>>>0?1:0)},_doFinalize:function(){var p=this._data,g=p.words,d=this._nDataBytes*8,m=p.sigBytes*8;g[m>>>5]|=128<<24-m%32,g[(m+128>>>10<<5)+30]=Math.floor(d/4294967296),g[(m+128>>>10<<5)+31]=d,p.sigBytes=g.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=o._createHelper(h),r.HmacSHA512=o._createHmacHelper(h)}(),t.SHA512})}(Ds)),Ds.exports}var Rs={exports:{}},df;function Mv(){return df||(df=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo(),ff())})(Se,function(t){return function(){var r=t,i=r.x64,o=i.Word,a=i.WordArray,s=r.algo,u=s.SHA512,f=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var c=u._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=u._createHelper(f),r.HmacSHA384=u._createHmacHelper(f)}(),t.SHA384})}(Rs)),Rs.exports}var Ls={exports:{}},hf;function qv(){return hf||(hf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.x64,f=u.Word,c=i.algo,v=[],l=[],h=[];(function(){for(var d=1,m=0,y=0;y<24;y++){v[d+5*m]=(y+1)*(y+2)/2%64;var _=m%5,x=(2*d+3*m)%5;d=_,m=x}for(var d=0;d<5;d++)for(var m=0;m<5;m++)l[d+5*m]=m+(2*d+3*m)%5*5;for(var b=1,S=0;S<24;S++){for(var A=0,I=0,B=0;B<7;B++){if(b&1){var O=(1<<B)-1;O<32?I^=1<<O:A^=1<<O-32}b&128?b=b<<1^113:b<<=1}h[S]=f.create(A,I)}})();var p=[];(function(){for(var d=0;d<25;d++)p[d]=f.create()})();var g=c.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var d=this._state=[],m=0;m<25;m++)d[m]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(d,m){for(var y=this._state,_=this.blockSize/2,x=0;x<_;x++){var b=d[m+2*x],S=d[m+2*x+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var A=y[x];A.high^=S,A.low^=b}for(var I=0;I<24;I++){for(var B=0;B<5;B++){for(var O=0,E=0,k=0;k<5;k++){var A=y[B+5*k];O^=A.high,E^=A.low}var R=p[B];R.high=O,R.low=E}for(var B=0;B<5;B++)for(var N=p[(B+4)%5],q=p[(B+1)%5],G=q.high,Y=q.low,O=N.high^(G<<1|Y>>>31),E=N.low^(Y<<1|G>>>31),k=0;k<5;k++){var A=y[B+5*k];A.high^=O,A.low^=E}for(var ne=1;ne<25;ne++){var O,E,A=y[ne],Q=A.high,P=A.low,w=v[ne];w<32?(O=Q<<w|P>>>32-w,E=P<<w|Q>>>32-w):(O=P<<w-32|Q>>>64-w,E=Q<<w-32|P>>>64-w);var D=p[l[ne]];D.high=O,D.low=E}var L=p[0],$=y[0];L.high=$.high,L.low=$.low;for(var B=0;B<5;B++)for(var k=0;k<5;k++){var ne=B+5*k,A=y[ne],W=p[ne],H=p[(B+1)%5+5*k],X=p[(B+2)%5+5*k];A.high=W.high^~H.high&X.high,A.low=W.low^~H.low&X.low}var A=y[0],ee=h[I];A.high^=ee.high,A.low^=ee.low}},_doFinalize:function(){var d=this._data,m=d.words;this._nDataBytes*8;var y=d.sigBytes*8,_=this.blockSize*32;m[y>>>5]|=1<<24-y%32,m[(r.ceil((y+1)/_)*_>>>5)-1]|=128,d.sigBytes=m.length*4,this._process();for(var x=this._state,b=this.cfg.outputLength/8,S=b/8,A=[],I=0;I<S;I++){var B=x[I],O=B.high,E=B.low;O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,A.push(E),A.push(O)}return new a.init(A,b)},clone:function(){for(var d=s.clone.call(this),m=d._state=this._state.slice(0),y=0;y<25;y++)m[y]=m[y].clone();return d}});i.SHA3=s._createHelper(g),i.HmacSHA3=s._createHmacHelper(g)}(Math),t.SHA3})}(Ls)),Ls.exports}var Ns={exports:{}},pf;function $v(){return pf||(pf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){/** @preserve
|
|
87
87
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
88
88
|
|
|
89
89
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|