expedite-components 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expedite-components.es.js +182 -182
- package/dist/expedite-components.umd.js +13 -13
- package/dist/vue-expedite-components.js +268 -268
- package/dist/vue-expedite-components.umd.cjs +14 -14
- package/package.json +2 -2
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* vue-router-lwc v1.0.4
|
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/var xa;(function(t){t.pop="pop",t.push="push"})(xa||(xa={}));var va;(function(t){t.back="back",t.forward="forward",t.unknown=""})(va||(va={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var _a;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_a||(_a={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const Zs=Symbol(process.env.NODE_ENV!=="production"?"router":""),Gs=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function dn(){return e.inject(Zs)}function Ws(){return e.inject(Gs)}function Ue(t){if(typeof t=="string"&&(t=JSON.parse(t)),t!=null&&t.errorMessage)throw new Error(t==null?void 0:t.errorMessage);return t}const xr={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__sales_price__c:"xx_ord1__negotiated_price__c",xx_ord1__nrc__c:"xx_ord1__nrc_for_new__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price__c:"xx_ord1__list_price2__c",xx_ord1__cost__c:"xx_ord1__cost2__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},ba={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__negotiated_price__c:"xx_ord1__sales_price__c",xx_ord1__nrc_for_new__c:"xx_ord1__nrc__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price2__c:"xx_ord1__list_price__c",xx_ord1__cost2__c:"xx_ord1__cost__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},Js=t=>{var n;let i=[];for(let r of t)if(r.trim()!=="xx_ord1__item__r.xx_ord1__decimal_precision__c")if(r.includes(".")){let c=r.split(".")[0];c=c.slice(0,-1)+"c";const f=((n=xr[c==null?void 0:c.toLowerCase()])==null?void 0:n.trim())||"";f&&(i.includes(f)||i.push(f||""),i.push(r))}else i.includes(xr[r==null?void 0:r.toLowerCase()])||i.push(xr[r==null?void 0:r.toLowerCase()]||"");return i.filter(r=>r!=="")},Ys=je.defineStore("actions",()=>{const t=Vn(),i=Lt(),n=e.ref(!1);return{openAdaptiveSearch:(x,y=!1)=>{console.info("openAdaptiveSearch",x),t.chatHistory[t.chatHistory.length-1].links=[],t.sendMessage("Open Adaptive Search",!1,{internalCall:!0}),n.value=y},openQuoteItem:x=>{console.info("openQuoteItem",x),t.chatHistory[t.chatHistory.length-1].links=[],t.sendMessage("Open Quote Item",!1,{internalCall:!0})},openQuoteDocument:x=>{console.info("openQuoteDocument",x),t.chatHistory[t.chatHistory.length-1].links=[],t.chatHistory.push({type:"response",message:"Opening quote document",loading:!0});const u=`/apex/XX_ORD1__Expedite_Commerce?scpq=true&oid=${i.quoteId}&atpverified=true&ecCache=false&origin=AI`;window.location.href=`${ds(window.location.href)}${u}`},undo:()=>{const x=t==null?void 0:t.latestDMLRequest;t.sendMessage(`UNDO-${x}`,!1,{internalCall:!0})},isStaticActionCall:n}}),Ca=je.defineStore("adaptiveSearch",()=>{const t=Lt(),i=un(),n=Vn(),r=Ys(),o=e.ref(null),c=e.ref(null),f=e.ref(!1),x=e.ref(!1),y=e.ref([]),u=e.ref(""),s=e.ref(!1),_=e.ref(null),a=e.ref(!1),h=e.ref([]),d=et(),p=e.ref([]),l=e.ref(0),g=e.ref(!1),m=e.ref({rowLimt:10,paging:!0,offset:0,currentPage:1,totalPages:1});async function b(){f.value=!0;try{const E=JSON.stringify({layoutType:"Search Selection",layoutObject:"xx_ord1__ecatalog_item__c"});let T={};return T=await window.salesforceConnector.getDynamicPageLayout(E),c.value=ma(T,"Unable to find the Search Selection Layout for your user profile"),m.value.rowLimt=c.value.configuration.rowLimit||10,c.value.configuration.columns.forEach(D=>{!D.field&&D.label==="QTY"&&(D.field="xx_ord1__qty__c")}),f.value=!1,v(),T}catch(E){f.value=!1,d.handleError("Failed to get Adaptive Search Layout. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",E)}}function v(){var E,T,D;_.value=(D=(T=(E=c.value)==null?void 0:E.configuration)==null?void 0:T.dynamicFilters)==null?void 0:D.filters.map(P=>({...P,field:P.field.toLowerCase(),filtervalue:P.filtervalue||[],filtervaluefrom:P.filtervaluefrom||"",filtervalueTo:P.filtervalueTo||""}))}function C(){var T;let E=[];for(const D of c.value.configuration.columns){let P=D.field;if(E.includes(P)||E.push(P),P!=null&&P.includes(".")){let q=P.split(".")[0];q=q.slice(0,-1)+"c",E.includes(q)||E.push(q)}}return(T=c.value.configuration)!=null&&T.cardHeader&&E.push(c.value.configuration.cardHeader.imageField),c.value.configuration.objectName.toLowerCase()==="xx_ord1__ecatalog_item__c"&&E.push("xx_ord1__item__r.xx_ord1__decimal_precision__c"),E=E.filter(D=>!!D),E.filter(D=>D.toLowerCase()!=="xx_ord1__qty__c"&&D.toLowerCase()!=="xx_ord1__competitor_sku__c")}function B(E,T=!1){if(!E||E.includes("undefined"))return!1;const D=/[!@#$%^&*()+=[\]{};':"\\|.<>/?]+/;if(T){const P=Array.isArray(E)?E:E.split(",");for(const X of P){const q=X.trim();if(D.test(q))return d.handleError(`Invalid character found in value: ${q}`),!1}}else if(D.test(E))return d.handleError("Special characters are not allowed in filter values"),!1;return!0}function w(E,T){return{field:E.field,operator:E.operator||"contains",value:T,dataType:E.dataType.trim()}}function S(E){if(!E.filtervalue)return null;const T=Array.isArray(E.filtervalue),D=T?E.filtervalue.join(","):E.filtervalue.trim();return B(D,T)?D:null}function I(E){var X,q;const T=(X=E.filtervaluefrom)==null?void 0:X.trim(),D=(q=E.filtervalueTo)==null?void 0:q.trim();if(!T||!D)return null;const P=`${T}, ${D}`;return P!==", "&&B(P)?P:null}function A(E){const T=`${pa(E.filtervaluefrom)}, ${pa(E.filtervalueTo)}`;return T!==", "&&B(T)?T:null}function k(E){var D;const T=(D=E.filtervaluefrom)==null?void 0:D.trim();return B(T)?T:null}function N(E){const T=[];return E.forEach(D=>{const P=D.dataType.trim();let X=null;switch(P){case"PICKLIST":case"MULTIPICKLIST":X=S(D);break;case"DOUBLE":case"CURRENCY":X=I(D);break;case"DATETIME":case"DATE":X=A(D);break;default:X=k(D)}X&&T.push(w(D,X))}),h.value=T,T}async function V(E="",T=[],D=[]){var X,q,z,R,$,j,U,Q,Y,ne;let P=[];if(T.length&&(P=N(T)),!P.length&&E.trim()===""){y.value=[],s.value=!1;return}try{s.value=!1,x.value=!0;const ce=E.trim();D.length||(D=C());const fe={fields:D,...T.length?{dynamicFilters:P}:{},searchText:ce||u.value.trim(),accountId:i.accountId,...i.eCatalogId?{catalogId:i.eCatalogId}:{},...i.objectType==="opportunity"?{opportunityId:i.id}:{},...(q=(X=c.value)==null?void 0:X.configuration)!=null&&q.sort?{primarySortBy:c.value.configuration.sort.primary.field,primarySortOrder:c.value.configuration.sort.primary.direction,secondarySortBy:c.value.configuration.sort.secondary.field,secondarySortOrder:c.value.configuration.sort.secondary.direction}:{},rowLimt:(R=(z=c.value)==null?void 0:z.configuration)==null?void 0:R.rowLimit,paging:(j=($=c.value)==null?void 0:$.configuration)==null?void 0:j.paging,...((U=m.value)==null?void 0:U.offset)!==0?{offset:m.value.offset}:{},objectName:(Y=(Q=c.value)==null?void 0:Q.configuration)==null?void 0:Y.objectName,currencyCode:i.currencyCode},se=await window.salesforceConnector.getItems(JSON.stringify(fe));if(se!=null&&se.errorMessage){d.handleError(se.errorMessage);return}se!=null&&se.itemCount&&(m.value.totalPages=Math.ceil((se==null?void 0:se.itemCount)/m.value.rowLimt)),y.value=In(se.lstItems,{xx_ord1__qty__c:"1"}),(ne=se.lstItems)!=null&&ne.length||(s.value=!0),x.value=!1}catch(ce){d.handleError("Failed to fetch Results. Please try again."),x.value=!1,console.info("[ERROR]: Adaptive Search getItems() error = ",ce)}}async function L(E){try{a.value=!0;const T=JSON.stringify({lstQLIRequest:M(E),quoteId:t.quoteId});let D=await window.salesforceConnector.createQLI(T);typeof D=="string"&&(D=JSON.parse(D));let P=!1;if((D==null?void 0:D.length)>0&&D.forEach(X=>{X.errorMessage&&(P=!0,d.handleError(X.errorMessage))}),a.value=!1,P){p.value=D;const X=p.value.reduce((q,z)=>(q[z.eCatalogItemId]=z.errorMessage,q),{});y.value=y.value.map(q=>({...q,backendError:X[q.Id]||""}));return}return D}catch(T){d.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addToQuote() error = ",T)}}function M(E){const T=[];for(const D of E)if(!D.addedToQuote&&D.id){const P=Z(D);l.value++,T.push({fields:P,recordId:D.id,...E.length===1?{maxSequenceNumber:l.value}:{}})}return T}function Z(E){const T=[],D=G();return Object.keys(E).forEach(P=>{if(D.includes(P)){const X=ba[P.toLowerCase()];X&&T.push({fieldname:X,value:E[P]})}}),T}function G(){const E=[];return c.value.configuration.columns.forEach(T=>{T.field&&!T.field.includes(".")&&T.isEditable&&T.visible&&E.push(T.field)}),E}function J(){var T,D;const E=[];return c.value.configuration.columns.forEach(P=>{const X=P.field.toLowerCase();E.includes(X)||E.push(X)}),(T=c.value.configuration)!=null&&T.dynamicFilters&&c.value.configuration.dynamicFilters.filters.forEach(P=>{const X=P.field.toLowerCase();E.includes(X)||E.push(X)}),(D=c.value.configuration)!=null&&D.cardHeader&&E.push(c.value.configuration.cardHeader.imageField),E}async function K(){var D;const E=J(),T=((D=c.value.configuration)==null?void 0:D.saveObjectName)||c.value.configuration.objectName;if(T==="xx_ord1__ecatalog_item__c"){const P=E.indexOf("xx_ord1__qty__c");P>-1&&E.splice(P,1)}await t.getFieldsData(E,T),t.fieldsData.xx_ord1__qty__c||t.getFieldsData(["xx_ord1__qty__c"],"xx_ord1__quote_line_item__c")}async function F({searchTerm:E="",filters:T=[]}={}){if(g.value=!0,E&&(u.value=E),T.length&&(h.value=T),await b()){await K(),g.value=!1;const P=u.value;P&&(u.value=P,await V(P,t.dynamicFilters)),console.info("actionStore.isStaticActionCall = ",r.isStaticActionCall),r.isStaticActionCall&&(r.isStaticActionCall=!1,n.chatHistory[n.chatHistory.length-1]={type:"response",message:"Adaptive search is now open. Please search for the products you require and add it quote",loading:!1,links:[{action:"quoteItem",label:"Quote Item"},{action:"quoteDocument",label:"Quote Document"}]})}g.value=!1}return{selectedItem:o,AdaptiveSearchLayout:c,searchText:u,loadingAdaptiveLayout:f,getAdaptiveSearchLayout:b,getItems:V,lstItems:y,rowItemsLoading:x,noSearchRecords:s,dynamicFilters:_,setDynamicFilters:v,createQliErrors:p,addToQuote:L,addingToQuote:a,getFieldsData:K,pagingData:m,appliedDynamicFilters:h,maxSequenceNumber:l,loadingAdaptiveSearch:g,initAdaptiveSearch:F}}),ec=je.defineStore("quickSelection",()=>{const t=et(),i=un(),n=Lt(),r=e.ref(null),o=e.ref(!1),c=e.ref([]),f=e.ref([]),x=e.ref(!1),y=e.ref({}),u=e.ref({rowLimit:10,paging:!0,offset:0,currentPage:1,totalPages:1}),s=e.ref(!1);async function _(){o.value=!0;try{const C=JSON.stringify({layoutType:"Quick Selection",layoutObject:"xx_ord1__ecatalog_item__c",...i.objectType?{contextObject:i.objectType}:{}});let B={};B=await window.salesforceConnector.getDynamicPageLayout(C),r.value=ma(B,"Unable to find the Quick Selection Layout for your user profile"),console.info("quickSelectionLayout.value = ",r.value),u.value.rowLimit=r.value.configuration.rowLimit||10,r.value.data.columns.forEach(w=>{!w.field&&w.label==="QTY"&&(w.field="xx_ord1__qty__c")}),o.value=!1}catch(C){o.value=!1,t.handleError("Failed to get Page structure data. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",C)}}function a(){const C=new Map;return r.value.data.columns.forEach(B=>{C.set(B.field,!0)}),r.value.data.searchResultColumns.forEach(B=>{C.set(B.field,!0)}),Array.from(C.keys())}async function h(C){var B,w;try{let S=await window.salesforceConnector.saveCompetitorSKU(C);if(S!=null&&S.errorMessage){t.handleError(S.errorMessage);return}if((B=S[0])!=null&&B.errorMessage){t.handleError((w=S[0])==null?void 0:w.errorMessage);return}return S}catch(S){t.handleError("Failed to Match Item. Please try again."),console.info("[ERROR]: saveCompetitorSKU() error = ",S)}}async function d(C="",B=[]){try{let w=r.value.data,S=r.value.configuration;const I=C.trim();if(console.info("searchTextValue.trim() = ",C.trim()),!I)return[];let A=null;console.info("useMappings = ",s.value),s.value?A=Js(p()):A=p(),console.info("fields before filter = ",A),A=A.filter(L=>L!=="xx_ord1__qty__c"),console.info("fields after filter = ",A);const k={fields:A,...B.length?{dynamicFilters:n.getDynamicFilters(B)}:{},searchText:I,accountId:i.accountId,...i.eCatalogId?{catalogId:i.eCatalogId}:{},...i.objectType==="opportunity"?{opportunityId:i.id}:{},...w!=null&&w.sort?{primarySortBy:w.sort.primary.field,primarySortOrder:w.sort.primary.direction,secondarySortBy:w.sort.secondary.field,secondarySortOrder:w.sort.secondary.direction}:{},rowLimt:(S==null?void 0:S.rowLimit)||20,paging:(S==null?void 0:S.paging)||!1,...u.value.offset!==0?{offset:u.value.offset}:{},objectName:w.objectName,currencyCode:i.currencyCode};console.info("getQuickSelectionItems payload = ",JSON.stringify(k));const N=await window.salesforceConnector.getItems(JSON.stringify(k));if(console.info("getQuickSelectionItems Res = ",JSON.stringify(N)),N!=null&&N.errorMessage){t.handleError(N.errorMessage);return}return N!=null&&N.itemCount&&(u.value.totalPages=Math.ceil((N==null?void 0:N.itemCount)/u.value.rowLimit)),In(N.lstItems,{xx_ord1__qty__c:"1"})}catch(w){t.handleError("Failed to fetch Results. Please try again."),console.info("[ERROR]: getQuickSelectionItems() error = ",w)}}function p(){let C=[];for(const B of r.value.data.columns){let w=B.field;if(w!=null&&w.includes(".")){C.includes(w)||C.push(w);let I=w.split(".")[0];I=I.slice(0,-1)+"c",C.includes(I)||C.push(I)}else C.includes(w)||C.push(w)}return console.info("getAllQuickSelectionFields() fields = ",C),C.filter(B=>B.toLowerCase()!=="xx_ord1__qty__c")}async function l(C,B,w,S){console.info("searchText:",JSON.stringify(C)),console.info("row:",JSON.stringify(B)),console.info("rowIndex:",JSON.stringify(w)),console.info("column:",JSON.stringify(S));const I=w+(u.value.currentPage-1)*u.value.rowLimit;if(S.field.toLowerCase().includes("xx_ord1__item__r")){if(c.value[I].itemLookupLoading=!0,s.value=!0,f.value=await d(C),f.value.length>0){const A=[];for(let k=0;k<f.value.length;k++)c.value[I].itemDataRetrieved=!0,f.value[k].xx_ord1__item__c&&A.push({name:f.value[k]["xx_ord1__item__r.name"],value:f.value[k].xx_ord1__item__c,label:f.value[k][S.field.toLowerCase()]});c.value[I][S.field.toLowerCase()+"_options"]=A}c.value[I].itemLookupLoading=!1}else if(S.field.toLowerCase().includes("xx_ord1__competitor_item__r")){c.value[I].competitorLookupLoading=!0;const A=await g(C);A!=null&&A.items&&(c.value[I][S.field.toLowerCase()+"_options"]=A.items.map(k=>({name:k.fields[2].value,value:k.fields[1].value,label:k.fields[0].value}))),c.value[I].competitorLookupLoading=!1,console.info("getLookupData:: Search Lookup Handler Response = ",A)}}async function g(C){var w,S;console.info("getLookupData() searchText = ",C);const B={searchText:C,obj:"xx_ord1__competitor_item__c",filters:null,displayFields:["xx_ord1__sku__c"]};try{let I=await window.salesforceConnector.getLookupData(JSON.stringify(B));if(typeof I=="string"&&(I=JSON.parse(I)),I!=null&&I.errorMessage){t.handleError(I.errorMessage);return}if((w=I[0])!=null&&w.errorMessage){t.handleError((S=I[0])==null?void 0:S.errorMessage);return}return I}catch(I){t.handleError("Failed to Search For Item. Please try again."),console.info("[ERROR]: getLookupData() error = ",I)}}async function m(C,B){var S;console.info("Update Other Fields Value = ",C),console.info("Update Other Fields Row Index = ",B);const w=B+(u.value.currentPage-1)*u.value.rowLimit;console.info("actualRowIndex = ",w);try{if(C){const I=f.value.filter(A=>A.xx_ord1__item__c===C)[0];if(I){x.value=!0;const A=r.value.data.columns[1].field;c.value[w][A]&&await b(I,w),(S=c.value[w])!=null&&S.itemDataRetrieved&&(c.value[w].status="New Match Requested",c.value[w].noMatchCleared=!0),Object.keys(I).forEach(k=>{const N=ba[k.toLowerCase()];console.info("Mapped Key = ",N),N&&(c.value[w][N]=I[k])}),x.value=!1}else c.value[w].status=""}else c.value[w].status="No Match"}catch(I){t.handleError("Unable to request a match for this item please try again."),console.info("Error in updateOtherFields = ",I)}}async function b(C,B){const w=c.value[B],S=r.value.data.columns[1].field,I=[{sku:w[S],name:w[S],productDescription:w.xx_ord1__line_description__c||"",productURL:null,status:"Match Requested",competitorAccountId:null,itemId:C.xx_ord1__item__c}];let A=await h(JSON.stringify(I));console.info("Match Item: ",JSON.stringify(A)),c.value[B][`${S}_options`]=[{value:A[0].competitorItemId,label:A[0].sku}],c.value[B][S]=A[0].competitorItemId}async function v(C){try{let B=await window.salesforceConnector.createQLI(JSON.stringify(C));typeof B=="string"&&(B=JSON.parse(B));let w=!1;if((B==null?void 0:B.length)>0)for(let S=0;S<B.length;S++)B[S].errorMessage&&(w=!0,B[S].errorMessage.includes("Line Description: data value too large")&&(B[S].errorMessage="Error: The description is too long—it must be under 200 characters."));if(w){B.forEach(S=>{y.value[S.eCatalogItemId]=S});return}else y.value=[];return B}catch(B){t.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addAllItemsToQuote() error = ",B)}}return{quickSelectionLayout:r,quickSelectionLayoutLoading:o,processedRecords:c,useMappings:s,currentSearchData:f,createQliErrors:y,getQuickSelectionLayout:_,getAllFieldsForQuickSelectionLayout:a,saveCompetitorSKU:h,getQuickSelectionItems:d,searchLookupHandler:l,updateOtherFields:m,addAllItemsToQuote:v}}),tc="Preparing Your Quote Please Wait...",nc={message:"Your quote is ready! Begin adding products to complete it.",type:"response",requestId:"no-request-id"},rc=18e4,Vn=je.defineStore("ai",()=>{const t=un(),i=Lt(),n=Ca(),r=ec(),o=ct(),c=Ws(),f=e.ref(""),x=e.ref(""),y=e.ref([]),u=e.ref(""),s=e.ref([]),_=e.ref(!1),a=e.ref(null),h=dn(),d=e.ref({}),p=e.ref(null),l=e.ref(null),g=e.ref(null),m=e.ref(null),b=e.ref(null),v=e.ref(tc),C=e.ref([]),B=e.computed(()=>t.orgId+"__"+t.user.Id+"__"+i.quoteId),w=e.computed(()=>a.value.readyState==WebSocket.OPEN),S=()=>{d.value={salesforceOrgId:t.orgId,salesforceOrgType:t.orgType,salesforceUserId:t.user.Id,userType:"Salesforce",chatRoomId:B.value,requestId:"",prompt:"",initiatedFrom:t.origin||"Quote",internalCall:!1,contextObjectId:i.quoteId,contextObjectType:"Quote",payload:{lineItemsCount:i.lineItemsCount},origin:"Genesis AI",defaultBatchSize:10,actionType:"",packageVersion:t.packageVersion,relatedIds:{eCatalogId:t.eCatalogId,accountId:t.accountId}}};async function I(){const $=x.value+"?chatRoomId="+B.value;a.value=new WebSocket($),a.value.addEventListener("open",A),a.value.addEventListener("message",V),a.value.addEventListener("close",k),a.value.addEventListener("error",N)}const A=()=>{L(),G()},k=()=>{M()},N=()=>{P(),M()},V=$=>{var U,Q;L();const j=JSON.parse($.data);if(j.status!=="ALIVE"){if(j.loading){v.value=j.message;return}else Array.isArray(j.messages)?(v.value=null,y.value.push(nc),j.messages.length>0&&E(j.messages)):j.agentResponse&&(j.errorMessage&&(j.agentResponse.content=j.errorMessage,j.agentResponse.error=!0),v.value=null,y.value.push({message:j.agentResponse.content,type:j.agentResponse.role,requestId:j.requestId,epoch:j.agentResponse.epoch,error:j.agentResponse.error,isDML:j.agentResponse.isDML,...(U=j.agentResponse)!=null&&U.filesData?{filesData:(Q=j.agentResponse)==null?void 0:Q.filesData}:{}}));C.value=j.links||[],q(j)}},L=()=>{M(),p.value=setTimeout(()=>{if(w.value){const $={action:"heartbeat"};a.value.send(JSON.stringify($)),L()}},rc)},M=()=>{p.value&&(clearInterval(p.value),p.value=null)};function Z($){const j={...d.value};j.requestType="Action",j.actionType="Undo",j.undoRequestId=$,j.requestId=Dt(),F(j)}function G(){const $={...d.value};$.requestType="Action",$.actionType="History",$.requestId=Dt(),F($)}function J($){return c.path.startsWith("/configurator")&&o.isChangedConfiguration?(m.value={save:()=>{o.maintainQuoteConfiguration()}},f.value=$,!0):(f.value="",!1)}function K($,j=!0,U=null){if(!J($)&&$.trim()){let Q={...d.value};Q.prompt=$.trim(),Q.requestType="Chat",Q.requestId=Dt(),Q.internalCall=!1,Q.payload=T(),Q.componentName=D.value,Q.templateId=i.templateId,Q.payload.lineItemsCount=i.lineItemsCount,U&&(Q={...Q,...U}),X(),j&&y.value.push({message:$.trim(),type:"user",...b.value&&{fileData:[b.value]},requestId:Q.requestId}),F(Q),L()}}function F($){const j={action:"prompt",data:$};a.value.send(JSON.stringify(j))}const E=$=>{const j=$.filter(({content:U})=>!!U).map(U=>({message:U.content,type:U.role,requestId:U.requestId,epoch:U.epoch,isDML:U.isDML,undone:U.undone}));j.forEach((U,Q)=>{U.isDML===!0&&Q!==j.length-1&&(U.isDML=!1)}),y.value=[...y.value,...j]};function T(){return c.path==="/quote-item"?i.getPayload():{}}const D=e.computed(()=>c.path==="/quote-item"?"QuoteItem":""),P=()=>{y.value.push({type:"response",message:"Oops! Something went wrong while processing your request. Please try again later.",error:!0})},X=()=>{y.value=y.value.map($=>({...$,links:[]}))};function q($){var Q,Y,ne;const j=((Q=$==null?void 0:$.redirectObjects)==null?void 0:Q.componentName)||($==null?void 0:$.componentName),U=($==null?void 0:$.redirectObjects)||{};if(j==="AdaptiveSearch"){const ce=(Y=$==null?void 0:$.payload)==null?void 0:Y.searchTerm,fe=(ne=$==null?void 0:$.payload)==null?void 0:ne.applyFilters;ce&&ce!==n.searchText&&n.initAdaptiveSearch({searchTerm:ce,filters:fe}),h.push("/adaptive-search")}else j==="Configurator"?h.push(`/configurator/${U.itemId}/${U.qliId}`):j==="QuoteReview"?h.push("/quote-item"):j==="QuoteItem"||j==="QuoteList"?(h.push("/quote-item"),i.performAIAction($)):j==="QuickSelection"&&(r.quickSelectionLayout=$.payload,console.info("Loading QuickSelection data = ",JSON.stringify(r.quickSelectionLayout)),h.push("/match-records"))}function z(){if(w.value){const $={action:"cancel",data:{requestId:d.value.requestId,chatRoomId:B.value}};a.value.send(JSON.stringify($))}}const R=()=>{l.value&&(clearInterval(l.value),l.value=null),p.value&&(clearInterval(p.value),p.value=null),g.value&&(clearTimeout(g.value),g.value=null)};return e.onBeforeUnmount(()=>{R()}),{unsavedChanges:m,loadingMessage:v,promptMessage:f,buttonLinks:C,websocketUrl:x,chatHistory:y,latestDMLRequest:u,strikethroughHistory:s,attachmentData:b,dataManuallyChanged:_,undoAction:Z,connectSocket:I,sendMessage:K,setInitialPayload:S,cancelRequest:z}}),un=je.defineStore("comRoot",()=>{const t=Vn(),i=et(),n=Lt(),r=e.ref(""),o=e.ref(""),c=e.ref("Genesis AI"),f=e.ref(""),x=e.ref({}),y=e.ref(""),u=e.ref(""),s=e.ref(""),_=e.ref(""),a=e.ref({}),h=e.ref(""),d=e.ref(""),p=e.ref(""),l=e.ref(""),g=e.ref(""),m=e.ref(""),b=e.ref(""),v=e.ref("Single"),C=e.ref("closed"),B=e.computed(()=>n.quoteName),w=e.computed(()=>v.value==="Single");async function S(N){r.value=N||ha("id"),o.value=ha("origin"),await A(),await I()}async function I(){try{console.info("getRecordInfo",r.value);let N=await window.salesforceConnector.getRecordInfo(r.value);return N=Ue(N),N!==void 0&&(a.value=N,h.value=N.name,d.value=N.objectType,p.value=N.accountId,l.value=N.eCatalogId,g.value=N.currencyCode,m.value=N.userLocale,b.value=N.opportunityId),(N==null?void 0:N.objectType)==="XX_ORD1__Quote__c"?(n.quoteId=N==null?void 0:N.recordId,n.templateId=N==null?void 0:N.templateId,n.quoteName=N==null?void 0:N.name,n.lineItemsCount=(N==null?void 0:N.lineItemsCount)||0):(N==null?void 0:N.objectType)==="Opportunity"&&await n.getPrimaryQuote(N.recordId),N}catch(N){i.handleError(N.message)}}async function A(){var V,L;console.info("getOrgInformation",r.value);const N=await window.salesforceConnector.getOrgInformation();t.websocketUrl=N.websocketUrl,f.value=(V=N.locale)==null?void 0:V.replace("_","-"),x.value=N.user,y.value=N.orgName,u.value=N.orgId,s.value=N.orgType,_.value=N.packageVersion,v.value=(L=N==null?void 0:N.pricingSchema)==null?void 0:L.toLowerCase()}function k(N){c.value=N,us(N)}return{id:r,origin:o,title:B,subTitle:c,locale:f,user:x,orgName:y,orgId:u,orgType:s,packageVersion:_,objectType:d,recordInfo:a,name:h,accountId:p,eCatalogId:l,currencyCode:g,userLocale:m,opportunityId:b,pricingSchema:v,isSinglePricingSchema:w,flyoutState:C,start:S,getRecordInfo:I,setSubTitle:k}}),oc="XX_ORD1__Quote__c",ac="xxord1salespricec",Dn="xx_ord1__item__c",ic="xxord1productnrcc",lc=je.defineStore("cartStore",()=>{const t=Lt(),i=Ca(),n=et(),r=e.ref(""),o=e.ref("$0"),c=e.ref("$0"),f=e.ref(null),x=e.ref({}),y=e.ref({}),u=e.ref({}),s=e.ref(""),_=e.ref(""),a=e.ref({}),h=e.ref(""),d=e.ref(""),p=e.ref({});async function l(){B()}async function g(){try{let I=await window.salesforceConnector.getProductCount(t.quoteId);if(I=Ue(I),I!=null&&I.errorMessage){n.handleError(I.errorMessage);return}return r.value=I,I}catch{n.handleError("Failed to get Product Count. Please try again.")}}async function m(){try{let I=await window.salesforceConnector.getQuoteTotal(t.quoteId);if(I=Ue(I),I!=null&&I.errorMessage){n.handleError(I.errorMessage);return}return c.value=I.monthlyTotal,o.value=I.onetimeTotal,I}catch{n.handleError("Failed to get Total Amount. Please try again.")}}async function b(I,A,k,N=""){if(!t.sectionDataMap.get(k).parentQLIs[A].removingItem){t.sectionDataMap.get(k).parentQLIs[A].removingItem=!0,d.value=I.id,await v(I.id)==="Success"&&(t.fetchAllQuoteLineItems(),N&&N(I,A,k));let L=t.sectionDataMap.get(k).parentQLIs.filter(M=>M[Dn]===I[Dn]).length;d.value="",i.lstItems.forEach(M=>{M[Dn]===I[Dn]&&(M.addedToQuote===!0&&(M.addedToQuote=!1),L===0&&(M.removedFromQuote=!0))})}}async function v(I){try{let A=await window.salesforceConnector.deleteQLI(I);if(A!=null&&A.errorMessage){n.handleError(A.errorMessage);return}return g(),m(),A}catch{n.handleError("Failed to remove Quote Item. Please try again.")}}function C(I){var N,V;const A=(N=I==null?void 0:I[ic])==null?void 0:N.match(/\.\d+/);A&&(A.value=A[0].length-1);const k=(V=I==null?void 0:I[ac])==null?void 0:V.match(/\.\d+/);return k&&(k.value=k[0].length-1),A||k}function B(I=!0){g(),m(),I&&t.fetchTemplates(oc).then(()=>{t.getFilteredListWithFields()})}function w(I){const A=t.sectionDataMap;for(const[,k]of A.entries())k.parentQLIs.forEach(N=>{N.id===I.id&&(k.columns.forEach(V=>{if(V.dataType==="CURRENCY"){const L=V.field.replace(/_/g,"");N[L]=S(N[L],I[V.field])}}),I!=null&&I.billingPeriodValue&&(I!=null&&I.formattedBillingPeriodValue)&&(N.formattedBillingPeriodValue=S(N.formattedBillingPeriodValue,I.billingPeriodValue)),I!=null&&I.oneTimeValue&&(I!=null&&I.formattedOneTimeValue)&&(N.formattedOneTimeValue=S(N.formattedOneTimeValue,I.oneTimeValue)))})}function S(I,A){const k=Number(A);if(isNaN(k))return I;const N=I.match(/(\d[\d,]*)(\.\d+)?/);if(!N)return I;const V=N[2]||"",L=V.length?V.length-1:0,M=k.toLocaleString("en-US",{minimumFractionDigits:L,maximumFractionDigits:L});return I.replace(N[1]+V,M)}return{initializeCart:l,loadCartState:B,productCount:r,onetimeTotal:o,monthlyTotal:c,filterCartItem:f,billingPeriodValue:s,hasOneTimeValue:_,hasBillingPeriodInList:x,oneTimeFieldAvailable:y,billingPeriodFieldAvailable:u,priceDecimalPrecision:a,cartItemUpdatingId:h,removingItemLoaderId:d,cartItemColumnsMap:p,getProductCount:g,getQuoteTotal:m,removeItem:b,removeQuoteItem:v,getDecimalPrecisionFromSalesPriceOrNRC:C,updateFormattedValues:w,formateCurrencyValue:S}}),sc=t=>[{title:"Apply Discount",subOptions:[...t.map(i=>`Apply Discount on ${i} for `),"Show Maximum discount allowed","Apply Maximum Discount Allowed",...t.map(i=>`Apply Discount on ${i} for a specific total`)]},{title:"Update Fields",subOptions:["Update the price of","Update the quantity of","Update the term start date to","Update the term end date to","Update the line description for"]},{title:"Price Ramp",subOptions:["Add a price ramp for"]}],cc={salesforceUserLocale:"en_US",chatRoomId:"00DA0000000cDUJMA2__0052G00000AHBNAQA5__a0jKb000004VSaMIAW",status:"SUCCESS",statusCode:200,requestId:"9b1d1f0a9f07aa6cdc",errorMessage:"",payload:{uiModification:{addColumn:[],removeColumn:[],filter:[],groupBy:[{sectionName:"MRC $50 and Above",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"greater or equal",value:"50"}],tableId:"4vIEgoK5CbSPrLYPbq"},{sectionName:"MRC Below $50",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"less than",value:"50"}],tableId:"BlOPCp7eLBCZ84nDT2"}],showOptions:!0}},agentResponse:{role:"agent",requestId:"9b1d1f0a9f07aa6cdc",content:"Grouped the quote items into two sections: one for MRC $50 and above, and another for MRC below $50.",error:!1,epoch:1759936160464,isDML:!1},redirectObjects:{qliId:"",itemId:"",componentName:"QuoteItem"},actionFunction:"Reload",links:[{action:"quoteDocument",label:"Quote Document"},{action:"addProducts",label:"Add Products"}]},dc=[{label:"Line Description",field:"xx_ord1__line_description__c",isEditable:!0,dataType:"STRING"},{label:"QTY",field:"xx_ord1__qty__c",isEditable:!0,dataType:"DOUBLE"},{label:"Extended Price",field:"xx_ord1__extended_price__c",isEditable:!1,dataType:"CURRENCY"},{label:"Billing Period",field:"xx_ord1__billing_period__c",isEditable:!0,dataType:"PICKLIST",picklistValues:["Monthly","Quarterly","Yearly"]}],Lt=je.defineStore("quote",()=>{const t=et(),i=lc(),n=un(),r=e.ref(""),o=e.ref(""),c=e.ref(0),f=e.ref(""),x=e.ref([]),y=e.ref({template:!0,filteredList:!1}),u=e.ref(null),s=e.ref(new Map),_=e.ref({}),a=e.ref(!1),h=e.ref(!0),d=e.ref(!1),p=e.ref({text:"Hide Options",altText:"Show Options",handler:()=>{h.value=!h.value,S()},color:"#136E05",isActive:!1}),l=e.computed(()=>{const F=Array.from(s.value.values()).map(E=>E.sectionName);return sc(F)});e.watch(f,()=>{y.value.template||w()});function g(){const F=new Map,E=[];for(const[D,P]of s.value.entries())F.set(D,P.selected),E.push(P);const T=JSON.parse(JSON.stringify(E));return T.forEach(D=>{delete D.selected;const P=new Map,X=[];D.lineItems.forEach(q=>{q.Selected=F.get(D.tableId).get(q.id)||!1,q.xx_ord1__parent_qli__c?(P.has(q.xx_ord1__parent_qli__c)||P.set(q.xx_ord1__parent_qli__c,[]),P.get(q.xx_ord1__parent_qli__c).push(q)):X.push(q)}),D.lineItems=X.map(q=>({...q,options:P.get(q.id)||[]})),delete D.loading,delete D.parentQLIs,delete D.totalValues}),{showOptions:h.value,sections:T,templateId:f.value}}async function m(F){try{let E=await window.salesforceConnector.getPrimaryQuote(F);E=Ue(E),E!==void 0&&(console.info("getPrimaryQuote",JSON.stringify(E)),r.value=E.recordId,console.info("quoteId",r.value),o.value=E.name,f.value=E==null?void 0:E.templateId,c.value=(E==null?void 0:E.lineItemsCount)||0)}catch(E){t.handleError(E.message),console.info("[ERROR]: getPrimaryQuote() error = ",E)}}async function b(F){var E,T;try{y.value.template=!0;let D=await window.salesforceConnector.fetchContentTemplates(JSON.stringify({lstObjectName:[F],templateType:"Document",templateId:null,fetchOnlyDefault:!1}));D=Ue(D);const P=D==null?void 0:D.templates[F];return f.value||(f.value=(E=P.find(X=>X.XX_ORD1__Default__c))==null?void 0:E.Id),f.value||(f.value=(T=P[0])==null?void 0:T.Id),x.value=P,y.value.template=!1,x.value}catch(D){t.handleError(D.message),console.info("[ERROR]: fetchTemplates() error = ",D)}}function v(F){if(!F)return null;const E=/\{!\$(\w+):([\w.]+)\}/,T=F.match(E);return T?{function:T[1],apiname:T[2].split(".")[1]}:null}async function C(F){try{const E={Id:r.value,XX_ORD1__Document_Template__c:F};return await window.salesforceConnector.updateQuote(JSON.stringify([E]))}catch(E){t.handleError(E.message),console.info("[ERROR]: updateQuote() error = ",E)}}async function B(){try{y.value.filteredList=!0;let F=await window.salesforceConnector.getQuoteEPageLayout();s.value.clear(),i.cartItemColumnsMap={},F=Ue(F);const E=F.map(D=>({label:D.fieldLabel,field:D.fieldName.toLowerCase(),isEditable:D.isEditable,dataType:D.dataType,...D.picklistValues?{picklistValues:D.picklistValues}:{}})),T=Dt();return s.value.set(T,{loading:!0,lineItems:[],parentQLIs:[],columns:E,tableId:T,sectionName:"All Rows",selected:new Map,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}),i.cartItemColumnsMap[T]=E,p.value.isActive=!1,h.value=!0,u.value={lstCB:[{columns:E,footer:null,title:"All Rows",sectionName:"All Rows",tableId:T,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}]},S(),y.value.filteredList=!1,F}catch(F){t.handleError(F.message),console.info("[ERROR]: getQuoteEPageLayout() error = ",F)}}async function w(){if(x.value.length===0){B();return}try{y.value.filteredList=!0;let F=await window.salesforceConnector.getFilteredListWithFields(JSON.stringify({templateId:f.value}));C(f.value),F=Ue(F),console.info("res.lstCB = ",F.lstCB);const E=F==null?void 0:F.objectFieldsMap;return s.value.clear(),i.cartItemColumnsMap={},F.lstCB=F.lstCB.map(T=>{const{fields:D,filters:P,primarysort:X,primarysortdesc:q}=JSON.parse(T.XX_ORD1__Block_Properties__c),z=D.map($=>{var j;return{label:(j=E[$.api])==null?void 0:j.label,field:$.api.toLowerCase(),isEditable:$.api.includes(".")?!1:E[$.api].isEditable,dataType:E[$.api].dataType,...E[$.api].picklistValues?{picklistValues:E[$.api].picklistValues}:{}}}),R=T.Id||Dt();return s.value.set(R,{loading:!0,lineItems:[],parentQLIs:[],columns:z,tableId:R,sectionName:T.Name,selected:new Map,footer:v(T.XX_ORD1__Table_Footer_HTML__c),filters:P,primarysort:X,primarysortdesc:q}),i.cartItemColumnsMap[R]=z,p.value.isActive=!1,h.value=!0,{columns:z,footer:v(T.XX_ORD1__Table_Footer_HTML__c),title:T.Name,sectionName:T.Name,tableId:R,filters:P,primarysort:X,primarysortdesc:q}}),u.value=F,S(),y.value.filteredList=!1,F}catch(F){t.handleError(F.message),console.info("[ERROR]: getFilteredListWithFields() error = ",F)}}async function S(F=!0){const E=[];for(const[T]of s.value)E.push(k(T,F));return await Promise.all(E),i.getProductCount(),!0}function I(F,E){return s.value.get(F).columns.some(T=>T.field.toLowerCase()===E)||i.cartItemColumnsMap[F].some(T=>T.field.toLowerCase()===E)}function A(F,E){let T=In(F);const D=n.pricingSchema,P=I(E,"xx_ord1__nrc__c"),X=I(E,"xx_ord1__sales_price__c"),q=I(E,"xx_ord1__qty__c");return T=T.map(z=>{let R={};D==="nrc/mrc"&&(z!=null&&z.xx_ord1__billing_period__c)?R={...X?{billingPeriodValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?"0":(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:z==null?void 0:z.xxord1salespricec}:{},...P?{oneTimeValue:(z==null?void 0:z.xx_ord1__nrc__c)===0?"0":(z==null?void 0:z.xx_ord1__nrc__c)||null,formattedOneTimeValue:z==null?void 0:z.xxord1nrcc}:{}}:D==="nrc/mrc"&&!(z!=null&&z.xx_ord1__billing_period__c)?X&&(R={oneTimeValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?"0":(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedOneTimeValue:z==null?void 0:z.xxord1salespricec}):D!=="nrc/mrc"&&(z!=null&&z.xx_ord1__billing_period__c)?X&&(R={billingPeriodValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?"0":(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:z==null?void 0:z.xxord1salespricec}):D!=="nrc/mrc"&&!(z!=null&&z.xx_ord1__billing_period__c)&&X&&(R={oneTimeValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?0:(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedOneTimeValue:z==null?void 0:z.xxord1salespricec});const{xx_ord1__qty__c:$,xx_ord1__sales_price__c:j,xx_ord1__nrc__c:U,...Q}=z,Y={...Q,id:z.id,description:(z==null?void 0:z.xx_ord1__line_description__c)||"",xx_ord1__billing_period__c:z==null?void 0:z.xx_ord1__billing_period__c,...q?{xx_ord1__qty__c:$}:{},xx_ord1__item__c:z==null?void 0:z.xx_ord1__item__c,"xx_ord1__item__r.xx_ord1__decimal_precision__c":z["xx_ord1__item__r.xx_ord1__decimal_precision__c"]||"0",...R};return Y!=null&&Y.billingPeriodValue&&(i.hasBillingPeriodInList[E]=!0,i.billingPeriodValue=Y==null?void 0:Y.xx_ord1__billing_period__c),"oneTimeValue"in Y&&(i.oneTimeFieldAvailable[E]=!0),"billingPeriodValue"in Y&&(i.billingPeriodFieldAvailable[E]=!0),(Y==null?void 0:Y.oneTimeValue)!==""&&(Y==null?void 0:Y.oneTimeValue)!==null&&(i.hasOneTimeValue=!0),Y}),T}async function k(F,E=!0){var T,D;try{const P=s.value.get(F);if(console.info("sectionData = ",P.sectionName),!P)return;P.loading=E,E&&(P.lineItems=[]);const{columns:X,filters:q,primarysort:z,primarysortdesc:R,footer:$}=P,j=X.map(se=>se.field.toLowerCase());j.includes("xx_ord1__parent_qli__c")||j.push("xx_ord1__parent_qli__c"),j.includes("xx_ord1__item__c")||j.push("xx_ord1__item__c"),j.includes("xx_ord1__sys_configuration_status2__c")||j.push("xx_ord1__sys_configuration_status2__c"),(T=i.cartItemColumnsMap[F])==null||T.forEach(se=>{j.includes(se.field)||j.push(se.field)});const U=await N({fields:j,recordId:r.value,filters:q||[],primarySortBy:z||"",primarySortOrder:R?"DESC":"ASC",includeOptions:h.value,totalFields:$?[$.apiname]:[]}),Q=U.lineItems,Y=new Map;let ne=[];const ce=(D=U.fieldTotals)==null?void 0:D.map(se=>se.totalValue);Q.forEach(se=>{se.XX_ORD1__Parent_QLI__c?Y.has(se.XX_ORD1__Parent_QLI__c)?Y.get(se.XX_ORD1__Parent_QLI__c).push(se):Y.set(se.XX_ORD1__Parent_QLI__c,[se]):ne.push(se)});const fe=[];return ne.forEach(se=>{fe.push(se),Y.has(se.Id)&&fe.push(...Y.get(se.Id))}),ne=A(ne,F),P.lineItems=In(fe),P.parentQLIs=ne,P.totalValues=ce,P.loading=!1,s.value=new Map(s.value),fe}catch(P){console.info("[ERROR]: fetchQuoteLineItems()123 error = ",P.message);const X=s.value.get(F);X&&(X.loading=!1)}}async function N(F){try{let E=await window.salesforceConnector.getQuoteLineItemsWithFilteredTable(JSON.stringify(F));return E=Ue(E),E}catch(E){t.handleError(E.message),console.info("[ERROR]: getQuoteLineItemsWithFilteredTable() error = ",E)}}async function V(F){try{console.info("updateQli() payload = ",F);let E=await window.salesforceConnector.updateQli(JSON.stringify(F));return E=Ue(E),S(!1),E}catch(E){t.handleError(E.message),console.info("[ERROR]: updateQli() error = ",E)}}async function L(F){try{let E=await window.salesforceConnector.deleteQLI(F);return E=Ue(E),S(),E}catch(E){t.handleError(E.message),console.info("[ERROR]: deleteQLI() error = ",E)}}async function M(F,E){try{a.value=!0;const T={fields:F};E&&(T.objectName=E),F.includes("xx_ord1__qty__c")&&E==="xx_ord1__ecatalog_item__c"&&(T.fields=T.fields.filter(P=>P!=="xx_ord1__qty__c")),F.includes("xx_ord1__sales_price__c")&&E!=="xx_ord1__quote_line_item__c"&&(T.fields=T.fields.filter(P=>P!=="xx_ord1__sales_price__c"));let D=await window.salesforceConnector.getFieldsData(JSON.stringify(T));return typeof D=="string"&&(D=JSON.parse(D)),D!=null&&D.errorMessage?(t.handleError(D.errorMessage),null):(_.value={..._.value,...D},console.info("fieldsData.value = ",JSON.stringify(_.value)),D)}catch(T){return t.handleError("Failed to get Fields Data. Please try again."),console.info("[ERROR]: getFieldsData() error = ",T),null}finally{a.value=!1}}function Z(F=""){var E;return!F||F.includes(".")?!1:F.includes("xx_ord1__qty__c")?!0:((E=_.value[F])==null?void 0:E.isEditable)||!1}function G(){J(cc)}async function J(F){var E,T,D,P,X,q,z,R,$;if(F.payload){if((E=F.payload)!=null&&E.uiModification){const j=F.payload.uiModification;if(((T=j.addColumn)==null?void 0:T.length)>0)if(j.addColumn.forEach(U=>{U.columns.forEach(Q=>{Q.field=Q.field.toLowerCase()})}),j.addColumn[0].sectionName==="all_section")for(const[U,Q]of s.value)Q.columns=[...Q.columns,...j.addColumn[0].columns];else j.addColumn.forEach(U=>{s.value.get(U.tableId)&&(s.value.get(U.tableId).columns=[...s.value.get(U.tableId).columns,...U.columns])});if(((D=j.removeColumn)==null?void 0:D.length)>0)if(j.removeColumn.forEach(U=>{U.columns=U.columns.map(Q=>Q.toLowerCase())}),j.removeColumn[0].sectionName==="all_section")for(const[U,Q]of s.value)Q.columns=Q.columns.filter(Y=>!j.removeColumn[0].columns.includes(Y.field));else j.removeColumn.forEach(U=>{s.value.get(U.tableId)&&(s.value.get(U.tableId).columns=s.value.get(U.tableId).columns.filter(Q=>!U.columns.includes(Q.field)))});if(((P=j.filter)==null?void 0:P.length)>0)if(j.filter[0].sectionName==="all_section")for(const[U,Q]of s.value)Q.filters=[...Q.filters,...j.filter[0].filters];else j.filter.forEach(U=>{s.value.get(U.tableId)&&(s.value.get(U.tableId).filters=[...s.value.get(U.tableId).filters,...U.filters])});if(((X=j.groupBy)==null?void 0:X.length)>0){const U=((q=[...s.value.values()][0])==null?void 0:q.columns)||dc;s.value.clear(),i.cartItemColumnsMap={},j.groupBy.forEach(Q=>{i.cartItemColumnsMap[Q.tableId]=Q.columns||U,s.value.set(Q.tableId,{loading:!0,lineItems:[],parentQLIs:[],columns:Q.columns||U,tableId:Q.tableId,sectionName:Q.sectionName,selected:new Map,footer:v(Q.footer),filters:Q.filters,primarysort:Q.primarysort,primarysortdesc:Q.primarysortdesc})})}j.showOptions!==void 0&&(h.value=j.showOptions)}if(((R=(z=F.payload)==null?void 0:z.sections)==null?void 0:R.length)>0){const j=($=F.payload)==null?void 0:$.sections;s.value.clear(),j.forEach(U=>{U.tableId||(U.tableId=Dt()),U.selected=new Map,s.value.set(U.tableId,U)}),S()}}F.actionFunction==="Reload"&&(S(),console.info("Reloading quote line items"))}async function K(F){var E,T;try{const D=new Set;for(const P of s.value.keys())(E=s.value.get(P).lineItems)==null||E.forEach(q=>{q.attributes=null,D.add(q.id)});if(F){const P={lineItemIds:[...D]},X=await window.productManagerController.getLineItemAttributes({request:JSON.stringify(P)}),q=JSON.parse(X.data);for(const z of s.value.keys())(T=s.value.get(z).lineItems)==null||T.forEach($=>{$.attributes=q[$.id]||null})}}catch(D){console.info("[ERROR]: fetchAttributesData() error = ",D)}}return{showAttributes:d,quoteId:r,quoteName:o,templateId:f,templateOptions:x,loading:y,currentTemplateData:u,fieldsData:_,fieldsDataLoading:a,showOptionHeaderButton:p,sectionDataMap:s,promptSuggestions:l,lineItemsCount:c,addColumns:G,getQuoteEPageLayout:B,getPayload:g,getPrimaryQuote:m,fetchTemplates:b,getFilteredListWithFields:w,getQuoteLineItemsWithFilteredTable:N,updateQli:V,getFieldsData:M,deleteQLI:L,performAIAction:J,isEditableField:Z,fetchQuoteLineItems:k,fetchAllQuoteLineItems:S,fetchAttributesData:K}});function Ea(t,i){return function(){return t.apply(i,arguments)}}const{toString:uc}=Object.prototype,{getPrototypeOf:vr}=Object,{iterator:Ln,toStringTag:ka}=Symbol,Fn=(t=>i=>{const n=uc.call(i);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tt=t=>(t=t.toLowerCase(),i=>Fn(i)===t),Rn=t=>i=>typeof i===t,{isArray:Yt}=Array,en=Rn("undefined");function fn(t){return t!==null&&!en(t)&&t.constructor!==null&&!en(t.constructor)&&ze(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const wa=tt("ArrayBuffer");function fc(t){let i;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?i=ArrayBuffer.isView(t):i=t&&t.buffer&&wa(t.buffer),i}const hc=Rn("string"),ze=Rn("function"),Na=Rn("number"),hn=t=>t!==null&&typeof t=="object",pc=t=>t===!0||t===!1,Pn=t=>{if(Fn(t)!=="object")return!1;const i=vr(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(ka in t)&&!(Ln in t)},mc=t=>{if(!hn(t)||fn(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},gc=tt("Date"),yc=tt("File"),xc=tt("Blob"),vc=tt("FileList"),_c=t=>hn(t)&&ze(t.pipe),bc=t=>{let i;return t&&(typeof FormData=="function"&&t instanceof FormData||ze(t.append)&&((i=Fn(t))==="formdata"||i==="object"&&ze(t.toString)&&t.toString()==="[object FormData]"))},Cc=tt("URLSearchParams"),[Ec,kc,wc,Nc]=["ReadableStream","Request","Response","Headers"].map(tt),Ac=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pn(t,i,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Yt(t))for(r=0,o=t.length;r<o;r++)i.call(null,t[r],r,t);else{if(fn(t))return;const c=n?Object.getOwnPropertyNames(t):Object.keys(t),f=c.length;let x;for(r=0;r<f;r++)x=c[r],i.call(null,t[x],x,t)}}function Aa(t,i){if(fn(t))return null;i=i.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],i===o.toLowerCase())return o;return null}const Ft=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ba=t=>!en(t)&&t!==Ft;function _r(){const{caseless:t,skipUndefined:i}=Ba(this)&&this||{},n={},r=(o,c)=>{const f=t&&Aa(n,c)||c;Pn(n[f])&&Pn(o)?n[f]=_r(n[f],o):Pn(o)?n[f]=_r({},o):Yt(o)?n[f]=o.slice():(!i||!en(o))&&(n[f]=o)};for(let o=0,c=arguments.length;o<c;o++)arguments[o]&&pn(arguments[o],r);return n}const Bc=(t,i,n,{allOwnKeys:r}={})=>(pn(i,(o,c)=>{n&&ze(o)?t[c]=Ea(o,n):t[c]=o},{allOwnKeys:r}),t),Sc=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Oc=(t,i,n,r)=>{t.prototype=Object.create(i.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:i.prototype}),n&&Object.assign(t.prototype,n)},Ic=(t,i,n,r)=>{let o,c,f;const x={};if(i=i||{},t==null)return i;do{for(o=Object.getOwnPropertyNames(t),c=o.length;c-- >0;)f=o[c],(!r||r(f,t,i))&&!x[f]&&(i[f]=t[f],x[f]=!0);t=n!==!1&&vr(t)}while(t&&(!n||n(t,i))&&t!==Object.prototype);return i},Tc=(t,i,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=i.length;const r=t.indexOf(i,n);return r!==-1&&r===n},Vc=t=>{if(!t)return null;if(Yt(t))return t;let i=t.length;if(!Na(i))return null;const n=new Array(i);for(;i-- >0;)n[i]=t[i];return n},Dc=(t=>i=>t&&i instanceof t)(typeof Uint8Array<"u"&&vr(Uint8Array)),Lc=(t,i)=>{const r=(t&&t[Ln]).call(t);let o;for(;(o=r.next())&&!o.done;){const c=o.value;i.call(t,c[0],c[1])}},Fc=(t,i)=>{let n;const r=[];for(;(n=t.exec(i))!==null;)r.push(n);return r},Rc=tt("HTMLFormElement"),Pc=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Sa=(({hasOwnProperty:t})=>(i,n)=>t.call(i,n))(Object.prototype),Mc=tt("RegExp"),Oa=(t,i)=>{const n=Object.getOwnPropertyDescriptors(t),r={};pn(n,(o,c)=>{let f;(f=i(o,c,t))!==!1&&(r[c]=f||o)}),Object.defineProperties(t,r)},qc=t=>{Oa(t,(i,n)=>{if(ze(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(ze(r)){if(i.enumerable=!1,"writable"in i){i.writable=!1;return}i.set||(i.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$c=(t,i)=>{const n={},r=o=>{o.forEach(c=>{n[c]=!0})};return Yt(t)?r(t):r(String(t).split(i)),n},jc=()=>{},Hc=(t,i)=>t!=null&&Number.isFinite(t=+t)?t:i;function Uc(t){return!!(t&&ze(t.append)&&t[ka]==="FormData"&&t[Ln])}const zc=t=>{const i=new Array(10),n=(r,o)=>{if(hn(r)){if(i.indexOf(r)>=0)return;if(fn(r))return r;if(!("toJSON"in r)){i[o]=r;const c=Yt(r)?[]:{};return pn(r,(f,x)=>{const y=n(f,o+1);!en(y)&&(c[x]=y)}),i[o]=void 0,c}}return r};return n(t,0)},Xc=tt("AsyncFunction"),Kc=t=>t&&(hn(t)||ze(t))&&ze(t.then)&&ze(t.catch),Ia=((t,i)=>t?setImmediate:i?((n,r)=>(Ft.addEventListener("message",({source:o,data:c})=>{o===Ft&&c===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Ft.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ze(Ft.postMessage)),Qc=typeof queueMicrotask<"u"?queueMicrotask.bind(Ft):typeof process<"u"&&process.nextTick||Ia,ee={isArray:Yt,isArrayBuffer:wa,isBuffer:fn,isFormData:bc,isArrayBufferView:fc,isString:hc,isNumber:Na,isBoolean:pc,isObject:hn,isPlainObject:Pn,isEmptyObject:mc,isReadableStream:Ec,isRequest:kc,isResponse:wc,isHeaders:Nc,isUndefined:en,isDate:gc,isFile:yc,isBlob:xc,isRegExp:Mc,isFunction:ze,isStream:_c,isURLSearchParams:Cc,isTypedArray:Dc,isFileList:vc,forEach:pn,merge:_r,extend:Bc,trim:Ac,stripBOM:Sc,inherits:Oc,toFlatObject:Ic,kindOf:Fn,kindOfTest:tt,endsWith:Tc,toArray:Vc,forEachEntry:Lc,matchAll:Fc,isHTMLForm:Rc,hasOwnProperty:Sa,hasOwnProp:Sa,reduceDescriptors:Oa,freezeMethods:qc,toObjectSet:$c,toCamelCase:Pc,noop:jc,toFiniteNumber:Hc,findKey:Aa,global:Ft,isContextDefined:Ba,isSpecCompliantForm:Uc,toJSONObject:zc,isAsyncFn:Xc,isThenable:Kc,setImmediate:Ia,asap:Qc,isIterable:t=>t!=null&&ze(t[Ln])};function ye(t,i,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",i&&(this.code=i),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}ee.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const Ta=ye.prototype,Va={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Va[t]={value:t}}),Object.defineProperties(ye,Va),Object.defineProperty(Ta,"isAxiosError",{value:!0}),ye.from=(t,i,n,r,o,c)=>{const f=Object.create(Ta);ee.toFlatObject(t,f,function(s){return s!==Error.prototype},u=>u!=="isAxiosError");const x=t&&t.message?t.message:"Error",y=i==null&&t?t.code:i;return ye.call(f,x,y,n,r,o),t&&f.cause==null&&Object.defineProperty(f,"cause",{value:t,configurable:!0}),f.name=t&&t.name||"Error",c&&Object.assign(f,c),f};const Zc=null;function br(t){return ee.isPlainObject(t)||ee.isArray(t)}function Da(t){return ee.endsWith(t,"[]")?t.slice(0,-2):t}function La(t,i,n){return t?t.concat(i).map(function(o,c){return o=Da(o),!n&&c?"["+o+"]":o}).join(n?".":""):i}function Gc(t){return ee.isArray(t)&&!t.some(br)}const Wc=ee.toFlatObject(ee,{},null,function(i){return/^is[A-Z]/.test(i)});function Mn(t,i,n){if(!ee.isObject(t))throw new TypeError("target must be an object");i=i||new FormData,n=ee.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,l){return!ee.isUndefined(l[p])});const r=n.metaTokens,o=n.visitor||s,c=n.dots,f=n.indexes,y=(n.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(i);if(!ee.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(ee.isDate(d))return d.toISOString();if(ee.isBoolean(d))return d.toString();if(!y&&ee.isBlob(d))throw new ye("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(d)||ee.isTypedArray(d)?y&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function s(d,p,l){let g=d;if(d&&!l&&typeof d=="object"){if(ee.endsWith(p,"{}"))p=r?p:p.slice(0,-2),d=JSON.stringify(d);else if(ee.isArray(d)&&Gc(d)||(ee.isFileList(d)||ee.endsWith(p,"[]"))&&(g=ee.toArray(d)))return p=Da(p),g.forEach(function(b,v){!(ee.isUndefined(b)||b===null)&&i.append(f===!0?La([p],v,c):f===null?p:p+"[]",u(b))}),!1}return br(d)?!0:(i.append(La(l,p,c),u(d)),!1)}const _=[],a=Object.assign(Wc,{defaultVisitor:s,convertValue:u,isVisitable:br});function h(d,p){if(!ee.isUndefined(d)){if(_.indexOf(d)!==-1)throw Error("Circular reference detected in "+p.join("."));_.push(d),ee.forEach(d,function(g,m){(!(ee.isUndefined(g)||g===null)&&o.call(i,g,ee.isString(m)?m.trim():m,p,a))===!0&&h(g,p?p.concat(m):[m])}),_.pop()}}if(!ee.isObject(t))throw new TypeError("data must be an object");return h(t),i}function Fa(t){const i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return i[r]})}function Cr(t,i){this._pairs=[],t&&Mn(t,this,i)}const Ra=Cr.prototype;Ra.append=function(i,n){this._pairs.push([i,n])},Ra.toString=function(i){const n=i?function(r){return i.call(this,r,Fa)}:Fa;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Jc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pa(t,i,n){if(!i)return t;const r=n&&n.encode||Jc;ee.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let c;if(o?c=o(i,n):c=ee.isURLSearchParams(i)?i.toString():new Cr(i,n).toString(r),c){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}class Ma{constructor(){this.handlers=[]}use(i,n,r){return this.handlers.push({fulfilled:i,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(i){this.handlers[i]&&(this.handlers[i]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(i){ee.forEach(this.handlers,function(r){r!==null&&i(r)})}}const qa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Cr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Er=typeof window<"u"&&typeof document<"u",kr=typeof navigator=="object"&&navigator||void 0,e0=Er&&(!kr||["ReactNative","NativeScript","NS"].indexOf(kr.product)<0),t0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",n0=Er&&window.location.href||"http://localhost",Pe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Er,hasStandardBrowserEnv:e0,hasStandardBrowserWebWorkerEnv:t0,navigator:kr,origin:n0},Symbol.toStringTag,{value:"Module"})),...Yc};function r0(t,i){return Mn(t,new Pe.classes.URLSearchParams,{visitor:function(n,r,o,c){return Pe.isNode&&ee.isBuffer(n)?(this.append(r,n.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...i})}function o0(t){return ee.matchAll(/\w+|\[(\w*)]/g,t).map(i=>i[0]==="[]"?"":i[1]||i[0])}function a0(t){const i={},n=Object.keys(t);let r;const o=n.length;let c;for(r=0;r<o;r++)c=n[r],i[c]=t[c];return i}function $a(t){function i(n,r,o,c){let f=n[c++];if(f==="__proto__")return!0;const x=Number.isFinite(+f),y=c>=n.length;return f=!f&&ee.isArray(o)?o.length:f,y?(ee.hasOwnProp(o,f)?o[f]=[o[f],r]:o[f]=r,!x):((!o[f]||!ee.isObject(o[f]))&&(o[f]=[]),i(n,r,o[f],c)&&ee.isArray(o[f])&&(o[f]=a0(o[f])),!x)}if(ee.isFormData(t)&&ee.isFunction(t.entries)){const n={};return ee.forEachEntry(t,(r,o)=>{i(o0(r),o,n,0)}),n}return null}function i0(t,i,n){if(ee.isString(t))try{return(i||JSON.parse)(t),ee.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const wr={transitional:qa,adapter:["xhr","http","fetch"],transformRequest:[function(i,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,c=ee.isObject(i);if(c&&ee.isHTMLForm(i)&&(i=new FormData(i)),ee.isFormData(i))return o?JSON.stringify($a(i)):i;if(ee.isArrayBuffer(i)||ee.isBuffer(i)||ee.isStream(i)||ee.isFile(i)||ee.isBlob(i)||ee.isReadableStream(i))return i;if(ee.isArrayBufferView(i))return i.buffer;if(ee.isURLSearchParams(i))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let x;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return r0(i,this.formSerializer).toString();if((x=ee.isFileList(i))||r.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Mn(x?{"files[]":i}:i,y&&new y,this.formSerializer)}}return c||o?(n.setContentType("application/json",!1),i0(i)):i}],transformResponse:[function(i){const n=this.transitional||wr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(ee.isResponse(i)||ee.isReadableStream(i))return i;if(i&&ee.isString(i)&&(r&&!this.responseType||o)){const f=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(i,this.parseReviver)}catch(x){if(f)throw x.name==="SyntaxError"?ye.from(x,ye.ERR_BAD_RESPONSE,this,null,this.response):x}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pe.classes.FormData,Blob:Pe.classes.Blob},validateStatus:function(i){return i>=200&&i<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],t=>{wr.headers[t]={}});const Nr=wr,l0=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),s0=t=>{const i={};let n,r,o;return t&&t.split(`
|
|
5
|
+
*/var xa;(function(t){t.pop="pop",t.push="push"})(xa||(xa={}));var va;(function(t){t.back="back",t.forward="forward",t.unknown=""})(va||(va={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var _a;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_a||(_a={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const Zs=Symbol(process.env.NODE_ENV!=="production"?"router":""),Gs=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function dn(){return e.inject(Zs)}function Ws(){return e.inject(Gs)}function Ue(t){if(typeof t=="string"&&(t=JSON.parse(t)),t!=null&&t.errorMessage)throw new Error(t==null?void 0:t.errorMessage);return t}const xr={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__sales_price__c:"xx_ord1__negotiated_price__c",xx_ord1__nrc__c:"xx_ord1__nrc_for_new__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price__c:"xx_ord1__list_price2__c",xx_ord1__cost__c:"xx_ord1__cost2__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},ba={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__negotiated_price__c:"xx_ord1__sales_price__c",xx_ord1__nrc_for_new__c:"xx_ord1__nrc__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price2__c:"xx_ord1__list_price__c",xx_ord1__cost2__c:"xx_ord1__cost__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},Js=t=>{var n;let i=[];for(let r of t)if(r.trim()!=="xx_ord1__item__r.xx_ord1__decimal_precision__c")if(r.includes(".")){let c=r.split(".")[0];c=c.slice(0,-1)+"c";const f=((n=xr[c==null?void 0:c.toLowerCase()])==null?void 0:n.trim())||"";f&&(i.includes(f)||i.push(f||""),i.push(r))}else i.includes(xr[r==null?void 0:r.toLowerCase()])||i.push(xr[r==null?void 0:r.toLowerCase()]||"");return i.filter(r=>r!=="")},Ys=je.defineStore("actions",()=>{const t=Vn(),i=Lt(),n=e.ref(!1);return{openAdaptiveSearch:(x,y=!1)=>{console.info("openAdaptiveSearch",x),t.chatHistory[t.chatHistory.length-1].links=[],t.sendMessage("Open Adaptive Search",!1,{internalCall:!0}),n.value=y},openQuoteItem:x=>{console.info("openQuoteItem",x),t.chatHistory[t.chatHistory.length-1].links=[],t.sendMessage("Open Quote Item",!1,{internalCall:!0})},openQuoteDocument:x=>{console.info("openQuoteDocument",x),t.chatHistory[t.chatHistory.length-1].links=[],t.chatHistory.push({type:"response",message:"Opening quote document",loading:!0});const u=`/apex/XX_ORD1__Expedite_Commerce?scpq=true&oid=${i.quoteId}&atpverified=true&ecCache=false&origin=AI`;window.location.href=`${ds(window.location.href)}${u}`},undo:()=>{const x=t==null?void 0:t.latestDMLRequest;t.sendMessage(`UNDO-${x}`,!1,{internalCall:!0})},isStaticActionCall:n}}),Ca=je.defineStore("adaptiveSearch",()=>{const t=Lt(),i=un(),n=Vn(),r=Ys(),o=e.ref(null),c=e.ref(null),f=e.ref(!1),x=e.ref(!1),y=e.ref([]),u=e.ref(""),s=e.ref(!1),_=e.ref(null),a=e.ref(!1),h=e.ref([]),d=et(),p=e.ref([]),l=e.ref(0),g=e.ref(!1),m=e.ref({rowLimt:10,paging:!0,offset:0,currentPage:1,totalPages:1});async function b(){f.value=!0;try{const E=JSON.stringify({layoutType:"Search Selection",layoutObject:"xx_ord1__ecatalog_item__c"});let T={};return T=await window.salesforceConnector.getDynamicPageLayout(E),c.value=ma(T,"Unable to find the Search Selection Layout for your user profile"),m.value.rowLimt=c.value.configuration.rowLimit||10,c.value.configuration.columns.forEach(D=>{!D.field&&D.label==="QTY"&&(D.field="xx_ord1__qty__c")}),f.value=!1,v(),T}catch(E){f.value=!1,d.handleError("Failed to get Adaptive Search Layout. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",E)}}function v(){var E,T,D;_.value=(D=(T=(E=c.value)==null?void 0:E.configuration)==null?void 0:T.dynamicFilters)==null?void 0:D.filters.map(P=>({...P,field:P.field.toLowerCase(),filtervalue:P.filtervalue||[],filtervaluefrom:P.filtervaluefrom||"",filtervalueTo:P.filtervalueTo||""}))}function C(){var T;let E=[];for(const D of c.value.configuration.columns){let P=D.field;if(E.includes(P)||E.push(P),P!=null&&P.includes(".")){let q=P.split(".")[0];q=q.slice(0,-1)+"c",E.includes(q)||E.push(q)}}return(T=c.value.configuration)!=null&&T.cardHeader&&E.push(c.value.configuration.cardHeader.imageField),c.value.configuration.objectName.toLowerCase()==="xx_ord1__ecatalog_item__c"&&E.push("xx_ord1__item__r.xx_ord1__decimal_precision__c"),E=E.filter(D=>!!D),E.filter(D=>D.toLowerCase()!=="xx_ord1__qty__c"&&D.toLowerCase()!=="xx_ord1__competitor_sku__c")}function B(E,T=!1){if(!E||E.includes("undefined"))return!1;const D=/[!@#$%^&*()+=[\]{};':"\\|.<>/?]+/;if(T){const P=Array.isArray(E)?E:E.split(",");for(const X of P){const q=X.trim();if(D.test(q))return d.handleError(`Invalid character found in value: ${q}`),!1}}else if(D.test(E))return d.handleError("Special characters are not allowed in filter values"),!1;return!0}function w(E,T){return{field:E.field,operator:E.operator||"contains",value:T,dataType:E.dataType.trim()}}function S(E){if(!E.filtervalue)return null;const T=Array.isArray(E.filtervalue),D=T?E.filtervalue.join(","):E.filtervalue.trim();return B(D,T)?D:null}function I(E){var X,q;const T=(X=E.filtervaluefrom)==null?void 0:X.trim(),D=(q=E.filtervalueTo)==null?void 0:q.trim();if(!T||!D)return null;const P=`${T}, ${D}`;return P!==", "&&B(P)?P:null}function A(E){const T=`${pa(E.filtervaluefrom)}, ${pa(E.filtervalueTo)}`;return T!==", "&&B(T)?T:null}function k(E){var D;const T=(D=E.filtervaluefrom)==null?void 0:D.trim();return B(T)?T:null}function N(E){const T=[];return E.forEach(D=>{const P=D.dataType.trim();let X=null;switch(P){case"PICKLIST":case"MULTIPICKLIST":X=S(D);break;case"DOUBLE":case"CURRENCY":X=I(D);break;case"DATETIME":case"DATE":X=A(D);break;default:X=k(D)}X&&T.push(w(D,X))}),h.value=T,T}async function V(E="",T=[],D=[]){var X,q,z,R,$,j,U,Q,Y,ne;let P=[];if(T.length&&(P=N(T)),!P.length&&E.trim()===""){y.value=[],s.value=!1;return}try{s.value=!1,x.value=!0;const se=E.trim();D.length||(D=C());const he={fields:D,...T.length?{dynamicFilters:P}:{},searchText:se||u.value.trim(),accountId:i.accountId,...i.eCatalogId?{catalogId:i.eCatalogId}:{},...i.objectType==="opportunity"?{opportunityId:i.id}:{},...(q=(X=c.value)==null?void 0:X.configuration)!=null&&q.sort?{primarySortBy:c.value.configuration.sort.primary.field,primarySortOrder:c.value.configuration.sort.primary.direction,secondarySortBy:c.value.configuration.sort.secondary.field,secondarySortOrder:c.value.configuration.sort.secondary.direction}:{},rowLimt:(R=(z=c.value)==null?void 0:z.configuration)==null?void 0:R.rowLimit,paging:(j=($=c.value)==null?void 0:$.configuration)==null?void 0:j.paging,...((U=m.value)==null?void 0:U.offset)!==0?{offset:m.value.offset}:{},objectName:(Y=(Q=c.value)==null?void 0:Q.configuration)==null?void 0:Y.objectName,currencyCode:i.currencyCode},ce=await window.salesforceConnector.getItems(JSON.stringify(he));if(ce!=null&&ce.errorMessage){d.handleError(ce.errorMessage);return}ce!=null&&ce.itemCount&&(m.value.totalPages=Math.ceil((ce==null?void 0:ce.itemCount)/m.value.rowLimt)),y.value=In(ce.lstItems,{xx_ord1__qty__c:"1"}),(ne=ce.lstItems)!=null&&ne.length||(s.value=!0),x.value=!1}catch(se){d.handleError("Failed to fetch Results. Please try again."),x.value=!1,console.info("[ERROR]: Adaptive Search getItems() error = ",se)}}async function L(E){try{a.value=!0;const T=JSON.stringify({lstQLIRequest:M(E),quoteId:t.quoteId});let D=await window.salesforceConnector.createQLI(T);typeof D=="string"&&(D=JSON.parse(D));let P=!1;if((D==null?void 0:D.length)>0&&D.forEach(X=>{X.errorMessage&&(P=!0,d.handleError(X.errorMessage))}),a.value=!1,P){p.value=D;const X=p.value.reduce((q,z)=>(q[z.eCatalogItemId]=z.errorMessage,q),{});y.value=y.value.map(q=>({...q,backendError:X[q.Id]||""}));return}return D}catch(T){d.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addToQuote() error = ",T)}}function M(E){const T=[];for(const D of E)if(!D.addedToQuote&&D.id){const P=Z(D);l.value++,T.push({fields:P,recordId:D.id,...E.length===1?{maxSequenceNumber:l.value}:{}})}return T}function Z(E){const T=[],D=G();return Object.keys(E).forEach(P=>{if(D.includes(P)){const X=ba[P.toLowerCase()];X&&T.push({fieldname:X,value:E[P]})}}),T}function G(){const E=[];return c.value.configuration.columns.forEach(T=>{T.field&&!T.field.includes(".")&&T.isEditable&&T.visible&&E.push(T.field)}),E}function J(){var T,D;const E=[];return c.value.configuration.columns.forEach(P=>{const X=P.field.toLowerCase();E.includes(X)||E.push(X)}),(T=c.value.configuration)!=null&&T.dynamicFilters&&c.value.configuration.dynamicFilters.filters.forEach(P=>{const X=P.field.toLowerCase();E.includes(X)||E.push(X)}),(D=c.value.configuration)!=null&&D.cardHeader&&E.push(c.value.configuration.cardHeader.imageField),E}async function K(){var D;const E=J(),T=((D=c.value.configuration)==null?void 0:D.saveObjectName)||c.value.configuration.objectName;if(T==="xx_ord1__ecatalog_item__c"){const P=E.indexOf("xx_ord1__qty__c");P>-1&&E.splice(P,1)}await t.getFieldsData(E,T),t.fieldsData.xx_ord1__qty__c||t.getFieldsData(["xx_ord1__qty__c"],"xx_ord1__quote_line_item__c")}async function F({searchTerm:E="",filters:T=[]}={}){if(g.value=!0,E&&(u.value=E),T.length&&(h.value=T),await b()){await K(),g.value=!1;const P=u.value;P&&(u.value=P,await V(P,t.dynamicFilters)),console.info("actionStore.isStaticActionCall = ",r.isStaticActionCall),r.isStaticActionCall&&(r.isStaticActionCall=!1,n.chatHistory[n.chatHistory.length-1]={type:"response",message:"Adaptive search is now open. Please search for the products you require and add it quote",loading:!1,links:[{action:"quoteItem",label:"Quote Item"},{action:"quoteDocument",label:"Quote Document"}]})}g.value=!1}return{selectedItem:o,AdaptiveSearchLayout:c,searchText:u,loadingAdaptiveLayout:f,getAdaptiveSearchLayout:b,getItems:V,lstItems:y,rowItemsLoading:x,noSearchRecords:s,dynamicFilters:_,setDynamicFilters:v,createQliErrors:p,addToQuote:L,addingToQuote:a,getFieldsData:K,pagingData:m,appliedDynamicFilters:h,maxSequenceNumber:l,loadingAdaptiveSearch:g,initAdaptiveSearch:F}}),ec=je.defineStore("quickSelection",()=>{const t=et(),i=un(),n=Lt(),r=e.ref(null),o=e.ref(!1),c=e.ref([]),f=e.ref([]),x=e.ref(!1),y=e.ref({}),u=e.ref({rowLimit:10,paging:!0,offset:0,currentPage:1,totalPages:1}),s=e.ref(!1);async function _(){o.value=!0;try{const C=JSON.stringify({layoutType:"Quick Selection",layoutObject:"xx_ord1__ecatalog_item__c",...i.objectType?{contextObject:i.objectType}:{}});let B={};B=await window.salesforceConnector.getDynamicPageLayout(C),r.value=ma(B,"Unable to find the Quick Selection Layout for your user profile"),console.info("quickSelectionLayout.value = ",r.value),u.value.rowLimit=r.value.configuration.rowLimit||10,r.value.data.columns.forEach(w=>{!w.field&&w.label==="QTY"&&(w.field="xx_ord1__qty__c")}),o.value=!1}catch(C){o.value=!1,t.handleError("Failed to get Page structure data. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",C)}}function a(){const C=new Map;return r.value.data.columns.forEach(B=>{C.set(B.field,!0)}),r.value.data.searchResultColumns.forEach(B=>{C.set(B.field,!0)}),Array.from(C.keys())}async function h(C){var B,w;try{let S=await window.salesforceConnector.saveCompetitorSKU(C);if(S!=null&&S.errorMessage){t.handleError(S.errorMessage);return}if((B=S[0])!=null&&B.errorMessage){t.handleError((w=S[0])==null?void 0:w.errorMessage);return}return S}catch(S){t.handleError("Failed to Match Item. Please try again."),console.info("[ERROR]: saveCompetitorSKU() error = ",S)}}async function d(C="",B=[]){try{let w=r.value.data,S=r.value.configuration;const I=C.trim();if(console.info("searchTextValue.trim() = ",C.trim()),!I)return[];let A=null;console.info("useMappings = ",s.value),s.value?A=Js(p()):A=p(),console.info("fields before filter = ",A),A=A.filter(L=>L!=="xx_ord1__qty__c"),console.info("fields after filter = ",A);const k={fields:A,...B.length?{dynamicFilters:n.getDynamicFilters(B)}:{},searchText:I,accountId:i.accountId,...i.eCatalogId?{catalogId:i.eCatalogId}:{},...i.objectType==="opportunity"?{opportunityId:i.id}:{},...w!=null&&w.sort?{primarySortBy:w.sort.primary.field,primarySortOrder:w.sort.primary.direction,secondarySortBy:w.sort.secondary.field,secondarySortOrder:w.sort.secondary.direction}:{},rowLimt:(S==null?void 0:S.rowLimit)||20,paging:(S==null?void 0:S.paging)||!1,...u.value.offset!==0?{offset:u.value.offset}:{},objectName:w.objectName,currencyCode:i.currencyCode};console.info("getQuickSelectionItems payload = ",JSON.stringify(k));const N=await window.salesforceConnector.getItems(JSON.stringify(k));if(console.info("getQuickSelectionItems Res = ",JSON.stringify(N)),N!=null&&N.errorMessage){t.handleError(N.errorMessage);return}return N!=null&&N.itemCount&&(u.value.totalPages=Math.ceil((N==null?void 0:N.itemCount)/u.value.rowLimit)),In(N.lstItems,{xx_ord1__qty__c:"1"})}catch(w){t.handleError("Failed to fetch Results. Please try again."),console.info("[ERROR]: getQuickSelectionItems() error = ",w)}}function p(){let C=[];for(const B of r.value.data.columns){let w=B.field;if(w!=null&&w.includes(".")){C.includes(w)||C.push(w);let I=w.split(".")[0];I=I.slice(0,-1)+"c",C.includes(I)||C.push(I)}else C.includes(w)||C.push(w)}return console.info("getAllQuickSelectionFields() fields = ",C),C.filter(B=>B.toLowerCase()!=="xx_ord1__qty__c")}async function l(C,B,w,S){console.info("searchText:",JSON.stringify(C)),console.info("row:",JSON.stringify(B)),console.info("rowIndex:",JSON.stringify(w)),console.info("column:",JSON.stringify(S));const I=w+(u.value.currentPage-1)*u.value.rowLimit;if(S.field.toLowerCase().includes("xx_ord1__item__r")){if(c.value[I].itemLookupLoading=!0,s.value=!0,f.value=await d(C),f.value.length>0){const A=[];for(let k=0;k<f.value.length;k++)c.value[I].itemDataRetrieved=!0,f.value[k].xx_ord1__item__c&&A.push({name:f.value[k]["xx_ord1__item__r.name"],value:f.value[k].xx_ord1__item__c,label:f.value[k][S.field.toLowerCase()]});c.value[I][S.field.toLowerCase()+"_options"]=A}c.value[I].itemLookupLoading=!1}else if(S.field.toLowerCase().includes("xx_ord1__competitor_item__r")){c.value[I].competitorLookupLoading=!0;const A=await g(C);A!=null&&A.items&&(c.value[I][S.field.toLowerCase()+"_options"]=A.items.map(k=>({name:k.fields[2].value,value:k.fields[1].value,label:k.fields[0].value}))),c.value[I].competitorLookupLoading=!1,console.info("getLookupData:: Search Lookup Handler Response = ",A)}}async function g(C){var w,S;console.info("getLookupData() searchText = ",C);const B={searchText:C,obj:"xx_ord1__competitor_item__c",filters:null,displayFields:["xx_ord1__sku__c"]};try{let I=await window.salesforceConnector.getLookupData(JSON.stringify(B));if(typeof I=="string"&&(I=JSON.parse(I)),I!=null&&I.errorMessage){t.handleError(I.errorMessage);return}if((w=I[0])!=null&&w.errorMessage){t.handleError((S=I[0])==null?void 0:S.errorMessage);return}return I}catch(I){t.handleError("Failed to Search For Item. Please try again."),console.info("[ERROR]: getLookupData() error = ",I)}}async function m(C,B){var S;console.info("Update Other Fields Value = ",C),console.info("Update Other Fields Row Index = ",B);const w=B+(u.value.currentPage-1)*u.value.rowLimit;console.info("actualRowIndex = ",w);try{if(C){const I=f.value.filter(A=>A.xx_ord1__item__c===C)[0];if(I){x.value=!0;const A=r.value.data.columns[1].field;c.value[w][A]&&await b(I,w),(S=c.value[w])!=null&&S.itemDataRetrieved&&(c.value[w].status="New Match Requested",c.value[w].noMatchCleared=!0),Object.keys(I).forEach(k=>{const N=ba[k.toLowerCase()];console.info("Mapped Key = ",N),N&&(c.value[w][N]=I[k])}),x.value=!1}else c.value[w].status=""}else c.value[w].status="No Match"}catch(I){t.handleError("Unable to request a match for this item please try again."),console.info("Error in updateOtherFields = ",I)}}async function b(C,B){const w=c.value[B],S=r.value.data.columns[1].field,I=[{sku:w[S],name:w[S],productDescription:w.xx_ord1__line_description__c||"",productURL:null,status:"Match Requested",competitorAccountId:null,itemId:C.xx_ord1__item__c}];let A=await h(JSON.stringify(I));console.info("Match Item: ",JSON.stringify(A)),c.value[B][`${S}_options`]=[{value:A[0].competitorItemId,label:A[0].sku}],c.value[B][S]=A[0].competitorItemId}async function v(C){try{let B=await window.salesforceConnector.createQLI(JSON.stringify(C));typeof B=="string"&&(B=JSON.parse(B));let w=!1;if((B==null?void 0:B.length)>0)for(let S=0;S<B.length;S++)B[S].errorMessage&&(w=!0,B[S].errorMessage.includes("Line Description: data value too large")&&(B[S].errorMessage="Error: The description is too long—it must be under 200 characters."));if(w){B.forEach(S=>{y.value[S.eCatalogItemId]=S});return}else y.value=[];return B}catch(B){t.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addAllItemsToQuote() error = ",B)}}return{quickSelectionLayout:r,quickSelectionLayoutLoading:o,processedRecords:c,useMappings:s,currentSearchData:f,createQliErrors:y,getQuickSelectionLayout:_,getAllFieldsForQuickSelectionLayout:a,saveCompetitorSKU:h,getQuickSelectionItems:d,searchLookupHandler:l,updateOtherFields:m,addAllItemsToQuote:v}}),tc="Preparing Your Quote Please Wait...",nc={message:"Your quote is ready! Begin adding products to complete it.",type:"response",requestId:"no-request-id"},rc=18e4,Vn=je.defineStore("ai",()=>{const t=un(),i=Lt(),n=Ca(),r=ec(),o=ct(),c=Ws(),f=e.ref(""),x=e.ref(""),y=e.ref([]),u=e.ref(""),s=e.ref([]),_=e.ref(!1),a=e.ref(null),h=dn(),d=e.ref({}),p=e.ref(null),l=e.ref(null),g=e.ref(null),m=e.ref(null),b=e.ref(null),v=e.ref(tc),C=e.ref([]),B=e.computed(()=>t.orgId+"__"+t.user.Id+"__"+i.quoteId),w=e.computed(()=>a.value.readyState==WebSocket.OPEN),S=()=>{d.value={salesforceOrgId:t.orgId,salesforceOrgType:t.orgType,salesforceUserId:t.user.Id,userType:"Salesforce",chatRoomId:B.value,requestId:"",prompt:"",initiatedFrom:t.origin||"Quote",internalCall:!1,contextObjectId:i.quoteId,contextObjectType:"Quote",payload:{lineItemsCount:i.lineItemsCount},origin:"Genesis AI",defaultBatchSize:10,actionType:"",packageVersion:t.packageVersion,relatedIds:{eCatalogId:t.eCatalogId,accountId:t.accountId}}};async function I(){const $=x.value+"?chatRoomId="+B.value;a.value=new WebSocket($),a.value.addEventListener("open",A),a.value.addEventListener("message",V),a.value.addEventListener("close",k),a.value.addEventListener("error",N)}const A=()=>{L(),G()},k=()=>{M()},N=()=>{P(),M()},V=$=>{var U,Q;L();const j=JSON.parse($.data);if(j.status!=="ALIVE"){if(j.loading){v.value=j.message;return}else Array.isArray(j.messages)?(v.value=null,y.value.push(nc),j.messages.length>0&&E(j.messages)):j.agentResponse&&(j.errorMessage&&(j.agentResponse.content=j.errorMessage,j.agentResponse.error=!0),v.value=null,y.value.push({message:j.agentResponse.content,type:j.agentResponse.role,requestId:j.requestId,epoch:j.agentResponse.epoch,error:j.agentResponse.error,isDML:j.agentResponse.isDML,...(U=j.agentResponse)!=null&&U.filesData?{filesData:(Q=j.agentResponse)==null?void 0:Q.filesData}:{}}));C.value=j.links||[],q(j)}},L=()=>{M(),p.value=setTimeout(()=>{if(w.value){const $={action:"heartbeat"};a.value.send(JSON.stringify($)),L()}},rc)},M=()=>{p.value&&(clearInterval(p.value),p.value=null)};function Z($){const j={...d.value};j.requestType="Action",j.actionType="Undo",j.undoRequestId=$,j.requestId=Dt(),F(j)}function G(){const $={...d.value};$.requestType="Action",$.actionType="History",$.requestId=Dt(),F($)}function J($){return c.path.startsWith("/configurator")&&o.isChangedConfiguration?(m.value={save:()=>{o.maintainQuoteConfiguration()}},f.value=$,!0):(f.value="",!1)}function K($,j=!0,U=null){if(!J($)&&$.trim()){let Q={...d.value};Q.prompt=$.trim(),Q.requestType="Chat",Q.requestId=Dt(),Q.internalCall=!1,Q.payload=T(),Q.componentName=D.value,Q.templateId=i.templateId,Q.payload.lineItemsCount=i.lineItemsCount,U&&(Q={...Q,...U}),X(),j&&y.value.push({message:$.trim(),type:"user",...b.value&&{fileData:[b.value]},requestId:Q.requestId}),F(Q),L()}}function F($){const j={action:"prompt",data:$};a.value.send(JSON.stringify(j))}const E=$=>{const j=$.filter(({content:U})=>!!U).map(U=>({message:U.content,type:U.role,requestId:U.requestId,epoch:U.epoch,isDML:U.isDML,undone:U.undone}));j.forEach((U,Q)=>{U.isDML===!0&&Q!==j.length-1&&(U.isDML=!1)}),y.value=[...y.value,...j]};function T(){return c.path==="/quote-item"?i.getPayload():{}}const D=e.computed(()=>c.path==="/quote-item"?"QuoteItem":""),P=()=>{y.value.push({type:"response",message:"Oops! Something went wrong while processing your request. Please try again later.",error:!0})},X=()=>{y.value=y.value.map($=>({...$,links:[]}))};function q($){var Q,Y,ne;const j=((Q=$==null?void 0:$.redirectObjects)==null?void 0:Q.componentName)||($==null?void 0:$.componentName),U=($==null?void 0:$.redirectObjects)||{};if(j==="AdaptiveSearch"){const se=(Y=$==null?void 0:$.payload)==null?void 0:Y.searchTerm,he=(ne=$==null?void 0:$.payload)==null?void 0:ne.applyFilters;se&&se!==n.searchText&&n.initAdaptiveSearch({searchTerm:se,filters:he}),h.push("/adaptive-search")}else j==="Configurator"?h.push(`/configurator/${U.itemId}/${U.qliId}`):j==="QuoteReview"?h.push("/quote-item"):j==="QuoteItem"||j==="QuoteList"?(h.push("/quote-item"),i.performAIAction($)):j==="QuickSelection"&&(r.quickSelectionLayout=$.payload,console.info("Loading QuickSelection data = ",JSON.stringify(r.quickSelectionLayout)),h.push("/match-records"))}function z(){if(w.value){const $={action:"cancel",data:{requestId:d.value.requestId,chatRoomId:B.value}};a.value.send(JSON.stringify($))}}const R=()=>{l.value&&(clearInterval(l.value),l.value=null),p.value&&(clearInterval(p.value),p.value=null),g.value&&(clearTimeout(g.value),g.value=null)};return e.onBeforeUnmount(()=>{R()}),{unsavedChanges:m,loadingMessage:v,promptMessage:f,buttonLinks:C,websocketUrl:x,chatHistory:y,latestDMLRequest:u,strikethroughHistory:s,attachmentData:b,dataManuallyChanged:_,undoAction:Z,connectSocket:I,sendMessage:K,setInitialPayload:S,cancelRequest:z}}),un=je.defineStore("comRoot",()=>{const t=Vn(),i=et(),n=Lt(),r=e.ref(""),o=e.ref(""),c=e.ref("Genesis AI"),f=e.ref(""),x=e.ref({}),y=e.ref(""),u=e.ref(""),s=e.ref(""),_=e.ref(""),a=e.ref({}),h=e.ref(""),d=e.ref(""),p=e.ref(""),l=e.ref(""),g=e.ref(""),m=e.ref(""),b=e.ref(""),v=e.ref("Single"),C=e.ref("closed"),B=e.computed(()=>n.quoteName),w=e.computed(()=>v.value==="Single");async function S(N){r.value=N||ha("id"),o.value=ha("origin"),await A(),await I()}async function I(){try{console.info("getRecordInfo",r.value);let N=await window.salesforceConnector.getRecordInfo(r.value);return N=Ue(N),N!==void 0&&(a.value=N,h.value=N.name,d.value=N.objectType,p.value=N.accountId,l.value=N.eCatalogId,g.value=N.currencyCode,m.value=N.userLocale,b.value=N.opportunityId),(N==null?void 0:N.objectType)==="XX_ORD1__Quote__c"?(n.quoteId=N==null?void 0:N.recordId,n.templateId=N==null?void 0:N.templateId,n.quoteName=N==null?void 0:N.name,n.lineItemsCount=(N==null?void 0:N.lineItemsCount)||0):(N==null?void 0:N.objectType)==="Opportunity"&&await n.getPrimaryQuote(N.recordId),N}catch(N){i.handleError(N.message)}}async function A(){var V,L;console.info("getOrgInformation",r.value);const N=await window.salesforceConnector.getOrgInformation();t.websocketUrl=N.websocketUrl,f.value=(V=N.locale)==null?void 0:V.replace("_","-"),x.value=N.user,y.value=N.orgName,u.value=N.orgId,s.value=N.orgType,_.value=N.packageVersion,v.value=(L=N==null?void 0:N.pricingSchema)==null?void 0:L.toLowerCase()}function k(N){c.value=N,us(N)}return{id:r,origin:o,title:B,subTitle:c,locale:f,user:x,orgName:y,orgId:u,orgType:s,packageVersion:_,objectType:d,recordInfo:a,name:h,accountId:p,eCatalogId:l,currencyCode:g,userLocale:m,opportunityId:b,pricingSchema:v,isSinglePricingSchema:w,flyoutState:C,start:S,getRecordInfo:I,setSubTitle:k}}),oc="XX_ORD1__Quote__c",ac="xxord1salespricec",Dn="xx_ord1__item__c",ic="xxord1productnrcc",lc=je.defineStore("cartStore",()=>{const t=Lt(),i=Ca(),n=et(),r=e.ref(""),o=e.ref("$0"),c=e.ref("$0"),f=e.ref(null),x=e.ref({}),y=e.ref({}),u=e.ref({}),s=e.ref(""),_=e.ref(""),a=e.ref({}),h=e.ref(""),d=e.ref(""),p=e.ref({});async function l(){B()}async function g(){try{let I=await window.salesforceConnector.getProductCount(t.quoteId);if(I=Ue(I),I!=null&&I.errorMessage){n.handleError(I.errorMessage);return}return r.value=I,I}catch{n.handleError("Failed to get Product Count. Please try again.")}}async function m(){try{let I=await window.salesforceConnector.getQuoteTotal(t.quoteId);if(I=Ue(I),I!=null&&I.errorMessage){n.handleError(I.errorMessage);return}return c.value=I.monthlyTotal,o.value=I.onetimeTotal,I}catch{n.handleError("Failed to get Total Amount. Please try again.")}}async function b(I,A,k,N=""){if(!t.sectionDataMap.get(k).parentQLIs[A].removingItem){t.sectionDataMap.get(k).parentQLIs[A].removingItem=!0,d.value=I.id,await v(I.id)==="Success"&&(t.fetchAllQuoteLineItems(),N&&N(I,A,k));let L=t.sectionDataMap.get(k).parentQLIs.filter(M=>M[Dn]===I[Dn]).length;d.value="",i.lstItems.forEach(M=>{M[Dn]===I[Dn]&&(M.addedToQuote===!0&&(M.addedToQuote=!1),L===0&&(M.removedFromQuote=!0))})}}async function v(I){try{let A=await window.salesforceConnector.deleteQLI(I);if(A!=null&&A.errorMessage){n.handleError(A.errorMessage);return}return g(),m(),A}catch{n.handleError("Failed to remove Quote Item. Please try again.")}}function C(I){var N,V;const A=(N=I==null?void 0:I[ic])==null?void 0:N.match(/\.\d+/);A&&(A.value=A[0].length-1);const k=(V=I==null?void 0:I[ac])==null?void 0:V.match(/\.\d+/);return k&&(k.value=k[0].length-1),A||k}function B(I=!0){g(),m(),I&&t.fetchTemplates(oc).then(()=>{t.getFilteredListWithFields()})}function w(I){const A=t.sectionDataMap;for(const[,k]of A.entries())k.parentQLIs.forEach(N=>{N.id===I.id&&(k.columns.forEach(V=>{if(V.dataType==="CURRENCY"){const L=V.field.replace(/_/g,"");N[L]=S(N[L],I[V.field])}}),I!=null&&I.billingPeriodValue&&(I!=null&&I.formattedBillingPeriodValue)&&(N.formattedBillingPeriodValue=S(N.formattedBillingPeriodValue,I.billingPeriodValue)),I!=null&&I.oneTimeValue&&(I!=null&&I.formattedOneTimeValue)&&(N.formattedOneTimeValue=S(N.formattedOneTimeValue,I.oneTimeValue)))})}function S(I,A){const k=Number(A);if(isNaN(k))return I;const N=I.match(/(\d[\d,]*)(\.\d+)?/);if(!N)return I;const V=N[2]||"",L=V.length?V.length-1:0,M=k.toLocaleString("en-US",{minimumFractionDigits:L,maximumFractionDigits:L});return I.replace(N[1]+V,M)}return{initializeCart:l,loadCartState:B,productCount:r,onetimeTotal:o,monthlyTotal:c,filterCartItem:f,billingPeriodValue:s,hasOneTimeValue:_,hasBillingPeriodInList:x,oneTimeFieldAvailable:y,billingPeriodFieldAvailable:u,priceDecimalPrecision:a,cartItemUpdatingId:h,removingItemLoaderId:d,cartItemColumnsMap:p,getProductCount:g,getQuoteTotal:m,removeItem:b,removeQuoteItem:v,getDecimalPrecisionFromSalesPriceOrNRC:C,updateFormattedValues:w,formateCurrencyValue:S}}),sc=t=>[{title:"Apply Discount",subOptions:[...t.map(i=>`Apply Discount on ${i} for `),"Show Maximum discount allowed","Apply Maximum Discount Allowed",...t.map(i=>`Apply Discount on ${i} for a specific total`)]},{title:"Update Fields",subOptions:["Update the price of","Update the quantity of","Update the term start date to","Update the term end date to","Update the line description for"]},{title:"Price Ramp",subOptions:["Add a price ramp for"]}],cc={salesforceUserLocale:"en_US",chatRoomId:"00DA0000000cDUJMA2__0052G00000AHBNAQA5__a0jKb000004VSaMIAW",status:"SUCCESS",statusCode:200,requestId:"9b1d1f0a9f07aa6cdc",errorMessage:"",payload:{uiModification:{addColumn:[],removeColumn:[],filter:[],groupBy:[{sectionName:"MRC $50 and Above",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"greater or equal",value:"50"}],tableId:"4vIEgoK5CbSPrLYPbq"},{sectionName:"MRC Below $50",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"less than",value:"50"}],tableId:"BlOPCp7eLBCZ84nDT2"}],showOptions:!0}},agentResponse:{role:"agent",requestId:"9b1d1f0a9f07aa6cdc",content:"Grouped the quote items into two sections: one for MRC $50 and above, and another for MRC below $50.",error:!1,epoch:1759936160464,isDML:!1},redirectObjects:{qliId:"",itemId:"",componentName:"QuoteItem"},actionFunction:"Reload",links:[{action:"quoteDocument",label:"Quote Document"},{action:"addProducts",label:"Add Products"}]},dc=[{label:"Line Description",field:"xx_ord1__line_description__c",isEditable:!0,dataType:"STRING"},{label:"QTY",field:"xx_ord1__qty__c",isEditable:!0,dataType:"DOUBLE"},{label:"Extended Price",field:"xx_ord1__extended_price__c",isEditable:!1,dataType:"CURRENCY"},{label:"Billing Period",field:"xx_ord1__billing_period__c",isEditable:!0,dataType:"PICKLIST",picklistValues:["Monthly","Quarterly","Yearly"]}],Lt=je.defineStore("quote",()=>{const t=et(),i=lc(),n=un(),r=e.ref(""),o=e.ref(""),c=e.ref(0),f=e.ref(""),x=e.ref([]),y=e.ref({template:!0,filteredList:!1}),u=e.ref(null),s=e.ref(new Map),_=e.ref({}),a=e.ref(!1),h=e.ref(!0),d=e.ref(!1),p=e.ref({text:"Hide Options",altText:"Show Options",handler:()=>{h.value=!h.value,S()},color:"#136E05",isActive:!1}),l=e.computed(()=>{const F=Array.from(s.value.values()).map(E=>E.sectionName);return sc(F)});e.watch(f,()=>{y.value.template||w()});function g(){const F=new Map,E=[];for(const[D,P]of s.value.entries())F.set(D,P.selected),E.push(P);const T=JSON.parse(JSON.stringify(E));return T.forEach(D=>{delete D.selected;const P=new Map,X=[];D.lineItems.forEach(q=>{q.Selected=F.get(D.tableId).get(q.id)||!1,q.xx_ord1__parent_qli__c?(P.has(q.xx_ord1__parent_qli__c)||P.set(q.xx_ord1__parent_qli__c,[]),P.get(q.xx_ord1__parent_qli__c).push(q)):X.push(q)}),D.lineItems=X.map(q=>({...q,options:P.get(q.id)||[]})),delete D.loading,delete D.parentQLIs,delete D.totalValues}),{showOptions:h.value,sections:T,templateId:f.value}}async function m(F){try{let E=await window.salesforceConnector.getPrimaryQuote(F);E=Ue(E),E!==void 0&&(console.info("getPrimaryQuote",JSON.stringify(E)),r.value=E.recordId,console.info("quoteId",r.value),o.value=E.name,f.value=E==null?void 0:E.templateId,c.value=(E==null?void 0:E.lineItemsCount)||0)}catch(E){t.handleError(E.message),console.info("[ERROR]: getPrimaryQuote() error = ",E)}}async function b(F){var E,T;try{y.value.template=!0;let D=await window.salesforceConnector.fetchContentTemplates(JSON.stringify({lstObjectName:[F],templateType:"Document",templateId:null,fetchOnlyDefault:!1}));D=Ue(D);const P=D==null?void 0:D.templates[F];return f.value||(f.value=(E=P.find(X=>X.XX_ORD1__Default__c))==null?void 0:E.Id),f.value||(f.value=(T=P[0])==null?void 0:T.Id),x.value=P,y.value.template=!1,x.value}catch(D){t.handleError(D.message),console.info("[ERROR]: fetchTemplates() error = ",D)}}function v(F){if(!F)return null;const E=/\{!\$(\w+):([\w.]+)\}/,T=F.match(E);return T?{function:T[1],apiname:T[2].split(".")[1]}:null}async function C(F){try{const E={Id:r.value,XX_ORD1__Document_Template__c:F};return await window.salesforceConnector.updateQuote(JSON.stringify([E]))}catch(E){t.handleError(E.message),console.info("[ERROR]: updateQuote() error = ",E)}}async function B(){try{y.value.filteredList=!0;let F=await window.salesforceConnector.getQuoteEPageLayout();s.value.clear(),i.cartItemColumnsMap={},F=Ue(F);const E=F.map(D=>({label:D.fieldLabel,field:D.fieldName.toLowerCase(),isEditable:D.isEditable,dataType:D.dataType,...D.picklistValues?{picklistValues:D.picklistValues}:{}})),T=Dt();return s.value.set(T,{loading:!0,lineItems:[],parentQLIs:[],columns:E,tableId:T,sectionName:"All Rows",selected:new Map,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}),i.cartItemColumnsMap[T]=E,p.value.isActive=!1,h.value=!0,u.value={lstCB:[{columns:E,footer:null,title:"All Rows",sectionName:"All Rows",tableId:T,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}]},S(),y.value.filteredList=!1,F}catch(F){t.handleError(F.message),console.info("[ERROR]: getQuoteEPageLayout() error = ",F)}}async function w(){if(x.value.length===0){B();return}try{y.value.filteredList=!0;let F=await window.salesforceConnector.getFilteredListWithFields(JSON.stringify({templateId:f.value}));C(f.value),F=Ue(F),console.info("res.lstCB = ",F.lstCB);const E=F==null?void 0:F.objectFieldsMap;return s.value.clear(),i.cartItemColumnsMap={},F.lstCB=F.lstCB.map(T=>{const{fields:D,filters:P,primarysort:X,primarysortdesc:q}=JSON.parse(T.XX_ORD1__Block_Properties__c),z=D.map($=>{var j;return{label:(j=E[$.api])==null?void 0:j.label,field:$.api.toLowerCase(),isEditable:$.api.includes(".")?!1:E[$.api].isEditable,dataType:E[$.api].dataType,...E[$.api].picklistValues?{picklistValues:E[$.api].picklistValues}:{}}}),R=T.Id||Dt();return s.value.set(R,{loading:!0,lineItems:[],parentQLIs:[],columns:z,tableId:R,sectionName:T.Name,selected:new Map,footer:v(T.XX_ORD1__Table_Footer_HTML__c),filters:P,primarysort:X,primarysortdesc:q}),i.cartItemColumnsMap[R]=z,p.value.isActive=!1,h.value=!0,{columns:z,footer:v(T.XX_ORD1__Table_Footer_HTML__c),title:T.Name,sectionName:T.Name,tableId:R,filters:P,primarysort:X,primarysortdesc:q}}),u.value=F,S(),y.value.filteredList=!1,F}catch(F){t.handleError(F.message),console.info("[ERROR]: getFilteredListWithFields() error = ",F)}}async function S(F=!0){const E=[];for(const[T]of s.value)E.push(k(T,F));return await Promise.all(E),i.getProductCount(),!0}function I(F,E){return s.value.get(F).columns.some(T=>T.field.toLowerCase()===E)||i.cartItemColumnsMap[F].some(T=>T.field.toLowerCase()===E)}function A(F,E){let T=In(F);const D=n.pricingSchema,P=I(E,"xx_ord1__nrc__c"),X=I(E,"xx_ord1__sales_price__c"),q=I(E,"xx_ord1__qty__c");return T=T.map(z=>{let R={};D==="nrc/mrc"&&(z!=null&&z.xx_ord1__billing_period__c)?R={...X?{billingPeriodValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?"0":(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:z==null?void 0:z.xxord1salespricec}:{},...P?{oneTimeValue:(z==null?void 0:z.xx_ord1__nrc__c)===0?"0":(z==null?void 0:z.xx_ord1__nrc__c)||null,formattedOneTimeValue:z==null?void 0:z.xxord1nrcc}:{}}:D==="nrc/mrc"&&!(z!=null&&z.xx_ord1__billing_period__c)?X&&(R={oneTimeValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?"0":(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedOneTimeValue:z==null?void 0:z.xxord1salespricec}):D!=="nrc/mrc"&&(z!=null&&z.xx_ord1__billing_period__c)?X&&(R={billingPeriodValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?"0":(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:z==null?void 0:z.xxord1salespricec}):D!=="nrc/mrc"&&!(z!=null&&z.xx_ord1__billing_period__c)&&X&&(R={oneTimeValue:(z==null?void 0:z.xx_ord1__sales_price__c)===0?0:(z==null?void 0:z.xx_ord1__sales_price__c)||null,formattedOneTimeValue:z==null?void 0:z.xxord1salespricec});const{xx_ord1__qty__c:$,xx_ord1__sales_price__c:j,xx_ord1__nrc__c:U,...Q}=z,Y={...Q,id:z.id,description:(z==null?void 0:z.xx_ord1__line_description__c)||"",xx_ord1__billing_period__c:z==null?void 0:z.xx_ord1__billing_period__c,...q?{xx_ord1__qty__c:$}:{},xx_ord1__item__c:z==null?void 0:z.xx_ord1__item__c,"xx_ord1__item__r.xx_ord1__decimal_precision__c":z["xx_ord1__item__r.xx_ord1__decimal_precision__c"]||"0",...R};return Y!=null&&Y.billingPeriodValue&&(i.hasBillingPeriodInList[E]=!0,i.billingPeriodValue=Y==null?void 0:Y.xx_ord1__billing_period__c),"oneTimeValue"in Y&&(i.oneTimeFieldAvailable[E]=!0),"billingPeriodValue"in Y&&(i.billingPeriodFieldAvailable[E]=!0),(Y==null?void 0:Y.oneTimeValue)!==""&&(Y==null?void 0:Y.oneTimeValue)!==null&&(i.hasOneTimeValue=!0),Y}),T}async function k(F,E=!0){var T,D;try{const P=s.value.get(F);if(console.info("sectionData = ",P.sectionName),!P)return;P.loading=E,E&&(P.lineItems=[]);const{columns:X,filters:q,primarysort:z,primarysortdesc:R,footer:$}=P,j=X.map(ce=>ce.field.toLowerCase());j.includes("xx_ord1__parent_qli__c")||j.push("xx_ord1__parent_qli__c"),j.includes("xx_ord1__item__c")||j.push("xx_ord1__item__c"),j.includes("xx_ord1__sys_configuration_status2__c")||j.push("xx_ord1__sys_configuration_status2__c"),(T=i.cartItemColumnsMap[F])==null||T.forEach(ce=>{j.includes(ce.field)||j.push(ce.field)});const U=await N({fields:j,recordId:r.value,filters:q||[],primarySortBy:z||"",primarySortOrder:R?"DESC":"ASC",includeOptions:h.value,totalFields:$?[$.apiname]:[]}),Q=U.lineItems,Y=new Map;let ne=[];const se=(D=U.fieldTotals)==null?void 0:D.map(ce=>ce.totalValue);Q.forEach(ce=>{ce.XX_ORD1__Parent_QLI__c?Y.has(ce.XX_ORD1__Parent_QLI__c)?Y.get(ce.XX_ORD1__Parent_QLI__c).push(ce):Y.set(ce.XX_ORD1__Parent_QLI__c,[ce]):ne.push(ce)});const he=[];return ne.forEach(ce=>{he.push(ce),Y.has(ce.Id)&&he.push(...Y.get(ce.Id))}),ne=A(ne,F),P.lineItems=In(he),P.parentQLIs=ne,P.totalValues=se,P.loading=!1,s.value=new Map(s.value),he}catch(P){console.info("[ERROR]: fetchQuoteLineItems()123 error = ",P.message);const X=s.value.get(F);X&&(X.loading=!1)}}async function N(F){try{let E=await window.salesforceConnector.getQuoteLineItemsWithFilteredTable(JSON.stringify(F));return E=Ue(E),E}catch(E){t.handleError(E.message),console.info("[ERROR]: getQuoteLineItemsWithFilteredTable() error = ",E)}}async function V(F){try{console.info("updateQli() payload = ",F);let E=await window.salesforceConnector.updateQli(JSON.stringify(F));return E=Ue(E),S(!1),E}catch(E){t.handleError(E.message),console.info("[ERROR]: updateQli() error = ",E)}}async function L(F){try{let E=await window.salesforceConnector.deleteQLI(F);return E=Ue(E),S(),E}catch(E){t.handleError(E.message),console.info("[ERROR]: deleteQLI() error = ",E)}}async function M(F,E){try{a.value=!0;const T={fields:F};E&&(T.objectName=E),F.includes("xx_ord1__qty__c")&&E==="xx_ord1__ecatalog_item__c"&&(T.fields=T.fields.filter(P=>P!=="xx_ord1__qty__c")),F.includes("xx_ord1__sales_price__c")&&E!=="xx_ord1__quote_line_item__c"&&(T.fields=T.fields.filter(P=>P!=="xx_ord1__sales_price__c"));let D=await window.salesforceConnector.getFieldsData(JSON.stringify(T));return typeof D=="string"&&(D=JSON.parse(D)),D!=null&&D.errorMessage?(t.handleError(D.errorMessage),null):(_.value={..._.value,...D},console.info("fieldsData.value = ",JSON.stringify(_.value)),D)}catch(T){return t.handleError("Failed to get Fields Data. Please try again."),console.info("[ERROR]: getFieldsData() error = ",T),null}finally{a.value=!1}}function Z(F=""){var E;return!F||F.includes(".")?!1:F.includes("xx_ord1__qty__c")?!0:((E=_.value[F])==null?void 0:E.isEditable)||!1}function G(){J(cc)}async function J(F){var E,T,D,P,X,q,z,R,$;if(F.payload){if((E=F.payload)!=null&&E.uiModification){const j=F.payload.uiModification;if(((T=j.addColumn)==null?void 0:T.length)>0)if(j.addColumn.forEach(U=>{U.columns.forEach(Q=>{Q.field=Q.field.toLowerCase()})}),j.addColumn[0].sectionName==="all_section")for(const[U,Q]of s.value)Q.columns=[...Q.columns,...j.addColumn[0].columns];else j.addColumn.forEach(U=>{s.value.get(U.tableId)&&(s.value.get(U.tableId).columns=[...s.value.get(U.tableId).columns,...U.columns])});if(((D=j.removeColumn)==null?void 0:D.length)>0)if(j.removeColumn.forEach(U=>{U.columns=U.columns.map(Q=>Q.toLowerCase())}),j.removeColumn[0].sectionName==="all_section")for(const[U,Q]of s.value)Q.columns=Q.columns.filter(Y=>!j.removeColumn[0].columns.includes(Y.field));else j.removeColumn.forEach(U=>{s.value.get(U.tableId)&&(s.value.get(U.tableId).columns=s.value.get(U.tableId).columns.filter(Q=>!U.columns.includes(Q.field)))});if(((P=j.filter)==null?void 0:P.length)>0)if(j.filter[0].sectionName==="all_section")for(const[U,Q]of s.value)Q.filters=[...Q.filters,...j.filter[0].filters];else j.filter.forEach(U=>{s.value.get(U.tableId)&&(s.value.get(U.tableId).filters=[...s.value.get(U.tableId).filters,...U.filters])});if(((X=j.groupBy)==null?void 0:X.length)>0){const U=((q=[...s.value.values()][0])==null?void 0:q.columns)||dc;s.value.clear(),i.cartItemColumnsMap={},j.groupBy.forEach(Q=>{i.cartItemColumnsMap[Q.tableId]=Q.columns||U,s.value.set(Q.tableId,{loading:!0,lineItems:[],parentQLIs:[],columns:Q.columns||U,tableId:Q.tableId,sectionName:Q.sectionName,selected:new Map,footer:v(Q.footer),filters:Q.filters,primarysort:Q.primarysort,primarysortdesc:Q.primarysortdesc})})}j.showOptions!==void 0&&(h.value=j.showOptions)}if(((R=(z=F.payload)==null?void 0:z.sections)==null?void 0:R.length)>0){const j=($=F.payload)==null?void 0:$.sections;s.value.clear(),j.forEach(U=>{U.tableId||(U.tableId=Dt()),U.selected=new Map,s.value.set(U.tableId,U)}),S()}}F.actionFunction==="Reload"&&(S(),console.info("Reloading quote line items"))}async function K(F){var E,T;try{const D=new Set;for(const P of s.value.keys())(E=s.value.get(P).lineItems)==null||E.forEach(q=>{q.attributes=null,D.add(q.id)});if(F){const P={lineItemIds:[...D]},X=await window.productManagerController.getLineItemAttributes({request:JSON.stringify(P)}),q=JSON.parse(X.data);for(const z of s.value.keys())(T=s.value.get(z).lineItems)==null||T.forEach($=>{$.attributes=q[$.id]||null})}}catch(D){console.info("[ERROR]: fetchAttributesData() error = ",D)}}return{showAttributes:d,quoteId:r,quoteName:o,templateId:f,templateOptions:x,loading:y,currentTemplateData:u,fieldsData:_,fieldsDataLoading:a,showOptionHeaderButton:p,sectionDataMap:s,promptSuggestions:l,lineItemsCount:c,addColumns:G,getQuoteEPageLayout:B,getPayload:g,getPrimaryQuote:m,fetchTemplates:b,getFilteredListWithFields:w,getQuoteLineItemsWithFilteredTable:N,updateQli:V,getFieldsData:M,deleteQLI:L,performAIAction:J,isEditableField:Z,fetchQuoteLineItems:k,fetchAllQuoteLineItems:S,fetchAttributesData:K}});function Ea(t,i){return function(){return t.apply(i,arguments)}}const{toString:uc}=Object.prototype,{getPrototypeOf:vr}=Object,{iterator:Ln,toStringTag:ka}=Symbol,Fn=(t=>i=>{const n=uc.call(i);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tt=t=>(t=t.toLowerCase(),i=>Fn(i)===t),Rn=t=>i=>typeof i===t,{isArray:Yt}=Array,en=Rn("undefined");function fn(t){return t!==null&&!en(t)&&t.constructor!==null&&!en(t.constructor)&&ze(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const wa=tt("ArrayBuffer");function fc(t){let i;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?i=ArrayBuffer.isView(t):i=t&&t.buffer&&wa(t.buffer),i}const hc=Rn("string"),ze=Rn("function"),Na=Rn("number"),hn=t=>t!==null&&typeof t=="object",pc=t=>t===!0||t===!1,Pn=t=>{if(Fn(t)!=="object")return!1;const i=vr(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(ka in t)&&!(Ln in t)},mc=t=>{if(!hn(t)||fn(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},gc=tt("Date"),yc=tt("File"),xc=tt("Blob"),vc=tt("FileList"),_c=t=>hn(t)&&ze(t.pipe),bc=t=>{let i;return t&&(typeof FormData=="function"&&t instanceof FormData||ze(t.append)&&((i=Fn(t))==="formdata"||i==="object"&&ze(t.toString)&&t.toString()==="[object FormData]"))},Cc=tt("URLSearchParams"),[Ec,kc,wc,Nc]=["ReadableStream","Request","Response","Headers"].map(tt),Ac=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pn(t,i,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Yt(t))for(r=0,o=t.length;r<o;r++)i.call(null,t[r],r,t);else{if(fn(t))return;const c=n?Object.getOwnPropertyNames(t):Object.keys(t),f=c.length;let x;for(r=0;r<f;r++)x=c[r],i.call(null,t[x],x,t)}}function Aa(t,i){if(fn(t))return null;i=i.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],i===o.toLowerCase())return o;return null}const Ft=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ba=t=>!en(t)&&t!==Ft;function _r(){const{caseless:t,skipUndefined:i}=Ba(this)&&this||{},n={},r=(o,c)=>{const f=t&&Aa(n,c)||c;Pn(n[f])&&Pn(o)?n[f]=_r(n[f],o):Pn(o)?n[f]=_r({},o):Yt(o)?n[f]=o.slice():(!i||!en(o))&&(n[f]=o)};for(let o=0,c=arguments.length;o<c;o++)arguments[o]&&pn(arguments[o],r);return n}const Bc=(t,i,n,{allOwnKeys:r}={})=>(pn(i,(o,c)=>{n&&ze(o)?t[c]=Ea(o,n):t[c]=o},{allOwnKeys:r}),t),Sc=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Oc=(t,i,n,r)=>{t.prototype=Object.create(i.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:i.prototype}),n&&Object.assign(t.prototype,n)},Ic=(t,i,n,r)=>{let o,c,f;const x={};if(i=i||{},t==null)return i;do{for(o=Object.getOwnPropertyNames(t),c=o.length;c-- >0;)f=o[c],(!r||r(f,t,i))&&!x[f]&&(i[f]=t[f],x[f]=!0);t=n!==!1&&vr(t)}while(t&&(!n||n(t,i))&&t!==Object.prototype);return i},Tc=(t,i,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=i.length;const r=t.indexOf(i,n);return r!==-1&&r===n},Vc=t=>{if(!t)return null;if(Yt(t))return t;let i=t.length;if(!Na(i))return null;const n=new Array(i);for(;i-- >0;)n[i]=t[i];return n},Dc=(t=>i=>t&&i instanceof t)(typeof Uint8Array<"u"&&vr(Uint8Array)),Lc=(t,i)=>{const r=(t&&t[Ln]).call(t);let o;for(;(o=r.next())&&!o.done;){const c=o.value;i.call(t,c[0],c[1])}},Fc=(t,i)=>{let n;const r=[];for(;(n=t.exec(i))!==null;)r.push(n);return r},Rc=tt("HTMLFormElement"),Pc=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Sa=(({hasOwnProperty:t})=>(i,n)=>t.call(i,n))(Object.prototype),Mc=tt("RegExp"),Oa=(t,i)=>{const n=Object.getOwnPropertyDescriptors(t),r={};pn(n,(o,c)=>{let f;(f=i(o,c,t))!==!1&&(r[c]=f||o)}),Object.defineProperties(t,r)},qc=t=>{Oa(t,(i,n)=>{if(ze(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(ze(r)){if(i.enumerable=!1,"writable"in i){i.writable=!1;return}i.set||(i.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$c=(t,i)=>{const n={},r=o=>{o.forEach(c=>{n[c]=!0})};return Yt(t)?r(t):r(String(t).split(i)),n},jc=()=>{},Hc=(t,i)=>t!=null&&Number.isFinite(t=+t)?t:i;function Uc(t){return!!(t&&ze(t.append)&&t[ka]==="FormData"&&t[Ln])}const zc=t=>{const i=new Array(10),n=(r,o)=>{if(hn(r)){if(i.indexOf(r)>=0)return;if(fn(r))return r;if(!("toJSON"in r)){i[o]=r;const c=Yt(r)?[]:{};return pn(r,(f,x)=>{const y=n(f,o+1);!en(y)&&(c[x]=y)}),i[o]=void 0,c}}return r};return n(t,0)},Xc=tt("AsyncFunction"),Kc=t=>t&&(hn(t)||ze(t))&&ze(t.then)&&ze(t.catch),Ia=((t,i)=>t?setImmediate:i?((n,r)=>(Ft.addEventListener("message",({source:o,data:c})=>{o===Ft&&c===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Ft.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ze(Ft.postMessage)),Qc=typeof queueMicrotask<"u"?queueMicrotask.bind(Ft):typeof process<"u"&&process.nextTick||Ia,ee={isArray:Yt,isArrayBuffer:wa,isBuffer:fn,isFormData:bc,isArrayBufferView:fc,isString:hc,isNumber:Na,isBoolean:pc,isObject:hn,isPlainObject:Pn,isEmptyObject:mc,isReadableStream:Ec,isRequest:kc,isResponse:wc,isHeaders:Nc,isUndefined:en,isDate:gc,isFile:yc,isBlob:xc,isRegExp:Mc,isFunction:ze,isStream:_c,isURLSearchParams:Cc,isTypedArray:Dc,isFileList:vc,forEach:pn,merge:_r,extend:Bc,trim:Ac,stripBOM:Sc,inherits:Oc,toFlatObject:Ic,kindOf:Fn,kindOfTest:tt,endsWith:Tc,toArray:Vc,forEachEntry:Lc,matchAll:Fc,isHTMLForm:Rc,hasOwnProperty:Sa,hasOwnProp:Sa,reduceDescriptors:Oa,freezeMethods:qc,toObjectSet:$c,toCamelCase:Pc,noop:jc,toFiniteNumber:Hc,findKey:Aa,global:Ft,isContextDefined:Ba,isSpecCompliantForm:Uc,toJSONObject:zc,isAsyncFn:Xc,isThenable:Kc,setImmediate:Ia,asap:Qc,isIterable:t=>t!=null&&ze(t[Ln])};function ye(t,i,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",i&&(this.code=i),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}ee.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const Ta=ye.prototype,Va={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Va[t]={value:t}}),Object.defineProperties(ye,Va),Object.defineProperty(Ta,"isAxiosError",{value:!0}),ye.from=(t,i,n,r,o,c)=>{const f=Object.create(Ta);ee.toFlatObject(t,f,function(s){return s!==Error.prototype},u=>u!=="isAxiosError");const x=t&&t.message?t.message:"Error",y=i==null&&t?t.code:i;return ye.call(f,x,y,n,r,o),t&&f.cause==null&&Object.defineProperty(f,"cause",{value:t,configurable:!0}),f.name=t&&t.name||"Error",c&&Object.assign(f,c),f};const Zc=null;function br(t){return ee.isPlainObject(t)||ee.isArray(t)}function Da(t){return ee.endsWith(t,"[]")?t.slice(0,-2):t}function La(t,i,n){return t?t.concat(i).map(function(o,c){return o=Da(o),!n&&c?"["+o+"]":o}).join(n?".":""):i}function Gc(t){return ee.isArray(t)&&!t.some(br)}const Wc=ee.toFlatObject(ee,{},null,function(i){return/^is[A-Z]/.test(i)});function Mn(t,i,n){if(!ee.isObject(t))throw new TypeError("target must be an object");i=i||new FormData,n=ee.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,l){return!ee.isUndefined(l[p])});const r=n.metaTokens,o=n.visitor||s,c=n.dots,f=n.indexes,y=(n.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(i);if(!ee.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(ee.isDate(d))return d.toISOString();if(ee.isBoolean(d))return d.toString();if(!y&&ee.isBlob(d))throw new ye("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(d)||ee.isTypedArray(d)?y&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function s(d,p,l){let g=d;if(d&&!l&&typeof d=="object"){if(ee.endsWith(p,"{}"))p=r?p:p.slice(0,-2),d=JSON.stringify(d);else if(ee.isArray(d)&&Gc(d)||(ee.isFileList(d)||ee.endsWith(p,"[]"))&&(g=ee.toArray(d)))return p=Da(p),g.forEach(function(b,v){!(ee.isUndefined(b)||b===null)&&i.append(f===!0?La([p],v,c):f===null?p:p+"[]",u(b))}),!1}return br(d)?!0:(i.append(La(l,p,c),u(d)),!1)}const _=[],a=Object.assign(Wc,{defaultVisitor:s,convertValue:u,isVisitable:br});function h(d,p){if(!ee.isUndefined(d)){if(_.indexOf(d)!==-1)throw Error("Circular reference detected in "+p.join("."));_.push(d),ee.forEach(d,function(g,m){(!(ee.isUndefined(g)||g===null)&&o.call(i,g,ee.isString(m)?m.trim():m,p,a))===!0&&h(g,p?p.concat(m):[m])}),_.pop()}}if(!ee.isObject(t))throw new TypeError("data must be an object");return h(t),i}function Fa(t){const i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return i[r]})}function Cr(t,i){this._pairs=[],t&&Mn(t,this,i)}const Ra=Cr.prototype;Ra.append=function(i,n){this._pairs.push([i,n])},Ra.toString=function(i){const n=i?function(r){return i.call(this,r,Fa)}:Fa;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Jc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pa(t,i,n){if(!i)return t;const r=n&&n.encode||Jc;ee.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let c;if(o?c=o(i,n):c=ee.isURLSearchParams(i)?i.toString():new Cr(i,n).toString(r),c){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}class Ma{constructor(){this.handlers=[]}use(i,n,r){return this.handlers.push({fulfilled:i,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(i){this.handlers[i]&&(this.handlers[i]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(i){ee.forEach(this.handlers,function(r){r!==null&&i(r)})}}const qa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Cr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Er=typeof window<"u"&&typeof document<"u",kr=typeof navigator=="object"&&navigator||void 0,e0=Er&&(!kr||["ReactNative","NativeScript","NS"].indexOf(kr.product)<0),t0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",n0=Er&&window.location.href||"http://localhost",Pe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Er,hasStandardBrowserEnv:e0,hasStandardBrowserWebWorkerEnv:t0,navigator:kr,origin:n0},Symbol.toStringTag,{value:"Module"})),...Yc};function r0(t,i){return Mn(t,new Pe.classes.URLSearchParams,{visitor:function(n,r,o,c){return Pe.isNode&&ee.isBuffer(n)?(this.append(r,n.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...i})}function o0(t){return ee.matchAll(/\w+|\[(\w*)]/g,t).map(i=>i[0]==="[]"?"":i[1]||i[0])}function a0(t){const i={},n=Object.keys(t);let r;const o=n.length;let c;for(r=0;r<o;r++)c=n[r],i[c]=t[c];return i}function $a(t){function i(n,r,o,c){let f=n[c++];if(f==="__proto__")return!0;const x=Number.isFinite(+f),y=c>=n.length;return f=!f&&ee.isArray(o)?o.length:f,y?(ee.hasOwnProp(o,f)?o[f]=[o[f],r]:o[f]=r,!x):((!o[f]||!ee.isObject(o[f]))&&(o[f]=[]),i(n,r,o[f],c)&&ee.isArray(o[f])&&(o[f]=a0(o[f])),!x)}if(ee.isFormData(t)&&ee.isFunction(t.entries)){const n={};return ee.forEachEntry(t,(r,o)=>{i(o0(r),o,n,0)}),n}return null}function i0(t,i,n){if(ee.isString(t))try{return(i||JSON.parse)(t),ee.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const wr={transitional:qa,adapter:["xhr","http","fetch"],transformRequest:[function(i,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,c=ee.isObject(i);if(c&&ee.isHTMLForm(i)&&(i=new FormData(i)),ee.isFormData(i))return o?JSON.stringify($a(i)):i;if(ee.isArrayBuffer(i)||ee.isBuffer(i)||ee.isStream(i)||ee.isFile(i)||ee.isBlob(i)||ee.isReadableStream(i))return i;if(ee.isArrayBufferView(i))return i.buffer;if(ee.isURLSearchParams(i))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let x;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return r0(i,this.formSerializer).toString();if((x=ee.isFileList(i))||r.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Mn(x?{"files[]":i}:i,y&&new y,this.formSerializer)}}return c||o?(n.setContentType("application/json",!1),i0(i)):i}],transformResponse:[function(i){const n=this.transitional||wr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(ee.isResponse(i)||ee.isReadableStream(i))return i;if(i&&ee.isString(i)&&(r&&!this.responseType||o)){const f=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(i,this.parseReviver)}catch(x){if(f)throw x.name==="SyntaxError"?ye.from(x,ye.ERR_BAD_RESPONSE,this,null,this.response):x}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pe.classes.FormData,Blob:Pe.classes.Blob},validateStatus:function(i){return i>=200&&i<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],t=>{wr.headers[t]={}});const Nr=wr,l0=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),s0=t=>{const i={};let n,r,o;return t&&t.split(`
|
|
6
6
|
`).forEach(function(f){o=f.indexOf(":"),n=f.substring(0,o).trim().toLowerCase(),r=f.substring(o+1).trim(),!(!n||i[n]&&l0[n])&&(n==="set-cookie"?i[n]?i[n].push(r):i[n]=[r]:i[n]=i[n]?i[n]+", "+r:r)}),i},ja=Symbol("internals");function mn(t){return t&&String(t).trim().toLowerCase()}function qn(t){return t===!1||t==null?t:ee.isArray(t)?t.map(qn):String(t)}function c0(t){const i=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)i[r[1]]=r[2];return i}const d0=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ar(t,i,n,r,o){if(ee.isFunction(r))return r.call(this,i,n);if(o&&(i=n),!!ee.isString(i)){if(ee.isString(r))return i.indexOf(r)!==-1;if(ee.isRegExp(r))return r.test(i)}}function u0(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(i,n,r)=>n.toUpperCase()+r)}function f0(t,i){const n=ee.toCamelCase(" "+i);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,c,f){return this[r].call(this,i,o,c,f)},configurable:!0})})}class $n{constructor(i){i&&this.set(i)}set(i,n,r){const o=this;function c(x,y,u){const s=mn(y);if(!s)throw new Error("header name must be a non-empty string");const _=ee.findKey(o,s);(!_||o[_]===void 0||u===!0||u===void 0&&o[_]!==!1)&&(o[_||y]=qn(x))}const f=(x,y)=>ee.forEach(x,(u,s)=>c(u,s,y));if(ee.isPlainObject(i)||i instanceof this.constructor)f(i,n);else if(ee.isString(i)&&(i=i.trim())&&!d0(i))f(s0(i),n);else if(ee.isObject(i)&&ee.isIterable(i)){let x={},y,u;for(const s of i){if(!ee.isArray(s))throw TypeError("Object iterator must return a key-value pair");x[u=s[0]]=(y=x[u])?ee.isArray(y)?[...y,s[1]]:[y,s[1]]:s[1]}f(x,n)}else i!=null&&c(n,i,r);return this}get(i,n){if(i=mn(i),i){const r=ee.findKey(this,i);if(r){const o=this[r];if(!n)return o;if(n===!0)return c0(o);if(ee.isFunction(n))return n.call(this,o,r);if(ee.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(i,n){if(i=mn(i),i){const r=ee.findKey(this,i);return!!(r&&this[r]!==void 0&&(!n||Ar(this,this[r],r,n)))}return!1}delete(i,n){const r=this;let o=!1;function c(f){if(f=mn(f),f){const x=ee.findKey(r,f);x&&(!n||Ar(r,r[x],x,n))&&(delete r[x],o=!0)}}return ee.isArray(i)?i.forEach(c):c(i),o}clear(i){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const c=n[r];(!i||Ar(this,this[c],c,i,!0))&&(delete this[c],o=!0)}return o}normalize(i){const n=this,r={};return ee.forEach(this,(o,c)=>{const f=ee.findKey(r,c);if(f){n[f]=qn(o),delete n[c];return}const x=i?u0(c):String(c).trim();x!==c&&delete n[c],n[x]=qn(o),r[x]=!0}),this}concat(...i){return this.constructor.concat(this,...i)}toJSON(i){const n=Object.create(null);return ee.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=i&&ee.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([i,n])=>i+": "+n).join(`
|
|
7
7
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...n){const r=new this(i);return n.forEach(o=>r.set(o)),r}static accessor(i){const r=(this[ja]=this[ja]={accessors:{}}).accessors,o=this.prototype;function c(f){const x=mn(f);r[x]||(f0(o,f),r[x]=!0)}return ee.isArray(i)?i.forEach(c):c(i),this}}$n.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors($n.prototype,({value:t},i)=>{let n=i[0].toUpperCase()+i.slice(1);return{get:()=>t,set(r){this[n]=r}}}),ee.freezeMethods($n);const nt=$n;function Br(t,i){const n=this||Nr,r=i||n,o=nt.from(r.headers);let c=r.data;return ee.forEach(t,function(x){c=x.call(n,c,o.normalize(),i?i.status:void 0)}),o.normalize(),c}function Ha(t){return!!(t&&t.__CANCEL__)}function tn(t,i,n){ye.call(this,t??"canceled",ye.ERR_CANCELED,i,n),this.name="CanceledError"}ee.inherits(tn,ye,{__CANCEL__:!0});function Ua(t,i,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):i(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function h0(t){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return i&&i[1]||""}function p0(t,i){t=t||10;const n=new Array(t),r=new Array(t);let o=0,c=0,f;return i=i!==void 0?i:1e3,function(y){const u=Date.now(),s=r[c];f||(f=u),n[o]=y,r[o]=u;let _=c,a=0;for(;_!==o;)a+=n[_++],_=_%t;if(o=(o+1)%t,o===c&&(c=(c+1)%t),u-f<i)return;const h=s&&u-s;return h?Math.round(a*1e3/h):void 0}}function m0(t,i){let n=0,r=1e3/i,o,c;const f=(u,s=Date.now())=>{n=s,o=null,c&&(clearTimeout(c),c=null),t(...u)};return[(...u)=>{const s=Date.now(),_=s-n;_>=r?f(u,s):(o=u,c||(c=setTimeout(()=>{c=null,f(o)},r-_)))},()=>o&&f(o)]}const jn=(t,i,n=3)=>{let r=0;const o=p0(50,250);return m0(c=>{const f=c.loaded,x=c.lengthComputable?c.total:void 0,y=f-r,u=o(y),s=f<=x;r=f;const _={loaded:f,total:x,progress:x?f/x:void 0,bytes:y,rate:u||void 0,estimated:u&&x&&s?(x-f)/u:void 0,event:c,lengthComputable:x!=null,[i?"download":"upload"]:!0};t(_)},n)},za=(t,i)=>{const n=t!=null;return[r=>i[0]({lengthComputable:n,total:t,loaded:r}),i[1]]},Xa=t=>(...i)=>ee.asap(()=>t(...i)),g0=Pe.hasStandardBrowserEnv?((t,i)=>n=>(n=new URL(n,Pe.origin),t.protocol===n.protocol&&t.host===n.host&&(i||t.port===n.port)))(new URL(Pe.origin),Pe.navigator&&/(msie|trident)/i.test(Pe.navigator.userAgent)):()=>!0,y0=Pe.hasStandardBrowserEnv?{write(t,i,n,r,o,c,f){if(typeof document>"u")return;const x=[`${t}=${encodeURIComponent(i)}`];ee.isNumber(n)&&x.push(`expires=${new Date(n).toUTCString()}`),ee.isString(r)&&x.push(`path=${r}`),ee.isString(o)&&x.push(`domain=${o}`),c===!0&&x.push("secure"),ee.isString(f)&&x.push(`SameSite=${f}`),document.cookie=x.join("; ")},read(t){if(typeof document>"u")return null;const i=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return i?decodeURIComponent(i[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function x0(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function v0(t,i){return i?t.replace(/\/?\/$/,"")+"/"+i.replace(/^\/+/,""):t}function Ka(t,i,n){let r=!x0(i);return t&&(r||n==!1)?v0(t,i):i}const Qa=t=>t instanceof nt?{...t}:t;function Rt(t,i){i=i||{};const n={};function r(u,s,_,a){return ee.isPlainObject(u)&&ee.isPlainObject(s)?ee.merge.call({caseless:a},u,s):ee.isPlainObject(s)?ee.merge({},s):ee.isArray(s)?s.slice():s}function o(u,s,_,a){if(ee.isUndefined(s)){if(!ee.isUndefined(u))return r(void 0,u,_,a)}else return r(u,s,_,a)}function c(u,s){if(!ee.isUndefined(s))return r(void 0,s)}function f(u,s){if(ee.isUndefined(s)){if(!ee.isUndefined(u))return r(void 0,u)}else return r(void 0,s)}function x(u,s,_){if(_ in i)return r(u,s);if(_ in t)return r(void 0,u)}const y={url:c,method:c,data:c,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:x,headers:(u,s,_)=>o(Qa(u),Qa(s),_,!0)};return ee.forEach(Object.keys({...t,...i}),function(s){const _=y[s]||o,a=_(t[s],i[s],s);ee.isUndefined(a)&&_!==x||(n[s]=a)}),n}const Za=t=>{const i=Rt({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:c,headers:f,auth:x}=i;if(i.headers=f=nt.from(f),i.url=Pa(Ka(i.baseURL,i.url,i.allowAbsoluteUrls),t.params,t.paramsSerializer),x&&f.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),ee.isFormData(n)){if(Pe.hasStandardBrowserEnv||Pe.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if(ee.isFunction(n.getHeaders)){const y=n.getHeaders(),u=["content-type","content-length"];Object.entries(y).forEach(([s,_])=>{u.includes(s.toLowerCase())&&f.set(s,_)})}}if(Pe.hasStandardBrowserEnv&&(r&&ee.isFunction(r)&&(r=r(i)),r||r!==!1&&g0(i.url))){const y=o&&c&&y0.read(c);y&&f.set(o,y)}return i},_0=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=Za(t);let c=o.data;const f=nt.from(o.headers).normalize();let{responseType:x,onUploadProgress:y,onDownloadProgress:u}=o,s,_,a,h,d;function p(){h&&h(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(s),o.signal&&o.signal.removeEventListener("abort",s)}let l=new XMLHttpRequest;l.open(o.method.toUpperCase(),o.url,!0),l.timeout=o.timeout;function g(){if(!l)return;const b=nt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),C={data:!x||x==="text"||x==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:b,config:t,request:l};Ua(function(w){n(w),p()},function(w){r(w),p()},C),l=null}"onloadend"in l?l.onloadend=g:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(g)},l.onabort=function(){l&&(r(new ye("Request aborted",ye.ECONNABORTED,t,l)),l=null)},l.onerror=function(v){const C=v&&v.message?v.message:"Network Error",B=new ye(C,ye.ERR_NETWORK,t,l);B.event=v||null,r(B),l=null},l.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||qa;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),r(new ye(v,C.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,t,l)),l=null},c===void 0&&f.setContentType(null),"setRequestHeader"in l&&ee.forEach(f.toJSON(),function(v,C){l.setRequestHeader(C,v)}),ee.isUndefined(o.withCredentials)||(l.withCredentials=!!o.withCredentials),x&&x!=="json"&&(l.responseType=o.responseType),u&&([a,d]=jn(u,!0),l.addEventListener("progress",a)),y&&l.upload&&([_,h]=jn(y),l.upload.addEventListener("progress",_),l.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(s=b=>{l&&(r(!b||b.type?new tn(null,t,l):b),l.abort(),l=null)},o.cancelToken&&o.cancelToken.subscribe(s),o.signal&&(o.signal.aborted?s():o.signal.addEventListener("abort",s)));const m=h0(o.url);if(m&&Pe.protocols.indexOf(m)===-1){r(new ye("Unsupported protocol "+m+":",ye.ERR_BAD_REQUEST,t));return}l.send(c||null)})},b0=(t,i)=>{const{length:n}=t=t?t.filter(Boolean):[];if(i||n){let r=new AbortController,o;const c=function(u){if(!o){o=!0,x();const s=u instanceof Error?u:this.reason;r.abort(s instanceof ye?s:new tn(s instanceof Error?s.message:s))}};let f=i&&setTimeout(()=>{f=null,c(new ye(`timeout ${i} of ms exceeded`,ye.ETIMEDOUT))},i);const x=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(c):u.removeEventListener("abort",c)}),t=null)};t.forEach(u=>u.addEventListener("abort",c));const{signal:y}=r;return y.unsubscribe=()=>ee.asap(x),y}},C0=function*(t,i){let n=t.byteLength;if(!i||n<i){yield t;return}let r=0,o;for(;r<n;)o=r+i,yield t.slice(r,o),r=o},E0=async function*(t,i){for await(const n of k0(t))yield*C0(n,i)},k0=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const i=t.getReader();try{for(;;){const{done:n,value:r}=await i.read();if(n)break;yield r}}finally{await i.cancel()}},Ga=(t,i,n,r)=>{const o=E0(t,i);let c=0,f,x=y=>{f||(f=!0,r&&r(y))};return new ReadableStream({async pull(y){try{const{done:u,value:s}=await o.next();if(u){x(),y.close();return}let _=s.byteLength;if(n){let a=c+=_;n(a)}y.enqueue(new Uint8Array(s))}catch(u){throw x(u),u}},cancel(y){return x(y),o.return()}},{highWaterMark:2})},Wa=64*1024,{isFunction:Hn}=ee,w0=(({Request:t,Response:i})=>({Request:t,Response:i}))(ee.global),{ReadableStream:Ja,TextEncoder:Ya}=ee.global,ei=(t,...i)=>{try{return!!t(...i)}catch{return!1}},N0=t=>{t=ee.merge.call({skipUndefined:!0},w0,t);const{fetch:i,Request:n,Response:r}=t,o=i?Hn(i):typeof fetch=="function",c=Hn(n),f=Hn(r);if(!o)return!1;const x=o&&Hn(Ja),y=o&&(typeof Ya=="function"?(d=>p=>d.encode(p))(new Ya):async d=>new Uint8Array(await new n(d).arrayBuffer())),u=c&&x&&ei(()=>{let d=!1;const p=new n(Pe.origin,{body:new Ja,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!p}),s=f&&x&&ei(()=>ee.isReadableStream(new r("").body)),_={stream:s&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!_[d]&&(_[d]=(p,l)=>{let g=p&&p[d];if(g)return g.call(p);throw new ye(`Response type '${d}' is not supported`,ye.ERR_NOT_SUPPORT,l)})});const a=async d=>{if(d==null)return 0;if(ee.isBlob(d))return d.size;if(ee.isSpecCompliantForm(d))return(await new n(Pe.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(d)||ee.isArrayBuffer(d))return d.byteLength;if(ee.isURLSearchParams(d)&&(d=d+""),ee.isString(d))return(await y(d)).byteLength},h=async(d,p)=>{const l=ee.toFiniteNumber(d.getContentLength());return l??a(p)};return async d=>{let{url:p,method:l,data:g,signal:m,cancelToken:b,timeout:v,onDownloadProgress:C,onUploadProgress:B,responseType:w,headers:S,withCredentials:I="same-origin",fetchOptions:A}=Za(d),k=i||fetch;w=w?(w+"").toLowerCase():"text";let N=b0([m,b&&b.toAbortSignal()],v),V=null;const L=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let M;try{if(B&&u&&l!=="get"&&l!=="head"&&(M=await h(S,g))!==0){let E=new n(p,{method:"POST",body:g,duplex:"half"}),T;if(ee.isFormData(g)&&(T=E.headers.get("content-type"))&&S.setContentType(T),E.body){const[D,P]=za(M,jn(Xa(B)));g=Ga(E.body,Wa,D,P)}}ee.isString(I)||(I=I?"include":"omit");const Z=c&&"credentials"in n.prototype,G={...A,signal:N,method:l.toUpperCase(),headers:S.normalize().toJSON(),body:g,duplex:"half",credentials:Z?I:void 0};V=c&&new n(p,G);let J=await(c?k(V,A):k(p,G));const K=s&&(w==="stream"||w==="response");if(s&&(C||K&&L)){const E={};["status","statusText","headers"].forEach(X=>{E[X]=J[X]});const T=ee.toFiniteNumber(J.headers.get("content-length")),[D,P]=C&&za(T,jn(Xa(C),!0))||[];J=new r(Ga(J.body,Wa,D,()=>{P&&P(),L&&L()}),E)}w=w||"text";let F=await _[ee.findKey(_,w)||"text"](J,d);return!K&&L&&L(),await new Promise((E,T)=>{Ua(E,T,{data:F,headers:nt.from(J.headers),status:J.status,statusText:J.statusText,config:d,request:V})})}catch(Z){throw L&&L(),Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,d,V),{cause:Z.cause||Z}):ye.from(Z,Z&&Z.code,d,V)}}},A0=new Map,ti=t=>{let i=t&&t.env||{};const{fetch:n,Request:r,Response:o}=i,c=[r,o,n];let f=c.length,x=f,y,u,s=A0;for(;x--;)y=c[x],u=s.get(y),u===void 0&&s.set(y,u=x?new Map:N0(i)),s=u;return u};ti();const Sr={http:Zc,xhr:_0,fetch:{get:ti}};ee.forEach(Sr,(t,i)=>{if(t){try{Object.defineProperty(t,"name",{value:i})}catch{}Object.defineProperty(t,"adapterName",{value:i})}});const ni=t=>`- ${t}`,B0=t=>ee.isFunction(t)||t===null||t===!1;function S0(t,i){t=ee.isArray(t)?t:[t];const{length:n}=t;let r,o;const c={};for(let f=0;f<n;f++){r=t[f];let x;if(o=r,!B0(r)&&(o=Sr[(x=String(r)).toLowerCase()],o===void 0))throw new ye(`Unknown adapter '${x}'`);if(o&&(ee.isFunction(o)||(o=o.get(i))))break;c[x||"#"+f]=o}if(!o){const f=Object.entries(c).map(([y,u])=>`adapter ${y} `+(u===!1?"is not supported by the environment":"is not available in the build"));let x=n?f.length>1?`since :
|
|
8
8
|
`+f.map(ni).join(`
|
|
9
9
|
`):" "+ni(f[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return o}const ri={getAdapter:S0,adapters:Sr};function Or(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new tn(null,t)}function oi(t){return Or(t),t.headers=nt.from(t.headers),t.data=Br.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ri.getAdapter(t.adapter||Nr.adapter,t)(t).then(function(r){return Or(t),r.data=Br.call(t,t.transformResponse,r),r.headers=nt.from(r.headers),r},function(r){return Ha(r)||(Or(t),r&&r.response&&(r.response.data=Br.call(t,t.transformResponse,r.response),r.response.headers=nt.from(r.response.headers))),Promise.reject(r)})}const ai="1.13.2",Un={};["object","boolean","number","function","string","symbol"].forEach((t,i)=>{Un[t]=function(r){return typeof r===t||"a"+(i<1?"n ":" ")+t}});const ii={};Un.transitional=function(i,n,r){function o(c,f){return"[Axios v"+ai+"] Transitional option '"+c+"'"+f+(r?". "+r:"")}return(c,f,x)=>{if(i===!1)throw new ye(o(f," has been removed"+(n?" in "+n:"")),ye.ERR_DEPRECATED);return n&&!ii[f]&&(ii[f]=!0,console.warn(o(f," has been deprecated since v"+n+" and will be removed in the near future"))),i?i(c,f,x):!0}},Un.spelling=function(i){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${i}`),!0)};function O0(t,i,n){if(typeof t!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const c=r[o],f=i[c];if(f){const x=t[c],y=x===void 0||f(x,c,t);if(y!==!0)throw new ye("option "+c+" must be "+y,ye.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ye("Unknown option "+c,ye.ERR_BAD_OPTION)}}const zn={assertOptions:O0,validators:Un},st=zn.validators;class Xn{constructor(i){this.defaults=i||{},this.interceptors={request:new Ma,response:new Ma}}async request(i,n){try{return await this._request(i,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const c=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?c&&!String(r.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
10
|
-
`+c):r.stack=c}catch{}}throw r}}_request(i,n){typeof i=="string"?(n=n||{},n.url=i):n=i||{},n=Rt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:c}=n;r!==void 0&&zn.assertOptions(r,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1),o!=null&&(ee.isFunction(o)?n.paramsSerializer={serialize:o}:zn.assertOptions(o,{encode:st.function,serialize:st.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zn.assertOptions(n,{baseUrl:st.spelling("baseURL"),withXsrfToken:st.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=c&&ee.merge(c.common,c[n.method]);c&&ee.forEach(["delete","get","head","post","put","patch","common"],d=>{delete c[d]}),n.headers=nt.concat(f,c);const x=[];let y=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(y=y&&p.synchronous,x.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let s,_=0,a;if(!y){const d=[oi.bind(this),void 0];for(d.unshift(...x),d.push(...u),a=d.length,s=Promise.resolve(n);_<a;)s=s.then(d[_++],d[_++]);return s}a=x.length;let h=n;for(;_<a;){const d=x[_++],p=x[_++];try{h=d(h)}catch(l){p.call(this,l);break}}try{s=oi.call(this,h)}catch(d){return Promise.reject(d)}for(_=0,a=u.length;_<a;)s=s.then(u[_++],u[_++]);return s}getUri(i){i=Rt(this.defaults,i);const n=Ka(i.baseURL,i.url,i.allowAbsoluteUrls);return Pa(n,i.params,i.paramsSerializer)}}ee.forEach(["delete","get","head","options"],function(i){Xn.prototype[i]=function(n,r){return this.request(Rt(r||{},{method:i,url:n,data:(r||{}).data}))}}),ee.forEach(["post","put","patch"],function(i){function n(r){return function(c,f,x){return this.request(Rt(x||{},{method:i,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}Xn.prototype[i]=n(),Xn.prototype[i+"Form"]=n(!0)});const Kn=Xn;class Ir{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(c){n=c});const r=this;this.promise.then(o=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](o);r._listeners=null}),this.promise.then=o=>{let c;const f=new Promise(x=>{r.subscribe(x),c=x}).then(o);return f.cancel=function(){r.unsubscribe(c)},f},i(function(c,f,x){r.reason||(r.reason=new tn(c,f,x),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const n=this._listeners.indexOf(i);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const i=new AbortController,n=r=>{i.abort(r)};return this.subscribe(n),i.signal.unsubscribe=()=>this.unsubscribe(n),i.signal}static source(){let i;return{token:new Ir(function(o){i=o}),cancel:i}}}const I0=Ir;function T0(t){return function(n){return t.apply(null,n)}}function V0(t){return ee.isObject(t)&&t.isAxiosError===!0}const Tr={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(Tr).forEach(([t,i])=>{Tr[i]=t});const D0=Tr;function li(t){const i=new Kn(t),n=Ea(Kn.prototype.request,i);return ee.extend(n,Kn.prototype,i,{allOwnKeys:!0}),ee.extend(n,i,null,{allOwnKeys:!0}),n.create=function(o){return li(Rt(t,o))},n}const Ne=li(Nr);Ne.Axios=Kn,Ne.CanceledError=tn,Ne.CancelToken=I0,Ne.isCancel=Ha,Ne.VERSION=ai,Ne.toFormData=Mn,Ne.AxiosError=ye,Ne.Cancel=Ne.CanceledError,Ne.all=function(i){return Promise.all(i)},Ne.spread=T0,Ne.isAxiosError=V0,Ne.mergeConfig=Rt,Ne.AxiosHeaders=nt,Ne.formToJSON=t=>$a(ee.isHTMLForm(t)?new FormData(t):t),Ne.getAdapter=ri.getAdapter,Ne.HttpStatusCode=D0,Ne.default=Ne;class L0{constructor(i,n,r,o){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":i,"X-Salesforce-Org-Type":n,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":o,"Content-Type":"application/json"}}}const si=je.defineStore("comShare",()=>{const t=e.ref(""),i=e.ref(""),n=e.ref(""),r=e.ref(""),o=e.ref(""),c=e.ref(""),f=e.ref(""),x=e.ref("Single"),y=e.computed(()=>x.value==="Single");async function u(s){t.value=s.orgType||"Production",i.value=s.orgId||"",n.value=s.userId||"",r.value=s.accountId||"",o.value=s.opportunityId||"",f.value=s.userLocale||"en_US",x.value=s.pricingSchema||"Single"}return{orgType:t,orgId:i,userId:n,accountId:r,opportunityId:o,userLocale:f,pricingSchema:x,quoteId:c,isSinglePricingSchema:y,setSetupData:u}});function F0(t){return t.offerData.pricingTypes.forEach(i=>{i.appliedOnField==="Catalog Price"?(t.catalogPrice=i,t.salesPrice=i.offerPrice,t.price=i.offerPrice):i.appliedOnField==="MRC"?(t.mrcPrice=i,t.mrc=i.offerPrice):i.appliedOnField==="YRC"&&(t.yrcPrice=i,t.yrc=i.offerPrice)}),t}function R0(t){const i=n=>Math.min(...n.options.map(r=>r.relationshipInfo.primarySortOrder));return t.forEach(n=>{n.itemTypes.forEach(r=>{r.options.sort((o,c)=>o.relationshipInfo.primarySortOrder-c.relationshipInfo.primarySortOrder||o.itemName.localeCompare(c.itemName))}),n.itemTypes.sort((r,o)=>i(r)-i(o)||r.itemTypeName.localeCompare(o.itemTypeName))}),t.sort((n,r)=>{const o=Math.min(...n.itemTypes.map(i)),c=Math.min(...r.itemTypes.map(i));return o-c||n.category.localeCompare(r.category)}),t}const P0=(t,i)=>{const n=(r,o)=>typeof o=="function"?void 0:o;return JSON.stringify(t,n)===JSON.stringify(i,n)};class M0 extends L0{constructor(i,n,r,o){super(i,n,r,o)}async getAvailableConfiguration(i){return(await Ne.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,i,{headers:this.headers})).data}async getLineItems({request:i}){const n=await Ne.post(`${this.awsURL}/quoting/getConfiguredLineItems`,i,{headers:this.headers});return console.info("getLineItems:response",n.data),n.data}async maintainQuoteConfiguration({request:i}){const n=await Ne.post(`${this.awsURL}/transactions/maintainConfiguration`,i,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",n.data),n.data}async getProductCrossSells({objectId:i,productItemId:n}){const r=await Ne.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${n}&objectId=${i}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:i}){const n=await Ne.post(`${this.awsURL}/transactions/addLines`,i,{headers:this.headers});return console.info("addLines:response",n.data),n.data}async evaluateConfigurationSelection({request:i}){const n=await Ne.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",i,{headers:{headers:this.headers}});return console.info("evaluateConfigurationSelection:response",n.data),n.data}}const ct=je.defineStore("comConfigurator",()=>{const t=e.ref(null),i=et(),n=si(),r=dn(),o=e.ref(null),c=e.ref(null),f=e.ref(null),x=e.ref(null),y=e.ref(null),u=e.ref([]),s=e.ref(null),_=e.ref([]),a=e.ref(null),h=e.ref(new Map),d=e.ref(!1),p=e.ref({configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),l=e.ref(!1),g=e.computed(()=>m.value&&!n.isSinglePricingSchema),m=e.computed(()=>{var Y;if(!x.value||!((Y=x.value.categoryOptions)!=null&&Y.length)>0)return!1;let R=!0,$=!0,j=!0,U=null,Q=!1;for(const ne of x.value.categoryOptions)for(const ce of ne.itemTypes)for(const fe of ce.options)fe.billingPeriod&&(U&&U!==fe.billingPeriod&&(j=!1),U=fe.billingPeriod,!fe.yrcPrice&&fe.billingPeriod==="Monthly"&&(R=!1),!fe.mrcPrice&&fe.billingPeriod==="Yearly"&&($=!1),Q=!0);return R&&$&&j&&Q}),b=e.computed(()=>!P0(x.value,y.value)),v=e.computed(()=>{var $;const R=(($=x.value)==null?void 0:$.categoryOptions)||[];return R.forEach(j=>{j.itemTypes.forEach(U=>{U.selectedOptions=U.options.filter(Q=>U.selected.includes(Q.itemId)),U.totalPrice=function(){return U.selectedOptions.reduce((Q,Y)=>Q+Y.price*Y.qty,0)||0},U.oneTimePrice=function(){return U.selectedOptions.filter(Q=>!Q.billingPeriod).reduce((Q,Y)=>Q+Y.price*Y.qty,0)||0},U.recurringPrice=function(){return U.selectedOptions.filter(Q=>Q.billingPeriod).reduce((Q,Y)=>Q+Y.price*Y.qty,0)||0}}),j.selectedItemTypes=j.itemTypes.filter(U=>U.selected.length>0),j.totalPrice=function(){return j.itemTypes.reduce((U,Q)=>U+Q.totalPrice(),0)},j.oneTimePrice=function(){return j.itemTypes.reduce((U,Q)=>U+Q.oneTimePrice(),0)},j.recurringPrice=function(){return j.itemTypes.reduce((U,Q)=>U+Q.recurringPrice(),0)}}),R.filter(j=>j.itemTypes.filter(U=>U.selected.length>0).length>0)}),C=e.computed(()=>v.value.reduce((R,$)=>R+$.totalPrice(),0)),B=e.computed(()=>{if(!x.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const R=v.value.reduce((U,Q)=>U+Q.totalPrice(),0);let $=v.value.reduce((U,Q)=>U+Q.oneTimePrice(),0),j=v.value.reduce((U,Q)=>U+Q.recurringPrice(),0);return x.value.billingPeriod?j=(j+x.value.price)*x.value.qty:$=($+x.value.price)*x.value.qty,{basePrice:x.value.price,addOns:R,oneTimePrice:$,recurringPrice:j,total:x.value.price*x.value.qty+R*x.value.qty+$+j}}),w=e.computed(()=>{var $,j,U,Q;const R=new Map;return($=s.value)!=null&&$.productLineItem&&R.set((j=s.value)==null?void 0:j.productLineItem.XX_ORD1__Item__c,(U=s.value)==null?void 0:U.productLineItem),(Q=s.value)==null||Q.options.forEach(Y=>{R.set(Y.XX_ORD1__Item__c,Y)}),R}),S=e.computed(()=>{var $;const R=new Map;return x.value&&(($=x.value.categoryOptions)==null?void 0:$.length)>0&&x.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(U=>{U.options.forEach(Q=>{R.set(Q.relationshipInfo.publishKey,Q)})})}),R}),I=e.computed(()=>{if(!x.value)return{};const R=U=>!U||!Array.isArray(U)?[]:U.filter(Q=>Q.apiName&&Q.value!==null&&Q.value!==void 0&&Q.value!=="").map(Q=>({fieldAPIName:Q.apiName,value:Q.dataType==="BOOLEAN"?Q.value?"true":"false":Q.dataType==="REFERENCE"?Q.referenceRecordId||Q.value||"":Q.value||""})),$={itemId:x.value.itemId,qliId:x.value.qliId||null,name:x.value.itemName,qty:x.value.qty||1,salesPrice:x.value.price||0,mrc:x.value.mrc||null,yrc:x.value.yrc||null,attributes:R(x.value.attributes)},j=[];return x.value.categoryOptions.forEach(U=>{U.itemTypes.forEach(Q=>{Q.options.forEach(Y=>{Q.selected.includes(Y.itemId)&&j.push({itemId:Y.itemId,qliId:Y.qliId||null,name:Y.itemName,qty:Y.qty||1,salesPrice:Y.price||0,mrc:Y.mrc||null,yrc:Y.yrc||null,attributes:R(Y.attributes)})})})}),{[x.value.itemId]:{product:$,options:j}}}),A=(R,$)=>{if(!R||!Array.isArray(R))return[];const j=new Map;return $.forEach(U=>{j.set(U.fieldAPIName,U.value)}),R.map(U=>(U.value=j.get(U.fieldAPIName)||null,U))};function k(R){const $=new Map;R.options.forEach(j=>{$.set(j.itemId,j)}),x.value.itemName=R.product.name,x.value.qty=R.product.qty,x.value.price=R.product.salesPrice,x.value.attributes=A(x.value.attributes,R.product.attributes),x.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(U=>{U.selected=[],U.options.forEach(Q=>{$.has(Q.itemId)&&(Q.itemName=$.get(Q.itemId).name,Q.qty=$.get(Q.itemId).qty,Q.price=$.get(Q.itemId).salesPrice,Q.qliId=$.get(Q.itemId).qliId,Q.attributes=A(Q.attributes,$.get(Q.itemId).attributes),U.selected.push(Q.itemId))})})}),x.value={...x.value}}function N(){return{get getConfig(){return I.value},setConfig:k}}function V(R){x.value.qliId&&(x.value.qliBillingPeriod==="Monthly"&&!R?x.value.price=x.value.salesPrice||x.value.mrc:x.value.qliBillingPeriod==="Yearly"&&R&&(x.value.price=x.value.salesPrice)),x.value.categoryOptions.forEach($=>{$.itemTypes.forEach(j=>{j.options.forEach(U=>{U.billingPeriod&&(U.price=(R?U.yrcPrice.offerPrice:U.mrcPrice.offerPrice)||U.price,U.qliId&&(U.qliBillingPeriod==="Monthly"&&!R?U.price=U.salesPrice||U.mrc:U.qliBillingPeriod==="Yearly"&&R&&(U.price=U.salesPrice)))})})})}function L(){x.value=null,y.value=null,u.value=[],s.value=null,a.value=null,h.value=new Map,d.value=!1,p.value.configuration=!1,p.value.lineItem=!1,p.value.productOptionsPricing=!1,p.value.bestOfferPrice=!1,p.value.lineItemAttributes=!1,p.value.save=!1}function M(R,$,j,U){t.value=new M0(R,$,j,U)}async function Z(R,$,j){console.time("CONFIGURATOR INIT CONFIGURATOR"),L(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),c.value=R,f.value=$,o.value=j||n.quoteId;const U=await G();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),x.value=J(U),f.value&&(await F(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),K(x.value),x.value.categoryOptions.forEach(Q=>{Q.itemTypes.forEach(Y=>{Y.options.forEach(ne=>{K(ne),(w.value.has(ne.itemId)||ne.relationshipInfo.relationship==="Kit")&&Y.selected.push(ne.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4")),y.value=JSON.parse(JSON.stringify(x.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR")}async function G(){try{const R={accountId:n.accountId,objectId:o.value,itemId:c.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},$=await t.value.getAvailableConfiguration(R);console.info("getAvailableConfiguration:result",$);const j=$.data.productConfiguration;return j.categoryOptions=R0(j.categoryOptions),j}catch(R){return console.info("error",R.message),!1}}function J(R){h.value.set(f.value,R.attributes),u.value=R.configRules;const $=new Set;return u.value.forEach(j=>{const U=JSON.parse(j.ruleJson);U.optionSelected.forEach(Q=>{$.add(Q)}),U.affectedOptions.forEach(Q=>{$.add(Q)})}),console.info("rulesByPublishKey",$),K(R),R.categoryOptions.forEach(j=>{j.key=j.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),j.itemTypes.forEach(U=>{U.selected=[],U.numberOfColumns||(U.numberOfColumns=1),U.numberOfColumns>1&&(U.lightboxAttributes=!0),U.maxNumber||(U.maxNumber=100),U.minNumber||(U.minNumber=0),U.maxQuantity||(U.maxQuantity=1e4),U.minQuantity||(U.minQuantity=1),U.maxNumber===1?(U.isRadio=!0,U.minMessage="Please select 1 option",U.maxMessage="",U.isKit=U.options.some(Q=>Q.relationshipInfo.relationship==="Kit")):(U.minMessage=`Minimum of ${U.minNumber} selection${U.minNumber!==1?"s":""} required`,U.maxMessage=`Maximum of ${U.maxNumber} selection${U.maxNumber!==1?"s":""} allowed`),U.options.forEach(Q=>{j.showImage=j.showImage||!!Q.defaultImageURL,Q.showAttributesModal=!1,Q.qty=U.minQuantity||1,Q.getTags=()=>(Q.attributes=Q.attributes||[],Q.attributes.filter(Y=>Y.value!==null&&Y.value!=="").map(Y=>({label:Y.label,value:Y.value}))),Object.defineProperty(Q,"isDisabled",{get:function(){return Q.relationshipInfo.relationship==="Kit"||(U.isRadio?U.isKit:!U.selected.includes(Q.itemId)&&U.maxNumber===U.selected.length)}}),K(Q)})})}),R}function K(R){R.isAttributes=R.attributes&&R.attributes.length>0;const $=R.catalogItem;if(w.value.has(R.itemId)){const j=w.value.get(R.itemId);R.qliId=j.Id,R.qty=j.XX_ORD1__QTY__c,R.itemName=j.XX_ORD1__Line_Description__c,R.billingPeriod=j.XX_ORD1__Billing_Period__c,R.price=j.XX_ORD1__Sales_Price__c,R.billingPeriod?R.price=j.XX_ORD1__Sales_Price__c||j.XX_ORD1__MRC__c:R.price=j.XX_ORD1__NRC__c||j.XX_ORD1__Sales_Price__c,R.salesPrice=j.XX_ORD1__Sales_Price__c,R.nrc=j.XX_ORD1__NRC__c,R.mrc=j.XX_ORD1__MRC__c,R.qliBillingPeriod=j.XX_ORD1__Billing_Period__c,h.value.set(R.qliId,R.attributes)}else R.itemName=$.XX_ORD1__Line_Description__c||R.itemName,R.price=$.XX_ORD1__Negotiated_Price__c||$.XX_ORD1__NRC_for_New__c,R.nrcPrice=$.XX_ORD1__NRC_for_New__c,F0(R)}async function F(){p.value.lineItem=!0,console.info("getLineItems",o.value,f.value);try{const R={objectId:o.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:f.value}},$=await t.value.getLineItems({request:JSON.stringify(R)});return($.data.products||[]).forEach(U=>{const Q=U.productLineItem;Q.Id===f.value?s.value=U:_.value.push(Q)}),console.info("lineItem.value",s.value),console.info("configurableLineItems.value",_.value),p.value.lineItem=!1,$}catch(R){return console.info("error",R.message),p.value.lineItem=!1,!1}}async function E(R){console.info("getRecords");try{const $=await window.productManagerController.getRecords({request:JSON.stringify(R)});return console.info("getRecords:result",$),JSON.parse($.data)}catch($){return console.info("error",$.message),!1}}async function T(){d.value=!0,p.value.save=!0,console.info("maintainQuoteConfiguration");const R=[],$=[];x.value.categoryOptions.forEach(Q=>{Q.itemTypes.forEach(Y=>{Y.options.forEach(ne=>{Y.selected.includes(ne.itemId)?R.push(D(ne)):ne.qliId&&$.push(ne.qliId)})})});const j={objectId:o.value,eCatalogId:n.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:$,grandFatheredOptionsToRemove:[],productLineItem:{...D(x.value),optionLineItems:R}};console.info("maintainQuoteConfiguration:request",j);const U=await t.value.maintainQuoteConfiguration({request:JSON.stringify(j)});if(console.info("maintainQuoteConfiguration:result",U),U!=null&&U.error){const Q={title:"Unable to Save Configuration",description:U.error,button:{label:"Back to Configuration",action:()=>{d.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+o.value)}}};i.errorPopup=Q}else y.value=JSON.parse(JSON.stringify(x.value)),console.info("maintainQuoteConfiguration:result",U);p.value.save=!1}function D(R){const $={};R.isAttributes&&R.attributes.forEach(U=>{U.apiName.includes(".")||(U.dataType==="BOOLEAN"?$[U.apiName]=U.value?"true":"false":U.dataType==="REFERENCE"?$[U.apiName]=U.referenceRecordId:$[U.apiName]=U.value)});const j={attributes:$,itemId:R.itemId,lineItemId:R.qliId,lineDescription:R.itemName,qty:R.qty,billingPeriod:R.billingPeriod,...R.offer};return R.billingPeriod&&m.value&&!n.isSinglePricingSchema&&(j.billingPeriod=l.value?"Yearly":"Monthly"),!n.isSinglePricingSchema&&!R.billingPeriod?j.nrcPrice=R.price:(j.applyOnField="Catalog Price",j.salesPrice=R.price,j.nrcPrice=R.nrcPrice),j}async function P(){const R={objectId:n.accountId,productItemId:c.value};try{let $=await t.value.getProductCrossSells(R);const{crossSells:j,offerResult:U}=$.data;if(j.length===0)return $;const Q=new Map;return U.forEach(Y=>{Q.set(Y.eCatalogItemId,{...Y,...Y.pricingTypes[0]})}),j.forEach(Y=>{Y.loading=!1,Y.Name=Y.XX_ORD1__Line_Description__c||Y.XX_ORD1__Item__r.Name,Y.Description=Y.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,Q.has(Y.Id)?(Y.Price=Q.get(Y.Id).offerPrice,Y.priceFormatted=Q.get(Y.Id).formattedOfferPrice,Y.offer={offerDiscount:Q.get(Y.Id).offerDiscount,offerId:Q.get(Y.Id).offerId,offerType:Q.get(Y.Id).offerType}):(Y.Price=Y.XX_ORD1__List_Price2__c,Y.priceFormatted=Y.XX_ORD1__List_Price2__c,Y.offer={offerDiscount:0,offerId:null,offerType:null})}),j}catch($){return console.info("error",$.message),!1}}const X=R=>!R||!Array.isArray(R)?[]:R.filter($=>$.apiName&&$.value!==null&&$.value!==void 0&&$.value!=="").map($=>({attrName:$.apiName,attrValue:$.dataType==="BOOLEAN"?$.value:$.value||"",dataType:$.dataType}));async function q(R,$){var Y,ne;const j={product:{publishKey:x.value.publishKey,attributes:X(x.value.attributes),lineDescription:x.value.itemName,meta:{XX_ORD1__Sales_Price__c:x.value.price,XX_ORD1__MRC__c:x.value.mrc,XX_ORD1__NRC__c:x.value.nrc,XX_ORD1__YRC__c:x.value.yrc,quantity:x.value.qty}},options:[]};x.value.categoryOptions.forEach(ce=>{ce.itemTypes.forEach(fe=>{fe.options.forEach(se=>{fe.selected.includes(se.itemId)&&j.options.push({publishKey:se.publishKey,attributes:X(se.attributes),lineDescription:se.itemName,meta:{XX_ORD1__Sales_Price__c:se.price,XX_ORD1__MRC__c:se.mrc,XX_ORD1__NRC__c:se.nrc,XX_ORD1__YRC__c:se.yrc,quantity:se.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",j.options);const U={itemId:c.value,currentConfig:j,selected:R?{publishKey:(Y=R.relationshipInfo)==null?void 0:Y.publishKey,attributes:R.attributes,lineDescription:R.itemName}:{},unselected:$?{publishKey:(ne=$.relationshipInfo)==null?void 0:ne.publishKey,attributes:$.attributes,lineDescription:$.itemName}:{}};return await t.value.evaluateConfigurationSelection({request:JSON.stringify(U)})}async function z(R){const $={objectId:o.value,lstLIRequest:[{eCatalogItemId:R.Id,quantity:1,offerApplicable:R.offer}]};try{const j=await t.value.addLines({request:JSON.stringify($)});console.info("addLines:result",j)}catch(j){return console.info("error",j.message),!1}}return{itemId:c,configuration:x,_configurationCopy:y,lineItem:s,savedScreen:d,loading:p,summary:v,addOns:C,summaryPrices:B,optionByItemId:w,attributesByQLIId:h,optionByPublishKey:S,showYearlyPricing:l,isYearlyPricingExist:m,isChangedConfiguration:b,isRecurringPricingSchema:g,configurableLineItems:_,initializeController:M,exposeProperties:N,updateCurrentConfiguration:k,changePricingScheme:V,addLines:z,resetConfigurator:L,getRecords:E,getProductCrossSells:P,initConfigurator:Z,maintainQuoteConfiguration:T,evaluateConfigSelection:q}}),q0={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},$0={class:"ect-flex ect-items-center ect-gap-3"},j0={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},H0={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},U0=e.createElementVNode("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),z0={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},X0=e.createElementVNode("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),K0={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},Q0=e.createElementVNode("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),Z0={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},G0=["data-test-id"],W0={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},J0={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},Y0={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},ed={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},td={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},nd={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},rd=e.createElementVNode("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),od={class:"ect-flex ect-flex-col ect-gap-4"},ad=["data-test-id","onClick"],id={class:"ect-flex ect-items-center ect-justify-center"},ld={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},sd=["data-test-id"],cd=["data-test-id"],dd={key:3,class:"ect-bg-light-bg-x ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-sticky ect-bottom-0 ect-pb-4"},ud={class:"ect-flex ect-flex-col ect-gap-4"},fd={class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},hd={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},pd={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-next-product"},md={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},gd={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},yd={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},xd={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},vd={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},_d={__name:"ConfiguratorRecommend",setup(t){const i=ct(),n=Lt(),r=dn(),o=e.computed(()=>i.configuration),c=e.ref(!0),f=e.ref(""),x=e.ref([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"},{icon:"menu",title:"Back to Quote List Page",description:"Returns to the main quote list page.",link:"/quote-item",action:"backToQuoteList"}]),y=e.ref(null),u=e.ref([]),s=async d=>{d.loading=!0,await i.addLines(d),d.disabled=!0,d.loading=!1},_=d=>{d.action==="backToConfiguration"?i.savedScreen=!1:d.action==="backToQuoteList"?r.push("/quote-item?id="+n.quoteId):d.link&&r.push(d.link)};async function a(){const d=i.configurableLineItems,p=d.filter(g=>g.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;f.value=`(${d.length-p}/${d.length})`;const l=d.find(g=>g.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&g.Id!=i.qliId);return y.value=l?{Name:l.XX_ORD1__Line_Description__c,Description:l.XX_ORD1__Product_Description__c,Price:l.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:l.XX_ORD1__Item__c,Id:l.Id}:null,d}async function h(){i.resetConfigurator(),r.push({path:"/configurator/"+y.value.XX_ORD1__Item__c+"/"+y.value.Id}),i.initConfigurator(y.value.XX_ORD1__Item__c,y.value.Id)}return e.onBeforeMount(async()=>{c.value=!0;const d=await a(),p=await i.getProductCrossSells(),l=new Set;d.forEach(g=>{l.add(g.XX_ORD1__Item__c)}),p.forEach(g=>{g.disabled=l.has(g.XX_ORD1__Item__c)}),u.value=p||[],c.value=!1}),(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",q0,[e.createElementVNode("div",$0,[e.createVNode(we,{icon:"arrow",symbol:"",size:12,onClick:p[0]||(p[0]=l=>e.unref(i).savedScreen=!1)}),e.createElementVNode("h2",j0,e.toDisplayString(o.value.itemName),1)]),e.unref(i).loading.save?(e.openBlock(),e.createElementBlock("div",H0,[e.createVNode(ya,{svg:""}),U0])):(e.openBlock(),e.createElementBlock("div",z0,[e.createVNode(we,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),X0]))]),c.value?(e.openBlock(),e.createBlock(ga,{key:0,type:"recommendations",rows:4})):u.value.length>0?(e.openBlock(),e.createElementBlock("div",K0,[Q0,e.createElementVNode("div",Z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.Id||g,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-${l.Id||g}`},[e.createElementVNode("div",W0,[e.createElementVNode("h4",J0,e.toDisplayString(l.Name),1),e.createElementVNode("p",Y0,e.toDisplayString(l.Description),1)]),e.createElementVNode("div",ed,[e.createElementVNode("div",td,e.toDisplayString(e.unref(Ge)(l.Price)),1),e.createVNode(Je,{btype:l.disabled?"secondary":"primary","button-style":l.disabled?"normal":"outlined",size:"medium",class:e.normalizeClass({"ect-w-[120px]":l.loading}),loading:l.loading,disabled:l.disabled||l.loading,"data-test-id":`configurator-recommend-button-add-${l.Id||g}`,onClick:m=>s(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.loading?"":l.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,G0))),128))])])):(e.openBlock(),e.createElementBlock("div",nd,[rd,e.createElementVNode("div",od,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.title||g,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-${g}`,onClick:m=>_(l)},[e.createElementVNode("div",id,[e.createVNode(we,{icon:l.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${g}`},null,8,["icon","data-test-id"])]),e.createElementVNode("div",ld,[e.createElementVNode("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-${g}`},e.toDisplayString(l.title),9,sd),e.createElementVNode("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-${g}`},e.toDisplayString(l.description),9,cd)])],8,ad))),128))])])),y.value?(e.openBlock(),e.createElementBlock("footer",dd,[e.createElementVNode("div",ud,[e.createElementVNode("h3",fd," Configuere next product from your quote "+e.toDisplayString(f.value),1),e.createElementVNode("div",hd,[e.createElementVNode("div",pd,[e.createElementVNode("div",md,[e.createElementVNode("h4",gd,e.toDisplayString(y.value.Name),1),e.createElementVNode("p",yd,e.toDisplayString(y.value.Description),1)]),e.createElementVNode("div",xd,[e.createElementVNode("div",vd,e.toDisplayString(e.unref(Ge)(y.value.Price)),1),e.createVNode(Je,{btype:"primary","button-style":"filled",size:"medium","data-test-id":"configurator-recommend-button-add-next-product",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" Configure Now ")]),_:1})])])])])])):e.createCommentVNode("",!0)],64))}},bd=["data-test-id"],Cd=xe({__name:"AppPill",props:{variant:{type:String,default:"",validator:t=>["success","error",""].includes(t)},dataTestId:{type:String,default:""}},setup(t){return(i,n)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ect-pill",{"ect-pill-success":t.variant==="success","ect-pill-error":t.variant==="error","ect-pill-default":!t.variant}]),"data-test-id":t.dataTestId},[e.renderSlot(i.$slots,"default",{},void 0,!0)],10,bd))}},[["__scopeId","data-v-c7f05fa0"]]),Ed=["data-test-id"],kd=["data-test-id"],wd=["data-test-id","onClick"],Nd=["data-test-id"],Ad=xe({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:t=>t.every(i=>typeof i=="object"&&i.title&&i.key&&(i.sections===void 0||Array.isArray(i.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(t,{emit:i}){const n=t,r=i,o=e.computed(()=>{var f;return n.modelValue||((f=n.tabs[0])==null?void 0:f.key)||""}),c=f=>{r("update:modelValue",f),r("tab-change",f)};return(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-page-tabs","data-test-id":t.dataTestId},[t.showTabs?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ect-page-tabs-header",[{"ect-tab-border":t.border}]]),"data-test-id":`${t.dataTestId}-header`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,y=>(e.openBlock(),e.createElementBlock("button",{key:y.key,class:e.normalizeClass(["ect-page-tab-button",`ect-page-tab-button${o.value===y.key?"-active":""} ${y.tabClass||""}`]),"data-test-id":`${t.dataTestId}-tab-${y.key}`,onClick:u=>c(y.key)},[e.createTextVNode(e.toDisplayString(y.title)+" ",1),y.pill!==void 0&&y.pill!==null?(e.openBlock(),e.createBlock(Cd,{key:0,class:"ect-ml-2",variant:y.pillStyle,"data-test-id":`${t.dataTestId}-tab-${y.key}-pill`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.pill),1)]),_:2},1032,["variant","data-test-id"])):e.createCommentVNode("",!0)],10,wd))),128))],10,kd)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"ect-page-tab-content","data-test-id":`${t.dataTestId}-content`},null,8,Nd)],8,Ed))}},[["__scopeId","data-v-f22cb1ed"]]),Bd=["data-test-id"],Sd=["disabled","data-test-id"],Od=["value","disabled","data-test-id"],Id=["disabled","data-test-id"],Qn={__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(t,{emit:i}){const n=t,r=i,o=e.computed(()=>n.min==null?0:n.min),c=e.computed(()=>n.max==null?999:n.max),f=(v,C,B)=>Math.min(Math.max(v,C),B),x=v=>{if(v==null||v==="")return NaN;const C=Number(v);return Number.isFinite(C)?C:NaN},y=e.ref(null),u=e.ref(n.value??o.value),s=v=>{u.value=f(v,o.value,c.value)};n.value!==null&&s(n.value);const _=e.computed(()=>u.value),a=e.computed(()=>y.value!=null?y.value:String(_.value)),h=e.computed(()=>n.disabled||_.value<=o.value),d=e.computed(()=>n.disabled||_.value>=c.value);function p(v){v!==n.value&&(u.value=v,r("update:value",v),r("change",v))}function l(){if(h.value)return;const v=f(_.value-1,o.value,c.value);y.value=null,p(v)}function g(){if(d.value)return;const v=f(_.value+1,o.value,c.value);y.value=null,p(v)}function m(v){const B=String(v.target.value??"").replace(/\D+/g,"");y.value=B}function b(){const v=x(y.value),C=o.value,B=f(Number.isNaN(v)?C:v,o.value,c.value);y.value=null,p(B)}return(v,C)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":t.dataTestId},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["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":`${t.dataTestId}-decrement`,onClick:l}," - ",10,Sd),e.createElementVNode("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:t.empty?"":a.value,disabled:t.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":`${t.dataTestId}-input`,onInput:m,onBlur:b},null,40,Od),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["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":d.value,"ect-cursor-not-allowed":d.value}]),disabled:d.value,"data-test-id":`${t.dataTestId}-increment`,onClick:g}," + ",10,Id)],8,Bd))}},Td={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"},Vd={"data-test-id":"configurator-footer-quantity"},Dd={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"},Ld=["data-test-id"],Fd=["data-test-id"],Rd=["data-test-id"],Pd=["data-test-id"],Md={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(t,{emit:i}){const n=ct(),r=t,o=e.ref(r.item),c=e.computed(()=>{const y=n.summaryPrices,u=[];return n.isRecurringPricingSchema?(u.push({label:"One Time Price",value:y.oneTimePrice,highlight:!1}),u.push({label:n.showYearlyPricing?"Yearly Price":"Monthly Price",value:y.recurringPrice,highlight:!1})):(u.push({label:"Base Price",value:y.basePrice,highlight:!1}),u.push({label:"Add Ons",value:y.addOns,highlight:!1}),u.push({label:"Total Price",value:y.total,highlight:!1})),u}),f=i,x=()=>{r.disabled||f("continue")};return(y,u)=>(e.openBlock(),e.createElementBlock("footer",Td,[e.createElementVNode("div",Vd,[e.createVNode(Qn,{value:o.value.qty,"onUpdate:value":u[0]||(u[0]=s=>o.value.qty=s),min:1,max:999,disabled:t.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),e.createElementVNode("div",Dd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(s,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_},[e.createElementVNode("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${_}`},[e.createElementVNode("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${_}`},e.toDisplayString(s.label),9,Fd),e.createElementVNode("span",{class:e.normalizeClass(["ect-text-left",s.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-${_}`},e.toDisplayString(e.unref(Ge)(s.value)),11,Rd)],8,Ld),_<c.value.length-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${_}`},null,8,Pd)):e.createCommentVNode("",!0)],64))),128))]),e.createVNode(Je,{class:"ect-min-w-[100px]",btype:t.disabled?"secondary":"primary",disabled:t.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.btnText),1)]),_:1},8,["btype","disabled"])]))}},qd={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},$d={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"},jd={class:"ect-flex ect-flex-col"},Hd={class:"ect-font-bold ect-text-text-success ect-leading-tight"},Ud=["innerHTML"],zd={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},Xd={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},Kd={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},Qd={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(t){return(i,n)=>(e.openBlock(),e.createElementBlock("section",qd,[e.createElementVNode("header",$d,[e.createElementVNode("div",jd,[e.createElementVNode("h2",Hd,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:t.description},null,8,Ud)):e.createCommentVNode("",!0)]),t.message?(e.openBlock(),e.createElementBlock("div",zd,[e.createVNode(we,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),e.createElementVNode("span",Xd,e.toDisplayString(t.message),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Kd,[e.renderSlot(i.$slots,"default")])]))}},Zd={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(t){const i=t,n=e.ref(null);let r=null;return e.onMounted(()=>{n.value&&!r&&(r=n.value.attachShadow({mode:"open"}),r.innerHTML=i.content)}),e.watch(()=>i.content,o=>{r&&(r.innerHTML=o)}),(o,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"host",ref:n},null,512))}},Gd=["data-test-id"],Wd=["data-test-id"],Jd=["data-test-id"],Yd=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{id:"Group"},[e.createElementVNode("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],e1=["data-test-id"],t1=["data-test-id"],n1=["data-test-id"],r1=["data-test-id"],o1=["data-test-id"],a1=["data-test-id","innerHTML"],dt={__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(t){const i=t,n=e.computed(()=>{const r=i.value;if(typeof r!="string")return!1;const o=new DOMParser().parseFromString(r,"text/html");return Array.from(o.body.childNodes).some(c=>c.nodeType===1)});return(r,o)=>t.addButton?(e.openBlock(),e.createElementBlock("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":t.dataTestId},[e.createElementVNode("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":`${t.dataTestId}-content`},[e.createElementVNode("div",{"data-test-id":`${t.dataTestId}-add-icon`},Yd,8,Jd),e.createTextVNode(" "+e.toDisplayString(t.label),1)],8,Wd)],8,Gd)):t.editButton?(e.openBlock(),e.createElementBlock("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":t.dataTestId},[e.createElementVNode("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":`${t.dataTestId}-content`},e.toDisplayString(t.label),9,t1)],8,e1)):(e.openBlock(),e.createElementBlock("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":t.dataTestId},[e.createElementVNode("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${t.dataTestId}-label`},e.toDisplayString(t.label),9,r1),t.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${t.dataTestId}-separator`}," : ",8,o1)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(Zd,{key:1,content:t.value},null,8,["content"])):t.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${t.dataTestId}-value`,innerHTML:t.value},null,8,a1)):e.createCommentVNode("",!0)],8,n1))}},i1=["data-test-id"],l1=["data-test-id"],s1=["data-test-id"],c1=["type","step","min","data-test-id"],Vr=xe({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:t=>["string","number","currency"].includes(t)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(t,{expose:i,emit:n}){const r=t,o=n,c=e.ref(!1),f=e.ref(!1),x=e.ref(""),y=e.ref(null),u=e.computed(()=>r.type==="currency"?g(r.modelValue):r.type==="number"?m(r.modelValue):r.modelValue),s=e.computed(()=>r.type==="string"?"text":"number"),_=e.computed(()=>r.type==="currency"?"0.01":void 0),a=e.computed(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?x.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?x.value=parseFloat(r.modelValue)||"0":x.value=r.modelValue,c.value=!0,e.nextTick(()=>{y.value&&(y.value.focus(),y.value.select())}))},d=()=>{let b=x.value;if(r.type==="number"||r.type==="currency"){const v=parseFloat(x.value);isNaN(v)?b=r.modelValue:b=r.type==="currency"?v.toFixed(2):v.toString()}b!==r.modelValue&&(o("update:modelValue",b),o("change",b)),c.value=!1},p=()=>{x.value=r.modelValue,c.value=!1},l=()=>{c.value&&d()},g=b=>!b||isNaN(b)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(b)),m=b=>!b||isNaN(b)?"0":new Intl.NumberFormat("en-US").format(parseFloat(b));return e.watch(()=>r.modelValue,b=>{c.value||(x.value=b)}),i({startEditing:h,saveChanges:d,cancelEditing:p}),(b,v)=>{const C=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":t.dataTestId,onMouseenter:v[1]||(v[1]=B=>f.value=!0),onMouseleave:v[2]||(v[2]=B=>f.value=!1)},[c.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${t.dataTestId}-input-wrapper`},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:y,"onUpdate:modelValue":v[0]||(v[0]=B=>x.value=B),type:s.value,step:_.value,min:a.value,class:e.normalizeClass(["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",b.$attrs.class]),"data-test-id":`${t.dataTestId}-input`,onKeyup:[e.withKeys(d,["enter"]),e.withKeys(p,["esc"])],onBlur:d},null,42,c1),[[e.vModelDynamic,x.value]])],8,s1)),[[C,l]]):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!t.disabled}]),"data-test-id":`${t.dataTestId}-display`,onClick:h},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps(b.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${t.dataTestId}-text`}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value)+" ",1),e.createVNode(we,{class:e.normalizeClass(f.value&&!t.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${t.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,l1))],40,i1)}}},[["__scopeId","data-v-5cd60070"]]),d1=["data-test-id","data-publish-key"],u1={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"},f1={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},h1={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"},p1=["src","alt"],m1={class:"ect-flex-1 ect-min-w-0"},g1={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},y1={class:"ect-flex ect-flex-row ect-gap-3"},x1=e.createElementVNode("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1),v1={class:"ect-flex ect-flex-col ect-max-w-[125px]"},_1={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},b1=["innerHTML"],C1={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},E1=["data-test-id"],k1=["data-test-id"],w1={key:1,class:"ect-inline-block ect-mb-2"},N1={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},A1={class:"ect-flex ect-items-start ect-gap-2"},B1={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},S1=["src","alt"],O1={class:"ect-flex-1 ect-min-w-0"},I1={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},T1=["innerHTML"],V1={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},D1={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},L1=["data-test-id"],F1=["data-test-id"],R1={key:1,class:"ect-inline-block ect-mb-2"},P1={class:"ect-flex ect-justify-between ect-items-center"},M1={class:"ect-flex ect-flex-col"},q1=e.createElementVNode("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1),$1={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},j1={__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(t,{emit:i}){const n=t,r=i,o=e.ref(null),c=e.ref(0),f=e.ref(n.item),x=e.computed(()=>f.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":n.disabled?"ect-bg-light-bg-x ect-border-gray-200":n.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),y=e.computed({get:()=>n.quantity,set:d=>r("update:quantity",d)}),u=e.computed({get:()=>n.name,set:d=>r("update:name",d)}),s=d=>{r("update:quantity",d)},_=e.computed(()=>{if(c.value===0)return n.tags;const p=Math.floor(c.value/120);return n.tags.slice(0,Math.max(1,p))}),a=e.computed(()=>Math.max(0,n.tags.length-_.value.length)),h=()=>{if(o.value){const d=o.value,p=80,l=120,g=32,m=64;c.value=d.offsetWidth-p-l-g-m}};return e.onMounted(()=>{e.nextTick(()=>{h()})}),e.watch(()=>n.tags,()=>{e.nextTick(()=>{h()})},{deep:!0}),e.onMounted(()=>{window.addEventListener("resize",h)}),(d,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:o,class:e.normalizeClass(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",x.value]),"data-test-id":`configurator-item-${t.item.itemId}`,"data-publish-key":t.item.publishKey},[t.item.relationshipInfo.relationship==="Kit"?(e.openBlock(),e.createElementBlock("div",u1," KIT ")):e.createCommentVNode("",!0),t.size===1?(e.openBlock(),e.createElementBlock("div",f1,[t.showImage?(e.openBlock(),e.createElementBlock("div",h1,[t.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.imageUrl,alt:u.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,p1)):(e.openBlock(),e.createBlock(we,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):e.createCommentVNode("",!0),e.createElementVNode("div",m1,[e.createElementVNode("div",g1,[e.createVNode(Vr,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=l=>u.value=l),tag:"h3","data-test-id":"itemId"+t.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),e.createElementVNode("div",y1,[e.createElementVNode("div",{onClick:p[2]||(p[2]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(Qn,{value:y.value,"onUpdate:value":p[1]||(p[1]=l=>y.value=l),min:t.minQuantity,max:t.maxQuantity,"data-test-id":`configurator-item-counter-${t.item.itemId}`,onChange:s},null,8,["value","min","max","data-test-id"])]),x1,e.createElementVNode("div",v1,[e.createVNode(Vr,{modelValue:f.value.price,"onUpdate:modelValue":p[3]||(p[3]=l=>f.value.price=l),tag:"p",type:"currency","data-test-id":"itemId"+t.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),e.createElementVNode("div",_1,[e.renderSlot(d.$slots,"selection-control")])])]),e.createElementVNode("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:t.description},null,8,b1),t.isAttributes&&t.showAttributes&&t.selected?(e.openBlock(),e.createElementBlock("div",C1,[f.value.getTags().length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,g)=>(e.openBlock(),e.createElementBlock("span",{key:g,class:"ect-inline-block"},[e.createVNode(dt,{label:l.label,value:l.value},null,8,["label","value"])]))),128)),a.value>0?(e.openBlock(),e.createElementBlock("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-${t.item.itemId}`,onClick:p[4]||(p[4]=e.withModifiers(()=>{},["stop"]))}," +"+e.toDisplayString(a.value)+" more ",9,E1)):e.createCommentVNode("",!0),t.selected?(e.openBlock(),e.createElementBlock("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${t.item.itemId}`,onClick:p[5]||(p[5]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Edit attributes","edit-button":""})],8,k1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("span",w1,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:p[6]||(p[6]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Add attributes","add-button":""})])]))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",N1,[e.createElementVNode("div",A1,[t.showImage?(e.openBlock(),e.createElementBlock("div",B1,[t.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.imageUrl,alt:t.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,S1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",O1,[e.createElementVNode("h3",I1,e.toDisplayString(t.name),1),e.createElementVNode("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:t.description},null,8,T1)]),e.createElementVNode("div",V1,[e.renderSlot(d.$slots,"selection-control")])]),t.isAttributes&&t.showAttributes&&t.selected?(e.openBlock(),e.createElementBlock("div",D1,[f.value.getTags().length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,g)=>(e.openBlock(),e.createElementBlock("span",{key:g,class:"ect-inline-block"},[e.createVNode(dt,{label:l.label,value:l.value},null,8,["label","value"])]))),128)),a.value>0?(e.openBlock(),e.createElementBlock("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-${t.item.itemId}`,onClick:p[7]||(p[7]=e.withModifiers(()=>{},["stop"]))}," +"+e.toDisplayString(a.value)+" more ",9,L1)):e.createCommentVNode("",!0),t.selected?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${t.item.itemId}`,onClick:p[8]||(p[8]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Edit attributes","edit-button":""})],8,F1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("span",R1,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:p[9]||(p[9]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Add attributes","add-button":""})])]))])):e.createCommentVNode("",!0),e.createElementVNode("div",P1,[e.createElementVNode("div",{onClick:p[11]||(p[11]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(Qn,{value:y.value,"onUpdate:value":p[10]||(p[10]=l=>y.value=l),min:t.minQuantity,max:t.maxQuantity,"data-test-id":`configurator-item-counter-${t.item.itemId}`,onChange:s},null,8,["value","min","max","data-test-id"])]),e.createElementVNode("div",M1,[q1,e.createVNode(Vr,{modelValue:f.value.price,"onUpdate:modelValue":p[12]||(p[12]=l=>f.value.price=l),tag:"p",type:"currency","data-test-id":"itemId"+t.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),t.selected&&t.isAttributes?(e.openBlock(),e.createElementBlock("div",$1,[e.renderSlot(d.$slots,"default")])):e.createCommentVNode("",!0)],10,d1))}},H1={"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":"."},U1={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"?H1[this.locale]:"."},methods:{handlerInput(t){const i=t.target.value;this.type==="currency"?this.$emit("update:modelValue",i.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",i)},preventNonNumeric(t){if(this.type==="number"){const i=this.decimalPrecision,n=t.target.value,r=t.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&i===0){t.preventDefault();return}if(r==="."&&n.includes(".")){t.preventDefault();return}if(r==="."||n.includes(".")&&!n.endsWith(".")&&r!=="Backspace"){const o=n.split(".");if(o.length>1&&o[1].length>=i){t.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){t.preventDefault();return}}if(t.key==="Backspace"||this.ctrl)return!0;if(t.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&t.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(t.key)||t.preventDefault()}return!0},handlerKeyup(t){t.key==="Control"&&(this.ctrl=!1)}}},z1=["data-test-id"],X1=["for","data-test-id"],K1=["data-test-id"],Q1=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],Z1=["data-test-id"],G1=["data-test-id"];function W1(t,i,n,r,o,c){const f=e.resolveComponent("AppIcon");return e.openBlock(),e.createElementBlock("div",{class:"input","data-test-id":n.dataTestId},[n.label&&n.showLabel?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({error_color:!!n.error}),for:n.label,"data-test-id":`${n.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(n.label)+" ",1),n.required?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass({error_color:!!n.error})},"*",2)):e.createCommentVNode("",!0)],10,X1)):e.createCommentVNode("",!0),n.editMode?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["input-wrapper ect-w-full",{errorBorder_color:!!n.error,highlight:c.isHighlight&&n.highlight}]),"data-test-id":`${n.dataTestId}-wrapper`},[n.icon?(e.openBlock(),e.createBlock(f,{key:0,class:"input-wrapper_icon",icon:n.icon,hover:n.ihover,color:n.icolor,size:19,disabled:n.idisabled,custom:n.icustom,tooltip:n.itooltip,"data-test-id":`${n.dataTestId}-icon`,direction:"top-right",onClick:i[0]||(i[0]=x=>t.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):e.createCommentVNode("",!0),e.createElementVNode("input",{id:n.label,class:e.normalizeClass(`ectheme-input-box ${n.size}`),type:n.type,style:e.normalizeStyle({width:n.icon?"calc(100% - 36px)":"100%",height:`${n.height}px`,textAlign:n.textAlignment}),name:n.name,disabled:n.disabled,placeholder:n.placeholder,value:c.getValue,maxlength:n.max,readonly:n.isReadOnly,"data-test-id":`${n.dataTestId}-input`,onInput:i[1]||(i[1]=(...x)=>c.handlerInput&&c.handlerInput(...x)),onKeydown:i[2]||(i[2]=(...x)=>c.preventNonNumeric&&c.preventNonNumeric(...x)),onKeyup:i[3]||(i[3]=(...x)=>c.handlerKeyup&&c.handlerKeyup(...x)),onBlur:i[4]||(i[4]=x=>t.$emit("blur"))},null,46,Q1)],10,K1)):e.createCommentVNode("",!0),n.editMode?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",{key:2,class:"value","data-test-id":`${n.dataTestId}-value`},e.toDisplayString(c.getValue),9,Z1)),c.error_message?(e.openBlock(),e.createElementBlock("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${n.dataTestId}-error`},e.toDisplayString(c.error_message),9,G1)):e.createCommentVNode("",!0)],8,z1)}const J1=xe(U1,[["render",W1],["__scopeId","data-v-032ca141"]]),Y1={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},eu=["data-test-id"];function tu(t,i,n,r,o,c){return e.openBlock(),e.createElementBlock("div",{class:"spinner","data-test-id":n.dataTestId},null,8,eu)}const nu={name:"CustomDropdown",components:{AppIcon:we,AtomSpinner:xe(Y1,[["render",tu],["__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 t=this.value.toLowerCase();return this.options.filter(i=>JSON.stringify(i).toLowerCase().includes(t))}else return this.options},getSelected(){let t=null;if(this.modelValue)t=this.options.find(i=>i[this.property.key]===this.modelValue);else if(!this.search){const i=this.options.find(n=>n[this.property.key]==="");i?t=i:this.placeholder?t={[this.property.value]:this.placeholder,[this.property.key]:""}:t={[this.property.value]:"--Select--",[this.property.key]:""}}return t||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const t=this.$refs.triggerElement.getBoundingClientRect(),i=250,n=window.innerHeight-t.bottom,r=t.top;return n<i&&r>i},dropdownStyle(){if(!this.$refs.triggerElement)return{};const t=this.$refs.triggerElement.getBoundingClientRect(),i=250,n=window.innerHeight-t.bottom,r=t.top,o=n<i&&r>i;return{position:"absolute",top:o?"auto":"100%",bottom:o?"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 t=this.$refs.triggerElement.getBoundingClientRect(),i=200,n=window.innerHeight-t.bottom,r=t.top,o=n<i&&r>i;this.teleportStyle={position:"absolute",top:`${o?t.top-i:t.bottom}px`,left:`${t.left}px`,width:`${t.width}px`,zIndex:9999}},subFieldsText(t){if(!this.display||this.display.length<1)return"";const i=[];return this.display.forEach(n=>{const r=this.subField(t,n);r&&i.push(r)}),i.join(" | ")},subField(t,i){return i?i.split(".").reduce((o,c)=>o[c]||"",t):t},lookupSearchHandler:Vt(function(t){this.value=t,this.search&&!this.select&&this.$emit("search",t)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(t){t&&(this.value="",this.$emit("update:modelValue",t[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(t=!1){(!this.isHover||t)&&!this.disabled&&(t?(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--}}},ru=["data-test-id"],ou=["for","data-test-id"],au={class:"input-container-box ect-grow ect-w-full"},iu=["data-test-id"],lu=["placeholder","disabled","data-test-id"],su=["data-test-id"],cu=["title","data-test-id"],du=["data-test-id"],uu=["data-test-id"],fu=["data-test-id"],hu=["data-test-id"],pu=["data-test-id","onClick"],mu=["data-test-id"],gu={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},yu=["data-test-id"],xu=["data-test-id"],vu=["data-test-id"],_u=["title","data-test-id"],bu=["data-test-id"];function Cu(t,i,n,r,o,c){const f=e.resolveComponent("AppIcon"),x=e.resolveComponent("AtomSpinner");return e.openBlock(),e.createElementBlock("div",{ref:"dropdownWrapper",class:e.normalizeClass(["customdropdown input-container",{dark:n.dropdownTheme==="dark"}]),"data-test-id":n.dataTestId,onMouseenter:i[7]||(i[7]=y=>t.isHover=!0),onMouseleave:i[8]||(i[8]=y=>t.isHover=!1)},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["title_label",{error_color:!!n.error}]),for:n.label,"data-test-id":`${n.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(n.label)+" ",1),n.required?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass({error_color:!!n.error})},"*",2)):e.createCommentVNode("",!0)],10,ou)):e.createCommentVNode("",!0),e.createElementVNode("div",au,[e.createElementVNode("div",{ref:"triggerElement",class:e.normalizeClass(["input-wrapper ectheme-input-box ect-w-full",{disabled:n.disabled,"input-error":n.error,highlight:c.isHighlight&&n.highlight,"size-large":n.size==="large","size-medium":n.size==="medium"||n.size==="small"}]),"data-test-id":`${n.dataTestId}-trigger`,tabindex:"0",onFocusin:i[2]||(i[2]=(...y)=>c.handlerFocusIn&&c.handlerFocusIn(...y)),onFocusout:i[3]||(i[3]=y=>c.onInputFocusedOut(!1)),onKeydown:[i[4]||(i[4]=e.withKeys(y=>c.updateSelected(n.options[t.highlightedIndex]),["enter"])),i[5]||(i[5]=e.withKeys(e.withModifiers((...y)=>c.highlightPreviousOption&&c.highlightPreviousOption(...y),["prevent"]),["up"])),i[6]||(i[6]=e.withKeys(e.withModifiers((...y)=>c.highlightNextOption&&c.highlightNextOption(...y),["prevent"]),["down"]))]},[!n.modelValue&&n.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref:"searchInput","onUpdate:modelValue":i[0]||(i[0]=y=>t.value=y),type:"text",name:"search",placeholder:n.placeholder,autocomplete:"off",disabled:n.disabled,"data-test-id":`${n.dataTestId}-search-input`,onInput:i[1]||(i[1]=e.withModifiers(y=>c.lookupSearchHandler(y.target.value),["prevent"]))},null,40,lu)),[[e.vModelText,t.value]]):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":n.size==="large","size-medium":n.size==="medium"||n.size==="small"}]),"data-test-id":`${n.dataTestId}-selection`},[c.getSelected?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{title:c.getSelected[n.property.value],class:e.normalizeClass(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!n.modelValue}]),"data-test-id":`${n.dataTestId}-selection-value`},[n.icon?(e.openBlock(),e.createBlock(f,{key:0,class:"ect-mr-0",icon:n.icon,size:14,color:"#5F5F5F","data-test-id":`${n.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(c.getSelected[n.property.value]),1)],10,cu),n.badge&&c.getSelected[n.badge]?(e.openBlock(),e.createElementBlock("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${n.dataTestId}-selection-badge`},e.toDisplayString(c.getSelected[n.badge]),9,du)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],10,su)),n.search?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[n.loading?(e.openBlock(),e.createBlock(x,{key:0,class:"spinner","data-test-id":`${n.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"clear-button","data-test-id":`${n.dataTestId}-action-button`},[t.value||n.modelValue?(e.openBlock(),e.createBlock(f,{key:0,disabled:n.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${n.dataTestId}-clear-button`,onClick:c.clear},null,8,["disabled","data-test-id","onClick"])):(e.openBlock(),e.createBlock(f,{key:1,icon:"search",size:14,color:"#acacac",disabled:n.disabled,"data-test-id":`${n.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,uu))],64)):(e.openBlock(),e.createBlock(f,{key:3,class:"clear-button",color:c.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:n.disabled,"data-test-id":`${n.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,iu),c.error_message?(e.openBlock(),e.createElementBlock("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${n.dataTestId}-error`},e.toDisplayString(c.error_message),9,fu)):e.createCommentVNode("",!0),c.getOptions&&t.inputFocused&&!n.disabled&&(n.select||n.lookup)?(e.openBlock(),e.createElementBlock("div",{key:1,ref:"dropdown",class:e.normalizeClass(["dropdown",{"dropdown-above":c.shouldShowAbove}]),style:e.normalizeStyle(c.dropdownStyle),"data-test-id":`${n.dataTestId}-dropdown`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.getOptions,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:y[n.property.key],class:e.normalizeClass(["dropdown-item",{highlighted:u===t.highlightedIndex,"ect-pointer-events-none":y[n.property.assigned]}]),"data-test-id":`${n.dataTestId}-option-${u}`,onClick:s=>c.updateSelected(y)},[e.createElementVNode("div",{class:"name ect-items-center","data-test-id":`${n.dataTestId}-option-${u}-name`},[e.createElementVNode("span",gu,[e.createElementVNode("span",{class:e.normalizeClass({"ect-text-zinc-400":y[n.property.assigned]}),"data-test-id":`${n.dataTestId}-option-${u}-value`},e.toDisplayString(y[n.property.value]==null?"Key and Value is Wrong":y[n.property.value]),11,yu),y[n.property.assigned]?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${n.dataTestId}-option-${u}-assigned`},"Assigned",8,xu)):e.createCommentVNode("",!0)]),n.badge?(e.openBlock(),e.createElementBlock("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${n.dataTestId}-option-${u}-badge`},e.toDisplayString(y[n.badge]),9,vu)):e.createCommentVNode("",!0)],8,mu),e.createElementVNode("div",{class:"info",title:c.subFieldsText(y),"data-test-id":`${n.dataTestId}-option-${u}-info`},[e.createElementVNode("span",null,e.toDisplayString(c.subFieldsText(y)),1)],8,_u)],10,pu))),128)),!c.getOptions.length&&!n.loading&&(t.value||n.select)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"no-items-found","data-test-id":`${n.dataTestId}-no-options`}," no options found ",8,bu)):e.createCommentVNode("",!0)],14,hu)):e.createCommentVNode("",!0)])],42,ru)}const ci=xe(nu,[["render",Cu],["__scopeId","data-v-5ae4f6dc"]]);var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Eu(t){if(t.__esModule)return t;var i=t.default;if(typeof i=="function"){var n=function r(){return this instanceof r?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};n.prototype=i.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var di={exports:{}};/*!
|
|
10
|
+
`+c):r.stack=c}catch{}}throw r}}_request(i,n){typeof i=="string"?(n=n||{},n.url=i):n=i||{},n=Rt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:c}=n;r!==void 0&&zn.assertOptions(r,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1),o!=null&&(ee.isFunction(o)?n.paramsSerializer={serialize:o}:zn.assertOptions(o,{encode:st.function,serialize:st.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zn.assertOptions(n,{baseUrl:st.spelling("baseURL"),withXsrfToken:st.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=c&&ee.merge(c.common,c[n.method]);c&&ee.forEach(["delete","get","head","post","put","patch","common"],d=>{delete c[d]}),n.headers=nt.concat(f,c);const x=[];let y=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(y=y&&p.synchronous,x.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let s,_=0,a;if(!y){const d=[oi.bind(this),void 0];for(d.unshift(...x),d.push(...u),a=d.length,s=Promise.resolve(n);_<a;)s=s.then(d[_++],d[_++]);return s}a=x.length;let h=n;for(;_<a;){const d=x[_++],p=x[_++];try{h=d(h)}catch(l){p.call(this,l);break}}try{s=oi.call(this,h)}catch(d){return Promise.reject(d)}for(_=0,a=u.length;_<a;)s=s.then(u[_++],u[_++]);return s}getUri(i){i=Rt(this.defaults,i);const n=Ka(i.baseURL,i.url,i.allowAbsoluteUrls);return Pa(n,i.params,i.paramsSerializer)}}ee.forEach(["delete","get","head","options"],function(i){Xn.prototype[i]=function(n,r){return this.request(Rt(r||{},{method:i,url:n,data:(r||{}).data}))}}),ee.forEach(["post","put","patch"],function(i){function n(r){return function(c,f,x){return this.request(Rt(x||{},{method:i,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}Xn.prototype[i]=n(),Xn.prototype[i+"Form"]=n(!0)});const Kn=Xn;class Ir{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(c){n=c});const r=this;this.promise.then(o=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](o);r._listeners=null}),this.promise.then=o=>{let c;const f=new Promise(x=>{r.subscribe(x),c=x}).then(o);return f.cancel=function(){r.unsubscribe(c)},f},i(function(c,f,x){r.reason||(r.reason=new tn(c,f,x),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const n=this._listeners.indexOf(i);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const i=new AbortController,n=r=>{i.abort(r)};return this.subscribe(n),i.signal.unsubscribe=()=>this.unsubscribe(n),i.signal}static source(){let i;return{token:new Ir(function(o){i=o}),cancel:i}}}const I0=Ir;function T0(t){return function(n){return t.apply(null,n)}}function V0(t){return ee.isObject(t)&&t.isAxiosError===!0}const Tr={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(Tr).forEach(([t,i])=>{Tr[i]=t});const D0=Tr;function li(t){const i=new Kn(t),n=Ea(Kn.prototype.request,i);return ee.extend(n,Kn.prototype,i,{allOwnKeys:!0}),ee.extend(n,i,null,{allOwnKeys:!0}),n.create=function(o){return li(Rt(t,o))},n}const Ne=li(Nr);Ne.Axios=Kn,Ne.CanceledError=tn,Ne.CancelToken=I0,Ne.isCancel=Ha,Ne.VERSION=ai,Ne.toFormData=Mn,Ne.AxiosError=ye,Ne.Cancel=Ne.CanceledError,Ne.all=function(i){return Promise.all(i)},Ne.spread=T0,Ne.isAxiosError=V0,Ne.mergeConfig=Rt,Ne.AxiosHeaders=nt,Ne.formToJSON=t=>$a(ee.isHTMLForm(t)?new FormData(t):t),Ne.getAdapter=ri.getAdapter,Ne.HttpStatusCode=D0,Ne.default=Ne;class L0{constructor(i,n,r,o){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":i,"X-Salesforce-Org-Type":n,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":o,"Content-Type":"application/json"}}}const si=je.defineStore("comShare",()=>{const t=e.ref(""),i=e.ref(""),n=e.ref(""),r=e.ref(""),o=e.ref(""),c=e.ref(""),f=e.ref(""),x=e.ref("Single"),y=e.computed(()=>x.value==="Single");async function u(s){t.value=s.orgType||"Production",i.value=s.orgId||"",n.value=s.userId||"",r.value=s.accountId||"",o.value=s.opportunityId||"",f.value=s.userLocale||"en_US",x.value=s.pricingSchema||"Single"}return{orgType:t,orgId:i,userId:n,accountId:r,opportunityId:o,userLocale:f,pricingSchema:x,quoteId:c,isSinglePricingSchema:y,setSetupData:u}});function F0(t){return t.offerData.pricingTypes.forEach(i=>{i.appliedOnField==="Catalog Price"?(t.catalogPrice=i,t.salesPrice=i.offerPrice,t.price=i.offerPrice):i.appliedOnField==="MRC"?(t.mrcPrice=i,t.mrc=i.offerPrice):i.appliedOnField==="YRC"&&(t.yrcPrice=i,t.yrc=i.offerPrice)}),t}function R0(t){const i=n=>Math.min(...n.options.map(r=>r.relationshipInfo.primarySortOrder));return t.forEach(n=>{n.itemTypes.forEach(r=>{r.options.sort((o,c)=>o.relationshipInfo.primarySortOrder-c.relationshipInfo.primarySortOrder||o.itemName.localeCompare(c.itemName))}),n.itemTypes.sort((r,o)=>i(r)-i(o)||r.itemTypeName.localeCompare(o.itemTypeName))}),t.sort((n,r)=>{const o=Math.min(...n.itemTypes.map(i)),c=Math.min(...r.itemTypes.map(i));return o-c||n.category.localeCompare(r.category)}),t}const P0=(t,i)=>{const n=(r,o)=>typeof o=="function"?void 0:o;return JSON.stringify(t,n)===JSON.stringify(i,n)};class M0 extends L0{constructor(i,n,r,o){super(i,n,r,o)}async getAvailableConfiguration(i){return(await Ne.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,i,{headers:this.headers})).data}async getLineItems({request:i}){const n=await Ne.post(`${this.awsURL}/quoting/getConfiguredLineItems`,i,{headers:this.headers});return console.info("getLineItems:response",n.data),n.data}async maintainQuoteConfiguration({request:i}){const n=await Ne.post(`${this.awsURL}/transactions/maintainConfiguration`,i,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",n.data),n.data}async getProductCrossSells({objectId:i,productItemId:n}){const r=await Ne.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${n}&objectId=${i}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:i}){const n=await Ne.post(`${this.awsURL}/transactions/addLines`,i,{headers:this.headers});return console.info("addLines:response",n.data),n.data}async evaluateConfigurationSelection({request:i}){const n=await Ne.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",i,{headers:this.headers});return console.info("evaluateConfigurationSelection:response",n.data),n.data}}const ct=je.defineStore("comConfigurator",()=>{const t=e.ref(null),i=et(),n=si(),r=dn(),o=e.ref(null),c=e.ref(null),f=e.ref(null),x=e.ref(null),y=e.ref(null),u=e.ref([]),s=e.ref(null),_=e.ref([]),a=e.ref(null),h=e.ref(new Map),d=e.ref(!1),p=e.ref({configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),l=e.ref(!1),g=e.computed(()=>m.value&&!n.isSinglePricingSchema),m=e.computed(()=>{var Y;if(!x.value||!((Y=x.value.categoryOptions)!=null&&Y.length)>0)return!1;let R=!0,$=!0,j=!0,U=null,Q=!1;for(const ne of x.value.categoryOptions)for(const se of ne.itemTypes)for(const he of se.options)he.billingPeriod&&(U&&U!==he.billingPeriod&&(j=!1),U=he.billingPeriod,!he.yrcPrice&&he.billingPeriod==="Monthly"&&(R=!1),!he.mrcPrice&&he.billingPeriod==="Yearly"&&($=!1),Q=!0);return R&&$&&j&&Q}),b=e.computed(()=>!P0(x.value,y.value)),v=e.computed(()=>{var $;const R=(($=x.value)==null?void 0:$.categoryOptions)||[];return R.forEach(j=>{j.itemTypes.forEach(U=>{U.selectedOptions=U.options.filter(Q=>U.selected.includes(Q.itemId)),U.totalPrice=function(){return U.selectedOptions.reduce((Q,Y)=>Q+Y.price*Y.qty,0)||0},U.oneTimePrice=function(){return U.selectedOptions.filter(Q=>!Q.billingPeriod).reduce((Q,Y)=>Q+Y.price*Y.qty,0)||0},U.recurringPrice=function(){return U.selectedOptions.filter(Q=>Q.billingPeriod).reduce((Q,Y)=>Q+Y.price*Y.qty,0)||0}}),j.selectedItemTypes=j.itemTypes.filter(U=>U.selected.length>0),j.totalPrice=function(){return j.itemTypes.reduce((U,Q)=>U+Q.totalPrice(),0)},j.oneTimePrice=function(){return j.itemTypes.reduce((U,Q)=>U+Q.oneTimePrice(),0)},j.recurringPrice=function(){return j.itemTypes.reduce((U,Q)=>U+Q.recurringPrice(),0)}}),R.filter(j=>j.itemTypes.filter(U=>U.selected.length>0).length>0)}),C=e.computed(()=>v.value.reduce((R,$)=>R+$.totalPrice(),0)),B=e.computed(()=>{if(!x.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const R=v.value.reduce((U,Q)=>U+Q.totalPrice(),0);let $=v.value.reduce((U,Q)=>U+Q.oneTimePrice(),0),j=v.value.reduce((U,Q)=>U+Q.recurringPrice(),0);return x.value.billingPeriod?j=(j+x.value.price)*x.value.qty:$=($+x.value.price)*x.value.qty,{basePrice:x.value.price,addOns:R,oneTimePrice:$,recurringPrice:j,total:x.value.price*x.value.qty+R*x.value.qty+$+j}}),w=e.computed(()=>{var $,j,U,Q;const R=new Map;return($=s.value)!=null&&$.productLineItem&&R.set((j=s.value)==null?void 0:j.productLineItem.XX_ORD1__Item__c,(U=s.value)==null?void 0:U.productLineItem),(Q=s.value)==null||Q.options.forEach(Y=>{R.set(Y.XX_ORD1__Item__c,Y)}),R}),S=e.computed(()=>{var $;const R=new Map;return x.value&&(($=x.value.categoryOptions)==null?void 0:$.length)>0&&x.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(U=>{U.options.forEach(Q=>{R.set(Q.publishKey,Q)})})}),R}),I=e.computed(()=>{if(!x.value)return{};const R=U=>!U||!Array.isArray(U)?[]:U.filter(Q=>Q.apiName&&Q.value!==null&&Q.value!==void 0&&Q.value!=="").map(Q=>({fieldAPIName:Q.apiName,value:Q.dataType==="BOOLEAN"?Q.value?"true":"false":Q.dataType==="REFERENCE"?Q.referenceRecordId||Q.value||"":Q.value||""})),$={itemId:x.value.itemId,qliId:x.value.qliId||null,name:x.value.itemName,qty:x.value.qty||1,salesPrice:x.value.price||0,mrc:x.value.mrc||null,yrc:x.value.yrc||null,attributes:R(x.value.attributes)},j=[];return x.value.categoryOptions.forEach(U=>{U.itemTypes.forEach(Q=>{Q.options.forEach(Y=>{Q.selected.includes(Y.itemId)&&j.push({itemId:Y.itemId,qliId:Y.qliId||null,name:Y.itemName,qty:Y.qty||1,salesPrice:Y.price||0,mrc:Y.mrc||null,yrc:Y.yrc||null,attributes:R(Y.attributes)})})})}),{[x.value.itemId]:{product:$,options:j}}}),A=(R,$)=>{if(!R||!Array.isArray(R))return[];const j=new Map;return $.forEach(U=>{j.set(U.fieldAPIName,U.value)}),R.map(U=>(U.value=j.get(U.fieldAPIName)||null,U))};function k(R){const $=new Map;R.options.forEach(j=>{$.set(j.itemId,j)}),x.value.itemName=R.product.name,x.value.qty=R.product.qty,x.value.price=R.product.salesPrice,x.value.attributes=A(x.value.attributes,R.product.attributes),x.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(U=>{U.selected=[],U.options.forEach(Q=>{$.has(Q.itemId)&&(Q.itemName=$.get(Q.itemId).name,Q.qty=$.get(Q.itemId).qty,Q.price=$.get(Q.itemId).salesPrice,Q.qliId=$.get(Q.itemId).qliId,Q.attributes=A(Q.attributes,$.get(Q.itemId).attributes),U.selected.push(Q.itemId))})})}),x.value={...x.value}}function N(){return{get getConfig(){return I.value},setConfig:k}}function V(R){x.value.qliId&&(x.value.qliBillingPeriod==="Monthly"&&!R?x.value.price=x.value.salesPrice||x.value.mrc:x.value.qliBillingPeriod==="Yearly"&&R&&(x.value.price=x.value.salesPrice)),x.value.categoryOptions.forEach($=>{$.itemTypes.forEach(j=>{j.options.forEach(U=>{U.billingPeriod&&(U.price=(R?U.yrcPrice.offerPrice:U.mrcPrice.offerPrice)||U.price,U.qliId&&(U.qliBillingPeriod==="Monthly"&&!R?U.price=U.salesPrice||U.mrc:U.qliBillingPeriod==="Yearly"&&R&&(U.price=U.salesPrice)))})})})}function L(){x.value=null,y.value=null,u.value=[],s.value=null,a.value=null,h.value=new Map,d.value=!1,p.value.configuration=!1,p.value.lineItem=!1,p.value.productOptionsPricing=!1,p.value.bestOfferPrice=!1,p.value.lineItemAttributes=!1,p.value.save=!1}function M(R,$,j,U){t.value=new M0(R,$,j,U)}async function Z(R,$,j){console.time("CONFIGURATOR INIT CONFIGURATOR"),L(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),c.value=R,f.value=$,o.value=j||n.quoteId;const U=await G();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),x.value=J(U),f.value&&(await F(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),K(x.value),x.value.categoryOptions.forEach(Q=>{Q.itemTypes.forEach(Y=>{Y.options.forEach(ne=>{K(ne),(w.value.has(ne.itemId)||ne.relationshipInfo.relationship==="Kit")&&Y.selected.push(ne.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4")),y.value=JSON.parse(JSON.stringify(x.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR")}async function G(){try{const R={accountId:n.accountId,objectId:o.value,itemId:c.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},$=await t.value.getAvailableConfiguration(R);console.info("getAvailableConfiguration:result",$);const j=$.data.productConfiguration;return j.categoryOptions=R0(j.categoryOptions),j}catch(R){return console.info("error",R.message),!1}}function J(R){h.value.set(f.value,R.attributes),u.value=R.configRules;const $=new Set;return u.value.forEach(j=>{const U=JSON.parse(j.ruleJson);U.optionSelected.forEach(Q=>{$.add(Q)}),U.affectedOptions.forEach(Q=>{$.add(Q)})}),console.info("rulesByPublishKey",$),K(R),R.categoryOptions.forEach(j=>{j.key=j.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),j.itemTypes.forEach(U=>{U.selected=[],U.numberOfColumns||(U.numberOfColumns=1),U.numberOfColumns>1&&(U.lightboxAttributes=!0),U.maxNumber||(U.maxNumber=100),U.minNumber||(U.minNumber=0),U.maxQuantity||(U.maxQuantity=1e4),U.minQuantity||(U.minQuantity=1),U.maxNumber===1?(U.isRadio=!0,U.minMessage="Please select 1 option",U.maxMessage="",U.isKit=U.options.some(Q=>Q.relationshipInfo.relationship==="Kit")):(U.minMessage=`Minimum of ${U.minNumber} selection${U.minNumber!==1?"s":""} required`,U.maxMessage=`Maximum of ${U.maxNumber} selection${U.maxNumber!==1?"s":""} allowed`),U.options.forEach(Q=>{j.showImage=j.showImage||!!Q.defaultImageURL,Q.showAttributesModal=!1,Q.calculateRules=$.has("option."+Q.publishKey),console.info("option.calculateRules",Q.calculateRules),Q.qty=U.minQuantity||1,Q.getTags=()=>(Q.attributes=Q.attributes||[],Q.attributes.filter(Y=>Y.value!==null&&Y.value!=="").map(Y=>({label:Y.label,value:Y.value}))),Object.defineProperty(Q,"isDisabled",{get:function(){return Q.relationshipInfo.relationship==="Kit"||(U.isRadio?U.isKit:!U.selected.includes(Q.itemId)&&U.maxNumber===U.selected.length)}}),K(Q)})})}),R}function K(R){R.isAttributes=R.attributes&&R.attributes.length>0;const $=R.catalogItem;if(w.value.has(R.itemId)){const j=w.value.get(R.itemId);R.qliId=j.Id,R.qty=j.XX_ORD1__QTY__c,R.itemName=j.XX_ORD1__Line_Description__c,R.billingPeriod=j.XX_ORD1__Billing_Period__c,R.price=j.XX_ORD1__Sales_Price__c,R.billingPeriod?R.price=j.XX_ORD1__Sales_Price__c||j.XX_ORD1__MRC__c:R.price=j.XX_ORD1__NRC__c||j.XX_ORD1__Sales_Price__c,R.salesPrice=j.XX_ORD1__Sales_Price__c,R.nrc=j.XX_ORD1__NRC__c,R.mrc=j.XX_ORD1__MRC__c,R.qliBillingPeriod=j.XX_ORD1__Billing_Period__c,h.value.set(R.qliId,R.attributes)}else R.itemName=$.XX_ORD1__Line_Description__c||R.itemName,R.price=$.XX_ORD1__Negotiated_Price__c||$.XX_ORD1__NRC_for_New__c,R.nrcPrice=$.XX_ORD1__NRC_for_New__c,F0(R)}async function F(){p.value.lineItem=!0,console.info("getLineItems",o.value,f.value);try{const R={objectId:o.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:f.value}},$=await t.value.getLineItems({request:JSON.stringify(R)});return($.data.products||[]).forEach(U=>{const Q=U.productLineItem;Q.Id===f.value?s.value=U:_.value.push(Q)}),console.info("lineItem.value",s.value),console.info("configurableLineItems.value",_.value),p.value.lineItem=!1,$}catch(R){return console.info("error",R.message),p.value.lineItem=!1,!1}}async function E(R){console.info("getRecords");try{const $=await window.productManagerController.getRecords({request:JSON.stringify(R)});return console.info("getRecords:result",$),JSON.parse($.data)}catch($){return console.info("error",$.message),!1}}async function T(){d.value=!0,p.value.save=!0,console.info("maintainQuoteConfiguration");const R=[],$=[];x.value.categoryOptions.forEach(Q=>{Q.itemTypes.forEach(Y=>{Y.options.forEach(ne=>{Y.selected.includes(ne.itemId)?R.push(D(ne)):ne.qliId&&$.push(ne.qliId)})})});const j={objectId:o.value,eCatalogId:n.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:$,grandFatheredOptionsToRemove:[],productLineItem:{...D(x.value),optionLineItems:R}};console.info("maintainQuoteConfiguration:request",j);const U=await t.value.maintainQuoteConfiguration({request:JSON.stringify(j)});if(console.info("maintainQuoteConfiguration:result",U),U!=null&&U.error){const Q={title:"Unable to Save Configuration",description:U.error,button:{label:"Back to Configuration",action:()=>{d.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+o.value)}}};i.errorPopup=Q}else y.value=JSON.parse(JSON.stringify(x.value)),console.info("maintainQuoteConfiguration:result",U);p.value.save=!1}function D(R){const $={};R.isAttributes&&R.attributes.forEach(U=>{U.apiName.includes(".")||(U.dataType==="BOOLEAN"?$[U.apiName]=U.value?"true":"false":U.dataType==="REFERENCE"?$[U.apiName]=U.referenceRecordId:$[U.apiName]=U.value)});const j={attributes:$,itemId:R.itemId,lineItemId:R.qliId,lineDescription:R.itemName,qty:R.qty,billingPeriod:R.billingPeriod,...R.offer};return R.billingPeriod&&m.value&&!n.isSinglePricingSchema&&(j.billingPeriod=l.value?"Yearly":"Monthly"),!n.isSinglePricingSchema&&!R.billingPeriod?j.nrcPrice=R.price:(j.applyOnField="Catalog Price",j.salesPrice=R.price,j.nrcPrice=R.nrcPrice),j}async function P(){const R={objectId:n.accountId,productItemId:c.value};try{let $=await t.value.getProductCrossSells(R);const{crossSells:j,offerResult:U}=$.data;if(j.length===0)return $;const Q=new Map;return U.forEach(Y=>{Q.set(Y.eCatalogItemId,{...Y,...Y.pricingTypes[0]})}),j.forEach(Y=>{Y.loading=!1,Y.Name=Y.XX_ORD1__Line_Description__c||Y.XX_ORD1__Item__r.Name,Y.Description=Y.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,Q.has(Y.Id)?(Y.Price=Q.get(Y.Id).offerPrice,Y.priceFormatted=Q.get(Y.Id).formattedOfferPrice,Y.offer={offerDiscount:Q.get(Y.Id).offerDiscount,offerId:Q.get(Y.Id).offerId,offerType:Q.get(Y.Id).offerType}):(Y.Price=Y.XX_ORD1__List_Price2__c,Y.priceFormatted=Y.XX_ORD1__List_Price2__c,Y.offer={offerDiscount:0,offerId:null,offerType:null})}),j}catch($){return console.info("error",$.message),!1}}const X=R=>!R||!Array.isArray(R)?[]:R.filter($=>$.apiName&&$.value!==null&&$.value!==void 0&&$.value!=="").map($=>({attrName:$.apiName,attrValue:$.dataType==="BOOLEAN"?$.value:$.value||"",dataType:$.dataType}));async function q(R,$){const j={product:{publishKey:x.value.publishKey,attributes:X(x.value.attributes),lineDescription:x.value.itemName,meta:{XX_ORD1__Sales_Price__c:x.value.price,XX_ORD1__MRC__c:x.value.mrc,XX_ORD1__NRC__c:x.value.nrc,XX_ORD1__YRC__c:x.value.yrc,quantity:x.value.qty}},options:[]};x.value.categoryOptions.forEach(Y=>{Y.itemTypes.forEach(ne=>{ne.options.forEach(se=>{ne.selected.includes(se.itemId)&&j.options.push({publishKey:se.publishKey,attributes:X(se.attributes),lineDescription:se.itemName,meta:{XX_ORD1__Sales_Price__c:se.price,XX_ORD1__MRC__c:se.mrc,XX_ORD1__NRC__c:se.nrc,XX_ORD1__YRC__c:se.yrc,quantity:se.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",j.options);const U={itemId:c.value,currentConfig:j,selected:R?{publishKey:R==null?void 0:R.publishKey,attributes:R.attributes,lineDescription:R.itemName}:{},unselected:$?{publishKey:$==null?void 0:$.publishKey,attributes:$.attributes,lineDescription:$.itemName}:{}};return await t.value.evaluateConfigurationSelection({request:JSON.stringify(U)})}async function z(R){const $={objectId:o.value,lstLIRequest:[{eCatalogItemId:R.Id,quantity:1,offerApplicable:R.offer}]};try{const j=await t.value.addLines({request:JSON.stringify($)});console.info("addLines:result",j)}catch(j){return console.info("error",j.message),!1}}return{itemId:c,configuration:x,_configurationCopy:y,lineItem:s,savedScreen:d,loading:p,summary:v,addOns:C,summaryPrices:B,optionByItemId:w,attributesByQLIId:h,optionByPublishKey:S,showYearlyPricing:l,isYearlyPricingExist:m,isChangedConfiguration:b,isRecurringPricingSchema:g,configurableLineItems:_,initializeController:M,exposeProperties:N,updateCurrentConfiguration:k,changePricingScheme:V,addLines:z,resetConfigurator:L,getRecords:E,getProductCrossSells:P,initConfigurator:Z,maintainQuoteConfiguration:T,evaluateConfigSelection:q}}),q0={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},$0={class:"ect-flex ect-items-center ect-gap-3"},j0={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},H0={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},U0=e.createElementVNode("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),z0={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},X0=e.createElementVNode("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),K0={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},Q0=e.createElementVNode("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),Z0={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},G0=["data-test-id"],W0={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},J0={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},Y0={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},ed={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},td={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},nd={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},rd=e.createElementVNode("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),od={class:"ect-flex ect-flex-col ect-gap-4"},ad=["data-test-id","onClick"],id={class:"ect-flex ect-items-center ect-justify-center"},ld={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},sd=["data-test-id"],cd=["data-test-id"],dd={key:3,class:"ect-bg-light-bg-x ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-sticky ect-bottom-0 ect-pb-4"},ud={class:"ect-flex ect-flex-col ect-gap-4"},fd={class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},hd={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},pd={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-next-product"},md={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},gd={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},yd={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},xd={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},vd={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},_d={__name:"ConfiguratorRecommend",setup(t){const i=ct(),n=Lt(),r=dn(),o=e.computed(()=>i.configuration),c=e.ref(!0),f=e.ref(""),x=e.ref([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"},{icon:"menu",title:"Back to Quote List Page",description:"Returns to the main quote list page.",link:"/quote-item",action:"backToQuoteList"}]),y=e.ref(null),u=e.ref([]),s=async d=>{d.loading=!0,await i.addLines(d),d.disabled=!0,d.loading=!1},_=d=>{d.action==="backToConfiguration"?i.savedScreen=!1:d.action==="backToQuoteList"?r.push("/quote-item?id="+n.quoteId):d.link&&r.push(d.link)};async function a(){const d=i.configurableLineItems,p=d.filter(g=>g.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;f.value=`(${d.length-p}/${d.length})`;const l=d.find(g=>g.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&g.Id!=i.qliId);return y.value=l?{Name:l.XX_ORD1__Line_Description__c,Description:l.XX_ORD1__Product_Description__c,Price:l.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:l.XX_ORD1__Item__c,Id:l.Id}:null,d}async function h(){i.resetConfigurator(),r.push({path:"/configurator/"+y.value.XX_ORD1__Item__c+"/"+y.value.Id}),i.initConfigurator(y.value.XX_ORD1__Item__c,y.value.Id)}return e.onBeforeMount(async()=>{c.value=!0;const d=await a(),p=await i.getProductCrossSells(),l=new Set;d.forEach(g=>{l.add(g.XX_ORD1__Item__c)}),p.forEach(g=>{g.disabled=l.has(g.XX_ORD1__Item__c)}),u.value=p||[],c.value=!1}),(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",q0,[e.createElementVNode("div",$0,[e.createVNode(we,{icon:"arrow",symbol:"",size:12,onClick:p[0]||(p[0]=l=>e.unref(i).savedScreen=!1)}),e.createElementVNode("h2",j0,e.toDisplayString(o.value.itemName),1)]),e.unref(i).loading.save?(e.openBlock(),e.createElementBlock("div",H0,[e.createVNode(ya,{svg:""}),U0])):(e.openBlock(),e.createElementBlock("div",z0,[e.createVNode(we,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),X0]))]),c.value?(e.openBlock(),e.createBlock(ga,{key:0,type:"recommendations",rows:4})):u.value.length>0?(e.openBlock(),e.createElementBlock("div",K0,[Q0,e.createElementVNode("div",Z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.Id||g,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-${l.Id||g}`},[e.createElementVNode("div",W0,[e.createElementVNode("h4",J0,e.toDisplayString(l.Name),1),e.createElementVNode("p",Y0,e.toDisplayString(l.Description),1)]),e.createElementVNode("div",ed,[e.createElementVNode("div",td,e.toDisplayString(e.unref(Ge)(l.Price)),1),e.createVNode(Je,{btype:l.disabled?"secondary":"primary","button-style":l.disabled?"normal":"outlined",size:"medium",class:e.normalizeClass({"ect-w-[120px]":l.loading}),loading:l.loading,disabled:l.disabled||l.loading,"data-test-id":`configurator-recommend-button-add-${l.Id||g}`,onClick:m=>s(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.loading?"":l.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,G0))),128))])])):(e.openBlock(),e.createElementBlock("div",nd,[rd,e.createElementVNode("div",od,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.title||g,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-${g}`,onClick:m=>_(l)},[e.createElementVNode("div",id,[e.createVNode(we,{icon:l.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${g}`},null,8,["icon","data-test-id"])]),e.createElementVNode("div",ld,[e.createElementVNode("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-${g}`},e.toDisplayString(l.title),9,sd),e.createElementVNode("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-${g}`},e.toDisplayString(l.description),9,cd)])],8,ad))),128))])])),y.value?(e.openBlock(),e.createElementBlock("footer",dd,[e.createElementVNode("div",ud,[e.createElementVNode("h3",fd," Configuere next product from your quote "+e.toDisplayString(f.value),1),e.createElementVNode("div",hd,[e.createElementVNode("div",pd,[e.createElementVNode("div",md,[e.createElementVNode("h4",gd,e.toDisplayString(y.value.Name),1),e.createElementVNode("p",yd,e.toDisplayString(y.value.Description),1)]),e.createElementVNode("div",xd,[e.createElementVNode("div",vd,e.toDisplayString(e.unref(Ge)(y.value.Price)),1),e.createVNode(Je,{btype:"primary","button-style":"filled",size:"medium","data-test-id":"configurator-recommend-button-add-next-product",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" Configure Now ")]),_:1})])])])])])):e.createCommentVNode("",!0)],64))}},bd=["data-test-id"],Cd=xe({__name:"AppPill",props:{variant:{type:String,default:"",validator:t=>["success","error",""].includes(t)},dataTestId:{type:String,default:""}},setup(t){return(i,n)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ect-pill",{"ect-pill-success":t.variant==="success","ect-pill-error":t.variant==="error","ect-pill-default":!t.variant}]),"data-test-id":t.dataTestId},[e.renderSlot(i.$slots,"default",{},void 0,!0)],10,bd))}},[["__scopeId","data-v-c7f05fa0"]]),Ed=["data-test-id"],kd=["data-test-id"],wd=["data-test-id","onClick"],Nd=["data-test-id"],Ad=xe({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:t=>t.every(i=>typeof i=="object"&&i.title&&i.key&&(i.sections===void 0||Array.isArray(i.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(t,{emit:i}){const n=t,r=i,o=e.computed(()=>{var f;return n.modelValue||((f=n.tabs[0])==null?void 0:f.key)||""}),c=f=>{r("update:modelValue",f),r("tab-change",f)};return(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-page-tabs","data-test-id":t.dataTestId},[t.showTabs?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ect-page-tabs-header",[{"ect-tab-border":t.border}]]),"data-test-id":`${t.dataTestId}-header`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,y=>(e.openBlock(),e.createElementBlock("button",{key:y.key,class:e.normalizeClass(["ect-page-tab-button",`ect-page-tab-button${o.value===y.key?"-active":""} ${y.tabClass||""}`]),"data-test-id":`${t.dataTestId}-tab-${y.key}`,onClick:u=>c(y.key)},[e.createTextVNode(e.toDisplayString(y.title)+" ",1),y.pill!==void 0&&y.pill!==null?(e.openBlock(),e.createBlock(Cd,{key:0,class:"ect-ml-2",variant:y.pillStyle,"data-test-id":`${t.dataTestId}-tab-${y.key}-pill`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.pill),1)]),_:2},1032,["variant","data-test-id"])):e.createCommentVNode("",!0)],10,wd))),128))],10,kd)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"ect-page-tab-content","data-test-id":`${t.dataTestId}-content`},null,8,Nd)],8,Ed))}},[["__scopeId","data-v-f22cb1ed"]]),Bd=["data-test-id"],Sd=["disabled","data-test-id"],Od=["value","disabled","data-test-id"],Id=["disabled","data-test-id"],Qn={__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(t,{emit:i}){const n=t,r=i,o=e.computed(()=>n.min==null?0:n.min),c=e.computed(()=>n.max==null?999:n.max),f=(v,C,B)=>Math.min(Math.max(v,C),B),x=v=>{if(v==null||v==="")return NaN;const C=Number(v);return Number.isFinite(C)?C:NaN},y=e.ref(null),u=e.ref(n.value??o.value),s=v=>{u.value=f(v,o.value,c.value)};n.value!==null&&s(n.value);const _=e.computed(()=>u.value),a=e.computed(()=>y.value!=null?y.value:String(_.value)),h=e.computed(()=>n.disabled||_.value<=o.value),d=e.computed(()=>n.disabled||_.value>=c.value);function p(v){v!==n.value&&(u.value=v,r("update:value",v),r("change",v))}function l(){if(h.value)return;const v=f(_.value-1,o.value,c.value);y.value=null,p(v)}function g(){if(d.value)return;const v=f(_.value+1,o.value,c.value);y.value=null,p(v)}function m(v){const B=String(v.target.value??"").replace(/\D+/g,"");y.value=B}function b(){const v=x(y.value),C=o.value,B=f(Number.isNaN(v)?C:v,o.value,c.value);y.value=null,p(B)}return(v,C)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":t.dataTestId},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["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":`${t.dataTestId}-decrement`,onClick:l}," - ",10,Sd),e.createElementVNode("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:t.empty?"":a.value,disabled:t.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":`${t.dataTestId}-input`,onInput:m,onBlur:b},null,40,Od),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["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":d.value,"ect-cursor-not-allowed":d.value}]),disabled:d.value,"data-test-id":`${t.dataTestId}-increment`,onClick:g}," + ",10,Id)],8,Bd))}},Td={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"},Vd={"data-test-id":"configurator-footer-quantity"},Dd={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"},Ld=["data-test-id"],Fd=["data-test-id"],Rd=["data-test-id"],Pd=["data-test-id"],Md={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(t,{emit:i}){const n=ct(),r=t,o=e.ref(r.item),c=e.computed(()=>{const y=n.summaryPrices,u=[];return n.isRecurringPricingSchema?(u.push({label:"One Time Price",value:y.oneTimePrice,highlight:!1}),u.push({label:n.showYearlyPricing?"Yearly Price":"Monthly Price",value:y.recurringPrice,highlight:!1})):(u.push({label:"Base Price",value:y.basePrice,highlight:!1}),u.push({label:"Add Ons",value:y.addOns,highlight:!1}),u.push({label:"Total Price",value:y.total,highlight:!1})),u}),f=i,x=()=>{r.disabled||f("continue")};return(y,u)=>(e.openBlock(),e.createElementBlock("footer",Td,[e.createElementVNode("div",Vd,[e.createVNode(Qn,{value:o.value.qty,"onUpdate:value":u[0]||(u[0]=s=>o.value.qty=s),min:1,max:999,disabled:t.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),e.createElementVNode("div",Dd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(s,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_},[e.createElementVNode("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${_}`},[e.createElementVNode("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${_}`},e.toDisplayString(s.label),9,Fd),e.createElementVNode("span",{class:e.normalizeClass(["ect-text-left",s.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-${_}`},e.toDisplayString(e.unref(Ge)(s.value)),11,Rd)],8,Ld),_<c.value.length-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${_}`},null,8,Pd)):e.createCommentVNode("",!0)],64))),128))]),e.createVNode(Je,{class:"ect-min-w-[100px]",btype:t.disabled?"secondary":"primary",disabled:t.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.btnText),1)]),_:1},8,["btype","disabled"])]))}},qd={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},$d={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"},jd={class:"ect-flex ect-flex-col"},Hd={class:"ect-font-bold ect-text-text-success ect-leading-tight"},Ud=["innerHTML"],zd={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},Xd={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},Kd={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},Qd={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(t){return(i,n)=>(e.openBlock(),e.createElementBlock("section",qd,[e.createElementVNode("header",$d,[e.createElementVNode("div",jd,[e.createElementVNode("h2",Hd,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:t.description},null,8,Ud)):e.createCommentVNode("",!0)]),t.message?(e.openBlock(),e.createElementBlock("div",zd,[e.createVNode(we,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),e.createElementVNode("span",Xd,e.toDisplayString(t.message),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Kd,[e.renderSlot(i.$slots,"default")])]))}},Zd={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(t){const i=t,n=e.ref(null);let r=null;return e.onMounted(()=>{n.value&&!r&&(r=n.value.attachShadow({mode:"open"}),r.innerHTML=i.content)}),e.watch(()=>i.content,o=>{r&&(r.innerHTML=o)}),(o,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"host",ref:n},null,512))}},Gd=["data-test-id"],Wd=["data-test-id"],Jd=["data-test-id"],Yd=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{id:"Group"},[e.createElementVNode("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],e1=["data-test-id"],t1=["data-test-id"],n1=["data-test-id"],r1=["data-test-id"],o1=["data-test-id"],a1=["data-test-id","innerHTML"],dt={__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(t){const i=t,n=e.computed(()=>{const r=i.value;if(typeof r!="string")return!1;const o=new DOMParser().parseFromString(r,"text/html");return Array.from(o.body.childNodes).some(c=>c.nodeType===1)});return(r,o)=>t.addButton?(e.openBlock(),e.createElementBlock("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":t.dataTestId},[e.createElementVNode("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":`${t.dataTestId}-content`},[e.createElementVNode("div",{"data-test-id":`${t.dataTestId}-add-icon`},Yd,8,Jd),e.createTextVNode(" "+e.toDisplayString(t.label),1)],8,Wd)],8,Gd)):t.editButton?(e.openBlock(),e.createElementBlock("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":t.dataTestId},[e.createElementVNode("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":`${t.dataTestId}-content`},e.toDisplayString(t.label),9,t1)],8,e1)):(e.openBlock(),e.createElementBlock("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":t.dataTestId},[e.createElementVNode("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${t.dataTestId}-label`},e.toDisplayString(t.label),9,r1),t.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${t.dataTestId}-separator`}," : ",8,o1)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(Zd,{key:1,content:t.value},null,8,["content"])):t.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${t.dataTestId}-value`,innerHTML:t.value},null,8,a1)):e.createCommentVNode("",!0)],8,n1))}},i1=["data-test-id"],l1=["data-test-id"],s1=["data-test-id"],c1=["type","step","min","data-test-id"],Vr=xe({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:t=>["string","number","currency"].includes(t)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(t,{expose:i,emit:n}){const r=t,o=n,c=e.ref(!1),f=e.ref(!1),x=e.ref(""),y=e.ref(null),u=e.computed(()=>r.type==="currency"?g(r.modelValue):r.type==="number"?m(r.modelValue):r.modelValue),s=e.computed(()=>r.type==="string"?"text":"number"),_=e.computed(()=>r.type==="currency"?"0.01":void 0),a=e.computed(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?x.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?x.value=parseFloat(r.modelValue)||"0":x.value=r.modelValue,c.value=!0,e.nextTick(()=>{y.value&&(y.value.focus(),y.value.select())}))},d=()=>{let b=x.value;if(r.type==="number"||r.type==="currency"){const v=parseFloat(x.value);isNaN(v)?b=r.modelValue:b=r.type==="currency"?v.toFixed(2):v.toString()}b!==r.modelValue&&(o("update:modelValue",b),o("change",b)),c.value=!1},p=()=>{x.value=r.modelValue,c.value=!1},l=()=>{c.value&&d()},g=b=>!b||isNaN(b)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(b)),m=b=>!b||isNaN(b)?"0":new Intl.NumberFormat("en-US").format(parseFloat(b));return e.watch(()=>r.modelValue,b=>{c.value||(x.value=b)}),i({startEditing:h,saveChanges:d,cancelEditing:p}),(b,v)=>{const C=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":t.dataTestId,onMouseenter:v[1]||(v[1]=B=>f.value=!0),onMouseleave:v[2]||(v[2]=B=>f.value=!1)},[c.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${t.dataTestId}-input-wrapper`},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:y,"onUpdate:modelValue":v[0]||(v[0]=B=>x.value=B),type:s.value,step:_.value,min:a.value,class:e.normalizeClass(["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",b.$attrs.class]),"data-test-id":`${t.dataTestId}-input`,onKeyup:[e.withKeys(d,["enter"]),e.withKeys(p,["esc"])],onBlur:d},null,42,c1),[[e.vModelDynamic,x.value]])],8,s1)),[[C,l]]):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!t.disabled}]),"data-test-id":`${t.dataTestId}-display`,onClick:h},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps(b.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${t.dataTestId}-text`}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value)+" ",1),e.createVNode(we,{class:e.normalizeClass(f.value&&!t.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${t.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,l1))],40,i1)}}},[["__scopeId","data-v-5cd60070"]]),d1=["data-test-id","data-publish-key"],u1={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"},f1={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},h1={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"},p1=["src","alt"],m1={class:"ect-flex-1 ect-min-w-0"},g1={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},y1={class:"ect-flex ect-flex-row ect-gap-3"},x1=e.createElementVNode("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1),v1={class:"ect-flex ect-flex-col ect-max-w-[125px]"},_1={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},b1=["innerHTML"],C1={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},E1=["data-test-id"],k1=["data-test-id"],w1={key:1,class:"ect-inline-block ect-mb-2"},N1={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},A1={class:"ect-flex ect-items-start ect-gap-2"},B1={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},S1=["src","alt"],O1={class:"ect-flex-1 ect-min-w-0"},I1={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},T1=["innerHTML"],V1={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},D1={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},L1=["data-test-id"],F1=["data-test-id"],R1={key:1,class:"ect-inline-block ect-mb-2"},P1={class:"ect-flex ect-justify-between ect-items-center"},M1={class:"ect-flex ect-flex-col"},q1=e.createElementVNode("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1),$1={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},j1={__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(t,{emit:i}){const n=t,r=i,o=e.ref(null),c=e.ref(0),f=e.ref(n.item),x=e.computed(()=>f.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":n.disabled?"ect-bg-light-bg-x ect-border-gray-200":n.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),y=e.computed({get:()=>n.quantity,set:d=>r("update:quantity",d)}),u=e.computed({get:()=>n.name,set:d=>r("update:name",d)}),s=d=>{r("update:quantity",d)},_=e.computed(()=>{if(c.value===0)return n.tags;const p=Math.floor(c.value/120);return n.tags.slice(0,Math.max(1,p))}),a=e.computed(()=>Math.max(0,n.tags.length-_.value.length)),h=()=>{if(o.value){const d=o.value,p=80,l=120,g=32,m=64;c.value=d.offsetWidth-p-l-g-m}};return e.onMounted(()=>{e.nextTick(()=>{h()})}),e.watch(()=>n.tags,()=>{e.nextTick(()=>{h()})},{deep:!0}),e.onMounted(()=>{window.addEventListener("resize",h)}),(d,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:o,class:e.normalizeClass(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",x.value]),"data-test-id":`configurator-item-${t.item.itemId}`,"data-publish-key":t.item.publishKey},[t.item.relationshipInfo.relationship==="Kit"?(e.openBlock(),e.createElementBlock("div",u1," KIT ")):e.createCommentVNode("",!0),t.size===1?(e.openBlock(),e.createElementBlock("div",f1,[t.showImage?(e.openBlock(),e.createElementBlock("div",h1,[t.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.imageUrl,alt:u.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,p1)):(e.openBlock(),e.createBlock(we,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):e.createCommentVNode("",!0),e.createElementVNode("div",m1,[e.createElementVNode("div",g1,[e.createVNode(Vr,{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=l=>u.value=l),tag:"h3","data-test-id":"itemId"+t.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),e.createElementVNode("div",y1,[e.createElementVNode("div",{onClick:p[2]||(p[2]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(Qn,{value:y.value,"onUpdate:value":p[1]||(p[1]=l=>y.value=l),min:t.minQuantity,max:t.maxQuantity,"data-test-id":`configurator-item-counter-${t.item.itemId}`,onChange:s},null,8,["value","min","max","data-test-id"])]),x1,e.createElementVNode("div",v1,[e.createVNode(Vr,{modelValue:f.value.price,"onUpdate:modelValue":p[3]||(p[3]=l=>f.value.price=l),tag:"p",type:"currency","data-test-id":"itemId"+t.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),e.createElementVNode("div",_1,[e.renderSlot(d.$slots,"selection-control")])])]),e.createElementVNode("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:t.description},null,8,b1),t.isAttributes&&t.showAttributes&&t.selected?(e.openBlock(),e.createElementBlock("div",C1,[f.value.getTags().length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,g)=>(e.openBlock(),e.createElementBlock("span",{key:g,class:"ect-inline-block"},[e.createVNode(dt,{label:l.label,value:l.value},null,8,["label","value"])]))),128)),a.value>0?(e.openBlock(),e.createElementBlock("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-${t.item.itemId}`,onClick:p[4]||(p[4]=e.withModifiers(()=>{},["stop"]))}," +"+e.toDisplayString(a.value)+" more ",9,E1)):e.createCommentVNode("",!0),t.selected?(e.openBlock(),e.createElementBlock("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${t.item.itemId}`,onClick:p[5]||(p[5]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Edit attributes","edit-button":""})],8,k1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("span",w1,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:p[6]||(p[6]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Add attributes","add-button":""})])]))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",N1,[e.createElementVNode("div",A1,[t.showImage?(e.openBlock(),e.createElementBlock("div",B1,[t.imageUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.imageUrl,alt:t.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,S1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",O1,[e.createElementVNode("h3",I1,e.toDisplayString(t.name),1),e.createElementVNode("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:t.description},null,8,T1)]),e.createElementVNode("div",V1,[e.renderSlot(d.$slots,"selection-control")])]),t.isAttributes&&t.showAttributes&&t.selected?(e.openBlock(),e.createElementBlock("div",D1,[f.value.getTags().length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,g)=>(e.openBlock(),e.createElementBlock("span",{key:g,class:"ect-inline-block"},[e.createVNode(dt,{label:l.label,value:l.value},null,8,["label","value"])]))),128)),a.value>0?(e.openBlock(),e.createElementBlock("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-${t.item.itemId}`,onClick:p[7]||(p[7]=e.withModifiers(()=>{},["stop"]))}," +"+e.toDisplayString(a.value)+" more ",9,L1)):e.createCommentVNode("",!0),t.selected?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${t.item.itemId}`,onClick:p[8]||(p[8]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Edit attributes","edit-button":""})],8,F1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("span",R1,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:p[9]||(p[9]=l=>r("edit-attributes"))},[e.createVNode(dt,{label:"Add attributes","add-button":""})])]))])):e.createCommentVNode("",!0),e.createElementVNode("div",P1,[e.createElementVNode("div",{onClick:p[11]||(p[11]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(Qn,{value:y.value,"onUpdate:value":p[10]||(p[10]=l=>y.value=l),min:t.minQuantity,max:t.maxQuantity,"data-test-id":`configurator-item-counter-${t.item.itemId}`,onChange:s},null,8,["value","min","max","data-test-id"])]),e.createElementVNode("div",M1,[q1,e.createVNode(Vr,{modelValue:f.value.price,"onUpdate:modelValue":p[12]||(p[12]=l=>f.value.price=l),tag:"p",type:"currency","data-test-id":"itemId"+t.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),t.selected&&t.isAttributes?(e.openBlock(),e.createElementBlock("div",$1,[e.renderSlot(d.$slots,"default")])):e.createCommentVNode("",!0)],10,d1))}},H1={"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":"."},U1={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"?H1[this.locale]:"."},methods:{handlerInput(t){const i=t.target.value;this.type==="currency"?this.$emit("update:modelValue",i.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",i)},preventNonNumeric(t){if(this.type==="number"){const i=this.decimalPrecision,n=t.target.value,r=t.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&i===0){t.preventDefault();return}if(r==="."&&n.includes(".")){t.preventDefault();return}if(r==="."||n.includes(".")&&!n.endsWith(".")&&r!=="Backspace"){const o=n.split(".");if(o.length>1&&o[1].length>=i){t.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){t.preventDefault();return}}if(t.key==="Backspace"||this.ctrl)return!0;if(t.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&t.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(t.key)||t.preventDefault()}return!0},handlerKeyup(t){t.key==="Control"&&(this.ctrl=!1)}}},z1=["data-test-id"],X1=["for","data-test-id"],K1=["data-test-id"],Q1=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],Z1=["data-test-id"],G1=["data-test-id"];function W1(t,i,n,r,o,c){const f=e.resolveComponent("AppIcon");return e.openBlock(),e.createElementBlock("div",{class:"input","data-test-id":n.dataTestId},[n.label&&n.showLabel?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({error_color:!!n.error}),for:n.label,"data-test-id":`${n.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(n.label)+" ",1),n.required?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass({error_color:!!n.error})},"*",2)):e.createCommentVNode("",!0)],10,X1)):e.createCommentVNode("",!0),n.editMode?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["input-wrapper ect-w-full",{errorBorder_color:!!n.error,highlight:c.isHighlight&&n.highlight}]),"data-test-id":`${n.dataTestId}-wrapper`},[n.icon?(e.openBlock(),e.createBlock(f,{key:0,class:"input-wrapper_icon",icon:n.icon,hover:n.ihover,color:n.icolor,size:19,disabled:n.idisabled,custom:n.icustom,tooltip:n.itooltip,"data-test-id":`${n.dataTestId}-icon`,direction:"top-right",onClick:i[0]||(i[0]=x=>t.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):e.createCommentVNode("",!0),e.createElementVNode("input",{id:n.label,class:e.normalizeClass(`ectheme-input-box ${n.size}`),type:n.type,style:e.normalizeStyle({width:n.icon?"calc(100% - 36px)":"100%",height:`${n.height}px`,textAlign:n.textAlignment}),name:n.name,disabled:n.disabled,placeholder:n.placeholder,value:c.getValue,maxlength:n.max,readonly:n.isReadOnly,"data-test-id":`${n.dataTestId}-input`,onInput:i[1]||(i[1]=(...x)=>c.handlerInput&&c.handlerInput(...x)),onKeydown:i[2]||(i[2]=(...x)=>c.preventNonNumeric&&c.preventNonNumeric(...x)),onKeyup:i[3]||(i[3]=(...x)=>c.handlerKeyup&&c.handlerKeyup(...x)),onBlur:i[4]||(i[4]=x=>t.$emit("blur"))},null,46,Q1)],10,K1)):e.createCommentVNode("",!0),n.editMode?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",{key:2,class:"value","data-test-id":`${n.dataTestId}-value`},e.toDisplayString(c.getValue),9,Z1)),c.error_message?(e.openBlock(),e.createElementBlock("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${n.dataTestId}-error`},e.toDisplayString(c.error_message),9,G1)):e.createCommentVNode("",!0)],8,z1)}const J1=xe(U1,[["render",W1],["__scopeId","data-v-032ca141"]]),Y1={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},eu=["data-test-id"];function tu(t,i,n,r,o,c){return e.openBlock(),e.createElementBlock("div",{class:"spinner","data-test-id":n.dataTestId},null,8,eu)}const nu={name:"CustomDropdown",components:{AppIcon:we,AtomSpinner:xe(Y1,[["render",tu],["__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 t=this.value.toLowerCase();return this.options.filter(i=>JSON.stringify(i).toLowerCase().includes(t))}else return this.options},getSelected(){let t=null;if(this.modelValue)t=this.options.find(i=>i[this.property.key]===this.modelValue);else if(!this.search){const i=this.options.find(n=>n[this.property.key]==="");i?t=i:this.placeholder?t={[this.property.value]:this.placeholder,[this.property.key]:""}:t={[this.property.value]:"--Select--",[this.property.key]:""}}return t||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const t=this.$refs.triggerElement.getBoundingClientRect(),i=250,n=window.innerHeight-t.bottom,r=t.top;return n<i&&r>i},dropdownStyle(){if(!this.$refs.triggerElement)return{};const t=this.$refs.triggerElement.getBoundingClientRect(),i=250,n=window.innerHeight-t.bottom,r=t.top,o=n<i&&r>i;return{position:"absolute",top:o?"auto":"100%",bottom:o?"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 t=this.$refs.triggerElement.getBoundingClientRect(),i=200,n=window.innerHeight-t.bottom,r=t.top,o=n<i&&r>i;this.teleportStyle={position:"absolute",top:`${o?t.top-i:t.bottom}px`,left:`${t.left}px`,width:`${t.width}px`,zIndex:9999}},subFieldsText(t){if(!this.display||this.display.length<1)return"";const i=[];return this.display.forEach(n=>{const r=this.subField(t,n);r&&i.push(r)}),i.join(" | ")},subField(t,i){return i?i.split(".").reduce((o,c)=>o[c]||"",t):t},lookupSearchHandler:Vt(function(t){this.value=t,this.search&&!this.select&&this.$emit("search",t)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(t){t&&(this.value="",this.$emit("update:modelValue",t[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(t=!1){(!this.isHover||t)&&!this.disabled&&(t?(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--}}},ru=["data-test-id"],ou=["for","data-test-id"],au={class:"input-container-box ect-grow ect-w-full"},iu=["data-test-id"],lu=["placeholder","disabled","data-test-id"],su=["data-test-id"],cu=["title","data-test-id"],du=["data-test-id"],uu=["data-test-id"],fu=["data-test-id"],hu=["data-test-id"],pu=["data-test-id","onClick"],mu=["data-test-id"],gu={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},yu=["data-test-id"],xu=["data-test-id"],vu=["data-test-id"],_u=["title","data-test-id"],bu=["data-test-id"];function Cu(t,i,n,r,o,c){const f=e.resolveComponent("AppIcon"),x=e.resolveComponent("AtomSpinner");return e.openBlock(),e.createElementBlock("div",{ref:"dropdownWrapper",class:e.normalizeClass(["customdropdown input-container",{dark:n.dropdownTheme==="dark"}]),"data-test-id":n.dataTestId,onMouseenter:i[7]||(i[7]=y=>t.isHover=!0),onMouseleave:i[8]||(i[8]=y=>t.isHover=!1)},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["title_label",{error_color:!!n.error}]),for:n.label,"data-test-id":`${n.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(n.label)+" ",1),n.required?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass({error_color:!!n.error})},"*",2)):e.createCommentVNode("",!0)],10,ou)):e.createCommentVNode("",!0),e.createElementVNode("div",au,[e.createElementVNode("div",{ref:"triggerElement",class:e.normalizeClass(["input-wrapper ectheme-input-box ect-w-full",{disabled:n.disabled,"input-error":n.error,highlight:c.isHighlight&&n.highlight,"size-large":n.size==="large","size-medium":n.size==="medium"||n.size==="small"}]),"data-test-id":`${n.dataTestId}-trigger`,tabindex:"0",onFocusin:i[2]||(i[2]=(...y)=>c.handlerFocusIn&&c.handlerFocusIn(...y)),onFocusout:i[3]||(i[3]=y=>c.onInputFocusedOut(!1)),onKeydown:[i[4]||(i[4]=e.withKeys(y=>c.updateSelected(n.options[t.highlightedIndex]),["enter"])),i[5]||(i[5]=e.withKeys(e.withModifiers((...y)=>c.highlightPreviousOption&&c.highlightPreviousOption(...y),["prevent"]),["up"])),i[6]||(i[6]=e.withKeys(e.withModifiers((...y)=>c.highlightNextOption&&c.highlightNextOption(...y),["prevent"]),["down"]))]},[!n.modelValue&&n.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref:"searchInput","onUpdate:modelValue":i[0]||(i[0]=y=>t.value=y),type:"text",name:"search",placeholder:n.placeholder,autocomplete:"off",disabled:n.disabled,"data-test-id":`${n.dataTestId}-search-input`,onInput:i[1]||(i[1]=e.withModifiers(y=>c.lookupSearchHandler(y.target.value),["prevent"]))},null,40,lu)),[[e.vModelText,t.value]]):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":n.size==="large","size-medium":n.size==="medium"||n.size==="small"}]),"data-test-id":`${n.dataTestId}-selection`},[c.getSelected?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{title:c.getSelected[n.property.value],class:e.normalizeClass(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!n.modelValue}]),"data-test-id":`${n.dataTestId}-selection-value`},[n.icon?(e.openBlock(),e.createBlock(f,{key:0,class:"ect-mr-0",icon:n.icon,size:14,color:"#5F5F5F","data-test-id":`${n.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(c.getSelected[n.property.value]),1)],10,cu),n.badge&&c.getSelected[n.badge]?(e.openBlock(),e.createElementBlock("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${n.dataTestId}-selection-badge`},e.toDisplayString(c.getSelected[n.badge]),9,du)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],10,su)),n.search?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[n.loading?(e.openBlock(),e.createBlock(x,{key:0,class:"spinner","data-test-id":`${n.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"clear-button","data-test-id":`${n.dataTestId}-action-button`},[t.value||n.modelValue?(e.openBlock(),e.createBlock(f,{key:0,disabled:n.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${n.dataTestId}-clear-button`,onClick:c.clear},null,8,["disabled","data-test-id","onClick"])):(e.openBlock(),e.createBlock(f,{key:1,icon:"search",size:14,color:"#acacac",disabled:n.disabled,"data-test-id":`${n.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,uu))],64)):(e.openBlock(),e.createBlock(f,{key:3,class:"clear-button",color:c.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:n.disabled,"data-test-id":`${n.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,iu),c.error_message?(e.openBlock(),e.createElementBlock("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${n.dataTestId}-error`},e.toDisplayString(c.error_message),9,fu)):e.createCommentVNode("",!0),c.getOptions&&t.inputFocused&&!n.disabled&&(n.select||n.lookup)?(e.openBlock(),e.createElementBlock("div",{key:1,ref:"dropdown",class:e.normalizeClass(["dropdown",{"dropdown-above":c.shouldShowAbove}]),style:e.normalizeStyle(c.dropdownStyle),"data-test-id":`${n.dataTestId}-dropdown`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.getOptions,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:y[n.property.key],class:e.normalizeClass(["dropdown-item",{highlighted:u===t.highlightedIndex,"ect-pointer-events-none":y[n.property.assigned]}]),"data-test-id":`${n.dataTestId}-option-${u}`,onClick:s=>c.updateSelected(y)},[e.createElementVNode("div",{class:"name ect-items-center","data-test-id":`${n.dataTestId}-option-${u}-name`},[e.createElementVNode("span",gu,[e.createElementVNode("span",{class:e.normalizeClass({"ect-text-zinc-400":y[n.property.assigned]}),"data-test-id":`${n.dataTestId}-option-${u}-value`},e.toDisplayString(y[n.property.value]==null?"Key and Value is Wrong":y[n.property.value]),11,yu),y[n.property.assigned]?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${n.dataTestId}-option-${u}-assigned`},"Assigned",8,xu)):e.createCommentVNode("",!0)]),n.badge?(e.openBlock(),e.createElementBlock("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${n.dataTestId}-option-${u}-badge`},e.toDisplayString(y[n.badge]),9,vu)):e.createCommentVNode("",!0)],8,mu),e.createElementVNode("div",{class:"info",title:c.subFieldsText(y),"data-test-id":`${n.dataTestId}-option-${u}-info`},[e.createElementVNode("span",null,e.toDisplayString(c.subFieldsText(y)),1)],8,_u)],10,pu))),128)),!c.getOptions.length&&!n.loading&&(t.value||n.select)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"no-items-found","data-test-id":`${n.dataTestId}-no-options`}," no options found ",8,bu)):e.createCommentVNode("",!0)],14,hu)):e.createCommentVNode("",!0)])],42,ru)}const ci=xe(nu,[["render",Cu],["__scopeId","data-v-5ae4f6dc"]]);var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Eu(t){if(t.__esModule)return t;var i=t.default;if(typeof i=="function"){var n=function r(){return this instanceof r?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};n.prototype=i.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var di={exports:{}};/*!
|
|
11
11
|
* Quill Editor v1.3.7
|
|
12
12
|
* https://quilljs.com/
|
|
13
13
|
* Copyright (c) 2014, Jason Chen
|
|
@@ -27,27 +27,27 @@
|
|
|
27
27
|
`)||this.appendChild(_.default.create("text",`
|
|
28
28
|
`)),x(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"optimize",this).call(this,k);var N=this.next;N!=null&&N.prev===this&&N.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===N.statics.formats(N.domNode)&&(N.optimize(k),N.moveChildren(this),N.remove())}},{key:"replace",value:function(k){x(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"replace",this).call(this,k),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(N){var V=_.default.find(N);V==null?N.parentNode.removeChild(N):V instanceof _.default.Embed?V.remove():V.unwrap()})}}],[{key:"create",value:function(k){var N=x(I.__proto__||Object.getPrototypeOf(I),"create",this).call(this,k);return N.setAttribute("spellcheck",!1),N}},{key:"formats",value:function(){return!0}}]),I}(h.default);w.blotName="code-block",w.tagName="PRE",w.TAB=" ",r.Code=B,r.default=w},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},f=function(){function K(F,E){var T=[],D=!0,P=!1,X=void 0;try{for(var q=F[Symbol.iterator](),z;!(D=(z=q.next()).done)&&(T.push(z.value),!(E&&T.length===E));D=!0);}catch(R){P=!0,X=R}finally{try{!D&&q.return&&q.return()}finally{if(P)throw X}}return T}return function(F,E){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return K(F,E);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(){function K(F,E){for(var T=0;T<E.length;T++){var D=E[T];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(F,D.key,D)}}return function(F,E,T){return E&&K(F.prototype,E),T&&K(F,T),F}}(),y=o(2),u=N(y),s=o(20),_=N(s),a=o(0),h=N(a),d=o(13),p=N(d),l=o(24),g=N(l),m=o(4),b=N(m),v=o(16),C=N(v),B=o(21),w=N(B),S=o(11),I=N(S),A=o(3),k=N(A);function N(K){return K&&K.__esModule?K:{default:K}}function V(K,F,E){return F in K?Object.defineProperty(K,F,{value:E,enumerable:!0,configurable:!0,writable:!0}):K[F]=E,K}function L(K,F){if(!(K instanceof F))throw new TypeError("Cannot call a class as a function")}var M=/^[ -~]*$/,Z=function(){function K(F){L(this,K),this.scroll=F,this.delta=this.getDelta()}return x(K,[{key:"applyDelta",value:function(E){var T=this,D=!1;this.scroll.update();var P=this.scroll.length();return this.scroll.batchStart(),E=J(E),E.reduce(function(X,q){var z=q.retain||q.delete||q.insert.length||1,R=q.attributes||{};if(q.insert!=null){if(typeof q.insert=="string"){var $=q.insert;$.endsWith(`
|
|
29
29
|
`)&&D&&(D=!1,$=$.slice(0,-1)),X>=P&&!$.endsWith(`
|
|
30
|
-
`)&&(D=!0),T.scroll.insertAt(X,$);var j=T.scroll.line(X),U=f(j,2),Q=U[0],Y=U[1],ne=(0,k.default)({},(0,m.bubbleFormats)(Q));if(Q instanceof b.default){var
|
|
30
|
+
`)&&(D=!0),T.scroll.insertAt(X,$);var j=T.scroll.line(X),U=f(j,2),Q=U[0],Y=U[1],ne=(0,k.default)({},(0,m.bubbleFormats)(Q));if(Q instanceof b.default){var se=Q.descendant(h.default.Leaf,Y),he=f(se,1),ce=he[0];ne=(0,k.default)(ne,(0,m.bubbleFormats)(ce))}R=_.default.attributes.diff(ne,R)||{}}else if(c(q.insert)==="object"){var re=Object.keys(q.insert)[0];if(re==null)return X;T.scroll.insertAt(X,re,q.insert[re])}P+=z}return Object.keys(R).forEach(function(te){T.scroll.formatAt(X,z,te,R[te])}),X+z},0),E.reduce(function(X,q){return typeof q.delete=="number"?(T.scroll.deleteAt(X,q.delete),X):X+(q.retain||q.insert.length||1)},0),this.scroll.batchEnd(),this.update(E)}},{key:"deleteText",value:function(E,T){return this.scroll.deleteAt(E,T),this.update(new u.default().retain(E).delete(T))}},{key:"formatLine",value:function(E,T){var D=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(P).forEach(function(X){if(!(D.scroll.whitelist!=null&&!D.scroll.whitelist[X])){var q=D.scroll.lines(E,Math.max(T,1)),z=T;q.forEach(function(R){var $=R.length();if(!(R instanceof p.default))R.format(X,P[X]);else{var j=E-R.offset(D.scroll),U=R.newlineIndex(j+z)-j+1;R.formatAt(j,U,X,P[X])}z-=$})}}),this.scroll.optimize(),this.update(new u.default().retain(E).retain(T,(0,w.default)(P)))}},{key:"formatText",value:function(E,T){var D=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(P).forEach(function(X){D.scroll.formatAt(E,T,X,P[X])}),this.update(new u.default().retain(E).retain(T,(0,w.default)(P)))}},{key:"getContents",value:function(E,T){return this.delta.slice(E,E+T)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(E,T){return E.concat(T.delta())},new u.default)}},{key:"getFormat",value:function(E){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=[],P=[];T===0?this.scroll.path(E).forEach(function(q){var z=f(q,1),R=z[0];R instanceof b.default?D.push(R):R instanceof h.default.Leaf&&P.push(R)}):(D=this.scroll.lines(E,T),P=this.scroll.descendants(h.default.Leaf,E,T));var X=[D,P].map(function(q){if(q.length===0)return{};for(var z=(0,m.bubbleFormats)(q.shift());Object.keys(z).length>0;){var R=q.shift();if(R==null)return z;z=G((0,m.bubbleFormats)(R),z)}return z});return k.default.apply(k.default,X)}},{key:"getText",value:function(E,T){return this.getContents(E,T).filter(function(D){return typeof D.insert=="string"}).map(function(D){return D.insert}).join("")}},{key:"insertEmbed",value:function(E,T,D){return this.scroll.insertAt(E,T,D),this.update(new u.default().retain(E).insert(V({},T,D)))}},{key:"insertText",value:function(E,T){var D=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return T=T.replace(/\r\n/g,`
|
|
31
31
|
`).replace(/\r/g,`
|
|
32
32
|
`),this.scroll.insertAt(E,T),Object.keys(P).forEach(function(X){D.scroll.formatAt(E,T.length,X,P[X])}),this.update(new u.default().retain(E).insert(T,(0,w.default)(P)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var E=this.scroll.children.head;return E.statics.blotName!==b.default.blotName||E.children.length>1?!1:E.children.head instanceof C.default}},{key:"removeFormat",value:function(E,T){var D=this.getText(E,T),P=this.scroll.line(E+T),X=f(P,2),q=X[0],z=X[1],R=0,$=new u.default;q!=null&&(q instanceof p.default?R=q.newlineIndex(z)-z+1:R=q.length()-z,$=q.delta().slice(z,z+R-1).insert(`
|
|
33
33
|
`));var j=this.getContents(E,T+R),U=j.diff(new u.default().insert(D).concat($)),Q=new u.default().retain(E).concat(U);return this.applyDelta(Q)}},{key:"update",value:function(E){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,P=this.delta;if(T.length===1&&T[0].type==="characterData"&&T[0].target.data.match(M)&&h.default.find(T[0].target)){var X=h.default.find(T[0].target),q=(0,m.bubbleFormats)(X),z=X.offset(this.scroll),R=T[0].oldValue.replace(g.default.CONTENTS,""),$=new u.default().insert(R),j=new u.default().insert(X.value()),U=new u.default().retain(z).concat($.diff(j,D));E=U.reduce(function(Q,Y){return Y.insert?Q.insert(Y.insert,q):Q.push(Y)},new u.default),this.delta=P.compose(E)}else this.delta=this.getDelta(),(!E||!(0,I.default)(P.compose(E),this.delta))&&(E=P.diff(this.delta,D));return E}}]),K}();function G(K,F){return Object.keys(F).reduce(function(E,T){return K[T]==null||(F[T]===K[T]?E[T]=F[T]:Array.isArray(F[T])?F[T].indexOf(K[T])<0&&(E[T]=F[T].concat([K[T]])):E[T]=[F[T],K[T]]),E},{})}function J(K){return K.reduce(function(F,E){if(E.insert===1){var T=(0,w.default)(E.attributes);return delete T.image,F.insert({image:E.attributes.image},T)}if(E.attributes!=null&&(E.attributes.list===!0||E.attributes.bullet===!0)&&(E=(0,w.default)(E),E.attributes.list?E.attributes.list="ordered":(E.attributes.list="bullet",delete E.attributes.bullet)),typeof E.insert=="string"){var D=E.insert.replace(/\r\n/g,`
|
|
34
34
|
`).replace(/\r/g,`
|
|
35
35
|
`);return F.insert(D,E.attributes)}return F.push(E)},new u.default)}r.default=Z},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var c=function(){function S(I,A){var k=[],N=!0,V=!1,L=void 0;try{for(var M=I[Symbol.iterator](),Z;!(N=(Z=M.next()).done)&&(k.push(Z.value),!(A&&k.length===A));N=!0);}catch(G){V=!0,L=G}finally{try{!N&&M.return&&M.return()}finally{if(V)throw L}}return k}return function(I,A){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return S(I,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function S(I,A){for(var k=0;k<A.length;k++){var N=A[k];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(I,N.key,N)}}return function(I,A,k){return A&&S(I.prototype,A),k&&S(I,k),I}}(),x=o(0),y=g(x),u=o(21),s=g(u),_=o(11),a=g(_),h=o(8),d=g(h),p=o(10),l=g(p);function g(S){return S&&S.__esModule?S:{default:S}}function m(S){if(Array.isArray(S)){for(var I=0,A=Array(S.length);I<S.length;I++)A[I]=S[I];return A}else return Array.from(S)}function b(S,I){if(!(S instanceof I))throw new TypeError("Cannot call a class as a function")}var v=(0,l.default)("quill:selection"),C=function S(I){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;b(this,S),this.index=I,this.length=A},B=function(){function S(I,A){var k=this;b(this,S),this.emitter=A,this.scroll=I,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=y.default.create("cursor",this),this.lastRange=this.savedRange=new C(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){k.mouseDown||setTimeout(k.update.bind(k,d.default.sources.USER),1)}),this.emitter.on(d.default.events.EDITOR_CHANGE,function(N,V){N===d.default.events.TEXT_CHANGE&&V.length()>0&&k.update(d.default.sources.SILENT)}),this.emitter.on(d.default.events.SCROLL_BEFORE_UPDATE,function(){if(k.hasFocus()){var N=k.getNativeRange();N!=null&&N.start.node!==k.cursor.textNode&&k.emitter.once(d.default.events.SCROLL_UPDATE,function(){try{k.setNativeRange(N.start.node,N.start.offset,N.end.node,N.end.offset)}catch{}})}}),this.emitter.on(d.default.events.SCROLL_OPTIMIZE,function(N,V){if(V.range){var L=V.range,M=L.startNode,Z=L.startOffset,G=L.endNode,J=L.endOffset;k.setNativeRange(M,Z,G,J)}}),this.update(d.default.sources.SILENT)}return f(S,[{key:"handleComposition",value:function(){var A=this;this.root.addEventListener("compositionstart",function(){A.composing=!0}),this.root.addEventListener("compositionend",function(){if(A.composing=!1,A.cursor.parent){var k=A.cursor.restore();if(!k)return;setTimeout(function(){A.setNativeRange(k.startNode,k.startOffset,k.endNode,k.endOffset)},1)}})}},{key:"handleDragging",value:function(){var A=this;this.emitter.listenDOM("mousedown",document.body,function(){A.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){A.mouseDown=!1,A.update(d.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(A,k){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[A])){this.scroll.update();var N=this.getNativeRange();if(!(N==null||!N.native.collapsed||y.default.query(A,y.default.Scope.BLOCK))){if(N.start.node!==this.cursor.textNode){var V=y.default.find(N.start.node,!1);if(V==null)return;if(V instanceof y.default.Leaf){var L=V.split(N.start.offset);V.parent.insertBefore(this.cursor,L)}else V.insertBefore(this.cursor,N.start.node);this.cursor.attach()}this.cursor.format(A,k),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(A){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=this.scroll.length();A=Math.min(A,N-1),k=Math.min(A+k,N-1)-A;var V=void 0,L=this.scroll.leaf(A),M=c(L,2),Z=M[0],G=M[1];if(Z==null)return null;var J=Z.position(G,!0),K=c(J,2);V=K[0],G=K[1];var F=document.createRange();if(k>0){F.setStart(V,G);var E=this.scroll.leaf(A+k),T=c(E,2);if(Z=T[0],G=T[1],Z==null)return null;var D=Z.position(G,!0),P=c(D,2);return V=P[0],G=P[1],F.setEnd(V,G),F.getBoundingClientRect()}else{var X="left",q=void 0;return V instanceof Text?(G<V.data.length?(F.setStart(V,G),F.setEnd(V,G+1)):(F.setStart(V,G-1),F.setEnd(V,G),X="right"),q=F.getBoundingClientRect()):(q=Z.domNode.getBoundingClientRect(),G>0&&(X="right")),{bottom:q.top+q.height,height:q.height,left:q[X],right:q[X],top:q.top,width:0}}}},{key:"getNativeRange",value:function(){var A=document.getSelection();if(A==null||A.rangeCount<=0)return null;var k=A.getRangeAt(0);if(k==null)return null;var N=this.normalizeNative(k);return v.info("getNativeRange",N),N}},{key:"getRange",value:function(){var A=this.getNativeRange();if(A==null)return[null,null];var k=this.normalizedToRange(A);return[k,A]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(A){var k=this,N=[[A.start.node,A.start.offset]];A.native.collapsed||N.push([A.end.node,A.end.offset]);var V=N.map(function(Z){var G=c(Z,2),J=G[0],K=G[1],F=y.default.find(J,!0),E=F.offset(k.scroll);return K===0?E:F instanceof y.default.Container?E+F.length():E+F.index(J,K)}),L=Math.min(Math.max.apply(Math,m(V)),this.scroll.length()-1),M=Math.min.apply(Math,[L].concat(m(V)));return new C(M,L-M)}},{key:"normalizeNative",value:function(A){if(!w(this.root,A.startContainer)||!A.collapsed&&!w(this.root,A.endContainer))return null;var k={start:{node:A.startContainer,offset:A.startOffset},end:{node:A.endContainer,offset:A.endOffset},native:A};return[k.start,k.end].forEach(function(N){for(var V=N.node,L=N.offset;!(V instanceof Text)&&V.childNodes.length>0;)if(V.childNodes.length>L)V=V.childNodes[L],L=0;else if(V.childNodes.length===L)V=V.lastChild,L=V instanceof Text?V.data.length:V.childNodes.length+1;else break;N.node=V,N.offset=L}),k}},{key:"rangeToNative",value:function(A){var k=this,N=A.collapsed?[A.index]:[A.index,A.index+A.length],V=[],L=this.scroll.length();return N.forEach(function(M,Z){M=Math.min(L-1,M);var G=void 0,J=k.scroll.leaf(M),K=c(J,2),F=K[0],E=K[1],T=F.position(E,Z!==0),D=c(T,2);G=D[0],E=D[1],V.push(G,E)}),V.length<2&&(V=V.concat(V)),V}},{key:"scrollIntoView",value:function(A){var k=this.lastRange;if(k!=null){var N=this.getBounds(k.index,k.length);if(N!=null){var V=this.scroll.length()-1,L=this.scroll.line(Math.min(k.index,V)),M=c(L,1),Z=M[0],G=Z;if(k.length>0){var J=this.scroll.line(Math.min(k.index+k.length,V)),K=c(J,1);G=K[0]}if(!(Z==null||G==null)){var F=A.getBoundingClientRect();N.top<F.top?A.scrollTop-=F.top-N.top:N.bottom>F.bottom&&(A.scrollTop+=N.bottom-F.bottom)}}}}},{key:"setNativeRange",value:function(A,k){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A,V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:k,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(v.info("setNativeRange",A,k,N,V),!(A!=null&&(this.root.parentNode==null||A.parentNode==null||N.parentNode==null))){var M=document.getSelection();if(M!=null)if(A!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||L||A!==Z.startContainer||k!==Z.startOffset||N!==Z.endContainer||V!==Z.endOffset){A.tagName=="BR"&&(k=[].indexOf.call(A.parentNode.childNodes,A),A=A.parentNode),N.tagName=="BR"&&(V=[].indexOf.call(N.parentNode.childNodes,N),N=N.parentNode);var G=document.createRange();G.setStart(A,k),G.setEnd(N,V),M.removeAllRanges(),M.addRange(G)}}else M.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(A){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.default.sources.API;if(typeof k=="string"&&(N=k,k=!1),v.info("setRange",A),A!=null){var V=this.rangeToNative(A);this.setNativeRange.apply(this,m(V).concat([k]))}else this.setNativeRange(null);this.update(N)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.default.sources.USER,k=this.lastRange,N=this.getRange(),V=c(N,2),L=V[0],M=V[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,a.default)(k,this.lastRange)){var Z;!this.composing&&M!=null&&M.native.collapsed&&M.start.node!==this.cursor.textNode&&this.cursor.restore();var G=[d.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(k),A];if((Z=this.emitter).emit.apply(Z,[d.default.events.EDITOR_CHANGE].concat(G)),A!==d.default.sources.SILENT){var J;(J=this.emitter).emit.apply(J,G)}}}}]),S}();function w(S,I){try{I.parentNode}catch{return!1}return I instanceof Text&&(I=I.parentNode),S.contains(I)}r.Range=C,r.default=B},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(0),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(){return s(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return c(p,[{key:"insertInto",value:function(g,m){g.children.length===0?f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"insertInto",this).call(this,g,m):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),p}(y.default.Embed);h.blotName="break",h.tagName="BR",r.default=h},function(n,r,o){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,h){a.__proto__=h}||function(a,h){for(var d in h)h.hasOwnProperty(d)&&(a[d]=h[d])};return function(a,h){_(a,h);function d(){this.constructor=a}a.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(44),x=o(30),y=o(1),u=function(_){c(a,_);function a(h){var d=_.call(this,h)||this;return d.build(),d}return a.prototype.appendChild=function(h){this.insertBefore(h)},a.prototype.attach=function(){_.prototype.attach.call(this),this.children.forEach(function(h){h.attach()})},a.prototype.build=function(){var h=this;this.children=new f.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(d){try{var p=s(d);h.insertBefore(p,h.children.head||void 0)}catch(l){if(l instanceof y.ParchmentError)return;throw l}})},a.prototype.deleteAt=function(h,d){if(h===0&&d===this.length())return this.remove();this.children.forEachAt(h,d,function(p,l,g){p.deleteAt(l,g)})},a.prototype.descendant=function(h,d){var p=this.children.find(d),l=p[0],g=p[1];return h.blotName==null&&h(l)||h.blotName!=null&&l instanceof h?[l,g]:l instanceof a?l.descendant(h,g):[null,-1]},a.prototype.descendants=function(h,d,p){d===void 0&&(d=0),p===void 0&&(p=Number.MAX_VALUE);var l=[],g=p;return this.children.forEachAt(d,p,function(m,b,v){(h.blotName==null&&h(m)||h.blotName!=null&&m instanceof h)&&l.push(m),m instanceof a&&(l=l.concat(m.descendants(h,b,g))),g-=v}),l},a.prototype.detach=function(){this.children.forEach(function(h){h.detach()}),_.prototype.detach.call(this)},a.prototype.formatAt=function(h,d,p,l){this.children.forEachAt(h,d,function(g,m,b){g.formatAt(m,b,p,l)})},a.prototype.insertAt=function(h,d,p){var l=this.children.find(h),g=l[0],m=l[1];if(g)g.insertAt(m,d,p);else{var b=p==null?y.create("text",d):y.create(d,p);this.appendChild(b)}},a.prototype.insertBefore=function(h,d){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(p){return h instanceof p}))throw new y.ParchmentError("Cannot insert "+h.statics.blotName+" into "+this.statics.blotName);h.insertInto(this,d)},a.prototype.length=function(){return this.children.reduce(function(h,d){return h+d.length()},0)},a.prototype.moveChildren=function(h,d){this.children.forEach(function(p){h.insertBefore(p,d)})},a.prototype.optimize=function(h){if(_.prototype.optimize.call(this,h),this.children.length===0)if(this.statics.defaultChild!=null){var d=y.create(this.statics.defaultChild);this.appendChild(d),d.optimize(h)}else this.remove()},a.prototype.path=function(h,d){d===void 0&&(d=!1);var p=this.children.find(h,d),l=p[0],g=p[1],m=[[this,h]];return l instanceof a?m.concat(l.path(g,d)):(l!=null&&m.push([l,g]),m)},a.prototype.removeChild=function(h){this.children.remove(h)},a.prototype.replace=function(h){h instanceof a&&h.moveChildren(this),_.prototype.replace.call(this,h)},a.prototype.split=function(h,d){if(d===void 0&&(d=!1),!d){if(h===0)return this;if(h===this.length())return this.next}var p=this.clone();return this.parent.insertBefore(p,this.next),this.children.forEachAt(h,this.length(),function(l,g,m){l=l.split(g,d),p.appendChild(l)}),p},a.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},a.prototype.update=function(h,d){var p=this,l=[],g=[];h.forEach(function(m){m.target===p.domNode&&m.type==="childList"&&(l.push.apply(l,m.addedNodes),g.push.apply(g,m.removedNodes))}),g.forEach(function(m){if(!(m.parentNode!=null&&m.tagName!=="IFRAME"&&document.body.compareDocumentPosition(m)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var b=y.find(m);b!=null&&(b.domNode.parentNode==null||b.domNode.parentNode===p.domNode)&&b.detach()}}),l.filter(function(m){return m.parentNode==p.domNode}).sort(function(m,b){return m===b?0:m.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(m){var b=null;m.nextSibling!=null&&(b=y.find(m.nextSibling));var v=s(m);(v.next!=b||v.next==null)&&(v.parent!=null&&v.parent.removeChild(p),p.insertBefore(v,b||void 0))})},a}(x.default);function s(_){var a=y.find(_);if(a==null)try{a=y.create(_)}catch{a=y.create(y.Scope.INLINE),[].slice.call(_.childNodes).forEach(function(d){a.domNode.appendChild(d)}),_.parentNode&&_.parentNode.replaceChild(a.domNode,_),a.attach()}return a}r.default=u},function(n,r,o){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,h){a.__proto__=h}||function(a,h){for(var d in h)h.hasOwnProperty(d)&&(a[d]=h[d])};return function(a,h){_(a,h);function d(){this.constructor=a}a.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(12),x=o(31),y=o(17),u=o(1),s=function(_){c(a,_);function a(h){var d=_.call(this,h)||this;return d.attributes=new x.default(d.domNode),d}return a.formats=function(h){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return h.tagName.toLowerCase()},a.prototype.format=function(h,d){var p=u.query(h);p instanceof f.default?this.attributes.attribute(p,d):d&&p!=null&&(h!==this.statics.blotName||this.formats()[h]!==d)&&this.replaceWith(h,d)},a.prototype.formats=function(){var h=this.attributes.values(),d=this.statics.formats(this.domNode);return d!=null&&(h[this.statics.blotName]=d),h},a.prototype.replaceWith=function(h,d){var p=_.prototype.replaceWith.call(this,h,d);return this.attributes.copy(p),p},a.prototype.update=function(h,d){var p=this;_.prototype.update.call(this,h,d),h.some(function(l){return l.target===p.domNode&&l.type==="attributes"})&&this.attributes.build()},a.prototype.wrap=function(h,d){var p=_.prototype.wrap.call(this,h,d);return p instanceof a&&p.statics.scope===this.statics.scope&&this.attributes.move(p),p},a}(y.default);r.default=s},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(30),x=o(1),y=function(u){c(s,u);function s(){return u!==null&&u.apply(this,arguments)||this}return s.value=function(_){return!0},s.prototype.index=function(_,a){return this.domNode===_||this.domNode.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(a,1):-1},s.prototype.position=function(_,a){var h=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return _>0&&(h+=1),[this.parent.domNode,h]},s.prototype.value=function(){var _;return _={},_[this.statics.blotName]=this.statics.value(this.domNode)||!0,_},s.scope=x.Scope.INLINE_BLOT,s}(f.default);r.default=y},function(n,r,o){var c=o(11),f=o(3),x={attributes:{compose:function(u,s,_){typeof u!="object"&&(u={}),typeof s!="object"&&(s={});var a=f(!0,{},s);_||(a=Object.keys(a).reduce(function(d,p){return a[p]!=null&&(d[p]=a[p]),d},{}));for(var h in u)u[h]!==void 0&&s[h]===void 0&&(a[h]=u[h]);return Object.keys(a).length>0?a:void 0},diff:function(u,s){typeof u!="object"&&(u={}),typeof s!="object"&&(s={});var _=Object.keys(u).concat(Object.keys(s)).reduce(function(a,h){return c(u[h],s[h])||(a[h]=s[h]===void 0?null:s[h]),a},{});return Object.keys(_).length>0?_:void 0},transform:function(u,s,_){if(typeof u!="object")return s;if(typeof s=="object"){if(!_)return s;var a=Object.keys(s).reduce(function(h,d){return u[d]===void 0&&(h[d]=s[d]),h},{});return Object.keys(a).length>0?a:void 0}}},iterator:function(u){return new y(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function y(u){this.ops=u,this.index=0,this.offset=0}y.prototype.hasNext=function(){return this.peekLength()<1/0},y.prototype.next=function(u){u||(u=1/0);var s=this.ops[this.index];if(s){var _=this.offset,a=x.length(s);if(u>=a-_?(u=a-_,this.index+=1,this.offset=0):this.offset+=u,typeof s.delete=="number")return{delete:u};var h={};return s.attributes&&(h.attributes=s.attributes),typeof s.retain=="number"?h.retain=u:typeof s.insert=="string"?h.insert=s.insert.substr(_,u):h.insert=s.insert,h}else return{retain:1/0}},y.prototype.peek=function(){return this.ops[this.index]},y.prototype.peekLength=function(){return this.ops[this.index]?x.length(this.ops[this.index])-this.offset:1/0},y.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},y.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,s=this.index,_=this.next(),a=this.ops.slice(this.index);return this.offset=u,this.index=s,[_].concat(a)}else return[]},n.exports=x},function(n,r){var o=function(){function c(p,l){return l!=null&&p instanceof l}var f;try{f=Map}catch{f=function(){}}var x;try{x=Set}catch{x=function(){}}var y;try{y=Promise}catch{y=function(){}}function u(p,l,g,m,b){typeof l=="object"&&(g=l.depth,m=l.prototype,b=l.includeNonEnumerable,l=l.circular);var v=[],C=[],B=typeof Buffer<"u";typeof l>"u"&&(l=!0),typeof g>"u"&&(g=1/0);function w(S,I){if(S===null)return null;if(I===0)return S;var A,k;if(typeof S!="object")return S;if(c(S,f))A=new f;else if(c(S,x))A=new x;else if(c(S,y))A=new y(function(F,E){S.then(function(T){F(w(T,I-1))},function(T){E(w(T,I-1))})});else if(u.__isArray(S))A=[];else if(u.__isRegExp(S))A=new RegExp(S.source,d(S)),S.lastIndex&&(A.lastIndex=S.lastIndex);else if(u.__isDate(S))A=new Date(S.getTime());else{if(B&&Buffer.isBuffer(S))return Buffer.allocUnsafe?A=Buffer.allocUnsafe(S.length):A=new Buffer(S.length),S.copy(A),A;c(S,Error)?A=Object.create(S):typeof m>"u"?(k=Object.getPrototypeOf(S),A=Object.create(k)):(A=Object.create(m),k=m)}if(l){var N=v.indexOf(S);if(N!=-1)return C[N];v.push(S),C.push(A)}c(S,f)&&S.forEach(function(F,E){var T=w(E,I-1),D=w(F,I-1);A.set(T,D)}),c(S,x)&&S.forEach(function(F){var E=w(F,I-1);A.add(E)});for(var V in S){var L;k&&(L=Object.getOwnPropertyDescriptor(k,V)),!(L&&L.set==null)&&(A[V]=w(S[V],I-1))}if(Object.getOwnPropertySymbols)for(var M=Object.getOwnPropertySymbols(S),V=0;V<M.length;V++){var Z=M[V],G=Object.getOwnPropertyDescriptor(S,Z);G&&!G.enumerable&&!b||(A[Z]=w(S[Z],I-1),G.enumerable||Object.defineProperty(A,Z,{enumerable:!1}))}if(b)for(var J=Object.getOwnPropertyNames(S),V=0;V<J.length;V++){var K=J[V],G=Object.getOwnPropertyDescriptor(S,K);G&&G.enumerable||(A[K]=w(S[K],I-1),Object.defineProperty(A,K,{enumerable:!1}))}return A}return w(p,g)}u.clonePrototype=function(l){if(l===null)return null;var g=function(){};return g.prototype=l,new g};function s(p){return Object.prototype.toString.call(p)}u.__objToStr=s;function _(p){return typeof p=="object"&&s(p)==="[object Date]"}u.__isDate=_;function a(p){return typeof p=="object"&&s(p)==="[object Array]"}u.__isArray=a;function h(p){return typeof p=="object"&&s(p)==="[object RegExp]"}u.__isRegExp=h;function d(p){var l="";return p.global&&(l+="g"),p.ignoreCase&&(l+="i"),p.multiline&&(l+="m"),l}return u.__getRegExpFlags=d,u}();typeof n=="object"&&n.exports&&(n.exports=o)},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function A(k,N){var V=[],L=!0,M=!1,Z=void 0;try{for(var G=k[Symbol.iterator](),J;!(L=(J=G.next()).done)&&(V.push(J.value),!(N&&V.length===N));L=!0);}catch(K){M=!0,Z=K}finally{try{!L&&G.return&&G.return()}finally{if(M)throw Z}}return V}return function(k,N){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return A(k,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function A(k,N){for(var V=0;V<N.length;V++){var L=N[V];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(k,L.key,L)}}return function(k,N,V){return N&&A(k.prototype,N),V&&A(k,V),k}}(),x=function A(k,N,V){k===null&&(k=Function.prototype);var L=Object.getOwnPropertyDescriptor(k,N);if(L===void 0){var M=Object.getPrototypeOf(k);return M===null?void 0:A(M,N,V)}else{if("value"in L)return L.value;var Z=L.get;return Z===void 0?void 0:Z.call(V)}},y=o(0),u=v(y),s=o(8),_=v(s),a=o(4),h=v(a),d=o(16),p=v(d),l=o(13),g=v(l),m=o(25),b=v(m);function v(A){return A&&A.__esModule?A:{default:A}}function C(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}function B(A,k){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:A}function w(A,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);A.prototype=Object.create(k&&k.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(A,k):A.__proto__=k)}function S(A){return A instanceof h.default||A instanceof a.BlockEmbed}var I=function(A){w(k,A);function k(N,V){C(this,k);var L=B(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,N));return L.emitter=V.emitter,Array.isArray(V.whitelist)&&(L.whitelist=V.whitelist.reduce(function(M,Z){return M[Z]=!0,M},{})),L.domNode.addEventListener("DOMNodeInserted",function(){}),L.optimize(),L.enable(),L}return f(k,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(V,L){var M=this.line(V),Z=c(M,2),G=Z[0],J=Z[1],K=this.line(V+L),F=c(K,1),E=F[0];if(x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"deleteAt",this).call(this,V,L),E!=null&&G!==E&&J>0){if(G instanceof a.BlockEmbed||E instanceof a.BlockEmbed){this.optimize();return}if(G instanceof g.default){var T=G.newlineIndex(G.length(),!0);if(T>-1&&(G=G.split(T+1),G===E)){this.optimize();return}}else if(E instanceof g.default){var D=E.newlineIndex(0);D>-1&&E.split(D+1)}var P=E.children.head instanceof p.default?null:E.children.head;G.moveChildren(E,P),G.remove()}this.optimize()}},{key:"enable",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",V)}},{key:"formatAt",value:function(V,L,M,Z){this.whitelist!=null&&!this.whitelist[M]||(x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"formatAt",this).call(this,V,L,M,Z),this.optimize())}},{key:"insertAt",value:function(V,L,M){if(!(M!=null&&this.whitelist!=null&&!this.whitelist[L])){if(V>=this.length())if(M==null||u.default.query(L,u.default.Scope.BLOCK)==null){var Z=u.default.create(this.statics.defaultChild);this.appendChild(Z),M==null&&L.endsWith(`
|
|
36
|
-
`)&&(L=L.slice(0,-1)),Z.insertAt(0,L,M)}else{var G=u.default.create(L,M);this.appendChild(G)}else x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,V,L,M);this.optimize()}}},{key:"insertBefore",value:function(V,L){if(V.statics.scope===u.default.Scope.INLINE_BLOT){var M=u.default.create(this.statics.defaultChild);M.appendChild(V),V=M}x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertBefore",this).call(this,V,L)}},{key:"leaf",value:function(V){return this.path(V).pop()||[null,-1]}},{key:"line",value:function(V){return V===this.length()?this.line(V-1):this.descendant(S,V)}},{key:"lines",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,M=function Z(G,J,K){var F=[],E=K;return G.children.forEachAt(J,K,function(T,D,P){S(T)?F.push(T):T instanceof u.default.Container&&(F=F.concat(Z(T,D,E))),E-=P}),F};return M(this,V,L)}},{key:"optimize",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"optimize",this).call(this,V,L),V.length>0&&this.emitter.emit(_.default.events.SCROLL_OPTIMIZE,V,L))}},{key:"path",value:function(V){return x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"path",this).call(this,V).slice(1)}},{key:"update",value:function(V){if(this.batch!==!0){var L=_.default.sources.USER;typeof V=="string"&&(L=V),Array.isArray(V)||(V=this.observer.takeRecords()),V.length>0&&this.emitter.emit(_.default.events.SCROLL_BEFORE_UPDATE,L,V),x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"update",this).call(this,V.concat([])),V.length>0&&this.emitter.emit(_.default.events.SCROLL_UPDATE,L,V)}}}]),k}(u.default.Scroll);I.blotName="scroll",I.className="ql-editor",I.tagName="DIV",I.defaultChild="block",I.allowedChildren=[h.default,a.BlockEmbed,b.default],r.default=I},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},f=function(){function q(z,R){var $=[],j=!0,U=!1,Q=void 0;try{for(var Y=z[Symbol.iterator](),ne;!(j=(ne=Y.next()).done)&&($.push(ne.value),!(R&&$.length===R));j=!0);}catch(
|
|
36
|
+
`)&&(L=L.slice(0,-1)),Z.insertAt(0,L,M)}else{var G=u.default.create(L,M);this.appendChild(G)}else x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,V,L,M);this.optimize()}}},{key:"insertBefore",value:function(V,L){if(V.statics.scope===u.default.Scope.INLINE_BLOT){var M=u.default.create(this.statics.defaultChild);M.appendChild(V),V=M}x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertBefore",this).call(this,V,L)}},{key:"leaf",value:function(V){return this.path(V).pop()||[null,-1]}},{key:"line",value:function(V){return V===this.length()?this.line(V-1):this.descendant(S,V)}},{key:"lines",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,M=function Z(G,J,K){var F=[],E=K;return G.children.forEachAt(J,K,function(T,D,P){S(T)?F.push(T):T instanceof u.default.Container&&(F=F.concat(Z(T,D,E))),E-=P}),F};return M(this,V,L)}},{key:"optimize",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"optimize",this).call(this,V,L),V.length>0&&this.emitter.emit(_.default.events.SCROLL_OPTIMIZE,V,L))}},{key:"path",value:function(V){return x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"path",this).call(this,V).slice(1)}},{key:"update",value:function(V){if(this.batch!==!0){var L=_.default.sources.USER;typeof V=="string"&&(L=V),Array.isArray(V)||(V=this.observer.takeRecords()),V.length>0&&this.emitter.emit(_.default.events.SCROLL_BEFORE_UPDATE,L,V),x(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"update",this).call(this,V.concat([])),V.length>0&&this.emitter.emit(_.default.events.SCROLL_UPDATE,L,V)}}}]),k}(u.default.Scroll);I.blotName="scroll",I.className="ql-editor",I.tagName="DIV",I.defaultChild="block",I.allowedChildren=[h.default,a.BlockEmbed,b.default],r.default=I},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},f=function(){function q(z,R){var $=[],j=!0,U=!1,Q=void 0;try{for(var Y=z[Symbol.iterator](),ne;!(j=(ne=Y.next()).done)&&($.push(ne.value),!(R&&$.length===R));j=!0);}catch(se){U=!0,Q=se}finally{try{!j&&Y.return&&Y.return()}finally{if(U)throw Q}}return $}return function(z,R){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return q(z,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(){function q(z,R){for(var $=0;$<R.length;$++){var j=R[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(z,j.key,j)}}return function(z,R,$){return R&&q(z.prototype,R),$&&q(z,$),z}}(),y=o(21),u=A(y),s=o(11),_=A(s),a=o(3),h=A(a),d=o(2),p=A(d),l=o(20),g=A(l),m=o(0),b=A(m),v=o(5),C=A(v),B=o(10),w=A(B),S=o(9),I=A(S);function A(q){return q&&q.__esModule?q:{default:q}}function k(q,z,R){return z in q?Object.defineProperty(q,z,{value:R,enumerable:!0,configurable:!0,writable:!0}):q[z]=R,q}function N(q,z){if(!(q instanceof z))throw new TypeError("Cannot call a class as a function")}function V(q,z){if(!q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z&&(typeof z=="object"||typeof z=="function")?z:q}function L(q,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof z);q.prototype=Object.create(z&&z.prototype,{constructor:{value:q,enumerable:!1,writable:!0,configurable:!0}}),z&&(Object.setPrototypeOf?Object.setPrototypeOf(q,z):q.__proto__=z)}var M=(0,w.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",G=function(q){L(z,q),x(z,null,[{key:"match",value:function($,j){return j=X(j),["altKey","ctrlKey","metaKey","shiftKey"].some(function(U){return!!j[U]!==$[U]&&j[U]!==null})?!1:j.key===($.which||$.keyCode)}}]);function z(R,$){N(this,z);var j=V(this,(z.__proto__||Object.getPrototypeOf(z)).call(this,R,$));return j.bindings={},Object.keys(j.options.bindings).forEach(function(U){U==="list autofill"&&R.scroll.whitelist!=null&&!R.scroll.whitelist.list||j.options.bindings[U]&&j.addBinding(j.options.bindings[U])}),j.addBinding({key:z.keys.ENTER,shiftKey:null},T),j.addBinding({key:z.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(j.addBinding({key:z.keys.BACKSPACE},{collapsed:!0},K),j.addBinding({key:z.keys.DELETE},{collapsed:!0},F)):(j.addBinding({key:z.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},K),j.addBinding({key:z.keys.DELETE},{collapsed:!0,suffix:/^.?$/},F)),j.addBinding({key:z.keys.BACKSPACE},{collapsed:!1},E),j.addBinding({key:z.keys.DELETE},{collapsed:!1},E),j.addBinding({key:z.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},K),j.listen(),j}return x(z,[{key:"addBinding",value:function($){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Q=X($);if(Q==null||Q.key==null)return M.warn("Attempted to add invalid keyboard binding",Q);typeof j=="function"&&(j={handler:j}),typeof U=="function"&&(U={handler:U}),Q=(0,h.default)(Q,j,U),this.bindings[Q.key]=this.bindings[Q.key]||[],this.bindings[Q.key].push(Q)}},{key:"listen",value:function(){var $=this;this.quill.root.addEventListener("keydown",function(j){if(!j.defaultPrevented){var U=j.which||j.keyCode,Q=($.bindings[U]||[]).filter(function(ve){return z.match(j,ve)});if(Q.length!==0){var Y=$.quill.getSelection();if(!(Y==null||!$.quill.hasFocus())){var ne=$.quill.getLine(Y.index),se=f(ne,2),he=se[0],ce=se[1],re=$.quill.getLeaf(Y.index),te=f(re,2),ie=te[0],le=te[1],ae=Y.length===0?[ie,le]:$.quill.getLeaf(Y.index+Y.length),pe=f(ae,2),fe=pe[0],me=pe[1],Ae=ie instanceof b.default.Text?ie.value().slice(0,le):"",Be=fe instanceof b.default.Text?fe.value().slice(me):"",Ee={collapsed:Y.length===0,empty:Y.length===0&&he.length()<=1,format:$.quill.getFormat(Y),offset:ce,prefix:Ae,suffix:Be},ht=Q.some(function(ve){if(ve.collapsed!=null&&ve.collapsed!==Ee.collapsed||ve.empty!=null&&ve.empty!==Ee.empty||ve.offset!=null&&ve.offset!==Ee.offset)return!1;if(Array.isArray(ve.format)){if(ve.format.every(function(Oe){return Ee.format[Oe]==null}))return!1}else if(c(ve.format)==="object"&&!Object.keys(ve.format).every(function(Oe){return ve.format[Oe]===!0?Ee.format[Oe]!=null:ve.format[Oe]===!1?Ee.format[Oe]==null:(0,_.default)(ve.format[Oe],Ee.format[Oe])}))return!1;return ve.prefix!=null&&!ve.prefix.test(Ee.prefix)||ve.suffix!=null&&!ve.suffix.test(Ee.suffix)?!1:ve.handler.call($,Y,Ee)!==!0});ht&&j.preventDefault()}}}})}}]),z}(I.default);G.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},G.DEFAULTS={bindings:{bold:P("bold"),italic:P("italic"),underline:P("underline"),indent:{key:G.keys.TAB,format:["blockquote","indent","list"],handler:function(z,R){if(R.collapsed&&R.offset!==0)return!0;this.quill.format("indent","+1",C.default.sources.USER)}},outdent:{key:G.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(z,R){if(R.collapsed&&R.offset!==0)return!0;this.quill.format("indent","-1",C.default.sources.USER)}},"outdent backspace":{key:G.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(z,R){R.format.indent!=null?this.quill.format("indent","-1",C.default.sources.USER):R.format.list!=null&&this.quill.format("list",!1,C.default.sources.USER)}},"indent code-block":D(!0),"outdent code-block":D(!1),"remove tab":{key:G.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(z){this.quill.deleteText(z.index-1,1,C.default.sources.USER)}},tab:{key:G.keys.TAB,handler:function(z){this.quill.history.cutoff();var R=new p.default().retain(z.index).delete(z.length).insert(" ");this.quill.updateContents(R,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(z.index+1,C.default.sources.SILENT)}},"list empty enter":{key:G.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(z,R){this.quill.format("list",!1,C.default.sources.USER),R.format.indent&&this.quill.format("indent",!1,C.default.sources.USER)}},"checklist enter":{key:G.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(z){var R=this.quill.getLine(z.index),$=f(R,2),j=$[0],U=$[1],Q=(0,h.default)({},j.formats(),{list:"checked"}),Y=new p.default().retain(z.index).insert(`
|
|
37
37
|
`,Q).retain(j.length()-U-1).retain(1,{list:"unchecked"});this.quill.updateContents(Y,C.default.sources.USER),this.quill.setSelection(z.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:G.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(z,R){var $=this.quill.getLine(z.index),j=f($,2),U=j[0],Q=j[1],Y=new p.default().retain(z.index).insert(`
|
|
38
|
-
`,R.format).retain(U.length()-Q-1).retain(1,{header:null});this.quill.updateContents(Y,C.default.sources.USER),this.quill.setSelection(z.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(z,R){var $=R.prefix.length,j=this.quill.getLine(z.index),U=f(j,2),Q=U[0],Y=U[1];if(Y>$)return!0;var ne=void 0;switch(R.prefix.trim()){case"[]":case"[ ]":ne="unchecked";break;case"[x]":ne="checked";break;case"-":case"*":ne="bullet";break;default:ne="ordered"}this.quill.insertText(z.index," ",C.default.sources.USER),this.quill.history.cutoff();var
|
|
39
|
-
`,$,C.default.sources.USER),this.quill.setSelection(q.index+1,C.default.sources.SILENT),this.quill.focus(),Object.keys(z.format).forEach(function(j){$[j]==null&&(Array.isArray(z.format[j])||j!=="link"&&R.quill.format(j,z.format[j],C.default.sources.USER))})}function D(q){return{key:G.keys.TAB,shiftKey:!q,format:{"code-block":!0},handler:function(R){var $=b.default.query("code-block"),j=R.index,U=R.length,Q=this.quill.scroll.descendant($,j),Y=f(Q,2),ne=Y[0],
|
|
40
|
-
`);ce=0,te.forEach(function(ie,le){q?(ne.insertAt(se+ce,$.TAB),ce+=$.TAB.length,le===0?j+=$.TAB.length:U+=$.TAB.length):ie.startsWith($.TAB)&&(ne.deleteAt(se+ce,$.TAB.length),ce-=$.TAB.length,le===0?j-=$.TAB.length:U-=$.TAB.length),ce+=ie.length+1}),this.quill.update(C.default.sources.USER),this.quill.setSelection(j,U,C.default.sources.SILENT)}}}}function P(q){return{key:q[0].toUpperCase(),shortKey:!0,handler:function(R,$){this.quill.format(q,!$.format[q],C.default.sources.USER)}}}function X(q){if(typeof q=="string"||typeof q=="number")return X({key:q});if((typeof q>"u"?"undefined":c(q))==="object"&&(q=(0,u.default)(q,!1)),typeof q.key=="string")if(G.keys[q.key.toUpperCase()]!=null)q.key=G.keys[q.key.toUpperCase()];else if(q.key.length===1)q.key=q.key.toUpperCase().charCodeAt(0);else return null;return q.shortKey&&(q[Z]=q.shortKey,delete q.shortKey),q}r.default=G,r.SHORTKEY=Z},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function g(m,b){var v=[],C=!0,B=!1,w=void 0;try{for(var S=m[Symbol.iterator](),I;!(C=(I=S.next()).done)&&(v.push(I.value),!(b&&v.length===b));C=!0);}catch(A){B=!0,w=A}finally{try{!C&&S.return&&S.return()}finally{if(B)throw w}}return v}return function(m,b){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return g(m,b);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function g(m,b,v){m===null&&(m=Function.prototype);var C=Object.getOwnPropertyDescriptor(m,b);if(C===void 0){var B=Object.getPrototypeOf(m);return B===null?void 0:g(B,b,v)}else{if("value"in C)return C.value;var w=C.get;return w===void 0?void 0:w.call(v)}},x=function(){function g(m,b){for(var v=0;v<b.length;v++){var C=b[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,b,v){return b&&g(m.prototype,b),v&&g(m,v),m}}(),y=o(0),u=a(y),s=o(7),_=a(s);function a(g){return g&&g.__esModule?g:{default:g}}function h(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function p(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var l=function(g){p(m,g),x(m,null,[{key:"value",value:function(){}}]);function m(b,v){h(this,m);var C=d(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,b));return C.selection=v,C.textNode=document.createTextNode(m.CONTENTS),C.domNode.appendChild(C.textNode),C._length=0,C}return x(m,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(v,C){if(this._length!==0)return f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,v,C);for(var B=this,w=0;B!=null&&B.statics.scope!==u.default.Scope.BLOCK_BLOT;)w+=B.offset(B.parent),B=B.parent;B!=null&&(this._length=m.CONTENTS.length,B.optimize(),B.formatAt(w,m.CONTENTS.length,v,C),this._length=0)}},{key:"index",value:function(v,C){return v===this.textNode?0:f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"index",this).call(this,v,C)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var v=this.textNode,C=this.selection.getNativeRange(),B=void 0,w=void 0,S=void 0;if(C!=null&&C.start.node===v&&C.end.node===v){var I=[v,C.start.offset,C.end.offset];B=I[0],w=I[1],S=I[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==m.CONTENTS){var A=this.textNode.data.split(m.CONTENTS).join("");this.next instanceof _.default?(B=this.next.domNode,this.next.insertAt(0,A),this.textNode.data=m.CONTENTS):(this.textNode.data=A,this.parent.insertBefore(u.default.create(this.textNode),this),this.textNode=document.createTextNode(m.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),w!=null){var k=[w,S].map(function(V){return Math.max(0,Math.min(B.data.length,V-1))}),N=c(k,2);return w=N[0],S=N[1],{startNode:B,startOffset:w,endNode:B,endOffset:S}}}}},{key:"update",value:function(v,C){var B=this;if(v.some(function(S){return S.type==="characterData"&&S.target===B.textNode})){var w=this.restore();w&&(C.range=w)}}},{key:"value",value:function(){return""}}]),m}(u.default.Embed);l.blotName="cursor",l.className="ql-cursor",l.tagName="span",l.CONTENTS="\uFEFF",r.default=l},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(0),f=u(c),x=o(4),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(){return s(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(f.default.Container);h.allowedChildren=[y.default,x.BlockEmbed,h],r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var c=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),f=function l(g,m,b){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,m);if(v===void 0){var C=Object.getPrototypeOf(g);return C===null?void 0:l(C,m,b)}else{if("value"in v)return v.value;var B=v.get;return B===void 0?void 0:B.call(b)}},x=o(0),y=u(x);function u(l){return l&&l.__esModule?l:{default:l}}function s(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}function _(l,g){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:l}function a(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);l.prototype=Object.create(g&&g.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(l,g):l.__proto__=g)}var h=function(l){a(g,l);function g(){return s(this,g),_(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return c(g,[{key:"value",value:function(b){var v=f(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,b);return v.startsWith("rgb(")?(v=v.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+v.split(",").map(function(C){return("00"+parseInt(C).toString(16)).slice(-2)}).join("")):v}}]),g}(y.default.Attributor.Style),d=new y.default.Attributor.Class("color","ql-color",{scope:y.default.Scope.INLINE}),p=new h("color","color",{scope:y.default.Scope.INLINE});r.ColorAttributor=h,r.ColorClass=d,r.ColorStyle=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var c=function(){function p(l,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(l,b.key,b)}}return function(l,g,m){return g&&p(l.prototype,g),m&&p(l,m),l}}(),f=function p(l,g,m){l===null&&(l=Function.prototype);var b=Object.getOwnPropertyDescriptor(l,g);if(b===void 0){var v=Object.getPrototypeOf(l);return v===null?void 0:p(v,g,m)}else{if("value"in b)return b.value;var C=b.get;return C===void 0?void 0:C.call(m)}},x=o(6),y=u(x);function u(p){return p&&p.__esModule?p:{default:p}}function s(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function _(p,l){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:p}function a(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(p,l):p.__proto__=l)}var h=function(p){a(l,p);function l(){return s(this,l),_(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return c(l,[{key:"format",value:function(m,b){if(m!==this.statics.blotName||!b)return f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"format",this).call(this,m,b);b=this.constructor.sanitize(b),this.domNode.setAttribute("href",b)}}],[{key:"create",value:function(m){var b=f(l.__proto__||Object.getPrototypeOf(l),"create",this).call(this,m);return m=this.sanitize(m),b.setAttribute("href",m),b.setAttribute("rel","noopener noreferrer"),b.setAttribute("target","_blank"),b}},{key:"formats",value:function(m){return m.getAttribute("href")}},{key:"sanitize",value:function(m){return d(m,this.PROTOCOL_WHITELIST)?m:this.SANITIZED_URL}}]),l}(y.default);h.blotName="link",h.tagName="A",h.SANITIZED_URL="about:blank",h.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function d(p,l){var g=document.createElement("a");g.href=p;var m=g.href.slice(0,g.href.indexOf(":"));return l.indexOf(m)>-1}r.default=h,r.sanitize=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),x=o(23),y=_(x),u=o(107),s=_(u);function _(l){return l&&l.__esModule?l:{default:l}}function a(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var h=0;function d(l,g){l.setAttribute(g,l.getAttribute(g)!=="true")}var p=function(){function l(g){var m=this;a(this,l),this.select=g,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){m.togglePicker()}),this.label.addEventListener("keydown",function(b){switch(b.keyCode){case y.default.keys.ENTER:m.togglePicker();break;case y.default.keys.ESCAPE:m.escape(),b.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return f(l,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),d(this.label,"aria-expanded"),d(this.options,"aria-hidden")}},{key:"buildItem",value:function(m){var b=this,v=document.createElement("span");return v.tabIndex="0",v.setAttribute("role","button"),v.classList.add("ql-picker-item"),m.hasAttribute("value")&&v.setAttribute("data-value",m.getAttribute("value")),m.textContent&&v.setAttribute("data-label",m.textContent),v.addEventListener("click",function(){b.selectItem(v,!0)}),v.addEventListener("keydown",function(C){switch(C.keyCode){case y.default.keys.ENTER:b.selectItem(v,!0),C.preventDefault();break;case y.default.keys.ESCAPE:b.escape(),C.preventDefault();break}}),v}},{key:"buildLabel",value:function(){var m=document.createElement("span");return m.classList.add("ql-picker-label"),m.innerHTML=s.default,m.tabIndex="0",m.setAttribute("role","button"),m.setAttribute("aria-expanded","false"),this.container.appendChild(m),m}},{key:"buildOptions",value:function(){var m=this,b=document.createElement("span");b.classList.add("ql-picker-options"),b.setAttribute("aria-hidden","true"),b.tabIndex="-1",b.id="ql-picker-options-"+h,h+=1,this.label.setAttribute("aria-controls",b.id),this.options=b,[].slice.call(this.select.options).forEach(function(v){var C=m.buildItem(v);b.appendChild(C),v.selected===!0&&m.selectItem(C)}),this.container.appendChild(b)}},{key:"buildPicker",value:function(){var m=this;[].slice.call(this.select.attributes).forEach(function(b){m.container.setAttribute(b.name,b.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var m=this;this.close(),setTimeout(function(){return m.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(m){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=this.container.querySelector(".ql-selected");if(m!==v&&(v!=null&&v.classList.remove("ql-selected"),m!=null&&(m.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(m.parentNode.children,m),m.hasAttribute("data-value")?this.label.setAttribute("data-value",m.getAttribute("data-value")):this.label.removeAttribute("data-value"),m.hasAttribute("data-label")?this.label.setAttribute("data-label",m.getAttribute("data-label")):this.label.removeAttribute("data-label"),b))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":c(Event))==="object"){var C=document.createEvent("Event");C.initEvent("change",!0,!0),this.select.dispatchEvent(C)}this.close()}}},{key:"update",value:function(){var m=void 0;if(this.select.selectedIndex>-1){var b=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];m=this.select.options[this.select.selectedIndex],this.selectItem(b)}else this.selectItem(null);var v=m!=null&&m!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",v)}}]),l}();r.default=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(0),f=M(c),x=o(5),y=M(x),u=o(4),s=M(u),_=o(16),a=M(_),h=o(25),d=M(h),p=o(24),l=M(p),g=o(35),m=M(g),b=o(6),v=M(b),C=o(22),B=M(C),w=o(7),S=M(w),I=o(55),A=M(I),k=o(42),N=M(k),V=o(23),L=M(V);function M(Z){return Z&&Z.__esModule?Z:{default:Z}}y.default.register({"blots/block":s.default,"blots/block/embed":u.BlockEmbed,"blots/break":a.default,"blots/container":d.default,"blots/cursor":l.default,"blots/embed":m.default,"blots/inline":v.default,"blots/scroll":B.default,"blots/text":S.default,"modules/clipboard":A.default,"modules/history":N.default,"modules/keyboard":L.default}),f.default.register(s.default,a.default,l.default,v.default,B.default,S.default),r.default=y.default},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(1),f=function(){function x(y){this.domNode=y,this.domNode[c.DATA_KEY]={blot:this}}return Object.defineProperty(x.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),x.create=function(y){if(this.tagName==null)throw new c.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof y=="string"&&(y=y.toUpperCase(),parseInt(y).toString()===y&&(y=parseInt(y))),typeof y=="number"?u=document.createElement(this.tagName[y-1]):this.tagName.indexOf(y)>-1?u=document.createElement(y):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},x.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},x.prototype.clone=function(){var y=this.domNode.cloneNode(!1);return c.create(y)},x.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[c.DATA_KEY]},x.prototype.deleteAt=function(y,u){var s=this.isolate(y,u);s.remove()},x.prototype.formatAt=function(y,u,s,_){var a=this.isolate(y,u);if(c.query(s,c.Scope.BLOT)!=null&&_)a.wrap(s,_);else if(c.query(s,c.Scope.ATTRIBUTE)!=null){var h=c.create(this.statics.scope);a.wrap(h),h.format(s,_)}},x.prototype.insertAt=function(y,u,s){var _=s==null?c.create("text",u):c.create(u,s),a=this.split(y);this.parent.insertBefore(_,a)},x.prototype.insertInto=function(y,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var s=null;y.children.insertBefore(this,u),u!=null&&(s=u.domNode),(this.domNode.parentNode!=y.domNode||this.domNode.nextSibling!=s)&&y.domNode.insertBefore(this.domNode,s),this.parent=y,this.attach()},x.prototype.isolate=function(y,u){var s=this.split(y);return s.split(u),s},x.prototype.length=function(){return 1},x.prototype.offset=function(y){return y===void 0&&(y=this.parent),this.parent==null||this==y?0:this.parent.children.offset(this)+this.parent.offset(y)},x.prototype.optimize=function(y){this.domNode[c.DATA_KEY]!=null&&delete this.domNode[c.DATA_KEY].mutations},x.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},x.prototype.replace=function(y){y.parent!=null&&(y.parent.insertBefore(this,y.next),y.remove())},x.prototype.replaceWith=function(y,u){var s=typeof y=="string"?c.create(y,u):y;return s.replace(this),s},x.prototype.split=function(y,u){return y===0?this:this.next},x.prototype.update=function(y,u){},x.prototype.wrap=function(y,u){var s=typeof y=="string"?c.create(y,u):y;return this.parent!=null&&this.parent.insertBefore(s,this.next),s.appendChild(this),s},x.blotName="abstract",x}();r.default=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(12),f=o(32),x=o(33),y=o(1),u=function(){function s(_){this.attributes={},this.domNode=_,this.build()}return s.prototype.attribute=function(_,a){a?_.add(this.domNode,a)&&(_.value(this.domNode)!=null?this.attributes[_.attrName]=_:delete this.attributes[_.attrName]):(_.remove(this.domNode),delete this.attributes[_.attrName])},s.prototype.build=function(){var _=this;this.attributes={};var a=c.default.keys(this.domNode),h=f.default.keys(this.domNode),d=x.default.keys(this.domNode);a.concat(h).concat(d).forEach(function(p){var l=y.query(p,y.Scope.ATTRIBUTE);l instanceof c.default&&(_.attributes[l.attrName]=l)})},s.prototype.copy=function(_){var a=this;Object.keys(this.attributes).forEach(function(h){var d=a.attributes[h].value(a.domNode);_.format(h,d)})},s.prototype.move=function(_){var a=this;this.copy(_),Object.keys(this.attributes).forEach(function(h){a.attributes[h].remove(a.domNode)}),this.attributes={}},s.prototype.values=function(){var _=this;return Object.keys(this.attributes).reduce(function(a,h){return a[h]=_.attributes[h].value(_.domNode),a},{})},s}();r.default=u},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(12);function x(u,s){var _=u.getAttribute("class")||"";return _.split(/\s+/).filter(function(a){return a.indexOf(s+"-")===0})}var y=function(u){c(s,u);function s(){return u!==null&&u.apply(this,arguments)||this}return s.keys=function(_){return(_.getAttribute("class")||"").split(/\s+/).map(function(a){return a.split("-").slice(0,-1).join("-")})},s.prototype.add=function(_,a){return this.canAdd(_,a)?(this.remove(_),_.classList.add(this.keyName+"-"+a),!0):!1},s.prototype.remove=function(_){var a=x(_,this.keyName);a.forEach(function(h){_.classList.remove(h)}),_.classList.length===0&&_.removeAttribute("class")},s.prototype.value=function(_){var a=x(_,this.keyName)[0]||"",h=a.slice(this.keyName.length+1);return this.canAdd(_,h)?h:""},s}(f.default);r.default=y},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(12);function x(u){var s=u.split("-"),_=s.slice(1).map(function(a){return a[0].toUpperCase()+a.slice(1)}).join("");return s[0]+_}var y=function(u){c(s,u);function s(){return u!==null&&u.apply(this,arguments)||this}return s.keys=function(_){return(_.getAttribute("style")||"").split(";").map(function(a){var h=a.split(":");return h[0].trim()})},s.prototype.add=function(_,a){return this.canAdd(_,a)?(_.style[x(this.keyName)]=a,!0):!1},s.prototype.remove=function(_){_.style[x(this.keyName)]="",_.getAttribute("style")||_.removeAttribute("style")},s.prototype.value=function(_){var a=_.style[x(this.keyName)];return this.canAdd(_,a)?a:""},s}(f.default);r.default=y},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function y(u,s){for(var _=0;_<s.length;_++){var a=s[_];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}return function(u,s,_){return s&&y(u.prototype,s),_&&y(u,_),u}}();function f(y,u){if(!(y instanceof u))throw new TypeError("Cannot call a class as a function")}var x=function(){function y(u,s){f(this,y),this.quill=u,this.options=s,this.modules={}}return c(y,[{key:"init",value:function(){var s=this;Object.keys(this.options.modules).forEach(function(_){s.modules[_]==null&&s.addModule(_)})}},{key:"addModule",value:function(s){var _=this.quill.constructor.import("modules/"+s);return this.modules[s]=new _(this.quill,this.options.modules[s]||{}),this.modules[s]}}]),y}();x.DEFAULTS={modules:{}},x.themes={default:x},r.default=x},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function g(m,b){for(var v=0;v<b.length;v++){var C=b[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,b,v){return b&&g(m.prototype,b),v&&g(m,v),m}}(),f=function g(m,b,v){m===null&&(m=Function.prototype);var C=Object.getOwnPropertyDescriptor(m,b);if(C===void 0){var B=Object.getPrototypeOf(m);return B===null?void 0:g(B,b,v)}else{if("value"in C)return C.value;var w=C.get;return w===void 0?void 0:w.call(v)}},x=o(0),y=_(x),u=o(7),s=_(u);function _(g){return g&&g.__esModule?g:{default:g}}function a(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function h(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function d(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var p="\uFEFF",l=function(g){d(m,g);function m(b){a(this,m);var v=h(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,b));return v.contentNode=document.createElement("span"),v.contentNode.setAttribute("contenteditable",!1),[].slice.call(v.domNode.childNodes).forEach(function(C){v.contentNode.appendChild(C)}),v.leftGuard=document.createTextNode(p),v.rightGuard=document.createTextNode(p),v.domNode.appendChild(v.leftGuard),v.domNode.appendChild(v.contentNode),v.domNode.appendChild(v.rightGuard),v}return c(m,[{key:"index",value:function(v,C){return v===this.leftGuard?0:v===this.rightGuard?1:f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"index",this).call(this,v,C)}},{key:"restore",value:function(v){var C=void 0,B=void 0,w=v.data.split(p).join("");if(v===this.leftGuard)if(this.prev instanceof s.default){var S=this.prev.length();this.prev.insertAt(S,w),C={startNode:this.prev.domNode,startOffset:S+w.length}}else B=document.createTextNode(w),this.parent.insertBefore(y.default.create(B),this),C={startNode:B,startOffset:w.length};else v===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,w),C={startNode:this.next.domNode,startOffset:w.length}):(B=document.createTextNode(w),this.parent.insertBefore(y.default.create(B),this.next),C={startNode:B,startOffset:w.length}));return v.data=p,C}},{key:"update",value:function(v,C){var B=this;v.forEach(function(w){if(w.type==="characterData"&&(w.target===B.leftGuard||w.target===B.rightGuard)){var S=B.restore(w.target);S&&(C.range=S)}})}}]),m}(y.default.Embed);r.default=l},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var c=o(0),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}var y={scope:f.default.Scope.BLOCK,whitelist:["right","center","justify"]},u=new f.default.Attributor.Attribute("align","align",y),s=new f.default.Attributor.Class("align","ql-align",y),_=new f.default.Attributor.Style("align","text-align",y);r.AlignAttribute=u,r.AlignClass=s,r.AlignStyle=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var c=o(0),f=y(c),x=o(26);function y(_){return _&&_.__esModule?_:{default:_}}var u=new f.default.Attributor.Class("background","ql-bg",{scope:f.default.Scope.INLINE}),s=new x.ColorAttributor("background","background-color",{scope:f.default.Scope.INLINE});r.BackgroundClass=u,r.BackgroundStyle=s},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var c=o(0),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}var y={scope:f.default.Scope.BLOCK,whitelist:["rtl"]},u=new f.default.Attributor.Attribute("direction","dir",y),s=new f.default.Attributor.Class("direction","ql-direction",y),_=new f.default.Attributor.Style("direction","direction",y);r.DirectionAttribute=u,r.DirectionClass=s,r.DirectionStyle=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var c=function(){function g(m,b){for(var v=0;v<b.length;v++){var C=b[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,b,v){return b&&g(m.prototype,b),v&&g(m,v),m}}(),f=function g(m,b,v){m===null&&(m=Function.prototype);var C=Object.getOwnPropertyDescriptor(m,b);if(C===void 0){var B=Object.getPrototypeOf(m);return B===null?void 0:g(B,b,v)}else{if("value"in C)return C.value;var w=C.get;return w===void 0?void 0:w.call(v)}},x=o(0),y=u(x);function u(g){return g&&g.__esModule?g:{default:g}}function s(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function _(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function a(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var h={scope:y.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new y.default.Attributor.Class("font","ql-font",h),p=function(g){a(m,g);function m(){return s(this,m),_(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return c(m,[{key:"value",value:function(v){return f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,v).replace(/["']/g,"")}}]),m}(y.default.Attributor.Style),l=new p("font","font-family",h);r.FontStyle=l,r.FontClass=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var c=o(0),f=x(c);function x(s){return s&&s.__esModule?s:{default:s}}var y=new f.default.Attributor.Class("size","ql-size",{scope:f.default.Scope.INLINE,whitelist:["small","large","huge"]}),u=new f.default.Attributor.Style("size","font-size",{scope:f.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=y,r.SizeStyle=u},function(n,r,o){n.exports={align:{"":o(76),center:o(77),right:o(78),justify:o(79)},background:o(80),blockquote:o(81),bold:o(82),clean:o(83),code:o(58),"code-block":o(58),color:o(84),direction:{"":o(85),rtl:o(86)},float:{center:o(87),full:o(88),left:o(89),right:o(90)},formula:o(91),header:{1:o(92),2:o(93)},italic:o(94),image:o(95),indent:{"+1":o(96),"-1":o(97)},link:o(98),list:{ordered:o(99),bullet:o(100),check:o(101)},script:{sub:o(102),super:o(103)},strike:o(104),underline:o(105),video:o(106)}},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var c=function(){function b(v,C){for(var B=0;B<C.length;B++){var w=C[B];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,C,B){return C&&b(v.prototype,C),B&&b(v,B),v}}(),f=o(0),x=a(f),y=o(5),u=a(y),s=o(9),_=a(s);function a(b){return b&&b.__esModule?b:{default:b}}function h(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var l=function(b){p(v,b);function v(C,B){h(this,v);var w=d(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,C,B));return w.lastRecorded=0,w.ignoreChange=!1,w.clear(),w.quill.on(u.default.events.EDITOR_CHANGE,function(S,I,A,k){S!==u.default.events.TEXT_CHANGE||w.ignoreChange||(!w.options.userOnly||k===u.default.sources.USER?w.record(I,A):w.transform(I))}),w.quill.keyboard.addBinding({key:"Z",shortKey:!0},w.undo.bind(w)),w.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},w.redo.bind(w)),/Win/i.test(navigator.platform)&&w.quill.keyboard.addBinding({key:"Y",shortKey:!0},w.redo.bind(w)),w}return c(v,[{key:"change",value:function(B,w){if(this.stack[B].length!==0){var S=this.stack[B].pop();this.stack[w].push(S),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(S[B],u.default.sources.USER),this.ignoreChange=!1;var I=m(S[B]);this.quill.setSelection(I)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(B,w){if(B.ops.length!==0){this.stack.redo=[];var S=this.quill.getContents().diff(w),I=Date.now();if(this.lastRecorded+this.options.delay>I&&this.stack.undo.length>0){var A=this.stack.undo.pop();S=S.compose(A.undo),B=A.redo.compose(B)}else this.lastRecorded=I;this.stack.undo.push({redo:B,undo:S}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(B){this.stack.undo.forEach(function(w){w.undo=B.transform(w.undo,!0),w.redo=B.transform(w.redo,!0)}),this.stack.redo.forEach(function(w){w.undo=B.transform(w.undo,!0),w.redo=B.transform(w.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),v}(_.default);l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function g(b){var v=b.ops[b.ops.length-1];return v==null?!1:v.insert!=null?typeof v.insert=="string"&&v.insert.endsWith(`
|
|
41
|
-
`):v.attributes!=null?Object.keys(v.attributes).some(function(C){return x.default.query(C,x.default.Scope.BLOCK)!=null}):!1}function m(b){var v=b.reduce(function(B,w){return B+=w.delete||0,B},0),C=b.length()-v;return g(b)&&(C-=1),C}r.default=l,r.getLastChangeIndex=m},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var c=function(){function T(D,P){for(var X=0;X<P.length;X++){var q=P[X];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(D,q.key,q)}}return function(D,P,X){return P&&T(D.prototype,P),X&&T(D,X),D}}(),f=function T(D,P,X){D===null&&(D=Function.prototype);var q=Object.getOwnPropertyDescriptor(D,P);if(q===void 0){var z=Object.getPrototypeOf(D);return z===null?void 0:T(z,P,X)}else{if("value"in q)return q.value;var R=q.get;return R===void 0?void 0:R.call(X)}},x=o(3),y=I(x),u=o(2),s=I(u),_=o(8),a=I(_),h=o(23),d=I(h),p=o(34),l=I(p),g=o(59),m=I(g),b=o(60),v=I(b),C=o(28),B=I(C),w=o(61),S=I(w);function I(T){return T&&T.__esModule?T:{default:T}}function A(T,D){if(!(T instanceof D))throw new TypeError("Cannot call a class as a function")}function k(T,D){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:T}function N(T,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);T.prototype=Object.create(D&&D.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(T,D):T.__proto__=D)}var V=[!1,"center","right","justify"],L=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],M=[!1,"serif","monospace"],Z=["1","2","3",!1],G=["small",!1,"large","huge"],J=function(T){N(D,T);function D(P,X){A(this,D);var q=k(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,P,X)),z=function R($){if(!document.body.contains(P.root))return document.body.removeEventListener("click",R);q.tooltip!=null&&!q.tooltip.root.contains($.target)&&document.activeElement!==q.tooltip.textbox&&!q.quill.hasFocus()&&q.tooltip.hide(),q.pickers!=null&&q.pickers.forEach(function(j){j.container.contains($.target)||j.close()})};return P.emitter.listenDOM("click",document.body,z),q}return c(D,[{key:"addModule",value:function(X){var q=f(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"addModule",this).call(this,X);return X==="toolbar"&&this.extendToolbar(q),q}},{key:"buildButtons",value:function(X,q){X.forEach(function(z){var R=z.getAttribute("class")||"";R.split(/\s+/).forEach(function($){if($.startsWith("ql-")&&($=$.slice(3),q[$]!=null))if($==="direction")z.innerHTML=q[$][""]+q[$].rtl;else if(typeof q[$]=="string")z.innerHTML=q[$];else{var j=z.value||"";j!=null&&q[$][j]&&(z.innerHTML=q[$][j])}})})}},{key:"buildPickers",value:function(X,q){var z=this;this.pickers=X.map(function($){if($.classList.contains("ql-align"))return $.querySelector("option")==null&&E($,V),new v.default($,q.align);if($.classList.contains("ql-background")||$.classList.contains("ql-color")){var j=$.classList.contains("ql-background")?"background":"color";return $.querySelector("option")==null&&E($,L,j==="background"?"#ffffff":"#000000"),new m.default($,q[j])}else return $.querySelector("option")==null&&($.classList.contains("ql-font")?E($,M):$.classList.contains("ql-header")?E($,Z):$.classList.contains("ql-size")&&E($,G)),new B.default($)});var R=function(){z.pickers.forEach(function(j){j.update()})};this.quill.on(a.default.events.EDITOR_CHANGE,R)}}]),D}(l.default);J.DEFAULTS=(0,y.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var D=this,P=this.container.querySelector("input.ql-image[type=file]");P==null&&(P=document.createElement("input"),P.setAttribute("type","file"),P.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),P.classList.add("ql-image"),P.addEventListener("change",function(){if(P.files!=null&&P.files[0]!=null){var X=new FileReader;X.onload=function(q){var z=D.quill.getSelection(!0);D.quill.updateContents(new s.default().retain(z.index).delete(z.length).insert({image:q.target.result}),a.default.sources.USER),D.quill.setSelection(z.index+1,a.default.sources.SILENT),P.value=""},X.readAsDataURL(P.files[0])}}),this.container.appendChild(P)),P.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var K=function(T){N(D,T);function D(P,X){A(this,D);var q=k(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,P,X));return q.textbox=q.root.querySelector('input[type="text"]'),q.listen(),q}return c(D,[{key:"listen",value:function(){var X=this;this.textbox.addEventListener("keydown",function(q){d.default.match(q,"enter")?(X.save(),q.preventDefault()):d.default.match(q,"escape")&&(X.cancel(),q.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),q!=null?this.textbox.value=q:X!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+X)||""),this.root.setAttribute("data-mode",X)}},{key:"restoreFocus",value:function(){var X=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=X}},{key:"save",value:function(){var X=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",X,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",X,a.default.sources.USER)),this.quill.root.scrollTop=q;break}case"video":X=F(X);case"formula":{if(!X)break;var z=this.quill.getSelection(!0);if(z!=null){var R=z.index+z.length;this.quill.insertEmbed(R,this.root.getAttribute("data-mode"),X,a.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(R+1," ",a.default.sources.USER),this.quill.setSelection(R+2,a.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),D}(S.default);function F(T){var D=T.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||T.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return D?(D[1]||"https")+"://www.youtube.com/embed/"+D[2]+"?showinfo=0":(D=T.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(D[1]||"https")+"://player.vimeo.com/video/"+D[2]+"/":T}function E(T,D){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;D.forEach(function(X){var q=document.createElement("option");X===P?q.setAttribute("selected","selected"):q.setAttribute("value",X),T.appendChild(q)})}r.BaseTooltip=K,r.default=J},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function f(){this.head=this.tail=null,this.length=0}return f.prototype.append=function(){for(var x=[],y=0;y<arguments.length;y++)x[y]=arguments[y];this.insertBefore(x[0],null),x.length>1&&this.append.apply(this,x.slice(1))},f.prototype.contains=function(x){for(var y,u=this.iterator();y=u();)if(y===x)return!0;return!1},f.prototype.insertBefore=function(x,y){x&&(x.next=y,y!=null?(x.prev=y.prev,y.prev!=null&&(y.prev.next=x),y.prev=x,y===this.head&&(this.head=x)):this.tail!=null?(this.tail.next=x,x.prev=this.tail,this.tail=x):(x.prev=null,this.head=this.tail=x),this.length+=1)},f.prototype.offset=function(x){for(var y=0,u=this.head;u!=null;){if(u===x)return y;y+=u.length(),u=u.next}return-1},f.prototype.remove=function(x){this.contains(x)&&(x.prev!=null&&(x.prev.next=x.next),x.next!=null&&(x.next.prev=x.prev),x===this.head&&(this.head=x.next),x===this.tail&&(this.tail=x.prev),this.length-=1)},f.prototype.iterator=function(x){return x===void 0&&(x=this.head),function(){var y=x;return x!=null&&(x=x.next),y}},f.prototype.find=function(x,y){y===void 0&&(y=!1);for(var u,s=this.iterator();u=s();){var _=u.length();if(x<_||y&&x===_&&(u.next==null||u.next.length()!==0))return[u,x];x-=_}return[null,0]},f.prototype.forEach=function(x){for(var y,u=this.iterator();y=u();)x(y)},f.prototype.forEachAt=function(x,y,u){if(!(y<=0))for(var s=this.find(x),_=s[0],a=s[1],h,d=x-a,p=this.iterator(_);(h=p())&&d<x+y;){var l=h.length();x>d?u(h,x-d,Math.min(y,d+l-x)):u(h,0,Math.min(l,x+y-d)),d+=l}},f.prototype.map=function(x){return this.reduce(function(y,u){return y.push(x(u)),y},[])},f.prototype.reduce=function(x,y){for(var u,s=this.iterator();u=s();)y=x(y,u);return y},f}();r.default=c},function(n,r,o){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,h){a.__proto__=h}||function(a,h){for(var d in h)h.hasOwnProperty(d)&&(a[d]=h[d])};return function(a,h){_(a,h);function d(){this.constructor=a}a.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(17),x=o(1),y={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,s=function(_){c(a,_);function a(h){var d=_.call(this,h)||this;return d.scroll=d,d.observer=new MutationObserver(function(p){d.update(p)}),d.observer.observe(d.domNode,y),d.attach(),d}return a.prototype.detach=function(){_.prototype.detach.call(this),this.observer.disconnect()},a.prototype.deleteAt=function(h,d){this.update(),h===0&&d===this.length()?this.children.forEach(function(p){p.remove()}):_.prototype.deleteAt.call(this,h,d)},a.prototype.formatAt=function(h,d,p,l){this.update(),_.prototype.formatAt.call(this,h,d,p,l)},a.prototype.insertAt=function(h,d,p){this.update(),_.prototype.insertAt.call(this,h,d,p)},a.prototype.optimize=function(h,d){var p=this;h===void 0&&(h=[]),d===void 0&&(d={}),_.prototype.optimize.call(this,d);for(var l=[].slice.call(this.observer.takeRecords());l.length>0;)h.push(l.pop());for(var g=function(C,B){B===void 0&&(B=!0),!(C==null||C===p)&&C.domNode.parentNode!=null&&(C.domNode[x.DATA_KEY].mutations==null&&(C.domNode[x.DATA_KEY].mutations=[]),B&&g(C.parent))},m=function(C){C.domNode[x.DATA_KEY]==null||C.domNode[x.DATA_KEY].mutations==null||(C instanceof f.default&&C.children.forEach(m),C.optimize(d))},b=h,v=0;b.length>0;v+=1){if(v>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(b.forEach(function(C){var B=x.find(C.target,!0);B!=null&&(B.domNode===C.target&&(C.type==="childList"?(g(x.find(C.previousSibling,!1)),[].forEach.call(C.addedNodes,function(w){var S=x.find(w,!1);g(S,!1),S instanceof f.default&&S.children.forEach(function(I){g(I,!1)})})):C.type==="attributes"&&g(B.prev)),g(B))}),this.children.forEach(m),b=[].slice.call(this.observer.takeRecords()),l=b.slice();l.length>0;)h.push(l.pop())}},a.prototype.update=function(h,d){var p=this;d===void 0&&(d={}),h=h||this.observer.takeRecords(),h.map(function(l){var g=x.find(l.target,!0);return g==null?null:g.domNode[x.DATA_KEY].mutations==null?(g.domNode[x.DATA_KEY].mutations=[l],g):(g.domNode[x.DATA_KEY].mutations.push(l),null)}).forEach(function(l){l==null||l===p||l.domNode[x.DATA_KEY]==null||l.update(l.domNode[x.DATA_KEY].mutations||[],d)}),this.domNode[x.DATA_KEY].mutations!=null&&_.prototype.update.call(this,this.domNode[x.DATA_KEY].mutations,d),this.optimize(h,d)},a.blotName="scroll",a.defaultChild="block",a.scope=x.Scope.BLOCK_BLOT,a.tagName="DIV",a}(f.default);r.default=s},function(n,r,o){var c=this&&this.__extends||function(){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,a){_.__proto__=a}||function(_,a){for(var h in a)a.hasOwnProperty(h)&&(_[h]=a[h])};return function(_,a){s(_,a);function h(){this.constructor=_}_.prototype=a===null?Object.create(a):(h.prototype=a.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(18),x=o(1);function y(s,_){if(Object.keys(s).length!==Object.keys(_).length)return!1;for(var a in s)if(s[a]!==_[a])return!1;return!0}var u=function(s){c(_,s);function _(){return s!==null&&s.apply(this,arguments)||this}return _.formats=function(a){if(a.tagName!==_.tagName)return s.formats.call(this,a)},_.prototype.format=function(a,h){var d=this;a===this.statics.blotName&&!h?(this.children.forEach(function(p){p instanceof f.default||(p=p.wrap(_.blotName,!0)),d.attributes.copy(p)}),this.unwrap()):s.prototype.format.call(this,a,h)},_.prototype.formatAt=function(a,h,d,p){if(this.formats()[d]!=null||x.query(d,x.Scope.ATTRIBUTE)){var l=this.isolate(a,h);l.format(d,p)}else s.prototype.formatAt.call(this,a,h,d,p)},_.prototype.optimize=function(a){s.prototype.optimize.call(this,a);var h=this.formats();if(Object.keys(h).length===0)return this.unwrap();var d=this.next;d instanceof _&&d.prev===this&&y(h,d.formats())&&(d.moveChildren(this),d.remove())},_.blotName="inline",_.scope=x.Scope.INLINE_BLOT,_.tagName="SPAN",_}(f.default);r.default=u},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(18),x=o(1),y=function(u){c(s,u);function s(){return u!==null&&u.apply(this,arguments)||this}return s.formats=function(_){var a=x.query(s.blotName).tagName;if(_.tagName!==a)return u.formats.call(this,_)},s.prototype.format=function(_,a){x.query(_,x.Scope.BLOCK)!=null&&(_===this.statics.blotName&&!a?this.replaceWith(s.blotName):u.prototype.format.call(this,_,a))},s.prototype.formatAt=function(_,a,h,d){x.query(h,x.Scope.BLOCK)!=null?this.format(h,d):u.prototype.formatAt.call(this,_,a,h,d)},s.prototype.insertAt=function(_,a,h){if(h==null||x.query(a,x.Scope.INLINE)!=null)u.prototype.insertAt.call(this,_,a,h);else{var d=this.split(_),p=x.create(a,h);d.parent.insertBefore(p,d)}},s.prototype.update=function(_,a){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,_,a)},s.blotName="block",s.scope=x.Scope.BLOCK_BLOT,s.tagName="P",s}(f.default);r.default=y},function(n,r,o){var c=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,s){u.__proto__=s}||function(u,s){for(var _ in s)s.hasOwnProperty(_)&&(u[_]=s[_])};return function(u,s){y(u,s);function _(){this.constructor=u}u.prototype=s===null?Object.create(s):(_.prototype=s.prototype,new _)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(19),x=function(y){c(u,y);function u(){return y!==null&&y.apply(this,arguments)||this}return u.formats=function(s){},u.prototype.format=function(s,_){y.prototype.formatAt.call(this,0,this.length(),s,_)},u.prototype.formatAt=function(s,_,a,h){s===0&&_===this.length()?this.format(a,h):y.prototype.formatAt.call(this,s,_,a,h)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u}(f.default);r.default=x},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(19),x=o(1),y=function(u){c(s,u);function s(_){var a=u.call(this,_)||this;return a.text=a.statics.value(a.domNode),a}return s.create=function(_){return document.createTextNode(_)},s.value=function(_){var a=_.data;return a.normalize&&(a=a.normalize()),a},s.prototype.deleteAt=function(_,a){this.domNode.data=this.text=this.text.slice(0,_)+this.text.slice(_+a)},s.prototype.index=function(_,a){return this.domNode===_?a:-1},s.prototype.insertAt=function(_,a,h){h==null?(this.text=this.text.slice(0,_)+a+this.text.slice(_),this.domNode.data=this.text):u.prototype.insertAt.call(this,_,a,h)},s.prototype.length=function(){return this.text.length},s.prototype.optimize=function(_){u.prototype.optimize.call(this,_),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof s&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},s.prototype.position=function(_,a){return[this.domNode,_]},s.prototype.split=function(_,a){if(a===void 0&&(a=!1),!a){if(_===0)return this;if(_===this.length())return this.next}var h=x.create(this.domNode.splitText(_));return this.parent.insertBefore(h,this.next),this.text=this.statics.value(this.domNode),h},s.prototype.update=function(_,a){var h=this;_.some(function(d){return d.type==="characterData"&&d.target===h.domNode})&&(this.text=this.statics.value(this.domNode))},s.prototype.value=function(){return this.text},s.blotName="text",s.scope=x.Scope.INLINE_BLOT,s}(f.default);r.default=y},function(n,r,o){var c=document.createElement("div");if(c.classList.toggle("test-class",!1),c.classList.contains("test-class")){var f=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(x,y){return arguments.length>1&&!this.contains(x)==!y?y:f.call(this,x)}}String.prototype.startsWith||(String.prototype.startsWith=function(x,y){return y=y||0,this.substr(y,x.length)===x}),String.prototype.endsWith||(String.prototype.endsWith=function(x,y){var u=this.toString();(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y>u.length)&&(y=u.length),y-=x.length;var s=u.indexOf(x,y);return s!==-1&&s===y}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(y){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof y!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),s=u.length>>>0,_=arguments[1],a,h=0;h<s;h++)if(a=u[h],y.call(_,a,h,u))return a}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(n,r){var o=-1,c=1,f=0;function x(v,C,B){if(v==C)return v?[[f,v]]:[];(B<0||v.length<B)&&(B=null);var w=_(v,C),S=v.substring(0,w);v=v.substring(w),C=C.substring(w),w=a(v,C);var I=v.substring(v.length-w);v=v.substring(0,v.length-w),C=C.substring(0,C.length-w);var A=y(v,C);return S&&A.unshift([f,S]),I&&A.push([f,I]),d(A),B!=null&&(A=g(A,B)),A=m(A),A}function y(v,C){var B;if(!v)return[[c,C]];if(!C)return[[o,v]];var w=v.length>C.length?v:C,S=v.length>C.length?C:v,I=w.indexOf(S);if(I!=-1)return B=[[c,w.substring(0,I)],[f,S],[c,w.substring(I+S.length)]],v.length>C.length&&(B[0][0]=B[2][0]=o),B;if(S.length==1)return[[o,v],[c,C]];var A=h(v,C);if(A){var k=A[0],N=A[1],V=A[2],L=A[3],M=A[4],Z=x(k,V),G=x(N,L);return Z.concat([[f,M]],G)}return u(v,C)}function u(v,C){for(var B=v.length,w=C.length,S=Math.ceil((B+w)/2),I=S,A=2*S,k=new Array(A),N=new Array(A),V=0;V<A;V++)k[V]=-1,N[V]=-1;k[I+1]=0,N[I+1]=0;for(var L=B-w,M=L%2!=0,Z=0,G=0,J=0,K=0,F=0;F<S;F++){for(var E=-F+Z;E<=F-G;E+=2){var T=I+E,D;E==-F||E!=F&&k[T-1]<k[T+1]?D=k[T+1]:D=k[T-1]+1;for(var P=D-E;D<B&&P<w&&v.charAt(D)==C.charAt(P);)D++,P++;if(k[T]=D,D>B)G+=2;else if(P>w)Z+=2;else if(M){var X=I+L-E;if(X>=0&&X<A&&N[X]!=-1){var q=B-N[X];if(D>=q)return s(v,C,D,P)}}}for(var z=-F+J;z<=F-K;z+=2){var X=I+z,q;z==-F||z!=F&&N[X-1]<N[X+1]?q=N[X+1]:q=N[X-1]+1;for(var R=q-z;q<B&&R<w&&v.charAt(B-q-1)==C.charAt(w-R-1);)q++,R++;if(N[X]=q,q>B)K+=2;else if(R>w)J+=2;else if(!M){var T=I+L-z;if(T>=0&&T<A&&k[T]!=-1){var D=k[T],P=I+D-T;if(q=B-q,D>=q)return s(v,C,D,P)}}}}return[[o,v],[c,C]]}function s(v,C,B,w){var S=v.substring(0,B),I=C.substring(0,w),A=v.substring(B),k=C.substring(w),N=x(S,I),V=x(A,k);return N.concat(V)}function _(v,C){if(!v||!C||v.charAt(0)!=C.charAt(0))return 0;for(var B=0,w=Math.min(v.length,C.length),S=w,I=0;B<S;)v.substring(I,S)==C.substring(I,S)?(B=S,I=B):w=S,S=Math.floor((w-B)/2+B);return S}function a(v,C){if(!v||!C||v.charAt(v.length-1)!=C.charAt(C.length-1))return 0;for(var B=0,w=Math.min(v.length,C.length),S=w,I=0;B<S;)v.substring(v.length-S,v.length-I)==C.substring(C.length-S,C.length-I)?(B=S,I=B):w=S,S=Math.floor((w-B)/2+B);return S}function h(v,C){var B=v.length>C.length?v:C,w=v.length>C.length?C:v;if(B.length<4||w.length*2<B.length)return null;function S(G,J,K){for(var F=G.substring(K,K+Math.floor(G.length/4)),E=-1,T="",D,P,X,q;(E=J.indexOf(F,E+1))!=-1;){var z=_(G.substring(K),J.substring(E)),R=a(G.substring(0,K),J.substring(0,E));T.length<R+z&&(T=J.substring(E-R,E)+J.substring(E,E+z),D=G.substring(0,K-R),P=G.substring(K+z),X=J.substring(0,E-R),q=J.substring(E+z))}return T.length*2>=G.length?[D,P,X,q,T]:null}var I=S(B,w,Math.ceil(B.length/4)),A=S(B,w,Math.ceil(B.length/2)),k;if(!I&&!A)return null;A?I?k=I[4].length>A[4].length?I:A:k=A:k=I;var N,V,L,M;v.length>C.length?(N=k[0],V=k[1],L=k[2],M=k[3]):(L=k[0],M=k[1],N=k[2],V=k[3]);var Z=k[4];return[N,V,L,M,Z]}function d(v){v.push([f,""]);for(var C=0,B=0,w=0,S="",I="",A;C<v.length;)switch(v[C][0]){case c:w++,I+=v[C][1],C++;break;case o:B++,S+=v[C][1],C++;break;case f:B+w>1?(B!==0&&w!==0&&(A=_(I,S),A!==0&&(C-B-w>0&&v[C-B-w-1][0]==f?v[C-B-w-1][1]+=I.substring(0,A):(v.splice(0,0,[f,I.substring(0,A)]),C++),I=I.substring(A),S=S.substring(A)),A=a(I,S),A!==0&&(v[C][1]=I.substring(I.length-A)+v[C][1],I=I.substring(0,I.length-A),S=S.substring(0,S.length-A))),B===0?v.splice(C-w,B+w,[c,I]):w===0?v.splice(C-B,B+w,[o,S]):v.splice(C-B-w,B+w,[o,S],[c,I]),C=C-B-w+(B?1:0)+(w?1:0)+1):C!==0&&v[C-1][0]==f?(v[C-1][1]+=v[C][1],v.splice(C,1)):C++,w=0,B=0,S="",I="";break}v[v.length-1][1]===""&&v.pop();var k=!1;for(C=1;C<v.length-1;)v[C-1][0]==f&&v[C+1][0]==f&&(v[C][1].substring(v[C][1].length-v[C-1][1].length)==v[C-1][1]?(v[C][1]=v[C-1][1]+v[C][1].substring(0,v[C][1].length-v[C-1][1].length),v[C+1][1]=v[C-1][1]+v[C+1][1],v.splice(C-1,1),k=!0):v[C][1].substring(0,v[C+1][1].length)==v[C+1][1]&&(v[C-1][1]+=v[C+1][1],v[C][1]=v[C][1].substring(v[C+1][1].length)+v[C+1][1],v.splice(C+1,1),k=!0)),C++;k&&d(v)}var p=x;p.INSERT=c,p.DELETE=o,p.EQUAL=f,n.exports=p;function l(v,C){if(C===0)return[f,v];for(var B=0,w=0;w<v.length;w++){var S=v[w];if(S[0]===o||S[0]===f){var I=B+S[1].length;if(C===I)return[w+1,v];if(C<I){v=v.slice();var A=C-B,k=[S[0],S[1].slice(0,A)],N=[S[0],S[1].slice(A)];return v.splice(w,1,k,N),[w+1,v]}else B=I}}throw new Error("cursor_pos is out of bounds!")}function g(v,C){var B=l(v,C),w=B[1],S=B[0],I=w[S],A=w[S+1];if(I==null)return v;if(I[0]!==f)return v;if(A!=null&&I[1]+A[1]===A[1]+I[1])return w.splice(S,2,A,I),b(w,S,2);if(A!=null&&A[1].indexOf(I[1])===0){w.splice(S,2,[A[0],I[1]],[0,I[1]]);var k=A[1].slice(I[1].length);return k.length>0&&w.splice(S+2,0,[A[0],k]),b(w,S,3)}else return v}function m(v){for(var C=!1,B=function(A){return A.charCodeAt(0)>=56320&&A.charCodeAt(0)<=57343},w=function(A){return A.charCodeAt(A.length-1)>=55296&&A.charCodeAt(A.length-1)<=56319},S=2;S<v.length;S+=1)v[S-2][0]===f&&w(v[S-2][1])&&v[S-1][0]===o&&B(v[S-1][1])&&v[S][0]===c&&B(v[S][1])&&(C=!0,v[S-1][1]=v[S-2][1].slice(-1)+v[S-1][1],v[S][1]=v[S-2][1].slice(-1)+v[S][1],v[S-2][1]=v[S-2][1].slice(0,-1));if(!C)return v;for(var I=[],S=0;S<v.length;S+=1)v[S][1].length>0&&I.push(v[S]);return I}function b(v,C,B){for(var w=C+B-1;w>=0&&w>=C-1;w--)if(w+1<v.length){var S=v[w],I=v[w+1];S[0]===I[1]&&v.splice(w,2,[S[0],S[1]+I[1]])}return v}},function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:o,r.shim=o;function o(c){var f=[];for(var x in c)f.push(x);return f}},function(n,r){var o=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=n.exports=o?c:f,r.supported=c;function c(x){return Object.prototype.toString.call(x)=="[object Arguments]"}r.unsupported=f;function f(x){return x&&typeof x=="object"&&typeof x.length=="number"&&Object.prototype.hasOwnProperty.call(x,"callee")&&!Object.prototype.propertyIsEnumerable.call(x,"callee")||!1}},function(n,r){var o=Object.prototype.hasOwnProperty,c="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(c=!1));function x(u,s,_){this.fn=u,this.context=s,this.once=_||!1}function y(){this._events=new f,this._eventsCount=0}y.prototype.eventNames=function(){var s=[],_,a;if(this._eventsCount===0)return s;for(a in _=this._events)o.call(_,a)&&s.push(c?a.slice(1):a);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(_)):s},y.prototype.listeners=function(s,_){var a=c?c+s:s,h=this._events[a];if(_)return!!h;if(!h)return[];if(h.fn)return[h.fn];for(var d=0,p=h.length,l=new Array(p);d<p;d++)l[d]=h[d].fn;return l},y.prototype.emit=function(s,_,a,h,d,p){var l=c?c+s:s;if(!this._events[l])return!1;var g=this._events[l],m=arguments.length,b,v;if(g.fn){switch(g.once&&this.removeListener(s,g.fn,void 0,!0),m){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,_),!0;case 3:return g.fn.call(g.context,_,a),!0;case 4:return g.fn.call(g.context,_,a,h),!0;case 5:return g.fn.call(g.context,_,a,h,d),!0;case 6:return g.fn.call(g.context,_,a,h,d,p),!0}for(v=1,b=new Array(m-1);v<m;v++)b[v-1]=arguments[v];g.fn.apply(g.context,b)}else{var C=g.length,B;for(v=0;v<C;v++)switch(g[v].once&&this.removeListener(s,g[v].fn,void 0,!0),m){case 1:g[v].fn.call(g[v].context);break;case 2:g[v].fn.call(g[v].context,_);break;case 3:g[v].fn.call(g[v].context,_,a);break;case 4:g[v].fn.call(g[v].context,_,a,h);break;default:if(!b)for(B=1,b=new Array(m-1);B<m;B++)b[B-1]=arguments[B];g[v].fn.apply(g[v].context,b)}}return!0},y.prototype.on=function(s,_,a){var h=new x(_,a||this),d=c?c+s:s;return this._events[d]?this._events[d].fn?this._events[d]=[this._events[d],h]:this._events[d].push(h):(this._events[d]=h,this._eventsCount++),this},y.prototype.once=function(s,_,a){var h=new x(_,a||this,!0),d=c?c+s:s;return this._events[d]?this._events[d].fn?this._events[d]=[this._events[d],h]:this._events[d].push(h):(this._events[d]=h,this._eventsCount++),this},y.prototype.removeListener=function(s,_,a,h){var d=c?c+s:s;if(!this._events[d])return this;if(!_)return--this._eventsCount===0?this._events=new f:delete this._events[d],this;var p=this._events[d];if(p.fn)p.fn===_&&(!h||p.once)&&(!a||p.context===a)&&(--this._eventsCount===0?this._events=new f:delete this._events[d]);else{for(var l=0,g=[],m=p.length;l<m;l++)(p[l].fn!==_||h&&!p[l].once||a&&p[l].context!==a)&&g.push(p[l]);g.length?this._events[d]=g.length===1?g[0]:g:--this._eventsCount===0?this._events=new f:delete this._events[d]}return this},y.prototype.removeAllListeners=function(s){var _;return s?(_=c?c+s:s,this._events[_]&&(--this._eventsCount===0?this._events=new f:delete this._events[_])):(this._events=new f,this._eventsCount=0),this},y.prototype.off=y.prototype.removeListener,y.prototype.addListener=y.prototype.on,y.prototype.setMaxListeners=function(){return this},y.prefixed=c,y.EventEmitter=y,typeof n<"u"&&(n.exports=y)},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},f=function(){function re(te,ie){var le=[],ae=!0,pe=!1,he=void 0;try{for(var me=te[Symbol.iterator](),Ae;!(ae=(Ae=me.next()).done)&&(le.push(Ae.value),!(ie&&le.length===ie));ae=!0);}catch(Be){pe=!0,he=Be}finally{try{!ae&&me.return&&me.return()}finally{if(pe)throw he}}return le}return function(te,ie){if(Array.isArray(te))return te;if(Symbol.iterator in Object(te))return re(te,ie);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(){function re(te,ie){for(var le=0;le<ie.length;le++){var ae=ie[le];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(te,ae.key,ae)}}return function(te,ie,le){return ie&&re(te.prototype,ie),le&&re(te,le),te}}(),y=o(3),u=N(y),s=o(2),_=N(s),a=o(0),h=N(a),d=o(5),p=N(d),l=o(10),g=N(l),m=o(9),b=N(m),v=o(36),C=o(37),B=o(13),w=N(B),S=o(26),I=o(38),A=o(39),k=o(40);function N(re){return re&&re.__esModule?re:{default:re}}function V(re,te,ie){return te in re?Object.defineProperty(re,te,{value:ie,enumerable:!0,configurable:!0,writable:!0}):re[te]=ie,re}function L(re,te){if(!(re instanceof te))throw new TypeError("Cannot call a class as a function")}function M(re,te){if(!re)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te&&(typeof te=="object"||typeof te=="function")?te:re}function Z(re,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof te);re.prototype=Object.create(te&&te.prototype,{constructor:{value:re,enumerable:!1,writable:!0,configurable:!0}}),te&&(Object.setPrototypeOf?Object.setPrototypeOf(re,te):re.__proto__=te)}var G=(0,g.default)("quill:clipboard"),J="__ql-matcher",K=[[Node.TEXT_NODE,se],[Node.TEXT_NODE,ne],["br",U],[Node.ELEMENT_NODE,ne],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,ce],[Node.ELEMENT_NODE,$],[Node.ELEMENT_NODE,fe],["li",Y],["b",R.bind(R,"bold")],["i",R.bind(R,"italic")],["style",Q]],F=[v.AlignAttribute,I.DirectionAttribute].reduce(function(re,te){return re[te.keyName]=te,re},{}),E=[v.AlignStyle,C.BackgroundStyle,S.ColorStyle,I.DirectionStyle,A.FontStyle,k.SizeStyle].reduce(function(re,te){return re[te.keyName]=te,re},{}),T=function(re){Z(te,re);function te(ie,le){L(this,te);var ae=M(this,(te.__proto__||Object.getPrototypeOf(te)).call(this,ie,le));return ae.quill.root.addEventListener("paste",ae.onPaste.bind(ae)),ae.container=ae.quill.addContainer("ql-clipboard"),ae.container.setAttribute("contenteditable",!0),ae.container.setAttribute("tabindex",-1),ae.matchers=[],K.concat(ae.options.matchers).forEach(function(pe){var he=f(pe,2),me=he[0],Ae=he[1];!le.matchVisual&&Ae===ce||ae.addMatcher(me,Ae)}),ae}return x(te,[{key:"addMatcher",value:function(le,ae){this.matchers.push([le,ae])}},{key:"convert",value:function(le){if(typeof le=="string")return this.container.innerHTML=le.replace(/\>\r?\n +\</g,"><"),this.convert();var ae=this.quill.getFormat(this.quill.selection.savedRange.index);if(ae[w.default.blotName]){var pe=this.container.innerText;return this.container.innerHTML="",new _.default().insert(pe,V({},w.default.blotName,ae[w.default.blotName]))}var he=this.prepareMatching(),me=f(he,2),Ae=me[0],Be=me[1],Ee=z(this.container,Ae,Be);return X(Ee,`
|
|
42
|
-
`)&&Ee.ops[Ee.ops.length-1].attributes==null&&(Ee=Ee.compose(new _.default().retain(Ee.length()-1).delete(1))),G.log("convert",this.container.innerHTML,Ee),this.container.innerHTML="",Ee}},{key:"dangerouslyPasteHTML",value:function(le,ae){var pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;if(typeof le=="string")this.quill.setContents(this.convert(le),ae),this.quill.setSelection(0,p.default.sources.SILENT);else{var
|
|
38
|
+
`,R.format).retain(U.length()-Q-1).retain(1,{header:null});this.quill.updateContents(Y,C.default.sources.USER),this.quill.setSelection(z.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(z,R){var $=R.prefix.length,j=this.quill.getLine(z.index),U=f(j,2),Q=U[0],Y=U[1];if(Y>$)return!0;var ne=void 0;switch(R.prefix.trim()){case"[]":case"[ ]":ne="unchecked";break;case"[x]":ne="checked";break;case"-":case"*":ne="bullet";break;default:ne="ordered"}this.quill.insertText(z.index," ",C.default.sources.USER),this.quill.history.cutoff();var se=new p.default().retain(z.index-Y).delete($+1).retain(Q.length()-2-Y).retain(1,{list:ne});this.quill.updateContents(se,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(z.index-$,C.default.sources.SILENT)}},"code exit":{key:G.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(z){var R=this.quill.getLine(z.index),$=f(R,2),j=$[0],U=$[1],Q=new p.default().retain(z.index+j.length()-U-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Q,C.default.sources.USER)}},"embed left":J(G.keys.LEFT,!1),"embed left shift":J(G.keys.LEFT,!0),"embed right":J(G.keys.RIGHT,!1),"embed right shift":J(G.keys.RIGHT,!0)}};function J(q,z){var R,$=q===G.keys.LEFT?"prefix":"suffix";return R={key:q,shiftKey:z,altKey:null},k(R,$,/^$/),k(R,"handler",function(U){var Q=U.index;q===G.keys.RIGHT&&(Q+=U.length+1);var Y=this.quill.getLeaf(Q),ne=f(Y,1),se=ne[0];return se instanceof b.default.Embed?(q===G.keys.LEFT?z?this.quill.setSelection(U.index-1,U.length+1,C.default.sources.USER):this.quill.setSelection(U.index-1,C.default.sources.USER):z?this.quill.setSelection(U.index,U.length+1,C.default.sources.USER):this.quill.setSelection(U.index+U.length+1,C.default.sources.USER),!1):!0}),R}function K(q,z){if(!(q.index===0||this.quill.getLength()<=1)){var R=this.quill.getLine(q.index),$=f(R,1),j=$[0],U={};if(z.offset===0){var Q=this.quill.getLine(q.index-1),Y=f(Q,1),ne=Y[0];if(ne!=null&&ne.length()>1){var se=j.formats(),he=this.quill.getFormat(q.index-1,1);U=g.default.attributes.diff(se,he)||{}}}var ce=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(z.prefix)?2:1;this.quill.deleteText(q.index-ce,ce,C.default.sources.USER),Object.keys(U).length>0&&this.quill.formatLine(q.index-ce,ce,U,C.default.sources.USER),this.quill.focus()}}function F(q,z){var R=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(z.suffix)?2:1;if(!(q.index>=this.quill.getLength()-R)){var $={},j=0,U=this.quill.getLine(q.index),Q=f(U,1),Y=Q[0];if(z.offset>=Y.length()-1){var ne=this.quill.getLine(q.index+1),se=f(ne,1),he=se[0];if(he){var ce=Y.formats(),re=this.quill.getFormat(q.index,1);$=g.default.attributes.diff(ce,re)||{},j=he.length()}}this.quill.deleteText(q.index,R,C.default.sources.USER),Object.keys($).length>0&&this.quill.formatLine(q.index+j-1,R,$,C.default.sources.USER)}}function E(q){var z=this.quill.getLines(q),R={};if(z.length>1){var $=z[0].formats(),j=z[z.length-1].formats();R=g.default.attributes.diff(j,$)||{}}this.quill.deleteText(q,C.default.sources.USER),Object.keys(R).length>0&&this.quill.formatLine(q.index,1,R,C.default.sources.USER),this.quill.setSelection(q.index,C.default.sources.SILENT),this.quill.focus()}function T(q,z){var R=this;q.length>0&&this.quill.scroll.deleteAt(q.index,q.length);var $=Object.keys(z.format).reduce(function(j,U){return b.default.query(U,b.default.Scope.BLOCK)&&!Array.isArray(z.format[U])&&(j[U]=z.format[U]),j},{});this.quill.insertText(q.index,`
|
|
39
|
+
`,$,C.default.sources.USER),this.quill.setSelection(q.index+1,C.default.sources.SILENT),this.quill.focus(),Object.keys(z.format).forEach(function(j){$[j]==null&&(Array.isArray(z.format[j])||j!=="link"&&R.quill.format(j,z.format[j],C.default.sources.USER))})}function D(q){return{key:G.keys.TAB,shiftKey:!q,format:{"code-block":!0},handler:function(R){var $=b.default.query("code-block"),j=R.index,U=R.length,Q=this.quill.scroll.descendant($,j),Y=f(Q,2),ne=Y[0],se=Y[1];if(ne!=null){var he=this.quill.getIndex(ne),ce=ne.newlineIndex(se,!0)+1,re=ne.newlineIndex(he+se+U),te=ne.domNode.textContent.slice(ce,re).split(`
|
|
40
|
+
`);se=0,te.forEach(function(ie,le){q?(ne.insertAt(ce+se,$.TAB),se+=$.TAB.length,le===0?j+=$.TAB.length:U+=$.TAB.length):ie.startsWith($.TAB)&&(ne.deleteAt(ce+se,$.TAB.length),se-=$.TAB.length,le===0?j-=$.TAB.length:U-=$.TAB.length),se+=ie.length+1}),this.quill.update(C.default.sources.USER),this.quill.setSelection(j,U,C.default.sources.SILENT)}}}}function P(q){return{key:q[0].toUpperCase(),shortKey:!0,handler:function(R,$){this.quill.format(q,!$.format[q],C.default.sources.USER)}}}function X(q){if(typeof q=="string"||typeof q=="number")return X({key:q});if((typeof q>"u"?"undefined":c(q))==="object"&&(q=(0,u.default)(q,!1)),typeof q.key=="string")if(G.keys[q.key.toUpperCase()]!=null)q.key=G.keys[q.key.toUpperCase()];else if(q.key.length===1)q.key=q.key.toUpperCase().charCodeAt(0);else return null;return q.shortKey&&(q[Z]=q.shortKey,delete q.shortKey),q}r.default=G,r.SHORTKEY=Z},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function g(m,b){var v=[],C=!0,B=!1,w=void 0;try{for(var S=m[Symbol.iterator](),I;!(C=(I=S.next()).done)&&(v.push(I.value),!(b&&v.length===b));C=!0);}catch(A){B=!0,w=A}finally{try{!C&&S.return&&S.return()}finally{if(B)throw w}}return v}return function(m,b){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return g(m,b);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function g(m,b,v){m===null&&(m=Function.prototype);var C=Object.getOwnPropertyDescriptor(m,b);if(C===void 0){var B=Object.getPrototypeOf(m);return B===null?void 0:g(B,b,v)}else{if("value"in C)return C.value;var w=C.get;return w===void 0?void 0:w.call(v)}},x=function(){function g(m,b){for(var v=0;v<b.length;v++){var C=b[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,b,v){return b&&g(m.prototype,b),v&&g(m,v),m}}(),y=o(0),u=a(y),s=o(7),_=a(s);function a(g){return g&&g.__esModule?g:{default:g}}function h(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function p(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var l=function(g){p(m,g),x(m,null,[{key:"value",value:function(){}}]);function m(b,v){h(this,m);var C=d(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,b));return C.selection=v,C.textNode=document.createTextNode(m.CONTENTS),C.domNode.appendChild(C.textNode),C._length=0,C}return x(m,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(v,C){if(this._length!==0)return f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,v,C);for(var B=this,w=0;B!=null&&B.statics.scope!==u.default.Scope.BLOCK_BLOT;)w+=B.offset(B.parent),B=B.parent;B!=null&&(this._length=m.CONTENTS.length,B.optimize(),B.formatAt(w,m.CONTENTS.length,v,C),this._length=0)}},{key:"index",value:function(v,C){return v===this.textNode?0:f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"index",this).call(this,v,C)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var v=this.textNode,C=this.selection.getNativeRange(),B=void 0,w=void 0,S=void 0;if(C!=null&&C.start.node===v&&C.end.node===v){var I=[v,C.start.offset,C.end.offset];B=I[0],w=I[1],S=I[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==m.CONTENTS){var A=this.textNode.data.split(m.CONTENTS).join("");this.next instanceof _.default?(B=this.next.domNode,this.next.insertAt(0,A),this.textNode.data=m.CONTENTS):(this.textNode.data=A,this.parent.insertBefore(u.default.create(this.textNode),this),this.textNode=document.createTextNode(m.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),w!=null){var k=[w,S].map(function(V){return Math.max(0,Math.min(B.data.length,V-1))}),N=c(k,2);return w=N[0],S=N[1],{startNode:B,startOffset:w,endNode:B,endOffset:S}}}}},{key:"update",value:function(v,C){var B=this;if(v.some(function(S){return S.type==="characterData"&&S.target===B.textNode})){var w=this.restore();w&&(C.range=w)}}},{key:"value",value:function(){return""}}]),m}(u.default.Embed);l.blotName="cursor",l.className="ql-cursor",l.tagName="span",l.CONTENTS="\uFEFF",r.default=l},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(0),f=u(c),x=o(4),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(){return s(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(f.default.Container);h.allowedChildren=[y.default,x.BlockEmbed,h],r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var c=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),f=function l(g,m,b){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,m);if(v===void 0){var C=Object.getPrototypeOf(g);return C===null?void 0:l(C,m,b)}else{if("value"in v)return v.value;var B=v.get;return B===void 0?void 0:B.call(b)}},x=o(0),y=u(x);function u(l){return l&&l.__esModule?l:{default:l}}function s(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}function _(l,g){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:l}function a(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);l.prototype=Object.create(g&&g.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(l,g):l.__proto__=g)}var h=function(l){a(g,l);function g(){return s(this,g),_(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return c(g,[{key:"value",value:function(b){var v=f(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,b);return v.startsWith("rgb(")?(v=v.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+v.split(",").map(function(C){return("00"+parseInt(C).toString(16)).slice(-2)}).join("")):v}}]),g}(y.default.Attributor.Style),d=new y.default.Attributor.Class("color","ql-color",{scope:y.default.Scope.INLINE}),p=new h("color","color",{scope:y.default.Scope.INLINE});r.ColorAttributor=h,r.ColorClass=d,r.ColorStyle=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var c=function(){function p(l,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(l,b.key,b)}}return function(l,g,m){return g&&p(l.prototype,g),m&&p(l,m),l}}(),f=function p(l,g,m){l===null&&(l=Function.prototype);var b=Object.getOwnPropertyDescriptor(l,g);if(b===void 0){var v=Object.getPrototypeOf(l);return v===null?void 0:p(v,g,m)}else{if("value"in b)return b.value;var C=b.get;return C===void 0?void 0:C.call(m)}},x=o(6),y=u(x);function u(p){return p&&p.__esModule?p:{default:p}}function s(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function _(p,l){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:p}function a(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(p,l):p.__proto__=l)}var h=function(p){a(l,p);function l(){return s(this,l),_(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return c(l,[{key:"format",value:function(m,b){if(m!==this.statics.blotName||!b)return f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"format",this).call(this,m,b);b=this.constructor.sanitize(b),this.domNode.setAttribute("href",b)}}],[{key:"create",value:function(m){var b=f(l.__proto__||Object.getPrototypeOf(l),"create",this).call(this,m);return m=this.sanitize(m),b.setAttribute("href",m),b.setAttribute("rel","noopener noreferrer"),b.setAttribute("target","_blank"),b}},{key:"formats",value:function(m){return m.getAttribute("href")}},{key:"sanitize",value:function(m){return d(m,this.PROTOCOL_WHITELIST)?m:this.SANITIZED_URL}}]),l}(y.default);h.blotName="link",h.tagName="A",h.SANITIZED_URL="about:blank",h.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function d(p,l){var g=document.createElement("a");g.href=p;var m=g.href.slice(0,g.href.indexOf(":"));return l.indexOf(m)>-1}r.default=h,r.sanitize=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),x=o(23),y=_(x),u=o(107),s=_(u);function _(l){return l&&l.__esModule?l:{default:l}}function a(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var h=0;function d(l,g){l.setAttribute(g,l.getAttribute(g)!=="true")}var p=function(){function l(g){var m=this;a(this,l),this.select=g,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){m.togglePicker()}),this.label.addEventListener("keydown",function(b){switch(b.keyCode){case y.default.keys.ENTER:m.togglePicker();break;case y.default.keys.ESCAPE:m.escape(),b.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return f(l,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),d(this.label,"aria-expanded"),d(this.options,"aria-hidden")}},{key:"buildItem",value:function(m){var b=this,v=document.createElement("span");return v.tabIndex="0",v.setAttribute("role","button"),v.classList.add("ql-picker-item"),m.hasAttribute("value")&&v.setAttribute("data-value",m.getAttribute("value")),m.textContent&&v.setAttribute("data-label",m.textContent),v.addEventListener("click",function(){b.selectItem(v,!0)}),v.addEventListener("keydown",function(C){switch(C.keyCode){case y.default.keys.ENTER:b.selectItem(v,!0),C.preventDefault();break;case y.default.keys.ESCAPE:b.escape(),C.preventDefault();break}}),v}},{key:"buildLabel",value:function(){var m=document.createElement("span");return m.classList.add("ql-picker-label"),m.innerHTML=s.default,m.tabIndex="0",m.setAttribute("role","button"),m.setAttribute("aria-expanded","false"),this.container.appendChild(m),m}},{key:"buildOptions",value:function(){var m=this,b=document.createElement("span");b.classList.add("ql-picker-options"),b.setAttribute("aria-hidden","true"),b.tabIndex="-1",b.id="ql-picker-options-"+h,h+=1,this.label.setAttribute("aria-controls",b.id),this.options=b,[].slice.call(this.select.options).forEach(function(v){var C=m.buildItem(v);b.appendChild(C),v.selected===!0&&m.selectItem(C)}),this.container.appendChild(b)}},{key:"buildPicker",value:function(){var m=this;[].slice.call(this.select.attributes).forEach(function(b){m.container.setAttribute(b.name,b.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var m=this;this.close(),setTimeout(function(){return m.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(m){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=this.container.querySelector(".ql-selected");if(m!==v&&(v!=null&&v.classList.remove("ql-selected"),m!=null&&(m.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(m.parentNode.children,m),m.hasAttribute("data-value")?this.label.setAttribute("data-value",m.getAttribute("data-value")):this.label.removeAttribute("data-value"),m.hasAttribute("data-label")?this.label.setAttribute("data-label",m.getAttribute("data-label")):this.label.removeAttribute("data-label"),b))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":c(Event))==="object"){var C=document.createEvent("Event");C.initEvent("change",!0,!0),this.select.dispatchEvent(C)}this.close()}}},{key:"update",value:function(){var m=void 0;if(this.select.selectedIndex>-1){var b=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];m=this.select.options[this.select.selectedIndex],this.selectItem(b)}else this.selectItem(null);var v=m!=null&&m!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",v)}}]),l}();r.default=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(0),f=M(c),x=o(5),y=M(x),u=o(4),s=M(u),_=o(16),a=M(_),h=o(25),d=M(h),p=o(24),l=M(p),g=o(35),m=M(g),b=o(6),v=M(b),C=o(22),B=M(C),w=o(7),S=M(w),I=o(55),A=M(I),k=o(42),N=M(k),V=o(23),L=M(V);function M(Z){return Z&&Z.__esModule?Z:{default:Z}}y.default.register({"blots/block":s.default,"blots/block/embed":u.BlockEmbed,"blots/break":a.default,"blots/container":d.default,"blots/cursor":l.default,"blots/embed":m.default,"blots/inline":v.default,"blots/scroll":B.default,"blots/text":S.default,"modules/clipboard":A.default,"modules/history":N.default,"modules/keyboard":L.default}),f.default.register(s.default,a.default,l.default,v.default,B.default,S.default),r.default=y.default},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(1),f=function(){function x(y){this.domNode=y,this.domNode[c.DATA_KEY]={blot:this}}return Object.defineProperty(x.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),x.create=function(y){if(this.tagName==null)throw new c.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof y=="string"&&(y=y.toUpperCase(),parseInt(y).toString()===y&&(y=parseInt(y))),typeof y=="number"?u=document.createElement(this.tagName[y-1]):this.tagName.indexOf(y)>-1?u=document.createElement(y):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},x.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},x.prototype.clone=function(){var y=this.domNode.cloneNode(!1);return c.create(y)},x.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[c.DATA_KEY]},x.prototype.deleteAt=function(y,u){var s=this.isolate(y,u);s.remove()},x.prototype.formatAt=function(y,u,s,_){var a=this.isolate(y,u);if(c.query(s,c.Scope.BLOT)!=null&&_)a.wrap(s,_);else if(c.query(s,c.Scope.ATTRIBUTE)!=null){var h=c.create(this.statics.scope);a.wrap(h),h.format(s,_)}},x.prototype.insertAt=function(y,u,s){var _=s==null?c.create("text",u):c.create(u,s),a=this.split(y);this.parent.insertBefore(_,a)},x.prototype.insertInto=function(y,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var s=null;y.children.insertBefore(this,u),u!=null&&(s=u.domNode),(this.domNode.parentNode!=y.domNode||this.domNode.nextSibling!=s)&&y.domNode.insertBefore(this.domNode,s),this.parent=y,this.attach()},x.prototype.isolate=function(y,u){var s=this.split(y);return s.split(u),s},x.prototype.length=function(){return 1},x.prototype.offset=function(y){return y===void 0&&(y=this.parent),this.parent==null||this==y?0:this.parent.children.offset(this)+this.parent.offset(y)},x.prototype.optimize=function(y){this.domNode[c.DATA_KEY]!=null&&delete this.domNode[c.DATA_KEY].mutations},x.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},x.prototype.replace=function(y){y.parent!=null&&(y.parent.insertBefore(this,y.next),y.remove())},x.prototype.replaceWith=function(y,u){var s=typeof y=="string"?c.create(y,u):y;return s.replace(this),s},x.prototype.split=function(y,u){return y===0?this:this.next},x.prototype.update=function(y,u){},x.prototype.wrap=function(y,u){var s=typeof y=="string"?c.create(y,u):y;return this.parent!=null&&this.parent.insertBefore(s,this.next),s.appendChild(this),s},x.blotName="abstract",x}();r.default=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(12),f=o(32),x=o(33),y=o(1),u=function(){function s(_){this.attributes={},this.domNode=_,this.build()}return s.prototype.attribute=function(_,a){a?_.add(this.domNode,a)&&(_.value(this.domNode)!=null?this.attributes[_.attrName]=_:delete this.attributes[_.attrName]):(_.remove(this.domNode),delete this.attributes[_.attrName])},s.prototype.build=function(){var _=this;this.attributes={};var a=c.default.keys(this.domNode),h=f.default.keys(this.domNode),d=x.default.keys(this.domNode);a.concat(h).concat(d).forEach(function(p){var l=y.query(p,y.Scope.ATTRIBUTE);l instanceof c.default&&(_.attributes[l.attrName]=l)})},s.prototype.copy=function(_){var a=this;Object.keys(this.attributes).forEach(function(h){var d=a.attributes[h].value(a.domNode);_.format(h,d)})},s.prototype.move=function(_){var a=this;this.copy(_),Object.keys(this.attributes).forEach(function(h){a.attributes[h].remove(a.domNode)}),this.attributes={}},s.prototype.values=function(){var _=this;return Object.keys(this.attributes).reduce(function(a,h){return a[h]=_.attributes[h].value(_.domNode),a},{})},s}();r.default=u},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(12);function x(u,s){var _=u.getAttribute("class")||"";return _.split(/\s+/).filter(function(a){return a.indexOf(s+"-")===0})}var y=function(u){c(s,u);function s(){return u!==null&&u.apply(this,arguments)||this}return s.keys=function(_){return(_.getAttribute("class")||"").split(/\s+/).map(function(a){return a.split("-").slice(0,-1).join("-")})},s.prototype.add=function(_,a){return this.canAdd(_,a)?(this.remove(_),_.classList.add(this.keyName+"-"+a),!0):!1},s.prototype.remove=function(_){var a=x(_,this.keyName);a.forEach(function(h){_.classList.remove(h)}),_.classList.length===0&&_.removeAttribute("class")},s.prototype.value=function(_){var a=x(_,this.keyName)[0]||"",h=a.slice(this.keyName.length+1);return this.canAdd(_,h)?h:""},s}(f.default);r.default=y},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(12);function x(u){var s=u.split("-"),_=s.slice(1).map(function(a){return a[0].toUpperCase()+a.slice(1)}).join("");return s[0]+_}var y=function(u){c(s,u);function s(){return u!==null&&u.apply(this,arguments)||this}return s.keys=function(_){return(_.getAttribute("style")||"").split(";").map(function(a){var h=a.split(":");return h[0].trim()})},s.prototype.add=function(_,a){return this.canAdd(_,a)?(_.style[x(this.keyName)]=a,!0):!1},s.prototype.remove=function(_){_.style[x(this.keyName)]="",_.getAttribute("style")||_.removeAttribute("style")},s.prototype.value=function(_){var a=_.style[x(this.keyName)];return this.canAdd(_,a)?a:""},s}(f.default);r.default=y},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function y(u,s){for(var _=0;_<s.length;_++){var a=s[_];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}return function(u,s,_){return s&&y(u.prototype,s),_&&y(u,_),u}}();function f(y,u){if(!(y instanceof u))throw new TypeError("Cannot call a class as a function")}var x=function(){function y(u,s){f(this,y),this.quill=u,this.options=s,this.modules={}}return c(y,[{key:"init",value:function(){var s=this;Object.keys(this.options.modules).forEach(function(_){s.modules[_]==null&&s.addModule(_)})}},{key:"addModule",value:function(s){var _=this.quill.constructor.import("modules/"+s);return this.modules[s]=new _(this.quill,this.options.modules[s]||{}),this.modules[s]}}]),y}();x.DEFAULTS={modules:{}},x.themes={default:x},r.default=x},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function g(m,b){for(var v=0;v<b.length;v++){var C=b[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,b,v){return b&&g(m.prototype,b),v&&g(m,v),m}}(),f=function g(m,b,v){m===null&&(m=Function.prototype);var C=Object.getOwnPropertyDescriptor(m,b);if(C===void 0){var B=Object.getPrototypeOf(m);return B===null?void 0:g(B,b,v)}else{if("value"in C)return C.value;var w=C.get;return w===void 0?void 0:w.call(v)}},x=o(0),y=_(x),u=o(7),s=_(u);function _(g){return g&&g.__esModule?g:{default:g}}function a(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function h(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function d(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var p="\uFEFF",l=function(g){d(m,g);function m(b){a(this,m);var v=h(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,b));return v.contentNode=document.createElement("span"),v.contentNode.setAttribute("contenteditable",!1),[].slice.call(v.domNode.childNodes).forEach(function(C){v.contentNode.appendChild(C)}),v.leftGuard=document.createTextNode(p),v.rightGuard=document.createTextNode(p),v.domNode.appendChild(v.leftGuard),v.domNode.appendChild(v.contentNode),v.domNode.appendChild(v.rightGuard),v}return c(m,[{key:"index",value:function(v,C){return v===this.leftGuard?0:v===this.rightGuard?1:f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"index",this).call(this,v,C)}},{key:"restore",value:function(v){var C=void 0,B=void 0,w=v.data.split(p).join("");if(v===this.leftGuard)if(this.prev instanceof s.default){var S=this.prev.length();this.prev.insertAt(S,w),C={startNode:this.prev.domNode,startOffset:S+w.length}}else B=document.createTextNode(w),this.parent.insertBefore(y.default.create(B),this),C={startNode:B,startOffset:w.length};else v===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,w),C={startNode:this.next.domNode,startOffset:w.length}):(B=document.createTextNode(w),this.parent.insertBefore(y.default.create(B),this.next),C={startNode:B,startOffset:w.length}));return v.data=p,C}},{key:"update",value:function(v,C){var B=this;v.forEach(function(w){if(w.type==="characterData"&&(w.target===B.leftGuard||w.target===B.rightGuard)){var S=B.restore(w.target);S&&(C.range=S)}})}}]),m}(y.default.Embed);r.default=l},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var c=o(0),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}var y={scope:f.default.Scope.BLOCK,whitelist:["right","center","justify"]},u=new f.default.Attributor.Attribute("align","align",y),s=new f.default.Attributor.Class("align","ql-align",y),_=new f.default.Attributor.Style("align","text-align",y);r.AlignAttribute=u,r.AlignClass=s,r.AlignStyle=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var c=o(0),f=y(c),x=o(26);function y(_){return _&&_.__esModule?_:{default:_}}var u=new f.default.Attributor.Class("background","ql-bg",{scope:f.default.Scope.INLINE}),s=new x.ColorAttributor("background","background-color",{scope:f.default.Scope.INLINE});r.BackgroundClass=u,r.BackgroundStyle=s},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var c=o(0),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}var y={scope:f.default.Scope.BLOCK,whitelist:["rtl"]},u=new f.default.Attributor.Attribute("direction","dir",y),s=new f.default.Attributor.Class("direction","ql-direction",y),_=new f.default.Attributor.Style("direction","direction",y);r.DirectionAttribute=u,r.DirectionClass=s,r.DirectionStyle=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var c=function(){function g(m,b){for(var v=0;v<b.length;v++){var C=b[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,b,v){return b&&g(m.prototype,b),v&&g(m,v),m}}(),f=function g(m,b,v){m===null&&(m=Function.prototype);var C=Object.getOwnPropertyDescriptor(m,b);if(C===void 0){var B=Object.getPrototypeOf(m);return B===null?void 0:g(B,b,v)}else{if("value"in C)return C.value;var w=C.get;return w===void 0?void 0:w.call(v)}},x=o(0),y=u(x);function u(g){return g&&g.__esModule?g:{default:g}}function s(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function _(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function a(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var h={scope:y.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new y.default.Attributor.Class("font","ql-font",h),p=function(g){a(m,g);function m(){return s(this,m),_(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return c(m,[{key:"value",value:function(v){return f(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,v).replace(/["']/g,"")}}]),m}(y.default.Attributor.Style),l=new p("font","font-family",h);r.FontStyle=l,r.FontClass=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var c=o(0),f=x(c);function x(s){return s&&s.__esModule?s:{default:s}}var y=new f.default.Attributor.Class("size","ql-size",{scope:f.default.Scope.INLINE,whitelist:["small","large","huge"]}),u=new f.default.Attributor.Style("size","font-size",{scope:f.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=y,r.SizeStyle=u},function(n,r,o){n.exports={align:{"":o(76),center:o(77),right:o(78),justify:o(79)},background:o(80),blockquote:o(81),bold:o(82),clean:o(83),code:o(58),"code-block":o(58),color:o(84),direction:{"":o(85),rtl:o(86)},float:{center:o(87),full:o(88),left:o(89),right:o(90)},formula:o(91),header:{1:o(92),2:o(93)},italic:o(94),image:o(95),indent:{"+1":o(96),"-1":o(97)},link:o(98),list:{ordered:o(99),bullet:o(100),check:o(101)},script:{sub:o(102),super:o(103)},strike:o(104),underline:o(105),video:o(106)}},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var c=function(){function b(v,C){for(var B=0;B<C.length;B++){var w=C[B];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,C,B){return C&&b(v.prototype,C),B&&b(v,B),v}}(),f=o(0),x=a(f),y=o(5),u=a(y),s=o(9),_=a(s);function a(b){return b&&b.__esModule?b:{default:b}}function h(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var l=function(b){p(v,b);function v(C,B){h(this,v);var w=d(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,C,B));return w.lastRecorded=0,w.ignoreChange=!1,w.clear(),w.quill.on(u.default.events.EDITOR_CHANGE,function(S,I,A,k){S!==u.default.events.TEXT_CHANGE||w.ignoreChange||(!w.options.userOnly||k===u.default.sources.USER?w.record(I,A):w.transform(I))}),w.quill.keyboard.addBinding({key:"Z",shortKey:!0},w.undo.bind(w)),w.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},w.redo.bind(w)),/Win/i.test(navigator.platform)&&w.quill.keyboard.addBinding({key:"Y",shortKey:!0},w.redo.bind(w)),w}return c(v,[{key:"change",value:function(B,w){if(this.stack[B].length!==0){var S=this.stack[B].pop();this.stack[w].push(S),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(S[B],u.default.sources.USER),this.ignoreChange=!1;var I=m(S[B]);this.quill.setSelection(I)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(B,w){if(B.ops.length!==0){this.stack.redo=[];var S=this.quill.getContents().diff(w),I=Date.now();if(this.lastRecorded+this.options.delay>I&&this.stack.undo.length>0){var A=this.stack.undo.pop();S=S.compose(A.undo),B=A.redo.compose(B)}else this.lastRecorded=I;this.stack.undo.push({redo:B,undo:S}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(B){this.stack.undo.forEach(function(w){w.undo=B.transform(w.undo,!0),w.redo=B.transform(w.redo,!0)}),this.stack.redo.forEach(function(w){w.undo=B.transform(w.undo,!0),w.redo=B.transform(w.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),v}(_.default);l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function g(b){var v=b.ops[b.ops.length-1];return v==null?!1:v.insert!=null?typeof v.insert=="string"&&v.insert.endsWith(`
|
|
41
|
+
`):v.attributes!=null?Object.keys(v.attributes).some(function(C){return x.default.query(C,x.default.Scope.BLOCK)!=null}):!1}function m(b){var v=b.reduce(function(B,w){return B+=w.delete||0,B},0),C=b.length()-v;return g(b)&&(C-=1),C}r.default=l,r.getLastChangeIndex=m},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var c=function(){function T(D,P){for(var X=0;X<P.length;X++){var q=P[X];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(D,q.key,q)}}return function(D,P,X){return P&&T(D.prototype,P),X&&T(D,X),D}}(),f=function T(D,P,X){D===null&&(D=Function.prototype);var q=Object.getOwnPropertyDescriptor(D,P);if(q===void 0){var z=Object.getPrototypeOf(D);return z===null?void 0:T(z,P,X)}else{if("value"in q)return q.value;var R=q.get;return R===void 0?void 0:R.call(X)}},x=o(3),y=I(x),u=o(2),s=I(u),_=o(8),a=I(_),h=o(23),d=I(h),p=o(34),l=I(p),g=o(59),m=I(g),b=o(60),v=I(b),C=o(28),B=I(C),w=o(61),S=I(w);function I(T){return T&&T.__esModule?T:{default:T}}function A(T,D){if(!(T instanceof D))throw new TypeError("Cannot call a class as a function")}function k(T,D){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:T}function N(T,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);T.prototype=Object.create(D&&D.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(T,D):T.__proto__=D)}var V=[!1,"center","right","justify"],L=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],M=[!1,"serif","monospace"],Z=["1","2","3",!1],G=["small",!1,"large","huge"],J=function(T){N(D,T);function D(P,X){A(this,D);var q=k(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,P,X)),z=function R($){if(!document.body.contains(P.root))return document.body.removeEventListener("click",R);q.tooltip!=null&&!q.tooltip.root.contains($.target)&&document.activeElement!==q.tooltip.textbox&&!q.quill.hasFocus()&&q.tooltip.hide(),q.pickers!=null&&q.pickers.forEach(function(j){j.container.contains($.target)||j.close()})};return P.emitter.listenDOM("click",document.body,z),q}return c(D,[{key:"addModule",value:function(X){var q=f(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"addModule",this).call(this,X);return X==="toolbar"&&this.extendToolbar(q),q}},{key:"buildButtons",value:function(X,q){X.forEach(function(z){var R=z.getAttribute("class")||"";R.split(/\s+/).forEach(function($){if($.startsWith("ql-")&&($=$.slice(3),q[$]!=null))if($==="direction")z.innerHTML=q[$][""]+q[$].rtl;else if(typeof q[$]=="string")z.innerHTML=q[$];else{var j=z.value||"";j!=null&&q[$][j]&&(z.innerHTML=q[$][j])}})})}},{key:"buildPickers",value:function(X,q){var z=this;this.pickers=X.map(function($){if($.classList.contains("ql-align"))return $.querySelector("option")==null&&E($,V),new v.default($,q.align);if($.classList.contains("ql-background")||$.classList.contains("ql-color")){var j=$.classList.contains("ql-background")?"background":"color";return $.querySelector("option")==null&&E($,L,j==="background"?"#ffffff":"#000000"),new m.default($,q[j])}else return $.querySelector("option")==null&&($.classList.contains("ql-font")?E($,M):$.classList.contains("ql-header")?E($,Z):$.classList.contains("ql-size")&&E($,G)),new B.default($)});var R=function(){z.pickers.forEach(function(j){j.update()})};this.quill.on(a.default.events.EDITOR_CHANGE,R)}}]),D}(l.default);J.DEFAULTS=(0,y.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var D=this,P=this.container.querySelector("input.ql-image[type=file]");P==null&&(P=document.createElement("input"),P.setAttribute("type","file"),P.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),P.classList.add("ql-image"),P.addEventListener("change",function(){if(P.files!=null&&P.files[0]!=null){var X=new FileReader;X.onload=function(q){var z=D.quill.getSelection(!0);D.quill.updateContents(new s.default().retain(z.index).delete(z.length).insert({image:q.target.result}),a.default.sources.USER),D.quill.setSelection(z.index+1,a.default.sources.SILENT),P.value=""},X.readAsDataURL(P.files[0])}}),this.container.appendChild(P)),P.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var K=function(T){N(D,T);function D(P,X){A(this,D);var q=k(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,P,X));return q.textbox=q.root.querySelector('input[type="text"]'),q.listen(),q}return c(D,[{key:"listen",value:function(){var X=this;this.textbox.addEventListener("keydown",function(q){d.default.match(q,"enter")?(X.save(),q.preventDefault()):d.default.match(q,"escape")&&(X.cancel(),q.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),q!=null?this.textbox.value=q:X!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+X)||""),this.root.setAttribute("data-mode",X)}},{key:"restoreFocus",value:function(){var X=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=X}},{key:"save",value:function(){var X=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",X,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",X,a.default.sources.USER)),this.quill.root.scrollTop=q;break}case"video":X=F(X);case"formula":{if(!X)break;var z=this.quill.getSelection(!0);if(z!=null){var R=z.index+z.length;this.quill.insertEmbed(R,this.root.getAttribute("data-mode"),X,a.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(R+1," ",a.default.sources.USER),this.quill.setSelection(R+2,a.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),D}(S.default);function F(T){var D=T.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||T.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return D?(D[1]||"https")+"://www.youtube.com/embed/"+D[2]+"?showinfo=0":(D=T.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(D[1]||"https")+"://player.vimeo.com/video/"+D[2]+"/":T}function E(T,D){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;D.forEach(function(X){var q=document.createElement("option");X===P?q.setAttribute("selected","selected"):q.setAttribute("value",X),T.appendChild(q)})}r.BaseTooltip=K,r.default=J},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function f(){this.head=this.tail=null,this.length=0}return f.prototype.append=function(){for(var x=[],y=0;y<arguments.length;y++)x[y]=arguments[y];this.insertBefore(x[0],null),x.length>1&&this.append.apply(this,x.slice(1))},f.prototype.contains=function(x){for(var y,u=this.iterator();y=u();)if(y===x)return!0;return!1},f.prototype.insertBefore=function(x,y){x&&(x.next=y,y!=null?(x.prev=y.prev,y.prev!=null&&(y.prev.next=x),y.prev=x,y===this.head&&(this.head=x)):this.tail!=null?(this.tail.next=x,x.prev=this.tail,this.tail=x):(x.prev=null,this.head=this.tail=x),this.length+=1)},f.prototype.offset=function(x){for(var y=0,u=this.head;u!=null;){if(u===x)return y;y+=u.length(),u=u.next}return-1},f.prototype.remove=function(x){this.contains(x)&&(x.prev!=null&&(x.prev.next=x.next),x.next!=null&&(x.next.prev=x.prev),x===this.head&&(this.head=x.next),x===this.tail&&(this.tail=x.prev),this.length-=1)},f.prototype.iterator=function(x){return x===void 0&&(x=this.head),function(){var y=x;return x!=null&&(x=x.next),y}},f.prototype.find=function(x,y){y===void 0&&(y=!1);for(var u,s=this.iterator();u=s();){var _=u.length();if(x<_||y&&x===_&&(u.next==null||u.next.length()!==0))return[u,x];x-=_}return[null,0]},f.prototype.forEach=function(x){for(var y,u=this.iterator();y=u();)x(y)},f.prototype.forEachAt=function(x,y,u){if(!(y<=0))for(var s=this.find(x),_=s[0],a=s[1],h,d=x-a,p=this.iterator(_);(h=p())&&d<x+y;){var l=h.length();x>d?u(h,x-d,Math.min(y,d+l-x)):u(h,0,Math.min(l,x+y-d)),d+=l}},f.prototype.map=function(x){return this.reduce(function(y,u){return y.push(x(u)),y},[])},f.prototype.reduce=function(x,y){for(var u,s=this.iterator();u=s();)y=x(y,u);return y},f}();r.default=c},function(n,r,o){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,h){a.__proto__=h}||function(a,h){for(var d in h)h.hasOwnProperty(d)&&(a[d]=h[d])};return function(a,h){_(a,h);function d(){this.constructor=a}a.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(17),x=o(1),y={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,s=function(_){c(a,_);function a(h){var d=_.call(this,h)||this;return d.scroll=d,d.observer=new MutationObserver(function(p){d.update(p)}),d.observer.observe(d.domNode,y),d.attach(),d}return a.prototype.detach=function(){_.prototype.detach.call(this),this.observer.disconnect()},a.prototype.deleteAt=function(h,d){this.update(),h===0&&d===this.length()?this.children.forEach(function(p){p.remove()}):_.prototype.deleteAt.call(this,h,d)},a.prototype.formatAt=function(h,d,p,l){this.update(),_.prototype.formatAt.call(this,h,d,p,l)},a.prototype.insertAt=function(h,d,p){this.update(),_.prototype.insertAt.call(this,h,d,p)},a.prototype.optimize=function(h,d){var p=this;h===void 0&&(h=[]),d===void 0&&(d={}),_.prototype.optimize.call(this,d);for(var l=[].slice.call(this.observer.takeRecords());l.length>0;)h.push(l.pop());for(var g=function(C,B){B===void 0&&(B=!0),!(C==null||C===p)&&C.domNode.parentNode!=null&&(C.domNode[x.DATA_KEY].mutations==null&&(C.domNode[x.DATA_KEY].mutations=[]),B&&g(C.parent))},m=function(C){C.domNode[x.DATA_KEY]==null||C.domNode[x.DATA_KEY].mutations==null||(C instanceof f.default&&C.children.forEach(m),C.optimize(d))},b=h,v=0;b.length>0;v+=1){if(v>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(b.forEach(function(C){var B=x.find(C.target,!0);B!=null&&(B.domNode===C.target&&(C.type==="childList"?(g(x.find(C.previousSibling,!1)),[].forEach.call(C.addedNodes,function(w){var S=x.find(w,!1);g(S,!1),S instanceof f.default&&S.children.forEach(function(I){g(I,!1)})})):C.type==="attributes"&&g(B.prev)),g(B))}),this.children.forEach(m),b=[].slice.call(this.observer.takeRecords()),l=b.slice();l.length>0;)h.push(l.pop())}},a.prototype.update=function(h,d){var p=this;d===void 0&&(d={}),h=h||this.observer.takeRecords(),h.map(function(l){var g=x.find(l.target,!0);return g==null?null:g.domNode[x.DATA_KEY].mutations==null?(g.domNode[x.DATA_KEY].mutations=[l],g):(g.domNode[x.DATA_KEY].mutations.push(l),null)}).forEach(function(l){l==null||l===p||l.domNode[x.DATA_KEY]==null||l.update(l.domNode[x.DATA_KEY].mutations||[],d)}),this.domNode[x.DATA_KEY].mutations!=null&&_.prototype.update.call(this,this.domNode[x.DATA_KEY].mutations,d),this.optimize(h,d)},a.blotName="scroll",a.defaultChild="block",a.scope=x.Scope.BLOCK_BLOT,a.tagName="DIV",a}(f.default);r.default=s},function(n,r,o){var c=this&&this.__extends||function(){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,a){_.__proto__=a}||function(_,a){for(var h in a)a.hasOwnProperty(h)&&(_[h]=a[h])};return function(_,a){s(_,a);function h(){this.constructor=_}_.prototype=a===null?Object.create(a):(h.prototype=a.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(18),x=o(1);function y(s,_){if(Object.keys(s).length!==Object.keys(_).length)return!1;for(var a in s)if(s[a]!==_[a])return!1;return!0}var u=function(s){c(_,s);function _(){return s!==null&&s.apply(this,arguments)||this}return _.formats=function(a){if(a.tagName!==_.tagName)return s.formats.call(this,a)},_.prototype.format=function(a,h){var d=this;a===this.statics.blotName&&!h?(this.children.forEach(function(p){p instanceof f.default||(p=p.wrap(_.blotName,!0)),d.attributes.copy(p)}),this.unwrap()):s.prototype.format.call(this,a,h)},_.prototype.formatAt=function(a,h,d,p){if(this.formats()[d]!=null||x.query(d,x.Scope.ATTRIBUTE)){var l=this.isolate(a,h);l.format(d,p)}else s.prototype.formatAt.call(this,a,h,d,p)},_.prototype.optimize=function(a){s.prototype.optimize.call(this,a);var h=this.formats();if(Object.keys(h).length===0)return this.unwrap();var d=this.next;d instanceof _&&d.prev===this&&y(h,d.formats())&&(d.moveChildren(this),d.remove())},_.blotName="inline",_.scope=x.Scope.INLINE_BLOT,_.tagName="SPAN",_}(f.default);r.default=u},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(18),x=o(1),y=function(u){c(s,u);function s(){return u!==null&&u.apply(this,arguments)||this}return s.formats=function(_){var a=x.query(s.blotName).tagName;if(_.tagName!==a)return u.formats.call(this,_)},s.prototype.format=function(_,a){x.query(_,x.Scope.BLOCK)!=null&&(_===this.statics.blotName&&!a?this.replaceWith(s.blotName):u.prototype.format.call(this,_,a))},s.prototype.formatAt=function(_,a,h,d){x.query(h,x.Scope.BLOCK)!=null?this.format(h,d):u.prototype.formatAt.call(this,_,a,h,d)},s.prototype.insertAt=function(_,a,h){if(h==null||x.query(a,x.Scope.INLINE)!=null)u.prototype.insertAt.call(this,_,a,h);else{var d=this.split(_),p=x.create(a,h);d.parent.insertBefore(p,d)}},s.prototype.update=function(_,a){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,_,a)},s.blotName="block",s.scope=x.Scope.BLOCK_BLOT,s.tagName="P",s}(f.default);r.default=y},function(n,r,o){var c=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,s){u.__proto__=s}||function(u,s){for(var _ in s)s.hasOwnProperty(_)&&(u[_]=s[_])};return function(u,s){y(u,s);function _(){this.constructor=u}u.prototype=s===null?Object.create(s):(_.prototype=s.prototype,new _)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(19),x=function(y){c(u,y);function u(){return y!==null&&y.apply(this,arguments)||this}return u.formats=function(s){},u.prototype.format=function(s,_){y.prototype.formatAt.call(this,0,this.length(),s,_)},u.prototype.formatAt=function(s,_,a,h){s===0&&_===this.length()?this.format(a,h):y.prototype.formatAt.call(this,s,_,a,h)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u}(f.default);r.default=x},function(n,r,o){var c=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,_){s.__proto__=_}||function(s,_){for(var a in _)_.hasOwnProperty(a)&&(s[a]=_[a])};return function(s,_){u(s,_);function a(){this.constructor=s}s.prototype=_===null?Object.create(_):(a.prototype=_.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var f=o(19),x=o(1),y=function(u){c(s,u);function s(_){var a=u.call(this,_)||this;return a.text=a.statics.value(a.domNode),a}return s.create=function(_){return document.createTextNode(_)},s.value=function(_){var a=_.data;return a.normalize&&(a=a.normalize()),a},s.prototype.deleteAt=function(_,a){this.domNode.data=this.text=this.text.slice(0,_)+this.text.slice(_+a)},s.prototype.index=function(_,a){return this.domNode===_?a:-1},s.prototype.insertAt=function(_,a,h){h==null?(this.text=this.text.slice(0,_)+a+this.text.slice(_),this.domNode.data=this.text):u.prototype.insertAt.call(this,_,a,h)},s.prototype.length=function(){return this.text.length},s.prototype.optimize=function(_){u.prototype.optimize.call(this,_),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof s&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},s.prototype.position=function(_,a){return[this.domNode,_]},s.prototype.split=function(_,a){if(a===void 0&&(a=!1),!a){if(_===0)return this;if(_===this.length())return this.next}var h=x.create(this.domNode.splitText(_));return this.parent.insertBefore(h,this.next),this.text=this.statics.value(this.domNode),h},s.prototype.update=function(_,a){var h=this;_.some(function(d){return d.type==="characterData"&&d.target===h.domNode})&&(this.text=this.statics.value(this.domNode))},s.prototype.value=function(){return this.text},s.blotName="text",s.scope=x.Scope.INLINE_BLOT,s}(f.default);r.default=y},function(n,r,o){var c=document.createElement("div");if(c.classList.toggle("test-class",!1),c.classList.contains("test-class")){var f=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(x,y){return arguments.length>1&&!this.contains(x)==!y?y:f.call(this,x)}}String.prototype.startsWith||(String.prototype.startsWith=function(x,y){return y=y||0,this.substr(y,x.length)===x}),String.prototype.endsWith||(String.prototype.endsWith=function(x,y){var u=this.toString();(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y>u.length)&&(y=u.length),y-=x.length;var s=u.indexOf(x,y);return s!==-1&&s===y}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(y){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof y!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),s=u.length>>>0,_=arguments[1],a,h=0;h<s;h++)if(a=u[h],y.call(_,a,h,u))return a}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(n,r){var o=-1,c=1,f=0;function x(v,C,B){if(v==C)return v?[[f,v]]:[];(B<0||v.length<B)&&(B=null);var w=_(v,C),S=v.substring(0,w);v=v.substring(w),C=C.substring(w),w=a(v,C);var I=v.substring(v.length-w);v=v.substring(0,v.length-w),C=C.substring(0,C.length-w);var A=y(v,C);return S&&A.unshift([f,S]),I&&A.push([f,I]),d(A),B!=null&&(A=g(A,B)),A=m(A),A}function y(v,C){var B;if(!v)return[[c,C]];if(!C)return[[o,v]];var w=v.length>C.length?v:C,S=v.length>C.length?C:v,I=w.indexOf(S);if(I!=-1)return B=[[c,w.substring(0,I)],[f,S],[c,w.substring(I+S.length)]],v.length>C.length&&(B[0][0]=B[2][0]=o),B;if(S.length==1)return[[o,v],[c,C]];var A=h(v,C);if(A){var k=A[0],N=A[1],V=A[2],L=A[3],M=A[4],Z=x(k,V),G=x(N,L);return Z.concat([[f,M]],G)}return u(v,C)}function u(v,C){for(var B=v.length,w=C.length,S=Math.ceil((B+w)/2),I=S,A=2*S,k=new Array(A),N=new Array(A),V=0;V<A;V++)k[V]=-1,N[V]=-1;k[I+1]=0,N[I+1]=0;for(var L=B-w,M=L%2!=0,Z=0,G=0,J=0,K=0,F=0;F<S;F++){for(var E=-F+Z;E<=F-G;E+=2){var T=I+E,D;E==-F||E!=F&&k[T-1]<k[T+1]?D=k[T+1]:D=k[T-1]+1;for(var P=D-E;D<B&&P<w&&v.charAt(D)==C.charAt(P);)D++,P++;if(k[T]=D,D>B)G+=2;else if(P>w)Z+=2;else if(M){var X=I+L-E;if(X>=0&&X<A&&N[X]!=-1){var q=B-N[X];if(D>=q)return s(v,C,D,P)}}}for(var z=-F+J;z<=F-K;z+=2){var X=I+z,q;z==-F||z!=F&&N[X-1]<N[X+1]?q=N[X+1]:q=N[X-1]+1;for(var R=q-z;q<B&&R<w&&v.charAt(B-q-1)==C.charAt(w-R-1);)q++,R++;if(N[X]=q,q>B)K+=2;else if(R>w)J+=2;else if(!M){var T=I+L-z;if(T>=0&&T<A&&k[T]!=-1){var D=k[T],P=I+D-T;if(q=B-q,D>=q)return s(v,C,D,P)}}}}return[[o,v],[c,C]]}function s(v,C,B,w){var S=v.substring(0,B),I=C.substring(0,w),A=v.substring(B),k=C.substring(w),N=x(S,I),V=x(A,k);return N.concat(V)}function _(v,C){if(!v||!C||v.charAt(0)!=C.charAt(0))return 0;for(var B=0,w=Math.min(v.length,C.length),S=w,I=0;B<S;)v.substring(I,S)==C.substring(I,S)?(B=S,I=B):w=S,S=Math.floor((w-B)/2+B);return S}function a(v,C){if(!v||!C||v.charAt(v.length-1)!=C.charAt(C.length-1))return 0;for(var B=0,w=Math.min(v.length,C.length),S=w,I=0;B<S;)v.substring(v.length-S,v.length-I)==C.substring(C.length-S,C.length-I)?(B=S,I=B):w=S,S=Math.floor((w-B)/2+B);return S}function h(v,C){var B=v.length>C.length?v:C,w=v.length>C.length?C:v;if(B.length<4||w.length*2<B.length)return null;function S(G,J,K){for(var F=G.substring(K,K+Math.floor(G.length/4)),E=-1,T="",D,P,X,q;(E=J.indexOf(F,E+1))!=-1;){var z=_(G.substring(K),J.substring(E)),R=a(G.substring(0,K),J.substring(0,E));T.length<R+z&&(T=J.substring(E-R,E)+J.substring(E,E+z),D=G.substring(0,K-R),P=G.substring(K+z),X=J.substring(0,E-R),q=J.substring(E+z))}return T.length*2>=G.length?[D,P,X,q,T]:null}var I=S(B,w,Math.ceil(B.length/4)),A=S(B,w,Math.ceil(B.length/2)),k;if(!I&&!A)return null;A?I?k=I[4].length>A[4].length?I:A:k=A:k=I;var N,V,L,M;v.length>C.length?(N=k[0],V=k[1],L=k[2],M=k[3]):(L=k[0],M=k[1],N=k[2],V=k[3]);var Z=k[4];return[N,V,L,M,Z]}function d(v){v.push([f,""]);for(var C=0,B=0,w=0,S="",I="",A;C<v.length;)switch(v[C][0]){case c:w++,I+=v[C][1],C++;break;case o:B++,S+=v[C][1],C++;break;case f:B+w>1?(B!==0&&w!==0&&(A=_(I,S),A!==0&&(C-B-w>0&&v[C-B-w-1][0]==f?v[C-B-w-1][1]+=I.substring(0,A):(v.splice(0,0,[f,I.substring(0,A)]),C++),I=I.substring(A),S=S.substring(A)),A=a(I,S),A!==0&&(v[C][1]=I.substring(I.length-A)+v[C][1],I=I.substring(0,I.length-A),S=S.substring(0,S.length-A))),B===0?v.splice(C-w,B+w,[c,I]):w===0?v.splice(C-B,B+w,[o,S]):v.splice(C-B-w,B+w,[o,S],[c,I]),C=C-B-w+(B?1:0)+(w?1:0)+1):C!==0&&v[C-1][0]==f?(v[C-1][1]+=v[C][1],v.splice(C,1)):C++,w=0,B=0,S="",I="";break}v[v.length-1][1]===""&&v.pop();var k=!1;for(C=1;C<v.length-1;)v[C-1][0]==f&&v[C+1][0]==f&&(v[C][1].substring(v[C][1].length-v[C-1][1].length)==v[C-1][1]?(v[C][1]=v[C-1][1]+v[C][1].substring(0,v[C][1].length-v[C-1][1].length),v[C+1][1]=v[C-1][1]+v[C+1][1],v.splice(C-1,1),k=!0):v[C][1].substring(0,v[C+1][1].length)==v[C+1][1]&&(v[C-1][1]+=v[C+1][1],v[C][1]=v[C][1].substring(v[C+1][1].length)+v[C+1][1],v.splice(C+1,1),k=!0)),C++;k&&d(v)}var p=x;p.INSERT=c,p.DELETE=o,p.EQUAL=f,n.exports=p;function l(v,C){if(C===0)return[f,v];for(var B=0,w=0;w<v.length;w++){var S=v[w];if(S[0]===o||S[0]===f){var I=B+S[1].length;if(C===I)return[w+1,v];if(C<I){v=v.slice();var A=C-B,k=[S[0],S[1].slice(0,A)],N=[S[0],S[1].slice(A)];return v.splice(w,1,k,N),[w+1,v]}else B=I}}throw new Error("cursor_pos is out of bounds!")}function g(v,C){var B=l(v,C),w=B[1],S=B[0],I=w[S],A=w[S+1];if(I==null)return v;if(I[0]!==f)return v;if(A!=null&&I[1]+A[1]===A[1]+I[1])return w.splice(S,2,A,I),b(w,S,2);if(A!=null&&A[1].indexOf(I[1])===0){w.splice(S,2,[A[0],I[1]],[0,I[1]]);var k=A[1].slice(I[1].length);return k.length>0&&w.splice(S+2,0,[A[0],k]),b(w,S,3)}else return v}function m(v){for(var C=!1,B=function(A){return A.charCodeAt(0)>=56320&&A.charCodeAt(0)<=57343},w=function(A){return A.charCodeAt(A.length-1)>=55296&&A.charCodeAt(A.length-1)<=56319},S=2;S<v.length;S+=1)v[S-2][0]===f&&w(v[S-2][1])&&v[S-1][0]===o&&B(v[S-1][1])&&v[S][0]===c&&B(v[S][1])&&(C=!0,v[S-1][1]=v[S-2][1].slice(-1)+v[S-1][1],v[S][1]=v[S-2][1].slice(-1)+v[S][1],v[S-2][1]=v[S-2][1].slice(0,-1));if(!C)return v;for(var I=[],S=0;S<v.length;S+=1)v[S][1].length>0&&I.push(v[S]);return I}function b(v,C,B){for(var w=C+B-1;w>=0&&w>=C-1;w--)if(w+1<v.length){var S=v[w],I=v[w+1];S[0]===I[1]&&v.splice(w,2,[S[0],S[1]+I[1]])}return v}},function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:o,r.shim=o;function o(c){var f=[];for(var x in c)f.push(x);return f}},function(n,r){var o=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=n.exports=o?c:f,r.supported=c;function c(x){return Object.prototype.toString.call(x)=="[object Arguments]"}r.unsupported=f;function f(x){return x&&typeof x=="object"&&typeof x.length=="number"&&Object.prototype.hasOwnProperty.call(x,"callee")&&!Object.prototype.propertyIsEnumerable.call(x,"callee")||!1}},function(n,r){var o=Object.prototype.hasOwnProperty,c="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(c=!1));function x(u,s,_){this.fn=u,this.context=s,this.once=_||!1}function y(){this._events=new f,this._eventsCount=0}y.prototype.eventNames=function(){var s=[],_,a;if(this._eventsCount===0)return s;for(a in _=this._events)o.call(_,a)&&s.push(c?a.slice(1):a);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(_)):s},y.prototype.listeners=function(s,_){var a=c?c+s:s,h=this._events[a];if(_)return!!h;if(!h)return[];if(h.fn)return[h.fn];for(var d=0,p=h.length,l=new Array(p);d<p;d++)l[d]=h[d].fn;return l},y.prototype.emit=function(s,_,a,h,d,p){var l=c?c+s:s;if(!this._events[l])return!1;var g=this._events[l],m=arguments.length,b,v;if(g.fn){switch(g.once&&this.removeListener(s,g.fn,void 0,!0),m){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,_),!0;case 3:return g.fn.call(g.context,_,a),!0;case 4:return g.fn.call(g.context,_,a,h),!0;case 5:return g.fn.call(g.context,_,a,h,d),!0;case 6:return g.fn.call(g.context,_,a,h,d,p),!0}for(v=1,b=new Array(m-1);v<m;v++)b[v-1]=arguments[v];g.fn.apply(g.context,b)}else{var C=g.length,B;for(v=0;v<C;v++)switch(g[v].once&&this.removeListener(s,g[v].fn,void 0,!0),m){case 1:g[v].fn.call(g[v].context);break;case 2:g[v].fn.call(g[v].context,_);break;case 3:g[v].fn.call(g[v].context,_,a);break;case 4:g[v].fn.call(g[v].context,_,a,h);break;default:if(!b)for(B=1,b=new Array(m-1);B<m;B++)b[B-1]=arguments[B];g[v].fn.apply(g[v].context,b)}}return!0},y.prototype.on=function(s,_,a){var h=new x(_,a||this),d=c?c+s:s;return this._events[d]?this._events[d].fn?this._events[d]=[this._events[d],h]:this._events[d].push(h):(this._events[d]=h,this._eventsCount++),this},y.prototype.once=function(s,_,a){var h=new x(_,a||this,!0),d=c?c+s:s;return this._events[d]?this._events[d].fn?this._events[d]=[this._events[d],h]:this._events[d].push(h):(this._events[d]=h,this._eventsCount++),this},y.prototype.removeListener=function(s,_,a,h){var d=c?c+s:s;if(!this._events[d])return this;if(!_)return--this._eventsCount===0?this._events=new f:delete this._events[d],this;var p=this._events[d];if(p.fn)p.fn===_&&(!h||p.once)&&(!a||p.context===a)&&(--this._eventsCount===0?this._events=new f:delete this._events[d]);else{for(var l=0,g=[],m=p.length;l<m;l++)(p[l].fn!==_||h&&!p[l].once||a&&p[l].context!==a)&&g.push(p[l]);g.length?this._events[d]=g.length===1?g[0]:g:--this._eventsCount===0?this._events=new f:delete this._events[d]}return this},y.prototype.removeAllListeners=function(s){var _;return s?(_=c?c+s:s,this._events[_]&&(--this._eventsCount===0?this._events=new f:delete this._events[_])):(this._events=new f,this._eventsCount=0),this},y.prototype.off=y.prototype.removeListener,y.prototype.addListener=y.prototype.on,y.prototype.setMaxListeners=function(){return this},y.prefixed=c,y.EventEmitter=y,typeof n<"u"&&(n.exports=y)},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},f=function(){function re(te,ie){var le=[],ae=!0,pe=!1,fe=void 0;try{for(var me=te[Symbol.iterator](),Ae;!(ae=(Ae=me.next()).done)&&(le.push(Ae.value),!(ie&&le.length===ie));ae=!0);}catch(Be){pe=!0,fe=Be}finally{try{!ae&&me.return&&me.return()}finally{if(pe)throw fe}}return le}return function(te,ie){if(Array.isArray(te))return te;if(Symbol.iterator in Object(te))return re(te,ie);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(){function re(te,ie){for(var le=0;le<ie.length;le++){var ae=ie[le];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(te,ae.key,ae)}}return function(te,ie,le){return ie&&re(te.prototype,ie),le&&re(te,le),te}}(),y=o(3),u=N(y),s=o(2),_=N(s),a=o(0),h=N(a),d=o(5),p=N(d),l=o(10),g=N(l),m=o(9),b=N(m),v=o(36),C=o(37),B=o(13),w=N(B),S=o(26),I=o(38),A=o(39),k=o(40);function N(re){return re&&re.__esModule?re:{default:re}}function V(re,te,ie){return te in re?Object.defineProperty(re,te,{value:ie,enumerable:!0,configurable:!0,writable:!0}):re[te]=ie,re}function L(re,te){if(!(re instanceof te))throw new TypeError("Cannot call a class as a function")}function M(re,te){if(!re)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te&&(typeof te=="object"||typeof te=="function")?te:re}function Z(re,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof te);re.prototype=Object.create(te&&te.prototype,{constructor:{value:re,enumerable:!1,writable:!0,configurable:!0}}),te&&(Object.setPrototypeOf?Object.setPrototypeOf(re,te):re.__proto__=te)}var G=(0,g.default)("quill:clipboard"),J="__ql-matcher",K=[[Node.TEXT_NODE,ce],[Node.TEXT_NODE,ne],["br",U],[Node.ELEMENT_NODE,ne],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,se],[Node.ELEMENT_NODE,$],[Node.ELEMENT_NODE,he],["li",Y],["b",R.bind(R,"bold")],["i",R.bind(R,"italic")],["style",Q]],F=[v.AlignAttribute,I.DirectionAttribute].reduce(function(re,te){return re[te.keyName]=te,re},{}),E=[v.AlignStyle,C.BackgroundStyle,S.ColorStyle,I.DirectionStyle,A.FontStyle,k.SizeStyle].reduce(function(re,te){return re[te.keyName]=te,re},{}),T=function(re){Z(te,re);function te(ie,le){L(this,te);var ae=M(this,(te.__proto__||Object.getPrototypeOf(te)).call(this,ie,le));return ae.quill.root.addEventListener("paste",ae.onPaste.bind(ae)),ae.container=ae.quill.addContainer("ql-clipboard"),ae.container.setAttribute("contenteditable",!0),ae.container.setAttribute("tabindex",-1),ae.matchers=[],K.concat(ae.options.matchers).forEach(function(pe){var fe=f(pe,2),me=fe[0],Ae=fe[1];!le.matchVisual&&Ae===se||ae.addMatcher(me,Ae)}),ae}return x(te,[{key:"addMatcher",value:function(le,ae){this.matchers.push([le,ae])}},{key:"convert",value:function(le){if(typeof le=="string")return this.container.innerHTML=le.replace(/\>\r?\n +\</g,"><"),this.convert();var ae=this.quill.getFormat(this.quill.selection.savedRange.index);if(ae[w.default.blotName]){var pe=this.container.innerText;return this.container.innerHTML="",new _.default().insert(pe,V({},w.default.blotName,ae[w.default.blotName]))}var fe=this.prepareMatching(),me=f(fe,2),Ae=me[0],Be=me[1],Ee=z(this.container,Ae,Be);return X(Ee,`
|
|
42
|
+
`)&&Ee.ops[Ee.ops.length-1].attributes==null&&(Ee=Ee.compose(new _.default().retain(Ee.length()-1).delete(1))),G.log("convert",this.container.innerHTML,Ee),this.container.innerHTML="",Ee}},{key:"dangerouslyPasteHTML",value:function(le,ae){var pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;if(typeof le=="string")this.quill.setContents(this.convert(le),ae),this.quill.setSelection(0,p.default.sources.SILENT);else{var fe=this.convert(ae);this.quill.updateContents(new _.default().retain(le).concat(fe),pe),this.quill.setSelection(le+fe.length(),p.default.sources.SILENT)}}},{key:"onPaste",value:function(le){var ae=this;if(!(le.defaultPrevented||!this.quill.isEnabled())){var pe=this.quill.getSelection(),fe=new _.default().retain(pe.index),me=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(p.default.sources.SILENT),setTimeout(function(){fe=fe.concat(ae.convert()).delete(pe.length),ae.quill.updateContents(fe,p.default.sources.USER),ae.quill.setSelection(fe.length()-pe.length,p.default.sources.SILENT),ae.quill.scrollingContainer.scrollTop=me,ae.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var le=this,ae=[],pe=[];return this.matchers.forEach(function(fe){var me=f(fe,2),Ae=me[0],Be=me[1];switch(Ae){case Node.TEXT_NODE:pe.push(Be);break;case Node.ELEMENT_NODE:ae.push(Be);break;default:[].forEach.call(le.container.querySelectorAll(Ae),function(Ee){Ee[J]=Ee[J]||[],Ee[J].push(Be)});break}}),[ae,pe]}}]),te}(b.default);T.DEFAULTS={matchers:[],matchVisual:!0};function D(re,te,ie){return(typeof te>"u"?"undefined":c(te))==="object"?Object.keys(te).reduce(function(le,ae){return D(le,ae,te[ae])},re):re.reduce(function(le,ae){return ae.attributes&&ae.attributes[te]?le.push(ae):le.insert(ae.insert,(0,u.default)({},V({},te,ie),ae.attributes))},new _.default)}function P(re){if(re.nodeType!==Node.ELEMENT_NODE)return{};var te="__ql-computed-style";return re[te]||(re[te]=window.getComputedStyle(re))}function X(re,te){for(var ie="",le=re.ops.length-1;le>=0&&ie.length<te.length;--le){var ae=re.ops[le];if(typeof ae.insert!="string")break;ie=ae.insert+ie}return ie.slice(-1*te.length)===te}function q(re){if(re.childNodes.length===0)return!1;var te=P(re);return["block","list-item"].indexOf(te.display)>-1}function z(re,te,ie){return re.nodeType===re.TEXT_NODE?ie.reduce(function(le,ae){return ae(re,le)},new _.default):re.nodeType===re.ELEMENT_NODE?[].reduce.call(re.childNodes||[],function(le,ae){var pe=z(ae,te,ie);return ae.nodeType===re.ELEMENT_NODE&&(pe=te.reduce(function(fe,me){return me(ae,fe)},pe),pe=(ae[J]||[]).reduce(function(fe,me){return me(ae,fe)},pe)),le.concat(pe)},new _.default):new _.default}function R(re,te,ie){return D(ie,re,!0)}function $(re,te){var ie=h.default.Attributor.Attribute.keys(re),le=h.default.Attributor.Class.keys(re),ae=h.default.Attributor.Style.keys(re),pe={};return ie.concat(le).concat(ae).forEach(function(fe){var me=h.default.query(fe,h.default.Scope.ATTRIBUTE);me!=null&&(pe[me.attrName]=me.value(re),pe[me.attrName])||(me=F[fe],me!=null&&(me.attrName===fe||me.keyName===fe)&&(pe[me.attrName]=me.value(re)||void 0),me=E[fe],me!=null&&(me.attrName===fe||me.keyName===fe)&&(me=E[fe],pe[me.attrName]=me.value(re)||void 0))}),Object.keys(pe).length>0&&(te=D(te,pe)),te}function j(re,te){var ie=h.default.query(re);if(ie==null)return te;if(ie.prototype instanceof h.default.Embed){var le={},ae=ie.value(re);ae!=null&&(le[ie.blotName]=ae,te=new _.default().insert(le,ie.formats(re)))}else typeof ie.formats=="function"&&(te=D(te,ie.blotName,ie.formats(re)));return te}function U(re,te){return X(te,`
|
|
43
43
|
`)||te.insert(`
|
|
44
44
|
`),te}function Q(){return new _.default}function Y(re,te){var ie=h.default.query(re);if(ie==null||ie.blotName!=="list-item"||!X(te,`
|
|
45
45
|
`))return te;for(var le=-1,ae=re.parentNode;!ae.classList.contains("ql-clipboard");)(h.default.query(ae)||{}).blotName==="list"&&(le+=1),ae=ae.parentNode;return le<=0?te:te.compose(new _.default().retain(te.length()-1).retain(1,{indent:le}))}function ne(re,te){return X(te,`
|
|
46
46
|
`)||(q(re)||te.length()>0&&re.nextSibling&&q(re.nextSibling))&&te.insert(`
|
|
47
|
-
`),te}function
|
|
47
|
+
`),te}function se(re,te){if(q(re)&&re.nextElementSibling!=null&&!X(te,`
|
|
48
48
|
|
|
49
49
|
`)){var ie=re.offsetHeight+parseFloat(P(re).marginTop)+parseFloat(P(re).marginBottom);re.nextElementSibling.offsetTop>re.offsetTop+ie*1.5&&te.insert(`
|
|
50
|
-
`)}return te}function fe(re,te){var ie={},le=re.style||{};return le.fontStyle&&P(re).fontStyle==="italic"&&(ie.italic=!0),le.fontWeight&&(P(re).fontWeight.startsWith("bold")||parseInt(P(re).fontWeight)>=700)&&(ie.bold=!0),Object.keys(ie).length>0&&(te=D(te,ie)),parseFloat(le.textIndent||0)>0&&(te=new _.default().insert(" ").concat(te)),te}function se(re,te){var ie=re.data;if(re.parentNode.tagName==="O:P")return te.insert(ie.trim());if(ie.trim().length===0&&re.parentNode.classList.contains("ql-clipboard"))return te;if(!P(re.parentNode).whiteSpace.startsWith("pre")){var le=function(pe,he){return he=he.replace(/[^\u00a0]/g,""),he.length<1&&pe?" ":he};ie=ie.replace(/\r\n/g," ").replace(/\n/g," "),ie=ie.replace(/\s\s+/g,le.bind(le,!0)),(re.previousSibling==null&&q(re.parentNode)||re.previousSibling!=null&&q(re.previousSibling))&&(ie=ie.replace(/^\s+/,le.bind(le,!1))),(re.nextSibling==null&&q(re.parentNode)||re.nextSibling!=null&&q(re.nextSibling))&&(ie=ie.replace(/\s+$/,le.bind(le,!1)))}return te.insert(ie)}r.default=T,r.matchAttributor=$,r.matchBlot=j,r.matchNewline=ne,r.matchSpacing=ce,r.matchText=se},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(6),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(){return s(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return c(p,[{key:"optimize",value:function(g){f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,g),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return f(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),p}(y.default);h.blotName="bold",h.tagName=["STRONG","B"],r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var c=function(){function k(N,V){var L=[],M=!0,Z=!1,G=void 0;try{for(var J=N[Symbol.iterator](),K;!(M=(K=J.next()).done)&&(L.push(K.value),!(V&&L.length===V));M=!0);}catch(F){Z=!0,G=F}finally{try{!M&&J.return&&J.return()}finally{if(Z)throw G}}return L}return function(N,V){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return k(N,V);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function k(N,V){for(var L=0;L<V.length;L++){var M=V[L];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(N,M.key,M)}}return function(N,V,L){return V&&k(N.prototype,V),L&&k(N,L),N}}(),x=o(2),y=g(x),u=o(0),s=g(u),_=o(5),a=g(_),h=o(10),d=g(h),p=o(9),l=g(p);function g(k){return k&&k.__esModule?k:{default:k}}function m(k,N,V){return N in k?Object.defineProperty(k,N,{value:V,enumerable:!0,configurable:!0,writable:!0}):k[N]=V,k}function b(k,N){if(!(k instanceof N))throw new TypeError("Cannot call a class as a function")}function v(k,N){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:k}function C(k,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);k.prototype=Object.create(N&&N.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(k,N):k.__proto__=N)}var B=(0,d.default)("quill:toolbar"),w=function(k){C(N,k);function N(V,L){b(this,N);var M=v(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,V,L));if(Array.isArray(M.options.container)){var Z=document.createElement("div");I(Z,M.options.container),V.container.parentNode.insertBefore(Z,V.container),M.container=Z}else typeof M.options.container=="string"?M.container=document.querySelector(M.options.container):M.container=M.options.container;if(!(M.container instanceof HTMLElement)){var G;return G=B.error("Container required for toolbar",M.options),v(M,G)}return M.container.classList.add("ql-toolbar"),M.controls=[],M.handlers={},Object.keys(M.options.handlers).forEach(function(J){M.addHandler(J,M.options.handlers[J])}),[].forEach.call(M.container.querySelectorAll("button, select"),function(J){M.attach(J)}),M.quill.on(a.default.events.EDITOR_CHANGE,function(J,K){J===a.default.events.SELECTION_CHANGE&&M.update(K)}),M.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){var J=M.quill.selection.getRange(),K=c(J,1),F=K[0];M.update(F)}),M}return f(N,[{key:"addHandler",value:function(L,M){this.handlers[L]=M}},{key:"attach",value:function(L){var M=this,Z=[].find.call(L.classList,function(J){return J.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){B.warn("ignoring attaching to disabled format",Z,L);return}if(s.default.query(Z)==null){B.warn("ignoring attaching to nonexistent format",Z,L);return}}var G=L.tagName==="SELECT"?"change":"click";L.addEventListener(G,function(J){var K=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var F=L.options[L.selectedIndex];F.hasAttribute("selected")?K=!1:K=F.value||!1}else L.classList.contains("ql-active")?K=!1:K=L.value||!L.hasAttribute("value"),J.preventDefault();M.quill.focus();var E=M.quill.selection.getRange(),T=c(E,1),D=T[0];if(M.handlers[Z]!=null)M.handlers[Z].call(M,K);else if(s.default.query(Z).prototype instanceof s.default.Embed){if(K=prompt("Enter "+Z),!K)return;M.quill.updateContents(new y.default().retain(D.index).delete(D.length).insert(m({},Z,K)),a.default.sources.USER)}else M.quill.format(Z,K,a.default.sources.USER);M.update(D)}),this.controls.push([Z,L])}}},{key:"update",value:function(L){var M=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(Z){var G=c(Z,2),J=G[0],K=G[1];if(K.tagName==="SELECT"){var F=void 0;if(L==null)F=null;else if(M[J]==null)F=K.querySelector("option[selected]");else if(!Array.isArray(M[J])){var E=M[J];typeof E=="string"&&(E=E.replace(/\"/g,'\\"')),F=K.querySelector('option[value="'+E+'"]')}F==null?(K.value="",K.selectedIndex=-1):F.selected=!0}else if(L==null)K.classList.remove("ql-active");else if(K.hasAttribute("value")){var T=M[J]===K.getAttribute("value")||M[J]!=null&&M[J].toString()===K.getAttribute("value")||M[J]==null&&!K.getAttribute("value");K.classList.toggle("ql-active",T)}else K.classList.toggle("ql-active",M[J]!=null)})}}]),N}(l.default);w.DEFAULTS={};function S(k,N,V){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+N),V!=null&&(L.value=V),k.appendChild(L)}function I(k,N){Array.isArray(N[0])||(N=[N]),N.forEach(function(V){var L=document.createElement("span");L.classList.add("ql-formats"),V.forEach(function(M){if(typeof M=="string")S(L,M);else{var Z=Object.keys(M)[0],G=M[Z];Array.isArray(G)?A(L,Z,G):S(L,Z,G)}}),k.appendChild(L)})}function A(k,N,V){var L=document.createElement("select");L.classList.add("ql-"+N),V.forEach(function(M){var Z=document.createElement("option");M!==!1?Z.setAttribute("value",M):Z.setAttribute("selected","selected"),L.appendChild(Z)}),k.appendChild(L)}w.DEFAULTS={container:null,handlers:{clean:function(){var N=this,V=this.quill.getSelection();if(V!=null)if(V.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(M){s.default.query(M,s.default.Scope.INLINE)!=null&&N.quill.format(M,!1)})}else this.quill.removeFormat(V,a.default.sources.USER)},direction:function(N){var V=this.quill.getFormat().align;N==="rtl"&&V==null?this.quill.format("align","right",a.default.sources.USER):!N&&V==="right"&&this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",N,a.default.sources.USER)},indent:function(N){var V=this.quill.getSelection(),L=this.quill.getFormat(V),M=parseInt(L.indent||0);if(N==="+1"||N==="-1"){var Z=N==="+1"?1:-1;L.direction==="rtl"&&(Z*=-1),this.quill.format("indent",M+Z,a.default.sources.USER)}},link:function(N){N===!0&&(N=prompt("Enter link URL:")),this.quill.format("link",N,a.default.sources.USER)},list:function(N){var V=this.quill.getSelection(),L=this.quill.getFormat(V);N==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",N,a.default.sources.USER)}}},r.default=w,r.addControls=I},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(28),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(l,g){s(this,p);var m=_(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,l));return m.label.innerHTML=g,m.container.classList.add("ql-color-picker"),[].slice.call(m.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(b){b.classList.add("ql-primary")}),m}return c(p,[{key:"buildItem",value:function(g){var m=f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"buildItem",this).call(this,g);return m.style.backgroundColor=g.getAttribute("value")||"",m}},{key:"selectItem",value:function(g,m){f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,g,m);var b=this.label.querySelector(".ql-color-label"),v=g&&g.getAttribute("data-value")||"";b&&(b.tagName==="line"?b.style.stroke=v:b.style.fill=v)}}]),p}(y.default);r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(28),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(l,g){s(this,p);var m=_(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,l));return m.container.classList.add("ql-icon-picker"),[].forEach.call(m.container.querySelectorAll(".ql-picker-item"),function(b){b.innerHTML=g[b.getAttribute("data-value")||""]}),m.defaultItem=m.container.querySelector(".ql-selected"),m.selectItem(m.defaultItem),m}return c(p,[{key:"selectItem",value:function(g,m){f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,g,m),g=g||this.defaultItem,this.label.innerHTML=g.innerHTML}}]),p}(y.default);r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function y(u,s){for(var _=0;_<s.length;_++){var a=s[_];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}return function(u,s,_){return s&&y(u.prototype,s),_&&y(u,_),u}}();function f(y,u){if(!(y instanceof u))throw new TypeError("Cannot call a class as a function")}var x=function(){function y(u,s){var _=this;f(this,y),this.quill=u,this.boundsContainer=s||document.body,this.root=u.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){_.root.style.marginTop=-1*_.quill.root.scrollTop+"px"}),this.hide()}return c(y,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(s){var _=s.left+s.width/2-this.root.offsetWidth/2,a=s.bottom+this.quill.root.scrollTop;this.root.style.left=_+"px",this.root.style.top=a+"px",this.root.classList.remove("ql-flip");var h=this.boundsContainer.getBoundingClientRect(),d=this.root.getBoundingClientRect(),p=0;if(d.right>h.right&&(p=h.right-d.right,this.root.style.left=_+p+"px"),d.left<h.left&&(p=h.left-d.left,this.root.style.left=_+p+"px"),d.bottom>h.bottom){var l=d.bottom-d.top,g=s.bottom-s.top+l;this.root.style.top=a-g+"px",this.root.classList.add("ql-flip")}return p}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),y}();r.default=x},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function A(k,N){var V=[],L=!0,M=!1,Z=void 0;try{for(var G=k[Symbol.iterator](),J;!(L=(J=G.next()).done)&&(V.push(J.value),!(N&&V.length===N));L=!0);}catch(K){M=!0,Z=K}finally{try{!L&&G.return&&G.return()}finally{if(M)throw Z}}return V}return function(k,N){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return A(k,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function A(k,N,V){k===null&&(k=Function.prototype);var L=Object.getOwnPropertyDescriptor(k,N);if(L===void 0){var M=Object.getPrototypeOf(k);return M===null?void 0:A(M,N,V)}else{if("value"in L)return L.value;var Z=L.get;return Z===void 0?void 0:Z.call(V)}},x=function(){function A(k,N){for(var V=0;V<N.length;V++){var L=N[V];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(k,L.key,L)}}return function(k,N,V){return N&&A(k.prototype,N),V&&A(k,V),k}}(),y=o(3),u=b(y),s=o(8),_=b(s),a=o(43),h=b(a),d=o(27),p=b(d),l=o(15),g=o(41),m=b(g);function b(A){return A&&A.__esModule?A:{default:A}}function v(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}function C(A,k){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:A}function B(A,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);A.prototype=Object.create(k&&k.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(A,k):A.__proto__=k)}var w=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],S=function(A){B(k,A);function k(N,V){v(this,k),V.modules.toolbar!=null&&V.modules.toolbar.container==null&&(V.modules.toolbar.container=w);var L=C(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,N,V));return L.quill.container.classList.add("ql-snow"),L}return x(k,[{key:"extendToolbar",value:function(V){V.container.classList.add("ql-snow"),this.buildButtons([].slice.call(V.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(V.container.querySelectorAll("select")),m.default),this.tooltip=new I(this.quill,this.options.bounds),V.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,M){V.handlers.link.call(V,!M.format.link)})}}]),k}(h.default);S.DEFAULTS=(0,u.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(k){if(k){var N=this.quill.getSelection();if(N==null||N.length==0)return;var V=this.quill.getText(N);/^\S+@\S+\.\S+$/.test(V)&&V.indexOf("mailto:")!==0&&(V="mailto:"+V);var L=this.quill.theme.tooltip;L.edit("link",V)}else this.quill.format("link",!1)}}}}});var I=function(A){B(k,A);function k(N,V){v(this,k);var L=C(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,N,V));return L.preview=L.root.querySelector("a.ql-preview"),L}return x(k,[{key:"listen",value:function(){var V=this;f(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){V.root.classList.contains("ql-editing")?V.save():V.edit("link",V.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(V.linkRange!=null){var M=V.linkRange;V.restoreFocus(),V.quill.formatText(M,"link",!1,_.default.sources.USER),delete V.linkRange}L.preventDefault(),V.hide()}),this.quill.on(_.default.events.SELECTION_CHANGE,function(L,M,Z){if(L!=null){if(L.length===0&&Z===_.default.sources.USER){var G=V.quill.scroll.descendant(p.default,L.index),J=c(G,2),K=J[0],F=J[1];if(K!=null){V.linkRange=new l.Range(L.index-F,K.length());var E=p.default.formats(K.domNode);V.preview.textContent=E,V.preview.setAttribute("href",E),V.show(),V.position(V.quill.getBounds(V.linkRange));return}}else delete V.linkRange;V.hide()}})}},{key:"show",value:function(){f(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),k}(a.BaseTooltip);I.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=S},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(29),f=ae(c),x=o(36),y=o(38),u=o(64),s=o(65),_=ae(s),a=o(66),h=ae(a),d=o(67),p=ae(d),l=o(37),g=o(26),m=o(39),b=o(40),v=o(56),C=ae(v),B=o(68),w=ae(B),S=o(27),I=ae(S),A=o(69),k=ae(A),N=o(70),V=ae(N),L=o(71),M=ae(L),Z=o(72),G=ae(Z),J=o(73),K=ae(J),F=o(13),E=ae(F),T=o(74),D=ae(T),P=o(75),X=ae(P),q=o(57),z=ae(q),R=o(41),$=ae(R),j=o(28),U=ae(j),Q=o(59),Y=ae(Q),ne=o(60),ce=ae(ne),fe=o(61),se=ae(fe),re=o(108),te=ae(re),ie=o(62),le=ae(ie);function ae(pe){return pe&&pe.__esModule?pe:{default:pe}}f.default.register({"attributors/attribute/direction":y.DirectionAttribute,"attributors/class/align":x.AlignClass,"attributors/class/background":l.BackgroundClass,"attributors/class/color":g.ColorClass,"attributors/class/direction":y.DirectionClass,"attributors/class/font":m.FontClass,"attributors/class/size":b.SizeClass,"attributors/style/align":x.AlignStyle,"attributors/style/background":l.BackgroundStyle,"attributors/style/color":g.ColorStyle,"attributors/style/direction":y.DirectionStyle,"attributors/style/font":m.FontStyle,"attributors/style/size":b.SizeStyle},!0),f.default.register({"formats/align":x.AlignClass,"formats/direction":y.DirectionClass,"formats/indent":u.IndentClass,"formats/background":l.BackgroundStyle,"formats/color":g.ColorStyle,"formats/font":m.FontClass,"formats/size":b.SizeClass,"formats/blockquote":_.default,"formats/code-block":E.default,"formats/header":h.default,"formats/list":p.default,"formats/bold":C.default,"formats/code":F.Code,"formats/italic":w.default,"formats/link":I.default,"formats/script":k.default,"formats/strike":V.default,"formats/underline":M.default,"formats/image":G.default,"formats/video":K.default,"formats/list/item":d.ListItem,"modules/formula":D.default,"modules/syntax":X.default,"modules/toolbar":z.default,"themes/bubble":te.default,"themes/snow":le.default,"ui/icons":$.default,"ui/picker":U.default,"ui/icon-picker":ce.default,"ui/color-picker":Y.default,"ui/tooltip":se.default},!0),r.default=f.default},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var c=function(){function p(l,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(l,b.key,b)}}return function(l,g,m){return g&&p(l.prototype,g),m&&p(l,m),l}}(),f=function p(l,g,m){l===null&&(l=Function.prototype);var b=Object.getOwnPropertyDescriptor(l,g);if(b===void 0){var v=Object.getPrototypeOf(l);return v===null?void 0:p(v,g,m)}else{if("value"in b)return b.value;var C=b.get;return C===void 0?void 0:C.call(m)}},x=o(0),y=u(x);function u(p){return p&&p.__esModule?p:{default:p}}function s(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function _(p,l){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:p}function a(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(p,l):p.__proto__=l)}var h=function(p){a(l,p);function l(){return s(this,l),_(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return c(l,[{key:"add",value:function(m,b){if(b==="+1"||b==="-1"){var v=this.value(m)||0;b=b==="+1"?v+1:v-1}return b===0?(this.remove(m),!0):f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"add",this).call(this,m,b)}},{key:"canAdd",value:function(m,b){return f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"canAdd",this).call(this,m,b)||f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"canAdd",this).call(this,m,parseInt(b))}},{key:"value",value:function(m){return parseInt(f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"value",this).call(this,m))||void 0}}]),l}(y.default.Attributor.Class),d=new h("indent","ql-indent",{scope:y.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(4),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="blockquote",_.tagName="blockquote",r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function h(d,p){for(var l=0;l<p.length;l++){var g=p[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}return function(d,p,l){return p&&h(d.prototype,p),l&&h(d,l),d}}(),f=o(4),x=y(f);function y(h){return h&&h.__esModule?h:{default:h}}function u(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function s(h,d){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:h}function _(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);h.prototype=Object.create(d&&d.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(h,d):h.__proto__=d)}var a=function(h){_(d,h);function d(){return u(this,d),s(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return c(d,null,[{key:"formats",value:function(l){return this.tagName.indexOf(l.tagName)+1}}]),d}(x.default);a.blotName="header",a.tagName=["H1","H2","H3","H4","H5","H6"],r.default=a},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var c=function(){function v(C,B){for(var w=0;w<B.length;w++){var S=B[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(C,S.key,S)}}return function(C,B,w){return B&&v(C.prototype,B),w&&v(C,w),C}}(),f=function v(C,B,w){C===null&&(C=Function.prototype);var S=Object.getOwnPropertyDescriptor(C,B);if(S===void 0){var I=Object.getPrototypeOf(C);return I===null?void 0:v(I,B,w)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(w)}},x=o(0),y=h(x),u=o(4),s=h(u),_=o(25),a=h(_);function h(v){return v&&v.__esModule?v:{default:v}}function d(v,C,B){return C in v?Object.defineProperty(v,C,{value:B,enumerable:!0,configurable:!0,writable:!0}):v[C]=B,v}function p(v,C){if(!(v instanceof C))throw new TypeError("Cannot call a class as a function")}function l(v,C){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:v}function g(v,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);v.prototype=Object.create(C&&C.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(v,C):v.__proto__=C)}var m=function(v){g(C,v);function C(){return p(this,C),l(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return c(C,[{key:"format",value:function(w,S){w===b.blotName&&!S?this.replaceWith(y.default.create(this.statics.scope)):f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"format",this).call(this,w,S)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(w,S){return this.parent.isolate(this.offset(this.parent),this.length()),w===this.parent.statics.blotName?(this.parent.replaceWith(w,S),this):(this.parent.unwrap(),f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,w,S))}}],[{key:"formats",value:function(w){return w.tagName===this.tagName?void 0:f(C.__proto__||Object.getPrototypeOf(C),"formats",this).call(this,w)}}]),C}(s.default);m.blotName="list-item",m.tagName="LI";var b=function(v){g(C,v),c(C,null,[{key:"create",value:function(w){var S=w==="ordered"?"OL":"UL",I=f(C.__proto__||Object.getPrototypeOf(C),"create",this).call(this,S);return(w==="checked"||w==="unchecked")&&I.setAttribute("data-checked",w==="checked"),I}},{key:"formats",value:function(w){if(w.tagName==="OL")return"ordered";if(w.tagName==="UL")return w.hasAttribute("data-checked")?w.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function C(B){p(this,C);var w=l(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,B)),S=function(A){if(A.target.parentNode===B){var k=w.statics.formats(B),N=y.default.find(A.target);k==="checked"?N.format("list","unchecked"):k==="unchecked"&&N.format("list","checked")}};return B.addEventListener("touchstart",S),B.addEventListener("mousedown",S),w}return c(C,[{key:"format",value:function(w,S){this.children.length>0&&this.children.tail.format(w,S)}},{key:"formats",value:function(){return d({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(w,S){if(w instanceof m)f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,w,S);else{var I=S==null?this.length():S.offset(this),A=this.split(I);A.parent.insertBefore(w,A)}}},{key:"optimize",value:function(w){f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,w);var S=this.next;S!=null&&S.prev===this&&S.statics.blotName===this.statics.blotName&&S.domNode.tagName===this.domNode.tagName&&S.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(S.moveChildren(this),S.remove())}},{key:"replace",value:function(w){if(w.statics.blotName!==this.statics.blotName){var S=y.default.create(this.statics.defaultChild);w.moveChildren(S),this.appendChild(S)}f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replace",this).call(this,w)}}]),C}(a.default);b.blotName="list",b.scope=y.default.Scope.BLOCK_BLOT,b.tagName=["OL","UL"],b.defaultChild="list-item",b.allowedChildren=[m],r.ListItem=m,r.default=b},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(56),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="italic",_.tagName=["EM","I"],r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(6),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(){return s(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return c(p,null,[{key:"create",value:function(g){return g==="super"?document.createElement("sup"):g==="sub"?document.createElement("sub"):f(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,g)}},{key:"formats",value:function(g){if(g.tagName==="SUB")return"sub";if(g.tagName==="SUP")return"super"}}]),p}(y.default);h.blotName="script",h.tagName=["SUB","SUP"],r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(6),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="strike",_.tagName="S",r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(6),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="underline",_.tagName="U",r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),f=function l(g,m,b){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,m);if(v===void 0){var C=Object.getPrototypeOf(g);return C===null?void 0:l(C,m,b)}else{if("value"in v)return v.value;var B=v.get;return B===void 0?void 0:B.call(b)}},x=o(0),y=s(x),u=o(27);function s(l){return l&&l.__esModule?l:{default:l}}function _(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}function a(l,g){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:l}function h(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);l.prototype=Object.create(g&&g.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(l,g):l.__proto__=g)}var d=["alt","height","width"],p=function(l){h(g,l);function g(){return _(this,g),a(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return c(g,[{key:"format",value:function(b,v){d.indexOf(b)>-1?v?this.domNode.setAttribute(b,v):this.domNode.removeAttribute(b):f(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,v)}}],[{key:"create",value:function(b){var v=f(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return typeof b=="string"&&v.setAttribute("src",this.sanitize(b)),v}},{key:"formats",value:function(b){return d.reduce(function(v,C){return b.hasAttribute(C)&&(v[C]=b.getAttribute(C)),v},{})}},{key:"match",value:function(b){return/\.(jpe?g|gif|png)$/.test(b)||/^data:image\/.+;base64/.test(b)}},{key:"sanitize",value:function(b){return(0,u.sanitize)(b,["http","https","data"])?b:"//:0"}},{key:"value",value:function(b){return b.getAttribute("src")}}]),g}(y.default.Embed);p.blotName="image",p.tagName="IMG",r.default=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),f=function l(g,m,b){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,m);if(v===void 0){var C=Object.getPrototypeOf(g);return C===null?void 0:l(C,m,b)}else{if("value"in v)return v.value;var B=v.get;return B===void 0?void 0:B.call(b)}},x=o(4),y=o(27),u=s(y);function s(l){return l&&l.__esModule?l:{default:l}}function _(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}function a(l,g){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:l}function h(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);l.prototype=Object.create(g&&g.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(l,g):l.__proto__=g)}var d=["height","width"],p=function(l){h(g,l);function g(){return _(this,g),a(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return c(g,[{key:"format",value:function(b,v){d.indexOf(b)>-1?v?this.domNode.setAttribute(b,v):this.domNode.removeAttribute(b):f(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,v)}}],[{key:"create",value:function(b){var v=f(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return v.setAttribute("frameborder","0"),v.setAttribute("allowfullscreen",!0),v.setAttribute("src",this.sanitize(b)),v}},{key:"formats",value:function(b){return d.reduce(function(v,C){return b.hasAttribute(C)&&(v[C]=b.getAttribute(C)),v},{})}},{key:"sanitize",value:function(b){return u.default.sanitize(b)}},{key:"value",value:function(b){return b.getAttribute("src")}}]),g}(x.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",r.default=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var c=function(){function b(v,C){for(var B=0;B<C.length;B++){var w=C[B];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,C,B){return C&&b(v.prototype,C),B&&b(v,B),v}}(),f=function b(v,C,B){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,C);if(w===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:b(S,C,B)}else{if("value"in w)return w.value;var I=w.get;return I===void 0?void 0:I.call(B)}},x=o(35),y=h(x),u=o(5),s=h(u),_=o(9),a=h(_);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function p(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function l(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=function(b){l(v,b);function v(){return d(this,v),p(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return c(v,null,[{key:"create",value:function(B){var w=f(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,B);return typeof B=="string"&&(window.katex.render(B,w,{throwOnError:!1,errorColor:"#f00"}),w.setAttribute("data-value",B)),w}},{key:"value",value:function(B){return B.getAttribute("data-value")}}]),v}(y.default);g.blotName="formula",g.className="ql-formula",g.tagName="SPAN";var m=function(b){l(v,b),c(v,null,[{key:"register",value:function(){s.default.register(g,!0)}}]);function v(){d(this,v);var C=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return C}return v}(a.default);r.FormulaBlot=g,r.default=m},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var c=function(){function B(w,S){for(var I=0;I<S.length;I++){var A=S[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,S,I){return S&&B(w.prototype,S),I&&B(w,I),w}}(),f=function B(w,S,I){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,S);if(A===void 0){var k=Object.getPrototypeOf(w);return k===null?void 0:B(k,S,I)}else{if("value"in A)return A.value;var N=A.get;return N===void 0?void 0:N.call(I)}},x=o(0),y=p(x),u=o(5),s=p(u),_=o(9),a=p(_),h=o(13),d=p(h);function p(B){return B&&B.__esModule?B:{default:B}}function l(B,w){if(!(B instanceof w))throw new TypeError("Cannot call a class as a function")}function g(B,w){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:B}function m(B,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);B.prototype=Object.create(w&&w.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(B,w):B.__proto__=w)}var b=function(B){m(w,B);function w(){return l(this,w),g(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return c(w,[{key:"replaceWith",value:function(I){this.domNode.textContent=this.domNode.textContent,this.attach(),f(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"replaceWith",this).call(this,I)}},{key:"highlight",value:function(I){var A=this.domNode.textContent;this.cachedText!==A&&((A.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=I(A),this.domNode.normalize(),this.attach()),this.cachedText=A)}}]),w}(d.default);b.className="ql-syntax";var v=new y.default.Attributor.Class("token","hljs",{scope:y.default.Scope.INLINE}),C=function(B){m(w,B),c(w,null,[{key:"register",value:function(){s.default.register(v,!0),s.default.register(b,!0)}}]);function w(S,I){l(this,w);var A=g(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));if(typeof A.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var k=null;return A.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(k),k=setTimeout(function(){A.highlight(),k=null},A.options.interval)}),A.highlight(),A}return c(w,[{key:"highlight",value:function(){var I=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var A=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(k){k.highlight(I.options.highlight)}),this.quill.update(s.default.sources.SILENT),A!=null&&this.quill.setSelection(A,s.default.sources.SILENT)}}}]),w}(a.default);C.DEFAULTS={highlight:function(){return window.hljs==null?null:function(B){var w=window.hljs.highlightAuto(B);return w.value}}(),interval:1e3},r.CodeBlock=b,r.CodeToken=v,r.default=C},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var c=function w(S,I,A){S===null&&(S=Function.prototype);var k=Object.getOwnPropertyDescriptor(S,I);if(k===void 0){var N=Object.getPrototypeOf(S);return N===null?void 0:w(N,I,A)}else{if("value"in k)return k.value;var V=k.get;return V===void 0?void 0:V.call(A)}},f=function(){function w(S,I){for(var A=0;A<I.length;A++){var k=I[A];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}return function(S,I,A){return I&&w(S.prototype,I),A&&w(S,A),S}}(),x=o(3),y=l(x),u=o(8),s=l(u),_=o(43),a=l(_),h=o(15),d=o(41),p=l(d);function l(w){return w&&w.__esModule?w:{default:w}}function g(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function m(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function b(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var v=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],C=function(w){b(S,w);function S(I,A){g(this,S),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=v);var k=m(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I,A));return k.quill.container.classList.add("ql-bubble"),k}return f(S,[{key:"extendToolbar",value:function(A){this.tooltip=new B(this.quill,this.options.bounds),this.tooltip.root.appendChild(A.container),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),p.default)}}]),S}(a.default);C.DEFAULTS=(0,y.default)(!0,{},a.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(S){S?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var B=function(w){b(S,w);function S(I,A){g(this,S);var k=m(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I,A));return k.quill.on(s.default.events.EDITOR_CHANGE,function(N,V,L,M){if(N===s.default.events.SELECTION_CHANGE)if(V!=null&&V.length>0&&M===s.default.sources.USER){k.show(),k.root.style.left="0px",k.root.style.width="",k.root.style.width=k.root.offsetWidth+"px";var Z=k.quill.getLines(V.index,V.length);if(Z.length===1)k.position(k.quill.getBounds(V));else{var G=Z[Z.length-1],J=k.quill.getIndex(G),K=Math.min(G.length()-1,V.index+V.length-J),F=k.quill.getBounds(new h.Range(J,K));k.position(F)}}else document.activeElement!==k.textbox&&k.quill.hasFocus()&&k.hide()}),k}return f(S,[{key:"listen",value:function(){var A=this;c(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){A.root.classList.remove("ql-editing")}),this.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!A.root.classList.contains("ql-hidden")){var k=A.quill.getSelection();k!=null&&A.position(A.quill.getBounds(k))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var k=c(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"position",this).call(this,A),N=this.root.querySelector(".ql-tooltip-arrow");if(N.style.marginLeft="",k===0)return k;N.style.marginLeft=-1*k-N.offsetWidth/2+"px"}}]),S}(_.BaseTooltip);B.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=B,r.default=C},function(n,r,o){n.exports=o(63)}]).default})})(di);var ku=di.exports;const Lr=Dr(ku);var ut=-1,rt=1,Xe=0;function gn(t,i,n,r){if(t===i)return t?[[Xe,t]]:[];if(n!=null){var o=Su(t,i,n);if(o)return o}var c=Fr(t,i),f=t.substring(0,c);t=t.substring(c),i=i.substring(c),c=Rr(t,i);var x=t.substring(t.length-c);t=t.substring(0,t.length-c),i=i.substring(0,i.length-c);var y=wu(t,i);return f&&y.unshift([Xe,f]),x&&y.push([Xe,x]),fi(y,r),y}function wu(t,i){var n;if(!t)return[[rt,i]];if(!i)return[[ut,t]];var r=t.length>i.length?t:i,o=t.length>i.length?i:t,c=r.indexOf(o);if(c!==-1)return n=[[rt,r.substring(0,c)],[Xe,o],[rt,r.substring(c+o.length)]],t.length>i.length&&(n[0][0]=n[2][0]=ut),n;if(o.length===1)return[[ut,t],[rt,i]];var f=Au(t,i);if(f){var x=f[0],y=f[1],u=f[2],s=f[3],_=f[4],a=gn(x,u),h=gn(y,s);return a.concat([[Xe,_]],h)}return Nu(t,i)}function Nu(t,i){for(var n=t.length,r=i.length,o=Math.ceil((n+r)/2),c=o,f=2*o,x=new Array(f),y=new Array(f),u=0;u<f;u++)x[u]=-1,y[u]=-1;x[c+1]=0,y[c+1]=0;for(var s=n-r,_=s%2!==0,a=0,h=0,d=0,p=0,l=0;l<o;l++){for(var g=-l+a;g<=l-h;g+=2){var m=c+g,b;g===-l||g!==l&&x[m-1]<x[m+1]?b=x[m+1]:b=x[m-1]+1;for(var v=b-g;b<n&&v<r&&t.charAt(b)===i.charAt(v);)b++,v++;if(x[m]=b,b>n)h+=2;else if(v>r)a+=2;else if(_){var C=c+s-g;if(C>=0&&C<f&&y[C]!==-1){var B=n-y[C];if(b>=B)return ui(t,i,b,v)}}}for(var w=-l+d;w<=l-p;w+=2){var C=c+w,B;w===-l||w!==l&&y[C-1]<y[C+1]?B=y[C+1]:B=y[C-1]+1;for(var S=B-w;B<n&&S<r&&t.charAt(n-B-1)===i.charAt(r-S-1);)B++,S++;if(y[C]=B,B>n)p+=2;else if(S>r)d+=2;else if(!_){var m=c+s-w;if(m>=0&&m<f&&x[m]!==-1){var b=x[m],v=c+b-m;if(B=n-B,b>=B)return ui(t,i,b,v)}}}}return[[ut,t],[rt,i]]}function ui(t,i,n,r){var o=t.substring(0,n),c=i.substring(0,r),f=t.substring(n),x=i.substring(r),y=gn(o,c),u=gn(f,x);return y.concat(u)}function Fr(t,i){if(!t||!i||t.charAt(0)!==i.charAt(0))return 0;for(var n=0,r=Math.min(t.length,i.length),o=r,c=0;n<o;)t.substring(c,o)==i.substring(c,o)?(n=o,c=n):r=o,o=Math.floor((r-n)/2+n);return hi(t.charCodeAt(o-1))&&o--,o}function Rr(t,i){if(!t||!i||t.slice(-1)!==i.slice(-1))return 0;for(var n=0,r=Math.min(t.length,i.length),o=r,c=0;n<o;)t.substring(t.length-o,t.length-c)==i.substring(i.length-o,i.length-c)?(n=o,c=n):r=o,o=Math.floor((r-n)/2+n);return pi(t.charCodeAt(t.length-o))&&o--,o}function Au(t,i){var n=t.length>i.length?t:i,r=t.length>i.length?i:t;if(n.length<4||r.length*2<n.length)return null;function o(h,d,p){for(var l=h.substring(p,p+Math.floor(h.length/4)),g=-1,m="",b,v,C,B;(g=d.indexOf(l,g+1))!==-1;){var w=Fr(h.substring(p),d.substring(g)),S=Rr(h.substring(0,p),d.substring(0,g));m.length<S+w&&(m=d.substring(g-S,g)+d.substring(g,g+w),b=h.substring(0,p-S),v=h.substring(p+w),C=d.substring(0,g-S),B=d.substring(g+w))}return m.length*2>=h.length?[b,v,C,B,m]:null}var c=o(n,r,Math.ceil(n.length/4)),f=o(n,r,Math.ceil(n.length/2)),x;if(!c&&!f)return null;f?c?x=c[4].length>f[4].length?c:f:x=f:x=c;var y,u,s,_;t.length>i.length?(y=x[0],u=x[1],s=x[2],_=x[3]):(s=x[0],_=x[1],y=x[2],u=x[3]);var a=x[4];return[y,u,s,_,a]}function fi(t,i){t.push([Xe,""]);for(var n=0,r=0,o=0,c="",f="",x;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case rt:o++,f+=t[n][1],n++;break;case ut:r++,c+=t[n][1],n++;break;case Xe:var y=n-o-r-1;if(i){if(y>=0&&gi(t[y][1])){var u=t[y][1].slice(-1);if(t[y][1]=t[y][1].slice(0,-1),c=u+c,f=u+f,!t[y][1]){t.splice(y,1),n--;var s=y-1;t[s]&&t[s][0]===rt&&(o++,f=t[s][1]+f,s--),t[s]&&t[s][0]===ut&&(r++,c=t[s][1]+c,s--),y=s}}if(mi(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),c+=u,f+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(c.length>0||f.length>0){c.length>0&&f.length>0&&(x=Fr(f,c),x!==0&&(y>=0?t[y][1]+=f.substring(0,x):(t.splice(0,0,[Xe,f.substring(0,x)]),n++),f=f.substring(x),c=c.substring(x)),x=Rr(f,c),x!==0&&(t[n][1]=f.substring(f.length-x)+t[n][1],f=f.substring(0,f.length-x),c=c.substring(0,c.length-x)));var _=o+r;c.length===0&&f.length===0?(t.splice(n-_,_),n=n-_):c.length===0?(t.splice(n-_,_,[rt,f]),n=n-_+1):f.length===0?(t.splice(n-_,_,[ut,c]),n=n-_+1):(t.splice(n-_,_,[ut,c],[rt,f]),n=n-_+2)}n!==0&&t[n-1][0]===Xe?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,c="",f="";break}}t[t.length-1][1]===""&&t.pop();var a=!1;for(n=1;n<t.length-1;)t[n-1][0]===Xe&&t[n+1][0]===Xe&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),a=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),a=!0)),n++;a&&fi(t,i)}function hi(t){return t>=55296&&t<=56319}function pi(t){return t>=56320&&t<=57343}function mi(t){return pi(t.charCodeAt(0))}function gi(t){return hi(t.charCodeAt(t.length-1))}function Bu(t){for(var i=[],n=0;n<t.length;n++)t[n][1].length>0&&i.push(t[n]);return i}function Pr(t,i,n,r){return gi(t)||mi(r)?null:Bu([[Xe,t],[ut,i],[rt,n],[Xe,r]])}function Su(t,i,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,o=typeof n=="number"?null:n.newRange,c=t.length,f=i.length;if(r.length===0&&(o===null||o.length===0)){var x=r.index,y=t.slice(0,x),u=t.slice(x),s=o?o.index:null;e:{var _=x+f-c;if(s!==null&&s!==_||_<0||_>f)break e;var a=i.slice(0,_),h=i.slice(_);if(h!==u)break e;var d=Math.min(x,_),p=y.slice(0,d),l=a.slice(0,d);if(p!==l)break e;var g=y.slice(d),m=a.slice(d);return Pr(p,g,m,u)}e:{if(s!==null&&s!==x)break e;var b=x,a=i.slice(0,b),h=i.slice(b);if(a!==y)break e;var v=Math.min(c-b,f-b),C=u.slice(u.length-v),B=h.slice(h.length-v);if(C!==B)break e;var g=u.slice(0,u.length-v),m=h.slice(0,h.length-v);return Pr(y,g,m,C)}}if(r.length>0&&o&&o.length===0)e:{var p=t.slice(0,r.index),C=t.slice(r.index+r.length),d=p.length,v=C.length;if(f<d+v)break e;var l=i.slice(0,d),B=i.slice(f-v);if(p!==l||C!==B)break e;var g=t.slice(d,c-v),m=i.slice(d,f-v);return Pr(p,g,m,C)}return null}function Zn(t,i,n){return gn(t,i,n,!0)}Zn.INSERT=rt,Zn.DELETE=ut,Zn.EQUAL=Xe;var Ou=Zn,Gn={exports:{}};Gn.exports,function(t,i){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,c="[object Arguments]",f="[object Array]",x="[object Boolean]",y="[object Date]",u="[object Error]",s="[object Function]",_="[object GeneratorFunction]",a="[object Map]",h="[object Number]",d="[object Object]",p="[object Promise]",l="[object RegExp]",g="[object Set]",m="[object String]",b="[object Symbol]",v="[object WeakMap]",C="[object ArrayBuffer]",B="[object DataView]",w="[object Float32Array]",S="[object Float64Array]",I="[object Int8Array]",A="[object Int16Array]",k="[object Int32Array]",N="[object Uint8Array]",V="[object Uint8ClampedArray]",L="[object Uint16Array]",M="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,G=/\w*$/,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,F={};F[c]=F[f]=F[C]=F[B]=F[x]=F[y]=F[w]=F[S]=F[I]=F[A]=F[k]=F[a]=F[h]=F[d]=F[l]=F[g]=F[m]=F[b]=F[N]=F[V]=F[L]=F[M]=!0,F[u]=F[s]=F[v]=!1;var E=typeof ue=="object"&&ue&&ue.Object===Object&&ue,T=typeof self=="object"&&self&&self.Object===Object&&self,D=E||T||Function("return this")(),P=i&&!i.nodeType&&i,X=P&&!0&&t&&!t.nodeType&&t,q=X&&X.exports===P;function z(O,H){return O.set(H[0],H[1]),O}function R(O,H){return O.add(H),O}function $(O,H){for(var W=-1,oe=O?O.length:0;++W<oe&&H(O[W],W,O)!==!1;);return O}function j(O,H){for(var W=-1,oe=H.length,ge=O.length;++W<oe;)O[ge+W]=H[W];return O}function U(O,H,W,oe){var ge=-1,de=O?O.length:0;for(oe&&de&&(W=O[++ge]);++ge<de;)W=H(W,O[ge],ge,O);return W}function Q(O,H){for(var W=-1,oe=Array(O);++W<O;)oe[W]=H(W);return oe}function Y(O,H){return O==null?void 0:O[H]}function ne(O){var H=!1;if(O!=null&&typeof O.toString!="function")try{H=!!(O+"")}catch{}return H}function ce(O){var H=-1,W=Array(O.size);return O.forEach(function(oe,ge){W[++H]=[ge,oe]}),W}function fe(O,H){return function(W){return O(H(W))}}function se(O){var H=-1,W=Array(O.size);return O.forEach(function(oe){W[++H]=oe}),W}var re=Array.prototype,te=Function.prototype,ie=Object.prototype,le=D["__core-js_shared__"],ae=function(){var O=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""}(),pe=te.toString,he=ie.hasOwnProperty,me=ie.toString,Ae=RegExp("^"+pe.call(he).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=q?D.Buffer:void 0,Ee=D.Symbol,ht=D.Uint8Array,ve=fe(Object.getPrototypeOf,Object),Oe=Object.create,pt=ie.propertyIsEnumerable,kn=re.splice,St=Object.getOwnPropertySymbols,Ct=Be?Be.isBuffer:void 0,nn=fe(Object.keys,Object),Ot=lt(D,"DataView"),mt=lt(D,"Map"),We=lt(D,"Promise"),Et=lt(D,"Set"),Ht=lt(D,"WeakMap"),gt=lt(Object,"create"),Ut=He(Ot),kt=He(mt),zt=He(We),It=He(Et),Xt=He(Ht),yt=Ee?Ee.prototype:void 0,Kt=yt?yt.valueOf:void 0;function it(O){var H=-1,W=O?O.length:0;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function rn(){this.__data__=gt?gt(null):{}}function Le(O){return this.has(O)&&delete this.__data__[O]}function Ye(O){var H=this.__data__;if(gt){var W=H[O];return W===r?void 0:W}return he.call(H,O)?H[O]:void 0}function Qt(O){var H=this.__data__;return gt?H[O]!==void 0:he.call(H,O)}function Zt(O,H){var W=this.__data__;return W[O]=gt&&H===void 0?r:H,this}it.prototype.clear=rn,it.prototype.delete=Le,it.prototype.get=Ye,it.prototype.has=Qt,it.prototype.set=Zt;function Fe(O){var H=-1,W=O?O.length:0;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function To(){this.__data__=[]}function Vo(O){var H=this.__data__,W=an(H,O);if(W<0)return!1;var oe=H.length-1;return W==oe?H.pop():kn.call(H,W,1),!0}function Do(O){var H=this.__data__,W=an(H,O);return W<0?void 0:H[W][1]}function Lo(O){return an(this.__data__,O)>-1}function Fo(O,H){var W=this.__data__,oe=an(W,O);return oe<0?W.push([O,H]):W[oe][1]=H,this}Fe.prototype.clear=To,Fe.prototype.delete=Vo,Fe.prototype.get=Do,Fe.prototype.has=Lo,Fe.prototype.set=Fo;function Me(O){var H=-1,W=O?O.length:0;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function Ro(){this.__data__={hash:new it,map:new(mt||Fe),string:new it}}function Po(O){return Wt(this,O).delete(O)}function Mo(O){return Wt(this,O).get(O)}function qo(O){return Wt(this,O).has(O)}function $o(O,H){return Wt(this,O).set(O,H),this}Me.prototype.clear=Ro,Me.prototype.delete=Po,Me.prototype.get=Mo,Me.prototype.has=qo,Me.prototype.set=$o;function Ke(O){this.__data__=new Fe(O)}function jo(){this.__data__=new Fe}function Ho(O){return this.__data__.delete(O)}function Uo(O){return this.__data__.get(O)}function zo(O){return this.__data__.has(O)}function Xo(O,H){var W=this.__data__;if(W instanceof Fe){var oe=W.__data__;if(!mt||oe.length<n-1)return oe.push([O,H]),this;W=this.__data__=new Me(oe)}return W.set(O,H),this}Ke.prototype.clear=jo,Ke.prototype.delete=Ho,Ke.prototype.get=Uo,Ke.prototype.has=zo,Ke.prototype.set=Xo;function on(O,H){var W=Bn(O)||sn(O)?Q(O.length,String):[],oe=W.length,ge=!!oe;for(var de in O)(H||he.call(O,de))&&!(ge&&(de=="length"||ia(de,oe)))&&W.push(de);return W}function ar(O,H,W){var oe=O[H];(!(he.call(O,H)&&dr(oe,W))||W===void 0&&!(H in O))&&(O[H]=W)}function an(O,H){for(var W=O.length;W--;)if(dr(O[W][0],H))return W;return-1}function xt(O,H){return O&&An(H,On(H),O)}function wn(O,H,W,oe,ge,de,be){var Ce;if(oe&&(Ce=de?oe(O,ge,de,be):oe(O)),Ce!==void 0)return Ce;if(!_t(O))return O;var Ie=Bn(O);if(Ie){if(Ce=oa(O),!H)return ta(O,Ce)}else{var ke=Nt(O),qe=ke==s||ke==_;if(ur(O))return ln(O,H);if(ke==d||ke==c||qe&&!de){if(ne(O))return de?O:{};if(Ce=vt(qe?{}:O),!H)return na(O,xt(Ce,O))}else{if(!F[ke])return de?O:{};Ce=aa(O,ke,wn,H)}}be||(be=new Ke);var Qe=be.get(O);if(Qe)return Qe;if(be.set(O,Ce),!Ie)var Te=W?ra(O):On(O);return $(Te||O,function($e,Re){Te&&(Re=$e,$e=O[Re]),ar(Ce,Re,wn($e,H,W,oe,Re,O,be))}),Ce}function Ko(O){return _t(O)?Oe(O):{}}function Qo(O,H,W){var oe=H(O);return Bn(O)?oe:j(oe,W(O))}function Zo(O){return me.call(O)}function Go(O){if(!_t(O)||sa(O))return!1;var H=Sn(O)||ne(O)?Ae:J;return H.test(He(O))}function Wo(O){if(!sr(O))return nn(O);var H=[];for(var W in Object(O))he.call(O,W)&&W!="constructor"&&H.push(W);return H}function ln(O,H){if(H)return O.slice();var W=new O.constructor(O.length);return O.copy(W),W}function Nn(O){var H=new O.constructor(O.byteLength);return new ht(H).set(new ht(O)),H}function Gt(O,H){var W=H?Nn(O.buffer):O.buffer;return new O.constructor(W,O.byteOffset,O.byteLength)}function ir(O,H,W){var oe=H?W(ce(O),!0):ce(O);return U(oe,z,new O.constructor)}function lr(O){var H=new O.constructor(O.source,G.exec(O));return H.lastIndex=O.lastIndex,H}function Jo(O,H,W){var oe=H?W(se(O),!0):se(O);return U(oe,R,new O.constructor)}function Yo(O){return Kt?Object(Kt.call(O)):{}}function ea(O,H){var W=H?Nn(O.buffer):O.buffer;return new O.constructor(W,O.byteOffset,O.length)}function ta(O,H){var W=-1,oe=O.length;for(H||(H=Array(oe));++W<oe;)H[W]=O[W];return H}function An(O,H,W,oe){W||(W={});for(var ge=-1,de=H.length;++ge<de;){var be=H[ge],Ce=oe?oe(W[be],O[be],be,W,O):void 0;ar(W,be,Ce===void 0?O[be]:Ce)}return W}function na(O,H){return An(O,wt(O),H)}function ra(O){return Qo(O,On,wt)}function Wt(O,H){var W=O.__data__;return la(H)?W[typeof H=="string"?"string":"hash"]:W.map}function lt(O,H){var W=Y(O,H);return Go(W)?W:void 0}var wt=St?fe(St,Object):da,Nt=Zo;(Ot&&Nt(new Ot(new ArrayBuffer(1)))!=B||mt&&Nt(new mt)!=a||We&&Nt(We.resolve())!=p||Et&&Nt(new Et)!=g||Ht&&Nt(new Ht)!=v)&&(Nt=function(O){var H=me.call(O),W=H==d?O.constructor:void 0,oe=W?He(W):void 0;if(oe)switch(oe){case Ut:return B;case kt:return a;case zt:return p;case It:return g;case Xt:return v}return H});function oa(O){var H=O.length,W=O.constructor(H);return H&&typeof O[0]=="string"&&he.call(O,"index")&&(W.index=O.index,W.input=O.input),W}function vt(O){return typeof O.constructor=="function"&&!sr(O)?Ko(ve(O)):{}}function aa(O,H,W,oe){var ge=O.constructor;switch(H){case C:return Nn(O);case x:case y:return new ge(+O);case B:return Gt(O,oe);case w:case S:case I:case A:case k:case N:case V:case L:case M:return ea(O,oe);case a:return ir(O,oe,W);case h:case m:return new ge(O);case l:return lr(O);case g:return Jo(O,oe,W);case b:return Yo(O)}}function ia(O,H){return H=H??o,!!H&&(typeof O=="number"||K.test(O))&&O>-1&&O%1==0&&O<H}function la(O){var H=typeof O;return H=="string"||H=="number"||H=="symbol"||H=="boolean"?O!=="__proto__":O===null}function sa(O){return!!ae&&ae in O}function sr(O){var H=O&&O.constructor,W=typeof H=="function"&&H.prototype||ie;return O===W}function He(O){if(O!=null){try{return pe.call(O)}catch{}try{return O+""}catch{}}return""}function cr(O){return wn(O,!0,!0)}function dr(O,H){return O===H||O!==O&&H!==H}function sn(O){return ca(O)&&he.call(O,"callee")&&(!pt.call(O,"callee")||me.call(O)==c)}var Bn=Array.isArray;function cn(O){return O!=null&&fr(O.length)&&!Sn(O)}function ca(O){return hr(O)&&cn(O)}var ur=Ct||ua;function Sn(O){var H=_t(O)?me.call(O):"";return H==s||H==_}function fr(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=o}function _t(O){var H=typeof O;return!!O&&(H=="object"||H=="function")}function hr(O){return!!O&&typeof O=="object"}function On(O){return cn(O)?on(O):Wo(O)}function da(){return[]}function ua(){return!1}t.exports=cr}(Gn,Gn.exports);var yi=Gn.exports,Wn={exports:{}};Wn.exports,function(t,i){var n=200,r="__lodash_hash_undefined__",o=1,c=2,f=9007199254740991,x="[object Arguments]",y="[object Array]",u="[object AsyncFunction]",s="[object Boolean]",_="[object Date]",a="[object Error]",h="[object Function]",d="[object GeneratorFunction]",p="[object Map]",l="[object Number]",g="[object Null]",m="[object Object]",b="[object Promise]",v="[object Proxy]",C="[object RegExp]",B="[object Set]",w="[object String]",S="[object Symbol]",I="[object Undefined]",A="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",V="[object Float32Array]",L="[object Float64Array]",M="[object Int8Array]",Z="[object Int16Array]",G="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",F="[object Uint16Array]",E="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,X={};X[V]=X[L]=X[M]=X[Z]=X[G]=X[J]=X[K]=X[F]=X[E]=!0,X[x]=X[y]=X[k]=X[s]=X[N]=X[_]=X[a]=X[h]=X[p]=X[l]=X[m]=X[C]=X[B]=X[w]=X[A]=!1;var q=typeof ue=="object"&&ue&&ue.Object===Object&&ue,z=typeof self=="object"&&self&&self.Object===Object&&self,R=q||z||Function("return this")(),$=i&&!i.nodeType&&i,j=$&&!0&&t&&!t.nodeType&&t,U=j&&j.exports===$,Q=U&&q.process,Y=function(){try{return Q&&Q.binding&&Q.binding("util")}catch{}}(),ne=Y&&Y.isTypedArray;function ce(O,H){for(var W=-1,oe=O==null?0:O.length,ge=0,de=[];++W<oe;){var be=O[W];H(be,W,O)&&(de[ge++]=be)}return de}function fe(O,H){for(var W=-1,oe=H.length,ge=O.length;++W<oe;)O[ge+W]=H[W];return O}function se(O,H){for(var W=-1,oe=O==null?0:O.length;++W<oe;)if(H(O[W],W,O))return!0;return!1}function re(O,H){for(var W=-1,oe=Array(O);++W<O;)oe[W]=H(W);return oe}function te(O){return function(H){return O(H)}}function ie(O,H){return O.has(H)}function le(O,H){return O==null?void 0:O[H]}function ae(O){var H=-1,W=Array(O.size);return O.forEach(function(oe,ge){W[++H]=[ge,oe]}),W}function pe(O,H){return function(W){return O(H(W))}}function he(O){var H=-1,W=Array(O.size);return O.forEach(function(oe){W[++H]=oe}),W}var me=Array.prototype,Ae=Function.prototype,Be=Object.prototype,Ee=R["__core-js_shared__"],ht=Ae.toString,ve=Be.hasOwnProperty,Oe=function(){var O=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""}(),pt=Be.toString,kn=RegExp("^"+ht.call(ve).replace(T,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),St=U?R.Buffer:void 0,Ct=R.Symbol,nn=R.Uint8Array,Ot=Be.propertyIsEnumerable,mt=me.splice,We=Ct?Ct.toStringTag:void 0,Et=Object.getOwnPropertySymbols,Ht=St?St.isBuffer:void 0,gt=pe(Object.keys,Object),Ut=wt(R,"DataView"),kt=wt(R,"Map"),zt=wt(R,"Promise"),It=wt(R,"Set"),Xt=wt(R,"WeakMap"),yt=wt(Object,"create"),Kt=He(Ut),it=He(kt),rn=He(zt),Le=He(It),Ye=He(Xt),Qt=Ct?Ct.prototype:void 0,Zt=Qt?Qt.valueOf:void 0;function Fe(O){var H=-1,W=O==null?0:O.length;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function To(){this.__data__=yt?yt(null):{},this.size=0}function Vo(O){var H=this.has(O)&&delete this.__data__[O];return this.size-=H?1:0,H}function Do(O){var H=this.__data__;if(yt){var W=H[O];return W===r?void 0:W}return ve.call(H,O)?H[O]:void 0}function Lo(O){var H=this.__data__;return yt?H[O]!==void 0:ve.call(H,O)}function Fo(O,H){var W=this.__data__;return this.size+=this.has(O)?0:1,W[O]=yt&&H===void 0?r:H,this}Fe.prototype.clear=To,Fe.prototype.delete=Vo,Fe.prototype.get=Do,Fe.prototype.has=Lo,Fe.prototype.set=Fo;function Me(O){var H=-1,W=O==null?0:O.length;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function Ro(){this.__data__=[],this.size=0}function Po(O){var H=this.__data__,W=ln(H,O);if(W<0)return!1;var oe=H.length-1;return W==oe?H.pop():mt.call(H,W,1),--this.size,!0}function Mo(O){var H=this.__data__,W=ln(H,O);return W<0?void 0:H[W][1]}function qo(O){return ln(this.__data__,O)>-1}function $o(O,H){var W=this.__data__,oe=ln(W,O);return oe<0?(++this.size,W.push([O,H])):W[oe][1]=H,this}Me.prototype.clear=Ro,Me.prototype.delete=Po,Me.prototype.get=Mo,Me.prototype.has=qo,Me.prototype.set=$o;function Ke(O){var H=-1,W=O==null?0:O.length;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function jo(){this.size=0,this.__data__={hash:new Fe,map:new(kt||Me),string:new Fe}}function Ho(O){var H=lt(this,O).delete(O);return this.size-=H?1:0,H}function Uo(O){return lt(this,O).get(O)}function zo(O){return lt(this,O).has(O)}function Xo(O,H){var W=lt(this,O),oe=W.size;return W.set(O,H),this.size+=W.size==oe?0:1,this}Ke.prototype.clear=jo,Ke.prototype.delete=Ho,Ke.prototype.get=Uo,Ke.prototype.has=zo,Ke.prototype.set=Xo;function on(O){var H=-1,W=O==null?0:O.length;for(this.__data__=new Ke;++H<W;)this.add(O[H])}function ar(O){return this.__data__.set(O,r),this}function an(O){return this.__data__.has(O)}on.prototype.add=on.prototype.push=ar,on.prototype.has=an;function xt(O){var H=this.__data__=new Me(O);this.size=H.size}function wn(){this.__data__=new Me,this.size=0}function Ko(O){var H=this.__data__,W=H.delete(O);return this.size=H.size,W}function Qo(O){return this.__data__.get(O)}function Zo(O){return this.__data__.has(O)}function Go(O,H){var W=this.__data__;if(W instanceof Me){var oe=W.__data__;if(!kt||oe.length<n-1)return oe.push([O,H]),this.size=++W.size,this;W=this.__data__=new Ke(oe)}return W.set(O,H),this.size=W.size,this}xt.prototype.clear=wn,xt.prototype.delete=Ko,xt.prototype.get=Qo,xt.prototype.has=Zo,xt.prototype.set=Go;function Wo(O,H){var W=sn(O),oe=!W&&dr(O),ge=!W&&!oe&&cn(O),de=!W&&!oe&&!ge&&hr(O),be=W||oe||ge||de,Ce=be?re(O.length,String):[],Ie=Ce.length;for(var ke in O)(H||ve.call(O,ke))&&!(be&&(ke=="length"||ge&&(ke=="offset"||ke=="parent")||de&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||aa(ke,Ie)))&&Ce.push(ke);return Ce}function ln(O,H){for(var W=O.length;W--;)if(cr(O[W][0],H))return W;return-1}function Nn(O,H,W){var oe=H(O);return sn(O)?oe:fe(oe,W(O))}function Gt(O){return O==null?O===void 0?I:g:We&&We in Object(O)?Nt(O):sr(O)}function ir(O){return _t(O)&&Gt(O)==x}function lr(O,H,W,oe,ge){return O===H?!0:O==null||H==null||!_t(O)&&!_t(H)?O!==O&&H!==H:Jo(O,H,W,oe,lr,ge)}function Jo(O,H,W,oe,ge,de){var be=sn(O),Ce=sn(H),Ie=be?y:vt(O),ke=Ce?y:vt(H);Ie=Ie==x?m:Ie,ke=ke==x?m:ke;var qe=Ie==m,Qe=ke==m,Te=Ie==ke;if(Te&&cn(O)){if(!cn(H))return!1;be=!0,qe=!1}if(Te&&!qe)return de||(de=new xt),be||hr(O)?An(O,H,W,oe,ge,de):na(O,H,Ie,W,oe,ge,de);if(!(W&o)){var $e=qe&&ve.call(O,"__wrapped__"),Re=Qe&&ve.call(H,"__wrapped__");if($e||Re){var Tt=$e?O.value():O,At=Re?H.value():H;return de||(de=new xt),ge(Tt,At,W,oe,de)}}return Te?(de||(de=new xt),ra(O,H,W,oe,ge,de)):!1}function Yo(O){if(!fr(O)||la(O))return!1;var H=ur(O)?kn:D;return H.test(He(O))}function ea(O){return _t(O)&&Sn(O.length)&&!!X[Gt(O)]}function ta(O){if(!sa(O))return gt(O);var H=[];for(var W in Object(O))ve.call(O,W)&&W!="constructor"&&H.push(W);return H}function An(O,H,W,oe,ge,de){var be=W&o,Ce=O.length,Ie=H.length;if(Ce!=Ie&&!(be&&Ie>Ce))return!1;var ke=de.get(O);if(ke&&de.get(H))return ke==H;var qe=-1,Qe=!0,Te=W&c?new on:void 0;for(de.set(O,H),de.set(H,O);++qe<Ce;){var $e=O[qe],Re=H[qe];if(oe)var Tt=be?oe(Re,$e,qe,H,O,de):oe($e,Re,qe,O,H,de);if(Tt!==void 0){if(Tt)continue;Qe=!1;break}if(Te){if(!se(H,function(At,Jt){if(!ie(Te,Jt)&&($e===At||ge($e,At,W,oe,de)))return Te.push(Jt)})){Qe=!1;break}}else if(!($e===Re||ge($e,Re,W,oe,de))){Qe=!1;break}}return de.delete(O),de.delete(H),Qe}function na(O,H,W,oe,ge,de,be){switch(W){case N:if(O.byteLength!=H.byteLength||O.byteOffset!=H.byteOffset)return!1;O=O.buffer,H=H.buffer;case k:return!(O.byteLength!=H.byteLength||!de(new nn(O),new nn(H)));case s:case _:case l:return cr(+O,+H);case a:return O.name==H.name&&O.message==H.message;case C:case w:return O==H+"";case p:var Ce=ae;case B:var Ie=oe&o;if(Ce||(Ce=he),O.size!=H.size&&!Ie)return!1;var ke=be.get(O);if(ke)return ke==H;oe|=c,be.set(O,H);var qe=An(Ce(O),Ce(H),oe,ge,de,be);return be.delete(O),qe;case S:if(Zt)return Zt.call(O)==Zt.call(H)}return!1}function ra(O,H,W,oe,ge,de){var be=W&o,Ce=Wt(O),Ie=Ce.length,ke=Wt(H),qe=ke.length;if(Ie!=qe&&!be)return!1;for(var Qe=Ie;Qe--;){var Te=Ce[Qe];if(!(be?Te in H:ve.call(H,Te)))return!1}var $e=de.get(O);if($e&&de.get(H))return $e==H;var Re=!0;de.set(O,H),de.set(H,O);for(var Tt=be;++Qe<Ie;){Te=Ce[Qe];var At=O[Te],Jt=H[Te];if(oe)var Bl=be?oe(Jt,At,Te,H,O,de):oe(At,Jt,Te,O,H,de);if(!(Bl===void 0?At===Jt||ge(At,Jt,W,oe,de):Bl)){Re=!1;break}Tt||(Tt=Te=="constructor")}if(Re&&!Tt){var pr=O.constructor,mr=H.constructor;pr!=mr&&"constructor"in O&&"constructor"in H&&!(typeof pr=="function"&&pr instanceof pr&&typeof mr=="function"&&mr instanceof mr)&&(Re=!1)}return de.delete(O),de.delete(H),Re}function Wt(O){return Nn(O,On,oa)}function lt(O,H){var W=O.__data__;return ia(H)?W[typeof H=="string"?"string":"hash"]:W.map}function wt(O,H){var W=le(O,H);return Yo(W)?W:void 0}function Nt(O){var H=ve.call(O,We),W=O[We];try{O[We]=void 0;var oe=!0}catch{}var ge=pt.call(O);return oe&&(H?O[We]=W:delete O[We]),ge}var oa=Et?function(O){return O==null?[]:(O=Object(O),ce(Et(O),function(H){return Ot.call(O,H)}))}:da,vt=Gt;(Ut&&vt(new Ut(new ArrayBuffer(1)))!=N||kt&&vt(new kt)!=p||zt&&vt(zt.resolve())!=b||It&&vt(new It)!=B||Xt&&vt(new Xt)!=A)&&(vt=function(O){var H=Gt(O),W=H==m?O.constructor:void 0,oe=W?He(W):"";if(oe)switch(oe){case Kt:return N;case it:return p;case rn:return b;case Le:return B;case Ye:return A}return H});function aa(O,H){return H=H??f,!!H&&(typeof O=="number"||P.test(O))&&O>-1&&O%1==0&&O<H}function ia(O){var H=typeof O;return H=="string"||H=="number"||H=="symbol"||H=="boolean"?O!=="__proto__":O===null}function la(O){return!!Oe&&Oe in O}function sa(O){var H=O&&O.constructor,W=typeof H=="function"&&H.prototype||Be;return O===W}function sr(O){return pt.call(O)}function He(O){if(O!=null){try{return ht.call(O)}catch{}try{return O+""}catch{}}return""}function cr(O,H){return O===H||O!==O&&H!==H}var dr=ir(function(){return arguments}())?ir:function(O){return _t(O)&&ve.call(O,"callee")&&!Ot.call(O,"callee")},sn=Array.isArray;function Bn(O){return O!=null&&Sn(O.length)&&!ur(O)}var cn=Ht||ua;function ca(O,H){return lr(O,H)}function ur(O){if(!fr(O))return!1;var H=Gt(O);return H==h||H==d||H==u||H==v}function Sn(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=f}function fr(O){var H=typeof O;return O!=null&&(H=="object"||H=="function")}function _t(O){return O!=null&&typeof O=="object"}var hr=ne?te(ne):ea;function On(O){return Bn(O)?Wo(O):ta(O)}function da(){return[]}function ua(){return!1}t.exports=ca}(Wn,Wn.exports);var xi=Wn.exports,Mr={},vi=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mr,"__esModule",{value:!0});var Iu=vi(yi),Tu=vi(xi),qr;(function(t){function i(c,f,x){c===void 0&&(c={}),f===void 0&&(f={}),typeof c!="object"&&(c={}),typeof f!="object"&&(f={});var y=Iu.default(f);x||(y=Object.keys(y).reduce(function(s,_){return y[_]!=null&&(s[_]=y[_]),s},{}));for(var u in c)c[u]!==void 0&&f[u]===void 0&&(y[u]=c[u]);return Object.keys(y).length>0?y:void 0}t.compose=i;function n(c,f){c===void 0&&(c={}),f===void 0&&(f={}),typeof c!="object"&&(c={}),typeof f!="object"&&(f={});var x=Object.keys(c).concat(Object.keys(f)).reduce(function(y,u){return Tu.default(c[u],f[u])||(y[u]=f[u]===void 0?null:f[u]),y},{});return Object.keys(x).length>0?x:void 0}t.diff=n;function r(c,f){c===void 0&&(c={}),f===void 0&&(f={}),c=c||{};var x=Object.keys(f).reduce(function(y,u){return f[u]!==c[u]&&c[u]!==void 0&&(y[u]=f[u]),y},{});return Object.keys(c).reduce(function(y,u){return c[u]!==f[u]&&f[u]===void 0&&(y[u]=null),y},x)}t.invert=r;function o(c,f,x){if(x===void 0&&(x=!1),typeof c!="object")return f;if(typeof f=="object"){if(!x)return f;var y=Object.keys(f).reduce(function(u,s){return c[s]===void 0&&(u[s]=f[s]),u},{});return Object.keys(y).length>0?y:void 0}}t.transform=o})(qr||(qr={})),Mr.default=qr;var Jn={},Yn={},_i;function Vu(){if(_i)return Yn;_i=1;var t=ue&&ue.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yn,"__esModule",{value:!0});var i=t(Ci()),n=function(){function r(o){this.ops=o,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(o){o||(o=1/0);var c=this.ops[this.index];if(c){var f=this.offset,x=i.default.length(c);if(o>=x-f?(o=x-f,this.index+=1,this.offset=0):this.offset+=o,typeof c.delete=="number")return{delete:o};var y={};return c.attributes&&(y.attributes=c.attributes),typeof c.retain=="number"?y.retain=o:typeof c.insert=="string"?y.insert=c.insert.substr(f,o):y.insert=c.insert,y}else return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?i.default.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var o=this.offset,c=this.index,f=this.next(),x=this.ops.slice(this.index);return this.offset=o,this.index=c,[f].concat(x)}else return[]},r}();return Yn.default=n,Yn}var bi;function Ci(){if(bi)return Jn;bi=1;var t=ue&&ue.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jn,"__esModule",{value:!0});var i=t(Vu()),n;return function(r){function o(f){return new i.default(f)}r.iterator=o;function c(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}r.length=c}(n||(n={})),Jn.default=n,Jn}var yn=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},er=yn(Ou),Du=yn(yi),$r=yn(xi),xn=yn(Mr),De=yn(Ci()),Lu="\0",Fu=function(){function t(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}return t.prototype.insert=function(i,n){var r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r))},t.prototype.delete=function(i){return i<=0?this:this.push({delete:i})},t.prototype.retain=function(i,n){if(i<=0)return this;var r={retain:i};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r)},t.prototype.push=function(i){var n=this.ops.length,r=this.ops[n-1];if(i=Du.default(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[n-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(n-=1,r=this.ops[n-1],typeof r!="object"))return this.ops.unshift(i),this;if($r.default(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[n-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[n-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[n-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[n-1].attributes=i.attributes),this}}return n===this.ops.length?this.ops.push(i):this.ops.splice(n,0,i),this},t.prototype.chop=function(){var i=this.ops[this.ops.length-1];return i&&i.retain&&!i.attributes&&this.ops.pop(),this},t.prototype.filter=function(i){return this.ops.filter(i)},t.prototype.forEach=function(i){this.ops.forEach(i)},t.prototype.map=function(i){return this.ops.map(i)},t.prototype.partition=function(i){var n=[],r=[];return this.forEach(function(o){var c=i(o)?n:r;c.push(o)}),[n,r]},t.prototype.reduce=function(i,n){return this.ops.reduce(i,n)},t.prototype.changeLength=function(){return this.reduce(function(i,n){return n.insert?i+De.default.length(n):n.delete?i-n.delete:i},0)},t.prototype.length=function(){return this.reduce(function(i,n){return i+De.default.length(n)},0)},t.prototype.slice=function(i,n){i===void 0&&(i=0),n===void 0&&(n=1/0);for(var r=[],o=De.default.iterator(this.ops),c=0;c<n&&o.hasNext();){var f=void 0;c<i?f=o.next(i-c):(f=o.next(n-c),r.push(f)),c+=De.default.length(f)}return new t(r)},t.prototype.compose=function(i){var n=De.default.iterator(this.ops),r=De.default.iterator(i.ops),o=[],c=r.peek();if(c!=null&&typeof c.retain=="number"&&c.attributes==null){for(var f=c.retain;n.peekType()==="insert"&&n.peekLength()<=f;)f-=n.peekLength(),o.push(n.next());c.retain-f>0&&r.next(c.retain-f)}for(var x=new t(o);n.hasNext()||r.hasNext();)if(r.peekType()==="insert")x.push(r.next());else if(n.peekType()==="delete")x.push(n.next());else{var y=Math.min(n.peekLength(),r.peekLength()),u=n.next(y),s=r.next(y);if(typeof s.retain=="number"){var _={};typeof u.retain=="number"?_.retain=y:_.insert=u.insert;var a=xn.default.compose(u.attributes,s.attributes,typeof u.retain=="number");if(a&&(_.attributes=a),x.push(_),!r.hasNext()&&$r.default(x.ops[x.ops.length-1],_)){var h=new t(n.rest());return x.concat(h).chop()}}else typeof s.delete=="number"&&typeof u.retain=="number"&&x.push(s)}return x.chop()},t.prototype.concat=function(i){var n=new t(this.ops.slice());return i.ops.length>0&&(n.push(i.ops[0]),n.ops=n.ops.concat(i.ops.slice(1))),n},t.prototype.diff=function(i,n){if(this.ops===i.ops)return new t;var r=[this,i].map(function(y){return y.map(function(u){if(u.insert!=null)return typeof u.insert=="string"?u.insert:Lu;var s=y===i?"on":"with";throw new Error("diff() called "+s+" non-document")}).join("")}),o=new t,c=er.default(r[0],r[1],n),f=De.default.iterator(this.ops),x=De.default.iterator(i.ops);return c.forEach(function(y){for(var u=y[1].length;u>0;){var s=0;switch(y[0]){case er.default.INSERT:s=Math.min(x.peekLength(),u),o.push(x.next(s));break;case er.default.DELETE:s=Math.min(u,f.peekLength()),f.next(s),o.delete(s);break;case er.default.EQUAL:s=Math.min(f.peekLength(),x.peekLength(),u);var _=f.next(s),a=x.next(s);$r.default(_.insert,a.insert)?o.retain(s,xn.default.diff(_.attributes,a.attributes)):o.push(a).delete(s);break}u-=s}}),o.chop()},t.prototype.eachLine=function(i,n){n===void 0&&(n=`
|
|
50
|
+
`)}return te}function he(re,te){var ie={},le=re.style||{};return le.fontStyle&&P(re).fontStyle==="italic"&&(ie.italic=!0),le.fontWeight&&(P(re).fontWeight.startsWith("bold")||parseInt(P(re).fontWeight)>=700)&&(ie.bold=!0),Object.keys(ie).length>0&&(te=D(te,ie)),parseFloat(le.textIndent||0)>0&&(te=new _.default().insert(" ").concat(te)),te}function ce(re,te){var ie=re.data;if(re.parentNode.tagName==="O:P")return te.insert(ie.trim());if(ie.trim().length===0&&re.parentNode.classList.contains("ql-clipboard"))return te;if(!P(re.parentNode).whiteSpace.startsWith("pre")){var le=function(pe,fe){return fe=fe.replace(/[^\u00a0]/g,""),fe.length<1&&pe?" ":fe};ie=ie.replace(/\r\n/g," ").replace(/\n/g," "),ie=ie.replace(/\s\s+/g,le.bind(le,!0)),(re.previousSibling==null&&q(re.parentNode)||re.previousSibling!=null&&q(re.previousSibling))&&(ie=ie.replace(/^\s+/,le.bind(le,!1))),(re.nextSibling==null&&q(re.parentNode)||re.nextSibling!=null&&q(re.nextSibling))&&(ie=ie.replace(/\s+$/,le.bind(le,!1)))}return te.insert(ie)}r.default=T,r.matchAttributor=$,r.matchBlot=j,r.matchNewline=ne,r.matchSpacing=se,r.matchText=ce},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(6),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(){return s(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return c(p,[{key:"optimize",value:function(g){f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,g),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return f(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),p}(y.default);h.blotName="bold",h.tagName=["STRONG","B"],r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var c=function(){function k(N,V){var L=[],M=!0,Z=!1,G=void 0;try{for(var J=N[Symbol.iterator](),K;!(M=(K=J.next()).done)&&(L.push(K.value),!(V&&L.length===V));M=!0);}catch(F){Z=!0,G=F}finally{try{!M&&J.return&&J.return()}finally{if(Z)throw G}}return L}return function(N,V){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return k(N,V);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function k(N,V){for(var L=0;L<V.length;L++){var M=V[L];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(N,M.key,M)}}return function(N,V,L){return V&&k(N.prototype,V),L&&k(N,L),N}}(),x=o(2),y=g(x),u=o(0),s=g(u),_=o(5),a=g(_),h=o(10),d=g(h),p=o(9),l=g(p);function g(k){return k&&k.__esModule?k:{default:k}}function m(k,N,V){return N in k?Object.defineProperty(k,N,{value:V,enumerable:!0,configurable:!0,writable:!0}):k[N]=V,k}function b(k,N){if(!(k instanceof N))throw new TypeError("Cannot call a class as a function")}function v(k,N){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:k}function C(k,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);k.prototype=Object.create(N&&N.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(k,N):k.__proto__=N)}var B=(0,d.default)("quill:toolbar"),w=function(k){C(N,k);function N(V,L){b(this,N);var M=v(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,V,L));if(Array.isArray(M.options.container)){var Z=document.createElement("div");I(Z,M.options.container),V.container.parentNode.insertBefore(Z,V.container),M.container=Z}else typeof M.options.container=="string"?M.container=document.querySelector(M.options.container):M.container=M.options.container;if(!(M.container instanceof HTMLElement)){var G;return G=B.error("Container required for toolbar",M.options),v(M,G)}return M.container.classList.add("ql-toolbar"),M.controls=[],M.handlers={},Object.keys(M.options.handlers).forEach(function(J){M.addHandler(J,M.options.handlers[J])}),[].forEach.call(M.container.querySelectorAll("button, select"),function(J){M.attach(J)}),M.quill.on(a.default.events.EDITOR_CHANGE,function(J,K){J===a.default.events.SELECTION_CHANGE&&M.update(K)}),M.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){var J=M.quill.selection.getRange(),K=c(J,1),F=K[0];M.update(F)}),M}return f(N,[{key:"addHandler",value:function(L,M){this.handlers[L]=M}},{key:"attach",value:function(L){var M=this,Z=[].find.call(L.classList,function(J){return J.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){B.warn("ignoring attaching to disabled format",Z,L);return}if(s.default.query(Z)==null){B.warn("ignoring attaching to nonexistent format",Z,L);return}}var G=L.tagName==="SELECT"?"change":"click";L.addEventListener(G,function(J){var K=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var F=L.options[L.selectedIndex];F.hasAttribute("selected")?K=!1:K=F.value||!1}else L.classList.contains("ql-active")?K=!1:K=L.value||!L.hasAttribute("value"),J.preventDefault();M.quill.focus();var E=M.quill.selection.getRange(),T=c(E,1),D=T[0];if(M.handlers[Z]!=null)M.handlers[Z].call(M,K);else if(s.default.query(Z).prototype instanceof s.default.Embed){if(K=prompt("Enter "+Z),!K)return;M.quill.updateContents(new y.default().retain(D.index).delete(D.length).insert(m({},Z,K)),a.default.sources.USER)}else M.quill.format(Z,K,a.default.sources.USER);M.update(D)}),this.controls.push([Z,L])}}},{key:"update",value:function(L){var M=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(Z){var G=c(Z,2),J=G[0],K=G[1];if(K.tagName==="SELECT"){var F=void 0;if(L==null)F=null;else if(M[J]==null)F=K.querySelector("option[selected]");else if(!Array.isArray(M[J])){var E=M[J];typeof E=="string"&&(E=E.replace(/\"/g,'\\"')),F=K.querySelector('option[value="'+E+'"]')}F==null?(K.value="",K.selectedIndex=-1):F.selected=!0}else if(L==null)K.classList.remove("ql-active");else if(K.hasAttribute("value")){var T=M[J]===K.getAttribute("value")||M[J]!=null&&M[J].toString()===K.getAttribute("value")||M[J]==null&&!K.getAttribute("value");K.classList.toggle("ql-active",T)}else K.classList.toggle("ql-active",M[J]!=null)})}}]),N}(l.default);w.DEFAULTS={};function S(k,N,V){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+N),V!=null&&(L.value=V),k.appendChild(L)}function I(k,N){Array.isArray(N[0])||(N=[N]),N.forEach(function(V){var L=document.createElement("span");L.classList.add("ql-formats"),V.forEach(function(M){if(typeof M=="string")S(L,M);else{var Z=Object.keys(M)[0],G=M[Z];Array.isArray(G)?A(L,Z,G):S(L,Z,G)}}),k.appendChild(L)})}function A(k,N,V){var L=document.createElement("select");L.classList.add("ql-"+N),V.forEach(function(M){var Z=document.createElement("option");M!==!1?Z.setAttribute("value",M):Z.setAttribute("selected","selected"),L.appendChild(Z)}),k.appendChild(L)}w.DEFAULTS={container:null,handlers:{clean:function(){var N=this,V=this.quill.getSelection();if(V!=null)if(V.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(M){s.default.query(M,s.default.Scope.INLINE)!=null&&N.quill.format(M,!1)})}else this.quill.removeFormat(V,a.default.sources.USER)},direction:function(N){var V=this.quill.getFormat().align;N==="rtl"&&V==null?this.quill.format("align","right",a.default.sources.USER):!N&&V==="right"&&this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",N,a.default.sources.USER)},indent:function(N){var V=this.quill.getSelection(),L=this.quill.getFormat(V),M=parseInt(L.indent||0);if(N==="+1"||N==="-1"){var Z=N==="+1"?1:-1;L.direction==="rtl"&&(Z*=-1),this.quill.format("indent",M+Z,a.default.sources.USER)}},link:function(N){N===!0&&(N=prompt("Enter link URL:")),this.quill.format("link",N,a.default.sources.USER)},list:function(N){var V=this.quill.getSelection(),L=this.quill.getFormat(V);N==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",N,a.default.sources.USER)}}},r.default=w,r.addControls=I},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(28),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(l,g){s(this,p);var m=_(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,l));return m.label.innerHTML=g,m.container.classList.add("ql-color-picker"),[].slice.call(m.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(b){b.classList.add("ql-primary")}),m}return c(p,[{key:"buildItem",value:function(g){var m=f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"buildItem",this).call(this,g);return m.style.backgroundColor=g.getAttribute("value")||"",m}},{key:"selectItem",value:function(g,m){f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,g,m);var b=this.label.querySelector(".ql-color-label"),v=g&&g.getAttribute("data-value")||"";b&&(b.tagName==="line"?b.style.stroke=v:b.style.fill=v)}}]),p}(y.default);r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(28),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(l,g){s(this,p);var m=_(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,l));return m.container.classList.add("ql-icon-picker"),[].forEach.call(m.container.querySelectorAll(".ql-picker-item"),function(b){b.innerHTML=g[b.getAttribute("data-value")||""]}),m.defaultItem=m.container.querySelector(".ql-selected"),m.selectItem(m.defaultItem),m}return c(p,[{key:"selectItem",value:function(g,m){f(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,g,m),g=g||this.defaultItem,this.label.innerHTML=g.innerHTML}}]),p}(y.default);r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function y(u,s){for(var _=0;_<s.length;_++){var a=s[_];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}return function(u,s,_){return s&&y(u.prototype,s),_&&y(u,_),u}}();function f(y,u){if(!(y instanceof u))throw new TypeError("Cannot call a class as a function")}var x=function(){function y(u,s){var _=this;f(this,y),this.quill=u,this.boundsContainer=s||document.body,this.root=u.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){_.root.style.marginTop=-1*_.quill.root.scrollTop+"px"}),this.hide()}return c(y,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(s){var _=s.left+s.width/2-this.root.offsetWidth/2,a=s.bottom+this.quill.root.scrollTop;this.root.style.left=_+"px",this.root.style.top=a+"px",this.root.classList.remove("ql-flip");var h=this.boundsContainer.getBoundingClientRect(),d=this.root.getBoundingClientRect(),p=0;if(d.right>h.right&&(p=h.right-d.right,this.root.style.left=_+p+"px"),d.left<h.left&&(p=h.left-d.left,this.root.style.left=_+p+"px"),d.bottom>h.bottom){var l=d.bottom-d.top,g=s.bottom-s.top+l;this.root.style.top=a-g+"px",this.root.classList.add("ql-flip")}return p}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),y}();r.default=x},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function A(k,N){var V=[],L=!0,M=!1,Z=void 0;try{for(var G=k[Symbol.iterator](),J;!(L=(J=G.next()).done)&&(V.push(J.value),!(N&&V.length===N));L=!0);}catch(K){M=!0,Z=K}finally{try{!L&&G.return&&G.return()}finally{if(M)throw Z}}return V}return function(k,N){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return A(k,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function A(k,N,V){k===null&&(k=Function.prototype);var L=Object.getOwnPropertyDescriptor(k,N);if(L===void 0){var M=Object.getPrototypeOf(k);return M===null?void 0:A(M,N,V)}else{if("value"in L)return L.value;var Z=L.get;return Z===void 0?void 0:Z.call(V)}},x=function(){function A(k,N){for(var V=0;V<N.length;V++){var L=N[V];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(k,L.key,L)}}return function(k,N,V){return N&&A(k.prototype,N),V&&A(k,V),k}}(),y=o(3),u=b(y),s=o(8),_=b(s),a=o(43),h=b(a),d=o(27),p=b(d),l=o(15),g=o(41),m=b(g);function b(A){return A&&A.__esModule?A:{default:A}}function v(A,k){if(!(A instanceof k))throw new TypeError("Cannot call a class as a function")}function C(A,k){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:A}function B(A,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);A.prototype=Object.create(k&&k.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(A,k):A.__proto__=k)}var w=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],S=function(A){B(k,A);function k(N,V){v(this,k),V.modules.toolbar!=null&&V.modules.toolbar.container==null&&(V.modules.toolbar.container=w);var L=C(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,N,V));return L.quill.container.classList.add("ql-snow"),L}return x(k,[{key:"extendToolbar",value:function(V){V.container.classList.add("ql-snow"),this.buildButtons([].slice.call(V.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(V.container.querySelectorAll("select")),m.default),this.tooltip=new I(this.quill,this.options.bounds),V.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,M){V.handlers.link.call(V,!M.format.link)})}}]),k}(h.default);S.DEFAULTS=(0,u.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(k){if(k){var N=this.quill.getSelection();if(N==null||N.length==0)return;var V=this.quill.getText(N);/^\S+@\S+\.\S+$/.test(V)&&V.indexOf("mailto:")!==0&&(V="mailto:"+V);var L=this.quill.theme.tooltip;L.edit("link",V)}else this.quill.format("link",!1)}}}}});var I=function(A){B(k,A);function k(N,V){v(this,k);var L=C(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,N,V));return L.preview=L.root.querySelector("a.ql-preview"),L}return x(k,[{key:"listen",value:function(){var V=this;f(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){V.root.classList.contains("ql-editing")?V.save():V.edit("link",V.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(V.linkRange!=null){var M=V.linkRange;V.restoreFocus(),V.quill.formatText(M,"link",!1,_.default.sources.USER),delete V.linkRange}L.preventDefault(),V.hide()}),this.quill.on(_.default.events.SELECTION_CHANGE,function(L,M,Z){if(L!=null){if(L.length===0&&Z===_.default.sources.USER){var G=V.quill.scroll.descendant(p.default,L.index),J=c(G,2),K=J[0],F=J[1];if(K!=null){V.linkRange=new l.Range(L.index-F,K.length());var E=p.default.formats(K.domNode);V.preview.textContent=E,V.preview.setAttribute("href",E),V.show(),V.position(V.quill.getBounds(V.linkRange));return}}else delete V.linkRange;V.hide()}})}},{key:"show",value:function(){f(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),k}(a.BaseTooltip);I.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=S},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(29),f=ae(c),x=o(36),y=o(38),u=o(64),s=o(65),_=ae(s),a=o(66),h=ae(a),d=o(67),p=ae(d),l=o(37),g=o(26),m=o(39),b=o(40),v=o(56),C=ae(v),B=o(68),w=ae(B),S=o(27),I=ae(S),A=o(69),k=ae(A),N=o(70),V=ae(N),L=o(71),M=ae(L),Z=o(72),G=ae(Z),J=o(73),K=ae(J),F=o(13),E=ae(F),T=o(74),D=ae(T),P=o(75),X=ae(P),q=o(57),z=ae(q),R=o(41),$=ae(R),j=o(28),U=ae(j),Q=o(59),Y=ae(Q),ne=o(60),se=ae(ne),he=o(61),ce=ae(he),re=o(108),te=ae(re),ie=o(62),le=ae(ie);function ae(pe){return pe&&pe.__esModule?pe:{default:pe}}f.default.register({"attributors/attribute/direction":y.DirectionAttribute,"attributors/class/align":x.AlignClass,"attributors/class/background":l.BackgroundClass,"attributors/class/color":g.ColorClass,"attributors/class/direction":y.DirectionClass,"attributors/class/font":m.FontClass,"attributors/class/size":b.SizeClass,"attributors/style/align":x.AlignStyle,"attributors/style/background":l.BackgroundStyle,"attributors/style/color":g.ColorStyle,"attributors/style/direction":y.DirectionStyle,"attributors/style/font":m.FontStyle,"attributors/style/size":b.SizeStyle},!0),f.default.register({"formats/align":x.AlignClass,"formats/direction":y.DirectionClass,"formats/indent":u.IndentClass,"formats/background":l.BackgroundStyle,"formats/color":g.ColorStyle,"formats/font":m.FontClass,"formats/size":b.SizeClass,"formats/blockquote":_.default,"formats/code-block":E.default,"formats/header":h.default,"formats/list":p.default,"formats/bold":C.default,"formats/code":F.Code,"formats/italic":w.default,"formats/link":I.default,"formats/script":k.default,"formats/strike":V.default,"formats/underline":M.default,"formats/image":G.default,"formats/video":K.default,"formats/list/item":d.ListItem,"modules/formula":D.default,"modules/syntax":X.default,"modules/toolbar":z.default,"themes/bubble":te.default,"themes/snow":le.default,"ui/icons":$.default,"ui/picker":U.default,"ui/icon-picker":se.default,"ui/color-picker":Y.default,"ui/tooltip":ce.default},!0),r.default=f.default},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var c=function(){function p(l,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(l,b.key,b)}}return function(l,g,m){return g&&p(l.prototype,g),m&&p(l,m),l}}(),f=function p(l,g,m){l===null&&(l=Function.prototype);var b=Object.getOwnPropertyDescriptor(l,g);if(b===void 0){var v=Object.getPrototypeOf(l);return v===null?void 0:p(v,g,m)}else{if("value"in b)return b.value;var C=b.get;return C===void 0?void 0:C.call(m)}},x=o(0),y=u(x);function u(p){return p&&p.__esModule?p:{default:p}}function s(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function _(p,l){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:p}function a(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(p,l):p.__proto__=l)}var h=function(p){a(l,p);function l(){return s(this,l),_(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return c(l,[{key:"add",value:function(m,b){if(b==="+1"||b==="-1"){var v=this.value(m)||0;b=b==="+1"?v+1:v-1}return b===0?(this.remove(m),!0):f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"add",this).call(this,m,b)}},{key:"canAdd",value:function(m,b){return f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"canAdd",this).call(this,m,b)||f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"canAdd",this).call(this,m,parseInt(b))}},{key:"value",value:function(m){return parseInt(f(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"value",this).call(this,m))||void 0}}]),l}(y.default.Attributor.Class),d=new h("indent","ql-indent",{scope:y.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(4),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="blockquote",_.tagName="blockquote",r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function h(d,p){for(var l=0;l<p.length;l++){var g=p[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}return function(d,p,l){return p&&h(d.prototype,p),l&&h(d,l),d}}(),f=o(4),x=y(f);function y(h){return h&&h.__esModule?h:{default:h}}function u(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function s(h,d){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:h}function _(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);h.prototype=Object.create(d&&d.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(h,d):h.__proto__=d)}var a=function(h){_(d,h);function d(){return u(this,d),s(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return c(d,null,[{key:"formats",value:function(l){return this.tagName.indexOf(l.tagName)+1}}]),d}(x.default);a.blotName="header",a.tagName=["H1","H2","H3","H4","H5","H6"],r.default=a},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var c=function(){function v(C,B){for(var w=0;w<B.length;w++){var S=B[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(C,S.key,S)}}return function(C,B,w){return B&&v(C.prototype,B),w&&v(C,w),C}}(),f=function v(C,B,w){C===null&&(C=Function.prototype);var S=Object.getOwnPropertyDescriptor(C,B);if(S===void 0){var I=Object.getPrototypeOf(C);return I===null?void 0:v(I,B,w)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(w)}},x=o(0),y=h(x),u=o(4),s=h(u),_=o(25),a=h(_);function h(v){return v&&v.__esModule?v:{default:v}}function d(v,C,B){return C in v?Object.defineProperty(v,C,{value:B,enumerable:!0,configurable:!0,writable:!0}):v[C]=B,v}function p(v,C){if(!(v instanceof C))throw new TypeError("Cannot call a class as a function")}function l(v,C){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:v}function g(v,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);v.prototype=Object.create(C&&C.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(v,C):v.__proto__=C)}var m=function(v){g(C,v);function C(){return p(this,C),l(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return c(C,[{key:"format",value:function(w,S){w===b.blotName&&!S?this.replaceWith(y.default.create(this.statics.scope)):f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"format",this).call(this,w,S)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(w,S){return this.parent.isolate(this.offset(this.parent),this.length()),w===this.parent.statics.blotName?(this.parent.replaceWith(w,S),this):(this.parent.unwrap(),f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,w,S))}}],[{key:"formats",value:function(w){return w.tagName===this.tagName?void 0:f(C.__proto__||Object.getPrototypeOf(C),"formats",this).call(this,w)}}]),C}(s.default);m.blotName="list-item",m.tagName="LI";var b=function(v){g(C,v),c(C,null,[{key:"create",value:function(w){var S=w==="ordered"?"OL":"UL",I=f(C.__proto__||Object.getPrototypeOf(C),"create",this).call(this,S);return(w==="checked"||w==="unchecked")&&I.setAttribute("data-checked",w==="checked"),I}},{key:"formats",value:function(w){if(w.tagName==="OL")return"ordered";if(w.tagName==="UL")return w.hasAttribute("data-checked")?w.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function C(B){p(this,C);var w=l(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,B)),S=function(A){if(A.target.parentNode===B){var k=w.statics.formats(B),N=y.default.find(A.target);k==="checked"?N.format("list","unchecked"):k==="unchecked"&&N.format("list","checked")}};return B.addEventListener("touchstart",S),B.addEventListener("mousedown",S),w}return c(C,[{key:"format",value:function(w,S){this.children.length>0&&this.children.tail.format(w,S)}},{key:"formats",value:function(){return d({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(w,S){if(w instanceof m)f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,w,S);else{var I=S==null?this.length():S.offset(this),A=this.split(I);A.parent.insertBefore(w,A)}}},{key:"optimize",value:function(w){f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,w);var S=this.next;S!=null&&S.prev===this&&S.statics.blotName===this.statics.blotName&&S.domNode.tagName===this.domNode.tagName&&S.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(S.moveChildren(this),S.remove())}},{key:"replace",value:function(w){if(w.statics.blotName!==this.statics.blotName){var S=y.default.create(this.statics.defaultChild);w.moveChildren(S),this.appendChild(S)}f(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replace",this).call(this,w)}}]),C}(a.default);b.blotName="list",b.scope=y.default.Scope.BLOCK_BLOT,b.tagName=["OL","UL"],b.defaultChild="list-item",b.allowedChildren=[m],r.ListItem=m,r.default=b},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(56),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="italic",_.tagName=["EM","I"],r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(p,l){for(var g=0;g<l.length;g++){var m=l[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,l,g){return l&&d(p.prototype,l),g&&d(p,g),p}}(),f=function d(p,l,g){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,l);if(m===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:d(b,l,g)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(g)}},x=o(6),y=u(x);function u(d){return d&&d.__esModule?d:{default:d}}function s(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function _(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var h=function(d){a(p,d);function p(){return s(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return c(p,null,[{key:"create",value:function(g){return g==="super"?document.createElement("sup"):g==="sub"?document.createElement("sub"):f(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,g)}},{key:"formats",value:function(g){if(g.tagName==="SUB")return"sub";if(g.tagName==="SUP")return"super"}}]),p}(y.default);h.blotName="script",h.tagName=["SUB","SUP"],r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(6),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="strike",_.tagName="S",r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=o(6),f=x(c);function x(a){return a&&a.__esModule?a:{default:a}}function y(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")}function u(a,h){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:a}function s(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);a.prototype=Object.create(h&&h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(a,h):a.__proto__=h)}var _=function(a){s(h,a);function h(){return y(this,h),u(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(f.default);_.blotName="underline",_.tagName="U",r.default=_},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),f=function l(g,m,b){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,m);if(v===void 0){var C=Object.getPrototypeOf(g);return C===null?void 0:l(C,m,b)}else{if("value"in v)return v.value;var B=v.get;return B===void 0?void 0:B.call(b)}},x=o(0),y=s(x),u=o(27);function s(l){return l&&l.__esModule?l:{default:l}}function _(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}function a(l,g){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:l}function h(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);l.prototype=Object.create(g&&g.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(l,g):l.__proto__=g)}var d=["alt","height","width"],p=function(l){h(g,l);function g(){return _(this,g),a(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return c(g,[{key:"format",value:function(b,v){d.indexOf(b)>-1?v?this.domNode.setAttribute(b,v):this.domNode.removeAttribute(b):f(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,v)}}],[{key:"create",value:function(b){var v=f(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return typeof b=="string"&&v.setAttribute("src",this.sanitize(b)),v}},{key:"formats",value:function(b){return d.reduce(function(v,C){return b.hasAttribute(C)&&(v[C]=b.getAttribute(C)),v},{})}},{key:"match",value:function(b){return/\.(jpe?g|gif|png)$/.test(b)||/^data:image\/.+;base64/.test(b)}},{key:"sanitize",value:function(b){return(0,u.sanitize)(b,["http","https","data"])?b:"//:0"}},{key:"value",value:function(b){return b.getAttribute("src")}}]),g}(y.default.Embed);p.blotName="image",p.tagName="IMG",r.default=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function l(g,m){for(var b=0;b<m.length;b++){var v=m[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,m,b){return m&&l(g.prototype,m),b&&l(g,b),g}}(),f=function l(g,m,b){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,m);if(v===void 0){var C=Object.getPrototypeOf(g);return C===null?void 0:l(C,m,b)}else{if("value"in v)return v.value;var B=v.get;return B===void 0?void 0:B.call(b)}},x=o(4),y=o(27),u=s(y);function s(l){return l&&l.__esModule?l:{default:l}}function _(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}function a(l,g){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:l}function h(l,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);l.prototype=Object.create(g&&g.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(l,g):l.__proto__=g)}var d=["height","width"],p=function(l){h(g,l);function g(){return _(this,g),a(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return c(g,[{key:"format",value:function(b,v){d.indexOf(b)>-1?v?this.domNode.setAttribute(b,v):this.domNode.removeAttribute(b):f(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,v)}}],[{key:"create",value:function(b){var v=f(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return v.setAttribute("frameborder","0"),v.setAttribute("allowfullscreen",!0),v.setAttribute("src",this.sanitize(b)),v}},{key:"formats",value:function(b){return d.reduce(function(v,C){return b.hasAttribute(C)&&(v[C]=b.getAttribute(C)),v},{})}},{key:"sanitize",value:function(b){return u.default.sanitize(b)}},{key:"value",value:function(b){return b.getAttribute("src")}}]),g}(x.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",r.default=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var c=function(){function b(v,C){for(var B=0;B<C.length;B++){var w=C[B];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,C,B){return C&&b(v.prototype,C),B&&b(v,B),v}}(),f=function b(v,C,B){v===null&&(v=Function.prototype);var w=Object.getOwnPropertyDescriptor(v,C);if(w===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:b(S,C,B)}else{if("value"in w)return w.value;var I=w.get;return I===void 0?void 0:I.call(B)}},x=o(35),y=h(x),u=o(5),s=h(u),_=o(9),a=h(_);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function p(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function l(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var g=function(b){l(v,b);function v(){return d(this,v),p(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return c(v,null,[{key:"create",value:function(B){var w=f(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,B);return typeof B=="string"&&(window.katex.render(B,w,{throwOnError:!1,errorColor:"#f00"}),w.setAttribute("data-value",B)),w}},{key:"value",value:function(B){return B.getAttribute("data-value")}}]),v}(y.default);g.blotName="formula",g.className="ql-formula",g.tagName="SPAN";var m=function(b){l(v,b),c(v,null,[{key:"register",value:function(){s.default.register(g,!0)}}]);function v(){d(this,v);var C=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return C}return v}(a.default);r.FormulaBlot=g,r.default=m},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var c=function(){function B(w,S){for(var I=0;I<S.length;I++){var A=S[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,S,I){return S&&B(w.prototype,S),I&&B(w,I),w}}(),f=function B(w,S,I){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,S);if(A===void 0){var k=Object.getPrototypeOf(w);return k===null?void 0:B(k,S,I)}else{if("value"in A)return A.value;var N=A.get;return N===void 0?void 0:N.call(I)}},x=o(0),y=p(x),u=o(5),s=p(u),_=o(9),a=p(_),h=o(13),d=p(h);function p(B){return B&&B.__esModule?B:{default:B}}function l(B,w){if(!(B instanceof w))throw new TypeError("Cannot call a class as a function")}function g(B,w){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:B}function m(B,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);B.prototype=Object.create(w&&w.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(B,w):B.__proto__=w)}var b=function(B){m(w,B);function w(){return l(this,w),g(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return c(w,[{key:"replaceWith",value:function(I){this.domNode.textContent=this.domNode.textContent,this.attach(),f(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"replaceWith",this).call(this,I)}},{key:"highlight",value:function(I){var A=this.domNode.textContent;this.cachedText!==A&&((A.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=I(A),this.domNode.normalize(),this.attach()),this.cachedText=A)}}]),w}(d.default);b.className="ql-syntax";var v=new y.default.Attributor.Class("token","hljs",{scope:y.default.Scope.INLINE}),C=function(B){m(w,B),c(w,null,[{key:"register",value:function(){s.default.register(v,!0),s.default.register(b,!0)}}]);function w(S,I){l(this,w);var A=g(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));if(typeof A.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var k=null;return A.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(k),k=setTimeout(function(){A.highlight(),k=null},A.options.interval)}),A.highlight(),A}return c(w,[{key:"highlight",value:function(){var I=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var A=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(k){k.highlight(I.options.highlight)}),this.quill.update(s.default.sources.SILENT),A!=null&&this.quill.setSelection(A,s.default.sources.SILENT)}}}]),w}(a.default);C.DEFAULTS={highlight:function(){return window.hljs==null?null:function(B){var w=window.hljs.highlightAuto(B);return w.value}}(),interval:1e3},r.CodeBlock=b,r.CodeToken=v,r.default=C},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var c=function w(S,I,A){S===null&&(S=Function.prototype);var k=Object.getOwnPropertyDescriptor(S,I);if(k===void 0){var N=Object.getPrototypeOf(S);return N===null?void 0:w(N,I,A)}else{if("value"in k)return k.value;var V=k.get;return V===void 0?void 0:V.call(A)}},f=function(){function w(S,I){for(var A=0;A<I.length;A++){var k=I[A];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}return function(S,I,A){return I&&w(S.prototype,I),A&&w(S,A),S}}(),x=o(3),y=l(x),u=o(8),s=l(u),_=o(43),a=l(_),h=o(15),d=o(41),p=l(d);function l(w){return w&&w.__esModule?w:{default:w}}function g(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function m(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function b(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var v=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],C=function(w){b(S,w);function S(I,A){g(this,S),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=v);var k=m(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I,A));return k.quill.container.classList.add("ql-bubble"),k}return f(S,[{key:"extendToolbar",value:function(A){this.tooltip=new B(this.quill,this.options.bounds),this.tooltip.root.appendChild(A.container),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),p.default)}}]),S}(a.default);C.DEFAULTS=(0,y.default)(!0,{},a.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(S){S?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var B=function(w){b(S,w);function S(I,A){g(this,S);var k=m(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I,A));return k.quill.on(s.default.events.EDITOR_CHANGE,function(N,V,L,M){if(N===s.default.events.SELECTION_CHANGE)if(V!=null&&V.length>0&&M===s.default.sources.USER){k.show(),k.root.style.left="0px",k.root.style.width="",k.root.style.width=k.root.offsetWidth+"px";var Z=k.quill.getLines(V.index,V.length);if(Z.length===1)k.position(k.quill.getBounds(V));else{var G=Z[Z.length-1],J=k.quill.getIndex(G),K=Math.min(G.length()-1,V.index+V.length-J),F=k.quill.getBounds(new h.Range(J,K));k.position(F)}}else document.activeElement!==k.textbox&&k.quill.hasFocus()&&k.hide()}),k}return f(S,[{key:"listen",value:function(){var A=this;c(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){A.root.classList.remove("ql-editing")}),this.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!A.root.classList.contains("ql-hidden")){var k=A.quill.getSelection();k!=null&&A.position(A.quill.getBounds(k))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var k=c(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"position",this).call(this,A),N=this.root.querySelector(".ql-tooltip-arrow");if(N.style.marginLeft="",k===0)return k;N.style.marginLeft=-1*k-N.offsetWidth/2+"px"}}]),S}(_.BaseTooltip);B.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=B,r.default=C},function(n,r,o){n.exports=o(63)}]).default})})(di);var ku=di.exports;const Lr=Dr(ku);var ut=-1,rt=1,Xe=0;function gn(t,i,n,r){if(t===i)return t?[[Xe,t]]:[];if(n!=null){var o=Su(t,i,n);if(o)return o}var c=Fr(t,i),f=t.substring(0,c);t=t.substring(c),i=i.substring(c),c=Rr(t,i);var x=t.substring(t.length-c);t=t.substring(0,t.length-c),i=i.substring(0,i.length-c);var y=wu(t,i);return f&&y.unshift([Xe,f]),x&&y.push([Xe,x]),fi(y,r),y}function wu(t,i){var n;if(!t)return[[rt,i]];if(!i)return[[ut,t]];var r=t.length>i.length?t:i,o=t.length>i.length?i:t,c=r.indexOf(o);if(c!==-1)return n=[[rt,r.substring(0,c)],[Xe,o],[rt,r.substring(c+o.length)]],t.length>i.length&&(n[0][0]=n[2][0]=ut),n;if(o.length===1)return[[ut,t],[rt,i]];var f=Au(t,i);if(f){var x=f[0],y=f[1],u=f[2],s=f[3],_=f[4],a=gn(x,u),h=gn(y,s);return a.concat([[Xe,_]],h)}return Nu(t,i)}function Nu(t,i){for(var n=t.length,r=i.length,o=Math.ceil((n+r)/2),c=o,f=2*o,x=new Array(f),y=new Array(f),u=0;u<f;u++)x[u]=-1,y[u]=-1;x[c+1]=0,y[c+1]=0;for(var s=n-r,_=s%2!==0,a=0,h=0,d=0,p=0,l=0;l<o;l++){for(var g=-l+a;g<=l-h;g+=2){var m=c+g,b;g===-l||g!==l&&x[m-1]<x[m+1]?b=x[m+1]:b=x[m-1]+1;for(var v=b-g;b<n&&v<r&&t.charAt(b)===i.charAt(v);)b++,v++;if(x[m]=b,b>n)h+=2;else if(v>r)a+=2;else if(_){var C=c+s-g;if(C>=0&&C<f&&y[C]!==-1){var B=n-y[C];if(b>=B)return ui(t,i,b,v)}}}for(var w=-l+d;w<=l-p;w+=2){var C=c+w,B;w===-l||w!==l&&y[C-1]<y[C+1]?B=y[C+1]:B=y[C-1]+1;for(var S=B-w;B<n&&S<r&&t.charAt(n-B-1)===i.charAt(r-S-1);)B++,S++;if(y[C]=B,B>n)p+=2;else if(S>r)d+=2;else if(!_){var m=c+s-w;if(m>=0&&m<f&&x[m]!==-1){var b=x[m],v=c+b-m;if(B=n-B,b>=B)return ui(t,i,b,v)}}}}return[[ut,t],[rt,i]]}function ui(t,i,n,r){var o=t.substring(0,n),c=i.substring(0,r),f=t.substring(n),x=i.substring(r),y=gn(o,c),u=gn(f,x);return y.concat(u)}function Fr(t,i){if(!t||!i||t.charAt(0)!==i.charAt(0))return 0;for(var n=0,r=Math.min(t.length,i.length),o=r,c=0;n<o;)t.substring(c,o)==i.substring(c,o)?(n=o,c=n):r=o,o=Math.floor((r-n)/2+n);return hi(t.charCodeAt(o-1))&&o--,o}function Rr(t,i){if(!t||!i||t.slice(-1)!==i.slice(-1))return 0;for(var n=0,r=Math.min(t.length,i.length),o=r,c=0;n<o;)t.substring(t.length-o,t.length-c)==i.substring(i.length-o,i.length-c)?(n=o,c=n):r=o,o=Math.floor((r-n)/2+n);return pi(t.charCodeAt(t.length-o))&&o--,o}function Au(t,i){var n=t.length>i.length?t:i,r=t.length>i.length?i:t;if(n.length<4||r.length*2<n.length)return null;function o(h,d,p){for(var l=h.substring(p,p+Math.floor(h.length/4)),g=-1,m="",b,v,C,B;(g=d.indexOf(l,g+1))!==-1;){var w=Fr(h.substring(p),d.substring(g)),S=Rr(h.substring(0,p),d.substring(0,g));m.length<S+w&&(m=d.substring(g-S,g)+d.substring(g,g+w),b=h.substring(0,p-S),v=h.substring(p+w),C=d.substring(0,g-S),B=d.substring(g+w))}return m.length*2>=h.length?[b,v,C,B,m]:null}var c=o(n,r,Math.ceil(n.length/4)),f=o(n,r,Math.ceil(n.length/2)),x;if(!c&&!f)return null;f?c?x=c[4].length>f[4].length?c:f:x=f:x=c;var y,u,s,_;t.length>i.length?(y=x[0],u=x[1],s=x[2],_=x[3]):(s=x[0],_=x[1],y=x[2],u=x[3]);var a=x[4];return[y,u,s,_,a]}function fi(t,i){t.push([Xe,""]);for(var n=0,r=0,o=0,c="",f="",x;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case rt:o++,f+=t[n][1],n++;break;case ut:r++,c+=t[n][1],n++;break;case Xe:var y=n-o-r-1;if(i){if(y>=0&&gi(t[y][1])){var u=t[y][1].slice(-1);if(t[y][1]=t[y][1].slice(0,-1),c=u+c,f=u+f,!t[y][1]){t.splice(y,1),n--;var s=y-1;t[s]&&t[s][0]===rt&&(o++,f=t[s][1]+f,s--),t[s]&&t[s][0]===ut&&(r++,c=t[s][1]+c,s--),y=s}}if(mi(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),c+=u,f+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(c.length>0||f.length>0){c.length>0&&f.length>0&&(x=Fr(f,c),x!==0&&(y>=0?t[y][1]+=f.substring(0,x):(t.splice(0,0,[Xe,f.substring(0,x)]),n++),f=f.substring(x),c=c.substring(x)),x=Rr(f,c),x!==0&&(t[n][1]=f.substring(f.length-x)+t[n][1],f=f.substring(0,f.length-x),c=c.substring(0,c.length-x)));var _=o+r;c.length===0&&f.length===0?(t.splice(n-_,_),n=n-_):c.length===0?(t.splice(n-_,_,[rt,f]),n=n-_+1):f.length===0?(t.splice(n-_,_,[ut,c]),n=n-_+1):(t.splice(n-_,_,[ut,c],[rt,f]),n=n-_+2)}n!==0&&t[n-1][0]===Xe?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,c="",f="";break}}t[t.length-1][1]===""&&t.pop();var a=!1;for(n=1;n<t.length-1;)t[n-1][0]===Xe&&t[n+1][0]===Xe&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),a=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),a=!0)),n++;a&&fi(t,i)}function hi(t){return t>=55296&&t<=56319}function pi(t){return t>=56320&&t<=57343}function mi(t){return pi(t.charCodeAt(0))}function gi(t){return hi(t.charCodeAt(t.length-1))}function Bu(t){for(var i=[],n=0;n<t.length;n++)t[n][1].length>0&&i.push(t[n]);return i}function Pr(t,i,n,r){return gi(t)||mi(r)?null:Bu([[Xe,t],[ut,i],[rt,n],[Xe,r]])}function Su(t,i,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,o=typeof n=="number"?null:n.newRange,c=t.length,f=i.length;if(r.length===0&&(o===null||o.length===0)){var x=r.index,y=t.slice(0,x),u=t.slice(x),s=o?o.index:null;e:{var _=x+f-c;if(s!==null&&s!==_||_<0||_>f)break e;var a=i.slice(0,_),h=i.slice(_);if(h!==u)break e;var d=Math.min(x,_),p=y.slice(0,d),l=a.slice(0,d);if(p!==l)break e;var g=y.slice(d),m=a.slice(d);return Pr(p,g,m,u)}e:{if(s!==null&&s!==x)break e;var b=x,a=i.slice(0,b),h=i.slice(b);if(a!==y)break e;var v=Math.min(c-b,f-b),C=u.slice(u.length-v),B=h.slice(h.length-v);if(C!==B)break e;var g=u.slice(0,u.length-v),m=h.slice(0,h.length-v);return Pr(y,g,m,C)}}if(r.length>0&&o&&o.length===0)e:{var p=t.slice(0,r.index),C=t.slice(r.index+r.length),d=p.length,v=C.length;if(f<d+v)break e;var l=i.slice(0,d),B=i.slice(f-v);if(p!==l||C!==B)break e;var g=t.slice(d,c-v),m=i.slice(d,f-v);return Pr(p,g,m,C)}return null}function Zn(t,i,n){return gn(t,i,n,!0)}Zn.INSERT=rt,Zn.DELETE=ut,Zn.EQUAL=Xe;var Ou=Zn,Gn={exports:{}};Gn.exports,function(t,i){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,c="[object Arguments]",f="[object Array]",x="[object Boolean]",y="[object Date]",u="[object Error]",s="[object Function]",_="[object GeneratorFunction]",a="[object Map]",h="[object Number]",d="[object Object]",p="[object Promise]",l="[object RegExp]",g="[object Set]",m="[object String]",b="[object Symbol]",v="[object WeakMap]",C="[object ArrayBuffer]",B="[object DataView]",w="[object Float32Array]",S="[object Float64Array]",I="[object Int8Array]",A="[object Int16Array]",k="[object Int32Array]",N="[object Uint8Array]",V="[object Uint8ClampedArray]",L="[object Uint16Array]",M="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,G=/\w*$/,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,F={};F[c]=F[f]=F[C]=F[B]=F[x]=F[y]=F[w]=F[S]=F[I]=F[A]=F[k]=F[a]=F[h]=F[d]=F[l]=F[g]=F[m]=F[b]=F[N]=F[V]=F[L]=F[M]=!0,F[u]=F[s]=F[v]=!1;var E=typeof ue=="object"&&ue&&ue.Object===Object&&ue,T=typeof self=="object"&&self&&self.Object===Object&&self,D=E||T||Function("return this")(),P=i&&!i.nodeType&&i,X=P&&!0&&t&&!t.nodeType&&t,q=X&&X.exports===P;function z(O,H){return O.set(H[0],H[1]),O}function R(O,H){return O.add(H),O}function $(O,H){for(var W=-1,oe=O?O.length:0;++W<oe&&H(O[W],W,O)!==!1;);return O}function j(O,H){for(var W=-1,oe=H.length,ge=O.length;++W<oe;)O[ge+W]=H[W];return O}function U(O,H,W,oe){var ge=-1,de=O?O.length:0;for(oe&&de&&(W=O[++ge]);++ge<de;)W=H(W,O[ge],ge,O);return W}function Q(O,H){for(var W=-1,oe=Array(O);++W<O;)oe[W]=H(W);return oe}function Y(O,H){return O==null?void 0:O[H]}function ne(O){var H=!1;if(O!=null&&typeof O.toString!="function")try{H=!!(O+"")}catch{}return H}function se(O){var H=-1,W=Array(O.size);return O.forEach(function(oe,ge){W[++H]=[ge,oe]}),W}function he(O,H){return function(W){return O(H(W))}}function ce(O){var H=-1,W=Array(O.size);return O.forEach(function(oe){W[++H]=oe}),W}var re=Array.prototype,te=Function.prototype,ie=Object.prototype,le=D["__core-js_shared__"],ae=function(){var O=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""}(),pe=te.toString,fe=ie.hasOwnProperty,me=ie.toString,Ae=RegExp("^"+pe.call(fe).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=q?D.Buffer:void 0,Ee=D.Symbol,ht=D.Uint8Array,ve=he(Object.getPrototypeOf,Object),Oe=Object.create,pt=ie.propertyIsEnumerable,kn=re.splice,St=Object.getOwnPropertySymbols,Ct=Be?Be.isBuffer:void 0,nn=he(Object.keys,Object),Ot=lt(D,"DataView"),mt=lt(D,"Map"),We=lt(D,"Promise"),Et=lt(D,"Set"),Ht=lt(D,"WeakMap"),gt=lt(Object,"create"),Ut=He(Ot),kt=He(mt),zt=He(We),It=He(Et),Xt=He(Ht),yt=Ee?Ee.prototype:void 0,Kt=yt?yt.valueOf:void 0;function it(O){var H=-1,W=O?O.length:0;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function rn(){this.__data__=gt?gt(null):{}}function Le(O){return this.has(O)&&delete this.__data__[O]}function Ye(O){var H=this.__data__;if(gt){var W=H[O];return W===r?void 0:W}return fe.call(H,O)?H[O]:void 0}function Qt(O){var H=this.__data__;return gt?H[O]!==void 0:fe.call(H,O)}function Zt(O,H){var W=this.__data__;return W[O]=gt&&H===void 0?r:H,this}it.prototype.clear=rn,it.prototype.delete=Le,it.prototype.get=Ye,it.prototype.has=Qt,it.prototype.set=Zt;function Fe(O){var H=-1,W=O?O.length:0;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function To(){this.__data__=[]}function Vo(O){var H=this.__data__,W=an(H,O);if(W<0)return!1;var oe=H.length-1;return W==oe?H.pop():kn.call(H,W,1),!0}function Do(O){var H=this.__data__,W=an(H,O);return W<0?void 0:H[W][1]}function Lo(O){return an(this.__data__,O)>-1}function Fo(O,H){var W=this.__data__,oe=an(W,O);return oe<0?W.push([O,H]):W[oe][1]=H,this}Fe.prototype.clear=To,Fe.prototype.delete=Vo,Fe.prototype.get=Do,Fe.prototype.has=Lo,Fe.prototype.set=Fo;function Me(O){var H=-1,W=O?O.length:0;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function Ro(){this.__data__={hash:new it,map:new(mt||Fe),string:new it}}function Po(O){return Wt(this,O).delete(O)}function Mo(O){return Wt(this,O).get(O)}function qo(O){return Wt(this,O).has(O)}function $o(O,H){return Wt(this,O).set(O,H),this}Me.prototype.clear=Ro,Me.prototype.delete=Po,Me.prototype.get=Mo,Me.prototype.has=qo,Me.prototype.set=$o;function Ke(O){this.__data__=new Fe(O)}function jo(){this.__data__=new Fe}function Ho(O){return this.__data__.delete(O)}function Uo(O){return this.__data__.get(O)}function zo(O){return this.__data__.has(O)}function Xo(O,H){var W=this.__data__;if(W instanceof Fe){var oe=W.__data__;if(!mt||oe.length<n-1)return oe.push([O,H]),this;W=this.__data__=new Me(oe)}return W.set(O,H),this}Ke.prototype.clear=jo,Ke.prototype.delete=Ho,Ke.prototype.get=Uo,Ke.prototype.has=zo,Ke.prototype.set=Xo;function on(O,H){var W=Bn(O)||sn(O)?Q(O.length,String):[],oe=W.length,ge=!!oe;for(var de in O)(H||fe.call(O,de))&&!(ge&&(de=="length"||ia(de,oe)))&&W.push(de);return W}function ar(O,H,W){var oe=O[H];(!(fe.call(O,H)&&dr(oe,W))||W===void 0&&!(H in O))&&(O[H]=W)}function an(O,H){for(var W=O.length;W--;)if(dr(O[W][0],H))return W;return-1}function xt(O,H){return O&&An(H,On(H),O)}function wn(O,H,W,oe,ge,de,be){var Ce;if(oe&&(Ce=de?oe(O,ge,de,be):oe(O)),Ce!==void 0)return Ce;if(!_t(O))return O;var Ie=Bn(O);if(Ie){if(Ce=oa(O),!H)return ta(O,Ce)}else{var ke=Nt(O),qe=ke==s||ke==_;if(ur(O))return ln(O,H);if(ke==d||ke==c||qe&&!de){if(ne(O))return de?O:{};if(Ce=vt(qe?{}:O),!H)return na(O,xt(Ce,O))}else{if(!F[ke])return de?O:{};Ce=aa(O,ke,wn,H)}}be||(be=new Ke);var Qe=be.get(O);if(Qe)return Qe;if(be.set(O,Ce),!Ie)var Te=W?ra(O):On(O);return $(Te||O,function($e,Re){Te&&(Re=$e,$e=O[Re]),ar(Ce,Re,wn($e,H,W,oe,Re,O,be))}),Ce}function Ko(O){return _t(O)?Oe(O):{}}function Qo(O,H,W){var oe=H(O);return Bn(O)?oe:j(oe,W(O))}function Zo(O){return me.call(O)}function Go(O){if(!_t(O)||sa(O))return!1;var H=Sn(O)||ne(O)?Ae:J;return H.test(He(O))}function Wo(O){if(!sr(O))return nn(O);var H=[];for(var W in Object(O))fe.call(O,W)&&W!="constructor"&&H.push(W);return H}function ln(O,H){if(H)return O.slice();var W=new O.constructor(O.length);return O.copy(W),W}function Nn(O){var H=new O.constructor(O.byteLength);return new ht(H).set(new ht(O)),H}function Gt(O,H){var W=H?Nn(O.buffer):O.buffer;return new O.constructor(W,O.byteOffset,O.byteLength)}function ir(O,H,W){var oe=H?W(se(O),!0):se(O);return U(oe,z,new O.constructor)}function lr(O){var H=new O.constructor(O.source,G.exec(O));return H.lastIndex=O.lastIndex,H}function Jo(O,H,W){var oe=H?W(ce(O),!0):ce(O);return U(oe,R,new O.constructor)}function Yo(O){return Kt?Object(Kt.call(O)):{}}function ea(O,H){var W=H?Nn(O.buffer):O.buffer;return new O.constructor(W,O.byteOffset,O.length)}function ta(O,H){var W=-1,oe=O.length;for(H||(H=Array(oe));++W<oe;)H[W]=O[W];return H}function An(O,H,W,oe){W||(W={});for(var ge=-1,de=H.length;++ge<de;){var be=H[ge],Ce=oe?oe(W[be],O[be],be,W,O):void 0;ar(W,be,Ce===void 0?O[be]:Ce)}return W}function na(O,H){return An(O,wt(O),H)}function ra(O){return Qo(O,On,wt)}function Wt(O,H){var W=O.__data__;return la(H)?W[typeof H=="string"?"string":"hash"]:W.map}function lt(O,H){var W=Y(O,H);return Go(W)?W:void 0}var wt=St?he(St,Object):da,Nt=Zo;(Ot&&Nt(new Ot(new ArrayBuffer(1)))!=B||mt&&Nt(new mt)!=a||We&&Nt(We.resolve())!=p||Et&&Nt(new Et)!=g||Ht&&Nt(new Ht)!=v)&&(Nt=function(O){var H=me.call(O),W=H==d?O.constructor:void 0,oe=W?He(W):void 0;if(oe)switch(oe){case Ut:return B;case kt:return a;case zt:return p;case It:return g;case Xt:return v}return H});function oa(O){var H=O.length,W=O.constructor(H);return H&&typeof O[0]=="string"&&fe.call(O,"index")&&(W.index=O.index,W.input=O.input),W}function vt(O){return typeof O.constructor=="function"&&!sr(O)?Ko(ve(O)):{}}function aa(O,H,W,oe){var ge=O.constructor;switch(H){case C:return Nn(O);case x:case y:return new ge(+O);case B:return Gt(O,oe);case w:case S:case I:case A:case k:case N:case V:case L:case M:return ea(O,oe);case a:return ir(O,oe,W);case h:case m:return new ge(O);case l:return lr(O);case g:return Jo(O,oe,W);case b:return Yo(O)}}function ia(O,H){return H=H??o,!!H&&(typeof O=="number"||K.test(O))&&O>-1&&O%1==0&&O<H}function la(O){var H=typeof O;return H=="string"||H=="number"||H=="symbol"||H=="boolean"?O!=="__proto__":O===null}function sa(O){return!!ae&&ae in O}function sr(O){var H=O&&O.constructor,W=typeof H=="function"&&H.prototype||ie;return O===W}function He(O){if(O!=null){try{return pe.call(O)}catch{}try{return O+""}catch{}}return""}function cr(O){return wn(O,!0,!0)}function dr(O,H){return O===H||O!==O&&H!==H}function sn(O){return ca(O)&&fe.call(O,"callee")&&(!pt.call(O,"callee")||me.call(O)==c)}var Bn=Array.isArray;function cn(O){return O!=null&&fr(O.length)&&!Sn(O)}function ca(O){return hr(O)&&cn(O)}var ur=Ct||ua;function Sn(O){var H=_t(O)?me.call(O):"";return H==s||H==_}function fr(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=o}function _t(O){var H=typeof O;return!!O&&(H=="object"||H=="function")}function hr(O){return!!O&&typeof O=="object"}function On(O){return cn(O)?on(O):Wo(O)}function da(){return[]}function ua(){return!1}t.exports=cr}(Gn,Gn.exports);var yi=Gn.exports,Wn={exports:{}};Wn.exports,function(t,i){var n=200,r="__lodash_hash_undefined__",o=1,c=2,f=9007199254740991,x="[object Arguments]",y="[object Array]",u="[object AsyncFunction]",s="[object Boolean]",_="[object Date]",a="[object Error]",h="[object Function]",d="[object GeneratorFunction]",p="[object Map]",l="[object Number]",g="[object Null]",m="[object Object]",b="[object Promise]",v="[object Proxy]",C="[object RegExp]",B="[object Set]",w="[object String]",S="[object Symbol]",I="[object Undefined]",A="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",V="[object Float32Array]",L="[object Float64Array]",M="[object Int8Array]",Z="[object Int16Array]",G="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",F="[object Uint16Array]",E="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,X={};X[V]=X[L]=X[M]=X[Z]=X[G]=X[J]=X[K]=X[F]=X[E]=!0,X[x]=X[y]=X[k]=X[s]=X[N]=X[_]=X[a]=X[h]=X[p]=X[l]=X[m]=X[C]=X[B]=X[w]=X[A]=!1;var q=typeof ue=="object"&&ue&&ue.Object===Object&&ue,z=typeof self=="object"&&self&&self.Object===Object&&self,R=q||z||Function("return this")(),$=i&&!i.nodeType&&i,j=$&&!0&&t&&!t.nodeType&&t,U=j&&j.exports===$,Q=U&&q.process,Y=function(){try{return Q&&Q.binding&&Q.binding("util")}catch{}}(),ne=Y&&Y.isTypedArray;function se(O,H){for(var W=-1,oe=O==null?0:O.length,ge=0,de=[];++W<oe;){var be=O[W];H(be,W,O)&&(de[ge++]=be)}return de}function he(O,H){for(var W=-1,oe=H.length,ge=O.length;++W<oe;)O[ge+W]=H[W];return O}function ce(O,H){for(var W=-1,oe=O==null?0:O.length;++W<oe;)if(H(O[W],W,O))return!0;return!1}function re(O,H){for(var W=-1,oe=Array(O);++W<O;)oe[W]=H(W);return oe}function te(O){return function(H){return O(H)}}function ie(O,H){return O.has(H)}function le(O,H){return O==null?void 0:O[H]}function ae(O){var H=-1,W=Array(O.size);return O.forEach(function(oe,ge){W[++H]=[ge,oe]}),W}function pe(O,H){return function(W){return O(H(W))}}function fe(O){var H=-1,W=Array(O.size);return O.forEach(function(oe){W[++H]=oe}),W}var me=Array.prototype,Ae=Function.prototype,Be=Object.prototype,Ee=R["__core-js_shared__"],ht=Ae.toString,ve=Be.hasOwnProperty,Oe=function(){var O=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""}(),pt=Be.toString,kn=RegExp("^"+ht.call(ve).replace(T,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),St=U?R.Buffer:void 0,Ct=R.Symbol,nn=R.Uint8Array,Ot=Be.propertyIsEnumerable,mt=me.splice,We=Ct?Ct.toStringTag:void 0,Et=Object.getOwnPropertySymbols,Ht=St?St.isBuffer:void 0,gt=pe(Object.keys,Object),Ut=wt(R,"DataView"),kt=wt(R,"Map"),zt=wt(R,"Promise"),It=wt(R,"Set"),Xt=wt(R,"WeakMap"),yt=wt(Object,"create"),Kt=He(Ut),it=He(kt),rn=He(zt),Le=He(It),Ye=He(Xt),Qt=Ct?Ct.prototype:void 0,Zt=Qt?Qt.valueOf:void 0;function Fe(O){var H=-1,W=O==null?0:O.length;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function To(){this.__data__=yt?yt(null):{},this.size=0}function Vo(O){var H=this.has(O)&&delete this.__data__[O];return this.size-=H?1:0,H}function Do(O){var H=this.__data__;if(yt){var W=H[O];return W===r?void 0:W}return ve.call(H,O)?H[O]:void 0}function Lo(O){var H=this.__data__;return yt?H[O]!==void 0:ve.call(H,O)}function Fo(O,H){var W=this.__data__;return this.size+=this.has(O)?0:1,W[O]=yt&&H===void 0?r:H,this}Fe.prototype.clear=To,Fe.prototype.delete=Vo,Fe.prototype.get=Do,Fe.prototype.has=Lo,Fe.prototype.set=Fo;function Me(O){var H=-1,W=O==null?0:O.length;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function Ro(){this.__data__=[],this.size=0}function Po(O){var H=this.__data__,W=ln(H,O);if(W<0)return!1;var oe=H.length-1;return W==oe?H.pop():mt.call(H,W,1),--this.size,!0}function Mo(O){var H=this.__data__,W=ln(H,O);return W<0?void 0:H[W][1]}function qo(O){return ln(this.__data__,O)>-1}function $o(O,H){var W=this.__data__,oe=ln(W,O);return oe<0?(++this.size,W.push([O,H])):W[oe][1]=H,this}Me.prototype.clear=Ro,Me.prototype.delete=Po,Me.prototype.get=Mo,Me.prototype.has=qo,Me.prototype.set=$o;function Ke(O){var H=-1,W=O==null?0:O.length;for(this.clear();++H<W;){var oe=O[H];this.set(oe[0],oe[1])}}function jo(){this.size=0,this.__data__={hash:new Fe,map:new(kt||Me),string:new Fe}}function Ho(O){var H=lt(this,O).delete(O);return this.size-=H?1:0,H}function Uo(O){return lt(this,O).get(O)}function zo(O){return lt(this,O).has(O)}function Xo(O,H){var W=lt(this,O),oe=W.size;return W.set(O,H),this.size+=W.size==oe?0:1,this}Ke.prototype.clear=jo,Ke.prototype.delete=Ho,Ke.prototype.get=Uo,Ke.prototype.has=zo,Ke.prototype.set=Xo;function on(O){var H=-1,W=O==null?0:O.length;for(this.__data__=new Ke;++H<W;)this.add(O[H])}function ar(O){return this.__data__.set(O,r),this}function an(O){return this.__data__.has(O)}on.prototype.add=on.prototype.push=ar,on.prototype.has=an;function xt(O){var H=this.__data__=new Me(O);this.size=H.size}function wn(){this.__data__=new Me,this.size=0}function Ko(O){var H=this.__data__,W=H.delete(O);return this.size=H.size,W}function Qo(O){return this.__data__.get(O)}function Zo(O){return this.__data__.has(O)}function Go(O,H){var W=this.__data__;if(W instanceof Me){var oe=W.__data__;if(!kt||oe.length<n-1)return oe.push([O,H]),this.size=++W.size,this;W=this.__data__=new Ke(oe)}return W.set(O,H),this.size=W.size,this}xt.prototype.clear=wn,xt.prototype.delete=Ko,xt.prototype.get=Qo,xt.prototype.has=Zo,xt.prototype.set=Go;function Wo(O,H){var W=sn(O),oe=!W&&dr(O),ge=!W&&!oe&&cn(O),de=!W&&!oe&&!ge&&hr(O),be=W||oe||ge||de,Ce=be?re(O.length,String):[],Ie=Ce.length;for(var ke in O)(H||ve.call(O,ke))&&!(be&&(ke=="length"||ge&&(ke=="offset"||ke=="parent")||de&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||aa(ke,Ie)))&&Ce.push(ke);return Ce}function ln(O,H){for(var W=O.length;W--;)if(cr(O[W][0],H))return W;return-1}function Nn(O,H,W){var oe=H(O);return sn(O)?oe:he(oe,W(O))}function Gt(O){return O==null?O===void 0?I:g:We&&We in Object(O)?Nt(O):sr(O)}function ir(O){return _t(O)&&Gt(O)==x}function lr(O,H,W,oe,ge){return O===H?!0:O==null||H==null||!_t(O)&&!_t(H)?O!==O&&H!==H:Jo(O,H,W,oe,lr,ge)}function Jo(O,H,W,oe,ge,de){var be=sn(O),Ce=sn(H),Ie=be?y:vt(O),ke=Ce?y:vt(H);Ie=Ie==x?m:Ie,ke=ke==x?m:ke;var qe=Ie==m,Qe=ke==m,Te=Ie==ke;if(Te&&cn(O)){if(!cn(H))return!1;be=!0,qe=!1}if(Te&&!qe)return de||(de=new xt),be||hr(O)?An(O,H,W,oe,ge,de):na(O,H,Ie,W,oe,ge,de);if(!(W&o)){var $e=qe&&ve.call(O,"__wrapped__"),Re=Qe&&ve.call(H,"__wrapped__");if($e||Re){var Tt=$e?O.value():O,At=Re?H.value():H;return de||(de=new xt),ge(Tt,At,W,oe,de)}}return Te?(de||(de=new xt),ra(O,H,W,oe,ge,de)):!1}function Yo(O){if(!fr(O)||la(O))return!1;var H=ur(O)?kn:D;return H.test(He(O))}function ea(O){return _t(O)&&Sn(O.length)&&!!X[Gt(O)]}function ta(O){if(!sa(O))return gt(O);var H=[];for(var W in Object(O))ve.call(O,W)&&W!="constructor"&&H.push(W);return H}function An(O,H,W,oe,ge,de){var be=W&o,Ce=O.length,Ie=H.length;if(Ce!=Ie&&!(be&&Ie>Ce))return!1;var ke=de.get(O);if(ke&&de.get(H))return ke==H;var qe=-1,Qe=!0,Te=W&c?new on:void 0;for(de.set(O,H),de.set(H,O);++qe<Ce;){var $e=O[qe],Re=H[qe];if(oe)var Tt=be?oe(Re,$e,qe,H,O,de):oe($e,Re,qe,O,H,de);if(Tt!==void 0){if(Tt)continue;Qe=!1;break}if(Te){if(!ce(H,function(At,Jt){if(!ie(Te,Jt)&&($e===At||ge($e,At,W,oe,de)))return Te.push(Jt)})){Qe=!1;break}}else if(!($e===Re||ge($e,Re,W,oe,de))){Qe=!1;break}}return de.delete(O),de.delete(H),Qe}function na(O,H,W,oe,ge,de,be){switch(W){case N:if(O.byteLength!=H.byteLength||O.byteOffset!=H.byteOffset)return!1;O=O.buffer,H=H.buffer;case k:return!(O.byteLength!=H.byteLength||!de(new nn(O),new nn(H)));case s:case _:case l:return cr(+O,+H);case a:return O.name==H.name&&O.message==H.message;case C:case w:return O==H+"";case p:var Ce=ae;case B:var Ie=oe&o;if(Ce||(Ce=fe),O.size!=H.size&&!Ie)return!1;var ke=be.get(O);if(ke)return ke==H;oe|=c,be.set(O,H);var qe=An(Ce(O),Ce(H),oe,ge,de,be);return be.delete(O),qe;case S:if(Zt)return Zt.call(O)==Zt.call(H)}return!1}function ra(O,H,W,oe,ge,de){var be=W&o,Ce=Wt(O),Ie=Ce.length,ke=Wt(H),qe=ke.length;if(Ie!=qe&&!be)return!1;for(var Qe=Ie;Qe--;){var Te=Ce[Qe];if(!(be?Te in H:ve.call(H,Te)))return!1}var $e=de.get(O);if($e&&de.get(H))return $e==H;var Re=!0;de.set(O,H),de.set(H,O);for(var Tt=be;++Qe<Ie;){Te=Ce[Qe];var At=O[Te],Jt=H[Te];if(oe)var Bl=be?oe(Jt,At,Te,H,O,de):oe(At,Jt,Te,O,H,de);if(!(Bl===void 0?At===Jt||ge(At,Jt,W,oe,de):Bl)){Re=!1;break}Tt||(Tt=Te=="constructor")}if(Re&&!Tt){var pr=O.constructor,mr=H.constructor;pr!=mr&&"constructor"in O&&"constructor"in H&&!(typeof pr=="function"&&pr instanceof pr&&typeof mr=="function"&&mr instanceof mr)&&(Re=!1)}return de.delete(O),de.delete(H),Re}function Wt(O){return Nn(O,On,oa)}function lt(O,H){var W=O.__data__;return ia(H)?W[typeof H=="string"?"string":"hash"]:W.map}function wt(O,H){var W=le(O,H);return Yo(W)?W:void 0}function Nt(O){var H=ve.call(O,We),W=O[We];try{O[We]=void 0;var oe=!0}catch{}var ge=pt.call(O);return oe&&(H?O[We]=W:delete O[We]),ge}var oa=Et?function(O){return O==null?[]:(O=Object(O),se(Et(O),function(H){return Ot.call(O,H)}))}:da,vt=Gt;(Ut&&vt(new Ut(new ArrayBuffer(1)))!=N||kt&&vt(new kt)!=p||zt&&vt(zt.resolve())!=b||It&&vt(new It)!=B||Xt&&vt(new Xt)!=A)&&(vt=function(O){var H=Gt(O),W=H==m?O.constructor:void 0,oe=W?He(W):"";if(oe)switch(oe){case Kt:return N;case it:return p;case rn:return b;case Le:return B;case Ye:return A}return H});function aa(O,H){return H=H??f,!!H&&(typeof O=="number"||P.test(O))&&O>-1&&O%1==0&&O<H}function ia(O){var H=typeof O;return H=="string"||H=="number"||H=="symbol"||H=="boolean"?O!=="__proto__":O===null}function la(O){return!!Oe&&Oe in O}function sa(O){var H=O&&O.constructor,W=typeof H=="function"&&H.prototype||Be;return O===W}function sr(O){return pt.call(O)}function He(O){if(O!=null){try{return ht.call(O)}catch{}try{return O+""}catch{}}return""}function cr(O,H){return O===H||O!==O&&H!==H}var dr=ir(function(){return arguments}())?ir:function(O){return _t(O)&&ve.call(O,"callee")&&!Ot.call(O,"callee")},sn=Array.isArray;function Bn(O){return O!=null&&Sn(O.length)&&!ur(O)}var cn=Ht||ua;function ca(O,H){return lr(O,H)}function ur(O){if(!fr(O))return!1;var H=Gt(O);return H==h||H==d||H==u||H==v}function Sn(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=f}function fr(O){var H=typeof O;return O!=null&&(H=="object"||H=="function")}function _t(O){return O!=null&&typeof O=="object"}var hr=ne?te(ne):ea;function On(O){return Bn(O)?Wo(O):ta(O)}function da(){return[]}function ua(){return!1}t.exports=ca}(Wn,Wn.exports);var xi=Wn.exports,Mr={},vi=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mr,"__esModule",{value:!0});var Iu=vi(yi),Tu=vi(xi),qr;(function(t){function i(c,f,x){c===void 0&&(c={}),f===void 0&&(f={}),typeof c!="object"&&(c={}),typeof f!="object"&&(f={});var y=Iu.default(f);x||(y=Object.keys(y).reduce(function(s,_){return y[_]!=null&&(s[_]=y[_]),s},{}));for(var u in c)c[u]!==void 0&&f[u]===void 0&&(y[u]=c[u]);return Object.keys(y).length>0?y:void 0}t.compose=i;function n(c,f){c===void 0&&(c={}),f===void 0&&(f={}),typeof c!="object"&&(c={}),typeof f!="object"&&(f={});var x=Object.keys(c).concat(Object.keys(f)).reduce(function(y,u){return Tu.default(c[u],f[u])||(y[u]=f[u]===void 0?null:f[u]),y},{});return Object.keys(x).length>0?x:void 0}t.diff=n;function r(c,f){c===void 0&&(c={}),f===void 0&&(f={}),c=c||{};var x=Object.keys(f).reduce(function(y,u){return f[u]!==c[u]&&c[u]!==void 0&&(y[u]=f[u]),y},{});return Object.keys(c).reduce(function(y,u){return c[u]!==f[u]&&f[u]===void 0&&(y[u]=null),y},x)}t.invert=r;function o(c,f,x){if(x===void 0&&(x=!1),typeof c!="object")return f;if(typeof f=="object"){if(!x)return f;var y=Object.keys(f).reduce(function(u,s){return c[s]===void 0&&(u[s]=f[s]),u},{});return Object.keys(y).length>0?y:void 0}}t.transform=o})(qr||(qr={})),Mr.default=qr;var Jn={},Yn={},_i;function Vu(){if(_i)return Yn;_i=1;var t=ue&&ue.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yn,"__esModule",{value:!0});var i=t(Ci()),n=function(){function r(o){this.ops=o,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(o){o||(o=1/0);var c=this.ops[this.index];if(c){var f=this.offset,x=i.default.length(c);if(o>=x-f?(o=x-f,this.index+=1,this.offset=0):this.offset+=o,typeof c.delete=="number")return{delete:o};var y={};return c.attributes&&(y.attributes=c.attributes),typeof c.retain=="number"?y.retain=o:typeof c.insert=="string"?y.insert=c.insert.substr(f,o):y.insert=c.insert,y}else return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?i.default.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var o=this.offset,c=this.index,f=this.next(),x=this.ops.slice(this.index);return this.offset=o,this.index=c,[f].concat(x)}else return[]},r}();return Yn.default=n,Yn}var bi;function Ci(){if(bi)return Jn;bi=1;var t=ue&&ue.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jn,"__esModule",{value:!0});var i=t(Vu()),n;return function(r){function o(f){return new i.default(f)}r.iterator=o;function c(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}r.length=c}(n||(n={})),Jn.default=n,Jn}var yn=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},er=yn(Ou),Du=yn(yi),$r=yn(xi),xn=yn(Mr),De=yn(Ci()),Lu="\0",Fu=function(){function t(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}return t.prototype.insert=function(i,n){var r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r))},t.prototype.delete=function(i){return i<=0?this:this.push({delete:i})},t.prototype.retain=function(i,n){if(i<=0)return this;var r={retain:i};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r)},t.prototype.push=function(i){var n=this.ops.length,r=this.ops[n-1];if(i=Du.default(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[n-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(n-=1,r=this.ops[n-1],typeof r!="object"))return this.ops.unshift(i),this;if($r.default(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[n-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[n-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[n-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[n-1].attributes=i.attributes),this}}return n===this.ops.length?this.ops.push(i):this.ops.splice(n,0,i),this},t.prototype.chop=function(){var i=this.ops[this.ops.length-1];return i&&i.retain&&!i.attributes&&this.ops.pop(),this},t.prototype.filter=function(i){return this.ops.filter(i)},t.prototype.forEach=function(i){this.ops.forEach(i)},t.prototype.map=function(i){return this.ops.map(i)},t.prototype.partition=function(i){var n=[],r=[];return this.forEach(function(o){var c=i(o)?n:r;c.push(o)}),[n,r]},t.prototype.reduce=function(i,n){return this.ops.reduce(i,n)},t.prototype.changeLength=function(){return this.reduce(function(i,n){return n.insert?i+De.default.length(n):n.delete?i-n.delete:i},0)},t.prototype.length=function(){return this.reduce(function(i,n){return i+De.default.length(n)},0)},t.prototype.slice=function(i,n){i===void 0&&(i=0),n===void 0&&(n=1/0);for(var r=[],o=De.default.iterator(this.ops),c=0;c<n&&o.hasNext();){var f=void 0;c<i?f=o.next(i-c):(f=o.next(n-c),r.push(f)),c+=De.default.length(f)}return new t(r)},t.prototype.compose=function(i){var n=De.default.iterator(this.ops),r=De.default.iterator(i.ops),o=[],c=r.peek();if(c!=null&&typeof c.retain=="number"&&c.attributes==null){for(var f=c.retain;n.peekType()==="insert"&&n.peekLength()<=f;)f-=n.peekLength(),o.push(n.next());c.retain-f>0&&r.next(c.retain-f)}for(var x=new t(o);n.hasNext()||r.hasNext();)if(r.peekType()==="insert")x.push(r.next());else if(n.peekType()==="delete")x.push(n.next());else{var y=Math.min(n.peekLength(),r.peekLength()),u=n.next(y),s=r.next(y);if(typeof s.retain=="number"){var _={};typeof u.retain=="number"?_.retain=y:_.insert=u.insert;var a=xn.default.compose(u.attributes,s.attributes,typeof u.retain=="number");if(a&&(_.attributes=a),x.push(_),!r.hasNext()&&$r.default(x.ops[x.ops.length-1],_)){var h=new t(n.rest());return x.concat(h).chop()}}else typeof s.delete=="number"&&typeof u.retain=="number"&&x.push(s)}return x.chop()},t.prototype.concat=function(i){var n=new t(this.ops.slice());return i.ops.length>0&&(n.push(i.ops[0]),n.ops=n.ops.concat(i.ops.slice(1))),n},t.prototype.diff=function(i,n){if(this.ops===i.ops)return new t;var r=[this,i].map(function(y){return y.map(function(u){if(u.insert!=null)return typeof u.insert=="string"?u.insert:Lu;var s=y===i?"on":"with";throw new Error("diff() called "+s+" non-document")}).join("")}),o=new t,c=er.default(r[0],r[1],n),f=De.default.iterator(this.ops),x=De.default.iterator(i.ops);return c.forEach(function(y){for(var u=y[1].length;u>0;){var s=0;switch(y[0]){case er.default.INSERT:s=Math.min(x.peekLength(),u),o.push(x.next(s));break;case er.default.DELETE:s=Math.min(u,f.peekLength()),f.next(s),o.delete(s);break;case er.default.EQUAL:s=Math.min(f.peekLength(),x.peekLength(),u);var _=f.next(s),a=x.next(s);$r.default(_.insert,a.insert)?o.retain(s,xn.default.diff(_.attributes,a.attributes)):o.push(a).delete(s);break}u-=s}}),o.chop()},t.prototype.eachLine=function(i,n){n===void 0&&(n=`
|
|
51
51
|
`);for(var r=De.default.iterator(this.ops),o=new t,c=0;r.hasNext();){if(r.peekType()!=="insert")return;var f=r.peek(),x=De.default.length(f)-r.peekLength(),y=typeof f.insert=="string"?f.insert.indexOf(n,x)-x:-1;if(y<0)o.push(r.next());else if(y>0)o.push(r.next(y));else{if(i(o,r.next(1).attributes||{},c)===!1)return;c+=1,o=new t}}o.length()>0&&i(o,{},c)},t.prototype.invert=function(i){var n=new t;return this.reduce(function(r,o){if(o.insert)n.delete(De.default.length(o));else{if(o.retain&&o.attributes==null)return n.retain(o.retain),r+o.retain;if(o.delete||o.retain&&o.attributes){var c=o.delete||o.retain,f=i.slice(r,r+c);return f.forEach(function(x){o.delete?n.push(x):o.retain&&o.attributes&&n.retain(De.default.length(x),xn.default.invert(o.attributes,x.attributes))}),r+c}}return r},0),n.chop()},t.prototype.transform=function(i,n){if(n===void 0&&(n=!1),n=!!n,typeof i=="number")return this.transformPosition(i,n);for(var r=i,o=De.default.iterator(this.ops),c=De.default.iterator(r.ops),f=new t;o.hasNext()||c.hasNext();)if(o.peekType()==="insert"&&(n||c.peekType()!=="insert"))f.retain(De.default.length(o.next()));else if(c.peekType()==="insert")f.push(c.next());else{var x=Math.min(o.peekLength(),c.peekLength()),y=o.next(x),u=c.next(x);if(y.delete)continue;u.delete?f.push(u):f.retain(x,xn.default.transform(y.attributes,u.attributes,n))}return f.chop()},t.prototype.transformPosition=function(i,n){n===void 0&&(n=!1),n=!!n;for(var r=De.default.iterator(this.ops),o=0;r.hasNext()&&o<=i;){var c=r.peekLength(),f=r.peekType();if(r.next(),f==="delete"){i-=Math.min(c,i-o);continue}else f==="insert"&&(o<i||!n)&&(i+=c);o+=c}return i},t.Op=De.default,t.AttributeMap=xn.default,t}(),Ru=Fu;const Pu=Dr(Ru);/*!
|
|
52
52
|
* VueQuill @vueup/vue-quill v1.2.0
|
|
53
53
|
* https://vueup.github.io/vue-quill/
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
* Date: 2023-05-12T08:44:03.742Z
|
|
61
61
|
*/const Ei={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"]]},Mu=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:t=>["delta","html","text"].includes(t)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:t=>["snow","bubble",""].includes(t)},toolbar:{type:[String,Array,Object],required:!1,validator:t=>typeof t=="string"&&t!==""?t.charAt(0)==="#"?!0:Object.keys(Ei).indexOf(t)!==-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:(t,i)=>{e.onMounted(()=>{c()}),e.onBeforeUnmount(()=>{n=null});let n,r;const o=e.ref(),c=()=>{var k;if(o.value){if(r=f(),t.modules)if(Array.isArray(t.modules))for(const N of t.modules)Lr.register(`modules/${N.name}`,N.module);else Lr.register(`modules/${t.modules.name}`,t.modules.module);n=new Lr(o.value,r),b(t.content),n.on("text-change",_),n.on("selection-change",h),n.on("editor-change",d),t.theme!=="bubble"&&o.value.classList.remove("ql-bubble"),t.theme!=="snow"&&o.value.classList.remove("ql-snow"),(k=n.getModule("toolbar"))===null||k===void 0||k.container.addEventListener("mousedown",N=>{N.preventDefault()}),i.emit("ready",n)}},f=()=>{const k={};if(t.theme!==""&&(k.theme=t.theme),t.readOnly&&(k.readOnly=t.readOnly),t.placeholder&&(k.placeholder=t.placeholder),t.toolbar&&t.toolbar!==""&&(k.modules={toolbar:(()=>{if(typeof t.toolbar=="object")return t.toolbar;if(typeof t.toolbar=="string")return t.toolbar.charAt(0)==="#"?t.toolbar:Ei[t.toolbar]})()}),t.modules){const N=(()=>{var V,L;const M={};if(Array.isArray(t.modules))for(const Z of t.modules)M[Z.name]=(V=Z.options)!==null&&V!==void 0?V:{};else M[t.modules.name]=(L=t.modules.options)!==null&&L!==void 0?L:{};return M})();k.modules=Object.assign({},k.modules,N)}return Object.assign({},t.globalOptions,t.options,k)},x=k=>typeof k=="object"&&k?k.slice():k,y=k=>Object.values(k.ops).some(N=>!N.retain||Object.keys(N).length!==1);let u;const s=k=>{if(typeof u==typeof k){if(k===u)return!0;if(typeof k=="object"&&k&&typeof u=="object"&&u)return!y(u.diff(k))}return!1},_=(k,N,V)=>{u=x(m()),s(t.content)||i.emit("update:content",u),i.emit("textChange",{delta:k,oldContents:N,source:V})},a=e.ref(),h=(k,N,V)=>{a.value=!!(n!=null&&n.hasFocus()),i.emit("selectionChange",{range:k,oldRange:N,source:V})};e.watch(a,k=>{k?i.emit("focus",o):i.emit("blur",o)});const d=(...k)=>{k[0]==="text-change"&&i.emit("editorChange",{name:k[0],delta:k[1],oldContents:k[2],source:k[3]}),k[0]==="selection-change"&&i.emit("editorChange",{name:k[0],range:k[1],oldRange:k[2],source:k[3]})},p=()=>o.value,l=()=>{var k;return(k=n==null?void 0:n.getModule("toolbar"))===null||k===void 0?void 0:k.container},g=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
|
|
62
62
|
make sure to call this method when the editor ready
|
|
63
|
-
or use v-on:ready="onReady(quill)" event instead.`},m=(k,N)=>t.contentType==="html"?B():t.contentType==="text"?v(k,N):n==null?void 0:n.getContents(k,N),b=(k,N="api")=>{const V=k||(t.contentType==="delta"?new Pu:"");t.contentType==="html"?w(V):t.contentType==="text"?C(V,N):n==null||n.setContents(V,N),u=x(V)},v=(k,N)=>{var V;return(V=n==null?void 0:n.getText(k,N))!==null&&V!==void 0?V:""},C=(k,N="api")=>{n==null||n.setText(k,N)},B=()=>{var k;return(k=n==null?void 0:n.root.innerHTML)!==null&&k!==void 0?k:""},w=k=>{n&&(n.root.innerHTML=k)},S=(k,N="api")=>{const V=n==null?void 0:n.clipboard.convert(k);V&&(n==null||n.setContents(V,N))},I=()=>{n==null||n.focus()},A=()=>{e.nextTick(()=>{var k;!i.slots.toolbar&&n&&((k=n.getModule("toolbar"))===null||k===void 0||k.container.remove()),c()})};return e.watch(()=>t.content,k=>{if(!n||!k||s(k))return;const N=n.getSelection();N&&e.nextTick(()=>n==null?void 0:n.setSelection(N)),b(k)},{deep:!0}),e.watch(()=>t.enable,k=>{n&&n.enable(k)}),{editor:o,getEditor:p,getToolbar:l,getQuill:g,getContents:m,setContents:b,getHTML:B,setHTML:w,pasteHTML:S,focus:I,getText:v,setText:C,reinit:A}},render(){var t,i;return[(i=(t=this.$slots).toolbar)===null||i===void 0?void 0:i.call(t),e.h("div",{ref:"editor",...this.$attrs})]}}),qu={class:"input"},$u=["for","data-test-id"],ju=["data-test-id"],Hu=xe({__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(t){const i=t,n=e.computed(()=>typeof i.error=="string"?i.error:i.error===""?!1:i.error===!0?`${i.label||"Field"} is required`:i.error),r=e.ref("");return e.onBeforeMount(()=>{r.value=i.modelValue}),(o,c)=>(e.openBlock(),e.createElementBlock("div",qu,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass({error_color:!!t.error})},"*",2)):e.createCommentVNode("",!0)],10,$u)):e.createCommentVNode("",!0),e.createVNode(e.unref(Mu),{"content-type":"html",toolbar:t.editorOptions,"model-value":t.modelValue,"data-test-id":t.dataTestId,content:r.value,"onUpdate:content":c[0]||(c[0]=f=>o.$emit("update:modelValue",f))},null,8,["toolbar","model-value","data-test-id","content"]),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},e.toDisplayString(n.value),9,ju)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),Uu={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"},zu={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},Xu={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},Ku={key:0,class:"ect-col-span-2"},Qu=["data-test-id"],Zu=["id","onUpdate:modelValue","disabled","data-test-id"],Gu=["for","data-test-id"],Wu={key:2,class:"quill-editor-styles"},Ju=e.createElementVNode("div",{class:"dropdowntp"},null,-1),Yu=e.createElementVNode("div",{id:"modals"},null,-1),ki={__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(t){const i=ct(),n=t,r=e.ref({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),o=e.ref(n.lookup),c=e.computed(()=>{const y=n.lookup.relatedFields.map(u=>u.child);return y.push("Name"),y});function f(y,u){const s=u.options.find(_=>_.Id===y);y===null?(u.options=[],u.value=null,u.relatedFields.forEach(_=>{_.value=null})):(u.value=s.Name,u.relatedFields.forEach(_=>{_.value=s[_.child]}))}const x=Vt(async function(y,u){u.loading=!0;const s={objectType:u.referenceObject,searchText:y||"",lstFields:c.value||[]},_=await i.getRecords(s);u.options=_,u.loading=!1});return(y,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Uu,[t.title?(e.openBlock(),e.createElementBlock("div",zu,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Xu,[o.value?(e.openBlock(),e.createElementBlock("div",Ku,[e.createVNode(ci,{modelValue:o.value.referenceRecordId,"onUpdate:modelValue":[u[0]||(u[0]=s=>o.value.referenceRecordId=s),u[1]||(u[1]=s=>f(s,o.value))],"data-test-id":`configurator-inputs-lookup-${o.value.attRecordId??y.index}`,label:o.value.label,options:o.value.options,disabled:!o.value.editable,required:o.value.required,loading:o.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:u[2]||(u[2]=s=>e.unref(x)(s,o.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.attributes,(s,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"attribute-input"},[s.dataType==="PICKLIST"||s.dataType==="MULTIPICKLIST"?(e.openBlock(),e.createBlock(ci,{key:0,modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,label:s.label,placeholder:s.label,disabled:!s.editable,options:s.picklistValues.map(a=>({label:a,value:a})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${s.attRecordId??y.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):s.dataType==="BOOLEAN"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${s.attRecordId??y.index}`},[e.withDirectives(e.createElementVNode("input",{id:`checkbox-${s.attRecordId??y.index}`,"onUpdate:modelValue":a=>s.value=a,type:"checkbox",disabled:!s.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-${s.attRecordId??y.index}`},null,8,Zu),[[e.vModelCheckbox,s.value]]),e.createElementVNode("label",{for:`checkbox-${s.attRecordId??y.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${s.attRecordId??y.index}`},e.toDisplayString(s.label),9,Gu)],8,Qu)):s.dataType==="TEXTAREA"?(e.openBlock(),e.createElementBlock("div",Wu,[e.createVNode(Hu,{modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,label:s.label,required:s.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${s.attRecordId??y.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(e.openBlock(),e.createBlock(J1,{key:3,modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,label:s.label,disabled:!s.editable,highlight:"","data-test-id":`configurator-inputs-custom-${s.attRecordId??y.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),Ju,Yu],64))}},ef={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},tf={class:"ect-bg-white ect-rounded-lg"},jr={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(t){const i=t,n=e.ref([]),r=e.ref([]),o=e.ref({});return e.onBeforeMount(()=>{const c={},f=[...i.attributes];f.forEach(y=>{y.dataType==="REFERENCE"&&(o.value[y.apiName]=["Name"],y.relatedFields=[],c[y.apiName]=y),y.editable=y.editable&&!y.apiName.includes(".")});let x=null;f.forEach(y=>{if(y.referenceObject==="XX_Base__Location__c"&&(x?y.firstLookup="Copy from "+x.label:x=y),y.apiName.includes(".")){const[u,s]=y.apiName.split(".");y.parent=u,y.child=s,o.value[u]!=null&&(o.value[u].push(s),c[u].relatedFields.push(y))}}),r.value=f.filter(y=>y.dataType==="REFERENCE"),n.value=f.filter(y=>!(y.apiName.includes(".")||y.dataType==="REFERENCE"))}),(c,f)=>(e.openBlock(),e.createElementBlock("div",ef,[e.createElementVNode("div",tf,[e.createVNode(ki,{attributes:n.value},null,8,["attributes"])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,x=>(e.openBlock(),e.createElementBlock("div",{key:x.attRecordId,class:"ect-bg-white ect-rounded-lg"},[e.createVNode(ki,{title:x.referenceLabel+" Lookup",lookup:x,attributes:x.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},nf={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"},rf=e.createElementVNode("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),of={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"},af={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},lf={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},sf={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},cf={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},df={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},uf={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(t,{emit:i}){const n=i,r=t,o=e.computed(()=>JSON.parse(JSON.stringify(r.attributes))),c=()=>{n("close")},f=()=>{n("done",o.value),n("close")};return(x,y)=>(e.openBlock(),e.createBlock(gr,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:c},{content:e.withCtx(()=>[e.createElementVNode("header",nf,[rf,e.createElementVNode("div",of,[e.createElementVNode("p",af,e.toDisplayString(t.option.itemName),1),e.createElementVNode("p",lf,e.toDisplayString(t.option.qty),1),e.createElementVNode("p",sf,e.toDisplayString(t.option.price),1)])]),e.createElementVNode("main",cf,[e.createVNode(jr,{attributes:o.value},null,8,["attributes"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",df,[e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:y[0]||(y[0]=u=>n("close"))},{default:e.withCtx(()=>[e.createTextVNode("Cancel")]),_:1}),e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:f},{default:e.withCtx(()=>[e.createTextVNode("Done")]),_:1})])]),_:1}))}},ff=["data-test-id"],hf=["data-test-id"],pf=["data-test-id"],mf={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},gf={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},yf={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"},xf={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},vf={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},_f={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},bf={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Cf={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Ef={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"},kf={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"},wf=xe({__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(t,{emit:i}){const n=i;return(r,o)=>(e.openBlock(),e.createBlock(fa,{to:"modaltp"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[e.createElementVNode("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[e.createElementVNode("div",{class:"modal-container",style:e.normalizeStyle(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[e.createElementVNode("div",mf,[e.createElementVNode("div",gf,[t.header?(e.openBlock(),e.createElementBlock("div",yf,[e.createElementVNode("div",xf,[e.createElementVNode("div",vf,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("div",_f,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",bf,[e.createElementVNode("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:o[0]||(o[0]=c=>n("close"))},[e.createVNode(we,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(e.openBlock(),e.createElementBlock("div",Cf,[e.renderSlot(r.$slots,"content",{},void 0,!0)])):(e.openBlock(),e.createElementBlock("div",Ef,[e.renderSlot(r.$slots,"default",{},void 0,!0)])),t.footer?(e.openBlock(),e.createElementBlock("div",kf,[e.renderSlot(r.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)])],12,pf)],8,hf)],8,ff)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),Pt=t=>(e.pushScopeId("data-v-395645da"),t=t(),e.popScopeId(),t),Nf={class:"ect-w-[600px]"},Af={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"},Bf=Pt(()=>e.createElementVNode("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),Sf={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"},Of={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},If={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Tf={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Vf={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"},Df=Pt(()=>e.createElementVNode("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)),Lf={class:"ect-flex ect-flex-col ect-gap-2"},Ff={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},Rf=Pt(()=>e.createElementVNode("div",{class:"ect-px-4 ect-py-2"},[e.createElementVNode("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)),Pf={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},Mf={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},qf={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},$f={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},jf=Pt(()=>e.createElementVNode("div",{class:"ect-px-4 ect-py-2"},[e.createElementVNode("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)),Hf={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},Uf={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},zf={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},Xf={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"},Kf=Pt(()=>e.createElementVNode("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)),Qf={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},Zf={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},Gf=Pt(()=>e.createElementVNode("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)),Wf={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"},Jf={class:"ect-flex ect-flex-col ect-gap-2"},Yf={class:"ect-flex-1"},e2={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},t2={class:"ect-text-center ect-w-28"},n2={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"},r2={class:"ect-text-center ect-w-28"},o2={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"},a2={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"},i2={class:"ect-flex ect-items-center"},l2=Pt(()=>e.createElementVNode("div",{class:"ect-flex-1"},[e.createElementVNode("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)),s2={class:"ect-text-center ect-w-28"},c2={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"},d2={class:"ect-text-center ect-w-28"},u2={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"},f2={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},h2=xe({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(t,{emit:i}){const n=ct(),r=i,o=t,c=e.computed(()=>{const d=n.summaryPrices,p=[];return p.push({label:"Base Price",value:d.basePrice,priceChange:d.basePrice}),p.push({label:"Add Ons",value:d.addOns,priceChange:d.addOns+_.value}),p}),f=e.computed(()=>{const d=n.summaryPrices;return{label:"Total Price",value:d.total,priceChange:d.total+_.value}}),x=e.computed(()=>o.data.inclusions.map(p=>n.optionByPublishKey.get(p))),y=e.computed(()=>x.value.filter(d=>d.itemId!==o.item.itemId)),u=e.computed(()=>o.data.exclusions.map(d=>n.optionByPublishKey.get(d))),s=e.computed(()=>u.value.filter(d=>d.itemId!==o.item.itemId)),_=e.computed(()=>x.value.reduce((d,p)=>d+p.price,0)-u.value.reduce((d,p)=>d+p.price,0)),a=()=>{r("close")},h=()=>{r("done")};return(d,p)=>(e.openBlock(),e.createBlock(wf,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:a},{content:e.withCtx(()=>[e.createElementVNode("div",Nf,[e.createElementVNode("header",Af,[Bf,e.createElementVNode("div",Sf,[e.createElementVNode("p",Of,e.toDisplayString(t.item.itemName),1),e.createElementVNode("p",If,e.toDisplayString(t.item.qty),1),e.createElementVNode("p",Tf,e.toDisplayString(e.unref(Ge)(t.item.price)),1)])]),e.createElementVNode("main",Vf,[Df,e.createElementVNode("div",Lf,[y.value.length>0?(e.openBlock(),e.createElementBlock("div",Ff,[Rf,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[e.createElementVNode("p",Pf,e.toDisplayString(l.itemName),1),e.createElementVNode("p",Mf,e.toDisplayString(l.qty),1),e.createElementVNode("p",qf," + "+e.toDisplayString(e.unref(Ge)(l.price)),1)]))),128))])):e.createCommentVNode("",!0),s.value.length>0?(e.openBlock(),e.createElementBlock("div",$f,[jf,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[e.createElementVNode("p",Hf,e.toDisplayString(l.itemName),1),e.createElementVNode("p",Uf,e.toDisplayString(l.qty),1),e.createElementVNode("p",zf," - "+e.toDisplayString(e.unref(Ge)(l.price)),1)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Xf,[Kf,e.createElementVNode("p",Qf,e.toDisplayString(e.unref(Ge)(_.value)),1)])])]),e.createElementVNode("footer",null,[e.createElementVNode("div",Zf,[Gf,e.createElementVNode("div",Wf,[e.createElementVNode("div",Jf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.label,class:e.normalizeClass(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":g>0}])},[e.createElementVNode("div",Yf,[e.createElementVNode("p",e2,e.toDisplayString(l.label),1)]),e.createElementVNode("div",t2,[e.createElementVNode("p",n2,e.toDisplayString(e.unref(Ge)(l.value)),1)]),e.createElementVNode("div",r2,[e.createElementVNode("p",o2,e.toDisplayString(e.unref(Ge)(l.priceChange)),1)])],2))),128))])]),e.createElementVNode("div",a2,[e.createElementVNode("div",i2,[l2,e.createElementVNode("div",s2,[e.createElementVNode("p",c2,e.toDisplayString(e.unref(Ge)(f.value.value)),1)]),e.createElementVNode("div",d2,[e.createElementVNode("p",u2,e.toDisplayString(e.unref(Ge)(f.value.priceChange)),1)])])])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",f2,[e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:p[0]||(p[0]=l=>r("close"))},{default:e.withCtx(()=>[e.createTextVNode("Cancel")]),_:1}),e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:h},{default:e.withCtx(()=>[e.createTextVNode("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-395645da"]]),p2={class:"ect-flex ect-flex-col"},m2=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],g2=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],y2={key:0},x2={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},v2={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(t){const i=ct(),n=t,r=e.computed(()=>n.data.itemTypes||[]),o=e.computed(()=>n.data.showImage||!1),c=e.ref(null),f=e.ref({});let x=e.ref(null),y=e.ref(null);const u=(d,p)=>{d.qty=p},s=(d,p)=>{d.itemName=p},_=()=>{i.configuration.categoryOptions.forEach(d=>{d.itemTypes.forEach(p=>{p.options.forEach(l=>{i.configuration.sysGuidedOptions&&(c.value.hidden.includes(l.relationshipInfo.publishKey)?l.hidden=!0:l.hidden=!1),c.value.inclusions.includes(l.relationshipInfo.publishKey)&&!p.selected.includes(l.itemId)&&p.selected.push(l.itemId),c.value.exclusions.includes(l.relationshipInfo.publishKey)&&p.selected.includes(l.itemId)&&p.selected.splice(p.selected.indexOf(l.itemId),1)})})}),c.value=null,f.value=null},a=async(d,p,l,g)=>{if(d.preventDefault(),d.stopPropagation(),x.value=null,y.value=null,p.calculateRules){g&&g.isRadio?l.includes(p.itemId)?(l.splice(0,l.length),y.value=p.relationshipInfo.publishKey):(l.splice(0,l.length),l.push(p.itemId),x.value=p.relationshipInfo.publishKey):l.includes(p.itemId)?(l.splice(l.indexOf(p.itemId),1),y.value=p.relationshipInfo.publishKey):(l.push(p.itemId),x.value=p.relationshipInfo.publishKey);const m=y.value?p:null,b=x.value?p:null,v=await i.evaluateConfigSelection(m,b);v.inclusions.length>0||v.exclusions.length>0?(c.value=v,f.value=p,[...v.inclusions,...v.exclusions].includes(p.relationshipInfo.publishKey)||(x.value&&c.value.exclusions.push(x.value),y.value&&c.value.inclusions.push(y.value))):(c.value=v,x.value&&c.value.exclusions.push(x.value),y.value&&c.value.inclusions.push(y.value),_())}},h=(d,p,l,g)=>{d.target.type==="checkbox"||d.target.type==="radio"||(d.preventDefault(),d.stopPropagation(),g.isRadio?l.includes(p.itemId)?l.splice(0,l.length):(l.splice(0,l.length),l.push(p.itemId)):l.includes(p.itemId)?l.splice(l.indexOf(p.itemId),1):l.push(p.itemId),a(d,p,l,g))};return(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createBlock(h2,{key:0,item:f.value,data:c.value,onClose:p[0]||(p[0]=l=>c.value=null),onDone:_},null,8,["item","data"])):e.createCommentVNode("",!0),e.createElementVNode("div",p2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,l=>(e.openBlock(),e.createBlock(Qd,{key:l.itemTypeId,title:l.itemTypeName,description:l.description,message:l.isRadio?l.selected?"":l.minMessage:l.selected.length<l.minNumber?l.minMessage:l.selected.length===l.maxNumber?l.maxMessage:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([l.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":l.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"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options||[],g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g.itemId},[g.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j1,{key:0,item:g,name:g.itemName,description:g.description||"","min-quantity":l.minQuantity,"max-quantity":l.maxQuantity,"show-image":o.value,selected:l.selected.includes(g.itemId),tags:g.getTags(),price:g.price,quantity:g.qty,"image-url":g.defaultImageURL,attributes:g.attributes||[],size:l.numberOfColumns,"item-id":g.itemId,"item-type":l.itemTypeName||"",category:l.category,"relationship-info":g.relationshipInfo||{},option:e.unref(i).optionByItemId.get(g.itemId),"is-attributes":g.isAttributes,"show-attributes":l.lightboxAttributes,disabled:g.isDisabled,"onUpdate:quantity":m=>u(g,m),"onUpdate:name":m=>s(g,m),onEditAttributes:m=>g.showAttributesModal=!0,onClick:m=>l.selected.includes(g.itemId)||g.isDisabled?null:h(m,g,l.selected,l)},{"selection-control":e.withCtx(()=>[l.isRadio?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":m=>l.selected[0]=m,"data-test-id":`configurator-${l.itemTypeId}-radio-${g.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:g.itemId,disabled:g.isDisabled,onClick:p[1]||(p[1]=e.withModifiers(()=>{},["stop"])),onChange:m=>a(m,g,l.selected,l)},null,40,m2)),[[e.vModelRadio,l.selected[0]]]):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":m=>l.selected=m,"data-test-id":`configurator-${l.itemTypeId}-checkbox-${g.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:g.itemId,disabled:g.isDisabled,onClick:p[2]||(p[2]=e.withModifiers(()=>{},["stop"])),onChange:m=>a(m,g,l.selected,l)},null,40,g2)),[[e.vModelCheckbox,l.selected]])]),default:e.withCtx(()=>[l.lightboxAttributes?(e.openBlock(),e.createElementBlock("div",y2,[g.showAttributesModal?(e.openBlock(),e.createBlock(uf,{key:0,option:g,attributes:g.attributes,onDone:m=>g.attributes=m,onClose:m=>g.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",x2,[e.createVNode(jr,{attributes:g.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))}},_2=t=>(e.pushScopeId("data-v-cb7a75a9"),t=t(),e.popScopeId(),t),b2={class:"ect-space-y-4"},C2={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},E2={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"},k2={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},w2={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]"},N2={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},A2={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},B2={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},S2={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},O2={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},I2={class:"ect-flex ect-justify-center ect-min-w-[128px]"},T2=_2(()=>e.createElementVNode("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),V2={class:"ect-flex ect-justify-center ect-min-w-[100px]"},D2={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},L2={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},F2={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},R2={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},P2={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},M2=xe({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(t){return(i,n)=>(e.openBlock(),e.createElementBlock("div",b2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.summary,r=>(e.openBlock(),e.createElementBlock("div",{key:r.key,class:"ect-mb-4"},[e.createElementVNode("section",C2,[e.createElementVNode("div",E2,[e.createElementVNode("h3",k2,e.toDisplayString(r.category),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.selectedItemTypes,o=>(e.openBlock(),e.createElementBlock("div",{key:o.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[e.createElementVNode("div",w2,[e.createElementVNode("h4",N2,e.toDisplayString(o.itemTypeName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.selectedOptions,c=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.itemId},[e.createElementVNode("div",A2,[e.createElementVNode("div",B2,[e.createElementVNode("span",S2,e.toDisplayString(c.itemName),1)]),e.createElementVNode("div",O2,[e.createElementVNode("div",I2,[e.createVNode(Qn,{value:c.qty,"onUpdate:value":f=>c.qty=f,min:o.minQuantity,max:o.maxQuantity,"data-test-id":`configurator-summary-counter-${c.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),T2,e.createElementVNode("div",V2,[e.createElementVNode("span",D2,e.toDisplayString(e.unref(Ge)(c.price)),1)])])]),c.isAttributes&&c.getTags().length>0?(e.openBlock(),e.createElementBlock("div",L2,[e.createElementVNode("div",F2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.getTags(),f=>(e.openBlock(),e.createBlock(dt,{key:f.attributeId,label:f.label,value:f.value},null,8,["label","value"]))),128))])])):e.createCommentVNode("",!0)],64))),128))]))),128)),e.createElementVNode("div",R2,[e.createElementVNode("span",P2," Total : "+e.toDisplayString(e.unref(Ge)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),q2={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},$2={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},j2={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"},H2=xe({__name:"ConfiguratorTabs",emits:["scroll"],setup(t,{emit:i}){const n=ct(),r=e.ref("billing-options"),o=e.computed(()=>n.configuration.categoryOptions),c=e.computed(()=>{const a=o.value.map(h=>({key:h.key,title:h.category}));return a.push({key:"summary",title:"Summary"}),a}),f=i,x=e.computed(()=>y.value.get(r.value)),y=e.computed(()=>{const a=new Map;return o.value.forEach(h=>{a.set(h.key,h)}),a}),u=()=>{console.info("Continue");const a=c.value.findIndex(h=>h.key===r.value);if(a<c.value.length-1){const h=c.value[a+1];r.value=h.key}else n.maintainQuoteConfiguration()};e.watch(r,a=>{s(a),f("scroll",0)});const s=a=>{r.value=a},_=a=>{const h=a.target.scrollTop;f("scroll",h)};return e.onBeforeMount(()=>{r.value=c.value[0].key}),(a,h)=>(e.openBlock(),e.createElementBlock("div",q2,[e.createElementVNode("div",$2,[e.createVNode(Ad,{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=d=>r.value=d),"show-tabs":!0,border:"",tabs:c.value,"data-test-id":"configurator-tabs-container",onTabChange:s},null,8,["modelValue","tabs"])]),r.value!=="summary"?(e.openBlock(),e.createElementBlock("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:_},[e.createVNode(v2,{data:x.value},null,8,["data"])],32)):(e.openBlock(),e.createElementBlock("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:_},[e.createVNode(M2,{summary:e.unref(n).summary},null,8,["summary"])],32)),e.createElementVNode("div",j2,[e.createVNode(Md,{"btn-text":r.value!=="summary"?"Continue":"Save",item:e.unref(n).configuration,onContinue:u},null,8,["btn-text","item"])])]))}},[["__scopeId","data-v-89883e06"]]),U2={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},z2={class:"ect-flow-root"},X2=["src","alt"],K2={key:1,class:"ect-mb-2"},Q2={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},Z2={key:0,class:"ect-mt-2"},G2={class:"ect-inline-block ect-mb-2"},W2={key:1,class:"ect-inline-block ect-mb-2"},J2={key:1,class:"ect-mt-2"},Y2={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(t,{emit:i}){const n=t,r=i,o=e.computed(()=>n.config.attributes.map(c=>({label:c.label,value:c.value})).filter(c=>c.value!==null&&c.value!==""));return(c,f)=>(e.openBlock(),e.createElementBlock("div",U2,[e.createElementVNode("div",z2,[t.config.defaultImageURL&&t.scroll<50?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",t.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[t.config.defaultImageURL?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.config.defaultImageURL,alt:t.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,X2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),t.scroll<50?(e.openBlock(),e.createElementBlock("div",K2,[e.createElementVNode("p",Q2,e.toDisplayString(t.config.description),1)])):e.createCommentVNode("",!0),t.config.isAttributes?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.editAttributes?(e.openBlock(),e.createElementBlock("div",J2,[e.createVNode(jr,{attributes:t.config.attributes},null,8,["attributes"])])):(e.openBlock(),e.createElementBlock("div",Z2,[o.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(x,y)=>(e.openBlock(),e.createElementBlock("span",{key:y,class:"ect-inline-block ect-mr-2 ect-mb-2"},[e.createVNode(dt,{label:x.label,value:x.value},null,8,["label","value"])]))),128)),e.createElementVNode("span",G2,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:f[0]||(f[0]=x=>r("edit-attributes"))},[e.createVNode(dt,{label:"Edit attributes","edit-button":""})])])],64)):(e.openBlock(),e.createElementBlock("span",W2,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:f[1]||(f[1]=x=>r("edit-attributes"))},[e.createVNode(dt,{label:"Add attributes","add-button":""})])]))]))],64)):e.createCommentVNode("",!0)])]))}},e5=["data-test-id"],t5=["placeholder","value","data-test-id"],n5=["data-test-id"],r5=["data-test-id","onClick"],o5=xe({__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:t=>["left","right"].includes(t)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(t,{emit:i}){const n=t,r=i,o=e.ref(""),c=e.ref(null),f=e.ref(!1),x=e.ref(null),y=e.ref(!0),u=e.computed(()=>y.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),s=async()=>{var C;if(await e.nextTick(),!x.value)return;const g=x.value.getBoundingClientRect(),b=window.innerHeight-g.bottom,v=Math.min(((C=n.options)==null?void 0:C.length)*40+20,200);y.value=b>=v},_=()=>{c.value=null,r("update:modelValue","")},a=l=>{const g=l.target.value;o.value&&(clearTimeout(o.value),o.value=null),o.value=setTimeout(()=>{r("update:modelValue",g)},500)},h=async()=>{f.value=!0,await s()},d=()=>{setTimeout(()=>{f.value=!1},150)},p=l=>{f.value=!1,o.value&&(clearTimeout(o.value),o.value=null),r("update:modelValue",l.label),r("optionClick",l)};return(l,g)=>{var m;return e.openBlock(),e.createElementBlock("div",{ref_key:"searchContainer",ref:x,class:e.normalizeClass(["molecule-search",{"icon-left":t.iconPosition==="left"}]),"data-test-id":t.dataTestId},[t.loading?(e.openBlock(),e.createBlock(ya,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${t.dataTestId}-loader`},null,8,["data-test-id"])):t.iconPosition==="left"||!t.modelValue?(e.openBlock(),e.createBlock(we,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${t.dataTestId}-search`,onClick:_},null,8,["data-test-id"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["search-input-box",{large:t.size==="large"}]),type:"text",style:e.normalizeStyle({height:`${t.height}px`}),placeholder:n.placeholder,value:t.modelValue,"data-test-id":`${t.dataTestId}-input`,onInput:a,onFocus:h,onBlur:d},null,46,t5),t.modelValue&&!t.loading?(e.openBlock(),e.createBlock(we,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${t.dataTestId}-close`,onClick:_},null,8,["data-test-id"])):e.createCommentVNode("",!0),((m=t.options)==null?void 0:m.length)>0&&f.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["search-options",{"dropdown-top":!y.value}]),style:e.normalizeStyle(u.value),"data-test-id":`${t.dataTestId}-dropdown`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(b,v)=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:"search-option","data-test-id":`${t.dataTestId}-option-${v}`,onClick:e.withModifiers(C=>p(b),["stop"]),onMousedown:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"]))},[e.createTextVNode(e.toDisplayString(b.label)+" ",1),e.createElementVNode("span",null,e.toDisplayString(b.subLabel),1)],40,r5))),128))],14,n5)):e.createCommentVNode("",!0)],10,e5)}}},[["__scopeId","data-v-6cdaa802"]]),a5=["data-test-id"],i5=xe({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:t=>["default","draft","review","active","inactive","in draft","active"].includes(t)},dataTestId:{type:String,default:""}},setup(t){const i=t,n=e.computed(()=>({"ect-state-pill--default":i.state==="default","ect-state-pill--draft":i.state==="draft"||i.state==="in draft","ect-state-pill--review":i.state==="review","ect-state-pill--active":i.state==="active","ect-state-pill--inactive":i.state==="inactive"}));return(r,o)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ect-state-pill",n.value]),"data-test-id":t.dataTestId},e.toDisplayString(t.text),11,a5))}},[["__scopeId","data-v-6be678b8"]]),l5=["data-test-id"],s5=["data-test-id"],c5=["data-test-id"],d5=["data-test-id"],u5=["data-test-id","onClick"],f5=["data-test-id"],h5=xe({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:t=>t.every(i=>typeof i=="object"&&typeof i.text=="string"&&(i.route===void 0||typeof i.route=="string"||typeof i.route=="object"))},dataTestId:{type:String,required:!0}},setup(t){const i=dn(),n=r=>{r&&i.push(r)};return(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":t.dataTestId},[e.createElementVNode("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${t.dataTestId}-container`},[e.createElementVNode("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${t.dataTestId}-breadcrumbs`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.links,(c,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f},[f>0?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${t.dataTestId}-separator-${f}`}," / ",8,d5)):e.createCommentVNode("",!0),c.route?(e.openBlock(),e.createElementBlock("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":`${t.dataTestId}-link-${f}`,onClick:x=>n(c.route)},e.toDisplayString(c.text),9,u5)):(e.openBlock(),e.createElementBlock("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${t.dataTestId}-text-${f}`},e.toDisplayString(c.text),9,f5))],64))),128))],8,c5)],8,s5)],8,l5))}},[["__scopeId","data-v-151ca816"]]),p5={components:{AppIcon:we},props:{direction:{type:String,default:"top",validator:t=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(t)},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}}},m5=["data-test-id"],g5=["data-test-id"];function y5(t,i,n,r,o,c){const f=e.resolveComponent("AppIcon");return n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tooltip-container","data-test-id":n.dataTestId,onMouseover:i[0]||(i[0]=(...x)=>c.showTooltip&&c.showTooltip(...x)),onMouseleave:i[1]||(i[1]=(...x)=>c.hideTooltip&&c.hideTooltip(...x))},[e.renderSlot(t.$slots,"default",{},void 0,!0),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(c.tooltipClass),style:e.normalizeStyle(c.styleObj),"data-test-id":`${n.dataTestId}-content`},[n.icon?(e.openBlock(),e.createBlock(f,{key:0,icon:n.icon,color:"#57c046",size:14,"data-test-id":`${n.dataTestId}-icon`},null,8,["icon","data-test-id"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.content),1)],14,g5),[[e.vShow,o.show]])],40,m5)):e.renderSlot(t.$slots,"default",{key:1},void 0,!0)}const x5=xe(p5,[["render",y5],["__scopeId","data-v-b36acc62"]]),v5=je.defineStore("item",()=>{const t=et(),i=e.ref([]),n=e.ref([]),r=e.ref(!1),o=e.ref(0),c=e.ref(1),f=e.ref(""),x=e.ref(20),y=e.ref(null),u=e.ref(!1),s=e.ref(null),_=e.ref(!1),a=e.ref(null),h=e.ref(null),d=e.ref(null),p=e.ref(null),l=e.ref(null),g=e.ref({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),m=e.ref([]),b=e.ref({ecatalogIds:[],optionItemsToAdd:[]}),v=e.ref(!1),C=e.ref(null),B=e.ref(0),w=2,S=R=>{!Array.isArray(R)||R.every(j=>{var U;return j.id&&((U=j.itemTypes)==null?void 0:U.every(Q=>{var Y;return Q.id&&((Y=Q.options)==null?void 0:Y.every(ne=>ne.id))}))})||R.forEach((j,U)=>{j.id||(j.id=`category-${U}-${j.category}`),j.itemTypes&&Array.isArray(j.itemTypes)&&j.itemTypes.forEach((Q,Y)=>{Q.id||(Q.id=Q.itemTypeId||`itemType-${U}-${Y}-${Q.itemTypeName||"unnamed"}`),Q.options&&Array.isArray(Q.options)&&Q.options.forEach((ne,ce)=>{ne.id||(ne.id=ne.itemId||`option-${U}-${Y}-${ce}-${ne.itemName||"unnamed"}`)})})})},I=async(R,$=null)=>{var j;try{_.value=!0;let U={};if($)U={fileId:$};else{const Y=m.value.find(ce=>ce.status==="Draft"),ne=m.value.find(ce=>ce.status==="Active");ne?U={fileId:ne.id}:Y?U={fileId:Y.id}:U={itemId:R}}let Q=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(U)});return Q!=null&&Q.errorMessage?(t.handleError(Q.errorMessage),null):(Q=Ue(Q.data),typeof Q.data=="string"&&(Q=JSON.parse(Q.data)),(j=Q==null?void 0:Q.productItem)!=null&&j.categoryOptions&&S(Q.productItem.categoryOptions),y.value=Q,_.value=!1,m.value.length===0&&!r.value&&await J(),Q.data)}catch(U){return _.value=!1,t.handleError("Failed to fetch item configuration. Please try again.",U),null}},A=async(R,$="",j="")=>{try{const U={searchTerm:R,itemTypeId:$,filterType:j};let Q=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(U)});return Q=Ue(Q),Q!=null&&Q.errorMessage?(t.handleError(Q.errorMessage),null):Q}catch{return t.handleError("Failed to fetch option list. Please try again."),null}},k=async(R,$)=>{try{const j={productItemId:l.value,optionItemId:R,existingItemType:$};let U=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(j)});return U=Ue(U),U!=null&&U.errorMessage?(t.handleError(U.errorMessage),null):U}catch{return t.handleError("Failed to fetch option details. Please try again."),null}},N=async()=>{try{const R=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(R)}catch{t.handleError("Failed to fetch available attributes. Please try again.")}},V=async R=>{try{const $=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(R)});return JSON.parse($)}catch{t.handleError("Failed to fetch item configuration. Please try again.")}},L=async R=>{try{const $=JSON.stringify(R),j=await window.AdminConfiguratorManager.getChildFields({request:$});return JSON.parse(j)}catch($){throw t.handleError("Failed to fetch child fields. Please try again.",$),$}},M=async()=>{const R={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(R)})).data}catch($){throw t.handleError("Failed to fetch picklist values. Please try again.",$),$}},Z=async()=>{var R,$,j;try{const U=($=(R=y.value)==null?void 0:R.productItem)==null?void 0:$.itemStatus,Y={fileId:(j=m.value.find(ce=>ce.status===U))==null?void 0:j.id,itemId:l.value};let ne=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(Y)});return ne!=null&&ne.error?(T(ne==null?void 0:ne.error),null):(ne=Ue(ne.data),g.value=ne,ne)}catch{return T(),null}},G=async()=>{try{const R={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(R)})).data}catch(R){t.handleError("Failed to fetch e catalogs for product. Please try again.",R)}},J=async()=>{try{const R={productId:l.value},$=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(R)}),j=JSON.parse($.data);return m.value=j.data,j}catch(R){t.handleError("Failed to save item configuration. Please try again.",R)}},K=async()=>{try{const R={ecatalogIds:b.value.ecatalogIds,productItemId:l.value,optionItemsToAdd:b.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(R)})).data}catch(R){t.handleError("Failed to save item configuration to catalog. Please try again.",R)}},F=async()=>{var R,$,j;try{const U=($=(R=y.value)==null?void 0:R.productItem)==null?void 0:$.itemStatus,Q={itemId:l.value,fileId:(j=m.value.find(fe=>fe.status===U))==null?void 0:j.id},Y=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(Q)}),ne=JSON.parse(Y);await J(),await I(l.value,ne.id);const ce=m.value.findIndex(fe=>fe.status==="Draft");return ce!==-1?m.value[ce]=ne:m.value.push(ne),ne}catch(U){t.handleError("Failed to create new version. Please try again.",U)}},E=async()=>{var U,Q;const R=(U=m.value.find(Y=>Y.status==="Inactive"))==null?void 0:U.id,$=(Q=m.value.find(Y=>Y.status==="Active"))==null?void 0:Q.id,j={itemId:l.value,activeVersionId:$,inactiveVersionId:R};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(j)})).data}catch(Y){t.handleError("Failed to rollback item configuration. Please try again.",Y)}},T=R=>{R?C.value=R:C.value=null,v.value=!0};return{items:i,loading:r,totalCount:o,currentPage:c,searchTerm:f,itemLimit:x,columns:n,currentItemConfig:y,savingItemConfiguration:u,currentItem:s,configLoader:_,currentItemData:a,currentGroupIndex:h,currentOptionIndex:d,currentOptionData:p,versionInfo:m,activateConfigData:g,activatePayload:b,itemId:l,showActivationErrorModal:v,activationError:C,activationRetryCount:B,maxRetries:w,getItemConfiguration:I,getItemsList:A,getItemDetails:k,getAvailableAttributes:N,addAttribute:V,getChildFields:L,getPicklistValues:M,activateItemConfig:Z,getECatalogsForProduct:G,getversionInfo:J,saveItemConfigToCatalog:K,createNewVersion:F,rollbackItemConfig:E,addCrossSell:async R=>{const $={itemId:R.id||R.itemId,primarySortOrder:R.primarySortOrder};try{const j=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify($)});return JSON.parse(j.data)}catch(j){return t.handleError("Failed to add cross sell. Please try again.",j),null}},saveItemConfiguration:async()=>{var R;if(_.value||r.value||u.value||!((R=y.value)!=null&&R.productItem))return null;if(!(y.value.productItem.itemStatus==="Active"||y.value.productItem.itemStatus==="Inactive"))try{u.value=!0;const $={itemId:l.value,configurationData:y.value},j=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify($)});if(j!=null&&j.errorMessage)return t.handleError(j.errorMessage),null;if(!(j!=null&&j.error)){const U=m.value.findIndex(Q=>Q.status==="Draft");m.value[U].id=j.data}return j}catch($){return t.handleError("Failed to save item configuration. Please try again.",$),null}finally{u.value=!1}},showActivationError:T,hideActivationError:()=>{v.value=!1,B.value=0},incrementRetryCount:()=>{B.value+=1,v.value=!0},canRetry:()=>B.value<w,assignStableIds:S}}),_5={class:"app-filters-main-wrapper"},b5={class:"app-filters-wrapper"},C5={class:"app-filters"},E5={class:"left-section"},k5={class:"ect-flex ect-gap-2 ect-items-center"},w5={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},N5={class:"right-section"},A5={class:"after-search-wrapper"},B5={class:"buttons-wrapper"},S5={class:"before-button-wrapper"},O5={key:0,class:"action-wrapper"},I5={key:1,class:"button-text ect-font-medium"},T5={key:2,class:"count-badge"},V5=xe({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:t=>t.every(i=>(i.icon||i.text)&&typeof i.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:t=>t.every(i=>typeof i=="object"&&typeof i.text=="string"&&(i.route===void 0||typeof i.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(t,{emit:i}){const n=v5(),r=t,o=e.reactive([]);e.onMounted(()=>{c()});const c=()=>{o.splice(0,o.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(a=>{o.push({...a})})};e.watch(()=>r.buttons,()=>{c()},{deep:!0});const f=a=>{x("search",a)},x=i,y=e.ref(""),u=(a,h)=>{a.supportsToggle&&(a.isActive=!a.isActive),typeof a.handler=="function"&&a.handler(a,a.isActive)},s=()=>{x("back")},_=()=>{if(!r.recordLink)return;let a=r.recordLink;if(!a){let g=n.itemId;if(!g){const m=new URLSearchParams(window.location.search),b=new URLSearchParams(window.location.hash.split("?")[1]);g=m.get("itemId")||b.get("itemId")}a=g}if(!a)return;const d=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!d){console.info("[ERROR]: Unable to extract base domain from current URL");return}const l=`${d[1]}/${a}`;window.open(l,"_blank")};return(a,h)=>(e.openBlock(),e.createElementBlock("div",_5,[e.createElementVNode("div",b5,[e.createElementVNode("div",C5,[e.createElementVNode("div",E5,[t.breadcrumbLinks&&t.breadcrumbLinks.length>1?(e.openBlock(),e.createBlock(h5,{key:0,links:t.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):e.createCommentVNode("",!0),e.createElementVNode("div",k5,[t.showBackButton?(e.openBlock(),e.createElementBlock("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:s},[e.createVNode(we,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):e.createCommentVNode("",!0),t.title?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(["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":t.recordLink}]),"data-test-id":"filter-header-title",onClick:h[0]||(h[0]=d=>t.recordLink?_():null)},[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.recordLink?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(we,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),e.createElementVNode("div",w5,[e.createVNode(x5,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),t.statusText?(e.openBlock(),e.createBlock(i5,{key:2,text:t.statusText,state:t.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"after-status",{},void 0,!0)])]),e.createElementVNode("div",N5,[t.showSearch?(e.openBlock(),e.createElementBlock("div",{key:0,class:"search-wrapper",style:e.normalizeStyle({width:t.searchWidth})},[e.createVNode(o5,{modelValue:y.value,"onUpdate:modelValue":[h[1]||(h[1]=d=>y.value=d),f],class:"search-input",placeholder:t.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):e.createCommentVNode("",!0),e.createElementVNode("div",A5,[e.renderSlot(a.$slots,"afterSearch",{},void 0,!0)]),e.createElementVNode("div",B5,[e.createElementVNode("div",S5,[e.renderSlot(a.$slots,"before-button",{},void 0,!0)]),a.$slots.buttons?(e.openBlock(),e.createElementBlock("div",O5,[e.renderSlot(a.$slots,"buttons",{},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o,(d,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"action-wrapper"},[e.createVNode(Je,{btype:d.type||"primary","button-style":d.style||"outlined",size:"medium",style:e.normalizeStyle({minWidth:d.minWidth||"auto"}),class:e.normalizeClass([{active:d.isActive},{"icon-only":d.icon&&!d.text},{"text-button":d.text}]),loading:d.loading,disabled:d.disabled,"data-test-id":`filter-header-button-${d.text?d.text.toLowerCase().replace(/\s+/g,"-"):p}`,onClick:l=>u(d)},{default:e.withCtx(()=>[d.icon?(e.openBlock(),e.createBlock(we,{key:0,icon:d.icon,symbol:"",color:d.color||"#136E05",size:d.size||14},null,8,["icon","color","size"])):e.createCommentVNode("",!0),d.text?(e.openBlock(),e.createElementBlock("span",I5,e.toDisplayString(d.isActive?d.altText:d.text),1)):e.createCommentVNode("",!0),d.count?(e.openBlock(),e.createElementBlock("span",T5,e.toDisplayString(d.count),1)):e.createCommentVNode("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),D5=["data-test-id"],L5=["data-test-id"],F5=["data-test-id"],R5=["data-test-id"],P5=["data-test-id"],M5=["data-test-id"],q5=["data-test-id"],$5=xe({__name:"ecSwitch",props:e.mergeModels({text:{type:[String,Object],required:!1,validator:t=>typeof t=="string"?!0:typeof t=="object"&&t!==null?Object.prototype.hasOwnProperty.call(t,"on")&&Object.prototype.hasOwnProperty.call(t,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:t=>["regular","large"].includes(t)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue"],["update:modelValue"]),setup(t,{emit:i}){const n=t,r=e.useModel(t,"modelValue"),o=i,c=e.computed(()=>typeof n.text=="string"?n.text:typeof n.text=="object"&&n.text!==null?r.value?n.text.on:n.text.off:""),f=()=>{n.disabled||o("update:modelValue",!r.value)};return(x,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ec-switch-container",{disabled:t.disabled}]),"data-test-id":t.dataTestId},[t.leftAlign?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ec-switch__label","data-test-id":`${t.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(c.value)+" ",1),t.subtext?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ec-switch__subtext","data-test-id":`${t.dataTestId}-subtext`},e.toDisplayString(t.subtext),9,F5)):e.createCommentVNode("",!0)],8,L5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":t.size==="large"}]),"data-test-id":`${t.dataTestId}-switch`,onClick:f},[e.createElementVNode("div",{class:"ec-switch__handle","data-test-id":`${t.dataTestId}-handle`},null,8,P5)],10,R5),t.leftAlign?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:1,class:"ec-switch__label","data-test-id":`${t.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(c.value)+" ",1),t.subtext?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ec-switch__subtext","data-test-id":`${t.dataTestId}-subtext`},e.toDisplayString(t.subtext),9,q5)):e.createCommentVNode("",!0)],8,M5))],10,D5))}},[["__scopeId","data-v-cfefad9a"]]),j5={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},H5={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},U5={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},z5={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"},X5=xe({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1}},setup(t){const i=ct(),n=e.ref(!1),r=e.ref(0),o=e.computed(()=>i.configuration),c=t,f=e.computed(()=>n.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>x()}]:[{text:c.qliId?"Save":"Add To Quote",altText:"Save",type:i.isChangedConfiguration?"primary":"secondary",style:"primary",disabled:!i.isChangedConfiguration,handler:()=>y()}]),x=()=>{n.value=!1},y=()=>{console.info("Save"),i.maintainQuoteConfiguration()};return(u,s)=>e.unref(i).configuration?(e.openBlock(),e.createElementBlock("div",j5,[e.unref(i).savedScreen?(e.openBlock(),e.createBlock(_d,{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",H5,[e.createElementVNode("div",U5,[e.createCommentVNode("",!0),e.createVNode(V5,{title:o.value.itemName,buttons:f.value},{"before-button":e.withCtx(()=>[e.unref(i).isYearlyPricingExist?(e.openBlock(),e.createBlock($5,{key:0,modelValue:e.unref(i).showYearlyPricing,"onUpdate:modelValue":[s[0]||(s[0]=_=>e.unref(i).showYearlyPricing=_),e.unref(i).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"])):e.createCommentVNode("",!0)]),_:1},8,["title","buttons"])]),e.createElementVNode("div",{class:e.normalizeClass(n.value?"ect-pb-16":"ect-pb-0")},[e.createVNode(Y2,{config:o.value,"edit-attributes":n.value,scroll:r.value,onEditAttributes:s[1]||(s[1]=_=>n.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",z5,[e.createVNode(H2)]))],64))])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-053a707f"]]),K5=["data-item-id","data-qli-id"],Q5={key:0,class:"ect-flex-1 ect-min-h-0"},Z5={key:1,class:"ect-flex-1 ect-min-h-0"},G5={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1}},emits:["ready"],setup(t,{emit:i}){const n=t,r=i,o=e.ref(!0),c=ct();return e.onBeforeMount(async()=>{o.value=!0,console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await c.initConfigurator(n.itemId,n.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready"),o.value=!1}),(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":t.itemId,"data-qli-id":t.qliId},[o.value?(e.openBlock(),e.createElementBlock("div",Z5,[e.createVNode(ga)])):(e.openBlock(),e.createElementBlock("div",Q5,[e.createVNode(X5,{"qli-id":t.qliId},null,8,["qli-id"])]))],8,K5))}},W5=(t=>(e.pushScopeId("data-v-0be41a52"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"dropdowntp"},null,-1)),Hr=xe({__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"],setup(t,{emit:i}){const n=si(),r=Vn(),o=et(),c=ct(),f=t,x=i,y=()=>{x("ready",c.exposeProperties())};return e.onBeforeMount(()=>{const{orgType:u,orgId:s,userId:_}=f.setupData;c.initializeController(f.apiKey,u,s,_),n.quoteId=f.quoteId,n.setSetupData(f.setupData)}),(u,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(xs),e.createVNode(yr),e.unref(o).errorPopup?(e.openBlock(),e.createBlock(os,{key:0,data:e.unref(o).errorPopup,onClose:s[0]||(s[0]=_=>e.unref(o).errorPopup=null)},null,8,["data"])):e.createCommentVNode("",!0),e.unref(r).unsavedChanges?(e.openBlock(),e.createBlock(ls,{key:1,data:e.unref(r).unsavedChanges,onClose:s[1]||(s[1]=_=>e.unref(r).unsavedChanges=null)},null,8,["data"])):e.createCommentVNode("",!0),W5,e.createVNode(G5,{"item-id":f.itemId,"qli-id":f.qliId,onReady:y},null,8,["item-id","qli-id"])],64))}},[["__scopeId","data-v-0be41a52"]]),J5=je.defineStore("mygpt",()=>{const t=e.ref("");async function i(r,o="gpt-3.5-turbo",c=300){var f,x,y;if(!t.value)throw new Error("Secret key is required. Please set it in the store.");try{const u=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.value}`},body:JSON.stringify({model:o,messages:r,max_tokens:Math.min(c,300),temperature:.7})});if(!u.ok){const _=await u.json().catch(()=>({}));throw new Error(((f=_.error)==null?void 0:f.message)||`API Error: ${u.status} ${u.statusText}`)}return((y=(x=(await u.json()).choices[0])==null?void 0:x.message)==null?void 0:y.content)||"No response generated"}catch(u){throw new Error(u.message||"Failed to get response from GPT")}}function n(r){t.value=r}return{secretKey:t,getGptResponse:i,setSecretKey:n}}),vn=t=>(e.pushScopeId("data-v-46273585"),t=t(),e.popScopeId(),t),Y5={class:"custom-gpt-container"},eh={class:"gpt-header"},th=vn(()=>e.createElementVNode("h3",{class:"gpt-title"},"GPT Chat",-1)),nh={class:"gpt-response-area"},rh={key:0,class:"loading-indicator"},oh=[vn(()=>e.createElementVNode("div",{class:"spinner"},null,-1)),vn(()=>e.createElementVNode("span",null,"Thinking...",-1))],ah={key:1,class:"error-message"},ih=vn(()=>e.createElementVNode("strong",null,"Error:",-1)),lh={key:2,class:"response-content"},sh={key:3,class:"empty-state"},ch=[vn(()=>e.createElementVNode("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],dh={class:"gpt-input-area"},uh={class:"input-wrapper"},fh=["placeholder","disabled"],hh=["disabled"],ph={key:0},mh={key:1},gh={key:0,class:"warning-message"},Ur=xe({__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(t){const i=t,n=J5(),r=e.computed(()=>i.secretKey||n.secretKey),o=e.ref(""),c=e.ref(""),f=e.ref(!1),x=e.ref(null),y=e.ref([]),u=e.computed(()=>c.value.trim().length>0),s=e.computed(()=>o.value.trim().length>0&&!f.value&&r.value),_=async()=>{if(!s.value)return;const d=o.value.trim();if(d){f.value=!0,x.value=null,o.value="";try{y.value.push({role:"user",content:d});const p=y.value.reduce((m,b)=>m+Math.ceil(b.content.length/4),0);let l=[...y.value];p>i.maxTokens&&(l=y.value.slice(-3));const g=await n.getGptResponse(l,i.model,i.maxTokens);c.value=g,y.value.push({role:"assistant",content:g})}catch(p){x.value=p.message||"Failed to get response from GPT",console.error("GPT API Error:",p)}finally{f.value=!1}}},a=d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),_())},h=()=>{y.value=[],c.value="",x.value=null};return e.onBeforeMount(()=>{n.setSecretKey(i.secretKey)}),(d,p)=>(e.openBlock(),e.createElementBlock("div",Y5,[e.createElementVNode("div",eh,[th,u.value||y.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:h,class:"clear-button",type:"button"}," Clear ")):e.createCommentVNode("",!0)]),e.createElementVNode("div",nh,[f.value?(e.openBlock(),e.createElementBlock("div",rh,oh)):x.value?(e.openBlock(),e.createElementBlock("div",ah,[ih,e.createTextVNode(" "+e.toDisplayString(x.value),1)])):u.value?(e.openBlock(),e.createElementBlock("div",lh,e.toDisplayString(c.value),1)):(e.openBlock(),e.createElementBlock("div",sh,ch))]),e.createElementVNode("div",dh,[e.createElementVNode("div",uh,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":p[0]||(p[0]=l=>o.value=l),placeholder:t.placeholder,disabled:f.value||!r.value,onKeypress:a,class:"gpt-input",rows:"3"},null,40,fh),[[e.vModelText,o.value]]),e.createElementVNode("button",{onClick:_,disabled:!s.value,class:"send-button",type:"button"},[f.value?(e.openBlock(),e.createElementBlock("span",ph,"...")):(e.openBlock(),e.createElementBlock("span",mh,"Send"))],8,hh)]),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",gh," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]),tr="tsocustomer2.expedite1.com",_n="https://csimqu3mn5g6pjhq6mki4qdayu.appsync-api.us-east-1.amazonaws.com/graphql",nr="da2-vag5nadijfegloywmu7rikapfi";var wi={exports:{}};function yh(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zr={exports:{}};const xh=Eu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ni;function _e(){return Ni||(Ni=1,function(t,i){(function(n,r){t.exports=r()})(ue,function(){var n=n||function(r,o){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof ue<"u"&&ue.crypto&&(c=ue.crypto),!c&&typeof yh=="function")try{c=xh}catch{}var f=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},x=Object.create||function(){function m(){}return function(b){var v;return m.prototype=b,v=new m,m.prototype=null,v}}(),y={},u=y.lib={},s=u.Base=function(){return{extend:function(m){var b=x(this);return m&&b.mixIn(m),(!b.hasOwnProperty("init")||this.init===b.init)&&(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var m=this.extend();return m.init.apply(m,arguments),m},init:function(){},mixIn:function(m){for(var b in m)m.hasOwnProperty(b)&&(this[b]=m[b]);m.hasOwnProperty("toString")&&(this.toString=m.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),_=u.WordArray=s.extend({init:function(m,b){m=this.words=m||[],b!=o?this.sigBytes=b:this.sigBytes=m.length*4},toString:function(m){return(m||h).stringify(this)},concat:function(m){var b=this.words,v=m.words,C=this.sigBytes,B=m.sigBytes;if(this.clamp(),C%4)for(var w=0;w<B;w++){var S=v[w>>>2]>>>24-w%4*8&255;b[C+w>>>2]|=S<<24-(C+w)%4*8}else for(var I=0;I<B;I+=4)b[C+I>>>2]=v[I>>>2];return this.sigBytes+=B,this},clamp:function(){var m=this.words,b=this.sigBytes;m[b>>>2]&=4294967295<<32-b%4*8,m.length=r.ceil(b/4)},clone:function(){var m=s.clone.call(this);return m.words=this.words.slice(0),m},random:function(m){for(var b=[],v=0;v<m;v+=4)b.push(f());return new _.init(b,m)}}),a=y.enc={},h=a.Hex={stringify:function(m){for(var b=m.words,v=m.sigBytes,C=[],B=0;B<v;B++){var w=b[B>>>2]>>>24-B%4*8&255;C.push((w>>>4).toString(16)),C.push((w&15).toString(16))}return C.join("")},parse:function(m){for(var b=m.length,v=[],C=0;C<b;C+=2)v[C>>>3]|=parseInt(m.substr(C,2),16)<<24-C%8*4;return new _.init(v,b/2)}},d=a.Latin1={stringify:function(m){for(var b=m.words,v=m.sigBytes,C=[],B=0;B<v;B++){var w=b[B>>>2]>>>24-B%4*8&255;C.push(String.fromCharCode(w))}return C.join("")},parse:function(m){for(var b=m.length,v=[],C=0;C<b;C++)v[C>>>2]|=(m.charCodeAt(C)&255)<<24-C%4*8;return new _.init(v,b)}},p=a.Utf8={stringify:function(m){try{return decodeURIComponent(escape(d.stringify(m)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(m){return d.parse(unescape(encodeURIComponent(m)))}},l=u.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new _.init,this._nDataBytes=0},_append:function(m){typeof m=="string"&&(m=p.parse(m)),this._data.concat(m),this._nDataBytes+=m.sigBytes},_process:function(m){var b,v=this._data,C=v.words,B=v.sigBytes,w=this.blockSize,S=w*4,I=B/S;m?I=r.ceil(I):I=r.max((I|0)-this._minBufferSize,0);var A=I*w,k=r.min(A*4,B);if(A){for(var N=0;N<A;N+=w)this._doProcessBlock(C,N);b=C.splice(0,A),v.sigBytes-=k}return new _.init(b,k)},clone:function(){var m=s.clone.call(this);return m._data=this._data.clone(),m},_minBufferSize:0});u.Hasher=l.extend({cfg:s.extend(),init:function(m){this.cfg=this.cfg.extend(m),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(m){return this._append(m),this._process(),this},finalize:function(m){m&&this._append(m);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(m){return function(b,v){return new m.init(v).finalize(b)}},_createHmacHelper:function(m){return function(b,v){return new g.HMAC.init(m,v).finalize(b)}}});var g=y.algo={};return y}(Math);return n})}(zr)),zr.exports}var Xr={exports:{}},Ai;function rr(){return Ai||(Ai=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.Base,x=c.WordArray,y=o.x64={};y.Word=f.extend({init:function(u,s){this.high=u,this.low=s}}),y.WordArray=f.extend({init:function(u,s){u=this.words=u||[],s!=r?this.sigBytes=s:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,s=u.length,_=[],a=0;a<s;a++){var h=u[a];_.push(h.high),_.push(h.low)}return x.create(_,this.sigBytes)},clone:function(){for(var u=f.clone.call(this),s=u.words=this.words.slice(0),_=s.length,a=0;a<_;a++)s[a]=s[a].clone();return u}})}(),n})}(Xr)),Xr.exports}var Kr={exports:{}},Bi;function vh(){return Bi||(Bi=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,o=r.lib,c=o.WordArray,f=c.init,x=c.init=function(y){if(y instanceof ArrayBuffer&&(y=new Uint8Array(y)),(y instanceof Int8Array||typeof Uint8ClampedArray<"u"&&y instanceof Uint8ClampedArray||y instanceof Int16Array||y instanceof Uint16Array||y instanceof Int32Array||y instanceof Uint32Array||y instanceof Float32Array||y instanceof Float64Array)&&(y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength)),y instanceof Uint8Array){for(var u=y.byteLength,s=[],_=0;_<u;_++)s[_>>>2]|=y[_]<<24-_%4*8;f.call(this,s,u)}else f.apply(this,arguments)};x.prototype=c}}(),n.lib.WordArray})}(Kr)),Kr.exports}var Qr={exports:{}},Si;function _h(){return Si||(Si=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.enc;f.Utf16=f.Utf16BE={stringify:function(y){for(var u=y.words,s=y.sigBytes,_=[],a=0;a<s;a+=2){var h=u[a>>>2]>>>16-a%4*8&65535;_.push(String.fromCharCode(h))}return _.join("")},parse:function(y){for(var u=y.length,s=[],_=0;_<u;_++)s[_>>>1]|=y.charCodeAt(_)<<16-_%2*16;return c.create(s,u*2)}},f.Utf16LE={stringify:function(y){for(var u=y.words,s=y.sigBytes,_=[],a=0;a<s;a+=2){var h=x(u[a>>>2]>>>16-a%4*8&65535);_.push(String.fromCharCode(h))}return _.join("")},parse:function(y){for(var u=y.length,s=[],_=0;_<u;_++)s[_>>>1]|=x(y.charCodeAt(_)<<16-_%2*16);return c.create(s,u*2)}};function x(y){return y<<8&4278255360|y>>>8&16711935}}(),n.enc.Utf16})}(Qr)),Qr.exports}var Zr={exports:{}},Oi;function Mt(){return Oi||(Oi=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.enc;f.Base64={stringify:function(y){var u=y.words,s=y.sigBytes,_=this._map;y.clamp();for(var a=[],h=0;h<s;h+=3)for(var d=u[h>>>2]>>>24-h%4*8&255,p=u[h+1>>>2]>>>24-(h+1)%4*8&255,l=u[h+2>>>2]>>>24-(h+2)%4*8&255,g=d<<16|p<<8|l,m=0;m<4&&h+m*.75<s;m++)a.push(_.charAt(g>>>6*(3-m)&63));var b=_.charAt(64);if(b)for(;a.length%4;)a.push(b);return a.join("")},parse:function(y){var u=y.length,s=this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var a=0;a<s.length;a++)_[s.charCodeAt(a)]=a}var h=s.charAt(64);if(h){var d=y.indexOf(h);d!==-1&&(u=d)}return x(y,u,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(y,u,s){for(var _=[],a=0,h=0;h<u;h++)if(h%4){var d=s[y.charCodeAt(h-1)]<<h%4*2,p=s[y.charCodeAt(h)]>>>6-h%4*2,l=d|p;_[a>>>2]|=l<<24-a%4*8,a++}return c.create(_,a)}}(),n.enc.Base64})}(Zr)),Zr.exports}var Gr={exports:{}},Ii;function bh(){return Ii||(Ii=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.enc;f.Base64url={stringify:function(y,u){u===void 0&&(u=!0);var s=y.words,_=y.sigBytes,a=u?this._safe_map:this._map;y.clamp();for(var h=[],d=0;d<_;d+=3)for(var p=s[d>>>2]>>>24-d%4*8&255,l=s[d+1>>>2]>>>24-(d+1)%4*8&255,g=s[d+2>>>2]>>>24-(d+2)%4*8&255,m=p<<16|l<<8|g,b=0;b<4&&d+b*.75<_;b++)h.push(a.charAt(m>>>6*(3-b)&63));var v=a.charAt(64);if(v)for(;h.length%4;)h.push(v);return h.join("")},parse:function(y,u){u===void 0&&(u=!0);var s=y.length,_=u?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var h=0;h<_.length;h++)a[_.charCodeAt(h)]=h}var d=_.charAt(64);if(d){var p=y.indexOf(d);p!==-1&&(s=p)}return x(y,s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(y,u,s){for(var _=[],a=0,h=0;h<u;h++)if(h%4){var d=s[y.charCodeAt(h-1)]<<h%4*2,p=s[y.charCodeAt(h)]>>>6-h%4*2,l=d|p;_[a>>>2]|=l<<24-a%4*8,a++}return c.create(_,a)}}(),n.enc.Base64url})}(Gr)),Gr.exports}var Wr={exports:{}},Ti;function qt(){return Ti||(Ti=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.WordArray,x=c.Hasher,y=o.algo,u=[];(function(){for(var p=0;p<64;p++)u[p]=r.abs(r.sin(p+1))*4294967296|0})();var s=y.MD5=x.extend({_doReset:function(){this._hash=new f.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,l){for(var g=0;g<16;g++){var m=l+g,b=p[m];p[m]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var v=this._hash.words,C=p[l+0],B=p[l+1],w=p[l+2],S=p[l+3],I=p[l+4],A=p[l+5],k=p[l+6],N=p[l+7],V=p[l+8],L=p[l+9],M=p[l+10],Z=p[l+11],G=p[l+12],J=p[l+13],K=p[l+14],F=p[l+15],E=v[0],T=v[1],D=v[2],P=v[3];E=_(E,T,D,P,C,7,u[0]),P=_(P,E,T,D,B,12,u[1]),D=_(D,P,E,T,w,17,u[2]),T=_(T,D,P,E,S,22,u[3]),E=_(E,T,D,P,I,7,u[4]),P=_(P,E,T,D,A,12,u[5]),D=_(D,P,E,T,k,17,u[6]),T=_(T,D,P,E,N,22,u[7]),E=_(E,T,D,P,V,7,u[8]),P=_(P,E,T,D,L,12,u[9]),D=_(D,P,E,T,M,17,u[10]),T=_(T,D,P,E,Z,22,u[11]),E=_(E,T,D,P,G,7,u[12]),P=_(P,E,T,D,J,12,u[13]),D=_(D,P,E,T,K,17,u[14]),T=_(T,D,P,E,F,22,u[15]),E=a(E,T,D,P,B,5,u[16]),P=a(P,E,T,D,k,9,u[17]),D=a(D,P,E,T,Z,14,u[18]),T=a(T,D,P,E,C,20,u[19]),E=a(E,T,D,P,A,5,u[20]),P=a(P,E,T,D,M,9,u[21]),D=a(D,P,E,T,F,14,u[22]),T=a(T,D,P,E,I,20,u[23]),E=a(E,T,D,P,L,5,u[24]),P=a(P,E,T,D,K,9,u[25]),D=a(D,P,E,T,S,14,u[26]),T=a(T,D,P,E,V,20,u[27]),E=a(E,T,D,P,J,5,u[28]),P=a(P,E,T,D,w,9,u[29]),D=a(D,P,E,T,N,14,u[30]),T=a(T,D,P,E,G,20,u[31]),E=h(E,T,D,P,A,4,u[32]),P=h(P,E,T,D,V,11,u[33]),D=h(D,P,E,T,Z,16,u[34]),T=h(T,D,P,E,K,23,u[35]),E=h(E,T,D,P,B,4,u[36]),P=h(P,E,T,D,I,11,u[37]),D=h(D,P,E,T,N,16,u[38]),T=h(T,D,P,E,M,23,u[39]),E=h(E,T,D,P,J,4,u[40]),P=h(P,E,T,D,C,11,u[41]),D=h(D,P,E,T,S,16,u[42]),T=h(T,D,P,E,k,23,u[43]),E=h(E,T,D,P,L,4,u[44]),P=h(P,E,T,D,G,11,u[45]),D=h(D,P,E,T,F,16,u[46]),T=h(T,D,P,E,w,23,u[47]),E=d(E,T,D,P,C,6,u[48]),P=d(P,E,T,D,N,10,u[49]),D=d(D,P,E,T,K,15,u[50]),T=d(T,D,P,E,A,21,u[51]),E=d(E,T,D,P,G,6,u[52]),P=d(P,E,T,D,S,10,u[53]),D=d(D,P,E,T,M,15,u[54]),T=d(T,D,P,E,B,21,u[55]),E=d(E,T,D,P,V,6,u[56]),P=d(P,E,T,D,F,10,u[57]),D=d(D,P,E,T,k,15,u[58]),T=d(T,D,P,E,J,21,u[59]),E=d(E,T,D,P,I,6,u[60]),P=d(P,E,T,D,Z,10,u[61]),D=d(D,P,E,T,w,15,u[62]),T=d(T,D,P,E,L,21,u[63]),v[0]=v[0]+E|0,v[1]=v[1]+T|0,v[2]=v[2]+D|0,v[3]=v[3]+P|0},_doFinalize:function(){var p=this._data,l=p.words,g=this._nDataBytes*8,m=p.sigBytes*8;l[m>>>5]|=128<<24-m%32;var b=r.floor(g/4294967296),v=g;l[(m+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,l[(m+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,p.sigBytes=(l.length+1)*4,this._process();for(var C=this._hash,B=C.words,w=0;w<4;w++){var S=B[w];B[w]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return C},clone:function(){var p=x.clone.call(this);return p._hash=this._hash.clone(),p}});function _(p,l,g,m,b,v,C){var B=p+(l&g|~l&m)+b+C;return(B<<v|B>>>32-v)+l}function a(p,l,g,m,b,v,C){var B=p+(l&m|g&~m)+b+C;return(B<<v|B>>>32-v)+l}function h(p,l,g,m,b,v,C){var B=p+(l^g^m)+b+C;return(B<<v|B>>>32-v)+l}function d(p,l,g,m,b,v,C){var B=p+(g^(l|~m))+b+C;return(B<<v|B>>>32-v)+l}o.MD5=x._createHelper(s),o.HmacMD5=x._createHmacHelper(s)}(Math),n.MD5})}(Wr)),Wr.exports}var Jr={exports:{}},Vi;function Di(){return Vi||(Vi=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=o.Hasher,x=r.algo,y=[],u=x.SHA1=f.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,_){for(var a=this._hash.words,h=a[0],d=a[1],p=a[2],l=a[3],g=a[4],m=0;m<80;m++){if(m<16)y[m]=s[_+m]|0;else{var b=y[m-3]^y[m-8]^y[m-14]^y[m-16];y[m]=b<<1|b>>>31}var v=(h<<5|h>>>27)+g+y[m];m<20?v+=(d&p|~d&l)+1518500249:m<40?v+=(d^p^l)+1859775393:m<60?v+=(d&p|d&l|p&l)-1894007588:v+=(d^p^l)-899497514,g=l,l=p,p=d<<30|d>>>2,d=h,h=v}a[0]=a[0]+h|0,a[1]=a[1]+d|0,a[2]=a[2]+p|0,a[3]=a[3]+l|0,a[4]=a[4]+g|0},_doFinalize:function(){var s=this._data,_=s.words,a=this._nDataBytes*8,h=s.sigBytes*8;return _[h>>>5]|=128<<24-h%32,_[(h+64>>>9<<4)+14]=Math.floor(a/4294967296),_[(h+64>>>9<<4)+15]=a,s.sigBytes=_.length*4,this._process(),this._hash},clone:function(){var s=f.clone.call(this);return s._hash=this._hash.clone(),s}});r.SHA1=f._createHelper(u),r.HmacSHA1=f._createHmacHelper(u)}(),n.SHA1})}(Jr)),Jr.exports}var Yr={exports:{}},Li;function eo(){return Li||(Li=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.WordArray,x=c.Hasher,y=o.algo,u=[],s=[];(function(){function h(g){for(var m=r.sqrt(g),b=2;b<=m;b++)if(!(g%b))return!1;return!0}function d(g){return(g-(g|0))*4294967296|0}for(var p=2,l=0;l<64;)h(p)&&(l<8&&(u[l]=d(r.pow(p,1/2))),s[l]=d(r.pow(p,1/3)),l++),p++})();var _=[],a=y.SHA256=x.extend({_doReset:function(){this._hash=new f.init(u.slice(0))},_doProcessBlock:function(h,d){for(var p=this._hash.words,l=p[0],g=p[1],m=p[2],b=p[3],v=p[4],C=p[5],B=p[6],w=p[7],S=0;S<64;S++){if(S<16)_[S]=h[d+S]|0;else{var I=_[S-15],A=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,k=_[S-2],N=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;_[S]=A+_[S-7]+N+_[S-16]}var V=v&C^~v&B,L=l&g^l&m^g&m,M=(l<<30|l>>>2)^(l<<19|l>>>13)^(l<<10|l>>>22),Z=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),G=w+Z+V+s[S]+_[S],J=M+L;w=B,B=C,C=v,v=b+G|0,b=m,m=g,g=l,l=G+J|0}p[0]=p[0]+l|0,p[1]=p[1]+g|0,p[2]=p[2]+m|0,p[3]=p[3]+b|0,p[4]=p[4]+v|0,p[5]=p[5]+C|0,p[6]=p[6]+B|0,p[7]=p[7]+w|0},_doFinalize:function(){var h=this._data,d=h.words,p=this._nDataBytes*8,l=h.sigBytes*8;return d[l>>>5]|=128<<24-l%32,d[(l+64>>>9<<4)+14]=r.floor(p/4294967296),d[(l+64>>>9<<4)+15]=p,h.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var h=x.clone.call(this);return h._hash=this._hash.clone(),h}});o.SHA256=x._createHelper(a),o.HmacSHA256=x._createHmacHelper(a)}(Math),n.SHA256})}(Yr)),Yr.exports}var to={exports:{}},Fi;function Ch(){return Fi||(Fi=1,function(t,i){(function(n,r,o){t.exports=r(_e(),eo())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.algo,x=f.SHA256,y=f.SHA224=x.extend({_doReset:function(){this._hash=new c.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=x._doFinalize.call(this);return u.sigBytes-=4,u}});r.SHA224=x._createHelper(y),r.HmacSHA224=x._createHmacHelper(y)}(),n.SHA224})}(to)),to.exports}var no={exports:{}},Ri;function Pi(){return Ri||(Ri=1,function(t,i){(function(n,r,o){t.exports=r(_e(),rr())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.Hasher,f=r.x64,x=f.Word,y=f.WordArray,u=r.algo;function s(){return x.create.apply(x,arguments)}var _=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];(function(){for(var d=0;d<80;d++)a[d]=s()})();var h=u.SHA512=c.extend({_doReset:function(){this._hash=new y.init([new x.init(1779033703,4089235720),new x.init(3144134277,2227873595),new x.init(1013904242,4271175723),new x.init(2773480762,1595750129),new x.init(1359893119,2917565137),new x.init(2600822924,725511199),new x.init(528734635,4215389547),new x.init(1541459225,327033209)])},_doProcessBlock:function(d,p){for(var l=this._hash.words,g=l[0],m=l[1],b=l[2],v=l[3],C=l[4],B=l[5],w=l[6],S=l[7],I=g.high,A=g.low,k=m.high,N=m.low,V=b.high,L=b.low,M=v.high,Z=v.low,G=C.high,J=C.low,K=B.high,F=B.low,E=w.high,T=w.low,D=S.high,P=S.low,X=I,q=A,z=k,R=N,$=V,j=L,U=M,Q=Z,Y=G,ne=J,ce=K,fe=F,se=E,re=T,te=D,ie=P,le=0;le<80;le++){var ae,pe,he=a[le];if(le<16)pe=he.high=d[p+le*2]|0,ae=he.low=d[p+le*2+1]|0;else{var me=a[le-15],Ae=me.high,Be=me.low,Ee=(Ae>>>1|Be<<31)^(Ae>>>8|Be<<24)^Ae>>>7,ht=(Be>>>1|Ae<<31)^(Be>>>8|Ae<<24)^(Be>>>7|Ae<<25),ve=a[le-2],Oe=ve.high,pt=ve.low,kn=(Oe>>>19|pt<<13)^(Oe<<3|pt>>>29)^Oe>>>6,St=(pt>>>19|Oe<<13)^(pt<<3|Oe>>>29)^(pt>>>6|Oe<<26),Ct=a[le-7],nn=Ct.high,Ot=Ct.low,mt=a[le-16],We=mt.high,Et=mt.low;ae=ht+Ot,pe=Ee+nn+(ae>>>0<ht>>>0?1:0),ae=ae+St,pe=pe+kn+(ae>>>0<St>>>0?1:0),ae=ae+Et,pe=pe+We+(ae>>>0<Et>>>0?1:0),he.high=pe,he.low=ae}var Ht=Y&ce^~Y&se,gt=ne&fe^~ne&re,Ut=X&z^X&$^z&$,kt=q&R^q&j^R&j,zt=(X>>>28|q<<4)^(X<<30|q>>>2)^(X<<25|q>>>7),It=(q>>>28|X<<4)^(q<<30|X>>>2)^(q<<25|X>>>7),Xt=(Y>>>14|ne<<18)^(Y>>>18|ne<<14)^(Y<<23|ne>>>9),yt=(ne>>>14|Y<<18)^(ne>>>18|Y<<14)^(ne<<23|Y>>>9),Kt=_[le],it=Kt.high,rn=Kt.low,Le=ie+yt,Ye=te+Xt+(Le>>>0<ie>>>0?1:0),Le=Le+gt,Ye=Ye+Ht+(Le>>>0<gt>>>0?1:0),Le=Le+rn,Ye=Ye+it+(Le>>>0<rn>>>0?1:0),Le=Le+ae,Ye=Ye+pe+(Le>>>0<ae>>>0?1:0),Qt=It+kt,Zt=zt+Ut+(Qt>>>0<It>>>0?1:0);te=se,ie=re,se=ce,re=fe,ce=Y,fe=ne,ne=Q+Le|0,Y=U+Ye+(ne>>>0<Q>>>0?1:0)|0,U=$,Q=j,$=z,j=R,z=X,R=q,q=Le+Qt|0,X=Ye+Zt+(q>>>0<Le>>>0?1:0)|0}A=g.low=A+q,g.high=I+X+(A>>>0<q>>>0?1:0),N=m.low=N+R,m.high=k+z+(N>>>0<R>>>0?1:0),L=b.low=L+j,b.high=V+$+(L>>>0<j>>>0?1:0),Z=v.low=Z+Q,v.high=M+U+(Z>>>0<Q>>>0?1:0),J=C.low=J+ne,C.high=G+Y+(J>>>0<ne>>>0?1:0),F=B.low=F+fe,B.high=K+ce+(F>>>0<fe>>>0?1:0),T=w.low=T+re,w.high=E+se+(T>>>0<re>>>0?1:0),P=S.low=P+ie,S.high=D+te+(P>>>0<ie>>>0?1:0)},_doFinalize:function(){var d=this._data,p=d.words,l=this._nDataBytes*8,g=d.sigBytes*8;p[g>>>5]|=128<<24-g%32,p[(g+128>>>10<<5)+30]=Math.floor(l/4294967296),p[(g+128>>>10<<5)+31]=l,d.sigBytes=p.length*4,this._process();var m=this._hash.toX32();return m},clone:function(){var d=c.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:1024/32});r.SHA512=c._createHelper(h),r.HmacSHA512=c._createHmacHelper(h)}(),n.SHA512})}(no)),no.exports}var ro={exports:{}},Mi;function Eh(){return Mi||(Mi=1,function(t,i){(function(n,r,o){t.exports=r(_e(),rr(),Pi())})(ue,function(n){return function(){var r=n,o=r.x64,c=o.Word,f=o.WordArray,x=r.algo,y=x.SHA512,u=x.SHA384=y.extend({_doReset:function(){this._hash=new f.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var s=y._doFinalize.call(this);return s.sigBytes-=16,s}});r.SHA384=y._createHelper(u),r.HmacSHA384=y._createHmacHelper(u)}(),n.SHA384})}(ro)),ro.exports}var oo={exports:{}},qi;function kh(){return qi||(qi=1,function(t,i){(function(n,r,o){t.exports=r(_e(),rr())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.WordArray,x=c.Hasher,y=o.x64,u=y.Word,s=o.algo,_=[],a=[],h=[];(function(){for(var l=1,g=0,m=0;m<24;m++){_[l+5*g]=(m+1)*(m+2)/2%64;var b=g%5,v=(2*l+3*g)%5;l=b,g=v}for(var l=0;l<5;l++)for(var g=0;g<5;g++)a[l+5*g]=g+(2*l+3*g)%5*5;for(var C=1,B=0;B<24;B++){for(var w=0,S=0,I=0;I<7;I++){if(C&1){var A=(1<<I)-1;A<32?S^=1<<A:w^=1<<A-32}C&128?C=C<<1^113:C<<=1}h[B]=u.create(w,S)}})();var d=[];(function(){for(var l=0;l<25;l++)d[l]=u.create()})();var p=s.SHA3=x.extend({cfg:x.cfg.extend({outputLength:512}),_doReset:function(){for(var l=this._state=[],g=0;g<25;g++)l[g]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(l,g){for(var m=this._state,b=this.blockSize/2,v=0;v<b;v++){var C=l[g+2*v],B=l[g+2*v+1];C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360;var w=m[v];w.high^=B,w.low^=C}for(var S=0;S<24;S++){for(var I=0;I<5;I++){for(var A=0,k=0,N=0;N<5;N++){var w=m[I+5*N];A^=w.high,k^=w.low}var V=d[I];V.high=A,V.low=k}for(var I=0;I<5;I++)for(var L=d[(I+4)%5],M=d[(I+1)%5],Z=M.high,G=M.low,A=L.high^(Z<<1|G>>>31),k=L.low^(G<<1|Z>>>31),N=0;N<5;N++){var w=m[I+5*N];w.high^=A,w.low^=k}for(var J=1;J<25;J++){var A,k,w=m[J],K=w.high,F=w.low,E=_[J];E<32?(A=K<<E|F>>>32-E,k=F<<E|K>>>32-E):(A=F<<E-32|K>>>64-E,k=K<<E-32|F>>>64-E);var T=d[a[J]];T.high=A,T.low=k}var D=d[0],P=m[0];D.high=P.high,D.low=P.low;for(var I=0;I<5;I++)for(var N=0;N<5;N++){var J=I+5*N,w=m[J],X=d[J],q=d[(I+1)%5+5*N],z=d[(I+2)%5+5*N];w.high=X.high^~q.high&z.high,w.low=X.low^~q.low&z.low}var w=m[0],R=h[S];w.high^=R.high,w.low^=R.low}},_doFinalize:function(){var l=this._data,g=l.words;this._nDataBytes*8;var m=l.sigBytes*8,b=this.blockSize*32;g[m>>>5]|=1<<24-m%32,g[(r.ceil((m+1)/b)*b>>>5)-1]|=128,l.sigBytes=g.length*4,this._process();for(var v=this._state,C=this.cfg.outputLength/8,B=C/8,w=[],S=0;S<B;S++){var I=v[S],A=I.high,k=I.low;A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,w.push(k),w.push(A)}return new f.init(w,C)},clone:function(){for(var l=x.clone.call(this),g=l._state=this._state.slice(0),m=0;m<25;m++)g[m]=g[m].clone();return l}});o.SHA3=x._createHelper(p),o.HmacSHA3=x._createHmacHelper(p)}(Math),n.SHA3})}(oo)),oo.exports}var ao={exports:{}},$i;function wh(){return $i||($i=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){/** @preserve
|
|
63
|
+
or use v-on:ready="onReady(quill)" event instead.`},m=(k,N)=>t.contentType==="html"?B():t.contentType==="text"?v(k,N):n==null?void 0:n.getContents(k,N),b=(k,N="api")=>{const V=k||(t.contentType==="delta"?new Pu:"");t.contentType==="html"?w(V):t.contentType==="text"?C(V,N):n==null||n.setContents(V,N),u=x(V)},v=(k,N)=>{var V;return(V=n==null?void 0:n.getText(k,N))!==null&&V!==void 0?V:""},C=(k,N="api")=>{n==null||n.setText(k,N)},B=()=>{var k;return(k=n==null?void 0:n.root.innerHTML)!==null&&k!==void 0?k:""},w=k=>{n&&(n.root.innerHTML=k)},S=(k,N="api")=>{const V=n==null?void 0:n.clipboard.convert(k);V&&(n==null||n.setContents(V,N))},I=()=>{n==null||n.focus()},A=()=>{e.nextTick(()=>{var k;!i.slots.toolbar&&n&&((k=n.getModule("toolbar"))===null||k===void 0||k.container.remove()),c()})};return e.watch(()=>t.content,k=>{if(!n||!k||s(k))return;const N=n.getSelection();N&&e.nextTick(()=>n==null?void 0:n.setSelection(N)),b(k)},{deep:!0}),e.watch(()=>t.enable,k=>{n&&n.enable(k)}),{editor:o,getEditor:p,getToolbar:l,getQuill:g,getContents:m,setContents:b,getHTML:B,setHTML:w,pasteHTML:S,focus:I,getText:v,setText:C,reinit:A}},render(){var t,i;return[(i=(t=this.$slots).toolbar)===null||i===void 0?void 0:i.call(t),e.h("div",{ref:"editor",...this.$attrs})]}}),qu={class:"input"},$u=["for","data-test-id"],ju=["data-test-id"],Hu=xe({__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(t){const i=t,n=e.computed(()=>typeof i.error=="string"?i.error:i.error===""?!1:i.error===!0?`${i.label||"Field"} is required`:i.error),r=e.ref("");return e.onBeforeMount(()=>{r.value=i.modelValue}),(o,c)=>(e.openBlock(),e.createElementBlock("div",qu,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass({error_color:!!t.error})},"*",2)):e.createCommentVNode("",!0)],10,$u)):e.createCommentVNode("",!0),e.createVNode(e.unref(Mu),{"content-type":"html",toolbar:t.editorOptions,"model-value":t.modelValue,"data-test-id":t.dataTestId,content:r.value,"onUpdate:content":c[0]||(c[0]=f=>o.$emit("update:modelValue",f))},null,8,["toolbar","model-value","data-test-id","content"]),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},e.toDisplayString(n.value),9,ju)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),Uu={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"},zu={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},Xu={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},Ku={key:0,class:"ect-col-span-2"},Qu=["data-test-id"],Zu=["id","onUpdate:modelValue","disabled","data-test-id"],Gu=["for","data-test-id"],Wu={key:2,class:"quill-editor-styles"},Ju=e.createElementVNode("div",{class:"dropdowntp"},null,-1),Yu=e.createElementVNode("div",{id:"modals"},null,-1),ki={__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(t){const i=ct(),n=t,r=e.ref({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),o=e.ref(n.lookup),c=e.computed(()=>{const y=n.lookup.relatedFields.map(u=>u.child);return y.push("Name"),y});function f(y,u){const s=u.options.find(_=>_.Id===y);y===null?(u.options=[],u.value=null,u.relatedFields.forEach(_=>{_.value=null})):(u.value=s.Name,u.relatedFields.forEach(_=>{_.value=s[_.child]}))}const x=Vt(async function(y,u){u.loading=!0;const s={objectType:u.referenceObject,searchText:y||"",lstFields:c.value||[]},_=await i.getRecords(s);u.options=_,u.loading=!1});return(y,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Uu,[t.title?(e.openBlock(),e.createElementBlock("div",zu,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Xu,[o.value?(e.openBlock(),e.createElementBlock("div",Ku,[e.createVNode(ci,{modelValue:o.value.referenceRecordId,"onUpdate:modelValue":[u[0]||(u[0]=s=>o.value.referenceRecordId=s),u[1]||(u[1]=s=>f(s,o.value))],"data-test-id":`configurator-inputs-lookup-${o.value.attRecordId??y.index}`,label:o.value.label,options:o.value.options,disabled:!o.value.editable,required:o.value.required,loading:o.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:u[2]||(u[2]=s=>e.unref(x)(s,o.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.attributes,(s,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"attribute-input"},[s.dataType==="PICKLIST"||s.dataType==="MULTIPICKLIST"?(e.openBlock(),e.createBlock(ci,{key:0,modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,label:s.label,placeholder:s.label,disabled:!s.editable,options:s.picklistValues.map(a=>({label:a,value:a})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${s.attRecordId??y.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):s.dataType==="BOOLEAN"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${s.attRecordId??y.index}`},[e.withDirectives(e.createElementVNode("input",{id:`checkbox-${s.attRecordId??y.index}`,"onUpdate:modelValue":a=>s.value=a,type:"checkbox",disabled:!s.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-${s.attRecordId??y.index}`},null,8,Zu),[[e.vModelCheckbox,s.value]]),e.createElementVNode("label",{for:`checkbox-${s.attRecordId??y.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${s.attRecordId??y.index}`},e.toDisplayString(s.label),9,Gu)],8,Qu)):s.dataType==="TEXTAREA"?(e.openBlock(),e.createElementBlock("div",Wu,[e.createVNode(Hu,{modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,label:s.label,required:s.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${s.attRecordId??y.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(e.openBlock(),e.createBlock(J1,{key:3,modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,label:s.label,disabled:!s.editable,highlight:"","data-test-id":`configurator-inputs-custom-${s.attRecordId??y.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),Ju,Yu],64))}},ef={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},tf={class:"ect-bg-white ect-rounded-lg"},jr={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(t){const i=t,n=e.ref([]),r=e.ref([]),o=e.ref({});return e.onBeforeMount(()=>{const c={},f=[...i.attributes];f.forEach(y=>{y.dataType==="REFERENCE"&&(o.value[y.apiName]=["Name"],y.relatedFields=[],c[y.apiName]=y),y.editable=y.editable&&!y.apiName.includes(".")});let x=null;f.forEach(y=>{if(y.referenceObject==="XX_Base__Location__c"&&(x?y.firstLookup="Copy from "+x.label:x=y),y.apiName.includes(".")){const[u,s]=y.apiName.split(".");y.parent=u,y.child=s,o.value[u]!=null&&(o.value[u].push(s),c[u].relatedFields.push(y))}}),r.value=f.filter(y=>y.dataType==="REFERENCE"),n.value=f.filter(y=>!(y.apiName.includes(".")||y.dataType==="REFERENCE"))}),(c,f)=>(e.openBlock(),e.createElementBlock("div",ef,[e.createElementVNode("div",tf,[e.createVNode(ki,{attributes:n.value},null,8,["attributes"])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,x=>(e.openBlock(),e.createElementBlock("div",{key:x.attRecordId,class:"ect-bg-white ect-rounded-lg"},[e.createVNode(ki,{title:x.referenceLabel+" Lookup",lookup:x,attributes:x.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},nf={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"},rf=e.createElementVNode("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),of={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"},af={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},lf={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},sf={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},cf={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},df={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},uf={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(t,{emit:i}){const n=i,r=t,o=e.computed(()=>JSON.parse(JSON.stringify(r.attributes))),c=()=>{n("close")},f=()=>{n("done",o.value),n("close")};return(x,y)=>(e.openBlock(),e.createBlock(gr,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:c},{content:e.withCtx(()=>[e.createElementVNode("header",nf,[rf,e.createElementVNode("div",of,[e.createElementVNode("p",af,e.toDisplayString(t.option.itemName),1),e.createElementVNode("p",lf,e.toDisplayString(t.option.qty),1),e.createElementVNode("p",sf,e.toDisplayString(t.option.price),1)])]),e.createElementVNode("main",cf,[e.createVNode(jr,{attributes:o.value},null,8,["attributes"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",df,[e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:y[0]||(y[0]=u=>n("close"))},{default:e.withCtx(()=>[e.createTextVNode("Cancel")]),_:1}),e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:f},{default:e.withCtx(()=>[e.createTextVNode("Done")]),_:1})])]),_:1}))}},ff=["data-test-id"],hf=["data-test-id"],pf=["data-test-id"],mf={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},gf={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},yf={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"},xf={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},vf={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},_f={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},bf={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Cf={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Ef={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"},kf={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"},wf=xe({__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(t,{emit:i}){const n=i;return(r,o)=>(e.openBlock(),e.createBlock(fa,{to:"modaltp"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[e.createElementVNode("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[e.createElementVNode("div",{class:"modal-container",style:e.normalizeStyle(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[e.createElementVNode("div",mf,[e.createElementVNode("div",gf,[t.header?(e.openBlock(),e.createElementBlock("div",yf,[e.createElementVNode("div",xf,[e.createElementVNode("div",vf,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("div",_f,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",bf,[e.createElementVNode("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:o[0]||(o[0]=c=>n("close"))},[e.createVNode(we,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(e.openBlock(),e.createElementBlock("div",Cf,[e.renderSlot(r.$slots,"content",{},void 0,!0)])):(e.openBlock(),e.createElementBlock("div",Ef,[e.renderSlot(r.$slots,"default",{},void 0,!0)])),t.footer?(e.openBlock(),e.createElementBlock("div",kf,[e.renderSlot(r.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)])],12,pf)],8,hf)],8,ff)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),Pt=t=>(e.pushScopeId("data-v-395645da"),t=t(),e.popScopeId(),t),Nf={class:"ect-w-[600px]"},Af={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"},Bf=Pt(()=>e.createElementVNode("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),Sf={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"},Of={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},If={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Tf={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Vf={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"},Df=Pt(()=>e.createElementVNode("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)),Lf={class:"ect-flex ect-flex-col ect-gap-2"},Ff={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},Rf=Pt(()=>e.createElementVNode("div",{class:"ect-px-4 ect-py-2"},[e.createElementVNode("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)),Pf={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},Mf={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},qf={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},$f={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},jf=Pt(()=>e.createElementVNode("div",{class:"ect-px-4 ect-py-2"},[e.createElementVNode("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)),Hf={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},Uf={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},zf={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},Xf={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"},Kf=Pt(()=>e.createElementVNode("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)),Qf={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},Zf={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},Gf=Pt(()=>e.createElementVNode("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)),Wf={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"},Jf={class:"ect-flex ect-flex-col ect-gap-2"},Yf={class:"ect-flex-1"},e2={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},t2={class:"ect-text-center ect-w-28"},n2={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"},r2={class:"ect-text-center ect-w-28"},o2={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"},a2={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"},i2={class:"ect-flex ect-items-center"},l2=Pt(()=>e.createElementVNode("div",{class:"ect-flex-1"},[e.createElementVNode("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)),s2={class:"ect-text-center ect-w-28"},c2={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"},d2={class:"ect-text-center ect-w-28"},u2={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"},f2={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},h2=xe({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(t,{emit:i}){const n=ct(),r=i,o=t,c=e.computed(()=>{const d=n.summaryPrices,p=[];return p.push({label:"Base Price",value:d.basePrice,priceChange:d.basePrice}),p.push({label:"Add Ons",value:d.addOns,priceChange:d.addOns+_.value}),p}),f=e.computed(()=>{const d=n.summaryPrices;return{label:"Total Price",value:d.total,priceChange:d.total+_.value}}),x=e.computed(()=>o.data.inclusions.map(p=>n.optionByPublishKey.get(p))),y=e.computed(()=>x.value.filter(d=>d.itemId!==o.item.itemId)),u=e.computed(()=>o.data.exclusions.map(d=>n.optionByPublishKey.get(d))),s=e.computed(()=>u.value.filter(d=>d.itemId!==o.item.itemId)),_=e.computed(()=>x.value.reduce((d,p)=>d+p.price,0)-u.value.reduce((d,p)=>d+p.price,0)),a=()=>{r("close")},h=()=>{r("done")};return(d,p)=>(e.openBlock(),e.createBlock(wf,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:a},{content:e.withCtx(()=>[e.createElementVNode("div",Nf,[e.createElementVNode("header",Af,[Bf,e.createElementVNode("div",Sf,[e.createElementVNode("p",Of,e.toDisplayString(t.item.itemName),1),e.createElementVNode("p",If,e.toDisplayString(t.item.qty),1),e.createElementVNode("p",Tf,e.toDisplayString(e.unref(Ge)(t.item.price)),1)])]),e.createElementVNode("main",Vf,[Df,e.createElementVNode("div",Lf,[y.value.length>0?(e.openBlock(),e.createElementBlock("div",Ff,[Rf,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[e.createElementVNode("p",Pf,e.toDisplayString(l.itemName),1),e.createElementVNode("p",Mf,e.toDisplayString(l.qty),1),e.createElementVNode("p",qf," + "+e.toDisplayString(e.unref(Ge)(l.price)),1)]))),128))])):e.createCommentVNode("",!0),s.value.length>0?(e.openBlock(),e.createElementBlock("div",$f,[jf,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[e.createElementVNode("p",Hf,e.toDisplayString(l.itemName),1),e.createElementVNode("p",Uf,e.toDisplayString(l.qty),1),e.createElementVNode("p",zf," - "+e.toDisplayString(e.unref(Ge)(l.price)),1)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Xf,[Kf,e.createElementVNode("p",Qf,e.toDisplayString(e.unref(Ge)(_.value)),1)])])]),e.createElementVNode("footer",null,[e.createElementVNode("div",Zf,[Gf,e.createElementVNode("div",Wf,[e.createElementVNode("div",Jf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.label,class:e.normalizeClass(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":g>0}])},[e.createElementVNode("div",Yf,[e.createElementVNode("p",e2,e.toDisplayString(l.label),1)]),e.createElementVNode("div",t2,[e.createElementVNode("p",n2,e.toDisplayString(e.unref(Ge)(l.value)),1)]),e.createElementVNode("div",r2,[e.createElementVNode("p",o2,e.toDisplayString(e.unref(Ge)(l.priceChange)),1)])],2))),128))])]),e.createElementVNode("div",a2,[e.createElementVNode("div",i2,[l2,e.createElementVNode("div",s2,[e.createElementVNode("p",c2,e.toDisplayString(e.unref(Ge)(f.value.value)),1)]),e.createElementVNode("div",d2,[e.createElementVNode("p",u2,e.toDisplayString(e.unref(Ge)(f.value.priceChange)),1)])])])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",f2,[e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:p[0]||(p[0]=l=>r("close"))},{default:e.withCtx(()=>[e.createTextVNode("Cancel")]),_:1}),e.createVNode(Je,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:h},{default:e.withCtx(()=>[e.createTextVNode("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-395645da"]]),p2={class:"ect-flex ect-flex-col"},m2=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],g2=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],y2={key:0},x2={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},v2={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(t){const i=ct(),n=t,r=e.computed(()=>n.data.itemTypes||[]),o=e.computed(()=>n.data.showImage||!1),c=e.ref(null),f=e.ref({});let x=e.ref(null),y=e.ref(null);const u=(d,p)=>{d.qty=p},s=(d,p)=>{d.itemName=p},_=()=>{i.configuration.categoryOptions.forEach(d=>{d.itemTypes.forEach(p=>{p.options.forEach(l=>{i.configuration.sysGuidedOptions&&(c.value.hidden.includes(l.publishKey)?l.hidden=!0:l.hidden=!1),c.value.inclusions.includes(l.publishKey)&&!p.selected.includes(l.itemId)&&p.selected.push(l.itemId),c.value.exclusions.includes(l.publishKey)&&p.selected.includes(l.itemId)&&p.selected.splice(p.selected.indexOf(l.itemId),1)})})}),c.value=null,f.value=null},a=async(d,p,l,g)=>{if(d.preventDefault(),d.stopPropagation(),x.value=null,y.value=null,p.calculateRules){g&&g.isRadio?l.includes(p.itemId)?(l.splice(0,l.length),y.value=p.publishKey):(l.splice(0,l.length),l.push(p.itemId),x.value=p.publishKey):l.includes(p.itemId)?(l.splice(l.indexOf(p.itemId),1),y.value=p.publishKey):(l.push(p.itemId),x.value=p.publishKey);const m=y.value?p:null,b=x.value?p:null,v=await i.evaluateConfigSelection(m,b);v.inclusions.length>0||v.exclusions.length>0?(c.value=v,f.value=p,[...v.inclusions,...v.exclusions].includes(p.publishKey)||(x.value&&c.value.exclusions.push(x.value),y.value&&c.value.inclusions.push(y.value))):(c.value=v,x.value&&c.value.exclusions.push(x.value),y.value&&c.value.inclusions.push(y.value),_())}},h=(d,p,l,g)=>{d.target.type==="checkbox"||d.target.type==="radio"||(d.preventDefault(),d.stopPropagation(),g.isRadio?l.includes(p.itemId)?l.splice(0,l.length):(l.splice(0,l.length),l.push(p.itemId)):l.includes(p.itemId)?l.splice(l.indexOf(p.itemId),1):l.push(p.itemId),a(d,p,l,g))};return(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createBlock(h2,{key:0,item:f.value,data:c.value,onClose:p[0]||(p[0]=l=>c.value=null),onDone:_},null,8,["item","data"])):e.createCommentVNode("",!0),e.createElementVNode("div",p2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,l=>(e.openBlock(),e.createBlock(Qd,{key:l.itemTypeId,title:l.itemTypeName,description:l.description,message:l.isRadio?l.selected?"":l.minMessage:l.selected.length<l.minNumber?l.minMessage:l.selected.length===l.maxNumber?l.maxMessage:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([l.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":l.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"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options||[],g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g.itemId},[g.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j1,{key:0,item:g,name:g.itemName,description:g.description||"","min-quantity":l.minQuantity,"max-quantity":l.maxQuantity,"show-image":o.value,selected:l.selected.includes(g.itemId),tags:g.getTags(),price:g.price,quantity:g.qty,"image-url":g.defaultImageURL,attributes:g.attributes||[],size:l.numberOfColumns,"item-id":g.itemId,"item-type":l.itemTypeName||"",category:l.category,"relationship-info":g.relationshipInfo||{},option:e.unref(i).optionByItemId.get(g.itemId),"is-attributes":g.isAttributes,"show-attributes":l.lightboxAttributes,disabled:g.isDisabled,"onUpdate:quantity":m=>u(g,m),"onUpdate:name":m=>s(g,m),onEditAttributes:m=>g.showAttributesModal=!0,onClick:m=>l.selected.includes(g.itemId)||g.isDisabled?null:h(m,g,l.selected,l)},{"selection-control":e.withCtx(()=>[l.isRadio?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":m=>l.selected[0]=m,"data-test-id":`configurator-${l.itemTypeId}-radio-${g.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:g.itemId,disabled:g.isDisabled,onClick:p[1]||(p[1]=e.withModifiers(()=>{},["stop"])),onChange:m=>a(m,g,l.selected,l)},null,40,m2)),[[e.vModelRadio,l.selected[0]]]):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":m=>l.selected=m,"data-test-id":`configurator-${l.itemTypeId}-checkbox-${g.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:g.itemId,disabled:g.isDisabled,onClick:p[2]||(p[2]=e.withModifiers(()=>{},["stop"])),onChange:m=>a(m,g,l.selected,l)},null,40,g2)),[[e.vModelCheckbox,l.selected]])]),default:e.withCtx(()=>[l.lightboxAttributes?(e.openBlock(),e.createElementBlock("div",y2,[g.showAttributesModal?(e.openBlock(),e.createBlock(uf,{key:0,option:g,attributes:g.attributes,onDone:m=>g.attributes=m,onClose:m=>g.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",x2,[e.createVNode(jr,{attributes:g.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))}},_2=t=>(e.pushScopeId("data-v-cb7a75a9"),t=t(),e.popScopeId(),t),b2={class:"ect-space-y-4"},C2={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},E2={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"},k2={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},w2={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]"},N2={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},A2={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},B2={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},S2={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},O2={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},I2={class:"ect-flex ect-justify-center ect-min-w-[128px]"},T2=_2(()=>e.createElementVNode("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),V2={class:"ect-flex ect-justify-center ect-min-w-[100px]"},D2={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},L2={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},F2={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},R2={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},P2={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},M2=xe({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(t){return(i,n)=>(e.openBlock(),e.createElementBlock("div",b2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.summary,r=>(e.openBlock(),e.createElementBlock("div",{key:r.key,class:"ect-mb-4"},[e.createElementVNode("section",C2,[e.createElementVNode("div",E2,[e.createElementVNode("h3",k2,e.toDisplayString(r.category),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.selectedItemTypes,o=>(e.openBlock(),e.createElementBlock("div",{key:o.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[e.createElementVNode("div",w2,[e.createElementVNode("h4",N2,e.toDisplayString(o.itemTypeName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.selectedOptions,c=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.itemId},[e.createElementVNode("div",A2,[e.createElementVNode("div",B2,[e.createElementVNode("span",S2,e.toDisplayString(c.itemName),1)]),e.createElementVNode("div",O2,[e.createElementVNode("div",I2,[e.createVNode(Qn,{value:c.qty,"onUpdate:value":f=>c.qty=f,min:o.minQuantity,max:o.maxQuantity,"data-test-id":`configurator-summary-counter-${c.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),T2,e.createElementVNode("div",V2,[e.createElementVNode("span",D2,e.toDisplayString(e.unref(Ge)(c.price)),1)])])]),c.isAttributes&&c.getTags().length>0?(e.openBlock(),e.createElementBlock("div",L2,[e.createElementVNode("div",F2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.getTags(),f=>(e.openBlock(),e.createBlock(dt,{key:f.attributeId,label:f.label,value:f.value},null,8,["label","value"]))),128))])])):e.createCommentVNode("",!0)],64))),128))]))),128)),e.createElementVNode("div",R2,[e.createElementVNode("span",P2," Total : "+e.toDisplayString(e.unref(Ge)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),q2={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},$2={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},j2={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"},H2=xe({__name:"ConfiguratorTabs",emits:["scroll"],setup(t,{emit:i}){const n=ct(),r=e.ref("billing-options"),o=e.computed(()=>n.configuration.categoryOptions),c=e.computed(()=>{const a=o.value.map(h=>({key:h.key,title:h.category}));return a.push({key:"summary",title:"Summary"}),a}),f=i,x=e.computed(()=>y.value.get(r.value)),y=e.computed(()=>{const a=new Map;return o.value.forEach(h=>{a.set(h.key,h)}),a}),u=()=>{console.info("Continue");const a=c.value.findIndex(h=>h.key===r.value);if(a<c.value.length-1){const h=c.value[a+1];r.value=h.key}else n.maintainQuoteConfiguration()};e.watch(r,a=>{s(a),f("scroll",0)});const s=a=>{r.value=a},_=a=>{const h=a.target.scrollTop;f("scroll",h)};return e.onBeforeMount(()=>{r.value=c.value[0].key}),(a,h)=>(e.openBlock(),e.createElementBlock("div",q2,[e.createElementVNode("div",$2,[e.createVNode(Ad,{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=d=>r.value=d),"show-tabs":!0,border:"",tabs:c.value,"data-test-id":"configurator-tabs-container",onTabChange:s},null,8,["modelValue","tabs"])]),r.value!=="summary"?(e.openBlock(),e.createElementBlock("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:_},[e.createVNode(v2,{data:x.value},null,8,["data"])],32)):(e.openBlock(),e.createElementBlock("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:_},[e.createVNode(M2,{summary:e.unref(n).summary},null,8,["summary"])],32)),e.createElementVNode("div",j2,[e.createVNode(Md,{"btn-text":r.value!=="summary"?"Continue":"Save",item:e.unref(n).configuration,onContinue:u},null,8,["btn-text","item"])])]))}},[["__scopeId","data-v-89883e06"]]),U2={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},z2={class:"ect-flow-root"},X2=["src","alt"],K2={key:1,class:"ect-mb-2"},Q2={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},Z2={key:0,class:"ect-mt-2"},G2={class:"ect-inline-block ect-mb-2"},W2={key:1,class:"ect-inline-block ect-mb-2"},J2={key:1,class:"ect-mt-2"},Y2={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(t,{emit:i}){const n=t,r=i,o=e.computed(()=>n.config.attributes.map(c=>({label:c.label,value:c.value})).filter(c=>c.value!==null&&c.value!==""));return(c,f)=>(e.openBlock(),e.createElementBlock("div",U2,[e.createElementVNode("div",z2,[t.config.defaultImageURL&&t.scroll<50?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",t.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[t.config.defaultImageURL?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.config.defaultImageURL,alt:t.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,X2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),t.scroll<50?(e.openBlock(),e.createElementBlock("div",K2,[e.createElementVNode("p",Q2,e.toDisplayString(t.config.description),1)])):e.createCommentVNode("",!0),t.config.isAttributes?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.editAttributes?(e.openBlock(),e.createElementBlock("div",J2,[e.createVNode(jr,{attributes:t.config.attributes},null,8,["attributes"])])):(e.openBlock(),e.createElementBlock("div",Z2,[o.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(x,y)=>(e.openBlock(),e.createElementBlock("span",{key:y,class:"ect-inline-block ect-mr-2 ect-mb-2"},[e.createVNode(dt,{label:x.label,value:x.value},null,8,["label","value"])]))),128)),e.createElementVNode("span",G2,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:f[0]||(f[0]=x=>r("edit-attributes"))},[e.createVNode(dt,{label:"Edit attributes","edit-button":""})])])],64)):(e.openBlock(),e.createElementBlock("span",W2,[e.createElementVNode("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:f[1]||(f[1]=x=>r("edit-attributes"))},[e.createVNode(dt,{label:"Add attributes","add-button":""})])]))]))],64)):e.createCommentVNode("",!0)])]))}},e5=["data-test-id"],t5=["placeholder","value","data-test-id"],n5=["data-test-id"],r5=["data-test-id","onClick"],o5=xe({__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:t=>["left","right"].includes(t)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(t,{emit:i}){const n=t,r=i,o=e.ref(""),c=e.ref(null),f=e.ref(!1),x=e.ref(null),y=e.ref(!0),u=e.computed(()=>y.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),s=async()=>{var C;if(await e.nextTick(),!x.value)return;const g=x.value.getBoundingClientRect(),b=window.innerHeight-g.bottom,v=Math.min(((C=n.options)==null?void 0:C.length)*40+20,200);y.value=b>=v},_=()=>{c.value=null,r("update:modelValue","")},a=l=>{const g=l.target.value;o.value&&(clearTimeout(o.value),o.value=null),o.value=setTimeout(()=>{r("update:modelValue",g)},500)},h=async()=>{f.value=!0,await s()},d=()=>{setTimeout(()=>{f.value=!1},150)},p=l=>{f.value=!1,o.value&&(clearTimeout(o.value),o.value=null),r("update:modelValue",l.label),r("optionClick",l)};return(l,g)=>{var m;return e.openBlock(),e.createElementBlock("div",{ref_key:"searchContainer",ref:x,class:e.normalizeClass(["molecule-search",{"icon-left":t.iconPosition==="left"}]),"data-test-id":t.dataTestId},[t.loading?(e.openBlock(),e.createBlock(ya,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${t.dataTestId}-loader`},null,8,["data-test-id"])):t.iconPosition==="left"||!t.modelValue?(e.openBlock(),e.createBlock(we,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${t.dataTestId}-search`,onClick:_},null,8,["data-test-id"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["search-input-box",{large:t.size==="large"}]),type:"text",style:e.normalizeStyle({height:`${t.height}px`}),placeholder:n.placeholder,value:t.modelValue,"data-test-id":`${t.dataTestId}-input`,onInput:a,onFocus:h,onBlur:d},null,46,t5),t.modelValue&&!t.loading?(e.openBlock(),e.createBlock(we,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${t.dataTestId}-close`,onClick:_},null,8,["data-test-id"])):e.createCommentVNode("",!0),((m=t.options)==null?void 0:m.length)>0&&f.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["search-options",{"dropdown-top":!y.value}]),style:e.normalizeStyle(u.value),"data-test-id":`${t.dataTestId}-dropdown`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(b,v)=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:"search-option","data-test-id":`${t.dataTestId}-option-${v}`,onClick:e.withModifiers(C=>p(b),["stop"]),onMousedown:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"]))},[e.createTextVNode(e.toDisplayString(b.label)+" ",1),e.createElementVNode("span",null,e.toDisplayString(b.subLabel),1)],40,r5))),128))],14,n5)):e.createCommentVNode("",!0)],10,e5)}}},[["__scopeId","data-v-6cdaa802"]]),a5=["data-test-id"],i5=xe({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:t=>["default","draft","review","active","inactive","in draft","active"].includes(t)},dataTestId:{type:String,default:""}},setup(t){const i=t,n=e.computed(()=>({"ect-state-pill--default":i.state==="default","ect-state-pill--draft":i.state==="draft"||i.state==="in draft","ect-state-pill--review":i.state==="review","ect-state-pill--active":i.state==="active","ect-state-pill--inactive":i.state==="inactive"}));return(r,o)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ect-state-pill",n.value]),"data-test-id":t.dataTestId},e.toDisplayString(t.text),11,a5))}},[["__scopeId","data-v-6be678b8"]]),l5=["data-test-id"],s5=["data-test-id"],c5=["data-test-id"],d5=["data-test-id"],u5=["data-test-id","onClick"],f5=["data-test-id"],h5=xe({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:t=>t.every(i=>typeof i=="object"&&typeof i.text=="string"&&(i.route===void 0||typeof i.route=="string"||typeof i.route=="object"))},dataTestId:{type:String,required:!0}},setup(t){const i=dn(),n=r=>{r&&i.push(r)};return(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":t.dataTestId},[e.createElementVNode("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${t.dataTestId}-container`},[e.createElementVNode("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${t.dataTestId}-breadcrumbs`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.links,(c,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f},[f>0?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${t.dataTestId}-separator-${f}`}," / ",8,d5)):e.createCommentVNode("",!0),c.route?(e.openBlock(),e.createElementBlock("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":`${t.dataTestId}-link-${f}`,onClick:x=>n(c.route)},e.toDisplayString(c.text),9,u5)):(e.openBlock(),e.createElementBlock("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${t.dataTestId}-text-${f}`},e.toDisplayString(c.text),9,f5))],64))),128))],8,c5)],8,s5)],8,l5))}},[["__scopeId","data-v-151ca816"]]),p5={components:{AppIcon:we},props:{direction:{type:String,default:"top",validator:t=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(t)},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}}},m5=["data-test-id"],g5=["data-test-id"];function y5(t,i,n,r,o,c){const f=e.resolveComponent("AppIcon");return n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tooltip-container","data-test-id":n.dataTestId,onMouseover:i[0]||(i[0]=(...x)=>c.showTooltip&&c.showTooltip(...x)),onMouseleave:i[1]||(i[1]=(...x)=>c.hideTooltip&&c.hideTooltip(...x))},[e.renderSlot(t.$slots,"default",{},void 0,!0),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(c.tooltipClass),style:e.normalizeStyle(c.styleObj),"data-test-id":`${n.dataTestId}-content`},[n.icon?(e.openBlock(),e.createBlock(f,{key:0,icon:n.icon,color:"#57c046",size:14,"data-test-id":`${n.dataTestId}-icon`},null,8,["icon","data-test-id"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.content),1)],14,g5),[[e.vShow,o.show]])],40,m5)):e.renderSlot(t.$slots,"default",{key:1},void 0,!0)}const x5=xe(p5,[["render",y5],["__scopeId","data-v-b36acc62"]]),v5=je.defineStore("item",()=>{const t=et(),i=e.ref([]),n=e.ref([]),r=e.ref(!1),o=e.ref(0),c=e.ref(1),f=e.ref(""),x=e.ref(20),y=e.ref(null),u=e.ref(!1),s=e.ref(null),_=e.ref(!1),a=e.ref(null),h=e.ref(null),d=e.ref(null),p=e.ref(null),l=e.ref(null),g=e.ref({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),m=e.ref([]),b=e.ref({ecatalogIds:[],optionItemsToAdd:[]}),v=e.ref(!1),C=e.ref(null),B=e.ref(0),w=2,S=R=>{!Array.isArray(R)||R.every(j=>{var U;return j.id&&((U=j.itemTypes)==null?void 0:U.every(Q=>{var Y;return Q.id&&((Y=Q.options)==null?void 0:Y.every(ne=>ne.id))}))})||R.forEach((j,U)=>{j.id||(j.id=`category-${U}-${j.category}`),j.itemTypes&&Array.isArray(j.itemTypes)&&j.itemTypes.forEach((Q,Y)=>{Q.id||(Q.id=Q.itemTypeId||`itemType-${U}-${Y}-${Q.itemTypeName||"unnamed"}`),Q.options&&Array.isArray(Q.options)&&Q.options.forEach((ne,se)=>{ne.id||(ne.id=ne.itemId||`option-${U}-${Y}-${se}-${ne.itemName||"unnamed"}`)})})})},I=async(R,$=null)=>{var j;try{_.value=!0;let U={};if($)U={fileId:$};else{const Y=m.value.find(se=>se.status==="Draft"),ne=m.value.find(se=>se.status==="Active");ne?U={fileId:ne.id}:Y?U={fileId:Y.id}:U={itemId:R}}let Q=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(U)});return Q!=null&&Q.errorMessage?(t.handleError(Q.errorMessage),null):(Q=Ue(Q.data),typeof Q.data=="string"&&(Q=JSON.parse(Q.data)),(j=Q==null?void 0:Q.productItem)!=null&&j.categoryOptions&&S(Q.productItem.categoryOptions),y.value=Q,_.value=!1,m.value.length===0&&!r.value&&await J(),Q.data)}catch(U){return _.value=!1,t.handleError("Failed to fetch item configuration. Please try again.",U),null}},A=async(R,$="",j="")=>{try{const U={searchTerm:R,itemTypeId:$,filterType:j};let Q=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(U)});return Q=Ue(Q),Q!=null&&Q.errorMessage?(t.handleError(Q.errorMessage),null):Q}catch{return t.handleError("Failed to fetch option list. Please try again."),null}},k=async(R,$)=>{try{const j={productItemId:l.value,optionItemId:R,existingItemType:$};let U=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(j)});return U=Ue(U),U!=null&&U.errorMessage?(t.handleError(U.errorMessage),null):U}catch{return t.handleError("Failed to fetch option details. Please try again."),null}},N=async()=>{try{const R=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(R)}catch{t.handleError("Failed to fetch available attributes. Please try again.")}},V=async R=>{try{const $=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(R)});return JSON.parse($)}catch{t.handleError("Failed to fetch item configuration. Please try again.")}},L=async R=>{try{const $=JSON.stringify(R),j=await window.AdminConfiguratorManager.getChildFields({request:$});return JSON.parse(j)}catch($){throw t.handleError("Failed to fetch child fields. Please try again.",$),$}},M=async()=>{const R={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(R)})).data}catch($){throw t.handleError("Failed to fetch picklist values. Please try again.",$),$}},Z=async()=>{var R,$,j;try{const U=($=(R=y.value)==null?void 0:R.productItem)==null?void 0:$.itemStatus,Y={fileId:(j=m.value.find(se=>se.status===U))==null?void 0:j.id,itemId:l.value};let ne=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(Y)});return ne!=null&&ne.error?(T(ne==null?void 0:ne.error),null):(ne=Ue(ne.data),g.value=ne,ne)}catch{return T(),null}},G=async()=>{try{const R={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(R)})).data}catch(R){t.handleError("Failed to fetch e catalogs for product. Please try again.",R)}},J=async()=>{try{const R={productId:l.value},$=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(R)}),j=JSON.parse($.data);return m.value=j.data,j}catch(R){t.handleError("Failed to save item configuration. Please try again.",R)}},K=async()=>{try{const R={ecatalogIds:b.value.ecatalogIds,productItemId:l.value,optionItemsToAdd:b.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(R)})).data}catch(R){t.handleError("Failed to save item configuration to catalog. Please try again.",R)}},F=async()=>{var R,$,j;try{const U=($=(R=y.value)==null?void 0:R.productItem)==null?void 0:$.itemStatus,Q={itemId:l.value,fileId:(j=m.value.find(he=>he.status===U))==null?void 0:j.id},Y=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(Q)}),ne=JSON.parse(Y);await J(),await I(l.value,ne.id);const se=m.value.findIndex(he=>he.status==="Draft");return se!==-1?m.value[se]=ne:m.value.push(ne),ne}catch(U){t.handleError("Failed to create new version. Please try again.",U)}},E=async()=>{var U,Q;const R=(U=m.value.find(Y=>Y.status==="Inactive"))==null?void 0:U.id,$=(Q=m.value.find(Y=>Y.status==="Active"))==null?void 0:Q.id,j={itemId:l.value,activeVersionId:$,inactiveVersionId:R};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(j)})).data}catch(Y){t.handleError("Failed to rollback item configuration. Please try again.",Y)}},T=R=>{R?C.value=R:C.value=null,v.value=!0};return{items:i,loading:r,totalCount:o,currentPage:c,searchTerm:f,itemLimit:x,columns:n,currentItemConfig:y,savingItemConfiguration:u,currentItem:s,configLoader:_,currentItemData:a,currentGroupIndex:h,currentOptionIndex:d,currentOptionData:p,versionInfo:m,activateConfigData:g,activatePayload:b,itemId:l,showActivationErrorModal:v,activationError:C,activationRetryCount:B,maxRetries:w,getItemConfiguration:I,getItemsList:A,getItemDetails:k,getAvailableAttributes:N,addAttribute:V,getChildFields:L,getPicklistValues:M,activateItemConfig:Z,getECatalogsForProduct:G,getversionInfo:J,saveItemConfigToCatalog:K,createNewVersion:F,rollbackItemConfig:E,addCrossSell:async R=>{const $={itemId:R.id||R.itemId,primarySortOrder:R.primarySortOrder};try{const j=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify($)});return JSON.parse(j.data)}catch(j){return t.handleError("Failed to add cross sell. Please try again.",j),null}},saveItemConfiguration:async()=>{var R;if(_.value||r.value||u.value||!((R=y.value)!=null&&R.productItem))return null;if(!(y.value.productItem.itemStatus==="Active"||y.value.productItem.itemStatus==="Inactive"))try{u.value=!0;const $={itemId:l.value,configurationData:y.value},j=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify($)});if(j!=null&&j.errorMessage)return t.handleError(j.errorMessage),null;if(!(j!=null&&j.error)){const U=m.value.findIndex(Q=>Q.status==="Draft");m.value[U].id=j.data}return j}catch($){return t.handleError("Failed to save item configuration. Please try again.",$),null}finally{u.value=!1}},showActivationError:T,hideActivationError:()=>{v.value=!1,B.value=0},incrementRetryCount:()=>{B.value+=1,v.value=!0},canRetry:()=>B.value<w,assignStableIds:S}}),_5={class:"app-filters-main-wrapper"},b5={class:"app-filters-wrapper"},C5={class:"app-filters"},E5={class:"left-section"},k5={class:"ect-flex ect-gap-2 ect-items-center"},w5={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},N5={class:"right-section"},A5={class:"after-search-wrapper"},B5={class:"buttons-wrapper"},S5={class:"before-button-wrapper"},O5={key:0,class:"action-wrapper"},I5={key:1,class:"button-text ect-font-medium"},T5={key:2,class:"count-badge"},V5=xe({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:t=>t.every(i=>(i.icon||i.text)&&typeof i.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:t=>t.every(i=>typeof i=="object"&&typeof i.text=="string"&&(i.route===void 0||typeof i.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(t,{emit:i}){const n=v5(),r=t,o=e.reactive([]);e.onMounted(()=>{c()});const c=()=>{o.splice(0,o.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(a=>{o.push({...a})})};e.watch(()=>r.buttons,()=>{c()},{deep:!0});const f=a=>{x("search",a)},x=i,y=e.ref(""),u=(a,h)=>{a.supportsToggle&&(a.isActive=!a.isActive),typeof a.handler=="function"&&a.handler(a,a.isActive)},s=()=>{x("back")},_=()=>{if(!r.recordLink)return;let a=r.recordLink;if(!a){let g=n.itemId;if(!g){const m=new URLSearchParams(window.location.search),b=new URLSearchParams(window.location.hash.split("?")[1]);g=m.get("itemId")||b.get("itemId")}a=g}if(!a)return;const d=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!d){console.info("[ERROR]: Unable to extract base domain from current URL");return}const l=`${d[1]}/${a}`;window.open(l,"_blank")};return(a,h)=>(e.openBlock(),e.createElementBlock("div",_5,[e.createElementVNode("div",b5,[e.createElementVNode("div",C5,[e.createElementVNode("div",E5,[t.breadcrumbLinks&&t.breadcrumbLinks.length>1?(e.openBlock(),e.createBlock(h5,{key:0,links:t.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):e.createCommentVNode("",!0),e.createElementVNode("div",k5,[t.showBackButton?(e.openBlock(),e.createElementBlock("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:s},[e.createVNode(we,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):e.createCommentVNode("",!0),t.title?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(["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":t.recordLink}]),"data-test-id":"filter-header-title",onClick:h[0]||(h[0]=d=>t.recordLink?_():null)},[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.recordLink?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(we,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),e.createElementVNode("div",w5,[e.createVNode(x5,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),t.statusText?(e.openBlock(),e.createBlock(i5,{key:2,text:t.statusText,state:t.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"after-status",{},void 0,!0)])]),e.createElementVNode("div",N5,[t.showSearch?(e.openBlock(),e.createElementBlock("div",{key:0,class:"search-wrapper",style:e.normalizeStyle({width:t.searchWidth})},[e.createVNode(o5,{modelValue:y.value,"onUpdate:modelValue":[h[1]||(h[1]=d=>y.value=d),f],class:"search-input",placeholder:t.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):e.createCommentVNode("",!0),e.createElementVNode("div",A5,[e.renderSlot(a.$slots,"afterSearch",{},void 0,!0)]),e.createElementVNode("div",B5,[e.createElementVNode("div",S5,[e.renderSlot(a.$slots,"before-button",{},void 0,!0)]),a.$slots.buttons?(e.openBlock(),e.createElementBlock("div",O5,[e.renderSlot(a.$slots,"buttons",{},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o,(d,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"action-wrapper"},[e.createVNode(Je,{btype:d.type||"primary","button-style":d.style||"outlined",size:"medium",style:e.normalizeStyle({minWidth:d.minWidth||"auto"}),class:e.normalizeClass([{active:d.isActive},{"icon-only":d.icon&&!d.text},{"text-button":d.text}]),loading:d.loading,disabled:d.disabled,"data-test-id":`filter-header-button-${d.text?d.text.toLowerCase().replace(/\s+/g,"-"):p}`,onClick:l=>u(d)},{default:e.withCtx(()=>[d.icon?(e.openBlock(),e.createBlock(we,{key:0,icon:d.icon,symbol:"",color:d.color||"#136E05",size:d.size||14},null,8,["icon","color","size"])):e.createCommentVNode("",!0),d.text?(e.openBlock(),e.createElementBlock("span",I5,e.toDisplayString(d.isActive?d.altText:d.text),1)):e.createCommentVNode("",!0),d.count?(e.openBlock(),e.createElementBlock("span",T5,e.toDisplayString(d.count),1)):e.createCommentVNode("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),D5=["data-test-id"],L5=["data-test-id"],F5=["data-test-id"],R5=["data-test-id"],P5=["data-test-id"],M5=["data-test-id"],q5=["data-test-id"],$5=xe({__name:"ecSwitch",props:e.mergeModels({text:{type:[String,Object],required:!1,validator:t=>typeof t=="string"?!0:typeof t=="object"&&t!==null?Object.prototype.hasOwnProperty.call(t,"on")&&Object.prototype.hasOwnProperty.call(t,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:t=>["regular","large"].includes(t)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue"],["update:modelValue"]),setup(t,{emit:i}){const n=t,r=e.useModel(t,"modelValue"),o=i,c=e.computed(()=>typeof n.text=="string"?n.text:typeof n.text=="object"&&n.text!==null?r.value?n.text.on:n.text.off:""),f=()=>{n.disabled||o("update:modelValue",!r.value)};return(x,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ec-switch-container",{disabled:t.disabled}]),"data-test-id":t.dataTestId},[t.leftAlign?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ec-switch__label","data-test-id":`${t.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(c.value)+" ",1),t.subtext?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ec-switch__subtext","data-test-id":`${t.dataTestId}-subtext`},e.toDisplayString(t.subtext),9,F5)):e.createCommentVNode("",!0)],8,L5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":t.size==="large"}]),"data-test-id":`${t.dataTestId}-switch`,onClick:f},[e.createElementVNode("div",{class:"ec-switch__handle","data-test-id":`${t.dataTestId}-handle`},null,8,P5)],10,R5),t.leftAlign?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:1,class:"ec-switch__label","data-test-id":`${t.dataTestId}-label`},[e.createTextVNode(e.toDisplayString(c.value)+" ",1),t.subtext?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ec-switch__subtext","data-test-id":`${t.dataTestId}-subtext`},e.toDisplayString(t.subtext),9,q5)):e.createCommentVNode("",!0)],8,M5))],10,D5))}},[["__scopeId","data-v-cfefad9a"]]),j5={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},H5={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},U5={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},z5={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"},X5=xe({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1}},setup(t){const i=ct(),n=e.ref(!1),r=e.ref(0),o=e.computed(()=>i.configuration),c=t,f=e.computed(()=>n.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>x()}]:[{text:c.qliId?"Save":"Add To Quote",altText:"Save",type:i.isChangedConfiguration?"primary":"secondary",style:"primary",disabled:!i.isChangedConfiguration,handler:()=>y()}]),x=()=>{n.value=!1},y=()=>{console.info("Save"),i.maintainQuoteConfiguration()};return(u,s)=>e.unref(i).configuration?(e.openBlock(),e.createElementBlock("div",j5,[e.unref(i).savedScreen?(e.openBlock(),e.createBlock(_d,{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",H5,[e.createElementVNode("div",U5,[e.createCommentVNode("",!0),e.createVNode(V5,{title:o.value.itemName,buttons:f.value},{"before-button":e.withCtx(()=>[e.unref(i).isYearlyPricingExist?(e.openBlock(),e.createBlock($5,{key:0,modelValue:e.unref(i).showYearlyPricing,"onUpdate:modelValue":[s[0]||(s[0]=_=>e.unref(i).showYearlyPricing=_),e.unref(i).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"])):e.createCommentVNode("",!0)]),_:1},8,["title","buttons"])]),e.createElementVNode("div",{class:e.normalizeClass(n.value?"ect-pb-16":"ect-pb-0")},[e.createVNode(Y2,{config:o.value,"edit-attributes":n.value,scroll:r.value,onEditAttributes:s[1]||(s[1]=_=>n.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",z5,[e.createVNode(H2)]))],64))])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-053a707f"]]),K5=["data-item-id","data-qli-id"],Q5={key:0,class:"ect-flex-1 ect-min-h-0"},Z5={key:1,class:"ect-flex-1 ect-min-h-0"},G5={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1}},emits:["ready"],setup(t,{emit:i}){const n=t,r=i,o=e.ref(!0),c=ct();return e.onBeforeMount(async()=>{o.value=!0,console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await c.initConfigurator(n.itemId,n.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready"),o.value=!1}),(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":t.itemId,"data-qli-id":t.qliId},[o.value?(e.openBlock(),e.createElementBlock("div",Z5,[e.createVNode(ga)])):(e.openBlock(),e.createElementBlock("div",Q5,[e.createVNode(X5,{"qli-id":t.qliId},null,8,["qli-id"])]))],8,K5))}},W5=(t=>(e.pushScopeId("data-v-0be41a52"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"dropdowntp"},null,-1)),Hr=xe({__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"],setup(t,{emit:i}){const n=si(),r=Vn(),o=et(),c=ct(),f=t,x=i,y=()=>{x("ready",c.exposeProperties())};return e.onBeforeMount(()=>{const{orgType:u,orgId:s,userId:_}=f.setupData;c.initializeController(f.apiKey,u,s,_),n.quoteId=f.quoteId,n.setSetupData(f.setupData)}),(u,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(xs),e.createVNode(yr),e.unref(o).errorPopup?(e.openBlock(),e.createBlock(os,{key:0,data:e.unref(o).errorPopup,onClose:s[0]||(s[0]=_=>e.unref(o).errorPopup=null)},null,8,["data"])):e.createCommentVNode("",!0),e.unref(r).unsavedChanges?(e.openBlock(),e.createBlock(ls,{key:1,data:e.unref(r).unsavedChanges,onClose:s[1]||(s[1]=_=>e.unref(r).unsavedChanges=null)},null,8,["data"])):e.createCommentVNode("",!0),W5,e.createVNode(G5,{"item-id":f.itemId,"qli-id":f.qliId,onReady:y},null,8,["item-id","qli-id"])],64))}},[["__scopeId","data-v-0be41a52"]]),J5=je.defineStore("mygpt",()=>{const t=e.ref("");async function i(r,o="gpt-3.5-turbo",c=300){var f,x,y;if(!t.value)throw new Error("Secret key is required. Please set it in the store.");try{const u=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.value}`},body:JSON.stringify({model:o,messages:r,max_tokens:Math.min(c,300),temperature:.7})});if(!u.ok){const _=await u.json().catch(()=>({}));throw new Error(((f=_.error)==null?void 0:f.message)||`API Error: ${u.status} ${u.statusText}`)}return((y=(x=(await u.json()).choices[0])==null?void 0:x.message)==null?void 0:y.content)||"No response generated"}catch(u){throw new Error(u.message||"Failed to get response from GPT")}}function n(r){t.value=r}return{secretKey:t,getGptResponse:i,setSecretKey:n}}),vn=t=>(e.pushScopeId("data-v-46273585"),t=t(),e.popScopeId(),t),Y5={class:"custom-gpt-container"},eh={class:"gpt-header"},th=vn(()=>e.createElementVNode("h3",{class:"gpt-title"},"GPT Chat",-1)),nh={class:"gpt-response-area"},rh={key:0,class:"loading-indicator"},oh=[vn(()=>e.createElementVNode("div",{class:"spinner"},null,-1)),vn(()=>e.createElementVNode("span",null,"Thinking...",-1))],ah={key:1,class:"error-message"},ih=vn(()=>e.createElementVNode("strong",null,"Error:",-1)),lh={key:2,class:"response-content"},sh={key:3,class:"empty-state"},ch=[vn(()=>e.createElementVNode("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],dh={class:"gpt-input-area"},uh={class:"input-wrapper"},fh=["placeholder","disabled"],hh=["disabled"],ph={key:0},mh={key:1},gh={key:0,class:"warning-message"},Ur=xe({__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(t){const i=t,n=J5(),r=e.computed(()=>i.secretKey||n.secretKey),o=e.ref(""),c=e.ref(""),f=e.ref(!1),x=e.ref(null),y=e.ref([]),u=e.computed(()=>c.value.trim().length>0),s=e.computed(()=>o.value.trim().length>0&&!f.value&&r.value),_=async()=>{if(!s.value)return;const d=o.value.trim();if(d){f.value=!0,x.value=null,o.value="";try{y.value.push({role:"user",content:d});const p=y.value.reduce((m,b)=>m+Math.ceil(b.content.length/4),0);let l=[...y.value];p>i.maxTokens&&(l=y.value.slice(-3));const g=await n.getGptResponse(l,i.model,i.maxTokens);c.value=g,y.value.push({role:"assistant",content:g})}catch(p){x.value=p.message||"Failed to get response from GPT",console.error("GPT API Error:",p)}finally{f.value=!1}}},a=d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),_())},h=()=>{y.value=[],c.value="",x.value=null};return e.onBeforeMount(()=>{n.setSecretKey(i.secretKey)}),(d,p)=>(e.openBlock(),e.createElementBlock("div",Y5,[e.createElementVNode("div",eh,[th,u.value||y.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:h,class:"clear-button",type:"button"}," Clear ")):e.createCommentVNode("",!0)]),e.createElementVNode("div",nh,[f.value?(e.openBlock(),e.createElementBlock("div",rh,oh)):x.value?(e.openBlock(),e.createElementBlock("div",ah,[ih,e.createTextVNode(" "+e.toDisplayString(x.value),1)])):u.value?(e.openBlock(),e.createElementBlock("div",lh,e.toDisplayString(c.value),1)):(e.openBlock(),e.createElementBlock("div",sh,ch))]),e.createElementVNode("div",dh,[e.createElementVNode("div",uh,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":p[0]||(p[0]=l=>o.value=l),placeholder:t.placeholder,disabled:f.value||!r.value,onKeypress:a,class:"gpt-input",rows:"3"},null,40,fh),[[e.vModelText,o.value]]),e.createElementVNode("button",{onClick:_,disabled:!s.value,class:"send-button",type:"button"},[f.value?(e.openBlock(),e.createElementBlock("span",ph,"...")):(e.openBlock(),e.createElementBlock("span",mh,"Send"))],8,hh)]),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",gh," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]),tr="tsocustomer2.expedite1.com",_n="https://csimqu3mn5g6pjhq6mki4qdayu.appsync-api.us-east-1.amazonaws.com/graphql",nr="da2-vag5nadijfegloywmu7rikapfi";var wi={exports:{}};function yh(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zr={exports:{}};const xh=Eu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ni;function _e(){return Ni||(Ni=1,function(t,i){(function(n,r){t.exports=r()})(ue,function(){var n=n||function(r,o){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof ue<"u"&&ue.crypto&&(c=ue.crypto),!c&&typeof yh=="function")try{c=xh}catch{}var f=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},x=Object.create||function(){function m(){}return function(b){var v;return m.prototype=b,v=new m,m.prototype=null,v}}(),y={},u=y.lib={},s=u.Base=function(){return{extend:function(m){var b=x(this);return m&&b.mixIn(m),(!b.hasOwnProperty("init")||this.init===b.init)&&(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var m=this.extend();return m.init.apply(m,arguments),m},init:function(){},mixIn:function(m){for(var b in m)m.hasOwnProperty(b)&&(this[b]=m[b]);m.hasOwnProperty("toString")&&(this.toString=m.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),_=u.WordArray=s.extend({init:function(m,b){m=this.words=m||[],b!=o?this.sigBytes=b:this.sigBytes=m.length*4},toString:function(m){return(m||h).stringify(this)},concat:function(m){var b=this.words,v=m.words,C=this.sigBytes,B=m.sigBytes;if(this.clamp(),C%4)for(var w=0;w<B;w++){var S=v[w>>>2]>>>24-w%4*8&255;b[C+w>>>2]|=S<<24-(C+w)%4*8}else for(var I=0;I<B;I+=4)b[C+I>>>2]=v[I>>>2];return this.sigBytes+=B,this},clamp:function(){var m=this.words,b=this.sigBytes;m[b>>>2]&=4294967295<<32-b%4*8,m.length=r.ceil(b/4)},clone:function(){var m=s.clone.call(this);return m.words=this.words.slice(0),m},random:function(m){for(var b=[],v=0;v<m;v+=4)b.push(f());return new _.init(b,m)}}),a=y.enc={},h=a.Hex={stringify:function(m){for(var b=m.words,v=m.sigBytes,C=[],B=0;B<v;B++){var w=b[B>>>2]>>>24-B%4*8&255;C.push((w>>>4).toString(16)),C.push((w&15).toString(16))}return C.join("")},parse:function(m){for(var b=m.length,v=[],C=0;C<b;C+=2)v[C>>>3]|=parseInt(m.substr(C,2),16)<<24-C%8*4;return new _.init(v,b/2)}},d=a.Latin1={stringify:function(m){for(var b=m.words,v=m.sigBytes,C=[],B=0;B<v;B++){var w=b[B>>>2]>>>24-B%4*8&255;C.push(String.fromCharCode(w))}return C.join("")},parse:function(m){for(var b=m.length,v=[],C=0;C<b;C++)v[C>>>2]|=(m.charCodeAt(C)&255)<<24-C%4*8;return new _.init(v,b)}},p=a.Utf8={stringify:function(m){try{return decodeURIComponent(escape(d.stringify(m)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(m){return d.parse(unescape(encodeURIComponent(m)))}},l=u.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new _.init,this._nDataBytes=0},_append:function(m){typeof m=="string"&&(m=p.parse(m)),this._data.concat(m),this._nDataBytes+=m.sigBytes},_process:function(m){var b,v=this._data,C=v.words,B=v.sigBytes,w=this.blockSize,S=w*4,I=B/S;m?I=r.ceil(I):I=r.max((I|0)-this._minBufferSize,0);var A=I*w,k=r.min(A*4,B);if(A){for(var N=0;N<A;N+=w)this._doProcessBlock(C,N);b=C.splice(0,A),v.sigBytes-=k}return new _.init(b,k)},clone:function(){var m=s.clone.call(this);return m._data=this._data.clone(),m},_minBufferSize:0});u.Hasher=l.extend({cfg:s.extend(),init:function(m){this.cfg=this.cfg.extend(m),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(m){return this._append(m),this._process(),this},finalize:function(m){m&&this._append(m);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(m){return function(b,v){return new m.init(v).finalize(b)}},_createHmacHelper:function(m){return function(b,v){return new g.HMAC.init(m,v).finalize(b)}}});var g=y.algo={};return y}(Math);return n})}(zr)),zr.exports}var Xr={exports:{}},Ai;function rr(){return Ai||(Ai=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.Base,x=c.WordArray,y=o.x64={};y.Word=f.extend({init:function(u,s){this.high=u,this.low=s}}),y.WordArray=f.extend({init:function(u,s){u=this.words=u||[],s!=r?this.sigBytes=s:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,s=u.length,_=[],a=0;a<s;a++){var h=u[a];_.push(h.high),_.push(h.low)}return x.create(_,this.sigBytes)},clone:function(){for(var u=f.clone.call(this),s=u.words=this.words.slice(0),_=s.length,a=0;a<_;a++)s[a]=s[a].clone();return u}})}(),n})}(Xr)),Xr.exports}var Kr={exports:{}},Bi;function vh(){return Bi||(Bi=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,o=r.lib,c=o.WordArray,f=c.init,x=c.init=function(y){if(y instanceof ArrayBuffer&&(y=new Uint8Array(y)),(y instanceof Int8Array||typeof Uint8ClampedArray<"u"&&y instanceof Uint8ClampedArray||y instanceof Int16Array||y instanceof Uint16Array||y instanceof Int32Array||y instanceof Uint32Array||y instanceof Float32Array||y instanceof Float64Array)&&(y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength)),y instanceof Uint8Array){for(var u=y.byteLength,s=[],_=0;_<u;_++)s[_>>>2]|=y[_]<<24-_%4*8;f.call(this,s,u)}else f.apply(this,arguments)};x.prototype=c}}(),n.lib.WordArray})}(Kr)),Kr.exports}var Qr={exports:{}},Si;function _h(){return Si||(Si=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.enc;f.Utf16=f.Utf16BE={stringify:function(y){for(var u=y.words,s=y.sigBytes,_=[],a=0;a<s;a+=2){var h=u[a>>>2]>>>16-a%4*8&65535;_.push(String.fromCharCode(h))}return _.join("")},parse:function(y){for(var u=y.length,s=[],_=0;_<u;_++)s[_>>>1]|=y.charCodeAt(_)<<16-_%2*16;return c.create(s,u*2)}},f.Utf16LE={stringify:function(y){for(var u=y.words,s=y.sigBytes,_=[],a=0;a<s;a+=2){var h=x(u[a>>>2]>>>16-a%4*8&65535);_.push(String.fromCharCode(h))}return _.join("")},parse:function(y){for(var u=y.length,s=[],_=0;_<u;_++)s[_>>>1]|=x(y.charCodeAt(_)<<16-_%2*16);return c.create(s,u*2)}};function x(y){return y<<8&4278255360|y>>>8&16711935}}(),n.enc.Utf16})}(Qr)),Qr.exports}var Zr={exports:{}},Oi;function Mt(){return Oi||(Oi=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.enc;f.Base64={stringify:function(y){var u=y.words,s=y.sigBytes,_=this._map;y.clamp();for(var a=[],h=0;h<s;h+=3)for(var d=u[h>>>2]>>>24-h%4*8&255,p=u[h+1>>>2]>>>24-(h+1)%4*8&255,l=u[h+2>>>2]>>>24-(h+2)%4*8&255,g=d<<16|p<<8|l,m=0;m<4&&h+m*.75<s;m++)a.push(_.charAt(g>>>6*(3-m)&63));var b=_.charAt(64);if(b)for(;a.length%4;)a.push(b);return a.join("")},parse:function(y){var u=y.length,s=this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var a=0;a<s.length;a++)_[s.charCodeAt(a)]=a}var h=s.charAt(64);if(h){var d=y.indexOf(h);d!==-1&&(u=d)}return x(y,u,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(y,u,s){for(var _=[],a=0,h=0;h<u;h++)if(h%4){var d=s[y.charCodeAt(h-1)]<<h%4*2,p=s[y.charCodeAt(h)]>>>6-h%4*2,l=d|p;_[a>>>2]|=l<<24-a%4*8,a++}return c.create(_,a)}}(),n.enc.Base64})}(Zr)),Zr.exports}var Gr={exports:{}},Ii;function bh(){return Ii||(Ii=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.enc;f.Base64url={stringify:function(y,u){u===void 0&&(u=!0);var s=y.words,_=y.sigBytes,a=u?this._safe_map:this._map;y.clamp();for(var h=[],d=0;d<_;d+=3)for(var p=s[d>>>2]>>>24-d%4*8&255,l=s[d+1>>>2]>>>24-(d+1)%4*8&255,g=s[d+2>>>2]>>>24-(d+2)%4*8&255,m=p<<16|l<<8|g,b=0;b<4&&d+b*.75<_;b++)h.push(a.charAt(m>>>6*(3-b)&63));var v=a.charAt(64);if(v)for(;h.length%4;)h.push(v);return h.join("")},parse:function(y,u){u===void 0&&(u=!0);var s=y.length,_=u?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var h=0;h<_.length;h++)a[_.charCodeAt(h)]=h}var d=_.charAt(64);if(d){var p=y.indexOf(d);p!==-1&&(s=p)}return x(y,s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(y,u,s){for(var _=[],a=0,h=0;h<u;h++)if(h%4){var d=s[y.charCodeAt(h-1)]<<h%4*2,p=s[y.charCodeAt(h)]>>>6-h%4*2,l=d|p;_[a>>>2]|=l<<24-a%4*8,a++}return c.create(_,a)}}(),n.enc.Base64url})}(Gr)),Gr.exports}var Wr={exports:{}},Ti;function qt(){return Ti||(Ti=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.WordArray,x=c.Hasher,y=o.algo,u=[];(function(){for(var p=0;p<64;p++)u[p]=r.abs(r.sin(p+1))*4294967296|0})();var s=y.MD5=x.extend({_doReset:function(){this._hash=new f.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,l){for(var g=0;g<16;g++){var m=l+g,b=p[m];p[m]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var v=this._hash.words,C=p[l+0],B=p[l+1],w=p[l+2],S=p[l+3],I=p[l+4],A=p[l+5],k=p[l+6],N=p[l+7],V=p[l+8],L=p[l+9],M=p[l+10],Z=p[l+11],G=p[l+12],J=p[l+13],K=p[l+14],F=p[l+15],E=v[0],T=v[1],D=v[2],P=v[3];E=_(E,T,D,P,C,7,u[0]),P=_(P,E,T,D,B,12,u[1]),D=_(D,P,E,T,w,17,u[2]),T=_(T,D,P,E,S,22,u[3]),E=_(E,T,D,P,I,7,u[4]),P=_(P,E,T,D,A,12,u[5]),D=_(D,P,E,T,k,17,u[6]),T=_(T,D,P,E,N,22,u[7]),E=_(E,T,D,P,V,7,u[8]),P=_(P,E,T,D,L,12,u[9]),D=_(D,P,E,T,M,17,u[10]),T=_(T,D,P,E,Z,22,u[11]),E=_(E,T,D,P,G,7,u[12]),P=_(P,E,T,D,J,12,u[13]),D=_(D,P,E,T,K,17,u[14]),T=_(T,D,P,E,F,22,u[15]),E=a(E,T,D,P,B,5,u[16]),P=a(P,E,T,D,k,9,u[17]),D=a(D,P,E,T,Z,14,u[18]),T=a(T,D,P,E,C,20,u[19]),E=a(E,T,D,P,A,5,u[20]),P=a(P,E,T,D,M,9,u[21]),D=a(D,P,E,T,F,14,u[22]),T=a(T,D,P,E,I,20,u[23]),E=a(E,T,D,P,L,5,u[24]),P=a(P,E,T,D,K,9,u[25]),D=a(D,P,E,T,S,14,u[26]),T=a(T,D,P,E,V,20,u[27]),E=a(E,T,D,P,J,5,u[28]),P=a(P,E,T,D,w,9,u[29]),D=a(D,P,E,T,N,14,u[30]),T=a(T,D,P,E,G,20,u[31]),E=h(E,T,D,P,A,4,u[32]),P=h(P,E,T,D,V,11,u[33]),D=h(D,P,E,T,Z,16,u[34]),T=h(T,D,P,E,K,23,u[35]),E=h(E,T,D,P,B,4,u[36]),P=h(P,E,T,D,I,11,u[37]),D=h(D,P,E,T,N,16,u[38]),T=h(T,D,P,E,M,23,u[39]),E=h(E,T,D,P,J,4,u[40]),P=h(P,E,T,D,C,11,u[41]),D=h(D,P,E,T,S,16,u[42]),T=h(T,D,P,E,k,23,u[43]),E=h(E,T,D,P,L,4,u[44]),P=h(P,E,T,D,G,11,u[45]),D=h(D,P,E,T,F,16,u[46]),T=h(T,D,P,E,w,23,u[47]),E=d(E,T,D,P,C,6,u[48]),P=d(P,E,T,D,N,10,u[49]),D=d(D,P,E,T,K,15,u[50]),T=d(T,D,P,E,A,21,u[51]),E=d(E,T,D,P,G,6,u[52]),P=d(P,E,T,D,S,10,u[53]),D=d(D,P,E,T,M,15,u[54]),T=d(T,D,P,E,B,21,u[55]),E=d(E,T,D,P,V,6,u[56]),P=d(P,E,T,D,F,10,u[57]),D=d(D,P,E,T,k,15,u[58]),T=d(T,D,P,E,J,21,u[59]),E=d(E,T,D,P,I,6,u[60]),P=d(P,E,T,D,Z,10,u[61]),D=d(D,P,E,T,w,15,u[62]),T=d(T,D,P,E,L,21,u[63]),v[0]=v[0]+E|0,v[1]=v[1]+T|0,v[2]=v[2]+D|0,v[3]=v[3]+P|0},_doFinalize:function(){var p=this._data,l=p.words,g=this._nDataBytes*8,m=p.sigBytes*8;l[m>>>5]|=128<<24-m%32;var b=r.floor(g/4294967296),v=g;l[(m+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,l[(m+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,p.sigBytes=(l.length+1)*4,this._process();for(var C=this._hash,B=C.words,w=0;w<4;w++){var S=B[w];B[w]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return C},clone:function(){var p=x.clone.call(this);return p._hash=this._hash.clone(),p}});function _(p,l,g,m,b,v,C){var B=p+(l&g|~l&m)+b+C;return(B<<v|B>>>32-v)+l}function a(p,l,g,m,b,v,C){var B=p+(l&m|g&~m)+b+C;return(B<<v|B>>>32-v)+l}function h(p,l,g,m,b,v,C){var B=p+(l^g^m)+b+C;return(B<<v|B>>>32-v)+l}function d(p,l,g,m,b,v,C){var B=p+(g^(l|~m))+b+C;return(B<<v|B>>>32-v)+l}o.MD5=x._createHelper(s),o.HmacMD5=x._createHmacHelper(s)}(Math),n.MD5})}(Wr)),Wr.exports}var Jr={exports:{}},Vi;function Di(){return Vi||(Vi=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=o.Hasher,x=r.algo,y=[],u=x.SHA1=f.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,_){for(var a=this._hash.words,h=a[0],d=a[1],p=a[2],l=a[3],g=a[4],m=0;m<80;m++){if(m<16)y[m]=s[_+m]|0;else{var b=y[m-3]^y[m-8]^y[m-14]^y[m-16];y[m]=b<<1|b>>>31}var v=(h<<5|h>>>27)+g+y[m];m<20?v+=(d&p|~d&l)+1518500249:m<40?v+=(d^p^l)+1859775393:m<60?v+=(d&p|d&l|p&l)-1894007588:v+=(d^p^l)-899497514,g=l,l=p,p=d<<30|d>>>2,d=h,h=v}a[0]=a[0]+h|0,a[1]=a[1]+d|0,a[2]=a[2]+p|0,a[3]=a[3]+l|0,a[4]=a[4]+g|0},_doFinalize:function(){var s=this._data,_=s.words,a=this._nDataBytes*8,h=s.sigBytes*8;return _[h>>>5]|=128<<24-h%32,_[(h+64>>>9<<4)+14]=Math.floor(a/4294967296),_[(h+64>>>9<<4)+15]=a,s.sigBytes=_.length*4,this._process(),this._hash},clone:function(){var s=f.clone.call(this);return s._hash=this._hash.clone(),s}});r.SHA1=f._createHelper(u),r.HmacSHA1=f._createHmacHelper(u)}(),n.SHA1})}(Jr)),Jr.exports}var Yr={exports:{}},Li;function eo(){return Li||(Li=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.WordArray,x=c.Hasher,y=o.algo,u=[],s=[];(function(){function h(g){for(var m=r.sqrt(g),b=2;b<=m;b++)if(!(g%b))return!1;return!0}function d(g){return(g-(g|0))*4294967296|0}for(var p=2,l=0;l<64;)h(p)&&(l<8&&(u[l]=d(r.pow(p,1/2))),s[l]=d(r.pow(p,1/3)),l++),p++})();var _=[],a=y.SHA256=x.extend({_doReset:function(){this._hash=new f.init(u.slice(0))},_doProcessBlock:function(h,d){for(var p=this._hash.words,l=p[0],g=p[1],m=p[2],b=p[3],v=p[4],C=p[5],B=p[6],w=p[7],S=0;S<64;S++){if(S<16)_[S]=h[d+S]|0;else{var I=_[S-15],A=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,k=_[S-2],N=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;_[S]=A+_[S-7]+N+_[S-16]}var V=v&C^~v&B,L=l&g^l&m^g&m,M=(l<<30|l>>>2)^(l<<19|l>>>13)^(l<<10|l>>>22),Z=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),G=w+Z+V+s[S]+_[S],J=M+L;w=B,B=C,C=v,v=b+G|0,b=m,m=g,g=l,l=G+J|0}p[0]=p[0]+l|0,p[1]=p[1]+g|0,p[2]=p[2]+m|0,p[3]=p[3]+b|0,p[4]=p[4]+v|0,p[5]=p[5]+C|0,p[6]=p[6]+B|0,p[7]=p[7]+w|0},_doFinalize:function(){var h=this._data,d=h.words,p=this._nDataBytes*8,l=h.sigBytes*8;return d[l>>>5]|=128<<24-l%32,d[(l+64>>>9<<4)+14]=r.floor(p/4294967296),d[(l+64>>>9<<4)+15]=p,h.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var h=x.clone.call(this);return h._hash=this._hash.clone(),h}});o.SHA256=x._createHelper(a),o.HmacSHA256=x._createHmacHelper(a)}(Math),n.SHA256})}(Yr)),Yr.exports}var to={exports:{}},Fi;function Ch(){return Fi||(Fi=1,function(t,i){(function(n,r,o){t.exports=r(_e(),eo())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.WordArray,f=r.algo,x=f.SHA256,y=f.SHA224=x.extend({_doReset:function(){this._hash=new c.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=x._doFinalize.call(this);return u.sigBytes-=4,u}});r.SHA224=x._createHelper(y),r.HmacSHA224=x._createHmacHelper(y)}(),n.SHA224})}(to)),to.exports}var no={exports:{}},Ri;function Pi(){return Ri||(Ri=1,function(t,i){(function(n,r,o){t.exports=r(_e(),rr())})(ue,function(n){return function(){var r=n,o=r.lib,c=o.Hasher,f=r.x64,x=f.Word,y=f.WordArray,u=r.algo;function s(){return x.create.apply(x,arguments)}var _=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];(function(){for(var d=0;d<80;d++)a[d]=s()})();var h=u.SHA512=c.extend({_doReset:function(){this._hash=new y.init([new x.init(1779033703,4089235720),new x.init(3144134277,2227873595),new x.init(1013904242,4271175723),new x.init(2773480762,1595750129),new x.init(1359893119,2917565137),new x.init(2600822924,725511199),new x.init(528734635,4215389547),new x.init(1541459225,327033209)])},_doProcessBlock:function(d,p){for(var l=this._hash.words,g=l[0],m=l[1],b=l[2],v=l[3],C=l[4],B=l[5],w=l[6],S=l[7],I=g.high,A=g.low,k=m.high,N=m.low,V=b.high,L=b.low,M=v.high,Z=v.low,G=C.high,J=C.low,K=B.high,F=B.low,E=w.high,T=w.low,D=S.high,P=S.low,X=I,q=A,z=k,R=N,$=V,j=L,U=M,Q=Z,Y=G,ne=J,se=K,he=F,ce=E,re=T,te=D,ie=P,le=0;le<80;le++){var ae,pe,fe=a[le];if(le<16)pe=fe.high=d[p+le*2]|0,ae=fe.low=d[p+le*2+1]|0;else{var me=a[le-15],Ae=me.high,Be=me.low,Ee=(Ae>>>1|Be<<31)^(Ae>>>8|Be<<24)^Ae>>>7,ht=(Be>>>1|Ae<<31)^(Be>>>8|Ae<<24)^(Be>>>7|Ae<<25),ve=a[le-2],Oe=ve.high,pt=ve.low,kn=(Oe>>>19|pt<<13)^(Oe<<3|pt>>>29)^Oe>>>6,St=(pt>>>19|Oe<<13)^(pt<<3|Oe>>>29)^(pt>>>6|Oe<<26),Ct=a[le-7],nn=Ct.high,Ot=Ct.low,mt=a[le-16],We=mt.high,Et=mt.low;ae=ht+Ot,pe=Ee+nn+(ae>>>0<ht>>>0?1:0),ae=ae+St,pe=pe+kn+(ae>>>0<St>>>0?1:0),ae=ae+Et,pe=pe+We+(ae>>>0<Et>>>0?1:0),fe.high=pe,fe.low=ae}var Ht=Y&se^~Y&ce,gt=ne&he^~ne&re,Ut=X&z^X&$^z&$,kt=q&R^q&j^R&j,zt=(X>>>28|q<<4)^(X<<30|q>>>2)^(X<<25|q>>>7),It=(q>>>28|X<<4)^(q<<30|X>>>2)^(q<<25|X>>>7),Xt=(Y>>>14|ne<<18)^(Y>>>18|ne<<14)^(Y<<23|ne>>>9),yt=(ne>>>14|Y<<18)^(ne>>>18|Y<<14)^(ne<<23|Y>>>9),Kt=_[le],it=Kt.high,rn=Kt.low,Le=ie+yt,Ye=te+Xt+(Le>>>0<ie>>>0?1:0),Le=Le+gt,Ye=Ye+Ht+(Le>>>0<gt>>>0?1:0),Le=Le+rn,Ye=Ye+it+(Le>>>0<rn>>>0?1:0),Le=Le+ae,Ye=Ye+pe+(Le>>>0<ae>>>0?1:0),Qt=It+kt,Zt=zt+Ut+(Qt>>>0<It>>>0?1:0);te=ce,ie=re,ce=se,re=he,se=Y,he=ne,ne=Q+Le|0,Y=U+Ye+(ne>>>0<Q>>>0?1:0)|0,U=$,Q=j,$=z,j=R,z=X,R=q,q=Le+Qt|0,X=Ye+Zt+(q>>>0<Le>>>0?1:0)|0}A=g.low=A+q,g.high=I+X+(A>>>0<q>>>0?1:0),N=m.low=N+R,m.high=k+z+(N>>>0<R>>>0?1:0),L=b.low=L+j,b.high=V+$+(L>>>0<j>>>0?1:0),Z=v.low=Z+Q,v.high=M+U+(Z>>>0<Q>>>0?1:0),J=C.low=J+ne,C.high=G+Y+(J>>>0<ne>>>0?1:0),F=B.low=F+he,B.high=K+se+(F>>>0<he>>>0?1:0),T=w.low=T+re,w.high=E+ce+(T>>>0<re>>>0?1:0),P=S.low=P+ie,S.high=D+te+(P>>>0<ie>>>0?1:0)},_doFinalize:function(){var d=this._data,p=d.words,l=this._nDataBytes*8,g=d.sigBytes*8;p[g>>>5]|=128<<24-g%32,p[(g+128>>>10<<5)+30]=Math.floor(l/4294967296),p[(g+128>>>10<<5)+31]=l,d.sigBytes=p.length*4,this._process();var m=this._hash.toX32();return m},clone:function(){var d=c.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:1024/32});r.SHA512=c._createHelper(h),r.HmacSHA512=c._createHmacHelper(h)}(),n.SHA512})}(no)),no.exports}var ro={exports:{}},Mi;function Eh(){return Mi||(Mi=1,function(t,i){(function(n,r,o){t.exports=r(_e(),rr(),Pi())})(ue,function(n){return function(){var r=n,o=r.x64,c=o.Word,f=o.WordArray,x=r.algo,y=x.SHA512,u=x.SHA384=y.extend({_doReset:function(){this._hash=new f.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var s=y._doFinalize.call(this);return s.sigBytes-=16,s}});r.SHA384=y._createHelper(u),r.HmacSHA384=y._createHmacHelper(u)}(),n.SHA384})}(ro)),ro.exports}var oo={exports:{}},qi;function kh(){return qi||(qi=1,function(t,i){(function(n,r,o){t.exports=r(_e(),rr())})(ue,function(n){return function(r){var o=n,c=o.lib,f=c.WordArray,x=c.Hasher,y=o.x64,u=y.Word,s=o.algo,_=[],a=[],h=[];(function(){for(var l=1,g=0,m=0;m<24;m++){_[l+5*g]=(m+1)*(m+2)/2%64;var b=g%5,v=(2*l+3*g)%5;l=b,g=v}for(var l=0;l<5;l++)for(var g=0;g<5;g++)a[l+5*g]=g+(2*l+3*g)%5*5;for(var C=1,B=0;B<24;B++){for(var w=0,S=0,I=0;I<7;I++){if(C&1){var A=(1<<I)-1;A<32?S^=1<<A:w^=1<<A-32}C&128?C=C<<1^113:C<<=1}h[B]=u.create(w,S)}})();var d=[];(function(){for(var l=0;l<25;l++)d[l]=u.create()})();var p=s.SHA3=x.extend({cfg:x.cfg.extend({outputLength:512}),_doReset:function(){for(var l=this._state=[],g=0;g<25;g++)l[g]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(l,g){for(var m=this._state,b=this.blockSize/2,v=0;v<b;v++){var C=l[g+2*v],B=l[g+2*v+1];C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360;var w=m[v];w.high^=B,w.low^=C}for(var S=0;S<24;S++){for(var I=0;I<5;I++){for(var A=0,k=0,N=0;N<5;N++){var w=m[I+5*N];A^=w.high,k^=w.low}var V=d[I];V.high=A,V.low=k}for(var I=0;I<5;I++)for(var L=d[(I+4)%5],M=d[(I+1)%5],Z=M.high,G=M.low,A=L.high^(Z<<1|G>>>31),k=L.low^(G<<1|Z>>>31),N=0;N<5;N++){var w=m[I+5*N];w.high^=A,w.low^=k}for(var J=1;J<25;J++){var A,k,w=m[J],K=w.high,F=w.low,E=_[J];E<32?(A=K<<E|F>>>32-E,k=F<<E|K>>>32-E):(A=F<<E-32|K>>>64-E,k=K<<E-32|F>>>64-E);var T=d[a[J]];T.high=A,T.low=k}var D=d[0],P=m[0];D.high=P.high,D.low=P.low;for(var I=0;I<5;I++)for(var N=0;N<5;N++){var J=I+5*N,w=m[J],X=d[J],q=d[(I+1)%5+5*N],z=d[(I+2)%5+5*N];w.high=X.high^~q.high&z.high,w.low=X.low^~q.low&z.low}var w=m[0],R=h[S];w.high^=R.high,w.low^=R.low}},_doFinalize:function(){var l=this._data,g=l.words;this._nDataBytes*8;var m=l.sigBytes*8,b=this.blockSize*32;g[m>>>5]|=1<<24-m%32,g[(r.ceil((m+1)/b)*b>>>5)-1]|=128,l.sigBytes=g.length*4,this._process();for(var v=this._state,C=this.cfg.outputLength/8,B=C/8,w=[],S=0;S<B;S++){var I=v[S],A=I.high,k=I.low;A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,w.push(k),w.push(A)}return new f.init(w,C)},clone:function(){for(var l=x.clone.call(this),g=l._state=this._state.slice(0),m=0;m<25;m++)g[m]=g[m].clone();return l}});o.SHA3=x._createHelper(p),o.HmacSHA3=x._createHmacHelper(p)}(Math),n.SHA3})}(oo)),oo.exports}var ao={exports:{}},$i;function wh(){return $i||($i=1,function(t,i){(function(n,r){t.exports=r(_e())})(ue,function(n){/** @preserve
|
|
64
64
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
65
65
|
|
|
66
66
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -142,4 +142,4 @@
|
|
|
142
142
|
query SalesforceActions($action: String!, $data: SalesforceData) {
|
|
143
143
|
salesforceActions(action: $action, data: $data)
|
|
144
144
|
}
|
|
145
|
-
`,or="https://d2pgvmpph8dmlo.cloudfront.net";function fl(t,i,n){return t?t==null?void 0:t.map(r=>Wh(r,i,n)):[]}function Wh(t,i,n){const{url:r,staticResource:o}=t;if(!r)return null;if(r.includes("/resource/")&&!r.includes("://")&&o){const c=r.split("/"),f=c[c.length-1];return`${or}/${n}/static/${f}.${i}`}else return r}const hl=je.defineStore("blockLegacy",()=>{const t=$t(),i=e.ref(null),n=e.ref(null),r=e.ref(!1),o=e.ref(null);async function c(u,s=!0){var h,d;if(console.info("fetchBlockInformation templateId:",u),!u)return;s&&(i.value=[],r.value=!1);const _={storefrontId:t.orgWithStorefrontId,templateId:u};console.log("fetchBlockInformation variables",JSON.stringify(_)),console.log("fetchBlockInformation getTemplateBlock",ul);const a=await dl(ul,_);if(n.value=u,s)(h=a.content)!=null&&h.blocks?i.value=f(JSON.parse(a.content.blocks)):i.value=[],r.value=!0;else return((d=a==null?void 0:a.content)==null?void 0:d.blocks)||[]}function f(u){const s=t.salesforceOrgId;return u==null||u.forEach(_=>{_.blocks=_.blocks?JSON.parse(_.blocks):[],_.blocks.forEach(a=>{var h,d;Object.assign(a,JSON.parse(a.contentJSON)),a.contentJSON=null,a.id=a.blockId||a.Id,(a.componentName==="catalogBlock"||a.componentName==="relatedProducts")&&(x(a.fields.productCard.actions),a.fields.noFriendlyURL=!0,a.fields.productCard.friendlyURL=null,a.fields.productCard.friendlyURLFields=null,(h=a.configuration)!=null&&h.productTemplateId?a.fields.productCard.url="/product/"+((d=a.configuration)==null?void 0:d.productTemplateId):a.fields.productCard.url=null),a.componentName==="productSummary"&&(console.log("block.fields.actions",a.fields.actions),x(a.fields.actions)),a.customJS&&(a.customJS=fl(a.customJS,"js",s)),a.customCSS&&(a.customCSS=fl(a.customCSS,"css",s))})}),u}function x(u){u.forEach(s=>{s.action==="CUSTOM_ACTION"&&(s.action="CUSTOM",s.name=s.label.title,s.value=s.url.field||s.url.title,s.newTab=s.openInNewTab)})}return{metaInfo:o,currentPageId:n,pageBlocks:i,blockLoaded:r,fetchBlockInformation:c,getFormattedSectionBlocks:u=>e.computed(()=>{const s=[];return i.value&&i.value.length>0&&i.value.forEach(_=>{const a=_.blocks;a&&a.length>0&&a.forEach(h=>{if(h.id=h.blockId,u){const d=["checkoutAccount","shippingAddress","shippingMethod","customForm","termsAndPayment","quoteSummary","customCode"];console.log("section.sectionName",_.sectionName,h.componentName),h&&h.configuration&&(d.includes(h.componentName)||h.configuration.isCheckoutBlock)&&s.push(h)}else h&&h.configuration&&!u&&s.push(h)})}),s})}}),$t=je.defineStore("composableCatalog",()=>{const t=hl();bn();const i=et(),n=e.ref(!0),r=e.ref({accountId:"",contactId:"",userType:"",domain:"",locale:"en-US"}),o=e.ref({}),c=e.ref(""),f=e.ref(""),x=e.ref(""),y=e.ref(""),u=e.ref(""),s=e.ref(""),_=e.ref(null),a=e.ref(!1),h=e.computed(()=>y.value+"::"+u.value);async function d(){_.value=null,a.value=!0;try{const w={domain:tr,templateBlocksFilter:{templateId:{eq:"wrapperDefault"}}},S=Date.now().toString(),I=await Ne.post(`${_n}?t=${S}`,{query:Zh,variables:w},{headers:{"Content-Type":"application/json","x-api-key":nr,"Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0","X-Cache-Bust":S},withCredentials:!1});console.log("[COMPOSABLECATALOG:fetchDomainDetails] response",I);const A=I&&I.data?I.data:null;console.log("[COMPOSABLECATALOG:fetchDomainDetails] payload",A);const k=A&&A.data&&A.data.dataByDomain&&Array.isArray(A.data.dataByDomain.items)?A.data.dataByDomain.items:[],N=k.length?k[0]:null;return console.log("[COMPOSABLECATALOG:fetchDomainDetails] item",N),console.log("[COMPOSABLECATALOG:fetchDomainDetails] storefrontDetails",o.value),o.value=N,r.value={accountId:N.guestAccountId,contactId:"",userType:"AWSGuest",domain:N.domain,locale:"en-US"},y.value=N.organization.salesforceOrgId,u.value=N.storefrontId,N}catch(w){throw console.info("[COMPOSABLECATALOG:fetchDomainDetails] Error fetching domain",w),_.value=w&&w.message?w.message:"Unknown error",w}finally{a.value=!1}}function p(w){f.value=(w==null?void 0:w.templateId)??"",x.value=(w==null?void 0:w.quoteId)??"",s.value=(w==null?void 0:w.userId)??""}function l(w){w.value=w}function g(w){o.value=w}async function m(){try{await t.fetchBlockInformation(f.value,!0)}catch(w){i.handleError(w,"getBlockInformation")}}const b=async()=>{var w,S;if(console.log("[COMPOSABLECATALOG:getTheme]"),!!u.value)try{const I=await dl(Gh,{storefrontId:u.value,filter:{key:{eq:"theme"},templateId:{eq:"wrapper"}}});return console.log("[COMPOSABLECATALOG:getTheme] themeData",I),((S=(w=I.content)==null?void 0:w.items)==null?void 0:S[0])??null}catch(I){console.log("[COMPOSABLECATALOG:getTheme] Error getting theme data",I)}},v=()=>{if(typeof document>"u")return;const w=y.value,S=u.value;if(!w||!S)return;const I=`${or}/${w}/${S}/css/theme_${S}.css`;let A=!1;if(typeof window<"u"&&window.VueExpediteComponents&&typeof window.VueExpediteComponents.applyThemeToShadows=="function")try{window.VueExpediteComponents.applyThemeToShadows(I),A=!0}catch(M){console.warn("[COMPOSABLECATALOG:setThemeData] shadow injection failed; will inject in head",M)}let k="";try{k=new URL(_n).origin}catch{}const N=typeof window<"u"?window.location.href:"",V=(M,Z={})=>{const G=document.head||document.getElementsByTagName("head")[0];if(!G)return;let J=document.getElementById(M);J||(J=document.createElement("link"),J.id=M,G.appendChild(J)),Object.entries(Z).forEach(([K,F])=>{F!=null&&J.setAttribute(K,String(F))})};((M,Z,G=!0)=>{const J=document.head||document.getElementsByTagName("head")[0];if(!J||document.getElementById(M))return;const K=document.createElement("script");K.id=M,K.src=Z,G&&(K.async=!0),J.appendChild(K)})("ec-webfont-loader","https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js",!0),V("ec-preconnect-fonts",{rel:"preconnect",href:"https://fonts.gstatic.com"}),k&&V("ec-preconnect-appsync",{rel:"preconnect",href:k}),A||V("ec-theme-stylesheet",{rel:"stylesheet",href:I}),V("ec-google-fonts",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Symbols+Outlined|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Montserrat:300,400,500,600,700,800|Roboto:300,400,500,600,700,800|Abel|Caveat:400,700|Titillium+Web:400,600,700"}),N&&V("ec-canonical",{rel:"canonical",href:N}),V("ec-favicon",{rel:"icon",type:"image/x-icon",href:`${or}/expedite/Expedite_Favicon.ico`})};function C(){return!0}function B(){f.value="",x.value="",y.value="",u.value="",s.value=""}return{templateId:f,isLoading:n,activeStorefrontInfo:r,quoteAccount:c,storefrontDetails:o,salesforceOrgId:y,storefrontId:u,userId:s,orgWithStorefrontId:h,useVisiblity:C,fetchDomainDetails:d,setData:p,setQuoteId:l,setStorefrontDetails:g,getBlockInformation:m,getTheme:b,setThemeData:v,reset:B}}),at=async(t,i=null,n="",r=!1)=>{const o=_n,c=nr;let f=200,x;const y=tr,u=$t();try{const s=i;let _="";u.activeStorefrontInfo&&u.activeStorefrontInfo.accountId&&!_&&(_=u.activeStorefrontInfo.accountId),s.data&&u.activeStorefrontInfo&&!t.includes("CognitoActions")&&!t.includes("query listUsers")&&(s.data.userType=u.activeStorefrontInfo.userType,s.data.accountId=_,s.data.domain=y);const a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":c},body:JSON.stringify({query:t,variables:s})});if(x=await(a==null?void 0:a.json()),x=x.data,n)x=JSON.parse(x[n]),f=Number(x.statusCode),x=x.content,f===401&&console.info("401",t,JSON.stringify(i));else if(t.includes("SalesforceActions")){let h=x;h=JSON.parse(x.salesforceActions),h.statusCode==="401"&&console.info("401",t,JSON.stringify(i),x)}}catch(s){console.log(s),f=400,x=s}return{statusCode:f,response:x}},Jh=["Needs Configuration","Suggests Configuration","Upload Configuration"],Yh=["Upload","Upload Add","Upload Configuration"],e9=["No Configuration","Suggests Configuration","Upload Add","",null,void 0],t9=["CONFIGURE","UPLOAD","ADD_TO_CART"],n9=new Map([["Full","Full"],["FULL","Full"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","Default"],["ECATALOG_ACCOUNT_CUSTOM","Alternate"],["ECATALOG_OVERRIDE","Override"]]),r9=new Map([["Full","Item"],["FULL","Item"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","eCatalog"],["ECATALOG_ACCOUNT_CUSTOM","eCatalog"],["ECATALOG_OVERRIDE","eCatalog"]]),bt=(t,i,n=!1)=>{const r=et();let o,c,f;return n?(c=t.statusCode,f=t.content):(o=JSON.parse(t.response.salesforceActions),c=o.statusCode,f=o.content),Number(c)===200&&f&&f.message&&typeof f.message=="string"&&f.message.startsWith("ERROR:")?(r.handleError(f.message,"useExtractContent"),!1):Number(c)!==200||t.statusCode!==200||typeof f=="string"&&f.includes("ERROR:")||typeof f=="string"&&f.includes("Error:")||f.errorCode==="APEX_ERROR"?(f.errorCode==="APEX_ERROR"?r.handleError(f.message,"useExtractContent"):i||r.handleError(f,"useExtractContent"),!1):f},bn=je.defineStore("catalog",()=>{const t=$t(),i=e.ref(!1),n=e.ref(0),r=e.ref(null),o=e.ref(null),c=e.ref([]),f=e.ref({}),x=e.ref({}),y=e.ref(null),u=e.ref(null),s=e.ref(!1),_=e.ref({search:""}),a=e.ref({qliRecords:!0,quoteCreate:!1,quoteDetails:!1}),h=e.computed(()=>t.activeStorefrontInfo.accountId),d=e.computed(()=>({domain:t.activeStorefrontInfo.domain,accountId:h.value,userType:t.activeStorefrontInfo.userType}));function p(L="true"){fs(`qreset-${r.value}`,L)}async function l(L){const M={action:"makeCall",data:{...d.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=deleteLineItems&ut="+t.activeStorefrontInfo.userType,payload:JSON.stringify(L)}},Z=await at(ot,M,void 0,!0),G=bt(Z);G&&(n.value--,S(!0),console.log("[CATALOG:deleteLineItems] content",G)),p()}async function g(L){var E,T;if(!L.qty)return;const M=t.quoteId;if(!M)return;L.retry=1;const Z={...L,quoteid:M},G={action:"makeCall",data:{...d.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=updateQLI&ut="+t.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},J=await at(ot,G,void 0,!0),K=(T=(E=J.response)==null?void 0:E.salesforceActions)==null?void 0:T.toLowerCase();(K.includes("record currently unavailable")||K.includes("unable_to_lock_row"))&&L.retry<3&&setTimeout(()=>{L.retry+=1,g(L)},500),bt(J)&&S(!0),p()}async function m(L){const M=t.quoteId;if(!M)return;Array.isArray(L)&&(L=L[0]);const Z={quoteId:M,itemId:L.itemID,eCatalogItemId:L.eCatalogItemID,quantity:L.qty,accountId:h.value,offerId:L.offerId,offerType:L.offerType,offerDiscount:L.offerDiscount,appliedOnField:L.appliedOnField,rpId:L.rpId,qtyTierAmt:L.qtyTierAmt,isAddToCartFromIB:L.isAddToCartFromIB},G={action:"makeCall",data:{...d.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=saveItemToQuoteBlink&ut="+t.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},J=await at(ot,G,void 0,!0),K=bt(J);if(K){n.value++,S(!0);const F=JSON.parse(K);F.quoteId&&F.quoteId!==M&&(r.value=F.quoteId,t.setQuoteId(r.value))}p()}async function b(L,M,Z){var T,D,P;const G=Z==="Item",J=[],K=((L==null?void 0:L.searchText)||"").toString().trim(),F=Array.isArray(L==null?void 0:L.fields)?L.fields:[];Array.isArray(L==null?void 0:L.filters)&&L.filters,L==null||L.filterLogic;const E={searchPL:K,origin:"genesis_ai",userId:(t==null?void 0:t.userId)||"",orgId:(t==null?void 0:t.salesforceOrgId)||"",orgType:"Production",requestId:Dt(),quoteId:(t==null?void 0:t.quoteId)||"",accountId:((T=t==null?void 0:t.activeStorefrontInfo)==null?void 0:T.accountId)||"",numberOfRecords:(L==null?void 0:L.numberOfRecords)||(L==null?void 0:L.rowLimit)||10,fields:F,filters:(L==null?void 0:L.whereCondition)||[]};try{const q=await fetch("https://ec-apigw.blink.expedite1.com/getCatalogProducts",{method:"POST",headers:{"x-api-key":"Y:GPb{M&0*v:C%])A(+i9acGu4aY)A=%","Content-Type":"application/json"},body:JSON.stringify(E)}),z=await q.json();if(!q.ok||!(z!=null&&z.isSuccess)||!((D=z==null?void 0:z.data)!=null&&D.selected_products))return;const R=z.data.selected_products,$=Object.values(R).map(U=>{var Q;return(Q=U==null?void 0:U.catalogResponse)==null?void 0:Q.productInfo}).filter(Boolean);$.forEach(U=>{var ce,fe,se,re;const Q=JSON.parse(JSON.stringify(M)),Y=Se(U,G?"XX_ORD1__Friendly_URL__c":"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),ne=Se(U,G?"XX_ORD1__SYS_Requires_Configuration__c":"XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c");G?Q.itemId=U.Id:(Q.itemId=U.XX_ORD1__Item__c,Q.catalogItemId=U.Id),Q.thumbnail.value=Q.thumbnail.field&&!Q.thumbnail.isStatic?Se(U,Q.thumbnail.field):"",Q.title.value=Q.title.field&&!Q.title.isStatic?Se(U,Q.title.field):"",Q.description.value=Q.description.field&&!Q.description.isStatic?Se(U,Q.description.field):"",(ce=Q.attributes)==null||ce.forEach(te=>{te.value.field&&(te.value.value=Se(U,te.value.field,te.value.dataType)||"-"),te.label.field&&(te.label.value=Se(U,te.label.field,te.label.dataType)||"-")}),Q.actions=Q.actions.filter(({action:te})=>te==="ADD_TO_CART"&&e9.includes(ne)||te==="CONFIGURE"&&Jh.includes(ne)||te==="UPLOAD"&&Yh.includes(ne)||!t9.includes(te)),(fe=Q.actions)==null||fe.forEach(te=>{if(te.action==="CUSTOM"){const{url:ie,label:le}=te;ie.isStatic||(ie.value=Se(U,ie.field)),le.isStatic||(le.value=Se(U,le.field))}}),((se=Q.friendlyURLFields)==null?void 0:se.length)>0&&Y?((re=Q.friendlyURLFields)==null||re.forEach(te=>{Q.friendlyURL=Q.friendlyURL.replace(`{!${te}}`,Se(U,te))}),Q.friendlyURL="/"+Q.friendlyURL+"/"+Y):Q.url&&(Q.friendlyURL=Q.url+"/"+U.Id),Q.friendlyURL&&(Q.friendlyURL=Q.friendlyURL.replace(/\/{2,}/g,"/")),J.push(Q)});const j=Number(((P=z==null?void 0:z.data)==null?void 0:P.totalCount)||$.length)||0;return{items:J,count:j>2e3?2e3:j}}catch(X){console.log("[CATALOG:getProductItems] new API error",X);return}}async function v(L){var J;console.log("[CATALOG:getEcatalogDetails] jsonData",L),L.accountID=t.activeStorefrontInfo.accountId;const M={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getEcatalogDetails&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},Z=await at(ot,M),G=bt(Z);if(G!==!1)return(J=JSON.parse(G))==null?void 0:J.recordData}async function C(L,M=()=>{}){L.accountID=t.activeStorefrontInfo.accountId;const Z={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogGroupCounts&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},G=await at(ot,Z,void 0,!0),J=JSON.parse(JSON.parse(G.response.salesforceActions).content);return M(J),J}async function B(L,M=()=>{}){const Z={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogPicklistGroupCounts&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},G=await at(ot,Z,void 0,!0);return M(JSON.parse(JSON.parse(G.response.salesforceActions).content)),JSON.parse(JSON.parse(G.response.salesforceActions).content)}async function w(){var J,K,F,E,T,D;console.log("[CATALOG:getObjectDetails] start",{currentQuoteId:r.value,payload:d.value});const L=t.quoteId;if(console.log("[CATALOG:getObjectDetails] qtId",L),L)console.log("[CATALOG:getObjectDetails] Quote found!"+L),console.log("[CATALOG:getObjectDetails] Quote found",L);else{console.log("[CATALOG:getObjectDetails] No quote found!"),console.warn("[CATALOG:getObjectDetails] No quote found, aborting");return}const M={action:"makeCall",data:{...d.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getFormattedObjectDetails&objectapi=XX_ORD1__Quote__c&objectid=${L}`}};console.log("[CATALOG:getObjectDetails] request",M.data.endpoint),a.quoteDetails=!0,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> true");const Z=await at(ot,M,void 0,!0);console.log("[CATALOG:getObjectDetails] response received",{hasResponse:!!(Z!=null&&Z.response),len:String(((J=Z==null?void 0:Z.response)==null?void 0:J.salesforceActions)||"").length});const G=bt(Z,!0);return console.log("[CATALOG:getObjectDetails] extracted content",{hasContent:!!G}),a.quoteDetails=!1,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> false"),G?(f.value=JSON.parse(G),console.log("[CATALOG:getObjectDetails] quoteRecord set",{id:(K=f.value)==null?void 0:K.Id,accountName:(F=f.value)==null?void 0:F.XX_ORD1__Account_Name__c,checkedOut:(E=f.value)==null?void 0:E.XX_ORD1__Checked_Out__c}),t.quoteAccount=(T=f.value)==null?void 0:T.XX_ORD1__Account_Name__c,f.value.XX_ORD1__Checked_Out__c?(console.warn("[CATALOG:getObjectDetails] Quote is already checked out, resetting quoteId"),i.value=!0,console.log("[CATALOG:getObjectDetails] end (checked out) -> false"),!1):(console.log("[CATALOG:getObjectDetails] end (success)",{id:(D=f.value)==null?void 0:D.Id}),f.value)):(console.warn("[CATALOG:getObjectDetails] no content returned, resetting quoteId",{qtId:L}),console.log("[CATALOG:getObjectDetails] end (no content) -> false"),!1)}const S=Vt(I,500);async function I(L=!1){var K,F;console.log("[CATALOG:getQuoteItems] start",{noLoad:L}),a.value.qliRecords=!L;const M=t.quoteId;if(console.log("[CATALOG:getQuoteItems] qtId",M),!M){console.log("[CATALOG:getQuoteItems] No quote found!"),a.value.qliRecords=!1,console.warn("[CATALOG:getQuoteItems] No quote found, aborting");return}const Z={action:"makeCall",data:{...d.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getQuoteItems&ut=${t.activeStorefrontInfo.userType}"eid=${M}`}};console.log("[CATALOG:getQuoteItems] request",Z.data.endpoint);const G=await at(ot,Z,void 0,!0);console.log("[CATALOG:getQuoteItems] response received",{hasResponse:!!(G!=null&&G.response),len:String(((K=G==null?void 0:G.response)==null?void 0:K.salesforceActions)||"").length});const J=bt(G);if(console.log("[CATALOG:getQuoteItems] extracted content",{hasContent:!!J}),a.value.qliRecords=!1,console.log("[CATALOG:getQuoteItems] loading.qliRecords -> false"),J){const E={};c.value=JSON.parse(J),console.log("[CATALOG:getQuoteItems] qliRecords set",{count:(F=c.value)==null?void 0:F.length}),c.value.forEach(T=>{E[T.XX_ORD1__Item__c]=T}),x.value=E,n.value=c.value.length,console.log("[CATALOG:getQuoteItems] qliRecords",c.value),console.log("[CATALOG:getQuoteItems] end (success)",{cartCount:n.value})}else console.warn("[CATALOG:getQuoteItems] end (no content)")}async function A(L){console.log("[CATALOG:getSavedFilter] ecfr",L);const M={action:"makeCall",data:{...d.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getSavedFilter&ut=${t.activeStorefrontInfo.userType}&ecfr=${L}`}},Z=await at(ot,M,void 0,!0),G=bt(Z);return G?(console.log("[CATALOG:getSavedFilter] Saved Filters",G),JSON.parse(G)):!1}async function k(L,M){const Z={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=exportToCSV&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},G=await at(ot,Z,void 0,!0),J=bt(G);J&&M(J)}async function N(){var G;console.log("[CATALOG:calculateAvaTax]"),u.value=null;const L=t.quoteId;if(!L)return;(G=f.value)!=null&&G.Id||await w();const M=f.value;if(M.XX_ORD1__Shipping_Address__c&&M.XX_ORD1__Shipping_City__c&&M.XX_ORD1__Shipping_Country__c&&M.XX_ORD1__Shipping_State__c&&M.XX_ORD1__Shipping_Zip__c){const J={recordId:L,isCommit:!1},K={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=calculateAvaTax&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(J)}};s.value=!0;const F=await at(ot,K,void 0,!0),E=bt(F);if(E)console.log("[CATALOG:calculateAvaTax] content",E);else{const T=JSON.parse(F.response.salesforceActions).content;u.value=T}s.value=!1}else console.log("[CATALOG:calculateAvaTax] Shipping address not found so tax can not be calculated")}function V(L,M,Z=!0){const G=M.qtyTiers;if(!G)return null;const J=G.find(K=>K.ev===null?L>=K.sv:L>=K.sv&&L<=K.ev);return J?Z?J.formattedOfferPrice:J.originalPrice:null}return{quoteCheckedOut:i,avaTaxError:u,avaTaxLoading:s,cartCount:n,cartUpdated:p,quoteId:r,loading:a,filter:_,quoteRecord:f,secondQuoteId:o,qliRecords:c,savedItems:x,savedFilter:y,exportToCSV:k,getObjectDetails:w,getSavedFilter:A,saveToCart:m,deleteLineItems:l,getPicklistFilterData:B,getQuoteItems:I,updateCart:g,getFilterData:C,getProductItems:b,calculateAvaTax:N,getEcatalogDetails:v,getVolumePrice:V}});function pl(t,i,n){const{itemId:r,catalogItemId:o,offer:c,isAddToCartFromIB:f}=i,{offerId:x,offerType:y,offerDiscount:u,appliedOnField:s,rpId:_}=c||{};return{qty:t.value,itemID:r,eCatalogItemID:o,offerId:x,offerType:y,offerDiscount:u,appliedOnField:s,rpId:_,isAddToCartFromIB:f,qtyTierAmt:c?n.getVolumePrice(t.value,c,!1):null}}const o9={KNOWLEDGE_DETAIL:"knowledgeDetail"},ml={"Catalog Price":"XX_ORD1__Negotiated_Price__c","List Price":"XX_ORD1__List_Price2__c"},a9={name:"SkeletonLoader"},i9={class:"skeleton-loader"};function l9(t,i,n,r,o,c){return e.openBlock(),e.createElementBlock("div",i9)}const ft=xe(a9,[["render",l9],["__scopeId","data-v-d79c3985"]]),jt=xe({__name:"AtomCustomTag",props:{tag:{type:String,default:null},text:{type:[String,Number,Boolean],default:"-"},type:{type:String,default:null},method:{type:String,default:null},style:{type:Object,default:()=>({})},secStyle:{type:Object,default:()=>({})},cssStyle:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},inherit:{type:[Array,String],default:()=>[]}},setup(t){const i=t,n={h1:"ecb-header-lvl-1",h2:"ecb-header-lvl-2",h3:"ecb-header-lvl-3",h4:"ecb-header-lvl-4",h5:"ecb-header-lvl-5",h6:"ecb-header-lvl-6",p:"ecb-text-regular",span:"ecb-text-small",strong:"ecb-text-strong",large:"ecb-text-large"},r=e.ref(!1),o=e.computed(()=>{if(i.text===null||i.text===void 0)return"";const y=String(i.text);return(y==null?void 0:y.replace(/\r\n|\n/g,"<br>"))||""}),c=e.computed(()=>{var u,s;const y=i.tag||((u=i.style)==null?void 0:u.tag)||((s=i.secStyle)==null?void 0:s.tag)||"p";return y==="large"||y==="strong"?"div":y}),f=e.computed(()=>{var u;const y=i.tag||((u=i.style)==null?void 0:u.tag)||"p";return n[y]||"ecb-text-regular"}),x=e.computed(()=>{var u,s;const y={};if(i.style&&((u=i.style)!=null&&u.overrite)){const{bold:_,color:a,italic:h,underline:d,strikethrough:p,strikeThrough:l,size:g,family:m,lineHeight:b}=i.style;_&&(y.fontWeight="700"),a&&(y.color=a),h&&(y.fontStyle="italic"),m&&(y.fontFamily=m),b&&(y.lineHeight=b),d?y.textDecoration="underline":(p||l)&&(y.textDecoration="line-through"),g&&(y.fontSize=g)}if(i.secStyle&&((s=i.secStyle)!=null&&s.overrite)){const{bold:_,color:a,italic:h,underline:d,strikethrough:p,strikeThrough:l,size:g,family:m,lineHeight:b}=i.secStyle;_&&(y.fontWeight="700"),a&&(y.color=a),h&&(y.fontStyle="italic"),m&&(y.fontFamily=m),b&&(y.lineHeight=b),d?y.textDecoration="underline":(p||l)&&(y.textDecoration="line-through"),g&&(y.fontSize=g)}for(const _ of i.inherit)y[_]="inherit";return y});return(y,u)=>t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(t.cssStyle),class:"custom-tag-skeletion"},[e.createVNode(ft)],4)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),e.mergeProps({key:1},y.$attrs,{type:t.method,disabled:t.disabled,style:x.value,class:f.value,onMouseover:u[0]||(u[0]=s=>r.value=!0),onMouseout:u[1]||(u[1]=s=>r.value=!1),innerHTML:o.value}),null,16,["type","disabled","style","class","innerHTML"]))}},[["__scopeId","data-v-075625ac"]]),s9={key:1,class:"field-label"},c9={class:"ect-flex ect-flex-col ect-justify-start"},d9={key:0,class:"ect-pr-5"},u9={key:1,class:"field-value ect-pr-5"},f9={key:1,class:"field-value"},gl=xe({__name:"AtomFieldAttribute",props:{tag:{type:String,default:"span"},field:{type:String,default:""},value:{type:Object,default:()=>({})},label:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},offer:{type:Object,default:()=>({})},itemCount:{type:Number,default:1},appliedOnOfferMatchingField:{type:Boolean,default:!1},showOfferDescription:{type:Boolean,default:!1},isProductSummary:{type:Boolean,default:!1},index:{type:Number,default:0},parentWidth:{type:Number,default:0}},setup(t){const i=bn(),n=t,r=e.computed(()=>!1),o=e.computed(()=>{var a;return n.offer.offerValue.offerId&&n.offer.offerValue.formattedOfferPrice||n.offer.offerValue.rpId&&((a=n.offer.offerValue.qtyTiers)==null?void 0:a.length)>0?!!n.appliedOnOfferMatchingField:!1}),c=e.computed(()=>n.offer.offerDetails.styles.offerValue.textStyles.tag),f=e.computed(()=>n.offer.offerDetails.styles.offerDescription.textStyles),x=e.computed(()=>{var _,a;return(_=n.offer.offerValue)!=null&&_.qtyTiers?i.getVolumePrice(n.itemCount>0?n.itemCount:1,n.offer.offerValue):(a=n.offer.offerValue)==null?void 0:a.formattedOfferPrice}),y=e.computed(()=>({"ect-flex ect-line-through":r.value&&n.offer.offerValue&&o.value})),u=e.computed(()=>n.value&&(n.value.isStatic||!n.loading)),s=e.computed(()=>(r.value&&!n.isProductSummary||n.isProductSummary&&n.index===0)&&n.showOfferDescription&&n.appliedOnOfferMatchingField);return(_,a)=>{var h,d;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.field,"field ect-gap-1 ect-flex ect-flex-col"])},[t.label?(e.openBlock(),e.createBlock(jt,{key:0,tag:(h=t.label.style)==null?void 0:h.tag,text:t.label.value,style:e.normalizeStyle(t.label.style),class:e.normalizeClass(`${t.field}_label`)},null,8,["tag","text","style","class"])):(e.openBlock(),e.createElementBlock("div",s9,[e.createVNode(ft)])),e.createElementVNode("div",c9,[r.value&&n.offer.offerValue&&o.value?(e.openBlock(),e.createElementBlock("div",d9,[e.createVNode(jt,{tag:c.value,text:x.value,style:e.normalizeStyle(t.offer.offerDetails.styles.offerValue.textStyles),class:e.normalizeClass(`${t.field}_value`)},null,8,["tag","text","style","class"])])):r.value&&!n.offer.offerValue?(e.openBlock(),e.createElementBlock("div",u9,[e.createVNode(ft)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(y.value)},[u.value?(e.openBlock(),e.createBlock(jt,{key:0,tag:(d=t.value.style)==null?void 0:d.tag,text:t.value.value,style:e.normalizeStyle(t.value.style),class:e.normalizeClass(`${t.field}_value`)},null,8,["tag","text","style","class"])):(e.openBlock(),e.createElementBlock("div",f9,[e.createVNode(ft)]))],2)]),s.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"field-description ect-left-0 ect-w-max ect-pt-2",style:e.normalizeStyle({maxWidth:t.parentWidth?t.parentWidth+"px":void 0})},[e.createVNode(jt,{tag:f.value.tag,text:n.offer.offerValue.offerDescShort,style:e.normalizeStyle(f.value),class:e.normalizeClass(t.field+"_value")},null,8,["tag","text","style","class"])],4)):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-7a78d3c9"]]),h9={key:1,class:"filter"},p9={class:"filter-title"},m9={key:0,class:"filter-desc"},g9={key:1,class:"filter-desc"},y9={key:2,class:"filter-desc"},yl=xe({__name:"AtomProductText",props:{title:{type:Object,default:()=>({})},description:{type:Object,default:null},loading:{type:Boolean,default:!1},url:{type:String,default:null}},setup(t){const i=dn(),n=t;function r(){n.url&&!n.loading&&i.push(n.url)}return(o,c)=>t.loading?(e.openBlock(),e.createElementBlock("div",h9,[e.createElementVNode("div",p9,[e.createVNode(ft)]),t.description?(e.openBlock(),e.createElementBlock("div",m9,[e.createVNode(ft)])):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",g9,[e.createVNode(ft)])):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",y9,[e.createVNode(ft)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.title?(e.openBlock(),e.createBlock(jt,{key:0,class:e.normalizeClass({"ect-cursor-pointer":t.url}),text:t.title.value,style:e.normalizeStyle(t.title.style),onClick:r},null,8,["class","text","style"])):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createBlock(jt,{key:1,text:t.description.value,style:e.normalizeStyle(t.description.style)},null,8,["text","style"])):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-f0d3c54f"]]),x9={name:"Spinner"},v9={class:"spinner"};function _9(t,i,n,r,o,c){return e.openBlock(),e.createElementBlock("div",v9)}const Cn=xe(x9,[["render",_9],["__scopeId","data-v-83f8c910"]]),b9={name:"AtomSkeletonWidget",components:{AtomSkeletonLoader:ft,AtomSpinner:Cn},props:{rows:{type:Number,default:4},type:{type:String,default:"full"},className:{type:String,default:""}},data(){return{SKELETON_TYPE:o9}}},Oo=t=>(e.pushScopeId("data-v-617229a3"),t=t(),e.popScopeId(),t),C9={key:0,class:"page"},E9=Oo(()=>e.createElementVNode("div",{class:"page-header"},null,-1)),k9={class:"page-body"},w9={class:"page-body_board"},N9={key:1,class:"field"},A9={key:2,class:"filter"},B9={class:"filter-option_inner"},S9={key:3,class:"full"},O9={key:4,class:"shuttle"},I9={class:"shuttle-full"},T9={class:"shuttle-full"},V9={class:"shuttle-half"},D9={class:"shuttle-half"},L9={class:"shuttle-button"},F9={key:5,class:"shuttle2"},R9={class:"shuttle2-full"},P9=Oo(()=>e.createElementVNode("span",null,"Processing payment",-1)),M9={key:6,class:"shuttle2"},q9={class:"shuttle2-full"},$9=Oo(()=>e.createElementVNode("span",null,"Processing order",-1)),j9={key:10,class:"skeleton-shipping"},H9={class:"skeleton-shipping-full"},U9={class:"skeleton-shipping-half"},z9={key:11,class:"skeleton-terms"},X9={class:"skeleton-terms-half"},K9={class:"skeleton-terms-full"},Q9={class:"skeleton-terms-full"},Z9={key:12,class:""},G9={class:"skeleton-terms-half"},W9={key:13,class:""},J9={class:"skeleton-terms-half"},Y9={key:14,class:"product"},e4={class:"product-image"},t4={class:"product-texts"},n4={class:"product-description"},r4={class:"product-action"},o4={class:"product-button"},a4={key:15,class:""};function i4(t,i,n,r,o,c){const f=e.resolveComponent("AtomSkeletonLoader"),x=e.resolveComponent("AtomSpinner");return n.type==="page"?(e.openBlock(),e.createElementBlock("div",C9,[E9,e.createElementVNode("div",k9,[e.createElementVNode("div",w9,[e.createVNode(f)])])])):n.type==="fieldattribute"?(e.openBlock(),e.createElementBlock("div",N9,[e.createVNode(f)])):n.type==="filteroptions"?(e.openBlock(),e.createElementBlock("div",A9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rows,y=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"filter-option"},[e.createElementVNode("div",B9,[e.createVNode(f)])]))),128))])):n.type==="full"?(e.openBlock(),e.createElementBlock("div",S9,[e.createVNode(f)])):n.type==="shuttle"?(e.openBlock(),e.createElementBlock("div",O9,[e.createElementVNode("div",I9,[e.createVNode(f)]),e.createElementVNode("div",T9,[e.createVNode(f)]),e.createElementVNode("div",V9,[e.createVNode(f)]),e.createElementVNode("div",D9,[e.createVNode(f)]),e.createElementVNode("div",L9,[e.createVNode(f)])])):n.type==="shuttle-done"?(e.openBlock(),e.createElementBlock("div",F9,[e.createElementVNode("div",R9,[e.createVNode(x,{class:"shuttle2-spinner"}),e.createTextVNode(),P9])])):n.type==="order-processing"?(e.openBlock(),e.createElementBlock("div",M9,[e.createElementVNode("div",q9,[e.createVNode(x,{class:"shuttle2-spinner"}),e.createTextVNode(),$9])])):n.type==="enhanceFilter"?(e.openBlock(),e.createElementBlock("div",{key:7,class:e.normalizeClass(n.className)},[e.createVNode(f)],2)):n.type==="offers"?(e.openBlock(),e.createElementBlock("div",{key:8,class:e.normalizeClass(n.className)},[e.createVNode(f)],2)):n.type==="detailPage"?(e.openBlock(),e.createElementBlock("div",{key:9,class:e.normalizeClass(n.className)},[e.createVNode(f)],2)):n.type==="shippingAddress"?(e.openBlock(),e.createElementBlock("div",j9,[e.createElementVNode("div",H9,[e.createVNode(f)]),e.createElementVNode("div",U9,[e.createVNode(f)])])):n.type==="termsAndPayment"?(e.openBlock(),e.createElementBlock("div",z9,[e.createElementVNode("div",X9,[e.createVNode(f)]),e.createElementVNode("div",K9,[e.createVNode(f)]),e.createElementVNode("div",Q9,[e.createVNode(f)])])):n.type==="accordian-title"?(e.openBlock(),e.createElementBlock("div",Z9,[e.createElementVNode("div",G9,[e.createVNode(f)])])):n.type==="imageDiv"?(e.openBlock(),e.createElementBlock("div",W9,[e.createElementVNode("div",J9,[e.createVNode(f)])])):n.type==="product-detail"?(e.openBlock(),e.createElementBlock("div",Y9,[e.createElementVNode("div",e4,[e.createVNode(f)]),e.createElementVNode("div",t4,[e.createVNode(f)]),e.createElementVNode("div",n4,[e.createVNode(f)]),e.createElementVNode("div",r4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rows,y=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"product-action_item"},[e.createVNode(f)]))),128))]),e.createElementVNode("div",o4,[e.createVNode(f)])])):n.type===o.SKELETON_TYPE.KNOWLEDGE_DETAIL?(e.openBlock(),e.createElementBlock("div",a4,[e.createVNode(f,{class:e.normalizeClass(n.className)},null,8,["class"])])):e.createCommentVNode("",!0)}const l4=xe(b9,[["render",i4],["__scopeId","data-v-617229a3"]]),s4=["src"],c4={__name:"AtomImage",props:{src:{type:String,default:""},resourcesDomain:{type:String,default:""},placeholder:{type:String,default:""},height:{type:Number,default:200},width:{type:Number,default:200},loading:{type:Boolean,default:!1},sizes:{type:String}},setup(t){const i=t,n=e.computed(()=>i.src.includes("/resource/")&&!i.src.includes("://")&&i.resourcesDomain?i.resourcesDomain+i.src:i.src.includes("/servlet/servlet.ImageServer")&&!i.src.includes("://")&&i.resourcesDomain?i.resourcesDomain+"/"+i.src:i.src);return(r,o)=>t.loading?(e.openBlock(),e.createBlock(l4,{key:0,type:"full"})):t.src?(e.openBlock(),e.createElementBlock("img",{key:1,src:n.value,placeholder:[30,20],class:"rounded",sizes:"props.sizes"},null,8,s4)):e.createCommentVNode("",!0)}},d4=t=>(e.pushScopeId("data-v-eca105b8"),t=t(),e.popScopeId(),t),u4={class:"counter"},f4=["disabled"],h4={class:"material-icons-outlined counter-icon"},p4={key:0,class:"counter-spinner"},m4=["max","disabled","value"],g4=["disabled"],y4=[d4(()=>e.createElementVNode("span",{class:"material-icons-outlined counter-icon"}," add ",-1))],xl=xe({__name:"AtomButtonCounter",props:{min:{type:Number,default:0},max:{type:Number,default:999},modelValue:{type:Number,default:1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},decimal:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:i}){const n=t,r=i,o=e.computed(()=>n.disabled||n.loading),c=Vt(function(u){u.target.value?r("update:modelValue",Number(u.target.value)):r("update:modelValue",0)}),f=u=>{(u.key==="."||u.key==="e"||u.key==="E")&&!u.ctrlKey&&!u.metaKey&&n.decimal&&u.preventDefault()};function x(){n.modelValue<n.max&&r("update:modelValue",n.modelValue+1)}function y(){n.modelValue>n.min&&r("update:modelValue",n.modelValue-1)}return(u,s)=>(e.openBlock(),e.createElementBlock("div",u4,[e.createElementVNode("button",{disabled:t.modelValue<=t.min||o.value,onClick:y},[e.createElementVNode("span",h4,e.toDisplayString(t.modelValue>1?"remove":"close"),1)],8,f4),t.loading?(e.openBlock(),e.createElementBlock("div",p4,[e.createVNode(Cn,{class:"item-button_spinner"})])):(e.openBlock(),e.createElementBlock("input",{key:1,type:"number",min:"0",max:t.max,disabled:o.value,value:t.modelValue,step:"1",onInput:s[0]||(s[0]=(..._)=>e.unref(c)&&e.unref(c)(..._)),onKeydown:f},null,40,m4)),e.createElementVNode("button",{disabled:t.modelValue>=t.max||o.value,onClick:x},y4,8,g4)]))}},[["__scopeId","data-v-eca105b8"]]),vl=e.ref(!1),_l=e.ref(!1),bl=e.ref(!1),Cl=e.ref(!1),x4=()=>{if(typeof window<"u"){const t=()=>{const i=window.innerWidth;_l.value=i<768,bl.value=i>=768&&i<1024,Cl.value=i>=1024};e.onMounted(()=>{vl.value||(vl.value=!0,window.addEventListener("resize",t),t())})}return{isMobile:_l,isTablet:bl,isDesktop:Cl}},v4=["disabled"],_4=["disabled"],b4={class:"ect-w-max"},C4={class:"button-header-icon"},E4=["onClick"],k4={key:0,class:"button-options_item-icon"},w4=["disabled"],N4={class:"ect-w-max"},A4={class:"button-header-icon"},B4=["onClick"],S4={key:0,class:"button-options_item-icon"},El=xe({__name:"AtomButtonMenu",props:{icon:{type:String,default:null},select:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:{type:String,default:null},options:{type:Array,default:()=>[]}},emits:["selected"],setup(t,{emit:i}){const n=t,r=x4(),o=e.ref(!1),c=e.ref(null),f=e.ref({}),x=e.ref(!1),y=i;function u(p){p.stopPropagation(),o.value=!o.value}function s(p){p.stopPropagation(),o.value=!o.value,x.value=e.ref(o.value)}function _(p){y("selected",p),o.value=!1}function a(){!r.isMobile.value&&!n.disabled&&(o.value=!0)}function h(){!r.isMobile.value&&!x.value&&(o.value=!1)}function d(p){o.value&&(o.value=!1,x.value=!1)}return e.onMounted(()=>{document.addEventListener("click",d)}),e.onUnmounted(()=>{document.removeEventListener("click",d)}),(p,l)=>{var g;return t.options.length===1?(e.openBlock(),e.createElementBlock("button",{key:0,class:"esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:t.disabled,onClick:l[0]||(l[0]=m=>p.$emit("selected",t.options[0]))},[e.createElementVNode("span",null,e.toDisplayString(((g=t.options[0].label)==null?void 0:g.value)||t.options[0].name),1)],8,v4)):t.options.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(r).isMobile.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:t.disabled,onClick:e.withModifiers(u,["stop"])},[e.createElementVNode("span",b4,e.toDisplayString(t.name||t.options[0].name),1),e.createElementVNode("div",C4,[e.createVNode(we,{icon:"arrow_drop_down",class:"ect-relative ect-top-0.5 ect-ml-2",color:"#ffffff",size:"14"})])],8,_4),!t.disabled&&t.options.length&&o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"button-options",onClick:l[2]||(l[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"button-options_grow",onClick:l[1]||(l[1]=m=>o.value=!1)}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,m=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"button-options_item",onClick:b=>_(m)},[m.selected&&t.select?(e.openBlock(),e.createElementBlock("div",k4,[e.createVNode(we,{icon:"done",size:20,color:"black"})])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(m.name),1)],8,E4))),128))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-container",onMouseenter:a,onMouseleave:h},[e.createElementVNode("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",ref_key:"btnmenu",ref:c,disabled:t.disabled,onClick:e.withModifiers(s,["stop"])},[e.createElementVNode("span",N4,e.toDisplayString(t.name||t.options[0].name),1),e.createElementVNode("div",A4,[e.createVNode(we,{class:"ect-relative ect-top-0.5 ect-ml-2",icon:"arrow_drop_down",color:"#ffffff",size:"14"})])],8,w4),!t.disabled&&t.options.length&&o.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(f.value),class:"button-options",onClick:l[3]||(l[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,m=>{var b;return e.openBlock(),e.createElementBlock("div",{key:m,class:"button-options_item",onClick:v=>p.$emit("selected",m)},[m.selected&&t.select?(e.openBlock(),e.createElementBlock("div",S4,[e.createVNode(we,{icon:"done",size:20,color:"black"})])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(((b=m.label)==null?void 0:b.value)||m.name),1)],8,B4)}),128))],4)):e.createCommentVNode("",!0)],32))],64)):e.createCommentVNode("",!0)}}},[["__scopeId","data-v-cfcf21a3"]]),O4={class:"ect-flex ect-flex-col ect-w-full"},I4={key:0,class:"ect-h-[20px] ect-w-[150px]"},T4={key:1,class:"ect-flex ect-flex-col ect-gap-1"},V4=xe({__name:"MoleculeProductItem",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null}},setup(t){var g,m;const i=$t(),n=bn(),r=t,o=e.ref(((m=(g=n.savedItems)==null?void 0:g[r.itemId])==null?void 0:m.XX_ORD1__QTY__c)||0),c=e.ref(!1),f=e.ref(null),x=e.ref(!1),y=e.ref(!1),u=e.computed(()=>r.actions&&r.actions.length>0),s=e.computed(()=>r.actions.some(b=>b.action==="ADD_TO_CART")),_=e.computed(()=>{var b,v,C;return(b=r.offer)!=null&&b.appliedOnField?ml[(v=r.offer)==null?void 0:v.appliedOnField]===((C=r.offerSetting.value)==null?void 0:C.field):!0});e.watch(()=>n.savedItems,b=>{var v,C;b[r.itemId]&&!y.value&&((v=b[r.itemId])==null?void 0:v.XX_ORD1__QTY__c)!==o.value&&(o.value=((C=b[r.itemId])==null?void 0:C.XX_ORD1__QTY__c)||0,y.value=!0)},{deep:!0});function a(b){var v;y.value=!0,b===0&&((v=n.savedItems)!=null&&v[r.itemId])?d():l()}const h=b=>{var v;b.action==="ADD_TO_CART"?(y.value=!0,o.value=1,p()):b.action==="CONFIGURE"||(b.action==="CUSTOM"?window.open(((v=b.url)==null?void 0:v.value)||b.value,b.newTab?"_blank":"_self"):b.action==="ORDER_PARTS"||b.action)},d=async function(){c.value=!0,f.value=null;const b=[n.savedItems[r.itemId].Id];await n.deleteLineItems(b),c.value=!1},p=async function(){if(c.value=!0,n.loading.quoteCreate)setTimeout(()=>{p()},1e3);else{f.value=null;const v=[pl(o,r,n)];await n.saveToCart(v),c.value=!1}},l=Vt(async function(){x.value=!0;const b={qty:o.value,itemID:r.itemId};await n.updateCart(b),x.value=!1});return(b,v)=>{var C,B;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass("item ecb-theme-card "+t.mode)},[e.createElementVNode("div",{class:e.normalizeClass(`item-image ${t.mode}-image`)},[e.createVNode(c4,{src:t.thumbnail.value,loading:t.loading,"resources-domain":e.unref(i).storefrontDetails.resourcesDomain},null,8,["src","loading","resources-domain"])],2),e.createElementVNode("div",{class:e.normalizeClass(`item-text ${t.mode}-text`)},[e.createVNode(yl,{title:t.title,loading:t.loading,description:t.description},null,8,["title","loading","description"])],2),e.createElementVNode("div",O4,[e.createElementVNode("div",{class:e.normalizeClass(`item-attributes ${t.mode}-attributes`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.attributes,(w,S)=>(e.openBlock(),e.createBlock(gl,{key:S,class:e.normalizeClass(`item-attributes_field ${t.mode}-attributes_field`),loading:t.loading,value:w.value,label:w.label,field:w.value.field,offer:{applyOffer:w.applyOffer,offerDetails:w.offerDetails,offerValue:r.offer},"item-count":o.value,"applied-on-offer-matching-field":_.value},null,8,["class","loading","value","label","field","offer","item-count","applied-on-offer-matching-field"]))),128))],2),r.offerSetting&&_.value&&((C=r.offer)!=null&&C.offerDescShort)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${t.mode}-offer-banner`)},[e.createVNode(jt,{tag:t.offerSetting.offerDetails.styles.offerDescription.textStyles.tag,text:(B=r.offer)==null?void 0:B.offerDescShort,style:e.normalizeStyle(t.offerSetting.offerDetails.styles.offerDescription.textStyles),class:e.normalizeClass(b.field+"_value")},null,8,["tag","text","style","class"])],2)):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([`item-button ${t.mode}-button`,"ect-flex ect-flex-col ect-gap-2"])},[t.loading||t.applyOffer&&!r.offer?(e.openBlock(),e.createElementBlock("div",I4,[e.createVNode(ft)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value?(e.openBlock(),e.createBlock(Cn,{key:0,class:"item-button_spinner"})):(e.openBlock(),e.createElementBlock("div",T4,[o.value>0&&!t.loading&&s.value?(e.openBlock(),e.createBlock(xl,{key:0,modelValue:o.value,"onUpdate:modelValue":[v[0]||(v[0]=w=>o.value=w),a],loading:x.value},null,8,["modelValue","loading"])):(e.openBlock(),e.createBlock(El,{key:1,icon:"arrow_drop_down",disabled:t.loading,options:t.actions,onSelected:v[1]||(v[1]=w=>h(w))},null,8,["disabled","options"]))]))],64))],2)):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-f6e7697b"]]),D4={class:"item"},L4={class:"item-text"},F4={class:"item-attributes"},R4={key:0,class:"item-button"},P4={key:1,class:"ect-flex ect-flex-col ect-gap-1"},M4=xe({__name:"MoleculeProductItemTable",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null},offer:{type:Object,default:null}},setup(t){var p,l;const i=bn(),n=t,r=e.ref(((l=(p=i.savedItems)==null?void 0:p[n.itemId])==null?void 0:l.XX_ORD1__QTY__c)||0),o=e.ref(!1),c=e.ref(!1),f=e.ref(!1),x=e.computed(()=>n.actions&&n.actions.length>0),y=e.computed(()=>n.actions.some(g=>g.action==="ADD_TO_CART")),u=e.computed(()=>{var g,m,b;return(g=n.offer)!=null&&g.appliedOnField?ml[(m=n.offer)==null?void 0:m.appliedOnField]===((b=n.offerSetting.value)==null?void 0:b.field):!0});e.watch(()=>i.savedItems,g=>{var m,b;g[n.itemId]&&!c.value&&((m=g[n.itemId])==null?void 0:m.XX_ORD1__QTY__c)!==r.value&&(r.value=((b=g[n.itemId])==null?void 0:b.XX_ORD1__QTY__c)||0,c.value=!0)},{deep:!0});function s(g){var m;c.value=!0,g===0&&((m=i.savedItems)!=null&&m[n.itemId])?a():d()}const _=g=>{var m;g.action==="ADD_TO_CART"?(c.value=!0,r.value=1,h()):g.action==="CONFIGURE"||(g.action==="CUSTOM"?window.open(((m=g.url)==null?void 0:m.value)||g.value,g.newTab?"_blank":"_self"):g.action==="ORDER_PARTS"||g.action)},a=async function(){o.value=!0;const g=[i.savedItems[n.itemId].Id];await i.deleteLineItems(g),delete i.savedItems[n.itemId],o.value=!1},h=async function(){if(o.value=!0,i.loading.quoteCreate)setTimeout(()=>{h()},1e3);else{const m=[pl(r,n,i)];await i.saveToCart(m),i.savedItems[n.itemId]=r.value,o.value=!1}},d=Vt(async function(){f.value=!0;const g={qty:r.value,itemID:n.itemId};await i.updateCart(g),i.savedItems[n.itemId]=r.value,f.value=!1},800);return(g,m)=>(e.openBlock(),e.createElementBlock("div",D4,[e.createElementVNode("div",L4,[e.createVNode(yl,{url:t.url,title:t.title,loading:t.loading},null,8,["url","title","loading"])]),e.createElementVNode("div",F4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.attributes,b=>{var v;return e.openBlock(),e.createBlock(gl,{key:b.field,class:e.normalizeClass(`item-attributes_field ${t.mode}-attributes_field`),loading:t.loading,value:b.value,label:b.label,offer:{applyOffer:b.applyOffer,offerDetails:b.offerDetails,offerValue:n.offer},"item-count":r.value,"applied-on-offer-matching-field":u.value,"show-offer-description":!!((v=n.offer)!=null&&v.offerDescShort)},null,8,["class","loading","value","label","offer","item-count","applied-on-offer-matching-field","show-offer-description"])}),128))]),x.value?(e.openBlock(),e.createElementBlock("div",R4,[o.value?(e.openBlock(),e.createBlock(Cn,{key:0,class:"item-button_spinner"})):(e.openBlock(),e.createElementBlock("div",P4,[r.value>0&&!t.loading&&y.value?(e.openBlock(),e.createBlock(xl,{key:0,modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=b=>r.value=b),s],loading:f.value},null,8,["modelValue","loading"])):(e.openBlock(),e.createBlock(El,{key:1,icon:"arrow_drop_down",disabled:t.loading,options:t.actions,onSelected:m[1]||(m[1]=b=>_(b))},null,8,["disabled","options"]))]))])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-22a3ac6d"]]),q4=["placeholder"],$4={key:0,class:"srch-error"},j4={class:"srch-option_lst-main"},H4={class:"italic"},U4={class:"srch-option_lst-sugg"},z4={class:"italic"},X4={class:"srch-option_lst-main"},K4={class:"italic"},Q4={class:"srch-option_lst-sugg"},Z4={class:"italic"},G4={class:"srch-option_lst-main"},W4={class:"italic"},J4={class:"srch-option_lst-sugg"},Y4={class:"italic"},e6={key:1,class:"search1"},t6={class:"search-container_header"},n6={class:"search-container_header_input ectheme-input-box"},r6=["placeholder","value"],o6=xe({__name:"BlinkMoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},suggestion:{type:Boolean,default:!1},showSearchIconAlways:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enableSearchClick:{type:Boolean,default:!1}},emits:["update:modelValue","enter"],setup(t,{emit:i}){const n=i;let r;const o=e.ref(""),c=e.ref(!1),f=e.ref(!1),x=e.ref(null),y=()=>{x.value=null,o.value="",n("update:modelValue",""),n("enter")},u=p=>{o.value.length>1?(p.target.blur(),_(o.value+"*")):x.value="Search text must be more than one character.",c.value=!1},s=()=>{f.value||(x.value=null,o.value.length>1?_(o.value+"*"):o.value.length===1&&(x.value="Search text must be more than one character."),c.value=!1)},_=p=>{n("update:modelValue",p),c.value=!1,f.value=!1},a=p=>{const l=p.target.value;x.value=null,l.length||n("update:modelValue","")},h=()=>{n("enter")},d=p=>{var g;r&&(clearTimeout(r),r=null);const l=((g=p==null?void 0:p.target)==null?void 0:g.value)??"";r=setTimeout(()=>{n("update:modelValue",l)},500)};return(p,l)=>t.suggestion?(e.openBlock(),e.createElementBlock("div",{key:0,class:"srch",tabindex:"0",onFocusin:l[6]||(l[6]=g=>c.value=!0),onFocusout:s,onKeydown:e.withKeys(u,["enter"])},[e.createElementVNode("div",{class:e.normalizeClass(["srch-inp",{"srch-error-border":x.value}])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=g=>o.value=g),type:"search",placeholder:t.placeholder,onInput:a},null,40,q4),[[e.vModelText,o.value]]),e.createVNode(we,{icon:o.value?"close":"search",size:14,color:x.value?"red":"#acacac",onClick:y},null,8,["icon","color"])],2),x.value?(e.openBlock(),e.createElementBlock("div",$4,[e.createElementVNode("span",null,e.toDisplayString(x.value),1)])):e.createCommentVNode("",!0),o.value.length>1&&c.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"srch-option",onMouseover:l[4]||(l[4]=g=>f.value=!0),onMouseout:l[5]||(l[5]=g=>f.value=!1)},[e.createElementVNode("div",{class:"srch-option_lst",onClick:l[1]||(l[1]=g=>_(o.value+"*"))},[e.createElementVNode("div",j4,[e.createTextVNode(" Search for "),e.createElementVNode("span",H4,e.toDisplayString(o.value)+"*",1)]),e.createElementVNode("div",U4,[e.createTextVNode(" word that starts with "),e.createElementVNode("span",z4,e.toDisplayString(o.value)+"*",1)])]),e.createElementVNode("div",{class:"srch-option_lst",onClick:l[2]||(l[2]=g=>_(o.value))},[e.createElementVNode("div",X4,[e.createTextVNode(" Search for "),e.createElementVNode("span",K4,'"'+e.toDisplayString(o.value)+'"',1)]),e.createElementVNode("div",Q4,[e.createTextVNode(" search exactly for "),e.createElementVNode("span",Z4,'"'+e.toDisplayString(o.value)+'"',1)])]),e.createElementVNode("div",{class:"srch-option_lst",onClick:l[3]||(l[3]=g=>_("*"+o.value+"*"))},[e.createElementVNode("div",G4,[e.createTextVNode(" Search for "),e.createElementVNode("span",W4,"*"+e.toDisplayString(o.value)+"*",1)]),e.createElementVNode("div",J4,[e.createTextVNode(" word that includes "),e.createElementVNode("span",Y4,"*"+e.toDisplayString(o.value)+"*",1)])])],32)):e.createCommentVNode("",!0)],32)):(e.openBlock(),e.createElementBlock("div",e6,[e.createElementVNode("div",t6,[e.createElementVNode("div",n6,[e.createElementVNode("input",{class:"",type:"search",placeholder:t.placeholder,value:t.modelValue,onInput:d,onKeyup:e.withKeys(h,["enter"])},null,40,r6),t.loading?(e.openBlock(),e.createBlock(Cn,{key:0})):e.createCommentVNode("",!0),t.modelValue?(e.openBlock(),e.createBlock(we,{key:1,icon:"close",size:12,color:"#acacac",onClick:y})):e.createCommentVNode("",!0),t.enableSearchClick||!t.modelValue?(e.openBlock(),e.createBlock(we,{key:2,class:"ect-relative ect-top-[-1px]",icon:"search",size:14,color:"#acacac",onClick:h})):e.createCommentVNode("",!0)])])]))}},[["__scopeId","data-v-31366d17"]]),kl=t=>(e.pushScopeId("data-v-f5574cfa"),t=t(),e.popScopeId(),t),a6=["id"],i6={key:0,class:"product-search"},l6={key:1,class:"product-not-found"},s6=kl(()=>e.createElementVNode("span",{class:"product-not-found_icon material-symbols-outlined"}," error ",-1)),c6=kl(()=>e.createElementVNode("span",{class:"product-not-found_text"},"No results found",-1)),d6={key:2,class:"product-item"},u6=20,f6=xe({__name:"MoleculeProductBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},request:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},catalogType:{type:String,required:!0},blockId:{type:String,default:""},accountId:{type:String,default:null},searchText:{type:String,default:""},onCountUpdate:{type:Function,default:null},hideHeader:{type:Boolean,default:!1},initialItems:{type:Array,default:()=>[]}},setup(t,{expose:i}){const n=["vertical","horizontal","square","table"],r=t,o=e.ref(Math.floor(Math.random()*1e9)),c=e.ref(null),f=bn(),x=e.ref(1),y=e.ref(!0),u=e.ref(!0);e.ref(!1);const s=e.ref([]),_=e.ref(0),a=e.ref(r.request);let h=200;const d=e.ref(r.searchText||""),p=e.computed(()=>r.initialItems||[]),l=e.computed(()=>!!(d.value||r.searchText));function g(K,F,E){const T=E==="Item",D=[];return K.forEach(P=>{var q,z;const X=JSON.parse(JSON.stringify(F));try{T?X.itemId=P.Id:(X.itemId=P.XX_ORD1__Item__c,X.catalogItemId=P.Id);const{description:R,thumbnail:$,title:j,attributes:U,actions:Q}=X;$!=null&&$.field&&!$.isStatic&&($.value=Se(P,$.field)),j!=null&&j.field&&!j.isStatic&&(j.value=Se(P,j.field)),R!=null&&R.field&&!R.isStatic&&(R.value=Se(P,R.field)),(U||[]).forEach(ne=>{var ce,fe;(ce=ne==null?void 0:ne.value)!=null&&ce.field&&!ne.value.isStatic&&(ne.value.value=Se(P,ne.value.field,ne.value.dataType)||"-"),(fe=ne==null?void 0:ne.label)!=null&&fe.field&&!ne.label.isStatic&&(ne.label.value=Se(P,ne.label.field,ne.label.dataType)||"-")}),(Q||[]).forEach(ne=>{ne.action==="CUSTOM"&&(ne.url&&!ne.url.isStatic&&(ne.url.value=Se(P,ne.url.field)),ne.label&&!ne.label.isStatic&&(ne.label.value=Se(P,ne.label.field)))});const Y=T?Se(P,"XX_ORD1__Friendly_URL__c"):Se(P,"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c");((q=X.friendlyURLFields)==null?void 0:q.length)>0&&Y?((z=X.friendlyURLFields)==null||z.forEach(ne=>{X.friendlyURL=(X.friendlyURL||"").replace(`{!${ne}}`,Se(P,ne))}),X.friendlyURL="/"+(X.friendlyURL||"")+"/"+Y):X.url&&(X.friendlyURL=X.url+"/"+((P==null?void 0:P.Id)||"")),X.friendlyURL&&(X.friendlyURL=X.friendlyURL.replace(/\/{2,}/g,"/"))}catch{}D.push(X)}),D}const m=e.ref(null),b=e.ref(null),v=e.computed(()=>{}),C=e.computed(()=>{var K;return(K=r.fields)==null?void 0:K.header});e.computed(()=>{var K;return((K=C.value)==null?void 0:K.mainHeading)||{}}),e.computed(()=>{var K;return((K=C.value)==null?void 0:K.subHeading)||{}});const B=e.computed(()=>{var K;return s.value.length>0?s.value:Array(w.value).fill((K=r.fields)==null?void 0:K.productCard)}),w=e.computed(()=>Number(r.configuration.displaySettings.itemsPerPage||u6)),S=e.computed(()=>Number(r.configuration.displaySettings.lazyLoadBatch)),I=e.computed(()=>{var K;return((K=r.configuration.productItemOrientation)==null?void 0:K.toLowerCase())||"vertical"}),A=e.ref(n.includes(I.value)?m.value||I.value:"vertical"),k=e.computed(()=>s.value.length<1&&!u.value),N=e.computed(()=>`product-${A.value} width-${b.value?b.value:r.configuration.displaySettings.columns||1}`),V=e.computed(()=>r.configuration.displaySettings.enableSearch),L=e.ref(null),M=e.ref(!1),Z=e.ref({});e.watch(x,(K,F)=>{K!==F&&(console.log("[fetchProducts] 1"),G(!0))}),e.watch(L,K=>{K!==null&&r.onCountUpdate&&r.onCountUpdate(K)}),e.watch(d,()=>{x.value=1,console.log("[fetchProducts] 2"),G(!0)}),e.watch(()=>r.searchText,(K,F)=>{K!==F&&(d.value=K||"")});const G=Vt(async function(K){var P;if(h=600,p.value&&p.value.length>0&&!l.value){const X=g(p.value,(P=r.fields)==null?void 0:P.productCard,r.catalogType);s.value=X,L.value=X.length,u.value=!1,K&&c.value&&c.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});return}u.value=!0;let E=w.value;S.value<E&&S.value>0&&(E=S.value);const T={...a.value,accountID:r.accountId,rowLimit:E,searchText:d.value||r.searchText,rowOffSet:w.value*(x.value-1)};K&&c.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});const D=await f.getProductItems(T,r.fields.productCard,r.catalogType);D&&(y.value=D.items.length===E,L.value=D.count,s.value=D.items,_.value=Math.ceil(D.count/w.value)),console.log("[MOLECULEPRODUCTBLOCK:fetchProducts] prodData",D),u.value=!1},h);async function J(){const{mainHeading:K,subHeading:F}=r.fields.header;if(!K.isStatic&&K.field||!F.isStatic&&F.field){const E=[];K.isStatic?K.value=K.title:E.push(K.field),F.isStatic?F.value=F.title:E.push(F.field);const T={...a.value,accountID:r.accountId,fields:E},D=await f.getEcatalogDetails(T);K.isStatic||(K.value=D[K.field],K.isStatic=!0),F.isStatic||(F.value=D[F.field],F.isStatic=!0)}else K.value=K.title,F.value=F.title}return i({currentPage:x,fetchProducts:G}),e.onMounted(()=>{G(),J()}),(K,F)=>(e.openBlock(),e.createElementBlock("div",{id:o.value,ref_key:"productBlock",ref:c,class:"product"},[V.value&&v.value===void 0&&!t.hideHeader?(e.openBlock(),e.createElementBlock("div",i6,[e.createVNode(o6,{modelValue:d.value,"onUpdate:modelValue":F[0]||(F[0]=E=>d.value=E),placeholder:"Search products..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.renderSlot(K.$slots,"default",{},void 0,!0),k.value?(e.openBlock(),e.createElementBlock("div",l6,[s6,e.createTextVNode(),c6])):(e.openBlock(),e.createElementBlock("div",d6,[A.value==="table"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(B.value,E=>(e.openBlock(),e.createElementBlock("div",{key:(E==null?void 0:E.catalogItemId)||(E==null?void 0:E.itemId),class:"product-item_table"},[e.createVNode(M4,{class:"ecb-theme-card","item-id":E==null?void 0:E.itemId,"catalog-item-id":E==null?void 0:E.catalogItemId,loading:u.value,mode:A.value,title:E==null?void 0:E.title,attributes:E==null?void 0:E.attributes,actions:E==null?void 0:E.actions,thumbnail:{value:E==null?void 0:E.thumbnail.value},description:E==null?void 0:E.description,url:E==null?void 0:E.friendlyURL,"template-id":t.configuration.productTemplateId,"ecatalog-id":E==null?void 0:E.eCatalogId,"apply-offer":M.value,"offer-setting":Z.value,offer:E==null?void 0:E.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value,E=>(e.openBlock(),e.createElementBlock("div",{key:(E==null?void 0:E.catalogItemId)||(E==null?void 0:E.itemId),class:e.normalizeClass(["product-item_record",N.value])},[e.createVNode(V4,{"item-id":E==null?void 0:E.itemId,"catalog-item-id":E==null?void 0:E.catalogItemId,loading:u.value,mode:A.value,title:E==null?void 0:E.title,attributes:E==null?void 0:E.attributes,actions:E==null?void 0:E.actions,thumbnail:{value:E==null?void 0:E.thumbnail.value},description:E==null?void 0:E.description,url:E==null?void 0:E.friendlyURL,"template-id":t.configuration.productTemplateId,"ecatalog-id":E==null?void 0:E.eCatalogId,"apply-offer":M.value,"offer-setting":Z.value,offer:E==null?void 0:E.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])],2))),128))]))],8,a6))}},[["__scopeId","data-v-f5574cfa"]]),wl=t=>(e.pushScopeId("data-v-3951668d"),t=t(),e.popScopeId(),t),h6={class:"catalog ect-flex ect-flex-col ect-gap-0 md:ect-flex-row"},p6={class:"catalog-product md:ect-grow"},m6={class:"catalog-filter-mobile ect-flex ect-justify-between m-show"},g6=wl(()=>e.createElementVNode("h3",null,"Filter Products",-1)),y6=wl(()=>e.createElementVNode("span",null," OPEN FILTERS",-1)),Nl=xe({__name:"OrganismsCatalogBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},id:{type:String,default:""},searchTerm:{type:String,default:""},onCountUpdate:{type:Function,default:null},initialItems:{type:Array,default:()=>[]}},setup(t){var a,h,d,p,l,g,m,b,v,C,B;const i=$t(),n=t,r=e.ref(!1),o=e.ref(((a=n.configuration.dynamicFilters)==null?void 0:a.length)>0&&((h=n.configuration.displaySettings)==null?void 0:h.displayDynamicFilters)&&!n.searchTerm),c=e.ref(n.configuration.displaySettings),f=e.computed(()=>r9.get(n.configuration.catalogType)),x=e.computed(()=>{let w=u.value.searchText;return w&&!w.endsWith("*")&&(w+="*"),w||""}),y=e.computed(()=>{var L;const w=[],{description:S,thumbnail:I,title:A,attributes:k,actions:N}=n.fields.productCard,V=[S,I,A];return k.forEach(M=>{V.push(M.value),V.push(M.label)}),(N==null?void 0:N.length)>0&&N.forEach(M=>{M.action==="CUSTOM"&&(V.push(M.url),V.push(M.label))}),V.forEach(M=>{!M.isStatic&&M.field?w.push(M.field):M.value=M.title||"-"}),f.value==="eCatalog"?(w.push("XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),w.push("XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c")):(w.push("XX_ORD1__Friendly_URL__c"),w.push("XX_ORD1__SYS_Requires_Configuration__c")),((L=n.fields.productCard.friendlyURLFields)==null?void 0:L.length)>0&&w.push(...n.fields.productCard.friendlyURLFields),w}),u=e.ref({blockId:n.id,catalogType:n9.get(n.configuration.catalogType)||"Full",checkcurrency:(d=c.value)==null?void 0:d.checkCurrency,eCatalogIDs:n.configuration.catalogType==="ECATALOG_OVERRIDE"&&n.configuration.catalogId?[n.configuration.catalogId]:null,fields:y.value,alternateFieldName:n.configuration.catalogCustomField,searchText:"",whereCondition:n.configuration.staticFilters,sortByField:((l=(p=n.configuration.sort)==null?void 0:p.primary)==null?void 0:l.field)||"Name",sortOrder:(m=(g=n.configuration.sort)==null?void 0:g.primary)==null?void 0:m.direction,secondarySortByField:(v=(b=n.configuration.sort)==null?void 0:b.secondary)==null?void 0:v.field,secondarySortOrder:(B=(C=n.configuration.sort)==null?void 0:C.secondary)==null?void 0:B.direction}),s=e.ref(null),_=e.ref(null);return e.watch(()=>r.value,w=>{w&&window.scrollTo(0,0)}),e.onMounted(()=>{u.value.searchText=n.searchTerm||""}),e.watch(u,w=>{_.value&&_.value.fetchFilterList(),s.value&&(s.value.currentPage=1,console.log("[fetchProducts] 4"),s.value.fetchProducts())},{deep:!0}),e.watch(()=>n.searchTerm,w=>{typeof w=="string"&&(u.value.searchText=w)}),(w,S)=>(e.openBlock(),e.createElementBlock("div",h6,[e.createElementVNode("div",p6,[e.createVNode(f6,{ref_key:"product",ref:s,"block-id":t.id,"account-id":e.unref(i).activeStorefrontInfo.accountId,configuration:t.configuration,"catalog-type":f.value,request:u.value,fields:t.fields,"search-text":x.value,"initial-items":n.initialItems,"hide-header":!!n.searchTerm,"on-count-update":n.onCountUpdate},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",m6,[g6,e.createElementVNode("div",{class:"ect-flex ect-items-center ect-gap-2 m-show",onClick:S[0]||(S[0]=I=>r.value=!0)},[e.createVNode(we,{class:"filter-product_icon",icon:"tune",color:"#acacac",size:20}),y6])],512),[[e.vShow,!r.value&&o.value]])]),_:1},8,["block-id","account-id","configuration","catalog-type","request","fields","search-text","initial-items","hide-header","on-count-update"])])]))}},[["__scopeId","data-v-3951668d"]]),x6=function(t,i){const n={};n.sectionStyle={},n.blockStyle={};const{visiblity:r}=t;n.visibility=r;const{layout:o}=t;if(n.blockStyle=v6(o,i),o&&(o!=null&&o.padding)){const{top:x,bottom:y,left:u,right:s}=o.padding;x&&(n.sectionStyle.paddingTop=`${x}px`),y&&(n.sectionStyle.paddingBottom=`${y}px`),u&&(n.sectionStyle.paddingLeft=`${u}px`),s&&(n.sectionStyle.paddingRight=`${s}px`)}o!=null&&o.gap&&(n.sectionStyle.gap=`${o.gap}px`);const{styling:c}=t;c&&(c.verticalAlignment&&(n.sectionStyle.alignItems=c.verticalAlignment),c.radius&&(n.sectionStyle.borderRadius=c.radius),c.borderStyle&&(n.sectionStyle.borderStyle=c.borderStyle));const{Background:f}=t;return f&&f.style==="Solid"&&(n.sectionStyle.backgroundColor=f.color),f&&f.opacity==="100%"&&(n.sectionStyle.opacity=1),f&&f.image&&f.image!=="sampleImage.png"&&(n.sectionStyle.backgroundImage=`url(${f.image})`,f.imageSize&&(n.sectionStyle.backgroundSize=f.imageSize)),f&&f.repeat==="no-repeat"&&(n.sectionStyle.backgroundRepeat=f.repeat),f&&(f.horizontalAlignment||f.verticalAlignment)&&(n.sectionStyle.backgroundPosition=f.horizontalAlignment+" "+f.verticalAlignment),n};function v6(t,i){if(!t)return[{}];const{columnSize:n,columns:r}=t;if(i)return Array(r).fill({display:"flex",flexDirection:"column",width:"100%"});if(!n)return Array(r).fill({});const o=n.split("/");return typeof r=="string"&&o.length!==parseInt(r)?Array(r).fill({}):typeof r=="number"&&o.length!==r?Array(r).fill({}):o.map(c=>({flexBasis:`${c}`}))}const En=t=>(e.pushScopeId("data-v-d8d63f41"),t=t(),e.popScopeId(),t),_6={class:"ect-composable-catalog-wrapper"},b6=["href"],C6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons","data-name":"ec-material-icons"},null,-1)),E6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Outlined","data-name":"ec-material-icons-outlined"},null,-1)),k6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Round","data-name":"ec-material-icons-round"},null,-1)),w6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200","data-name":"ec-material-symbols-outlined"},null,-1)),N6={class:"ect-flex ect-flex-col md:ect-flex-row"},A6=["data-bid","data-bname"],B6={key:0,class:"ect-flex ect-items-center ect-justify-center ect-min-h-[50vh]"},S6=[En(()=>e.createElementVNode("div",{class:"ect-flex ect-flex-col ect-items-center ect-gap-3"},[e.createElementVNode("div",{class:"ect-spinner","aria-label":"Loading"}),e.createElementVNode("div",{class:"ect-text-sm ect-text-gray-500"},"Loading catalog…")],-1))],O6={key:1,class:"ect-composable-catalog ectheme"},I6=["data-sid","data-sname"],T6=["data-bid","data-bname"],Io=xe({__name:"ExpediteCatalog",props:{templateId:{type:String,required:!0},quoteId:{type:String,default:null},userId:{type:String,required:!0},searchTerm:{type:String,default:""},onCatalogCountUpdate:{type:Function,default:null},previewData:{type:Object,default:()=>({})},initialData:{type:Array,default:()=>[]}},setup(t){const i=t,n=hl(),r=$t(),o=e.ref(!1),c=e.ref(!1),f=e.ref(""),x=e.ref(""),y=e.computed(()=>n.pageBlocks||[]),u=e.computed(()=>{var a;const _=[];return(a=y.value)==null||a.forEach(h=>{var g;const d={...h},p=typeof h.contentJSON=="string"?JSON.parse(h.contentJSON):h.contentJSON;let l={};p&&(l=x6(p,o.value),d.styleObject=h.hideStyle?{}:l.sectionStyle,d.visibility=l.visibility,(g=d.blocks)==null||g.forEach((m,b)=>{m.styleObject=l.blockStyle[b]})),_.push(d)}),_}),s=()=>{o.value=window.innerWidth<=768};return e.onMounted(async()=>{var h,d,p;window.addEventListener("resize",s),s(),c.value=!0,await r.fetchDomainDetails(),r.setData({templateId:i.templateId,quoteId:i.quoteId,userId:i.userId});const _=e.getCurrentInstance(),a=(h=_==null?void 0:_.proxy)==null?void 0:h.$el;a&&typeof a.getRootNode=="function"&&a.getRootNode(),r.getTheme().then(l=>{l&&l.value&&(f.value=l.value);try{r.setThemeData()}catch{}});try{const l=((d=r.salesforceOrgId)==null?void 0:d.value)??r.salesforceOrgId,g=((p=r.storefrontId)==null?void 0:p.value)??r.storefrontId;if(l&&g&&typeof l=="string"&&typeof g=="string"){const m=Date.now(),b=`${or}/${l}/${g}/css/theme_${g}.css?t=${m}`;x.value=b}}catch{}await r.getBlockInformation(),c.value=!1}),(_,a)=>{var h,d,p,l,g,m,b;return e.openBlock(),e.createElementBlock("div",_6,[f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{key:0,"data-name":"template-theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("link",{key:1,rel:"stylesheet",href:x.value,"data-name":"ec-theme-stylesheet-link"},null,8,b6)):e.createCommentVNode("",!0),C6,E6,k6,w6,Object.keys(t.previewData).length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(yr),e.createElementVNode("div",N6,[e.createElementVNode("div",{class:"ect-w-full",style:e.normalizeStyle((h=t.previewData)==null?void 0:h.styleObject),"data-bid":(d=t.previewData)==null?void 0:d.blockId,"data-bname":(p=t.previewData)==null?void 0:p.blockName},[e.createVNode(Nl,{id:(l=t.previewData)==null?void 0:l.Id,mode:"preview",configuration:(g=t.previewData)==null?void 0:g.configuration,fields:(m=t.previewData)==null?void 0:m.fields,"search-term":(b=t.previewData)==null?void 0:b.searchTerm,"on-count-update":t.onCatalogCountUpdate},null,8,["id","configuration","fields","search-term","on-count-update"])],12,A6)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(yr),c.value?(e.openBlock(),e.createElementBlock("div",B6,S6)):(e.openBlock(),e.createElementBlock("div",O6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,v=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:v.id},[e.unref(r).useVisiblity(v.visibility)?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(v.styleObject),class:"ect-flex ect-flex-col md:ect-flex-row","data-sid":v.sectionId,"data-sname":v.sectionName},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.blocks,C=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C.id},[(C==null?void 0:C.blockFormat)==="catalog"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ect-w-full",style:e.normalizeStyle(C.styleObject),"data-bid":C.blockId,"data-bname":C.blockName},[e.createVNode(Nl,{id:C.Id,configuration:C.configuration,fields:C.fields,"search-term":t.searchTerm||C.searchTerm,"on-count-update":t.onCatalogCountUpdate,"initial-items":t.initialData},null,8,["id","configuration","fields","search-term","on-count-update","initial-items"])],12,T6)):e.createCommentVNode("",!0)],64))),128))],12,I6)):e.createCommentVNode("",!0)],64))),128))]))],64))])}}},[["__scopeId","data-v-d8d63f41"]]),Al={ExpediteConfigurator:Hr,ExpediteGPT:Ur,ExpediteCatalog:Io},V6={install(t,i={}){t.component("ExpediteConfigurator",Hr),t.component("ExpediteGPT",Ur),t.component("ExpediteCatalog",Io)},...Al};Ze.Components=Al,Ze.ExpediteCatalog=Io,Ze.ExpediteConfigurator=Hr,Ze.ExpediteGPT=Ur,Ze.default=V6,Ze.useComRootStore=un,Object.defineProperties(Ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
145
|
+
`,or="https://d2pgvmpph8dmlo.cloudfront.net";function fl(t,i,n){return t?t==null?void 0:t.map(r=>Wh(r,i,n)):[]}function Wh(t,i,n){const{url:r,staticResource:o}=t;if(!r)return null;if(r.includes("/resource/")&&!r.includes("://")&&o){const c=r.split("/"),f=c[c.length-1];return`${or}/${n}/static/${f}.${i}`}else return r}const hl=je.defineStore("blockLegacy",()=>{const t=$t(),i=e.ref(null),n=e.ref(null),r=e.ref(!1),o=e.ref(null);async function c(u,s=!0){var h,d;if(console.info("fetchBlockInformation templateId:",u),!u)return;s&&(i.value=[],r.value=!1);const _={storefrontId:t.orgWithStorefrontId,templateId:u};console.log("fetchBlockInformation variables",JSON.stringify(_)),console.log("fetchBlockInformation getTemplateBlock",ul);const a=await dl(ul,_);if(n.value=u,s)(h=a.content)!=null&&h.blocks?i.value=f(JSON.parse(a.content.blocks)):i.value=[],r.value=!0;else return((d=a==null?void 0:a.content)==null?void 0:d.blocks)||[]}function f(u){const s=t.salesforceOrgId;return u==null||u.forEach(_=>{_.blocks=_.blocks?JSON.parse(_.blocks):[],_.blocks.forEach(a=>{var h,d;Object.assign(a,JSON.parse(a.contentJSON)),a.contentJSON=null,a.id=a.blockId||a.Id,(a.componentName==="catalogBlock"||a.componentName==="relatedProducts")&&(x(a.fields.productCard.actions),a.fields.noFriendlyURL=!0,a.fields.productCard.friendlyURL=null,a.fields.productCard.friendlyURLFields=null,(h=a.configuration)!=null&&h.productTemplateId?a.fields.productCard.url="/product/"+((d=a.configuration)==null?void 0:d.productTemplateId):a.fields.productCard.url=null),a.componentName==="productSummary"&&(console.log("block.fields.actions",a.fields.actions),x(a.fields.actions)),a.customJS&&(a.customJS=fl(a.customJS,"js",s)),a.customCSS&&(a.customCSS=fl(a.customCSS,"css",s))})}),u}function x(u){u.forEach(s=>{s.action==="CUSTOM_ACTION"&&(s.action="CUSTOM",s.name=s.label.title,s.value=s.url.field||s.url.title,s.newTab=s.openInNewTab)})}return{metaInfo:o,currentPageId:n,pageBlocks:i,blockLoaded:r,fetchBlockInformation:c,getFormattedSectionBlocks:u=>e.computed(()=>{const s=[];return i.value&&i.value.length>0&&i.value.forEach(_=>{const a=_.blocks;a&&a.length>0&&a.forEach(h=>{if(h.id=h.blockId,u){const d=["checkoutAccount","shippingAddress","shippingMethod","customForm","termsAndPayment","quoteSummary","customCode"];console.log("section.sectionName",_.sectionName,h.componentName),h&&h.configuration&&(d.includes(h.componentName)||h.configuration.isCheckoutBlock)&&s.push(h)}else h&&h.configuration&&!u&&s.push(h)})}),s})}}),$t=je.defineStore("composableCatalog",()=>{const t=hl();bn();const i=et(),n=e.ref(!0),r=e.ref({accountId:"",contactId:"",userType:"",domain:"",locale:"en-US"}),o=e.ref({}),c=e.ref(""),f=e.ref(""),x=e.ref(""),y=e.ref(""),u=e.ref(""),s=e.ref(""),_=e.ref(null),a=e.ref(!1),h=e.computed(()=>y.value+"::"+u.value);async function d(){_.value=null,a.value=!0;try{const w={domain:tr,templateBlocksFilter:{templateId:{eq:"wrapperDefault"}}},S=Date.now().toString(),I=await Ne.post(`${_n}?t=${S}`,{query:Zh,variables:w},{headers:{"Content-Type":"application/json","x-api-key":nr,"Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0","X-Cache-Bust":S},withCredentials:!1});console.log("[COMPOSABLECATALOG:fetchDomainDetails] response",I);const A=I&&I.data?I.data:null;console.log("[COMPOSABLECATALOG:fetchDomainDetails] payload",A);const k=A&&A.data&&A.data.dataByDomain&&Array.isArray(A.data.dataByDomain.items)?A.data.dataByDomain.items:[],N=k.length?k[0]:null;return console.log("[COMPOSABLECATALOG:fetchDomainDetails] item",N),console.log("[COMPOSABLECATALOG:fetchDomainDetails] storefrontDetails",o.value),o.value=N,r.value={accountId:N.guestAccountId,contactId:"",userType:"AWSGuest",domain:N.domain,locale:"en-US"},y.value=N.organization.salesforceOrgId,u.value=N.storefrontId,N}catch(w){throw console.info("[COMPOSABLECATALOG:fetchDomainDetails] Error fetching domain",w),_.value=w&&w.message?w.message:"Unknown error",w}finally{a.value=!1}}function p(w){f.value=(w==null?void 0:w.templateId)??"",x.value=(w==null?void 0:w.quoteId)??"",s.value=(w==null?void 0:w.userId)??""}function l(w){w.value=w}function g(w){o.value=w}async function m(){try{await t.fetchBlockInformation(f.value,!0)}catch(w){i.handleError(w,"getBlockInformation")}}const b=async()=>{var w,S;if(console.log("[COMPOSABLECATALOG:getTheme]"),!!u.value)try{const I=await dl(Gh,{storefrontId:u.value,filter:{key:{eq:"theme"},templateId:{eq:"wrapper"}}});return console.log("[COMPOSABLECATALOG:getTheme] themeData",I),((S=(w=I.content)==null?void 0:w.items)==null?void 0:S[0])??null}catch(I){console.log("[COMPOSABLECATALOG:getTheme] Error getting theme data",I)}},v=()=>{if(typeof document>"u")return;const w=y.value,S=u.value;if(!w||!S)return;const I=`${or}/${w}/${S}/css/theme_${S}.css`;let A=!1;if(typeof window<"u"&&window.VueExpediteComponents&&typeof window.VueExpediteComponents.applyThemeToShadows=="function")try{window.VueExpediteComponents.applyThemeToShadows(I),A=!0}catch(M){console.warn("[COMPOSABLECATALOG:setThemeData] shadow injection failed; will inject in head",M)}let k="";try{k=new URL(_n).origin}catch{}const N=typeof window<"u"?window.location.href:"",V=(M,Z={})=>{const G=document.head||document.getElementsByTagName("head")[0];if(!G)return;let J=document.getElementById(M);J||(J=document.createElement("link"),J.id=M,G.appendChild(J)),Object.entries(Z).forEach(([K,F])=>{F!=null&&J.setAttribute(K,String(F))})};((M,Z,G=!0)=>{const J=document.head||document.getElementsByTagName("head")[0];if(!J||document.getElementById(M))return;const K=document.createElement("script");K.id=M,K.src=Z,G&&(K.async=!0),J.appendChild(K)})("ec-webfont-loader","https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js",!0),V("ec-preconnect-fonts",{rel:"preconnect",href:"https://fonts.gstatic.com"}),k&&V("ec-preconnect-appsync",{rel:"preconnect",href:k}),A||V("ec-theme-stylesheet",{rel:"stylesheet",href:I}),V("ec-google-fonts",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Symbols+Outlined|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Montserrat:300,400,500,600,700,800|Roboto:300,400,500,600,700,800|Abel|Caveat:400,700|Titillium+Web:400,600,700"}),N&&V("ec-canonical",{rel:"canonical",href:N}),V("ec-favicon",{rel:"icon",type:"image/x-icon",href:`${or}/expedite/Expedite_Favicon.ico`})};function C(){return!0}function B(){f.value="",x.value="",y.value="",u.value="",s.value=""}return{templateId:f,isLoading:n,activeStorefrontInfo:r,quoteAccount:c,storefrontDetails:o,salesforceOrgId:y,storefrontId:u,userId:s,orgWithStorefrontId:h,useVisiblity:C,fetchDomainDetails:d,setData:p,setQuoteId:l,setStorefrontDetails:g,getBlockInformation:m,getTheme:b,setThemeData:v,reset:B}}),at=async(t,i=null,n="",r=!1)=>{const o=_n,c=nr;let f=200,x;const y=tr,u=$t();try{const s=i;let _="";u.activeStorefrontInfo&&u.activeStorefrontInfo.accountId&&!_&&(_=u.activeStorefrontInfo.accountId),s.data&&u.activeStorefrontInfo&&!t.includes("CognitoActions")&&!t.includes("query listUsers")&&(s.data.userType=u.activeStorefrontInfo.userType,s.data.accountId=_,s.data.domain=y);const a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":c},body:JSON.stringify({query:t,variables:s})});if(x=await(a==null?void 0:a.json()),x=x.data,n)x=JSON.parse(x[n]),f=Number(x.statusCode),x=x.content,f===401&&console.info("401",t,JSON.stringify(i));else if(t.includes("SalesforceActions")){let h=x;h=JSON.parse(x.salesforceActions),h.statusCode==="401"&&console.info("401",t,JSON.stringify(i),x)}}catch(s){console.log(s),f=400,x=s}return{statusCode:f,response:x}},Jh=["Needs Configuration","Suggests Configuration","Upload Configuration"],Yh=["Upload","Upload Add","Upload Configuration"],e9=["No Configuration","Suggests Configuration","Upload Add","",null,void 0],t9=["CONFIGURE","UPLOAD","ADD_TO_CART"],n9=new Map([["Full","Full"],["FULL","Full"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","Default"],["ECATALOG_ACCOUNT_CUSTOM","Alternate"],["ECATALOG_OVERRIDE","Override"]]),r9=new Map([["Full","Item"],["FULL","Item"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","eCatalog"],["ECATALOG_ACCOUNT_CUSTOM","eCatalog"],["ECATALOG_OVERRIDE","eCatalog"]]),bt=(t,i,n=!1)=>{const r=et();let o,c,f;return n?(c=t.statusCode,f=t.content):(o=JSON.parse(t.response.salesforceActions),c=o.statusCode,f=o.content),Number(c)===200&&f&&f.message&&typeof f.message=="string"&&f.message.startsWith("ERROR:")?(r.handleError(f.message,"useExtractContent"),!1):Number(c)!==200||t.statusCode!==200||typeof f=="string"&&f.includes("ERROR:")||typeof f=="string"&&f.includes("Error:")||f.errorCode==="APEX_ERROR"?(f.errorCode==="APEX_ERROR"?r.handleError(f.message,"useExtractContent"):i||r.handleError(f,"useExtractContent"),!1):f},bn=je.defineStore("catalog",()=>{const t=$t(),i=e.ref(!1),n=e.ref(0),r=e.ref(null),o=e.ref(null),c=e.ref([]),f=e.ref({}),x=e.ref({}),y=e.ref(null),u=e.ref(null),s=e.ref(!1),_=e.ref({search:""}),a=e.ref({qliRecords:!0,quoteCreate:!1,quoteDetails:!1}),h=e.computed(()=>t.activeStorefrontInfo.accountId),d=e.computed(()=>({domain:t.activeStorefrontInfo.domain,accountId:h.value,userType:t.activeStorefrontInfo.userType}));function p(L="true"){fs(`qreset-${r.value}`,L)}async function l(L){const M={action:"makeCall",data:{...d.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=deleteLineItems&ut="+t.activeStorefrontInfo.userType,payload:JSON.stringify(L)}},Z=await at(ot,M,void 0,!0),G=bt(Z);G&&(n.value--,S(!0),console.log("[CATALOG:deleteLineItems] content",G)),p()}async function g(L){var E,T;if(!L.qty)return;const M=t.quoteId;if(!M)return;L.retry=1;const Z={...L,quoteid:M},G={action:"makeCall",data:{...d.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=updateQLI&ut="+t.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},J=await at(ot,G,void 0,!0),K=(T=(E=J.response)==null?void 0:E.salesforceActions)==null?void 0:T.toLowerCase();(K.includes("record currently unavailable")||K.includes("unable_to_lock_row"))&&L.retry<3&&setTimeout(()=>{L.retry+=1,g(L)},500),bt(J)&&S(!0),p()}async function m(L){const M=t.quoteId;if(!M)return;Array.isArray(L)&&(L=L[0]);const Z={quoteId:M,itemId:L.itemID,eCatalogItemId:L.eCatalogItemID,quantity:L.qty,accountId:h.value,offerId:L.offerId,offerType:L.offerType,offerDiscount:L.offerDiscount,appliedOnField:L.appliedOnField,rpId:L.rpId,qtyTierAmt:L.qtyTierAmt,isAddToCartFromIB:L.isAddToCartFromIB},G={action:"makeCall",data:{...d.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=saveItemToQuoteBlink&ut="+t.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},J=await at(ot,G,void 0,!0),K=bt(J);if(K){n.value++,S(!0);const F=JSON.parse(K);F.quoteId&&F.quoteId!==M&&(r.value=F.quoteId,t.setQuoteId(r.value))}p()}async function b(L,M,Z){var T,D,P;const G=Z==="Item",J=[],K=((L==null?void 0:L.searchText)||"").toString().trim(),F=Array.isArray(L==null?void 0:L.fields)?L.fields:[];Array.isArray(L==null?void 0:L.filters)&&L.filters,L==null||L.filterLogic;const E={searchPL:K,origin:"genesis_ai",userId:(t==null?void 0:t.userId)||"",orgId:(t==null?void 0:t.salesforceOrgId)||"",orgType:"Production",requestId:Dt(),quoteId:(t==null?void 0:t.quoteId)||"",accountId:((T=t==null?void 0:t.activeStorefrontInfo)==null?void 0:T.accountId)||"",numberOfRecords:(L==null?void 0:L.numberOfRecords)||(L==null?void 0:L.rowLimit)||10,fields:F,filters:(L==null?void 0:L.whereCondition)||[]};try{const q=await fetch("https://ec-apigw.blink.expedite1.com/getCatalogProducts",{method:"POST",headers:{"x-api-key":"Y:GPb{M&0*v:C%])A(+i9acGu4aY)A=%","Content-Type":"application/json"},body:JSON.stringify(E)}),z=await q.json();if(!q.ok||!(z!=null&&z.isSuccess)||!((D=z==null?void 0:z.data)!=null&&D.selected_products))return;const R=z.data.selected_products,$=Object.values(R).map(U=>{var Q;return(Q=U==null?void 0:U.catalogResponse)==null?void 0:Q.productInfo}).filter(Boolean);$.forEach(U=>{var se,he,ce,re;const Q=JSON.parse(JSON.stringify(M)),Y=Se(U,G?"XX_ORD1__Friendly_URL__c":"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),ne=Se(U,G?"XX_ORD1__SYS_Requires_Configuration__c":"XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c");G?Q.itemId=U.Id:(Q.itemId=U.XX_ORD1__Item__c,Q.catalogItemId=U.Id),Q.thumbnail.value=Q.thumbnail.field&&!Q.thumbnail.isStatic?Se(U,Q.thumbnail.field):"",Q.title.value=Q.title.field&&!Q.title.isStatic?Se(U,Q.title.field):"",Q.description.value=Q.description.field&&!Q.description.isStatic?Se(U,Q.description.field):"",(se=Q.attributes)==null||se.forEach(te=>{te.value.field&&(te.value.value=Se(U,te.value.field,te.value.dataType)||"-"),te.label.field&&(te.label.value=Se(U,te.label.field,te.label.dataType)||"-")}),Q.actions=Q.actions.filter(({action:te})=>te==="ADD_TO_CART"&&e9.includes(ne)||te==="CONFIGURE"&&Jh.includes(ne)||te==="UPLOAD"&&Yh.includes(ne)||!t9.includes(te)),(he=Q.actions)==null||he.forEach(te=>{if(te.action==="CUSTOM"){const{url:ie,label:le}=te;ie.isStatic||(ie.value=Se(U,ie.field)),le.isStatic||(le.value=Se(U,le.field))}}),((ce=Q.friendlyURLFields)==null?void 0:ce.length)>0&&Y?((re=Q.friendlyURLFields)==null||re.forEach(te=>{Q.friendlyURL=Q.friendlyURL.replace(`{!${te}}`,Se(U,te))}),Q.friendlyURL="/"+Q.friendlyURL+"/"+Y):Q.url&&(Q.friendlyURL=Q.url+"/"+U.Id),Q.friendlyURL&&(Q.friendlyURL=Q.friendlyURL.replace(/\/{2,}/g,"/")),J.push(Q)});const j=Number(((P=z==null?void 0:z.data)==null?void 0:P.totalCount)||$.length)||0;return{items:J,count:j>2e3?2e3:j}}catch(X){console.log("[CATALOG:getProductItems] new API error",X);return}}async function v(L){var J;console.log("[CATALOG:getEcatalogDetails] jsonData",L),L.accountID=t.activeStorefrontInfo.accountId;const M={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getEcatalogDetails&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},Z=await at(ot,M),G=bt(Z);if(G!==!1)return(J=JSON.parse(G))==null?void 0:J.recordData}async function C(L,M=()=>{}){L.accountID=t.activeStorefrontInfo.accountId;const Z={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogGroupCounts&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},G=await at(ot,Z,void 0,!0),J=JSON.parse(JSON.parse(G.response.salesforceActions).content);return M(J),J}async function B(L,M=()=>{}){const Z={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogPicklistGroupCounts&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},G=await at(ot,Z,void 0,!0);return M(JSON.parse(JSON.parse(G.response.salesforceActions).content)),JSON.parse(JSON.parse(G.response.salesforceActions).content)}async function w(){var J,K,F,E,T,D;console.log("[CATALOG:getObjectDetails] start",{currentQuoteId:r.value,payload:d.value});const L=t.quoteId;if(console.log("[CATALOG:getObjectDetails] qtId",L),L)console.log("[CATALOG:getObjectDetails] Quote found!"+L),console.log("[CATALOG:getObjectDetails] Quote found",L);else{console.log("[CATALOG:getObjectDetails] No quote found!"),console.warn("[CATALOG:getObjectDetails] No quote found, aborting");return}const M={action:"makeCall",data:{...d.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getFormattedObjectDetails&objectapi=XX_ORD1__Quote__c&objectid=${L}`}};console.log("[CATALOG:getObjectDetails] request",M.data.endpoint),a.quoteDetails=!0,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> true");const Z=await at(ot,M,void 0,!0);console.log("[CATALOG:getObjectDetails] response received",{hasResponse:!!(Z!=null&&Z.response),len:String(((J=Z==null?void 0:Z.response)==null?void 0:J.salesforceActions)||"").length});const G=bt(Z,!0);return console.log("[CATALOG:getObjectDetails] extracted content",{hasContent:!!G}),a.quoteDetails=!1,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> false"),G?(f.value=JSON.parse(G),console.log("[CATALOG:getObjectDetails] quoteRecord set",{id:(K=f.value)==null?void 0:K.Id,accountName:(F=f.value)==null?void 0:F.XX_ORD1__Account_Name__c,checkedOut:(E=f.value)==null?void 0:E.XX_ORD1__Checked_Out__c}),t.quoteAccount=(T=f.value)==null?void 0:T.XX_ORD1__Account_Name__c,f.value.XX_ORD1__Checked_Out__c?(console.warn("[CATALOG:getObjectDetails] Quote is already checked out, resetting quoteId"),i.value=!0,console.log("[CATALOG:getObjectDetails] end (checked out) -> false"),!1):(console.log("[CATALOG:getObjectDetails] end (success)",{id:(D=f.value)==null?void 0:D.Id}),f.value)):(console.warn("[CATALOG:getObjectDetails] no content returned, resetting quoteId",{qtId:L}),console.log("[CATALOG:getObjectDetails] end (no content) -> false"),!1)}const S=Vt(I,500);async function I(L=!1){var K,F;console.log("[CATALOG:getQuoteItems] start",{noLoad:L}),a.value.qliRecords=!L;const M=t.quoteId;if(console.log("[CATALOG:getQuoteItems] qtId",M),!M){console.log("[CATALOG:getQuoteItems] No quote found!"),a.value.qliRecords=!1,console.warn("[CATALOG:getQuoteItems] No quote found, aborting");return}const Z={action:"makeCall",data:{...d.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getQuoteItems&ut=${t.activeStorefrontInfo.userType}"eid=${M}`}};console.log("[CATALOG:getQuoteItems] request",Z.data.endpoint);const G=await at(ot,Z,void 0,!0);console.log("[CATALOG:getQuoteItems] response received",{hasResponse:!!(G!=null&&G.response),len:String(((K=G==null?void 0:G.response)==null?void 0:K.salesforceActions)||"").length});const J=bt(G);if(console.log("[CATALOG:getQuoteItems] extracted content",{hasContent:!!J}),a.value.qliRecords=!1,console.log("[CATALOG:getQuoteItems] loading.qliRecords -> false"),J){const E={};c.value=JSON.parse(J),console.log("[CATALOG:getQuoteItems] qliRecords set",{count:(F=c.value)==null?void 0:F.length}),c.value.forEach(T=>{E[T.XX_ORD1__Item__c]=T}),x.value=E,n.value=c.value.length,console.log("[CATALOG:getQuoteItems] qliRecords",c.value),console.log("[CATALOG:getQuoteItems] end (success)",{cartCount:n.value})}else console.warn("[CATALOG:getQuoteItems] end (no content)")}async function A(L){console.log("[CATALOG:getSavedFilter] ecfr",L);const M={action:"makeCall",data:{...d.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getSavedFilter&ut=${t.activeStorefrontInfo.userType}&ecfr=${L}`}},Z=await at(ot,M,void 0,!0),G=bt(Z);return G?(console.log("[CATALOG:getSavedFilter] Saved Filters",G),JSON.parse(G)):!1}async function k(L,M){const Z={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=exportToCSV&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(L)}},G=await at(ot,Z,void 0,!0),J=bt(G);J&&M(J)}async function N(){var G;console.log("[CATALOG:calculateAvaTax]"),u.value=null;const L=t.quoteId;if(!L)return;(G=f.value)!=null&&G.Id||await w();const M=f.value;if(M.XX_ORD1__Shipping_Address__c&&M.XX_ORD1__Shipping_City__c&&M.XX_ORD1__Shipping_Country__c&&M.XX_ORD1__Shipping_State__c&&M.XX_ORD1__Shipping_Zip__c){const J={recordId:L,isCommit:!1},K={action:"makeCall",data:{...d.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=calculateAvaTax&ut=${t.activeStorefrontInfo.userType}`,payload:JSON.stringify(J)}};s.value=!0;const F=await at(ot,K,void 0,!0),E=bt(F);if(E)console.log("[CATALOG:calculateAvaTax] content",E);else{const T=JSON.parse(F.response.salesforceActions).content;u.value=T}s.value=!1}else console.log("[CATALOG:calculateAvaTax] Shipping address not found so tax can not be calculated")}function V(L,M,Z=!0){const G=M.qtyTiers;if(!G)return null;const J=G.find(K=>K.ev===null?L>=K.sv:L>=K.sv&&L<=K.ev);return J?Z?J.formattedOfferPrice:J.originalPrice:null}return{quoteCheckedOut:i,avaTaxError:u,avaTaxLoading:s,cartCount:n,cartUpdated:p,quoteId:r,loading:a,filter:_,quoteRecord:f,secondQuoteId:o,qliRecords:c,savedItems:x,savedFilter:y,exportToCSV:k,getObjectDetails:w,getSavedFilter:A,saveToCart:m,deleteLineItems:l,getPicklistFilterData:B,getQuoteItems:I,updateCart:g,getFilterData:C,getProductItems:b,calculateAvaTax:N,getEcatalogDetails:v,getVolumePrice:V}});function pl(t,i,n){const{itemId:r,catalogItemId:o,offer:c,isAddToCartFromIB:f}=i,{offerId:x,offerType:y,offerDiscount:u,appliedOnField:s,rpId:_}=c||{};return{qty:t.value,itemID:r,eCatalogItemID:o,offerId:x,offerType:y,offerDiscount:u,appliedOnField:s,rpId:_,isAddToCartFromIB:f,qtyTierAmt:c?n.getVolumePrice(t.value,c,!1):null}}const o9={KNOWLEDGE_DETAIL:"knowledgeDetail"},ml={"Catalog Price":"XX_ORD1__Negotiated_Price__c","List Price":"XX_ORD1__List_Price2__c"},a9={name:"SkeletonLoader"},i9={class:"skeleton-loader"};function l9(t,i,n,r,o,c){return e.openBlock(),e.createElementBlock("div",i9)}const ft=xe(a9,[["render",l9],["__scopeId","data-v-d79c3985"]]),jt=xe({__name:"AtomCustomTag",props:{tag:{type:String,default:null},text:{type:[String,Number,Boolean],default:"-"},type:{type:String,default:null},method:{type:String,default:null},style:{type:Object,default:()=>({})},secStyle:{type:Object,default:()=>({})},cssStyle:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},inherit:{type:[Array,String],default:()=>[]}},setup(t){const i=t,n={h1:"ecb-header-lvl-1",h2:"ecb-header-lvl-2",h3:"ecb-header-lvl-3",h4:"ecb-header-lvl-4",h5:"ecb-header-lvl-5",h6:"ecb-header-lvl-6",p:"ecb-text-regular",span:"ecb-text-small",strong:"ecb-text-strong",large:"ecb-text-large"},r=e.ref(!1),o=e.computed(()=>{if(i.text===null||i.text===void 0)return"";const y=String(i.text);return(y==null?void 0:y.replace(/\r\n|\n/g,"<br>"))||""}),c=e.computed(()=>{var u,s;const y=i.tag||((u=i.style)==null?void 0:u.tag)||((s=i.secStyle)==null?void 0:s.tag)||"p";return y==="large"||y==="strong"?"div":y}),f=e.computed(()=>{var u;const y=i.tag||((u=i.style)==null?void 0:u.tag)||"p";return n[y]||"ecb-text-regular"}),x=e.computed(()=>{var u,s;const y={};if(i.style&&((u=i.style)!=null&&u.overrite)){const{bold:_,color:a,italic:h,underline:d,strikethrough:p,strikeThrough:l,size:g,family:m,lineHeight:b}=i.style;_&&(y.fontWeight="700"),a&&(y.color=a),h&&(y.fontStyle="italic"),m&&(y.fontFamily=m),b&&(y.lineHeight=b),d?y.textDecoration="underline":(p||l)&&(y.textDecoration="line-through"),g&&(y.fontSize=g)}if(i.secStyle&&((s=i.secStyle)!=null&&s.overrite)){const{bold:_,color:a,italic:h,underline:d,strikethrough:p,strikeThrough:l,size:g,family:m,lineHeight:b}=i.secStyle;_&&(y.fontWeight="700"),a&&(y.color=a),h&&(y.fontStyle="italic"),m&&(y.fontFamily=m),b&&(y.lineHeight=b),d?y.textDecoration="underline":(p||l)&&(y.textDecoration="line-through"),g&&(y.fontSize=g)}for(const _ of i.inherit)y[_]="inherit";return y});return(y,u)=>t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(t.cssStyle),class:"custom-tag-skeletion"},[e.createVNode(ft)],4)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),e.mergeProps({key:1},y.$attrs,{type:t.method,disabled:t.disabled,style:x.value,class:f.value,onMouseover:u[0]||(u[0]=s=>r.value=!0),onMouseout:u[1]||(u[1]=s=>r.value=!1),innerHTML:o.value}),null,16,["type","disabled","style","class","innerHTML"]))}},[["__scopeId","data-v-075625ac"]]),s9={key:1,class:"field-label"},c9={class:"ect-flex ect-flex-col ect-justify-start"},d9={key:0,class:"ect-pr-5"},u9={key:1,class:"field-value ect-pr-5"},f9={key:1,class:"field-value"},gl=xe({__name:"AtomFieldAttribute",props:{tag:{type:String,default:"span"},field:{type:String,default:""},value:{type:Object,default:()=>({})},label:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},offer:{type:Object,default:()=>({})},itemCount:{type:Number,default:1},appliedOnOfferMatchingField:{type:Boolean,default:!1},showOfferDescription:{type:Boolean,default:!1},isProductSummary:{type:Boolean,default:!1},index:{type:Number,default:0},parentWidth:{type:Number,default:0}},setup(t){const i=bn(),n=t,r=e.computed(()=>!1),o=e.computed(()=>{var a;return n.offer.offerValue.offerId&&n.offer.offerValue.formattedOfferPrice||n.offer.offerValue.rpId&&((a=n.offer.offerValue.qtyTiers)==null?void 0:a.length)>0?!!n.appliedOnOfferMatchingField:!1}),c=e.computed(()=>n.offer.offerDetails.styles.offerValue.textStyles.tag),f=e.computed(()=>n.offer.offerDetails.styles.offerDescription.textStyles),x=e.computed(()=>{var _,a;return(_=n.offer.offerValue)!=null&&_.qtyTiers?i.getVolumePrice(n.itemCount>0?n.itemCount:1,n.offer.offerValue):(a=n.offer.offerValue)==null?void 0:a.formattedOfferPrice}),y=e.computed(()=>({"ect-flex ect-line-through":r.value&&n.offer.offerValue&&o.value})),u=e.computed(()=>n.value&&(n.value.isStatic||!n.loading)),s=e.computed(()=>(r.value&&!n.isProductSummary||n.isProductSummary&&n.index===0)&&n.showOfferDescription&&n.appliedOnOfferMatchingField);return(_,a)=>{var h,d;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.field,"field ect-gap-1 ect-flex ect-flex-col"])},[t.label?(e.openBlock(),e.createBlock(jt,{key:0,tag:(h=t.label.style)==null?void 0:h.tag,text:t.label.value,style:e.normalizeStyle(t.label.style),class:e.normalizeClass(`${t.field}_label`)},null,8,["tag","text","style","class"])):(e.openBlock(),e.createElementBlock("div",s9,[e.createVNode(ft)])),e.createElementVNode("div",c9,[r.value&&n.offer.offerValue&&o.value?(e.openBlock(),e.createElementBlock("div",d9,[e.createVNode(jt,{tag:c.value,text:x.value,style:e.normalizeStyle(t.offer.offerDetails.styles.offerValue.textStyles),class:e.normalizeClass(`${t.field}_value`)},null,8,["tag","text","style","class"])])):r.value&&!n.offer.offerValue?(e.openBlock(),e.createElementBlock("div",u9,[e.createVNode(ft)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(y.value)},[u.value?(e.openBlock(),e.createBlock(jt,{key:0,tag:(d=t.value.style)==null?void 0:d.tag,text:t.value.value,style:e.normalizeStyle(t.value.style),class:e.normalizeClass(`${t.field}_value`)},null,8,["tag","text","style","class"])):(e.openBlock(),e.createElementBlock("div",f9,[e.createVNode(ft)]))],2)]),s.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"field-description ect-left-0 ect-w-max ect-pt-2",style:e.normalizeStyle({maxWidth:t.parentWidth?t.parentWidth+"px":void 0})},[e.createVNode(jt,{tag:f.value.tag,text:n.offer.offerValue.offerDescShort,style:e.normalizeStyle(f.value),class:e.normalizeClass(t.field+"_value")},null,8,["tag","text","style","class"])],4)):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-7a78d3c9"]]),h9={key:1,class:"filter"},p9={class:"filter-title"},m9={key:0,class:"filter-desc"},g9={key:1,class:"filter-desc"},y9={key:2,class:"filter-desc"},yl=xe({__name:"AtomProductText",props:{title:{type:Object,default:()=>({})},description:{type:Object,default:null},loading:{type:Boolean,default:!1},url:{type:String,default:null}},setup(t){const i=dn(),n=t;function r(){n.url&&!n.loading&&i.push(n.url)}return(o,c)=>t.loading?(e.openBlock(),e.createElementBlock("div",h9,[e.createElementVNode("div",p9,[e.createVNode(ft)]),t.description?(e.openBlock(),e.createElementBlock("div",m9,[e.createVNode(ft)])):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",g9,[e.createVNode(ft)])):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",y9,[e.createVNode(ft)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.title?(e.openBlock(),e.createBlock(jt,{key:0,class:e.normalizeClass({"ect-cursor-pointer":t.url}),text:t.title.value,style:e.normalizeStyle(t.title.style),onClick:r},null,8,["class","text","style"])):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createBlock(jt,{key:1,text:t.description.value,style:e.normalizeStyle(t.description.style)},null,8,["text","style"])):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-f0d3c54f"]]),x9={name:"Spinner"},v9={class:"spinner"};function _9(t,i,n,r,o,c){return e.openBlock(),e.createElementBlock("div",v9)}const Cn=xe(x9,[["render",_9],["__scopeId","data-v-83f8c910"]]),b9={name:"AtomSkeletonWidget",components:{AtomSkeletonLoader:ft,AtomSpinner:Cn},props:{rows:{type:Number,default:4},type:{type:String,default:"full"},className:{type:String,default:""}},data(){return{SKELETON_TYPE:o9}}},Oo=t=>(e.pushScopeId("data-v-617229a3"),t=t(),e.popScopeId(),t),C9={key:0,class:"page"},E9=Oo(()=>e.createElementVNode("div",{class:"page-header"},null,-1)),k9={class:"page-body"},w9={class:"page-body_board"},N9={key:1,class:"field"},A9={key:2,class:"filter"},B9={class:"filter-option_inner"},S9={key:3,class:"full"},O9={key:4,class:"shuttle"},I9={class:"shuttle-full"},T9={class:"shuttle-full"},V9={class:"shuttle-half"},D9={class:"shuttle-half"},L9={class:"shuttle-button"},F9={key:5,class:"shuttle2"},R9={class:"shuttle2-full"},P9=Oo(()=>e.createElementVNode("span",null,"Processing payment",-1)),M9={key:6,class:"shuttle2"},q9={class:"shuttle2-full"},$9=Oo(()=>e.createElementVNode("span",null,"Processing order",-1)),j9={key:10,class:"skeleton-shipping"},H9={class:"skeleton-shipping-full"},U9={class:"skeleton-shipping-half"},z9={key:11,class:"skeleton-terms"},X9={class:"skeleton-terms-half"},K9={class:"skeleton-terms-full"},Q9={class:"skeleton-terms-full"},Z9={key:12,class:""},G9={class:"skeleton-terms-half"},W9={key:13,class:""},J9={class:"skeleton-terms-half"},Y9={key:14,class:"product"},e4={class:"product-image"},t4={class:"product-texts"},n4={class:"product-description"},r4={class:"product-action"},o4={class:"product-button"},a4={key:15,class:""};function i4(t,i,n,r,o,c){const f=e.resolveComponent("AtomSkeletonLoader"),x=e.resolveComponent("AtomSpinner");return n.type==="page"?(e.openBlock(),e.createElementBlock("div",C9,[E9,e.createElementVNode("div",k9,[e.createElementVNode("div",w9,[e.createVNode(f)])])])):n.type==="fieldattribute"?(e.openBlock(),e.createElementBlock("div",N9,[e.createVNode(f)])):n.type==="filteroptions"?(e.openBlock(),e.createElementBlock("div",A9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rows,y=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"filter-option"},[e.createElementVNode("div",B9,[e.createVNode(f)])]))),128))])):n.type==="full"?(e.openBlock(),e.createElementBlock("div",S9,[e.createVNode(f)])):n.type==="shuttle"?(e.openBlock(),e.createElementBlock("div",O9,[e.createElementVNode("div",I9,[e.createVNode(f)]),e.createElementVNode("div",T9,[e.createVNode(f)]),e.createElementVNode("div",V9,[e.createVNode(f)]),e.createElementVNode("div",D9,[e.createVNode(f)]),e.createElementVNode("div",L9,[e.createVNode(f)])])):n.type==="shuttle-done"?(e.openBlock(),e.createElementBlock("div",F9,[e.createElementVNode("div",R9,[e.createVNode(x,{class:"shuttle2-spinner"}),e.createTextVNode(),P9])])):n.type==="order-processing"?(e.openBlock(),e.createElementBlock("div",M9,[e.createElementVNode("div",q9,[e.createVNode(x,{class:"shuttle2-spinner"}),e.createTextVNode(),$9])])):n.type==="enhanceFilter"?(e.openBlock(),e.createElementBlock("div",{key:7,class:e.normalizeClass(n.className)},[e.createVNode(f)],2)):n.type==="offers"?(e.openBlock(),e.createElementBlock("div",{key:8,class:e.normalizeClass(n.className)},[e.createVNode(f)],2)):n.type==="detailPage"?(e.openBlock(),e.createElementBlock("div",{key:9,class:e.normalizeClass(n.className)},[e.createVNode(f)],2)):n.type==="shippingAddress"?(e.openBlock(),e.createElementBlock("div",j9,[e.createElementVNode("div",H9,[e.createVNode(f)]),e.createElementVNode("div",U9,[e.createVNode(f)])])):n.type==="termsAndPayment"?(e.openBlock(),e.createElementBlock("div",z9,[e.createElementVNode("div",X9,[e.createVNode(f)]),e.createElementVNode("div",K9,[e.createVNode(f)]),e.createElementVNode("div",Q9,[e.createVNode(f)])])):n.type==="accordian-title"?(e.openBlock(),e.createElementBlock("div",Z9,[e.createElementVNode("div",G9,[e.createVNode(f)])])):n.type==="imageDiv"?(e.openBlock(),e.createElementBlock("div",W9,[e.createElementVNode("div",J9,[e.createVNode(f)])])):n.type==="product-detail"?(e.openBlock(),e.createElementBlock("div",Y9,[e.createElementVNode("div",e4,[e.createVNode(f)]),e.createElementVNode("div",t4,[e.createVNode(f)]),e.createElementVNode("div",n4,[e.createVNode(f)]),e.createElementVNode("div",r4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rows,y=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"product-action_item"},[e.createVNode(f)]))),128))]),e.createElementVNode("div",o4,[e.createVNode(f)])])):n.type===o.SKELETON_TYPE.KNOWLEDGE_DETAIL?(e.openBlock(),e.createElementBlock("div",a4,[e.createVNode(f,{class:e.normalizeClass(n.className)},null,8,["class"])])):e.createCommentVNode("",!0)}const l4=xe(b9,[["render",i4],["__scopeId","data-v-617229a3"]]),s4=["src"],c4={__name:"AtomImage",props:{src:{type:String,default:""},resourcesDomain:{type:String,default:""},placeholder:{type:String,default:""},height:{type:Number,default:200},width:{type:Number,default:200},loading:{type:Boolean,default:!1},sizes:{type:String}},setup(t){const i=t,n=e.computed(()=>i.src.includes("/resource/")&&!i.src.includes("://")&&i.resourcesDomain?i.resourcesDomain+i.src:i.src.includes("/servlet/servlet.ImageServer")&&!i.src.includes("://")&&i.resourcesDomain?i.resourcesDomain+"/"+i.src:i.src);return(r,o)=>t.loading?(e.openBlock(),e.createBlock(l4,{key:0,type:"full"})):t.src?(e.openBlock(),e.createElementBlock("img",{key:1,src:n.value,placeholder:[30,20],class:"rounded",sizes:"props.sizes"},null,8,s4)):e.createCommentVNode("",!0)}},d4=t=>(e.pushScopeId("data-v-eca105b8"),t=t(),e.popScopeId(),t),u4={class:"counter"},f4=["disabled"],h4={class:"material-icons-outlined counter-icon"},p4={key:0,class:"counter-spinner"},m4=["max","disabled","value"],g4=["disabled"],y4=[d4(()=>e.createElementVNode("span",{class:"material-icons-outlined counter-icon"}," add ",-1))],xl=xe({__name:"AtomButtonCounter",props:{min:{type:Number,default:0},max:{type:Number,default:999},modelValue:{type:Number,default:1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},decimal:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:i}){const n=t,r=i,o=e.computed(()=>n.disabled||n.loading),c=Vt(function(u){u.target.value?r("update:modelValue",Number(u.target.value)):r("update:modelValue",0)}),f=u=>{(u.key==="."||u.key==="e"||u.key==="E")&&!u.ctrlKey&&!u.metaKey&&n.decimal&&u.preventDefault()};function x(){n.modelValue<n.max&&r("update:modelValue",n.modelValue+1)}function y(){n.modelValue>n.min&&r("update:modelValue",n.modelValue-1)}return(u,s)=>(e.openBlock(),e.createElementBlock("div",u4,[e.createElementVNode("button",{disabled:t.modelValue<=t.min||o.value,onClick:y},[e.createElementVNode("span",h4,e.toDisplayString(t.modelValue>1?"remove":"close"),1)],8,f4),t.loading?(e.openBlock(),e.createElementBlock("div",p4,[e.createVNode(Cn,{class:"item-button_spinner"})])):(e.openBlock(),e.createElementBlock("input",{key:1,type:"number",min:"0",max:t.max,disabled:o.value,value:t.modelValue,step:"1",onInput:s[0]||(s[0]=(..._)=>e.unref(c)&&e.unref(c)(..._)),onKeydown:f},null,40,m4)),e.createElementVNode("button",{disabled:t.modelValue>=t.max||o.value,onClick:x},y4,8,g4)]))}},[["__scopeId","data-v-eca105b8"]]),vl=e.ref(!1),_l=e.ref(!1),bl=e.ref(!1),Cl=e.ref(!1),x4=()=>{if(typeof window<"u"){const t=()=>{const i=window.innerWidth;_l.value=i<768,bl.value=i>=768&&i<1024,Cl.value=i>=1024};e.onMounted(()=>{vl.value||(vl.value=!0,window.addEventListener("resize",t),t())})}return{isMobile:_l,isTablet:bl,isDesktop:Cl}},v4=["disabled"],_4=["disabled"],b4={class:"ect-w-max"},C4={class:"button-header-icon"},E4=["onClick"],k4={key:0,class:"button-options_item-icon"},w4=["disabled"],N4={class:"ect-w-max"},A4={class:"button-header-icon"},B4=["onClick"],S4={key:0,class:"button-options_item-icon"},El=xe({__name:"AtomButtonMenu",props:{icon:{type:String,default:null},select:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:{type:String,default:null},options:{type:Array,default:()=>[]}},emits:["selected"],setup(t,{emit:i}){const n=t,r=x4(),o=e.ref(!1),c=e.ref(null),f=e.ref({}),x=e.ref(!1),y=i;function u(p){p.stopPropagation(),o.value=!o.value}function s(p){p.stopPropagation(),o.value=!o.value,x.value=e.ref(o.value)}function _(p){y("selected",p),o.value=!1}function a(){!r.isMobile.value&&!n.disabled&&(o.value=!0)}function h(){!r.isMobile.value&&!x.value&&(o.value=!1)}function d(p){o.value&&(o.value=!1,x.value=!1)}return e.onMounted(()=>{document.addEventListener("click",d)}),e.onUnmounted(()=>{document.removeEventListener("click",d)}),(p,l)=>{var g;return t.options.length===1?(e.openBlock(),e.createElementBlock("button",{key:0,class:"esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:t.disabled,onClick:l[0]||(l[0]=m=>p.$emit("selected",t.options[0]))},[e.createElementVNode("span",null,e.toDisplayString(((g=t.options[0].label)==null?void 0:g.value)||t.options[0].name),1)],8,v4)):t.options.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(r).isMobile.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:t.disabled,onClick:e.withModifiers(u,["stop"])},[e.createElementVNode("span",b4,e.toDisplayString(t.name||t.options[0].name),1),e.createElementVNode("div",C4,[e.createVNode(we,{icon:"arrow_drop_down",class:"ect-relative ect-top-0.5 ect-ml-2",color:"#ffffff",size:"14"})])],8,_4),!t.disabled&&t.options.length&&o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"button-options",onClick:l[2]||(l[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"button-options_grow",onClick:l[1]||(l[1]=m=>o.value=!1)}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,m=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"button-options_item",onClick:b=>_(m)},[m.selected&&t.select?(e.openBlock(),e.createElementBlock("div",k4,[e.createVNode(we,{icon:"done",size:20,color:"black"})])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(m.name),1)],8,E4))),128))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-container",onMouseenter:a,onMouseleave:h},[e.createElementVNode("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",ref_key:"btnmenu",ref:c,disabled:t.disabled,onClick:e.withModifiers(s,["stop"])},[e.createElementVNode("span",N4,e.toDisplayString(t.name||t.options[0].name),1),e.createElementVNode("div",A4,[e.createVNode(we,{class:"ect-relative ect-top-0.5 ect-ml-2",icon:"arrow_drop_down",color:"#ffffff",size:"14"})])],8,w4),!t.disabled&&t.options.length&&o.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(f.value),class:"button-options",onClick:l[3]||(l[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,m=>{var b;return e.openBlock(),e.createElementBlock("div",{key:m,class:"button-options_item",onClick:v=>p.$emit("selected",m)},[m.selected&&t.select?(e.openBlock(),e.createElementBlock("div",S4,[e.createVNode(we,{icon:"done",size:20,color:"black"})])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(((b=m.label)==null?void 0:b.value)||m.name),1)],8,B4)}),128))],4)):e.createCommentVNode("",!0)],32))],64)):e.createCommentVNode("",!0)}}},[["__scopeId","data-v-cfcf21a3"]]),O4={class:"ect-flex ect-flex-col ect-w-full"},I4={key:0,class:"ect-h-[20px] ect-w-[150px]"},T4={key:1,class:"ect-flex ect-flex-col ect-gap-1"},V4=xe({__name:"MoleculeProductItem",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null}},setup(t){var g,m;const i=$t(),n=bn(),r=t,o=e.ref(((m=(g=n.savedItems)==null?void 0:g[r.itemId])==null?void 0:m.XX_ORD1__QTY__c)||0),c=e.ref(!1),f=e.ref(null),x=e.ref(!1),y=e.ref(!1),u=e.computed(()=>r.actions&&r.actions.length>0),s=e.computed(()=>r.actions.some(b=>b.action==="ADD_TO_CART")),_=e.computed(()=>{var b,v,C;return(b=r.offer)!=null&&b.appliedOnField?ml[(v=r.offer)==null?void 0:v.appliedOnField]===((C=r.offerSetting.value)==null?void 0:C.field):!0});e.watch(()=>n.savedItems,b=>{var v,C;b[r.itemId]&&!y.value&&((v=b[r.itemId])==null?void 0:v.XX_ORD1__QTY__c)!==o.value&&(o.value=((C=b[r.itemId])==null?void 0:C.XX_ORD1__QTY__c)||0,y.value=!0)},{deep:!0});function a(b){var v;y.value=!0,b===0&&((v=n.savedItems)!=null&&v[r.itemId])?d():l()}const h=b=>{var v;b.action==="ADD_TO_CART"?(y.value=!0,o.value=1,p()):b.action==="CONFIGURE"||(b.action==="CUSTOM"?window.open(((v=b.url)==null?void 0:v.value)||b.value,b.newTab?"_blank":"_self"):b.action==="ORDER_PARTS"||b.action)},d=async function(){c.value=!0,f.value=null;const b=[n.savedItems[r.itemId].Id];await n.deleteLineItems(b),c.value=!1},p=async function(){if(c.value=!0,n.loading.quoteCreate)setTimeout(()=>{p()},1e3);else{f.value=null;const v=[pl(o,r,n)];await n.saveToCart(v),c.value=!1}},l=Vt(async function(){x.value=!0;const b={qty:o.value,itemID:r.itemId};await n.updateCart(b),x.value=!1});return(b,v)=>{var C,B;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass("item ecb-theme-card "+t.mode)},[e.createElementVNode("div",{class:e.normalizeClass(`item-image ${t.mode}-image`)},[e.createVNode(c4,{src:t.thumbnail.value,loading:t.loading,"resources-domain":e.unref(i).storefrontDetails.resourcesDomain},null,8,["src","loading","resources-domain"])],2),e.createElementVNode("div",{class:e.normalizeClass(`item-text ${t.mode}-text`)},[e.createVNode(yl,{title:t.title,loading:t.loading,description:t.description},null,8,["title","loading","description"])],2),e.createElementVNode("div",O4,[e.createElementVNode("div",{class:e.normalizeClass(`item-attributes ${t.mode}-attributes`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.attributes,(w,S)=>(e.openBlock(),e.createBlock(gl,{key:S,class:e.normalizeClass(`item-attributes_field ${t.mode}-attributes_field`),loading:t.loading,value:w.value,label:w.label,field:w.value.field,offer:{applyOffer:w.applyOffer,offerDetails:w.offerDetails,offerValue:r.offer},"item-count":o.value,"applied-on-offer-matching-field":_.value},null,8,["class","loading","value","label","field","offer","item-count","applied-on-offer-matching-field"]))),128))],2),r.offerSetting&&_.value&&((C=r.offer)!=null&&C.offerDescShort)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${t.mode}-offer-banner`)},[e.createVNode(jt,{tag:t.offerSetting.offerDetails.styles.offerDescription.textStyles.tag,text:(B=r.offer)==null?void 0:B.offerDescShort,style:e.normalizeStyle(t.offerSetting.offerDetails.styles.offerDescription.textStyles),class:e.normalizeClass(b.field+"_value")},null,8,["tag","text","style","class"])],2)):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([`item-button ${t.mode}-button`,"ect-flex ect-flex-col ect-gap-2"])},[t.loading||t.applyOffer&&!r.offer?(e.openBlock(),e.createElementBlock("div",I4,[e.createVNode(ft)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value?(e.openBlock(),e.createBlock(Cn,{key:0,class:"item-button_spinner"})):(e.openBlock(),e.createElementBlock("div",T4,[o.value>0&&!t.loading&&s.value?(e.openBlock(),e.createBlock(xl,{key:0,modelValue:o.value,"onUpdate:modelValue":[v[0]||(v[0]=w=>o.value=w),a],loading:x.value},null,8,["modelValue","loading"])):(e.openBlock(),e.createBlock(El,{key:1,icon:"arrow_drop_down",disabled:t.loading,options:t.actions,onSelected:v[1]||(v[1]=w=>h(w))},null,8,["disabled","options"]))]))],64))],2)):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-f6e7697b"]]),D4={class:"item"},L4={class:"item-text"},F4={class:"item-attributes"},R4={key:0,class:"item-button"},P4={key:1,class:"ect-flex ect-flex-col ect-gap-1"},M4=xe({__name:"MoleculeProductItemTable",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null},offer:{type:Object,default:null}},setup(t){var p,l;const i=bn(),n=t,r=e.ref(((l=(p=i.savedItems)==null?void 0:p[n.itemId])==null?void 0:l.XX_ORD1__QTY__c)||0),o=e.ref(!1),c=e.ref(!1),f=e.ref(!1),x=e.computed(()=>n.actions&&n.actions.length>0),y=e.computed(()=>n.actions.some(g=>g.action==="ADD_TO_CART")),u=e.computed(()=>{var g,m,b;return(g=n.offer)!=null&&g.appliedOnField?ml[(m=n.offer)==null?void 0:m.appliedOnField]===((b=n.offerSetting.value)==null?void 0:b.field):!0});e.watch(()=>i.savedItems,g=>{var m,b;g[n.itemId]&&!c.value&&((m=g[n.itemId])==null?void 0:m.XX_ORD1__QTY__c)!==r.value&&(r.value=((b=g[n.itemId])==null?void 0:b.XX_ORD1__QTY__c)||0,c.value=!0)},{deep:!0});function s(g){var m;c.value=!0,g===0&&((m=i.savedItems)!=null&&m[n.itemId])?a():d()}const _=g=>{var m;g.action==="ADD_TO_CART"?(c.value=!0,r.value=1,h()):g.action==="CONFIGURE"||(g.action==="CUSTOM"?window.open(((m=g.url)==null?void 0:m.value)||g.value,g.newTab?"_blank":"_self"):g.action==="ORDER_PARTS"||g.action)},a=async function(){o.value=!0;const g=[i.savedItems[n.itemId].Id];await i.deleteLineItems(g),delete i.savedItems[n.itemId],o.value=!1},h=async function(){if(o.value=!0,i.loading.quoteCreate)setTimeout(()=>{h()},1e3);else{const m=[pl(r,n,i)];await i.saveToCart(m),i.savedItems[n.itemId]=r.value,o.value=!1}},d=Vt(async function(){f.value=!0;const g={qty:r.value,itemID:n.itemId};await i.updateCart(g),i.savedItems[n.itemId]=r.value,f.value=!1},800);return(g,m)=>(e.openBlock(),e.createElementBlock("div",D4,[e.createElementVNode("div",L4,[e.createVNode(yl,{url:t.url,title:t.title,loading:t.loading},null,8,["url","title","loading"])]),e.createElementVNode("div",F4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.attributes,b=>{var v;return e.openBlock(),e.createBlock(gl,{key:b.field,class:e.normalizeClass(`item-attributes_field ${t.mode}-attributes_field`),loading:t.loading,value:b.value,label:b.label,offer:{applyOffer:b.applyOffer,offerDetails:b.offerDetails,offerValue:n.offer},"item-count":r.value,"applied-on-offer-matching-field":u.value,"show-offer-description":!!((v=n.offer)!=null&&v.offerDescShort)},null,8,["class","loading","value","label","offer","item-count","applied-on-offer-matching-field","show-offer-description"])}),128))]),x.value?(e.openBlock(),e.createElementBlock("div",R4,[o.value?(e.openBlock(),e.createBlock(Cn,{key:0,class:"item-button_spinner"})):(e.openBlock(),e.createElementBlock("div",P4,[r.value>0&&!t.loading&&y.value?(e.openBlock(),e.createBlock(xl,{key:0,modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=b=>r.value=b),s],loading:f.value},null,8,["modelValue","loading"])):(e.openBlock(),e.createBlock(El,{key:1,icon:"arrow_drop_down",disabled:t.loading,options:t.actions,onSelected:m[1]||(m[1]=b=>_(b))},null,8,["disabled","options"]))]))])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-22a3ac6d"]]),q4=["placeholder"],$4={key:0,class:"srch-error"},j4={class:"srch-option_lst-main"},H4={class:"italic"},U4={class:"srch-option_lst-sugg"},z4={class:"italic"},X4={class:"srch-option_lst-main"},K4={class:"italic"},Q4={class:"srch-option_lst-sugg"},Z4={class:"italic"},G4={class:"srch-option_lst-main"},W4={class:"italic"},J4={class:"srch-option_lst-sugg"},Y4={class:"italic"},e6={key:1,class:"search1"},t6={class:"search-container_header"},n6={class:"search-container_header_input ectheme-input-box"},r6=["placeholder","value"],o6=xe({__name:"BlinkMoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},suggestion:{type:Boolean,default:!1},showSearchIconAlways:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enableSearchClick:{type:Boolean,default:!1}},emits:["update:modelValue","enter"],setup(t,{emit:i}){const n=i;let r;const o=e.ref(""),c=e.ref(!1),f=e.ref(!1),x=e.ref(null),y=()=>{x.value=null,o.value="",n("update:modelValue",""),n("enter")},u=p=>{o.value.length>1?(p.target.blur(),_(o.value+"*")):x.value="Search text must be more than one character.",c.value=!1},s=()=>{f.value||(x.value=null,o.value.length>1?_(o.value+"*"):o.value.length===1&&(x.value="Search text must be more than one character."),c.value=!1)},_=p=>{n("update:modelValue",p),c.value=!1,f.value=!1},a=p=>{const l=p.target.value;x.value=null,l.length||n("update:modelValue","")},h=()=>{n("enter")},d=p=>{var g;r&&(clearTimeout(r),r=null);const l=((g=p==null?void 0:p.target)==null?void 0:g.value)??"";r=setTimeout(()=>{n("update:modelValue",l)},500)};return(p,l)=>t.suggestion?(e.openBlock(),e.createElementBlock("div",{key:0,class:"srch",tabindex:"0",onFocusin:l[6]||(l[6]=g=>c.value=!0),onFocusout:s,onKeydown:e.withKeys(u,["enter"])},[e.createElementVNode("div",{class:e.normalizeClass(["srch-inp",{"srch-error-border":x.value}])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=g=>o.value=g),type:"search",placeholder:t.placeholder,onInput:a},null,40,q4),[[e.vModelText,o.value]]),e.createVNode(we,{icon:o.value?"close":"search",size:14,color:x.value?"red":"#acacac",onClick:y},null,8,["icon","color"])],2),x.value?(e.openBlock(),e.createElementBlock("div",$4,[e.createElementVNode("span",null,e.toDisplayString(x.value),1)])):e.createCommentVNode("",!0),o.value.length>1&&c.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"srch-option",onMouseover:l[4]||(l[4]=g=>f.value=!0),onMouseout:l[5]||(l[5]=g=>f.value=!1)},[e.createElementVNode("div",{class:"srch-option_lst",onClick:l[1]||(l[1]=g=>_(o.value+"*"))},[e.createElementVNode("div",j4,[e.createTextVNode(" Search for "),e.createElementVNode("span",H4,e.toDisplayString(o.value)+"*",1)]),e.createElementVNode("div",U4,[e.createTextVNode(" word that starts with "),e.createElementVNode("span",z4,e.toDisplayString(o.value)+"*",1)])]),e.createElementVNode("div",{class:"srch-option_lst",onClick:l[2]||(l[2]=g=>_(o.value))},[e.createElementVNode("div",X4,[e.createTextVNode(" Search for "),e.createElementVNode("span",K4,'"'+e.toDisplayString(o.value)+'"',1)]),e.createElementVNode("div",Q4,[e.createTextVNode(" search exactly for "),e.createElementVNode("span",Z4,'"'+e.toDisplayString(o.value)+'"',1)])]),e.createElementVNode("div",{class:"srch-option_lst",onClick:l[3]||(l[3]=g=>_("*"+o.value+"*"))},[e.createElementVNode("div",G4,[e.createTextVNode(" Search for "),e.createElementVNode("span",W4,"*"+e.toDisplayString(o.value)+"*",1)]),e.createElementVNode("div",J4,[e.createTextVNode(" word that includes "),e.createElementVNode("span",Y4,"*"+e.toDisplayString(o.value)+"*",1)])])],32)):e.createCommentVNode("",!0)],32)):(e.openBlock(),e.createElementBlock("div",e6,[e.createElementVNode("div",t6,[e.createElementVNode("div",n6,[e.createElementVNode("input",{class:"",type:"search",placeholder:t.placeholder,value:t.modelValue,onInput:d,onKeyup:e.withKeys(h,["enter"])},null,40,r6),t.loading?(e.openBlock(),e.createBlock(Cn,{key:0})):e.createCommentVNode("",!0),t.modelValue?(e.openBlock(),e.createBlock(we,{key:1,icon:"close",size:12,color:"#acacac",onClick:y})):e.createCommentVNode("",!0),t.enableSearchClick||!t.modelValue?(e.openBlock(),e.createBlock(we,{key:2,class:"ect-relative ect-top-[-1px]",icon:"search",size:14,color:"#acacac",onClick:h})):e.createCommentVNode("",!0)])])]))}},[["__scopeId","data-v-31366d17"]]),kl=t=>(e.pushScopeId("data-v-f5574cfa"),t=t(),e.popScopeId(),t),a6=["id"],i6={key:0,class:"product-search"},l6={key:1,class:"product-not-found"},s6=kl(()=>e.createElementVNode("span",{class:"product-not-found_icon material-symbols-outlined"}," error ",-1)),c6=kl(()=>e.createElementVNode("span",{class:"product-not-found_text"},"No results found",-1)),d6={key:2,class:"product-item"},u6=20,f6=xe({__name:"MoleculeProductBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},request:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},catalogType:{type:String,required:!0},blockId:{type:String,default:""},accountId:{type:String,default:null},searchText:{type:String,default:""},onCountUpdate:{type:Function,default:null},hideHeader:{type:Boolean,default:!1},initialItems:{type:Array,default:()=>[]}},setup(t,{expose:i}){const n=["vertical","horizontal","square","table"],r=t,o=e.ref(Math.floor(Math.random()*1e9)),c=e.ref(null),f=bn(),x=e.ref(1),y=e.ref(!0),u=e.ref(!0);e.ref(!1);const s=e.ref([]),_=e.ref(0),a=e.ref(r.request);let h=200;const d=e.ref(r.searchText||""),p=e.computed(()=>r.initialItems||[]),l=e.computed(()=>!!(d.value||r.searchText));function g(K,F,E){const T=E==="Item",D=[];return K.forEach(P=>{var q,z;const X=JSON.parse(JSON.stringify(F));try{T?X.itemId=P.Id:(X.itemId=P.XX_ORD1__Item__c,X.catalogItemId=P.Id);const{description:R,thumbnail:$,title:j,attributes:U,actions:Q}=X;$!=null&&$.field&&!$.isStatic&&($.value=Se(P,$.field)),j!=null&&j.field&&!j.isStatic&&(j.value=Se(P,j.field)),R!=null&&R.field&&!R.isStatic&&(R.value=Se(P,R.field)),(U||[]).forEach(ne=>{var se,he;(se=ne==null?void 0:ne.value)!=null&&se.field&&!ne.value.isStatic&&(ne.value.value=Se(P,ne.value.field,ne.value.dataType)||"-"),(he=ne==null?void 0:ne.label)!=null&&he.field&&!ne.label.isStatic&&(ne.label.value=Se(P,ne.label.field,ne.label.dataType)||"-")}),(Q||[]).forEach(ne=>{ne.action==="CUSTOM"&&(ne.url&&!ne.url.isStatic&&(ne.url.value=Se(P,ne.url.field)),ne.label&&!ne.label.isStatic&&(ne.label.value=Se(P,ne.label.field)))});const Y=T?Se(P,"XX_ORD1__Friendly_URL__c"):Se(P,"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c");((q=X.friendlyURLFields)==null?void 0:q.length)>0&&Y?((z=X.friendlyURLFields)==null||z.forEach(ne=>{X.friendlyURL=(X.friendlyURL||"").replace(`{!${ne}}`,Se(P,ne))}),X.friendlyURL="/"+(X.friendlyURL||"")+"/"+Y):X.url&&(X.friendlyURL=X.url+"/"+((P==null?void 0:P.Id)||"")),X.friendlyURL&&(X.friendlyURL=X.friendlyURL.replace(/\/{2,}/g,"/"))}catch{}D.push(X)}),D}const m=e.ref(null),b=e.ref(null),v=e.computed(()=>{}),C=e.computed(()=>{var K;return(K=r.fields)==null?void 0:K.header});e.computed(()=>{var K;return((K=C.value)==null?void 0:K.mainHeading)||{}}),e.computed(()=>{var K;return((K=C.value)==null?void 0:K.subHeading)||{}});const B=e.computed(()=>{var K;return s.value.length>0?s.value:Array(w.value).fill((K=r.fields)==null?void 0:K.productCard)}),w=e.computed(()=>Number(r.configuration.displaySettings.itemsPerPage||u6)),S=e.computed(()=>Number(r.configuration.displaySettings.lazyLoadBatch)),I=e.computed(()=>{var K;return((K=r.configuration.productItemOrientation)==null?void 0:K.toLowerCase())||"vertical"}),A=e.ref(n.includes(I.value)?m.value||I.value:"vertical"),k=e.computed(()=>s.value.length<1&&!u.value),N=e.computed(()=>`product-${A.value} width-${b.value?b.value:r.configuration.displaySettings.columns||1}`),V=e.computed(()=>r.configuration.displaySettings.enableSearch),L=e.ref(null),M=e.ref(!1),Z=e.ref({});e.watch(x,(K,F)=>{K!==F&&(console.log("[fetchProducts] 1"),G(!0))}),e.watch(L,K=>{K!==null&&r.onCountUpdate&&r.onCountUpdate(K)}),e.watch(d,()=>{x.value=1,console.log("[fetchProducts] 2"),G(!0)}),e.watch(()=>r.searchText,(K,F)=>{K!==F&&(d.value=K||"")});const G=Vt(async function(K){var P;if(h=600,p.value&&p.value.length>0&&!l.value){const X=g(p.value,(P=r.fields)==null?void 0:P.productCard,r.catalogType);s.value=X,L.value=X.length,u.value=!1,K&&c.value&&c.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});return}u.value=!0;let E=w.value;S.value<E&&S.value>0&&(E=S.value);const T={...a.value,accountID:r.accountId,rowLimit:E,searchText:d.value||r.searchText,rowOffSet:w.value*(x.value-1)};K&&c.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});const D=await f.getProductItems(T,r.fields.productCard,r.catalogType);D&&(y.value=D.items.length===E,L.value=D.count,s.value=D.items,_.value=Math.ceil(D.count/w.value)),console.log("[MOLECULEPRODUCTBLOCK:fetchProducts] prodData",D),u.value=!1},h);async function J(){const{mainHeading:K,subHeading:F}=r.fields.header;if(!K.isStatic&&K.field||!F.isStatic&&F.field){const E=[];K.isStatic?K.value=K.title:E.push(K.field),F.isStatic?F.value=F.title:E.push(F.field);const T={...a.value,accountID:r.accountId,fields:E},D=await f.getEcatalogDetails(T);K.isStatic||(K.value=D[K.field],K.isStatic=!0),F.isStatic||(F.value=D[F.field],F.isStatic=!0)}else K.value=K.title,F.value=F.title}return i({currentPage:x,fetchProducts:G}),e.onMounted(()=>{G(),J()}),(K,F)=>(e.openBlock(),e.createElementBlock("div",{id:o.value,ref_key:"productBlock",ref:c,class:"product"},[V.value&&v.value===void 0&&!t.hideHeader?(e.openBlock(),e.createElementBlock("div",i6,[e.createVNode(o6,{modelValue:d.value,"onUpdate:modelValue":F[0]||(F[0]=E=>d.value=E),placeholder:"Search products..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.renderSlot(K.$slots,"default",{},void 0,!0),k.value?(e.openBlock(),e.createElementBlock("div",l6,[s6,e.createTextVNode(),c6])):(e.openBlock(),e.createElementBlock("div",d6,[A.value==="table"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(B.value,E=>(e.openBlock(),e.createElementBlock("div",{key:(E==null?void 0:E.catalogItemId)||(E==null?void 0:E.itemId),class:"product-item_table"},[e.createVNode(M4,{class:"ecb-theme-card","item-id":E==null?void 0:E.itemId,"catalog-item-id":E==null?void 0:E.catalogItemId,loading:u.value,mode:A.value,title:E==null?void 0:E.title,attributes:E==null?void 0:E.attributes,actions:E==null?void 0:E.actions,thumbnail:{value:E==null?void 0:E.thumbnail.value},description:E==null?void 0:E.description,url:E==null?void 0:E.friendlyURL,"template-id":t.configuration.productTemplateId,"ecatalog-id":E==null?void 0:E.eCatalogId,"apply-offer":M.value,"offer-setting":Z.value,offer:E==null?void 0:E.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value,E=>(e.openBlock(),e.createElementBlock("div",{key:(E==null?void 0:E.catalogItemId)||(E==null?void 0:E.itemId),class:e.normalizeClass(["product-item_record",N.value])},[e.createVNode(V4,{"item-id":E==null?void 0:E.itemId,"catalog-item-id":E==null?void 0:E.catalogItemId,loading:u.value,mode:A.value,title:E==null?void 0:E.title,attributes:E==null?void 0:E.attributes,actions:E==null?void 0:E.actions,thumbnail:{value:E==null?void 0:E.thumbnail.value},description:E==null?void 0:E.description,url:E==null?void 0:E.friendlyURL,"template-id":t.configuration.productTemplateId,"ecatalog-id":E==null?void 0:E.eCatalogId,"apply-offer":M.value,"offer-setting":Z.value,offer:E==null?void 0:E.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])],2))),128))]))],8,a6))}},[["__scopeId","data-v-f5574cfa"]]),wl=t=>(e.pushScopeId("data-v-3951668d"),t=t(),e.popScopeId(),t),h6={class:"catalog ect-flex ect-flex-col ect-gap-0 md:ect-flex-row"},p6={class:"catalog-product md:ect-grow"},m6={class:"catalog-filter-mobile ect-flex ect-justify-between m-show"},g6=wl(()=>e.createElementVNode("h3",null,"Filter Products",-1)),y6=wl(()=>e.createElementVNode("span",null," OPEN FILTERS",-1)),Nl=xe({__name:"OrganismsCatalogBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},id:{type:String,default:""},searchTerm:{type:String,default:""},onCountUpdate:{type:Function,default:null},initialItems:{type:Array,default:()=>[]}},setup(t){var a,h,d,p,l,g,m,b,v,C,B;const i=$t(),n=t,r=e.ref(!1),o=e.ref(((a=n.configuration.dynamicFilters)==null?void 0:a.length)>0&&((h=n.configuration.displaySettings)==null?void 0:h.displayDynamicFilters)&&!n.searchTerm),c=e.ref(n.configuration.displaySettings),f=e.computed(()=>r9.get(n.configuration.catalogType)),x=e.computed(()=>{let w=u.value.searchText;return w&&!w.endsWith("*")&&(w+="*"),w||""}),y=e.computed(()=>{var L;const w=[],{description:S,thumbnail:I,title:A,attributes:k,actions:N}=n.fields.productCard,V=[S,I,A];return k.forEach(M=>{V.push(M.value),V.push(M.label)}),(N==null?void 0:N.length)>0&&N.forEach(M=>{M.action==="CUSTOM"&&(V.push(M.url),V.push(M.label))}),V.forEach(M=>{!M.isStatic&&M.field?w.push(M.field):M.value=M.title||"-"}),f.value==="eCatalog"?(w.push("XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),w.push("XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c")):(w.push("XX_ORD1__Friendly_URL__c"),w.push("XX_ORD1__SYS_Requires_Configuration__c")),((L=n.fields.productCard.friendlyURLFields)==null?void 0:L.length)>0&&w.push(...n.fields.productCard.friendlyURLFields),w}),u=e.ref({blockId:n.id,catalogType:n9.get(n.configuration.catalogType)||"Full",checkcurrency:(d=c.value)==null?void 0:d.checkCurrency,eCatalogIDs:n.configuration.catalogType==="ECATALOG_OVERRIDE"&&n.configuration.catalogId?[n.configuration.catalogId]:null,fields:y.value,alternateFieldName:n.configuration.catalogCustomField,searchText:"",whereCondition:n.configuration.staticFilters,sortByField:((l=(p=n.configuration.sort)==null?void 0:p.primary)==null?void 0:l.field)||"Name",sortOrder:(m=(g=n.configuration.sort)==null?void 0:g.primary)==null?void 0:m.direction,secondarySortByField:(v=(b=n.configuration.sort)==null?void 0:b.secondary)==null?void 0:v.field,secondarySortOrder:(B=(C=n.configuration.sort)==null?void 0:C.secondary)==null?void 0:B.direction}),s=e.ref(null),_=e.ref(null);return e.watch(()=>r.value,w=>{w&&window.scrollTo(0,0)}),e.onMounted(()=>{u.value.searchText=n.searchTerm||""}),e.watch(u,w=>{_.value&&_.value.fetchFilterList(),s.value&&(s.value.currentPage=1,console.log("[fetchProducts] 4"),s.value.fetchProducts())},{deep:!0}),e.watch(()=>n.searchTerm,w=>{typeof w=="string"&&(u.value.searchText=w)}),(w,S)=>(e.openBlock(),e.createElementBlock("div",h6,[e.createElementVNode("div",p6,[e.createVNode(f6,{ref_key:"product",ref:s,"block-id":t.id,"account-id":e.unref(i).activeStorefrontInfo.accountId,configuration:t.configuration,"catalog-type":f.value,request:u.value,fields:t.fields,"search-text":x.value,"initial-items":n.initialItems,"hide-header":!!n.searchTerm,"on-count-update":n.onCountUpdate},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",m6,[g6,e.createElementVNode("div",{class:"ect-flex ect-items-center ect-gap-2 m-show",onClick:S[0]||(S[0]=I=>r.value=!0)},[e.createVNode(we,{class:"filter-product_icon",icon:"tune",color:"#acacac",size:20}),y6])],512),[[e.vShow,!r.value&&o.value]])]),_:1},8,["block-id","account-id","configuration","catalog-type","request","fields","search-text","initial-items","hide-header","on-count-update"])])]))}},[["__scopeId","data-v-3951668d"]]),x6=function(t,i){const n={};n.sectionStyle={},n.blockStyle={};const{visiblity:r}=t;n.visibility=r;const{layout:o}=t;if(n.blockStyle=v6(o,i),o&&(o!=null&&o.padding)){const{top:x,bottom:y,left:u,right:s}=o.padding;x&&(n.sectionStyle.paddingTop=`${x}px`),y&&(n.sectionStyle.paddingBottom=`${y}px`),u&&(n.sectionStyle.paddingLeft=`${u}px`),s&&(n.sectionStyle.paddingRight=`${s}px`)}o!=null&&o.gap&&(n.sectionStyle.gap=`${o.gap}px`);const{styling:c}=t;c&&(c.verticalAlignment&&(n.sectionStyle.alignItems=c.verticalAlignment),c.radius&&(n.sectionStyle.borderRadius=c.radius),c.borderStyle&&(n.sectionStyle.borderStyle=c.borderStyle));const{Background:f}=t;return f&&f.style==="Solid"&&(n.sectionStyle.backgroundColor=f.color),f&&f.opacity==="100%"&&(n.sectionStyle.opacity=1),f&&f.image&&f.image!=="sampleImage.png"&&(n.sectionStyle.backgroundImage=`url(${f.image})`,f.imageSize&&(n.sectionStyle.backgroundSize=f.imageSize)),f&&f.repeat==="no-repeat"&&(n.sectionStyle.backgroundRepeat=f.repeat),f&&(f.horizontalAlignment||f.verticalAlignment)&&(n.sectionStyle.backgroundPosition=f.horizontalAlignment+" "+f.verticalAlignment),n};function v6(t,i){if(!t)return[{}];const{columnSize:n,columns:r}=t;if(i)return Array(r).fill({display:"flex",flexDirection:"column",width:"100%"});if(!n)return Array(r).fill({});const o=n.split("/");return typeof r=="string"&&o.length!==parseInt(r)?Array(r).fill({}):typeof r=="number"&&o.length!==r?Array(r).fill({}):o.map(c=>({flexBasis:`${c}`}))}const En=t=>(e.pushScopeId("data-v-d8d63f41"),t=t(),e.popScopeId(),t),_6={class:"ect-composable-catalog-wrapper"},b6=["href"],C6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons","data-name":"ec-material-icons"},null,-1)),E6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Outlined","data-name":"ec-material-icons-outlined"},null,-1)),k6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Round","data-name":"ec-material-icons-round"},null,-1)),w6=En(()=>e.createElementVNode("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200","data-name":"ec-material-symbols-outlined"},null,-1)),N6={class:"ect-flex ect-flex-col md:ect-flex-row"},A6=["data-bid","data-bname"],B6={key:0,class:"ect-flex ect-items-center ect-justify-center ect-min-h-[50vh]"},S6=[En(()=>e.createElementVNode("div",{class:"ect-flex ect-flex-col ect-items-center ect-gap-3"},[e.createElementVNode("div",{class:"ect-spinner","aria-label":"Loading"}),e.createElementVNode("div",{class:"ect-text-sm ect-text-gray-500"},"Loading catalog…")],-1))],O6={key:1,class:"ect-composable-catalog ectheme"},I6=["data-sid","data-sname"],T6=["data-bid","data-bname"],Io=xe({__name:"ExpediteCatalog",props:{templateId:{type:String,required:!0},quoteId:{type:String,default:null},userId:{type:String,required:!0},searchTerm:{type:String,default:""},onCatalogCountUpdate:{type:Function,default:null},previewData:{type:Object,default:()=>({})},initialData:{type:Array,default:()=>[]}},setup(t){const i=t,n=hl(),r=$t(),o=e.ref(!1),c=e.ref(!1),f=e.ref(""),x=e.ref(""),y=e.computed(()=>n.pageBlocks||[]),u=e.computed(()=>{var a;const _=[];return(a=y.value)==null||a.forEach(h=>{var g;const d={...h},p=typeof h.contentJSON=="string"?JSON.parse(h.contentJSON):h.contentJSON;let l={};p&&(l=x6(p,o.value),d.styleObject=h.hideStyle?{}:l.sectionStyle,d.visibility=l.visibility,(g=d.blocks)==null||g.forEach((m,b)=>{m.styleObject=l.blockStyle[b]})),_.push(d)}),_}),s=()=>{o.value=window.innerWidth<=768};return e.onMounted(async()=>{var h,d,p;window.addEventListener("resize",s),s(),c.value=!0,await r.fetchDomainDetails(),r.setData({templateId:i.templateId,quoteId:i.quoteId,userId:i.userId});const _=e.getCurrentInstance(),a=(h=_==null?void 0:_.proxy)==null?void 0:h.$el;a&&typeof a.getRootNode=="function"&&a.getRootNode(),r.getTheme().then(l=>{l&&l.value&&(f.value=l.value);try{r.setThemeData()}catch{}});try{const l=((d=r.salesforceOrgId)==null?void 0:d.value)??r.salesforceOrgId,g=((p=r.storefrontId)==null?void 0:p.value)??r.storefrontId;if(l&&g&&typeof l=="string"&&typeof g=="string"){const m=Date.now(),b=`${or}/${l}/${g}/css/theme_${g}.css?t=${m}`;x.value=b}}catch{}await r.getBlockInformation(),c.value=!1}),(_,a)=>{var h,d,p,l,g,m,b;return e.openBlock(),e.createElementBlock("div",_6,[f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{key:0,"data-name":"template-theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("link",{key:1,rel:"stylesheet",href:x.value,"data-name":"ec-theme-stylesheet-link"},null,8,b6)):e.createCommentVNode("",!0),C6,E6,k6,w6,Object.keys(t.previewData).length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(yr),e.createElementVNode("div",N6,[e.createElementVNode("div",{class:"ect-w-full",style:e.normalizeStyle((h=t.previewData)==null?void 0:h.styleObject),"data-bid":(d=t.previewData)==null?void 0:d.blockId,"data-bname":(p=t.previewData)==null?void 0:p.blockName},[e.createVNode(Nl,{id:(l=t.previewData)==null?void 0:l.Id,mode:"preview",configuration:(g=t.previewData)==null?void 0:g.configuration,fields:(m=t.previewData)==null?void 0:m.fields,"search-term":(b=t.previewData)==null?void 0:b.searchTerm,"on-count-update":t.onCatalogCountUpdate},null,8,["id","configuration","fields","search-term","on-count-update"])],12,A6)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(yr),c.value?(e.openBlock(),e.createElementBlock("div",B6,S6)):(e.openBlock(),e.createElementBlock("div",O6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,v=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:v.id},[e.unref(r).useVisiblity(v.visibility)?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(v.styleObject),class:"ect-flex ect-flex-col md:ect-flex-row","data-sid":v.sectionId,"data-sname":v.sectionName},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.blocks,C=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C.id},[(C==null?void 0:C.blockFormat)==="catalog"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ect-w-full",style:e.normalizeStyle(C.styleObject),"data-bid":C.blockId,"data-bname":C.blockName},[e.createVNode(Nl,{id:C.Id,configuration:C.configuration,fields:C.fields,"search-term":t.searchTerm||C.searchTerm,"on-count-update":t.onCatalogCountUpdate,"initial-items":t.initialData},null,8,["id","configuration","fields","search-term","on-count-update","initial-items"])],12,T6)):e.createCommentVNode("",!0)],64))),128))],12,I6)):e.createCommentVNode("",!0)],64))),128))]))],64))])}}},[["__scopeId","data-v-d8d63f41"]]),Al={ExpediteConfigurator:Hr,ExpediteGPT:Ur,ExpediteCatalog:Io},V6={install(t,i={}){t.component("ExpediteConfigurator",Hr),t.component("ExpediteGPT",Ur),t.component("ExpediteCatalog",Io)},...Al};Ze.Components=Al,Ze.ExpediteCatalog=Io,Ze.ExpediteConfigurator=Hr,Ze.ExpediteGPT=Ur,Ze.default=V6,Ze.useComRootStore=un,Object.defineProperties(Ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|