@pixeasy/customizer 0.0.33-beta.stage → 0.0.34-beta.stage
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/index.d.ts +1 -0
- package/package.json +1 -1
- package/pixeasy-customizer.min.js +1 -1
|
@@ -4614,7 +4614,7 @@ void main() {
|
|
|
4614
4614
|
`,n+=s}return t.trim()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var v_=class i{resolveShadowSettings(e,t){let n=Number.isFinite(e.shadowBlur)?e.shadowBlur:t.blur,r=Number.isFinite(e.shadowOffsetX)?e.shadowOffsetX:t.offsetX,o=Number.isFinite(e.shadowOffsetY)?e.shadowOffsetY:t.offsetY;return Math.abs(n)<.01&&Math.abs(r)<.01&&Math.abs(o)<.01?null:{blur:n,offsetX:r,offsetY:o,color:e.shadowColor??t.color}}getShadowCanvasShift(e,t){if(!e)return{x:0,y:0};let n=t||1;return{x:e.offsetX*.5*n,y:e.offsetY*.5*n}}applyShadowToFabricGroup(e,t){let n=e.getObjects();if(!t){n.forEach(a=>{a.set("shadow",void 0),a.dirty=!0}),e.set("shadow",void 0),e.dirty=!0;return}let r=Math.max(t.blur,0),o=t.offsetX,s=t.offsetY;n.forEach(a=>{a.set("shadow",new ka({color:t.color,blur:r,offsetX:o,offsetY:s,affectStroke:!0})),a.dirty=!0}),e.set("shadow",void 0),e.dirty=!0}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var b_=class i{stack=F([]);manualOrderingEnabled=F(!1);buildCatalog(e){let t=new Map,n=e.svgDoc?.documentElement;return e.overlays.forEach(r=>{let o=r.placementKey?e.placementNameByKey.get(r.placementKey)??r.placementKey:null;if(r.kind==="text"){let s=r.text?.trim();t.set(`overlay:${r.id}`,{id:`overlay:${r.id}`,title:s?`Text: ${s}`:"Text",subtitle:o??"Overlay"});return}t.set(`overlay:${r.id}`,{id:`overlay:${r.id}`,title:r.imageName?.trim()||"Logo",subtitle:o??"Overlay"})}),e.patternOverlays.forEach(r=>{t.set(`pattern:${r.id}`,{id:`pattern:${r.id}`,title:`Pattern: ${r.label||r.id}`,subtitle:r.placementId??"Pattern Overlay"})}),e.svgDoc&&n&&Array.from(e.svgDoc.querySelectorAll("[id]")).filter(o=>o.closest("defs")||o.parentElement!==n?!1:!!this.resolvePatternFillReference(o)).forEach(o=>{let s=o.id?.trim();if(!s)return;let a=`pattern:${s}`;if(t.has(a))return;let l=this.resolvePatternFillReference(o);t.set(a,{id:a,title:`Pattern: ${s}`,subtitle:l?`Fill ${l}`:"Pattern Fill"})}),e.backgroundTemplates.forEach(r=>{let o=e.backgroundImages[r.actionItemId];o?.src&&t.set(`background:${r.actionItemId}`,{id:`background:${r.actionItemId}`,title:`Background: ${r.name||r.actionItemId}`,subtitle:o.fileName??"Image"})}),e.renderLayers.forEach((r,o)=>{let s=r.id?.trim()||r.name?.trim()||`${o}`;t.set(`render-layer:${s}`,{id:`render-layer:${s}`,title:`Render Layer: ${r.name||s}`,subtitle:r.actionPathIdsCsv||""})}),t}synchronizeStack(e,t,n=[]){let r=Array.from(e.keys()),o=this.stack(),s=this.manualOrderingEnabled(),a=this.resolveStackFromSvg(r,t,n);if(!s){let p=[...a],v=new Set(p);r.filter(g=>!v.has(g)).forEach(g=>this.insertRenderItemByDefaultBand(p,g)),this.areStringArraysEqual(o,p)||this.stack.set(p);return}let l=new Set(r),c=o.filter(p=>l.has(p)),d=new Set(c),u=a.filter(p=>!d.has(p)),f=[...u,...r.filter(p=>!d.has(p)&&!u.includes(p))],h=[...c];f.forEach(p=>this.insertRenderItemByDefaultBand(h,p)),this.areStringArraysEqual(o,h)||this.stack.set(h)}resolveStackFromSvg(e,t,n=[]){if(!t?.documentElement)return[];let r=t.documentElement,o=this.buildRenderLayerNodeIdMap(n,t),s=this.buildSvgPaintOrder(r);return e.map(a=>({id:a,index:this.resolveRenderItemPaintIndex(a,r,o,s)})).filter(a=>a.index>=0).sort((a,l)=>l.index-a.index).map(a=>a.id)}moveInStack(e,t){let n=[...this.stack()],r=n.findIndex(a=>a===e);if(r<0)return null;let o=Math.min(Math.max(r+t,0),n.length-1);if(o===r)return null;let[s]=n.splice(r,1);return n.splice(o,0,s),n}reorderInStack(e){if(!e.length)return null;let t=this.stack(),n=new Set(t),r=e.filter((a,l)=>n.has(a)&&e.indexOf(a)===l);if(!r.length)return null;let o=new Set(r),s=t.filter(a=>!o.has(a));return[...r,...s]}setStack(e){let t=this.stack();return this.areStringArraysEqual(t,e)?!1:(this.stack.set(e),!0)}enableManualOrdering(){this.manualOrderingEnabled.set(!0)}reset(){this.stack.set([]),this.manualOrderingEnabled.set(!1)}resolveFabricVisibleOverlayIds(e){let t=this.stack();if(!t.length)return new Set(e.map(o=>o.id));let n=t.findIndex(o=>this.parseRenderItemId(o)[0]!=="overlay");if(n<0)return new Set(e.map(o=>o.id));let r=t.slice(0,n).map(o=>this.parseRenderItemId(o)).filter(([o])=>o==="overlay").map(([,o])=>o);return new Set(r)}syncOverlayOrderFromStack(e,t){let n=t.map(c=>this.parseRenderItemId(c)).filter(([c])=>c==="overlay").map(([,c])=>c);if(!n.length)return e;let r=new Map(e.map(c=>[c.id,c])),o=[...n].reverse().map(c=>r.get(c)).filter(c=>!!c),a=[...e.filter(c=>!n.includes(c.id)),...o];return a.length!==e.length||e.every((c,d)=>a[d]?.id===c.id)?e:a}applyStackToSvg(e,t){if(!this.manualOrderingEnabled())return!1;let n=this.stack();if(!n.length)return!1;let r=this.buildRenderLayerNodeIdMap(t,e.ownerDocument),o=this.resolveStackFromSvg(n,e.ownerDocument,t),s=n.filter(l=>this.resolveNodesForRenderItem(l,e,r).length>0);return this.areStringArraysEqual(o,s)?!1:([...s].reverse().forEach(l=>{this.resolveNodesForRenderItem(l,e,r).forEach(d=>e.appendChild(d))}),!0)}resolveNodeIndex(e,t,n=[]){if(!t)return-1;let r=this.buildRenderLayerNodeIdMap(n,t),o=t.documentElement,s=this.resolveNodesForRenderItem(e,o,r);return s.length?Math.max(...s.map(a=>a.parentElement?a.parentElement===o?this.resolveSvgElementSiblingIndex(a):this.resolveSvgElementSiblingIndex(a.parentElement):-1)):-1}parseRenderItemId(e){let t=e.indexOf(":");if(t<0)return["overlay",e];let n=e.slice(0,t),r=e.slice(t+1);return n==="pattern"?["pattern",r]:n==="background"?["background",r]:n==="render-layer"?["render-layer",r]:["overlay",r]}resolvePatternFillReference(e){let t=e.getAttribute(me.DATA_PATTERN_FILL)?.trim();if(t)return t;let r=(e.getAttribute("fill")?.trim()??"").match(/^url\(#([^)]+)\)$/i);return r?.[1]?r[1]:null}insertRenderItemByDefaultBand(e,t){let[n]=this.parseRenderItemId(t);if(n==="overlay"){e.unshift(t);return}if(n==="render-layer"){e.unshift(t);return}if(n==="pattern"){let r=e.findIndex(o=>this.parseRenderItemId(o)[0]==="background");r<0?e.push(t):e.splice(r,0,t);return}e.push(t)}resolveRenderItemPaintIndex(e,t,n,r){let o=this.resolveIndexNodesForRenderItem(e,t,n);return o.length?Math.max(...o.map(s=>this.resolveElementPaintOrder(s,r))):-1}buildSvgPaintOrder(e){let t=new Map,n=0,r=o=>{o.tagName.toLowerCase()!=="defs"&&(t.set(o,n),n+=1,Array.from(o.children).forEach(s=>{r(s)}))};return r(e),t}resolveElementPaintOrder(e,t){let n=t.get(e)??-1;return e.querySelectorAll("*").forEach(o=>{let s=t.get(o)??-1;s>n&&(n=s)}),n}resolveIndexNodesForRenderItem(e,t,n){let[r,o]=this.parseRenderItemId(e),s=t.ownerDocument;if(!s)return[];if(r!=="render-layer"){let l=s.getElementById(o);if(!l)return[];let c=this.resolveMovableNodeForKind(r,l,t);return c?[c]:[]}let a=new Set(n.get(e)??[]);return a.size?[...a].map(l=>s.getElementById(l)).filter(l=>!!l):[]}buildRenderLayerNodeIdMap(e,t){let n=new Map;return e.forEach((r,o)=>{let s=r.id?.trim()||r.name?.trim()||`${o}`,a=`render-layer:${s}`,l=this.parseCsvIds(r.actionPathIdsCsv,t);l.length&&n.set(a,l)}),n}resolveNodesForRenderItem(e,t,n){let[r,o]=this.parseRenderItemId(e),s=t.ownerDocument;if(!s)return[];if(r!=="render-layer"){let l=s.getElementById(o);if(!l)return[];let c=this.resolveMovableNodeForKind(r,l,t);return c?[c]:[]}let a=new Set(n.get(e)??[]);return a.size?Array.from(t.children).filter(l=>{let c=l.getAttribute("id")?.trim();return!!c&&a.has(c)}):[]}resolveMovableNodeForKind(e,t,n){if(e!=="background")return t;let r=t;for(;r?.parentElement&&r.parentElement!==n;)r=r.parentElement;return r}parseCsvIds(e,t){if(!e)return[];let n=e.trim();if(n.includes("[")&&t){try{let r=t.querySelectorAll(n);if(r.length>0){let o=[];r.forEach(a=>{let l=a.getAttribute("id")?.trim();l&&l.length>0&&o.push(l)});let s=Array.from(new Set(o));if(s.length>0)return s}}catch(r){console.warn("CSS selector parsing failed, trying alternative approach:",n,r)}try{let r=n.split(",").map(s=>s.trim()).filter(s=>s.length>0),o=[];for(let s of r)if(s.includes("["))t.querySelectorAll(s).forEach(l=>{let c=l.getAttribute("id")?.trim();c&&c.length>0&&!o.includes(c)&&o.push(c)});else{let a=s.replace(/^#/,"").trim();a.length>0&&!o.includes(a)&&o.push(a)}if(o.length>0)return o}catch(r){console.error("Error parsing mixed CSS selectors:",n,r)}}return n.split(",").map(r=>r.trim().replace(/^#/,"")).filter((r,o,s)=>!!r&&s.indexOf(r)===o)}areStringArraysEqual(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}resolveSvgElementSiblingIndex(e){return e?.parentElement?Array.from(e.parentElement.children).indexOf(e):-1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var kne=["*"],Vi=class i{value=_e(null);multiple=_e(!1);expandedValues=F(new Set);lastSyncedInputSignature=null;constructor(){Yt(()=>{let e=this.value(),t=this.buildInputSignature(e,this.multiple());t!==this.lastSyncedInputSignature&&(this.lastSyncedInputSignature=t,this.syncFromInput(e))})}isExpanded(e){return this.expandedValues().has(this.toKey(e))}toggle(e){let t=this.toKey(e),n=new Set(this.expandedValues());if(n.has(t)){n.delete(t),this.expandedValues.set(n);return}this.multiple()||n.clear(),n.add(t),this.expandedValues.set(n)}syncFromInput(e){if(e==null)return;let t=new Set;if(Array.isArray(e))for(let n of e)t.add(this.toKey(n));else t.add(this.toKey(e));t.size&&this.expandedValues.set(t)}buildInputSignature(e,t){return Array.isArray(e)?`${t}:${e.map(n=>this.toKey(n)).join("|")}`:`${t}:${this.toKey(e)}`}toKey(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):e==null?"__null__":JSON.stringify(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion"]],inputs:{value:[1,"value"],multiple:[1,"multiple"]},ngContentSelectors:kne,decls:1,vars:0,template:function(t,n){t&1&&(Mi(),Ti(0))},encapsulation:2,changeDetection:0})};var Fne=["*"],_i=class i{value=_e(null);accordion=Z(Vi,{host:!0});expanded=Me(()=>this.accordion.isExpanded(this.value()));toggle(){this.accordion.toggle(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion-panel"]],inputs:{value:[1,"value"]},ngContentSelectors:Fne,decls:2,vars:2,consts:[[1,"ui-accordion-panel"]],template:function(t,n){t&1&&(Mi(),ue(0,"section",0),Ti(1),ve()),t&2&&dt("ui-accordion-panel--expanded",n.expanded())},styles:[".ui-accordion-panel[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;margin-bottom:0;overflow:visible;box-shadow:none;transition:background-color .2s ease}.ui-accordion-panel--expanded[_ngcontent-%COMP%]{background:transparent}"],changeDetection:0})};var Nne=["*"];function Lne(i,e){i&1&&(ue(0,"div",0),Ti(1),ve())}var xr=class i{panel=Z(_i,{host:!0});static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion-content"]],ngContentSelectors:Nne,decls:1,vars:1,consts:[[1,"ui-accordion-content"]],template:function(t,n){t&1&&(Mi(),le(0,Lne,2,0,"div",0)),t&2&&ce(n.panel.expanded()?0:-1)},styles:[".ui-accordion-content[_ngcontent-%COMP%]{padding:.8rem .2rem 1rem;overscroll-behavior:contain;background:transparent}.ui-accordion-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.ui-accordion-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:rgb(var(--surface-300, 203 213 225));border-radius:9999px}"],changeDetection:0})};var Une=["*"],_r=class i{panel=Z(_i,{host:!0});static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion-header"]],ngContentSelectors:Une,decls:5,vars:3,consts:[["type","button",1,"ui-accordion-header",3,"click"],[1,"ui-accordion-header__content"],[1,"ui-accordion-header__icon"],["aria-hidden","true",1,"ri-arrow-down-s-line"]],template:function(t,n){t&1&&(Mi(),ue(0,"button",0),Ri("click",function(){return n.panel.toggle()}),ue(1,"span",1),Ti(2),ve(),ue(3,"span",2),kt(4,"i",3),ve()()),t&2&&(fn("aria-expanded",n.panel.expanded()),T(3),dt("ui-accordion-header__icon--expanded",n.panel.expanded()))},styles:[".ui-accordion-header[_ngcontent-%COMP%]{width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.85rem .2rem;border:0;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;color:rgb(var(--text-color, 15 23 42));cursor:pointer;font-weight:500;transition:background-color .2s ease,color .2s ease,border-color .2s ease}.ui-accordion-header[_ngcontent-%COMP%]:hover{background:transparent}.ui-accordion-header[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:-2px}.ui-accordion-header__content[_ngcontent-%COMP%]{min-width:0;flex:1}.ui-accordion-header__icon[_ngcontent-%COMP%]{width:1.65rem;height:1.65rem;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));transition:transform .2s ease,background-color .2s ease,color .2s ease}.ui-accordion-header__icon--expanded[_ngcontent-%COMP%]{transform:rotate(180deg);color:rgb(var(--primary-color, 98 101 241));background:transparent}"],changeDetection:0})};function Bne(i,e){if(i&1&&kt(0,"span",3),i&2){let t=C();kr("innerHTML",t.previewMarkup(),W0)}}function zne(i,e){i&1&&(ue(0,"div",4),kt(1,"i",18),ve())}function Vne(i,e){i&1&&(ue(0,"span",5),kt(1,"span",19),ve())}function Hne(i,e){if(i&1&&kt(0,"span",14),i&2){let t=C();kr("innerHTML",t.previewMarkup(),W0)}}function Gne(i,e){i&1&&(ue(0,"div",15),kt(1,"i",20),ue(2,"span"),R(3,"No preview"),ve()())}var y_=class i{previewMarkup=_e(null);label=_e("Preview");isLoading=_e(!1);static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-svg-preview"]],hostVars:1,hostBindings:function(t,n){t&2&&fn("role","button")},inputs:{previewMarkup:[1,"previewMarkup"],label:[1,"label"],isLoading:[1,"isLoading"]},decls:20,vars:6,consts:[["tabindex","0",1,"svg-preview"],[1,"svg-preview__trigger"],[1,"svg-preview__thumb"],[1,"svg-preview__content",3,"innerHTML"],[1,"svg-preview__empty"],[1,"svg-preview__loader"],[1,"svg-preview__indicator"],["role","tooltip","aria-hidden","true",1,"svg-preview__popover"],[1,"svg-preview__arrow"],[1,"svg-preview__panel"],[1,"svg-preview__popover-header"],[1,"ri-eye-line","svg-preview__popover-icon"],[1,"svg-preview__popover-label"],[1,"svg-preview__canvas"],[1,"svg-preview__canvas-content",3,"innerHTML"],[1,"svg-preview__canvas-empty"],[1,"svg-preview__popover-footer"],[1,"svg-preview__info-text"],[1,"ri-image-add-line"],[1,"svg-preview__spinner"],[1,"ri-image-off-line"]],template:function(t,n){t&1&&(ue(0,"span",0)(1,"span",1)(2,"span",2),le(3,Bne,1,1,"span",3)(4,zne,2,0,"div",4),ve(),le(5,Vne,2,0,"span",5),kt(6,"span",6),ve(),ue(7,"div",7),kt(8,"div",8),ue(9,"div",9)(10,"div",10),kt(11,"i",11),ue(12,"span",12),R(13),ve()(),ue(14,"div",13),le(15,Hne,1,1,"span",14)(16,Gne,4,0,"div",15),ve(),ue(17,"div",16)(18,"span",17),R(19,"Hover or focus to see detailed preview"),ve()()()()()),t&2&&(fn("aria-label",n.label()+" color region preview")("data-loading",n.isLoading()),T(3),ce(n.previewMarkup()?3:4),T(2),ce(n.isLoading()?5:-1),T(8),ze(n.label()),T(2),ce(n.previewMarkup()?15:16))},dependencies:[Ut],styles:['[_nghost-%COMP%]{display:inline-flex;align-items:center;justify-content:center}.svg-preview[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;outline:none}.svg-preview__trigger[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer}.svg-preview__thumb[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;border:1.5px solid #cbd5e1;background:linear-gradient(135deg,#fff,#f8fafc);box-shadow:inset 0 1px #fffc,0 2px 4px #0f172a14,0 1px 2px #0f172a0a;transition:all .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease;overflow:hidden}.svg-preview__content[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border-radius:8px}.svg-preview__content[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:visible}.svg-preview__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:#cbd5e1;font-size:14px;background:linear-gradient(135deg,#f3f4f6,#e5e7eb);border-radius:8px}.svg-preview__loader[_ngcontent-%COMP%]{position:absolute;top:3px;right:3px;width:8px;height:8px;display:flex;align-items:center;justify-content:center}.svg-preview__spinner[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border-radius:50%;border:1.5px solid #cbd5e1;border-top-color:#6265f1;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.svg-preview__indicator[_ngcontent-%COMP%]{position:absolute;bottom:-3px;right:-3px;width:6px;height:6px;border-radius:50%;background:#6265f1;box-shadow:0 0 0 1.5px #fff,0 2px 4px #6265f14d;opacity:0;transform:scale(0);transition:opacity .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__thumb[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__thumb[_ngcontent-%COMP%]{border-color:#94a3b8;background:linear-gradient(135deg,#fff,#f0f4f8);box-shadow:inset 0 1px #fffc,0 6px 16px #6265f129,0 2px 6px #0f172a1f;transform:translateY(-2px) scale(1.08)}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__indicator[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__indicator[_ngcontent-%COMP%]{opacity:1;transform:scale(1)}.svg-preview[_ngcontent-%COMP%]:active .svg-preview__thumb[_ngcontent-%COMP%]{transform:translateY(-1px) scale(1.04)}.svg-preview__popover[_ngcontent-%COMP%]{position:absolute;left:50%;top:calc(100% + 14px);transform:translate(-50%) translateY(-8px) scale(.92);transform-origin:top center;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1),visibility .2s ease;z-index:1000}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__popover[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__popover[_ngcontent-%COMP%]{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%) translateY(0) scale(1)}.svg-preview__arrow[_ngcontent-%COMP%]{position:absolute;left:50%;top:-6px;transform:translate(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ffffff;filter:drop-shadow(0 -1px 2px rgba(15,23,42,.08))}.svg-preview__panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;min-width:120px;padding:12px;border-radius:14px;border:1px solid #e2e8f0;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 20px 40px #0f172a38,0 4px 10px #0f172a1a,inset 0 1px #fff9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.svg-preview__popover-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding-bottom:6px;border-bottom:1px solid #e5e7eb}.svg-preview__popover-icon[_ngcontent-%COMP%]{font-size:13px;color:#6265f1;flex-shrink:0}.svg-preview__popover-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#1f2937;text-transform:uppercase;letter-spacing:.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.svg-preview__canvas[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:120px;height:120px;border-radius:12px;border:1px solid #e5e7eb;background:linear-gradient(135deg,#f9fafb,#f0f4f8);box-shadow:inset 0 1px 2px #0f172a0a;overflow:hidden;position:relative}.svg-preview__canvas[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;background-image:repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(226,232,240,.4) 10px,rgba(226,232,240,.4) 20px);pointer-events:none;opacity:.3}.svg-preview__canvas-content[_ngcontent-%COMP%]{display:block;width:100%;height:100%;position:relative;z-index:1}.svg-preview__canvas-content[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:visible}.svg-preview__canvas-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#94a3b8;font-size:12px;text-align:center;position:relative;z-index:2}.svg-preview__canvas-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:20px;opacity:.6}.svg-preview__popover-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:6px;border-top:1px solid #e5e7eb}.svg-preview__info-text[_ngcontent-%COMP%]{font-size:11px;color:#94a3b8;font-style:italic;text-align:center;letter-spacing:.2px}@media(max-width:768px){.svg-preview__thumb[_ngcontent-%COMP%]{width:30px;height:30px}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__thumb[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__thumb[_ngcontent-%COMP%]{transform:translateY(-1px) scale(1.05)}.svg-preview__panel[_ngcontent-%COMP%]{min-width:120px;padding:10px;gap:8px}.svg-preview__canvas[_ngcontent-%COMP%]{width:110px;height:110px}}@media(max-width:480px){.svg-preview__thumb[_ngcontent-%COMP%]{width:28px;height:28px}.svg-preview__panel[_ngcontent-%COMP%]{min-width:120px;padding:9px;gap:7px}.svg-preview__popover[_ngcontent-%COMP%]{top:calc(100% + 12px)}.svg-preview__canvas[_ngcontent-%COMP%]{width:100px;height:100px}.svg-preview__popover-label[_ngcontent-%COMP%]{font-size:11px}.svg-preview__info-text[_ngcontent-%COMP%]{font-size:10px}}.svg-preview[_ngcontent-%COMP%]:focus-within{outline:2px solid #6265f1;outline-offset:2px;border-radius:10px}@media(prefers-reduced-motion:reduce){.svg-preview__thumb[_ngcontent-%COMP%], .svg-preview__indicator[_ngcontent-%COMP%], .svg-preview__popover[_ngcontent-%COMP%], .svg-preview__spinner[_ngcontent-%COMP%]{transition:none}@keyframes spin{to{transform:rotate(0)}}}'],changeDetection:0})};var uh=class i{constructor(e){this.customizerState=e}isActiveColor(e,t){let n=this.customizerState.svgDoc();if(!n)return!1;let r=this.parseTargets(e);return r.length===0?!1:r.every(({selector:o,stopIndex:s})=>{let a=Array.from(n.querySelectorAll(o));return a.length===0?!1:a.every(l=>{if(l.tagName==="linearGradient"){let d=Array.from(l.querySelectorAll("stop"));return d.length===0?!1:this.resolveStops(d,s).every(f=>(f.getAttribute("stop-color")??f.style.stopColor??"").toLowerCase()===t.toLowerCase())}return(l.getAttribute("fill")||l.style.fill||"").toLowerCase()===t.toLowerCase()})})}applyColor(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=this.parseTargets(e),o=!1;r.forEach(({selector:s,stopIndex:a})=>{let l=Array.from(n.querySelectorAll(s));l.length!==0&&l.forEach(c=>{if(c.tagName==="linearGradient"){let d=Array.from(c.querySelectorAll("stop"));if(!d.length)return;this.resolveStops(d,a).forEach(f=>{let h=f.getAttribute("stop-opacity")??f.style.stopOpacity??null;f.removeAttribute("style"),f.setAttribute("stop-color",t),h!==null&&h!==""&&f.setAttribute("stop-opacity",h),o=!0});return}c.removeAttribute("style"),c.setAttribute("fill",t),o=!0})}),o&&this.customizerState.markSvgMutated(n)}parseTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveStopIndex(e,t){let n=Number.isFinite(e)?e:1;return Math.min(Math.max(n,0),t-1)}resolveStops(e,t){if(t===void 0)return e;let n=this.resolveStopIndex(t,e.length);return[e[n]]}static \u0275fac=function(t){return new(t||i)(Ke(Dn))};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var jne=(i,e)=>e.color,t4=(i,e)=>e.actionPathIdsCsv,n4=(i,e)=>e.colorCode;function Wne(i,e){if(i&1&&U(0,"i",10),i&2){let t=C().$implicit,n=C(2);dt("swatch-check--dark",n.isLightColor(t.color))}}function $ne(i,e){if(i&1){let t=Ae();x(0,"button",7),W("click",function(){let r=z(t).$implicit,o=C(2);return V(o.onColorSelect(null,r.color))}),x(1,"span",8),le(2,Wne,1,2,"i",9),S()()}if(i&2){let t,n,r=e.$implicit,o=C(2);co("border-color",o.getBorderColor(r.color)),dt("swatch-btn--active",((t=o.activeColor())==null?null:t.toLowerCase())===r.color.toLowerCase()),q("appTooltip",r.label??r.color),T(),co("background-color",r.color),T(),ce(((n=o.activeColor())==null?null:n.toLowerCase())===r.color.toLowerCase()?2:-1)}}function Yne(i,e){if(i&1){let t=Ae();x(0,"button",11),W("click",function(){z(t);let r=C(2);return V(r.toggleShowAllPalette())}),x(1,"span",12),R(2),S()()}if(i&2){let t=C(2);T(2),Tt("+",t.remainingPaletteCount())}}function Xne(i,e){if(i&1){let t=Ae();x(0,"button",13),W("click",function(){z(t);let r=C(2);return V(r.toggleShowAllPalette())}),U(1,"i",14),R(2," Show less "),S()}}function qne(i,e){if(i&1&&(x(0,"div",1)(1,"div",3),mt(2,$ne,3,8,"button",4,jne),le(4,Yne,3,1,"button",5),S(),le(5,Xne,3,0,"button",6),S()),i&2){let t=C();T(2),gt(t.visiblePalette()),T(2),ce(!t.showAllPalette()&&t.remainingPaletteCount()>0?4:-1),T(),ce(t.shouldShowPaletteLessButton()?5:-1)}}function Kne(i,e){if(i&1&&U(0,"i",10),i&2){let t=C().$implicit,n=C(3);dt("swatch-check--dark",n.isLightColor(t.colorCode))}}function Zne(i,e){if(i&1){let t=Ae();x(0,"button",7),W("click",function(){let r=z(t).$implicit,o=C().$implicit,s=C(2);return V(s.onColorSelect(o.actionPathIdsCsv,r.colorCode))}),x(1,"span",8),le(2,Kne,1,2,"i",9),S()()}if(i&2){let t=e.$implicit,n=C().$implicit,r=C(2);co("border-color",r.getBorderColor(t.colorCode)),dt("swatch-btn--active",r.isActive(n.actionPathIdsCsv,t.colorCode)),q("appTooltip",t.name),T(),co("background-color",t.colorCode),T(),ce(r.isActive(n.actionPathIdsCsv,t.colorCode)?2:-1)}}function Jne(i,e){if(i&1){let t=Ae();x(0,"button",11),W("click",function(){z(t);let r=C().$implicit,o=C(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),x(1,"span",12),R(2),S()()}if(i&2){let t=C().$implicit,n=C(2);T(2),Tt("+",n.remainingColorCount(t))}}function Qne(i,e){if(i&1){let t=Ae();x(0,"button",13),W("click",function(){z(t);let r=C().$implicit,o=C(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),U(1,"i",14),R(2," Show less "),S()}}function eie(i,e){if(i&1&&(x(0,"div",1)(1,"div",3),mt(2,Zne,3,8,"button",4,n4),le(4,Jne,3,1,"button",5),S(),le(5,Qne,3,0,"button",6),S()),i&2){let t=e.$implicit,n=C(2);T(2),gt(n.visibleColors(t)),T(2),ce(n.shouldShowMoreButton(t)?4:-1),T(),ce(n.shouldShowLessButton(t)?5:-1)}}function tie(i,e){if(i&1&&mt(0,eie,6,2,"div",1,t4),i&2){let t=C();gt(t.colorItems())}}function nie(i,e){if(i&1&&U(0,"app-svg-preview",20),i&2){let t=C(),n=C().$implicit;q("previewMarkup",t)("label",n.name)}}function iie(i,e){if(i&1&&le(0,nie,1,2,"app-svg-preview",20),i&2){let t=C(3);ce(t.hasVisiblePreviewContent(e)?0:-1)}}function rie(i,e){if(i&1&&U(0,"i",10),i&2){let t=C().$implicit,n=C(3);dt("swatch-check--dark",n.isLightColor(t.colorCode))}}function oie(i,e){if(i&1){let t=Ae();x(0,"button",7),W("click",function(){let r=z(t).$implicit,o=C().$implicit,s=C(2);return V(s.onColorSelect(o.actionPathIdsCsv,r.colorCode))}),x(1,"span",8),le(2,rie,1,2,"i",9),S()()}if(i&2){let t=e.$implicit,n=C().$implicit,r=C(2);co("border-color",r.getBorderColor(t.colorCode)),dt("swatch-btn--active",r.isActive(n.actionPathIdsCsv,t.colorCode)),q("appTooltip",t.name),T(),co("background-color",t.colorCode),T(),ce(r.isActive(n.actionPathIdsCsv,t.colorCode)?2:-1)}}function sie(i,e){if(i&1){let t=Ae();x(0,"button",11),W("click",function(){z(t);let r=C().$implicit,o=C(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),x(1,"span",12),R(2),S()()}if(i&2){let t=C().$implicit,n=C(2);T(2),Tt("+",n.remainingColorCount(t))}}function aie(i,e){if(i&1){let t=Ae();x(0,"button",13),W("click",function(){z(t);let r=C().$implicit,o=C(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),U(1,"i",14),R(2," Show less "),S()}}function lie(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",15)(1,"app-ui-accordion-header")(2,"div",16)(3,"div",17),U(4,"i",18),x(5,"span",19),R(6),S()(),le(7,iie,1,1),S()(),x(8,"app-ui-accordion-content")(9,"div",1)(10,"div",3),mt(11,oie,3,8,"button",4,n4),le(13,sie,3,1,"button",5),S(),le(14,aie,3,0,"button",6),S()()()),i&2){let t,n=e.$implicit,r=C(2);q("value",n.actionPathIdsCsv),T(6),ze(n.name),T(),ce((t=r.getStepPreview(n))?7:-1,t),T(4),gt(r.visibleColors(n)),T(2),ce(r.shouldShowMoreButton(n)?13:-1),T(),ce(r.shouldShowLessButton(n)?14:-1)}}function cie(i,e){if(i&1&&(x(0,"app-ui-accordion",2),mt(1,lie,15,5,"app-ui-accordion-panel",15,t4),S()),i&2){let t,n=C();q("value",(t=n.colorItems()[0])==null?null:t.actionPathIdsCsv),T(),gt(n.colorItems())}}var oc=class i{constructor(e,t,n){this.colorState=e;this.customizerState=t;this.sanitizer=n}static SVG_NS="http://www.w3.org/2000/svg";static XLINK_NS="http://www.w3.org/1999/xlink";static PREVIEW_CACHE_VERSION="v1";items=_e([]);palette=_e([]);activeColor=_e(null);colorSelected=Pt();COLOR_LIMIT=15;showAllPalette=F(!1);showAllColorItems=F({});previewCache=new Map;lastPreviewSnapshotKey=null;svgSnapshotKey=Me(()=>{let e=this.customizerState.svgText();if(!e)return"empty";let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`${e.length}:${(t>>>0).toString(16)}`});usePalette=Me(()=>(this.palette()??[]).length>0);colorItems=Me(()=>this.items().filter(e=>e.type==="Color"));visiblePalette=Me(()=>{let e=this.palette();return this.showAllPalette()||e.length<=this.COLOR_LIMIT?e:e.slice(0,this.COLOR_LIMIT)});remainingPaletteCount=Me(()=>{let e=this.palette();return Math.max(0,e.length-this.COLOR_LIMIT)});visibleColors(e){let t=e.pack.dataSources;return this.showAllColorItems()[e.actionPathIdsCsv||""]||t.length<=this.COLOR_LIMIT?t:t.slice(0,this.COLOR_LIMIT)}remainingColorCount(e){let t=e.pack.dataSources;return Math.max(0,t.length-this.COLOR_LIMIT)}toggleShowAllPalette(){this.showAllPalette.update(e=>!e)}toggleShowAllColors(e){this.showAllColorItems.update(t=>he(k({},t),{[e]:!t[e]}))}shouldShowMoreButton(e){let t=e.pack.dataSources;return!this.showAllColorItems()[e.actionPathIdsCsv||""]&&t.length>this.COLOR_LIMIT}shouldShowLessButton(e){let t=e.pack.dataSources;return this.showAllColorItems()[e.actionPathIdsCsv||""]&&t.length>this.COLOR_LIMIT}shouldShowPaletteLessButton(){return this.showAllPalette()&&this.palette().length>this.COLOR_LIMIT}getStepPreview(e){let t=this.customizerState.svgDoc(),n=e.actionPathIdsCsv?.trim()??"";if(!t||!n||!this.customizerState.isBrowser())return null;let r=this.svgSnapshotKey();this.lastPreviewSnapshotKey!==r&&(this.previewCache.clear(),this.lastPreviewSnapshotKey=r);let o=`${i.PREVIEW_CACHE_VERSION}|${r}|${n}`;if(this.previewCache.has(o))return this.previewCache.get(o)??null;let s=this.buildPreviewMarkup(t,n),a=s?this.sanitizer.bypassSecurityTrustHtml(s):null;return this.previewCache.set(o,a),a}hasVisiblePreviewContent(e){if(!e)return!1;let t=e.toString();return t?!t.includes('opacity="0"')||/opacity="[1-9]/.test(t)||/opacity="0\.[1-9]/.test(t):!1}onColorSelect(e,t){t&&(e&&this.colorState.applyColor(e,t),this.colorSelected.emit(t))}isActive(e,t){return t?this.colorState.isActiveColor(e,t):!1}getBorderColor(e){return this.isLightColor(e)?"#000000":e}isLightColor(e){if(!e)return!1;let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),o=parseInt(t.substring(4,6),16);return(n*299+r*587+o*114)/1e3>220}buildPreviewMarkup(e,t){let n=e.documentElement;if(!n)return null;let r=this.parseTargets(t);if(!r.length)return null;let o=n.cloneNode(!0);o.setAttribute("xmlns",i.SVG_NS),o.setAttribute("xmlns:xlink",i.XLINK_NS),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("focusable","false"),o.setAttribute("aria-hidden","true"),o.setAttribute("style","display:block;");let s=this.collectTargetGraphics(o,r);if(!s.length)return null;this.isolateTargetGraphics(o,new Set(s));let a=n.getAttribute("viewBox");return a&&o.setAttribute("viewBox",a),new XMLSerializer().serializeToString(o)}isolateTargetGraphics(e,t){let n=new Set(t);t.forEach(o=>{let s=o.parentElement;for(;s&&s!==e;)this.isGraphicsElement(s)&&n.add(s),s=s.parentElement}),Array.from(e.querySelectorAll("*")).filter(o=>this.isGraphicsElement(o)&&!this.isInsideDefs(o)).forEach(o=>{if(n.has(o)){o.setAttribute("opacity","1"),o.removeAttribute("display"),o.removeAttribute("visibility");return}o.setAttribute("opacity","0"),o.setAttribute("pointer-events","none")})}collectTargetGraphics(e,t){let n=new Set;return t.forEach(({selector:r})=>{this.safeQueryAll(e,r).forEach(s=>{if(this.isDefElement(s)){let a=s.id;if(!a)return;this.findReferencingGraphics(e,a).forEach(l=>{n.add(l)});return}this.isGraphicsElement(s)&&n.add(s)})}),Array.from(n)}safeQueryAll(e,t){try{return Array.from(e.querySelectorAll(t))}catch{return[]}}findReferencingGraphics(e,t){let n=this.escapeForAttributeSelector(t),r=e.querySelectorAll(`[fill*="url(#${n})"],[stroke*="url(#${n})"],[filter*="url(#${n})"],[clip-path*="url(#${n})"],[mask*="url(#${n})"],[marker-start*="url(#${n})"],[marker-mid*="url(#${n})"],[marker-end*="url(#${n})"],[style*="url(#${n})"]`);return Array.from(r).filter(o=>this.isGraphicsElement(o)&&!this.isInsideDefs(o))}isInsideDefs(e){return!!e.closest("defs")}isDefElement(e){let t=e.tagName.toLowerCase();return t==="lineargradient"||t==="radialgradient"||t==="pattern"||t==="clippath"||t==="mask"||t==="filter"||t==="marker"}isGraphicsElement(e){return typeof e.getBBox=="function"}measureBounds(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.forEach(s=>{try{let a=s.getBBox();if(!Number.isFinite(a.width)||!Number.isFinite(a.height))return;t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height)}catch{}}),!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o)?null:{minX:t,minY:n,width:Math.max(r-t,1),height:Math.max(o-n,1)}}parseTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}escapeForAttributeSelector(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}static \u0275fac=function(t){return new(t||i)(Gt(uh),Gt(Dn),Gt(Mp))};static \u0275cmp=it({type:i,selectors:[["app-customizer-color-panel"]],inputs:{items:[1,"items"],palette:[1,"palette"],activeColor:[1,"activeColor"]},outputs:{colorSelected:"colorSelected"},decls:4,vars:1,consts:[[1,"panel-body"],[1,"color-section"],[1,"child-accordion",3,"value"],[1,"swatch-grid"],["type","button",1,"swatch-btn",3,"swatch-btn--active","border-color","appTooltip"],["type","button",1,"swatch-btn","swatch-btn--more"],["type","button",1,"swatch-show-less"],["type","button",1,"swatch-btn",3,"click","appTooltip"],[1,"swatch-dot"],[1,"ri-check-line","swatch-check",3,"swatch-check--dark"],[1,"ri-check-line","swatch-check"],["type","button",1,"swatch-btn","swatch-btn--more",3,"click"],[1,"swatch-dot","swatch-dot--more"],["type","button",1,"swatch-show-less",3,"click"],[1,"ri-arrow-up-s-line"],[3,"value"],[1,"accordion-header-content"],[1,"accordion-header-title"],[1,"ri-palette-line","accordion-header-icon"],[1,"accordion-header-label"],[3,"previewMarkup","label"]],template:function(t,n){t&1&&(x(0,"div",0),le(1,qne,6,2,"div",1)(2,tie,2,0)(3,cie,3,1,"app-ui-accordion",2),S()),t&2&&(T(),ce(n.usePalette()?1:n.colorItems().length<=1?2:3))},dependencies:[Ut,bi,Vi,_i,_r,xr,y_],styles:["[_nghost-%COMP%]{display:block}.color-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:10px 12px}.swatch-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px}.swatch-btn[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;width:43px;height:43px;border-radius:10px;background:#fff;border:2px solid transparent;padding:3px;cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s}.swatch-btn[_ngcontent-%COMP%]:active{transform:scale(.96)}.swatch-btn--active[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #6265f138}.swatch-dot[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:1px solid rgba(0,0,0,.06);transition:box-shadow .16s;flex-shrink:0}.swatch-btn[_ngcontent-%COMP%]:hover .swatch-dot[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #00000014}.swatch-check[_ngcontent-%COMP%]{font-size:14px;font-weight:900;color:#fff;line-height:1}.swatch-check--dark[_ngcontent-%COMP%]{color:#111827}.swatch-btn--more[_ngcontent-%COMP%]{border:2px dashed #d1d5db;background:#f9fafb}.swatch-btn--more[_ngcontent-%COMP%]:hover{border-color:#6265f1;background:#f5f3ff}.swatch-dot--more[_ngcontent-%COMP%]{background:transparent;border:none;font-size:11px;font-weight:700;color:#6b7280;letter-spacing:-.02em}.swatch-btn--more[_ngcontent-%COMP%]:hover .swatch-dot--more[_ngcontent-%COMP%]{color:#6265f1}.swatch-show-less[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;padding:4px 10px;border-radius:9999px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:11px;font-weight:500;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.swatch-show-less[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.swatch-show-less[_ngcontent-%COMP%]:hover{border-color:#6265f1;color:#6265f1;background:#f5f3ff}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px;width:100%}.accordion-header-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;min-width:0}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.swatch-btn[_ngcontent-%COMP%]{width:36px;height:36px}.swatch-dot[_ngcontent-%COMP%]{width:24px;height:24px}}@media(max-width:480px){.color-section[_ngcontent-%COMP%]{padding:8px 10px}}"],changeDetection:0})};var ea=class i{min=_e(0);max=_e(100);step=_e(1);disabled=_e(!1);onChange=Pt();value=F(0);onModelChange=()=>{};onModelTouched=()=>{};writeValue(e){this.value.set(typeof e=="number"?e:0)}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){e!==this.disabled()&&this._runtimeDisabled.set(e)}_runtimeDisabled=F(!1);handleInput(e){let t=Number(e);Number.isFinite(t)&&(this.value.set(t),this.onModelChange(t),this.onChange.emit(t))}handleBlur(){this.onModelTouched()}isDisabled(){return this.disabled()||this._runtimeDisabled()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-slider"]],inputs:{min:[1,"min"],max:[1,"max"],step:[1,"step"],disabled:[1,"disabled"]},outputs:{onChange:"onChange"},features:[uo([{provide:fl,useExisting:Wi(()=>i),multi:!0}])],decls:2,vars:5,consts:[[1,"ui-slider-track"],["type","range",1,"ui-slider",3,"input","blur","min","max","step","value","disabled"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"input",1),Ri("input",function(o){return n.handleInput(o.target.value)})("blur",function(){return n.handleBlur()}),ve()()),t&2&&(T(),kr("min",n.min())("max",n.max())("step",n.step())("value",n.value())("disabled",n.isDisabled()))},dependencies:[Ut,fr],styles:["[_nghost-%COMP%]{display:inline-flex;width:100%}.ui-slider-track[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center}.ui-slider[_ngcontent-%COMP%]{width:100%;accent-color:rgb(var(--primary-color, 98 101 241));cursor:pointer;height:.35rem;border-radius:9999px;background:linear-gradient(90deg,rgb(var(--primary-color, 98 101 241) / .25),rgb(var(--secondary-color, 16 185 129) / .25))}"],changeDetection:0})};var i4={removePattern:"Remove pattern"},Qr={patternFill:"data-pattern-fill",originalFill:"data-original-fill",originalStyleFill:"data-original-style-fill"},Jm="__empty__";var r4={type:"custom",closable:!0,backdrop:!0,buttons:[{label:"Cancel",action:"cancel"},{label:"Confirm",action:"confirm",isPrimary:!0}]};var Mo=class i{dialogConfigs=F([]);activeDialogId=F(null);dialogCounter=0;resultCallbacks=new Map;isOpen=F(!1);currentConfig=F(null);showDialog(e){let t=e.id||`dialog-${++this.dialogCounter}`,n=he(k(k({},r4),e),{id:t});return new Promise(r=>{this.resultCallbacks.set(t,r),this.currentConfig.set(n),this.activeDialogId.set(t),this.isOpen.set(!0)})}closeDialog(e){let t=this.activeDialogId();if(!t)return;let n=this.resultCallbacks.get(t);n&&(n(e),this.resultCallbacks.delete(t)),this.isOpen.set(!1),this.currentConfig.set(null),this.activeDialogId.set(null)}confirm(){this.closeDialog({action:"confirm"})}cancel(){this.closeDialog({action:"cancel"})}handleCustomAction(e,t){this.closeDialog({action:"custom",customId:e,data:t})}getActiveConfig(){return this.currentConfig()}getIsOpen(){return this.isOpen()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var fh=class i{constructor(e,t){this.customizerState=e;this.dialogService=t}minPatternOpacity=0;maxPatternOpacity=1;patternOpacityStep=.05;patternTransformMinScale=.25;patternTransformMaxScale=6;patternTransformScaleStep=.05;patternTransformMinRotation=-180;patternTransformMaxRotation=180;patternTransformRotationStep=1;patternTransformMinTranslate=-500;patternTransformMaxTranslate=500;patternTransformTranslateStep=1;uploadedPatternOptions=F([]);selectedUploadedPatternId=F(null);selectedPatternFileUrl=F(null);patternTargetsInput=F("");patternDefinitionState=F({});patternPivotCache=F(new Map);state=Me(()=>({definition:this.patternDefinitionState(),uploadedOptions:this.uploadedPatternOptions(),selectedId:this.selectedUploadedPatternId(),selectedFileUrl:this.selectedPatternFileUrl()}));refreshFromSvg(){this.rebuildPatternOptionsFromSvgDoc()}isPatternSelected(e){return e?this.selectedPatternFileUrl()===e:!1}async applyPatternFromUrl(e,t,n=!1){let r=this.customizerState.svgDoc();if(!r){n||this.showErrorDialog($l.garmentSvgRequired,Ys.garmentSvgRequired);return}if(!e){n||this.showErrorDialog($l.patternSvgUrlRequired,Ys.patternSvgUrlRequired);return}let o=this.parsePatternTargetIds(t);if(!o||o.length===0){n||this.showErrorDialog($l.targetIdRequired,Ys.targetIdRequired);return}try{let s=await fetch(e,{cache:"no-cache"});if(!s.ok)throw new Error(`Failed to load SVG (${s.status})`);let a=await s.text();if(!a||!a.includes(Xx)){this.showErrorDialog($l.invalidSvgContent,Ys.invalidSvgContent);return}let l=this.ingestPatternSvgAndReturnIds(a);if(l.length===0){this.showErrorDialog($l.noPatternDefinitionsImported,Ys.noPatternDefinitionsImported);return}let c=l[0];this.selectedUploadedPatternId.set(c),this.selectedPatternFileUrl.set(e);let d=`url(#${c})`,u=[],f=!1;if(o.forEach(h=>{let p=r.getElementById(h);if(!p){u.push(h);return}if(!p.hasAttribute(Qr.originalFill)){let v=p.getAttribute("fill");p.setAttribute(Qr.originalFill,v&&v.trim().length>0?v:Jm)}if(!p.hasAttribute(Qr.originalStyleFill)){let v=this.readStyleProperty(p,"fill");p.setAttribute(Qr.originalStyleFill,v&&v.trim().length>0?v:Jm)}this.stripStyleProperty(p,"fill"),p.setAttribute("fill",d),p.setAttribute(Qr.patternFill,c),f=!0}),!f){n||this.showErrorDialog($l.noMatchingTargetIds,Ys.noMatchingTargetIds);return}u.length>0&&console.warn(Ys.skippedMissingTargetIds,u.join(", ")),this.customizerState.markSvgMutated(r)}catch(s){console.error(Ys.applyPatternFromUrlFailed,s),n||this.showErrorDialog($l.failedApplyPattern,Ys.failedApplyPattern)}}removePatternFromTargets(e){let t=this.customizerState.svgDoc();if(!t)return;let n=this.parsePatternTargetIds(e);if(n.length===0)return;let r=!1;if(n.forEach(s=>{let a=t.getElementById(s);if(!a)return;let l=a.getAttribute(Qr.originalFill),c=a.getAttribute(Qr.originalStyleFill);l&&l!==Jm?a.setAttribute("fill",l):a.removeAttribute("fill"),c&&c!==Jm?this.setStyleProperty(a,"fill",c):this.stripStyleProperty(a,"fill"),a.removeAttribute(Qr.patternFill),a.removeAttribute(Qr.originalFill),a.removeAttribute(Qr.originalStyleFill),r=!0}),!r)return;let o=this.selectedUploadedPatternId();o&&!this.isPatternDefinitionApplied(t,o)&&(this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null)),this.customizerState.markSvgMutated(t)}hasPatternAppliedToTargets(e){let t=this.customizerState.svgDoc();if(!t)return!1;let n=this.parsePatternTargetIds(e);return n.length===0?!1:n.some(r=>{let o=t.getElementById(r);if(!o)return!1;let s=o.getAttribute(me.DATA_PATTERN_FILL);if(s&&s.trim().length>0)return!0;let a=o.getAttribute("fill")??"";return/^url\(#.+\)$/.test(a.trim())})}onPatternDefinitionScaleChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{scale:n})}onPatternDefinitionRotationChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{rotation:n})}onPatternDefinitionTranslateXChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{translateX:n})}onPatternDefinitionTranslateYChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{translateY:n})}onPatternDefinitionOpacityChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{opacity:n})}updatePatternTargetsInput(e){this.patternTargetsInput.set(e)}setSelectedUploadedPattern(e){this.selectedUploadedPatternId.set(e)}setSelectedPatternFileUrl(e){let t=e?.trim();this.selectedPatternFileUrl.set(t&&t.length>0?t:null)}updatePatternDefinitionState(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=n.getElementById(e);if(!(r instanceof SVGPatternElement))return;let o=this.patternDefinitionState()[e]??k({},Xs),s={scale:t.scale!==void 0?this.normalizePatternDefinitionScale(t.scale):o.scale,rotation:t.rotation!==void 0?this.normalizePatternDefinitionRotation(t.rotation):o.rotation,translateX:t.translateX!==void 0?this.normalizePatternDefinitionTranslate(t.translateX):o.translateX,translateY:t.translateY!==void 0?this.normalizePatternDefinitionTranslate(t.translateY):o.translateY,opacity:t.opacity!==void 0?this.normalizePatternDefinitionOpacity(t.opacity):o.opacity};this.patternDefinitionState.set(he(k({},this.patternDefinitionState()),{[e]:s})),this.applyPatternDefinitionAttributes(r,s),this.customizerState.markSvgMutated(n)}rebuildPatternOptionsFromSvgDoc(){let e=this.customizerState.svgDoc();if(!e){this.uploadedPatternOptions.set([]),this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null),this.patternDefinitionState.set({});return}let t=Array.from(e.querySelectorAll("pattern[id]")),n={},r=Array.from(new Set(t.map(o=>o.getAttribute("id")).filter(o=>!!o&&o.trim().length>0).map(o=>o.trim())));r.forEach(o=>{let s=e.getElementById(o);if(!s)return;let a=this.readPatternDefinitionState(s);n[o]=a,this.applyPatternDefinitionAttributes(s,a)}),this.patternDefinitionState.set(n),this.uploadedPatternOptions.set(r.map(o=>({id:o,label:o}))),(!this.selectedUploadedPatternId()||!r.includes(this.selectedUploadedPatternId()))&&(this.selectedUploadedPatternId.set(r[0]??null),r.length===0&&this.selectedPatternFileUrl.set(null))}ingestPatternSvgAndReturnIds(e){let t=this.customizerState.svgDoc();if(!t)return[];let r=new DOMParser().parseFromString(e,ss);if(r.querySelector(Yd))return[];let o=Array.from(r.querySelectorAll("pattern[id]"));if(o.length===0)return[];let s=this.ensureDefsElement(),a=[];return o.forEach(l=>{let c=l.getAttribute("id")?.trim();if(!c)return;let d=t.importNode(l,!0),u=t.getElementById(c);if(u instanceof SVGPatternElement)u.parentNode?.replaceChild(d,u);else if(!u)s.appendChild(d);else return;a.push(c)}),this.rebuildPatternOptionsFromSvgDoc(),a}parsePatternTargetIds(e){if(!e||e.trim().length===0)return[];let t=e.trim(),n=this.customizerState.svgDoc();if(!n)return[];if(t.includes("[")){try{let r=n.querySelectorAll(t);if(r.length>0){let o=[];r.forEach(a=>{let l=a.getAttribute("id");l&&l.trim().length>0&&o.push(l.trim())});let s=Array.from(new Set(o));if(s.length>0)return s}}catch(r){console.warn("CSS selector parsing failed, trying alternative approach:",t,r)}try{let r=t.split(",").map(s=>s.trim()).filter(s=>s.length>0),o=[];for(let s of r)if(s.includes("["))n.querySelectorAll(s).forEach(l=>{let c=l.getAttribute("id")?.trim();c&&c.length>0&&!o.includes(c)&&o.push(c)});else{let a=s.replace(/^#/,"").trim();a.length>0&&!o.includes(a)&&o.push(a)}if(o.length>0)return o}catch(r){console.error("Error parsing mixed CSS selectors:",t,r)}}return t.split(",").map(r=>r.trim()).filter(r=>r.length>0).map(r=>r.startsWith("#")?r.slice(1):r)}isPatternDefinitionApplied(e,t){let n=e.querySelectorAll(`[${Qr.patternFill}]`);return Array.from(n).some(r=>r.getAttribute(Qr.patternFill)?.trim()===t)}ensureDefsElement(){let e=this.customizerState.svgDoc();if(!e)throw new Error("SVG document not loaded");let t=e.documentElement,n=t.namespaceURI||Di,r=t.querySelector("defs");return r||(r=e.createElementNS(n,"defs"),t.insertBefore(r,t.firstChild)),r}clampPatternOpacity(e){return Number.isFinite(e)?Math.min(this.maxPatternOpacity,Math.max(this.minPatternOpacity,e)):1}normalizePatternDefinitionScale(e){if(!Number.isFinite(e))return Xs.scale;let t=Math.min(this.patternTransformMaxScale,Math.max(this.patternTransformMinScale,e));return Math.round(t*1e3)/1e3}normalizePatternDefinitionRotation(e){if(!Number.isFinite(e))return Xs.rotation;let t=Math.min(this.patternTransformMaxRotation,Math.max(this.patternTransformMinRotation,e));return Math.round(t*10)/10}normalizePatternDefinitionTranslate(e){if(!Number.isFinite(e))return Xs.translateX;let t=Math.min(this.patternTransformMaxTranslate,Math.max(this.patternTransformMinTranslate,e));return Math.round(t*10)/10}normalizePatternDefinitionOpacity(e){return this.clampPatternOpacity(e)}readPatternDefinitionState(e){let t=(p,v)=>{let g=p!==null?Number.parseFloat(p):NaN;return Number.isFinite(g)?g:v},n=t(e.getAttribute(me.DATA_PATTERN_SCALE),Xs.scale),r=t(e.getAttribute(me.DATA_PATTERN_ROTATION),Xs.rotation),o=t(e.getAttribute(me.DATA_PATTERN_TRANSLATE_X),Xs.translateX),s=t(e.getAttribute(me.DATA_PATTERN_TRANSLATE_Y),Xs.translateY),a=n,l=r,c=o,d=s,u=e.getAttribute("patternTransform");if(u){let p=u.match(/translate\(([^)]+)\)/i);if(p){let m=p[1].split(/[\s,]+/).map(b=>Number.parseFloat(b)).filter(b=>Number.isFinite(b));m.length>=1&&(c=m[0],d=m.length>=2?m[1]:m[0])}let v=u.match(/rotate\(([^)]+)\)/i);if(v){let m=Number.parseFloat(v[1].split(/[\s,]+/)[0]??"");Number.isFinite(m)&&(l=m)}let g=u.match(/scale\(([^)]+)\)/i);if(g){let m=Number.parseFloat(g[1].split(/[\s,]+/)[0]??"");Number.isFinite(m)&&(a=m)}}let f=e.getAttribute(me.DATA_PATTERN_OPACITY)??e.getAttribute("opacity"),h=this.normalizePatternDefinitionOpacity(f!==null?Number.parseFloat(f):Xs.opacity);return{scale:this.normalizePatternDefinitionScale(a),rotation:this.normalizePatternDefinitionRotation(l),translateX:this.normalizePatternDefinitionTranslate(c),translateY:this.normalizePatternDefinitionTranslate(d),opacity:h}}composePatternDefinitionTransform(e,t){let n=this.computePatternPivot(e),r=this.composeCenteredTransformMatrix({scale:t.scale,rotation:t.rotation,translateX:t.translateX,translateY:t.translateY},n);return this.matrixToTransform(r)}computePatternPivot(e){let t=e.id??"";if(t&&this.patternPivotCache().has(t))return this.patternPivotCache().get(t);let n=null,r=e.getAttribute("viewBox");if(r){let o=r.split(/[\s,]+/).map(s=>Number.parseFloat(s)).filter(s=>Number.isFinite(s));if(o.length===4){let[s,a,l,c]=o;n={cx:s+l/2,cy:a+c/2}}}if(!n){let o=this.parseNumericAttribute(e.getAttribute("width"),1),s=this.parseNumericAttribute(e.getAttribute("height"),1),a=this.parseNumericAttribute(e.getAttribute("x"),0),l=this.parseNumericAttribute(e.getAttribute("y"),0);n={cx:a+o/2,cy:l+s/2}}return t&&this.patternPivotCache.update(o=>{let s=new Map(o);return s.set(t,n),s}),n}parseNumericAttribute(e,t){if(!e)return t;let n=Number.parseFloat(e);return Number.isFinite(n)?n:t}applyPatternOpacity(e,t){let n=this.normalizePatternDefinitionOpacity(t);this.resolvePatternReferenceChain(e).forEach(o=>{o.querySelectorAll("path, rect, circle, ellipse, polygon, polyline, image, g").forEach(a=>{if(this.stripStyleProperty(a,"opacity"),Math.abs(n-1)<1e-4){a.removeAttribute("opacity");return}a.setAttribute("opacity",n.toString())})})}resolvePatternReferenceChain(e){let t=this.customizerState.svgDoc();if(!t)return[e];let n=[],r=new Set,o=e;for(;o;){let s=o.id?.trim()||`__inline-${n.length}`;if(r.has(s))break;r.add(s),n.push(o);let a=this.extractPatternRefId(o);if(!a)break;let l=t.getElementById(a);o=l instanceof SVGPatternElement?l:null}return n}extractPatternRefId(e){let t=e.getAttribute("href")??e.getAttributeNS("http://www.w3.org/1999/xlink","href")??e.getAttribute("xlink:href");if(!t)return null;let n=t.trim();if(!n)return null;let r=n.indexOf("#");if(r===-1)return null;let o=n.slice(r+1).trim();return o.length>0?o:null}applyPatternDefinitionAttributes(e,t){let n={scale:this.normalizePatternDefinitionScale(t.scale),rotation:this.normalizePatternDefinitionRotation(t.rotation),translateX:this.normalizePatternDefinitionTranslate(t.translateX),translateY:this.normalizePatternDefinitionTranslate(t.translateY),opacity:this.normalizePatternDefinitionOpacity(t.opacity)};e.setAttribute(me.DATA_PATTERN_SCALE,n.scale.toString()),e.setAttribute(me.DATA_PATTERN_ROTATION,n.rotation.toString()),e.setAttribute(me.DATA_PATTERN_TRANSLATE_X,n.translateX.toString()),e.setAttribute(me.DATA_PATTERN_TRANSLATE_Y,n.translateY.toString()),e.setAttribute(me.DATA_PATTERN_OPACITY,n.opacity.toString()),e.removeAttribute("opacity");let r=this.composePatternDefinitionTransform(e,n);r?e.setAttribute("patternTransform",r):e.removeAttribute("patternTransform"),this.applyPatternOpacity(e,n.opacity)}stripStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return;let r=t.toLowerCase(),o=n.split(";").map(s=>s.trim()).filter(s=>s&&!s.toLowerCase().startsWith(`${r}:`));o.length>0?e.setAttribute("style",o.join(";")):e.removeAttribute("style")}readStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return null;let r=t.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.slice(o.indexOf(":")+1).trim();return s.length>0?s:null}setStyleProperty(e,t,n){let r=e.getAttribute("style"),o=t.toLowerCase(),s=(r??"").split(";").map(a=>a.trim()).filter(a=>a.length>0).filter(a=>!a.toLowerCase().startsWith(`${o}:`));s.push(`${t}: ${n}`),e.setAttribute("style",s.join("; "))}composeCenteredTransformMatrix(e,t){let n=this.identityMatrix();return e.scale!==void 0&&!this.isNearlyZero(e.scale-1)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.scaleMatrix(e.scale,e.scale)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),e.rotation!==void 0&&!this.isNearlyZero(e.rotation)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.rotateMatrix(e.rotation)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),(e.translateX!==void 0&&!this.isNearlyZero(e.translateX)||e.translateY!==void 0&&!this.isNearlyZero(e.translateY))&&(n=this.multiplyMatrices(n,this.translateMatrix(e.translateX??0,e.translateY??0))),n}matrixToTransform(e){if(this.isNearlyZero(e.a-1)&&this.isNearlyZero(e.b)&&this.isNearlyZero(e.c)&&this.isNearlyZero(e.d-1)&&this.isNearlyZero(e.e)&&this.isNearlyZero(e.f))return null;let n=this.roundMatrixValue(e.a),r=this.roundMatrixValue(e.b),o=this.roundMatrixValue(e.c),s=this.roundMatrixValue(e.d),a=this.roundMatrixValue(e.e),l=this.roundMatrixValue(e.f);return`matrix(${n} ${r} ${o} ${s} ${a} ${l})`}isNearlyZero(e,t=1e-4){return Math.abs(e)<=t}roundMatrixValue(e,t=6){if(this.isNearlyZero(e))return 0;let n=Math.pow(10,t);return Math.round(e*n)/n}identityMatrix(){return{a:1,b:0,c:0,d:1,e:0,f:0}}multiplyMatrices(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}translateMatrix(e,t){return{a:1,b:0,c:0,d:1,e,f:t}}scaleMatrix(e,t){return{a:e,b:0,c:0,d:t,e:0,f:0}}rotateMatrix(e){let t=e*Math.PI/180,n=Math.cos(t),r=Math.sin(t);return{a:n,b:r,c:-r,d:n,e:0,f:0}}reset(){this.uploadedPatternOptions.set([]),this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null),this.patternTargetsInput.set(""),this.patternDefinitionState.set({})}showErrorDialog(e,t){this.dialogService.showDialog({type:"error",title:e,message:t,buttons:[{label:"Dismiss",action:"confirm",isPrimary:!0}]})}static \u0275fac=function(t){return new(t||i)(Ke(Dn),Ke(Mo))};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};function uie(i,e){if(i&1){let t=Ae();x(0,"div",9)(1,"button",12),W("click",function(){z(t);let r=C(2).$implicit,o=C(2);return V(o.patternState.removePatternFromTargets(r.actionPathIdsCsv))}),U(2,"i",13),x(3,"span"),R(4),S()()()}if(i&2){let t=C(4);T(4),ze(t.labels.removePattern)}}function fie(i,e){i&1&&(x(0,"div",18),U(1,"i",19),S())}function hie(i,e){if(i&1){let t=Ae();x(0,"div",14),W("click",function(){let r=z(t).$implicit,o=C(2).$implicit,s=C(2);return V(s.patternState.applyPatternFromUrl(r.fileUrl,o.actionPathIdsCsv))}),U(1,"img",15),x(2,"div",16)(3,"span",17),R(4),S()(),le(5,fie,2,0,"div",18),S()}if(i&2){let t=e.$implicit,n=C(4);dt("pattern-pick-card--selected",n.patternState.isPatternSelected(t.fileUrl)),T(),q("src",t.thumbnailUrl,fi)("alt",t.name),T(3),ze(t.name),T(),ce(n.patternState.isPatternSelected(t.fileUrl)?5:-1)}}function pie(i,e){if(i&1){let t=Ae();x(0,"div",22)(1,"p",23),U(2,"i",24),R(3," Adjust the transform for the selected pattern. Changes affect every garment area using this pattern. "),S(),x(4,"div",25)(5,"span",26),U(6,"i",27),R(7," Scale "),S(),x(8,"div",28)(9,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=C(),s=C(5);return V(s.patternState.onPatternDefinitionScaleChange(o,r))}),S(),x(10,"span",30),R(11),ki(12,"number"),S()()(),x(13,"div",25)(14,"span",26),U(15,"i",31),R(16," Rotation "),S(),x(17,"div",28)(18,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=C(),s=C(5);return V(s.patternState.onPatternDefinitionRotationChange(o,r))}),S(),x(19,"span",30),R(20),ki(21,"number"),S()()(),x(22,"div",25)(23,"span",26),U(24,"i",32),R(25," Offset X "),S(),x(26,"div",28)(27,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=C(),s=C(5);return V(s.patternState.onPatternDefinitionTranslateXChange(o,r))}),S(),x(28,"span",30),R(29),ki(30,"number"),S()()(),x(31,"div",25)(32,"span",26),U(33,"i",33),R(34," Offset Y "),S(),x(35,"div",28)(36,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=C(),s=C(5);return V(s.patternState.onPatternDefinitionTranslateYChange(o,r))}),S(),x(37,"span",30),R(38),ki(39,"number"),S()()(),x(40,"div",25)(41,"span",26),U(42,"i",34),R(43," Opacity "),S(),x(44,"div",28)(45,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=C(),s=C(5);return V(s.patternState.onPatternDefinitionOpacityChange(o,r))}),S(),x(46,"span",30),R(47),ki(48,"number"),S()()()()}if(i&2){let t=e,n=C(6);T(9),q("min",n.patternState.patternTransformMinScale)("max",n.patternState.patternTransformMaxScale)("step",n.patternState.patternTransformScaleStep)("ngModel",t.scale),T(2),Tt("",qi(12,25,t.scale,"1.2-2"),"\xD7"),T(7),q("min",n.patternState.patternTransformMinRotation)("max",n.patternState.patternTransformMaxRotation)("step",n.patternState.patternTransformRotationStep)("ngModel",t.rotation),T(2),Tt("",qi(21,28,t.rotation,"1.0-1"),"\xB0"),T(7),q("min",n.patternState.patternTransformMinTranslate)("max",n.patternState.patternTransformMaxTranslate)("step",n.patternState.patternTransformTranslateStep)("ngModel",t.translateX),T(2),Tt("",qi(30,31,t.translateX,"1.0-1"),"px"),T(7),q("min",n.patternState.patternTransformMinTranslate)("max",n.patternState.patternTransformMaxTranslate)("step",n.patternState.patternTransformTranslateStep)("ngModel",t.translateY),T(2),Tt("",qi(39,34,t.translateY,"1.0-1"),"px"),T(7),q("min",n.patternState.minPatternOpacity)("max",n.patternState.maxPatternOpacity)("step",n.patternState.patternOpacityStep)("ngModel",t.opacity),T(2),ze(qi(48,37,t.opacity,"1.2-2"))}}function mie(i,e){if(i&1&&le(0,pie,49,40,"div",22),i&2){let t,n=C(5);ce((t=n.patternState.patternDefinitionState()[e])?0:-1,t)}}function gie(i,e){i&1&&(x(0,"div",21),U(1,"i",35),x(2,"p",36),R(3,"No pattern selected"),S(),x(4,"p",37),R(5," Apply a pattern first, then adjust its scale, rotation, move, or opacity here. "),S()())}function vie(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",4)(1,"app-ui-accordion-header")(2,"div",5),U(3,"i",20),x(4,"span",7),R(5,"Transformation"),S()()(),x(6,"app-ui-accordion-content"),le(7,mie,1,1)(8,gie,6,0,"div",21),S()()),i&2){let t,n=C(2).$implicit,r=C(2);q("value",n.id+"-transform"),T(7),ce((t=r.patternState.selectedUploadedPatternId())?7:8,t)}}function bie(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",4)(1,"app-ui-accordion-header")(2,"div",5),U(3,"i",6),x(4,"span",7),R(5),S()()(),x(6,"app-ui-accordion-content")(7,"div",8),le(8,uie,5,1,"div",9),x(9,"div",10),mt(10,hie,6,6,"div",11,sl().trackByFileUrl,!0),S()()()(),le(12,vie,9,2,"app-ui-accordion-panel",4)),i&2){let t=C().$implicit,n=C(2);q("value",t.id),T(5),ze(t.name),T(3),ce(t.actionPathIdsCsv&&n.patternState.hasPatternAppliedToTargets(t.actionPathIdsCsv)?8:-1),T(2),gt(t.pack.dataSources),T(2),ce(t.isTransformationRequired?12:-1)}}function yie(i,e){if(i&1&&le(0,bie,13,4),i&2){let t=e.$implicit;ce(t.type==="Pattern"?0:-1)}}function xie(i,e){if(i&1&&(x(0,"app-ui-accordion",2),mt(1,yie,1,1,null,null,al),S()),i&2){let t=C();q("value",t.firstPatternPanel()),T(),gt(t.items())}}function _ie(i,e){if(i&1){let t=Ae();x(0,"div",9)(1,"button",12),W("click",function(){z(t);let r=C(2).$implicit,o=C(2);return V(o.patternState.removePatternFromTargets(r.actionPathIdsCsv))}),U(2,"i",13),x(3,"span"),R(4),S()()()}if(i&2){let t=C(4);T(4),ze(t.labels.removePattern)}}function Sie(i,e){i&1&&(x(0,"div",18),U(1,"i",19),S())}function Cie(i,e){if(i&1){let t=Ae();x(0,"div",14),W("click",function(){let r=z(t).$implicit,o=C(2).$implicit,s=C(2);return V(s.patternState.applyPatternFromUrl(r.fileUrl,o.actionPathIdsCsv))}),U(1,"img",15),x(2,"div",16)(3,"span",17),R(4),S()(),le(5,Sie,2,0,"div",18),S()}if(i&2){let t=e.$implicit,n=C(4);dt("pattern-pick-card--selected",n.patternState.isPatternSelected(t.fileUrl)),T(),q("src",t.thumbnailUrl,fi)("alt",t.name),T(3),ze(t.name),T(),ce(n.patternState.isPatternSelected(t.fileUrl)?5:-1)}}function wie(i,e){if(i&1&&(x(0,"div",38)(1,"div",39),U(2,"i",40),x(3,"span"),R(4),S()(),x(5,"div",8),le(6,_ie,5,1,"div",9),x(7,"div",10),mt(8,Cie,6,6,"div",11,sl().trackByFileUrl,!0),S()()()),i&2){let t=C().$implicit,n=C(2);T(4),ze(t.name),T(2),ce(t.actionPathIdsCsv&&n.patternState.hasPatternAppliedToTargets(t.actionPathIdsCsv)?6:-1),T(2),gt(t.pack.dataSources)}}function Eie(i,e){if(i&1&&le(0,wie,10,2,"div",38),i&2){let t=e.$implicit;ce(t.type==="Pattern"?0:-1)}}function Mie(i,e){if(i&1&&(x(0,"div",3),mt(1,Eie,1,1,null,null,al),S()),i&2){let t=C();T(),gt(t.items())}}var x_=class i{constructor(e){this.patternState=e}items=_e.required();labels=i4;useAccordion=Me(()=>{let e=this.items()??[];if(e.length===0)return!1;let t=e.some(n=>n.type==="Pattern"&&n.isTransformationRequired);return e.length>1||t});firstPatternPanel=()=>{let e=(this.items()??[]).find(t=>t.type==="Pattern"||t.type==="Overlay");return e?e.id??e.actionPathIdsCsv??null:null};trackByFileUrl(e,t){return t.fileUrl??e}static \u0275fac=function(t){return new(t||i)(Gt(fh))};static \u0275cmp=it({type:i,selectors:[["app-customizer-pattern-panel"]],inputs:{items:[1,"items"]},decls:4,vars:1,consts:[[1,"panel-body"],[1,"pattern-panel"],[1,"w-full",3,"value"],[1,"placement-list"],[3,"value"],[1,"accordion-header-content"],[1,"ri-image-line","accordion-header-icon"],[1,"accordion-header-label"],[1,"pattern-picker-section"],[1,"pattern-picker-toolbar"],[1,"pattern-pick-grid"],[1,"pattern-pick-card",3,"pattern-pick-card--selected"],["type","button",1,"pattern-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"pattern-pick-card",3,"click"],[1,"pattern-pick-card__img",3,"src","alt"],[1,"pattern-pick-card__hover"],[1,"pattern-pick-card__name"],[1,"pattern-pick-card__check"],[1,"ri-check-line"],[1,"ri-settings-3-line","accordion-header-icon"],[1,"transform-empty"],[1,"transform-section"],[1,"transform-hint"],[1,"ri-information-line"],[1,"prop-row"],[1,"prop-label"],[1,"ri-zoom-in-line","prop-icon"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"ri-refresh-line","prop-icon"],[1,"ri-draggable","prop-icon"],[1,"ri-draggable","prop-icon",2,"transform","rotate(90deg)"],[1,"ri-contrast-line","prop-icon"],[1,"ri-image-edit-line","transform-empty__icon"],[1,"transform-empty__title"],[1,"transform-empty__hint"],[1,"placement-section"],[1,"placement-section-header"],[1,"ri-image-line"]],template:function(t,n){t&1&&(x(0,"div",0)(1,"div",1),le(2,xie,3,1,"app-ui-accordion",2)(3,Mie,3,0,"div",3),S()()),t&2&&(T(2),ce(n.useAccordion()?2:3))},dependencies:[Ut,fr,Is,zo,Vi,_i,_r,xr,ea,Wc],styles:['.panel-body[_ngcontent-%COMP%], .pattern-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.pattern-picker-section[_ngcontent-%COMP%]{padding:10px 12px;display:flex;flex-direction:column;gap:10px}.pattern-picker-toolbar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.pattern-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:9999px;border:1px solid #fca5a5;background:#fff1f2;color:#b91c1c;font-weight:600;font-size:11px;cursor:pointer;transition:background .15s,box-shadow .15s,transform .15s}.pattern-remove[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.pattern-remove[_ngcontent-%COMP%]:hover{background:#ffe4e6;box-shadow:0 4px 12px #ef44442e}.pattern-remove[_ngcontent-%COMP%]:active{transform:translateY(0)}.pattern-pick-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pattern-pick-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;background:#f9fafb;cursor:pointer;box-shadow:0 1px 3px #0000000f;transition:border-color .18s,transform .18s,box-shadow .18s}.pattern-pick-card[_ngcontent-%COMP%]:hover{border-color:#6265f1;transform:translateY(-2px) scale(1.02);box-shadow:0 6px 18px #6265f12e}.pattern-pick-card[_ngcontent-%COMP%]:active{transform:scale(.97)}.pattern-pick-card--selected[_ngcontent-%COMP%]{border-color:#6265f1;box-shadow:0 0 0 3px #6265f138}.pattern-pick-card__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.pattern-pick-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgba(17,24,39,.65) 0%,transparent 55%);opacity:0;transition:opacity .2s ease}.pattern-pick-card[_ngcontent-%COMP%]:hover .pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:991px){.pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:.75}.pattern-pick-card[_ngcontent-%COMP%]:hover .pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:1}}.pattern-pick-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5)}.pattern-pick-card__check[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#6265f12e}.pattern-pick-card__check[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#6265f1;color:#fff;font-size:16px;font-weight:700;box-shadow:0 2px 8px #6265f166}.transform-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:10px 12px}.transform-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:5px;font-size:11px;color:#64748b;line-height:1.5;margin:0;font-weight:500}.transform-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:#d1d5db;flex-shrink:0;margin-top:1px}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:28px}.prop-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;flex-shrink:0;width:76px;font-size:11px;font-weight:500;color:#6b7280}.prop-icon[_ngcontent-%COMP%]{font-size:13px;color:#9ca3af}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:42px;text-align:right;font-size:11px;color:#6b7280;font-variant-numeric:tabular-nums}.transform-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 16px;margin:10px 12px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.transform-empty__icon[_ngcontent-%COMP%]{font-size:26px;color:#d1d5db}.transform-empty__title[_ngcontent-%COMP%]{margin:0;font-size:13px;font-weight:700;color:#374151}.transform-empty__hint[_ngcontent-%COMP%]{margin:0;font-size:11px;color:#9ca3af;line-height:1.55}.placement-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#374151;border-left:3px solid #6265f1}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.grid[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:991px){.pattern-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.pattern-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}.prop-label[_ngcontent-%COMP%]{width:62px}.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%], .pattern-picker-section[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var Tie=["*"];function Die(i,e){if(i&1&&kt(0,"i"),i&2){let t=C();ur(t.icon())}}function Aie(i,e){if(i&1&&(ue(0,"span"),R(1),ve()),i&2){let t=C();T(),ze(t.label())}}var ta=class i{label=_e("");text=_e(!1);rounded=_e(!1);disabled=_e(!1);severity=_e("primary");icon=_e("");type=_e("button");onClick=Pt();classes=Me(()=>{let e=["ui-btn"];this.text()?e.push("ui-btn--text"):e.push("ui-btn--filled"),this.rounded()&&e.push("ui-btn--rounded");let t=this.severity();return t==="secondary"?e.push("ui-btn--secondary"):t==="danger"?e.push("ui-btn--danger"):t==="success"?e.push("ui-btn--success"):e.push("ui-btn--primary"),e.join(" ")});emitClick(e){if(this.disabled()){e.preventDefault(),e.stopPropagation();return}this.onClick.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-button"]],inputs:{label:[1,"label"],text:[1,"text"],rounded:[1,"rounded"],disabled:[1,"disabled"],severity:[1,"severity"],icon:[1,"icon"],type:[1,"type"]},outputs:{onClick:"onClick"},ngContentSelectors:Tie,decls:4,vars:6,consts:[[3,"click","type","disabled"],[3,"class"]],template:function(t,n){t&1&&(Mi(),ue(0,"button",0),Ri("click",function(o){return n.emitClick(o)}),le(1,Die,1,2,"i",1),le(2,Aie,2,1,"span"),Ti(3),ve()),t&2&&(ur(n.classes()),kr("type",n.type())("disabled",n.disabled()),T(),ce(n.icon()?1:-1),T(),ce(n.label()?2:-1))},dependencies:[Ut],styles:["[_nghost-%COMP%]{display:inline-flex}.ui-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border-radius:.65rem;border:1px solid transparent;font-size:.8125rem;font-weight:600;line-height:1;padding:.5rem .8rem;cursor:pointer;transition:background-color .2s ease,color .2s ease,border-color .2s ease,transform .12s ease,box-shadow .2s ease}.ui-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.ui-btn--rounded[_ngcontent-%COMP%]{border-radius:9999px;width:2rem;height:2rem;padding:0}.ui-btn--filled.ui-btn--primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 6px 14px rgb(var(--primary-color, 98 101 241) / .25)}.ui-btn--filled.ui-btn--secondary[_ngcontent-%COMP%]{background:rgb(var(--secondary-color, 16 185 129));color:#fff;box-shadow:0 6px 14px rgb(var(--secondary-color, 16 185 129) / .22)}.ui-btn--filled.ui-btn--danger[_ngcontent-%COMP%]{background:#ef4444;color:#fff}.ui-btn--filled.ui-btn--success[_ngcontent-%COMP%]{background:rgb(var(--accent-color, 245 158 11));color:#fff;box-shadow:0 6px 14px rgb(var(--accent-color, 245 158 11) / .22)}.ui-btn--text[_ngcontent-%COMP%]{background:transparent;border-color:transparent}.ui-btn--text.ui-btn--primary[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.ui-btn--text.ui-btn--secondary[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139))}.ui-btn--text.ui-btn--danger[_ngcontent-%COMP%]{color:#ef4444}.ui-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:1px}"],changeDetection:0})};function Iie(i,e){if(i&1&&(ue(0,"span",3),R(1),ve()),i&2){let t=C();T(),ze(t.secondaryLabel())}}var hh=class i{mode=_e("basic");chooseLabel=_e("Choose");secondaryLabel=_e(null);accept=_e("");customUpload=_e(!1);disabled=_e(!1);onSelect=Pt();inputId=`ui-upload-${Math.random().toString(36).slice(2)}`;isDraggingOver=!1;onDragOver(e){this.disabled()||(e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"),this.isDraggingOver=!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1}onDrop(e){if(e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1,this.disabled())return;let t=e.dataTransfer?.files?Array.from(e.dataTransfer.files):[];if(!t.length)return;let n=this.accept(),r=n?t.filter(o=>this._matchesAccept(o,n)):t;r.length&&this.onSelect.emit({files:r,originalEvent:e})}_matchesAccept(e,t){return t.split(",").some(n=>{let r=n.trim();return r.startsWith(".")?e.name.toLowerCase().endsWith(r.toLowerCase()):r.endsWith("/*")?e.type.startsWith(r.slice(0,-1)):e.type===r})}handleSelection(e){let t=e.target,n=t?.files?Array.from(t.files):[];n.length&&(this.onSelect.emit({files:n,originalEvent:e}),t&&(t.value=""))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-fileupload"]],inputs:{mode:[1,"mode"],chooseLabel:[1,"chooseLabel"],secondaryLabel:[1,"secondaryLabel"],accept:[1,"accept"],customUpload:[1,"customUpload"],disabled:[1,"disabled"]},outputs:{onSelect:"onSelect"},decls:6,vars:10,consts:[[1,"bg-upload-zone",3,"dragover","dragleave","drop"],[1,"ri-upload-cloud-2-line","bg-upload-icon"],[1,"bg-upload-text"],[1,"bg-upload-hint"],["type","file",1,"sr-only",3,"change","id","accept","disabled"]],template:function(t,n){t&1&&(ue(0,"label",0),Ri("dragover",function(o){return n.onDragOver(o)})("dragleave",function(o){return n.onDragLeave(o)})("drop",function(o){return n.onDrop(o)}),kt(1,"i",1),ue(2,"span",2),R(3),ve(),le(4,Iie,2,1,"span",3),ue(5,"input",4),Ri("change",function(o){return n.handleSelection(o)}),ve()()),t&2&&(dt("ui-fileupload--disabled",n.disabled())("drag-over",n.isDraggingOver),fn("for",n.inputId),T(3),Tt(" ",n.isDraggingOver?"Drop files here":n.chooseLabel()," "),T(),ce(n.secondaryLabel()&&!n.isDraggingOver?4:-1),T(),kr("id",n.inputId)("accept",n.accept())("disabled",n.disabled()))},dependencies:[Ut],styles:["[_nghost-%COMP%]{display:inline-flex}.bg-upload-zone[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:14px 12px;border:1px dashed rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color-secondary, 71 85 105));border-radius:10px;cursor:pointer;text-align:center;transition:border-color .18s,background .18s,transform .18s,box-shadow .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover{border-color:rgb(var(--secondary-color, 16 185 129));color:rgb(var(--secondary-color, 16 185 129));background:rgb(var(--secondary-color, 16 185 129) / .08)}.bg-upload-zone.drag-over[_ngcontent-%COMP%]{border-color:rgb(var(--secondary-color, 16 185 129));border-style:dashed;border-width:2px;background:rgb(var(--secondary-color, 16 185 129) / .12);color:rgb(var(--secondary-color, 16 185 129));transform:scale(1.015);box-shadow:0 0 0 3px rgb(var(--secondary-color, 16 185 129) / .18)}.bg-upload-icon[_ngcontent-%COMP%]{font-size:24px;color:rgb(var(--text-color-secondary, 71 85 105));transition:color .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover .bg-upload-icon[_ngcontent-%COMP%]{color:rgb(var(--secondary-color, 16 185 129))}.bg-upload-text[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#111827}.bg-upload-hint[_ngcontent-%COMP%]{font-size:11px;color:#64748b}.ui-fileupload--disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.55}"]})};function Pie(i,e){if(i&1&&(x(0,"p",5),R(1),S()),i&2){let t=C(2);T(),ze(t.message())}}function Oie(i,e){if(i&1&&(x(0,"div",1)(1,"div",2),U(2,"div",3),Bo(3,Pie,2,1,"p",4),S()()),i&2){let t=C();fn("aria-busy",!0),T(3),q("ngIf",t.message())}}var ph=class i{show=_e(!1);message=_e(null);static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-loader"]],inputs:{show:[1,"show"],message:[1,"message"]},decls:1,vars:1,consts:[["class","loader-overlay",4,"ngIf"],[1,"loader-overlay"],[1,"loader-container"],[1,"spinner"],["class","loader-message",4,"ngIf"],[1,"loader-message"]],template:function(t,n){t&1&&Bo(0,Oie,4,2,"div",0),t&2&&q("ngIf",n.show())},dependencies:[Ut,$w],styles:[".loader-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0006;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.loader-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;background-color:#fff;padding:2rem;border-radius:12px;box-shadow:0 8px 32px #0003}.spinner[_ngcontent-%COMP%]{width:48px;height:48px;border:4px solid #f0f0f0;border-top:4px solid #3498db;border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}.loader-message[_ngcontent-%COMP%]{margin:0;font-size:14px;color:#333;font-weight:500;text-align:center}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none;border-top-color:#3498db}}"],changeDetection:0})};var Jd=(t=>(t.LOGO="Logo",t.BACKGROUND="Background",t))(Jd||{}),Qm={rename:{title:"Rename File",placeholder:"Enter new filename"},delete:{title:"Delete File",message:i=>`Are you sure you want to delete "${i}"?`,confirmText:"Delete"}},eg={rename:{success:i=>`"${i}" renamed successfully`,successTitle:"Rename Successful"},delete:{success:i=>`"${i}" deleted successfully`,successTitle:"Delete Successful"}};var GD;(t=>{let i;(a=>(a.ArrayBuffer="arraybuffer",a.Blob="blob",a.JSON="json",a.Text="text"))(i=t.ResponseType||={});let e;(o=>(o.Body="body",o.Response="response"))(e=t.Observe||={})})(GD||={});var na=class i{http=Z(Fv);toasterService=Z(Fr);environment=Z(Uv);request(e,t={}){let h=e,{method:n,params:r,url:o}=h,s=nn(h,["method","params","url"]),{observe:a=GD.Observe.Body,skipHandleError:l,httpParamEncoder:c,loader:d}=t,u=this.removeDuplicateSlashes(`${t.apiName}${o}`),f=k({observe:a},s);return r&&(f.params=this.getParams(r,c)),f.headers=this.addLoaderHeader(d,f.headers),f.headers=this.addskipHandleError(l,f.headers),this.http.request(n,u,f).pipe(E1(p=>{p?.succeeded==!1&&!l&&this.handleError(p)}),bc(p=>l?hs():Ya(()=>p)))}get(e,t={},n,r={}){return this.request({method:"GET",url:e,params:t,headers:n},k({apiName:this.environment.apiUrl,loader:!0},r))}post(e,t,n,r={}){return this.request({method:"POST",url:e,body:t,headers:n},k({apiName:this.environment.apiUrl},r))}put(e,t,n,r={}){return this.request({method:"PUT",url:e,body:t,headers:n},k({apiName:this.environment.apiUrl},r))}delete(e,t,n={}){return this.request({method:"DELETE",url:e,headers:t},k({apiName:this.environment.apiUrl},n))}getParams(e,t){let n=Object.entries(e).reduce((r,[o,s])=>(this.isUndefinedOrEmptyString(s)||s===null||(r[o]=s),r),{});return t?new ho({encoder:t,fromObject:n}):new ho({fromObject:n})}addLoaderHeader(e,t){let n=new po;return t&&Object.keys(t).forEach(r=>{n=n.set(r,t[r])}),e&&(n=n.set("Loader","true")),n}addskipHandleError(e,t){return t=t||new po,e&&(t=t.set("skipHandleError","true")),t}removeDuplicateSlashes(e){return e.replace(/([^:]\/)\/+/g,"$1")}handleError(e){return this.toasterService.showError(Lv(e)),Ya(()=>e)}isUndefinedOrEmptyString(e){return e===void 0||e===""||e===null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var __=class i{api=Z(na);apiEndpoint="user-media-library";getLibraryItems(e,t,n,r=1,o=10,s,a,l){let c={userUniqueId:e,pageNumber:r,pageSize:o};return n&&(c.mediaType=n),s&&(c.searchTerm=s),a&&(c.sortBy=a),l!==void 0&&(c.isAscending=l),this.api.get(this.apiEndpoint,c,{"X-API-Key":t},{loader:!1})}renameItem(e,t,n){let r={newFileName:t};return this.api.put(`${this.apiEndpoint}/${e}/rename`,r,{"X-API-Key":n},{loader:!1})}deleteItem(e,t){return this.api.delete(`${this.apiEndpoint}/${e}`,{"X-API-Key":t},{loader:!1})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};function s4(i){i||(i=Z(ui));let e=new xn(t=>{if(i.destroyed){t.next();return}return i.onDestroy(t.next.bind(t))});return t=>t.pipe(w1(e))}var a4=(i,e)=>e.id;function Rie(i,e){i&1&&(x(0,"div",3),U(1,"div",8),x(2,"p",9),R(3,"Loading your uploads\u2026"),S()())}function kie(i,e){i&1&&(x(0,"div",4),U(1,"i",10),x(2,"p"),R(3,"No uploads found"),S()())}function Fie(i,e){if(i&1){let t=Ae();x(0,"div",13),W("click",function(){let r=z(t).$implicit,o=C(2);return V(o.onSelectItem(r))}),x(1,"div",14),U(2,"img",15),x(3,"div",16)(4,"span",17),U(5,"i",18),S()(),x(6,"div",19)(7,"button",20),W("click",function(r){let o=z(t).$implicit,s=C(2);return V(s.onRenameClick(r,o))}),U(8,"i",21),S(),x(9,"button",22),W("click",function(r){let o=z(t).$implicit,s=C(2);return V(s.onDeleteClick(r,o))}),U(10,"i",23),S()()()()}if(i&2){let t=e.$implicit;q("title",t.originalFileName||t.blobName),T(2),q("src",t.blobUri,fi)("alt",t.originalFileName||t.blobName)}}function Nie(i,e){if(i&1){let t=Ae();x(0,"div",24),W("click",function(){z(t);let r=C(2);return V(r.onViewAll())}),x(1,"div",25),U(2,"i",26),x(3,"p",27),R(4),S()()()}if(i&2){let t=C(2);T(4),Tt("+",t.totalCount()-t.previewPageSize()," More")}}function Lie(i,e){if(i&1&&(x(0,"div",5),mt(1,Fie,11,3,"div",11,a4),le(3,Nie,5,1,"div",12),S()),i&2){let t=C();T(),gt(t.items().slice(0,t.previewPageSize())),T(2),ce(t.totalCount()>t.previewPageSize()?3:-1)}}function Uie(i,e){if(i&1&&(x(0,"p",35),R(1),S()),i&2){let t=C(2);T(),pp(" ",t.totalCount()," item",t.totalCount()!==1?"s":""," available ")}}function Bie(i,e){if(i&1){let t=Ae();x(0,"button",51),W("click",function(){z(t);let r=C(2);return V(r.onSearchChange(""))}),U(1,"i",52),S()}}function zie(i,e){if(i&1&&(x(0,"option",48),R(1),S()),i&2){let t=e.$implicit;q("value",t.label),T(),Tt(" ",t.label," ")}}function Vie(i,e){i&1&&(x(0,"div",3),U(1,"div",8),x(2,"p"),R(3,"Loading your uploads\u2026"),S()())}function Hie(i,e){if(i&1){let t=Ae();U(0,"i",53),x(1,"p",54),R(2),S(),x(3,"p",55),R(4,"Try a different search term or clear filters"),S(),x(5,"button",56),W("click",function(){z(t);let r=C(3);return V(r.onSearchChange(""))}),U(6,"i",57),R(7," Clear Search "),S()}if(i&2){let t=C(3);T(2),Tt('No results for "',t.searchTerm(),'"')}}function Gie(i,e){if(i&1&&(U(0,"i",58),x(1,"p",54),R(2),S(),x(3,"p",55),R(4,"Upload files to see them here"),S()),i&2){let t=C(3);T(2),Tt("No ",t.mediaType().toLowerCase()," uploads yet")}}function jie(i,e){if(i&1&&(x(0,"div",4),le(1,Hie,8,1)(2,Gie,5,1),S()),i&2){let t=C(2);T(),ce(t.searchTerm()?1:2)}}function Wie(i,e){if(i&1){let t=Ae();x(0,"div",62),W("click",function(){let r=z(t).$implicit,o=C(3);return V(o.onSelectItem(r))}),x(1,"div",63),U(2,"img",64),x(3,"div",65)(4,"span",66),U(5,"i",18),R(6," Use"),S()(),x(7,"div",67)(8,"button",68),W("click",function(r){let o=z(t).$implicit,s=C(3);return V(s.onRenameClick(r,o))}),U(9,"i",21),S(),x(10,"button",69),W("click",function(r){let o=z(t).$implicit,s=C(3);return V(s.onDeleteClick(r,o))}),U(11,"i",23),S()()(),x(12,"div",70)(13,"p",71),R(14),S(),x(15,"p",72),R(16),S()()()}if(i&2){let t=e.$implicit,n=C(3);q("title",t.originalFileName||t.blobName),T(2),q("src",t.blobUri,fi)("alt",t.originalFileName||t.blobName),T(11),q("title",t.originalFileName||t.blobName),T(),Tt(" ",t.originalFileName||t.blobName," "),T(2),ze(n.formatDate(t.uploadedOn))}}function $ie(i,e){if(i&1&&(x(0,"div",61),U(1,"i",73),R(2),S()),i&2){let t=C(3);T(2),cv(" Showing ",(t.currentPage()-1)*t.itemsPerPage()+1,"\u2013",t.Math.min(t.currentPage()*t.itemsPerPage(),t.totalCount())," of ",t.totalCount()," item",t.totalCount()!==1?"s":""," ")}}function Yie(i,e){if(i&1&&(x(0,"div",59),mt(1,Wie,17,6,"div",60,a4),S(),le(3,$ie,3,4,"div",61)),i&2){let t=C(2);T(),gt(t.items()),T(2),ce(t.items().length>0?3:-1)}}function Xie(i,e){if(i&1){let t=Ae();x(0,"button",81),W("click",function(){let r=z(t).$implicit,o=C(3);return V(o.goToPage(r))}),R(1),S()}if(i&2){let t=e.$implicit,n=C(3);dt("active",t===n.currentPage()),fn("aria-label","Go to page "+t)("title",t===n.currentPage()?"Current page":""),T(),Tt(" ",t," ")}}function qie(i,e){if(i&1){let t=Ae();x(0,"div",50)(1,"span",74),R(2),S(),x(3,"div",75)(4,"button",76),W("click",function(){z(t);let r=C(2);return V(r.previousPage())}),U(5,"i",77),S(),mt(6,Xie,2,5,"button",78,fp),x(8,"button",79),W("click",function(){z(t);let r=C(2);return V(r.nextPage())}),U(9,"i",80),S()()()}if(i&2){let t=C(2);T(2),pp(" Page ",t.currentPage()," of ",t.totalPages()," "),T(2),q("disabled",t.currentPage()===1),T(2),gt(t.pageNumbers()),T(2),q("disabled",t.currentPage()===t.totalPages())}}function Kie(i,e){if(i&1){let t=Ae();x(0,"div",28),W("click",function(){z(t);let r=C();return V(r.onBackdropClick())}),x(1,"div",29),W("click",function(r){return r.stopPropagation()}),x(2,"div",30)(3,"div",31)(4,"span",32),U(5,"i",33),S(),x(6,"div")(7,"h2",34),R(8),S(),le(9,Uie,2,2,"p",35),S()(),x(10,"button",36),W("click",function(){z(t);let r=C();return V(r.onClose())}),U(11,"i",37),S()(),x(12,"div",38)(13,"div",39)(14,"div",40),U(15,"i",41),x(16,"input",42),W("input",function(r){z(t);let o=C();return V(o.onSearchChange(r.target.value))}),S(),le(17,Bie,2,0,"button",43),S()(),x(18,"div",44)(19,"label",45),U(20,"i",46),R(21," Sort "),S(),x(22,"select",47,0),W("change",function(){z(t);let r=dr(23),o=C();return V(o.onSortChange(r.value))}),mt(24,zie,2,2,"option",48,al),S()()(),x(26,"div",49),le(27,Vie,4,0,"div",3)(28,jie,3,1,"div",4)(29,Yie,4,1),S(),le(30,qie,10,4,"div",50),S()()}if(i&2){let t=C();T(8),Tt("Your ",t.mediaType()," Library"),T(),ce(!t.loading()&&t.totalCount()>0?9:-1),T(7),q("value",t.searchTerm()),T(),ce(t.searchTerm()?17:-1),T(5),q("value",t.selectedSort().label),T(2),gt(t.sortOptions),T(3),ce(t.loading()?27:t.items().length===0?28:29),T(3),ce(!t.loading()&&t.totalCount()>t.itemsPerPage()?30:-1)}}function Zie(i,e){i&1&&U(0,"i",93)}function Jie(i,e){if(i&1){let t=Ae();x(0,"div",82),W("click",function(){z(t);let r=C();return V(r.closeRenameModal())}),x(1,"div",83),W("click",function(r){return r.stopPropagation()}),x(2,"div",84)(3,"h3"),R(4),S(),x(5,"button",85),W("click",function(){z(t);let r=C();return V(r.closeRenameModal())}),U(6,"i",37),S()(),x(7,"div",86)(8,"div",87)(9,"label",88),R(10,"New filename:"),S(),x(11,"input",89,1),W("ngModelChange",function(r){z(t);let o=C();return V(o.setRenameValue(r))})("keyup.enter",function(){z(t);let r=C();return V(r.confirmRename())})("keyup.escape",function(){z(t);let r=C();return V(r.closeRenameModal())}),S()()(),x(13,"div",90)(14,"button",91),W("click",function(){z(t);let r=C();return V(r.closeRenameModal())}),R(15," Cancel "),S(),x(16,"button",92),W("click",function(){z(t);let r=C();return V(r.confirmRename())}),le(17,Zie,1,0,"i",93),R(18," Rename "),S()()()()}if(i&2){let t,n=C();T(4),ze(n.MEDIA_LIBRARY_DIALOGS.rename.title),T(7),q("ngModel",n.renameValue())("placeholder",n.MEDIA_LIBRARY_DIALOGS.rename.placeholder)("disabled",n.renamingItemId()!==null),T(3),q("disabled",n.renamingItemId()!==null),T(2),q("disabled",!n.renameValue().trim()||n.renameValue().trim()===((t=n.selectedItemForAction())==null?null:t.originalFileName)||n.renamingItemId()!==null),T(),ce(n.renamingItemId()?17:-1)}}var mh=class i{MediaLibraryType=Jd;MEDIA_LIBRARY_DIALOGS=Qm;mediaType=_e.required();userUniqueId=_e.required();apiKey=_e.required();previewPageSize=F(4);modalPageSize=F(10);itemsPerPage=F(4);itemSelected=Pt();items=F([]);loading=F(!1);totalCount=F(0);currentPage=F(1);searchTerm=F("");isModalOpen=F(!1);showRenameModal=F(!1);selectedItemForAction=F(null);renameValue=F("");renamingItemId=F(null);mediaService=Z(__);toaster=Z(Fr);dialogService=Z(Mo);destroyRef=Z(ui);searchTimeout;sortOptions=[{label:"Newest First",field:"CreatedOn",isAscending:!1},{label:"Oldest First",field:"CreatedOn",isAscending:!0},{label:"Name (A-Z)",field:"BlobName",isAscending:!0},{label:"Name (Z-A)",field:"BlobName",isAscending:!1}];selectedSort=F(this.sortOptions[0]);sortBy=F("CreatedOn");isAscending=F(!1);Math=Math;totalPages=Me(()=>Math.max(1,Math.ceil(this.totalCount()/this.itemsPerPage())));startIndex=Me(()=>(this.currentPage()-1)*this.itemsPerPage());endIndex=Me(()=>Math.min(this.currentPage()*this.itemsPerPage(),this.totalCount()));pageNumbers=Me(()=>{let e=this.totalPages(),t=this.currentPage(),n=5,r=[],o=Math.max(1,t-Math.floor(n/2)),s=Math.min(e,o+n-1);s-o+1<n&&(o=Math.max(1,s-n+1));for(let a=o;a<=s;a++)r.push(a);return r});constructor(){Yt(()=>{let e=this.userUniqueId(),t=this.apiKey(),n=this.selectedSort();!e||!t||hn(()=>{this.sortBy.set(n.field),this.isAscending.set(n.isAscending),this.fetchItems(1)})})}fetchItems(e){let t=this.userUniqueId(),n=this.apiKey(),r=this.mediaType();if(!t||!n)return;this.loading.set(!0);let o=this.sortBy(),s=this.isAscending();this.mediaService.getLibraryItems(t,n,r,e,this.itemsPerPage(),this.searchTerm()||void 0,o||void 0,s).pipe(s4(this.destroyRef)).subscribe({next:a=>{this.items.set(a.data||[]),this.totalCount.set(a.totalCount||0),this.currentPage.set(e),this.loading.set(!1)},error:()=>{this.loading.set(!1),this.items.set([])}})}onSelectItem(e){this.itemSelected.emit(e)}onRenameClick(e,t){e.stopPropagation(),this.selectedItemForAction.set(t),this.renameValue.set(t.originalFileName??t.blobName??""),this.showRenameModal.set(!0)}onDeleteClick(e,t){e.stopPropagation();let n=(t.originalFileName||t.blobName||"file").trim();this.dialogService.showDialog({type:"warning",title:Qm.delete.title,message:Qm.delete.message(n),buttons:[{label:"Cancel",action:"cancel"},{label:Qm.delete.confirmText,action:"confirm",isDestructive:!0}]}).then(r=>{r.action==="confirm"&&this.performDelete(t)})}closeRenameModal(){this.showRenameModal.set(!1),this.selectedItemForAction.set(null),this.renameValue.set("")}confirmRename(){let e=this.selectedItemForAction(),t=this.renameValue().trim();!e||!t||t===e.originalFileName||(this.renamingItemId.set(e.id),this.mediaService.renameItem(e.id,t,this.apiKey()).subscribe({next:n=>{n.isSuccess?(this.closeRenameModal(),this.fetchItems(this.currentPage()),this.renamingItemId.set(null),this.toaster.showSuccess(eg.rename.success(t),eg.rename.successTitle)):this.renamingItemId.set(null)},error:n=>{this.renamingItemId.set(null)}}))}confirmDelete(){let e=this.selectedItemForAction();e&&this.performDelete(e)}performDelete(e){this.mediaService.deleteItem(e.id,this.apiKey()).subscribe({next:t=>{if(t.isSuccess){this.fetchItems(this.currentPage());let n=(e.originalFileName||e.blobName||"file").trim();this.toaster.showSuccess(eg.delete.success(n),eg.delete.successTitle)}}})}onClose(){this.currentPage.set(1),this.searchTerm.set(""),this.itemsPerPage.set(this.previewPageSize()),this.isModalOpen.set(!1),this.fetchItems(1)}onBackdropClick(){this.onClose()}nextPage(){this.currentPage()<this.totalPages()&&this.fetchItems(this.currentPage()+1)}previousPage(){this.currentPage()>1&&this.fetchItems(this.currentPage()-1)}goToPage(e){e>=1&&e<=this.totalPages()&&this.fetchItems(e)}onSearchChange(e){this.searchTerm.set(e),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.fetchItems(1)},300)}onSortChange(e){let t=this.sortOptions.find(n=>n.label===e);this.selectedSort.set(t)}formatDate(e){return e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"2-digit"}):""}setRenameValue(e){this.renameValue.set(e)}onViewAll(){this.isModalOpen.set(!0),this.itemsPerPage.set(this.modalPageSize()),this.fetchItems(1)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-media-library-items"]],inputs:{mediaType:[1,"mediaType"],userUniqueId:[1,"userUniqueId"],apiKey:[1,"apiKey"]},outputs:{itemSelected:"itemSelected"},decls:6,vars:5,consts:[["sortSelect",""],["renameInput",""],[1,"media-library-items","preview-mode"],[1,"loading-state"],[1,"empty-state"],[1,"preview-grid"],[1,"modal-overlay"],[1,"modal-overlay","rename-overlay"],[1,"spinner"],[1,"loading-text"],[1,"ri-image-line","empty-icon"],[1,"preview-item",3,"title"],[1,"more-card"],[1,"preview-item",3,"click","title"],[1,"preview-image-wrap"],[1,"preview-image",3,"src","alt"],[1,"preview-overlay","md:hidden"],[1,"preview-use-badge"],[1,"ri-check-line"],[1,"preview-actions"],["appTooltip","Rename","aria-label","Rename item",1,"preview-action-btn","rename-btn",3,"click"],[1,"ri-edit-line"],["appTooltip","Delete","aria-label","Delete item",1,"preview-action-btn","delete-btn",3,"click"],[1,"ri-delete-bin-line"],[1,"more-card",3,"click"],[1,"more-content"],[1,"ri-add-circle-line","more-icon"],[1,"more-count"],[1,"modal-overlay",3,"click"],[1,"modal-container",3,"click"],[1,"modal-header"],[1,"modal-header-left"],[1,"modal-icon"],[1,"ri-image-gallery-line"],[1,"modal-title"],[1,"modal-subtitle"],["aria-label","Close modal",1,"modal-close-btn",3,"click"],[1,"ri-close-line"],[1,"controls-bar"],[1,"search-wrapper"],[1,"search-container"],[1,"ri-search-line","search-icon"],["type","text","placeholder","Search by filename...","aria-label","Search media library",1,"search-input",3,"input","value"],["aria-label","Clear search","appTooltip","Clear search",1,"clear-search-btn"],[1,"sort-wrapper"],["for","sort-select",1,"sort-label"],[1,"ri-sort-asc"],["id","sort-select",1,"sort-select",3,"change","value"],[3,"value"],[1,"modal-content"],[1,"modal-footer"],["aria-label","Clear search","appTooltip","Clear search",1,"clear-search-btn",3,"click"],[1,"ri-close-circle-line"],[1,"ri-search-eye-line","empty-icon"],[1,"empty-title"],[1,"empty-sub"],[1,"empty-action-btn",3,"click"],[1,"ri-refresh-line"],[1,"ri-image-add-line","empty-icon"],[1,"items-grid"],[1,"item-card",3,"title"],[1,"results-footer-info"],[1,"item-card",3,"click","title"],[1,"thumb-wrap"],[1,"thumb-img",3,"src","alt"],[1,"thumb-overlay"],[1,"use-badge"],[1,"item-actions"],["appTooltip","Rename","aria-label","Rename item",1,"action-btn","rename-btn",3,"click"],["appTooltip","Delete","aria-label","Delete item",1,"action-btn","delete-btn",3,"click"],[1,"item-meta"],[1,"item-name",3,"title"],[1,"item-date"],[1,"ri-check-double-line"],[1,"pagination-info"],[1,"pagination-controls"],["aria-label","Previous page","appTooltip","Previous page (\u2B05)",1,"page-nav-btn",3,"click","disabled"],[1,"ri-arrow-left-s-line"],[1,"page-num-btn",3,"active"],["aria-label","Next page","appTooltip","Next page (\u27A1)",1,"page-nav-btn",3,"click","disabled"],[1,"ri-arrow-right-s-line"],[1,"page-num-btn",3,"click"],[1,"modal-overlay","rename-overlay",3,"click"],[1,"action-modal",3,"click"],[1,"modal-header-small"],["aria-label","Close",1,"close-btn",3,"click"],[1,"modal-body"],[1,"form-group"],["for","rename-input"],["id","rename-input","type","text","autofocus","",1,"rename-input",3,"ngModelChange","keyup.enter","keyup.escape","ngModel","placeholder","disabled"],[1,"modal-footer-actions"],[1,"btn-cancel",3,"click","disabled"],[1,"btn-confirm",3,"click","disabled"],[1,"ri-loader-4-line","spinner"]],template:function(t,n){t&1&&(x(0,"div",2),le(1,Rie,4,0,"div",3),le(2,kie,4,0,"div",4),le(3,Lie,4,1,"div",5),S(),le(4,Kie,31,7,"div",6),le(5,Jie,19,7,"div",7)),t&2&&(T(),ce(n.loading()?1:-1),T(),ce(!n.loading()&&n.items().length===0?2:-1),T(),ce(!n.loading()&&n.items().length>0?3:-1),T(),ce(n.isModalOpen()?4:-1),T(),ce(n.showRenameModal()?5:-1))},dependencies:[Ut,fr,Wv,$v,hl,Is,zo,bi],styles:[`.preview-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:6px 0}.preview-item[_ngcontent-%COMP%]{cursor:pointer;transition:transform .15s,filter .15s}.preview-item[_ngcontent-%COMP%]:hover{transform:scale(1.02)}.preview-image-wrap[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:1;background:#f5f5f8;border-radius:8px;overflow:hidden;border:1.5px solid #e5e7eb;transition:border-color .2s,box-shadow .2s,background .2s}.preview-item[_ngcontent-%COMP%]:hover .preview-image-wrap[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px rgba(var(--primary-color, 98 101 241),.18);background:#fafbfc}.preview-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block;transition:transform .2s}.preview-item[_ngcontent-%COMP%]:hover .preview-image[_ngcontent-%COMP%]{transform:scale(1.05)}.preview-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background:#fff0;display:flex;align-items:center;justify-content:start;opacity:0;transition:opacity .2s,background .2s}.preview-item[_ngcontent-%COMP%]:hover .preview-overlay[_ngcontent-%COMP%]{opacity:1;background:#00000014}.preview-use-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin-left:6px;background:rgb(var(--primary-color, 98 101 241));color:#fff;border-radius:50%;font-size:16px;font-weight:700;box-shadow:0 2px 8px rgba(var(--primary-color, 98 101 241),.3)}.preview-actions[_ngcontent-%COMP%]{--preview-action-size: 28px;position:absolute;top:5px;right:5px;display:flex;flex-direction:column;gap:4px;opacity:0;transform:scale(.8) translate(4px);transition:opacity .15s,transform .15s;pointer-events:none}.preview-item[_ngcontent-%COMP%]:hover .preview-actions[_ngcontent-%COMP%]{opacity:1;transform:scale(1) translate(0);pointer-events:auto}.preview-item[_ngcontent-%COMP%]:focus-within .preview-actions[_ngcontent-%COMP%]{opacity:1;transform:scale(1) translate(0);pointer-events:auto}.preview-action-btn[_ngcontent-%COMP%]{width:var(--preview-action-size);height:var(--preview-action-size);padding:0;border:none;border-radius:50%;background:#fffffff2;color:#111827;font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .12s;font-weight:500;box-shadow:0 2px 8px #00000026}.preview-action-btn[_ngcontent-%COMP%]:hover{transform:scale(1.12);box-shadow:0 3px 12px #00000040}.preview-action-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:2px}.preview-action-btn.rename-btn[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff}.preview-action-btn.delete-btn[_ngcontent-%COMP%]{background:#ef4444;color:#fff}.more-card[_ngcontent-%COMP%]{cursor:pointer;transition:transform .15s,filter .15s}.more-card[_ngcontent-%COMP%]:hover{transform:scale(1.02)}.more-content[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:1;background:linear-gradient(135deg,rgba(var(--primary-color, 98 101 241),.08),rgba(var(--secondary-color, 16 185 129),.08));border:1.5px solid rgba(var(--primary-color, 98 101 241),.2);border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;transition:border-color .15s,background .15s,box-shadow .15s}.more-card[_ngcontent-%COMP%]:hover .more-content[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));background:linear-gradient(135deg,rgba(var(--primary-color, 98 101 241),.12),rgba(var(--secondary-color, 16 185 129),.12));box-shadow:0 4px 12px rgba(var(--primary-color, 98 101 241),.15)}.more-icon[_ngcontent-%COMP%]{font-size:28px;color:rgb(var(--primary-color, 98 101 241));font-weight:700}.more-count[_ngcontent-%COMP%]{margin:0;font-size:13px;font-weight:600;color:rgb(var(--primary-color, 98 101 241));text-align:center;line-height:1.2}@media(max-width:768px){.preview-use-badge[_ngcontent-%COMP%]{display:none!important}.preview-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.preview-actions[_ngcontent-%COMP%]{opacity:1;transform:none;pointer-events:auto;top:auto;right:4px;bottom:4px;flex-direction:row;gap:4px;padding:3px;border-radius:999px;background:#11182785;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.preview-action-btn[_ngcontent-%COMP%]{--preview-action-size: 24px;font-size:12px;box-shadow:none;border:1px solid rgba(255,255,255,.2)}}@media(max-width:480px){.preview-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px 0}.preview-actions[_ngcontent-%COMP%]{right:3px;bottom:3px;gap:3px;padding:2px}.preview-action-btn[_ngcontent-%COMP%]{--preview-action-size: 22px;font-size:11px}.preview-use-badge[_ngcontent-%COMP%]{display:none!important}}.modal-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f0f19a6;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}.modal-container[_ngcontent-%COMP%]{background:#fff;border-radius:16px;width:100%;max-width:960px;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 24px 64px #00000038;animation:_ngcontent-%COMP%_modalIn .22s cubic-bezier(.34,1.26,.64,1)}@keyframes _ngcontent-%COMP%_modalIn{0%{opacity:0;transform:scale(.95) translateY(12px)}to{opacity:1;transform:scale(1) translateY(0)}}.modal-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #f0f0f5;gap:12px}.modal-header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.modal-icon[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:10px;background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));display:flex;align-items:center;justify-content:center;color:#fff;font-size:20px;flex-shrink:0}.modal-title[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700;color:#111827;line-height:1.2}.modal-subtitle[_ngcontent-%COMP%]{margin:2px 0 0;font-size:12px;color:#9ca3af}.modal-close-btn[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:8px;border:1.5px solid #e5e7eb;background:#fff;color:#6b7280;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s,border-color .15s;flex-shrink:0}.modal-close-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#111827;border-color:#d1d5db}.controls-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 24px;border-bottom:1px solid #f0f0f5;background:#fafbfc}.search-container[_ngcontent-%COMP%]{flex:1;position:relative;min-width:0}.search-icon[_ngcontent-%COMP%]{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#d1d5db;font-size:16px;pointer-events:none}.search-input[_ngcontent-%COMP%]{width:100%;height:36px;border:1.5px solid #e5e7eb;border-radius:8px;padding:0 36px 0 32px;font-size:13px;background:#fff;color:#111827;transition:border-color .15s}.search-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgba(var(--primary-color, 98 101 241),.05)}.clear-search-btn[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:none;background:transparent;color:#9ca3af;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color .15s}.clear-search-btn[_ngcontent-%COMP%]:hover{color:#6b7280}.sort-container[_ngcontent-%COMP%]{flex-shrink:0}.sort-select[_ngcontent-%COMP%]{height:36px;padding:0 28px 0 12px;border:1.5px solid #e5e7eb;border-radius:8px;background:#fff;color:#111827;font-size:13px;font-weight:500;cursor:pointer;transition:border-color .15s;appearance:none;background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 8px center;background-size:20px}.sort-select[_ngcontent-%COMP%]:focus{outline:none;border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgba(var(--primary-color, 98 101 241),.05)}.sort-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{background:#fff;color:#111827;padding:8px}.modal-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:20px 24px;scrollbar-width:thin;scrollbar-color:#e5e7eb transparent}.modal-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.modal-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:99px}.loading-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:14px;color:#9ca3af;font-size:14px}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.spinner[_ngcontent-%COMP%]{width:15px;height:15px;border:3px solid #f0f0f5;border-top-color:rgb(var(--primary-color, 98 101 241));border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:10px}.empty-icon[_ngcontent-%COMP%]{font-size:52px;color:#d1d5db}.empty-title[_ngcontent-%COMP%]{margin:0;font-size:15px;font-weight:600;color:#374151}.empty-sub[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#9ca3af}.items-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(138px,158px));gap:10px}.item-card[_ngcontent-%COMP%]{max-width:158px;border:1.5px solid #e5e7eb;border-radius:12px;overflow:hidden;cursor:pointer;display:flex;flex-direction:column;transition:border-color .2s,box-shadow .2s,transform .18s;background:#fff}.item-card[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 8px 24px rgba(var(--primary-color, 98 101 241),.2);transform:translateY(-3px)}.thumb-wrap[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:1;background:#f5f5f8;overflow:hidden}.thumb-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block;transition:transform .25s}.item-card[_ngcontent-%COMP%]:hover .thumb-img[_ngcontent-%COMP%]{transform:scale(1.06)}.thumb-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background:#fff0;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s}.item-card[_ngcontent-%COMP%]:hover .thumb-overlay[_ngcontent-%COMP%]{opacity:1}.use-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;background:#fff;color:rgb(var(--primary-color, 98 101 241));font-size:12px;font-weight:700;padding:7px 14px;border-radius:8px;pointer-events:none}.item-meta[_ngcontent-%COMP%]{padding:9px 11px 10px}.item-name[_ngcontent-%COMP%]{margin:0;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#374151}.item-date[_ngcontent-%COMP%]{margin:3px 0 0;font-size:10px;color:#9ca3af}.modal-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:14px 24px;border-top:1px solid #f0f0f5;gap:12px;flex-wrap:wrap}.pagination-info[_ngcontent-%COMP%]{font-size:12px;color:#9ca3af;font-weight:500}.pagination-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.page-nav-btn[_ngcontent-%COMP%]{width:34px;height:34px;border:1.5px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:#6b7280;transition:background .15s,border-color .15s,color .15s}.page-nav-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#f3f4f6;border-color:#d1d5db;color:#111827}.page-nav-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.page-num-btn[_ngcontent-%COMP%]{width:34px;height:34px;border:1.5px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;font-size:12px;font-weight:600;color:#374151;transition:background .15s,border-color .15s,color .15s;display:flex;align-items:center;justify-content:center}.page-num-btn[_ngcontent-%COMP%]:hover:not(.active){background:#f3f4f6;border-color:#d1d5db}.page-num-btn.active[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff;border-color:transparent;box-shadow:0 2px 8px rgba(var(--primary-color, 98 101 241),.35)}.search-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:6px;min-width:0}.search-container[_ngcontent-%COMP%]{flex:1;position:relative;min-width:0;display:flex;align-items:center}.search-hint[_ngcontent-%COMP%]{position:absolute;right:12px;font-size:11px;color:#d1d5db;pointer-events:none;display:flex;align-items:center;gap:3px}.search-hint[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;background:#f3f4f6;border:1px solid #d1d5db;border-radius:4px;padding:2px 6px;font-size:10px;font-weight:600;color:#6b7280;font-family:Courier New,monospace}.search-results-info[_ngcontent-%COMP%]{display:flex;gap:8px;padding:0 2px}.results-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:linear-gradient(135deg,rgba(var(--primary-color, 98 101 241),.1),rgba(var(--secondary-color, 16 185 129),.1));color:rgb(var(--primary-color, 98 101 241));border-radius:6px;padding:4px 10px;font-size:11px;font-weight:600;border:1px solid rgba(var(--primary-color, 98 101 241),.15)}.sort-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-shrink:0}.sort-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:500;color:#6b7280;cursor:pointer}.sort-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.empty-action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff;border:none;border-radius:8px;padding:8px 16px;font-size:12px;font-weight:600;cursor:pointer;margin-top:12px;transition:transform .15s,box-shadow .15s}.empty-action-btn[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(var(--primary-color, 98 101 241),.3)}.empty-action-btn[_ngcontent-%COMP%]:active{transform:translateY(0)}.results-footer-info[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:6px;padding:12px 16px;background:rgba(var(--primary-color, 98 101 241),.03);border-top:1px solid rgba(var(--primary-color, 98 101 241),.1);font-size:12px;color:#6b7280;font-weight:500;border-radius:0 0 8px 8px}.results-footer-info[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));font-size:13px}.item-actions[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;display:flex;gap:6px;padding:8px;background:linear-gradient(to top,rgba(0,0,0,.7),transparent);opacity:0;transform:translateY(4px);transition:opacity .2s,transform .2s}.item-card[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%]{opacity:1;transform:translateY(0)}.action-btn[_ngcontent-%COMP%]{flex:1;padding:6px 8px;border:none;border-radius:6px;background:#fff;color:#111827;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;font-weight:500}.action-btn[_ngcontent-%COMP%]:hover{transform:scale(1.05);box-shadow:0 2px 8px #00000026}.action-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.action-btn.rename-btn[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff}.action-btn.delete-btn[_ngcontent-%COMP%]{background:#ef4444;color:#fff}.rename-overlay[_ngcontent-%COMP%], .delete-overlay[_ngcontent-%COMP%]{z-index:1001}.action-modal[_ngcontent-%COMP%]{background:#fff;border-radius:12px;width:90%;max-width:400px;box-shadow:0 20px 60px #0000004d;animation:_ngcontent-%COMP%_modalIn .22s cubic-bezier(.34,1.26,.64,1)}.modal-header-small[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #f0f0f5}.modal-header-small[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:15px;font-weight:700;color:#111827}.close-btn[_ngcontent-%COMP%]{width:32px;height:32px;border:1.5px solid #e5e7eb;background:#fff;border-radius:6px;color:#6b7280;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s}.close-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#f3f4f6;border-color:#d1d5db;color:#111827}.close-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.modal-body[_ngcontent-%COMP%]{padding:18px 20px}.form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#374151}.rename-input[_ngcontent-%COMP%], .delete-modal[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:10px 12px;border:1.5px solid #e5e7eb;border-radius:8px;font-size:13px;color:#111827;font-family:inherit;transition:border-color .15s}.rename-input[_ngcontent-%COMP%]:focus{outline:none;border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgba(var(--primary-color, 98 101 241),.05)}.rename-input[_ngcontent-%COMP%]:disabled{background:#f3f4f6;cursor:not-allowed}.delete-warning[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}.warning-icon[_ngcontent-%COMP%]{font-size:32px;color:#f97316}.delete-warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#374151;line-height:1.5}.delete-warning[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:700;color:#111827;word-break:break-word}.delete-note[_ngcontent-%COMP%]{color:#ef4444!important;font-weight:600!important}.modal-footer-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid #f0f0f5;background:#fafafa;border-radius:0 0 12px 12px}.btn-cancel[_ngcontent-%COMP%], .btn-confirm[_ngcontent-%COMP%]{padding:8px 16px;border:1.5px solid #e5e7eb;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;display:inline-flex;align-items:center;gap:6px}.btn-cancel[_ngcontent-%COMP%]{background:#fff;color:#6b7280}.btn-cancel[_ngcontent-%COMP%]:hover:not(:disabled){background:#f3f4f6;border-color:#d1d5db;color:#111827}.btn-cancel[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.btn-confirm[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff;border:none;box-shadow:0 2px 8px rgba(var(--primary-color, 98 101 241),.2)}.btn-confirm[_ngcontent-%COMP%]:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px rgba(var(--primary-color, 98 101 241),.3)}.btn-confirm[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.btn-confirm.btn-danger[_ngcontent-%COMP%]{background:#ef4444;box-shadow:0 2px 8px #ef444433}.btn-confirm.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){box-shadow:0 4px 12px #ef44444d}.spinner[_ngcontent-%COMP%]{display:inline-block;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(max-width:640px){.modal-container[_ngcontent-%COMP%]{max-height:95vh;border-radius:12px}.controls-bar[_ngcontent-%COMP%]{flex-direction:column;gap:8px;padding:12px 16px}.search-wrapper[_ngcontent-%COMP%], .search-container[_ngcontent-%COMP%], .sort-wrapper[_ngcontent-%COMP%], .sort-select[_ngcontent-%COMP%]{width:100%}.modal-content[_ngcontent-%COMP%]{padding:12px}.items-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.modal-footer[_ngcontent-%COMP%]{flex-direction:column;align-items:center;gap:10px}}@media(hover:none),(pointer:coarse){.preview-item[_ngcontent-%COMP%]:hover{transform:none}.preview-use-badge[_ngcontent-%COMP%]{display:none!important}.preview-actions[_ngcontent-%COMP%]{opacity:1;transform:none;pointer-events:auto;bottom:auto;right:4px;top:4px;flex-direction:row;gap:4px;padding:3px;border-radius:999px;background:#11182785;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.preview-action-btn[_ngcontent-%COMP%]{--preview-action-size: 24px;box-shadow:none;border:1px solid rgba(255,255,255,.2)}.preview-overlay[_ngcontent-%COMP%]{opacity:1;background:#0000000d}}`],changeDetection:0})};var l4=i=>({$implicit:i}),c4=(i,e)=>({$implicit:i,tpl:e}),d4=(i,e)=>e.actionItemId;function Qie(i,e){if(i&1){let t=Ae();x(0,"div",3),U(1,"i",6),x(2,"span"),R(3),S(),x(4,"button",7),W("click",function(){z(t);let r=C();return V(r.clearUploadError())}),U(5,"i",8),S()()}if(i&2){let t=C();T(3),ze(t.uploadError())}}function ere(i,e){if(i&1){let t=Ae();x(0,"div",13),U(1,"img",16),x(2,"button",17),W("click",function(){z(t);let r=C().$implicit,o=C();return V(o.remove(r.actionItemId))}),U(3,"i",18),S()()}if(i&2){let t,n=C().$implicit,r=C();T(),q("src",(t=r.state().images[n.actionItemId])==null?null:t.src,fi)}}function tre(i,e){if(i&1){let t=Ae();x(0,"div",14)(1,"div",19)(2,"div",20)(3,"span",21),U(4,"i",22),R(5," Your Background Library "),S()(),x(6,"app-media-library-items",23),W("itemSelected",function(r){z(t);let o=C().$implicit,s=C();return V(s.onMediaLibraryBackgroundSelected(r,o.actionItemId))}),S()()()}if(i&2){let t=C(2);T(6),q("mediaType",t.MediaLibraryType.BACKGROUND)("userUniqueId",t.userUniqueId())("apiKey",t.apiKey())}}function nre(i,e){if(i&1&&(U(0,"i",24),x(1,"span"),R(2),S()),i&2){let t,n=C().$implicit,r=C();T(2),ze((t=r.state().images[n.actionItemId])==null?null:t.fileName)}}function ire(i,e){i&1&&(U(0,"i",25),x(1,"span"),R(2,"No file chosen"),S())}function rre(i,e){if(i&1){let t=Ae();x(0,"div",9)(1,"div",10)(2,"app-ui-fileupload",11),W("onSelect",function(r){let o=z(t).$implicit,s=C();return V(s.onFileChange(o.actionItemId,r))}),S(),x(3,"div",12),R(4,"Max file size: 25MB"),S()(),le(5,ere,4,1,"div",13),S(),le(6,tre,7,3,"div",14),x(7,"div",15),le(8,nre,3,1)(9,ire,3,0),S()}if(i&2){let t,n,r=e.$implicit,o=C();T(5),ce((t=o.state().images[r.actionItemId])!=null&&t.src?5:-1),T(),ce(o.userUniqueId()?6:-1),T(),fn("aria-live","polite"),T(),ce((n=o.state().images[r.actionItemId])!=null&&n.fileName?8:9)}}function ore(i,e){if(i&1){let t=Ae();x(0,"button",51),W("click",function(){z(t);let r=C().tpl,o=C();return V(o.applyToAll(r.actionItemId))}),U(1,"i",52),R(2," Apply to All "),S()}}function sre(i,e){if(i&1){let t=Ae();x(0,"div",26)(1,"div",27)(2,"span",28),U(3,"i",29),R(4),S(),x(5,"div",30),le(6,ore,3,0,"button",31),x(7,"button",32),W("click",function(){let r=z(t).tpl,o=C();return V(o.resetTransform(r.actionItemId))}),U(8,"i",33),R(9," Reset "),S()()(),x(10,"div",34)(11,"span",35),U(12,"i",36),R(13," Scale "),S(),x(14,"div",37)(15,"div",38)(16,"app-ui-slider",39),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"scale",r))}),S(),x(17,"span",40),R(18),ki(19,"number"),S()(),x(20,"div",41)(21,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"scale",-o.scaleStep))}),U(22,"i",43),S(),x(23,"input",44),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"scale",r))}),S(),x(24,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"scale",o.scaleStep))}),U(25,"i",45),S()()()(),U(26,"div",46),x(27,"div",34)(28,"span",35),U(29,"i",47),R(30," Rotation "),S(),x(31,"div",37)(32,"div",38)(33,"app-ui-slider",39),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"rotation",r))}),S(),x(34,"span",40),R(35),ki(36,"number"),S()(),x(37,"div",41)(38,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"rotation",-o.rotationStep))}),U(39,"i",43),S(),x(40,"input",44),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"rotation",r))}),S(),x(41,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"rotation",o.rotationStep))}),U(42,"i",45),S(),x(43,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.updateTransform(r.actionItemId,"rotation",0))}),U(44,"i",33),S()()()(),U(45,"div",46),x(46,"div",34)(47,"span",35),U(48,"i",48),R(49," Offset X "),S(),x(50,"div",37)(51,"div",38)(52,"app-ui-slider",39),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"translateX",r))}),S(),x(53,"span",40),R(54),ki(55,"number"),S()(),x(56,"div",41)(57,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"translateX",-o.translateStep))}),U(58,"i",43),S(),x(59,"input",44),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"translateX",r))}),S(),x(60,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"translateX",o.translateStep))}),U(61,"i",45),S()()()(),x(62,"div",34)(63,"span",35),U(64,"i",49),R(65," Offset Y "),S(),x(66,"div",37)(67,"div",38)(68,"app-ui-slider",39),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"translateY",r))}),S(),x(69,"span",40),R(70),ki(71,"number"),S()(),x(72,"div",41)(73,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"translateY",-o.translateStep))}),U(74,"i",43),S(),x(75,"input",44),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"translateY",r))}),S(),x(76,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"translateY",o.translateStep))}),U(77,"i",45),S()()()(),U(78,"div",46),x(79,"div",34)(80,"span",35),U(81,"i",50),R(82," Opacity "),S(),x(83,"div",37)(84,"div",38)(85,"app-ui-slider",39),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"opacity",r))}),S(),x(86,"span",40),R(87),ki(88,"number"),S()(),x(89,"div",41)(90,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"opacity",-o.opacityStep))}),U(91,"i",43),S(),x(92,"input",44),W("ngModelChange",function(r){let o=z(t).tpl,s=C();return V(s.updateTransform(o.actionItemId,"opacity",r))}),S(),x(93,"app-ui-button",42),W("onClick",function(){let r=z(t).tpl,o=C();return V(o.step(r.actionItemId,"opacity",o.opacityStep))}),U(94,"i",45),S()()()()()}if(i&2){let t=e.$implicit,n=e.tpl,r=C();T(4),Tt(" ",r.resolveLabel(n.actionItemId)," Transform "),T(2),ce(r.state().templates.length>1?6:-1),T(10),q("min",r.minScale)("max",r.maxScale)("step",r.scaleStep)("ngModel",t.transform.scale),T(2),Tt("",qi(19,58,t.transform.scale,"1.2-2"),"\xD7"),T(3),q("text",!0),T(2),q("min",r.minScale)("max",r.maxScale)("step",r.scaleStep)("ngModel",t.transform.scale),T(),q("text",!0),T(9),q("min",r.minRotation)("max",r.maxRotation)("step",r.rotationStep)("ngModel",t.transform.rotation),T(2),Tt("",qi(36,61,t.transform.rotation,"1.0-1"),"\xB0"),T(3),q("text",!0),T(2),q("min",r.minRotation)("max",r.maxRotation)("step",r.rotationStep)("ngModel",t.transform.rotation),T(),q("text",!0),T(2),q("text",!0),T(9),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateX),T(2),Tt("",qi(55,64,t.transform.translateX,"1.0-1"),"px"),T(3),q("text",!0),T(2),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateX),T(),q("text",!0),T(8),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateY),T(2),Tt("",qi(71,67,t.transform.translateY,"1.0-1"),"px"),T(3),q("text",!0),T(2),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateY),T(),q("text",!0),T(9),q("min",r.minOpacity)("max",r.maxOpacity)("step",r.opacityStep)("ngModel",t.transform.opacity),T(2),ze(qi(88,70,t.transform.opacity,"1.2-2")),T(3),q("text",!0),T(2),q("min",r.minOpacity)("max",r.maxOpacity)("step",r.opacityStep)("ngModel",t.transform.opacity),T(),q("text",!0)}}function are(i,e){if(i&1&&Rr(0,56),i&2){let t=C(2).$implicit;C(2);let n=dr(5);q("ngTemplateOutlet",n)("ngTemplateOutletContext",uv(2,c4,e,t))}}function lre(i,e){if(i&1&&le(0,are,1,5,"ng-container",56),i&2){let t,n=C().$implicit,r=C(2);ce((t=r.state().images[n.actionItemId])?0:-1,t)}}function cre(i,e){if(i&1&&(x(0,"div",53)(1,"div",54),U(2,"i",55),R(3," Background "),S(),Rr(4,56),le(5,lre,1,1),S()),i&2){let t,n=e.$implicit,r=C(2),o=dr(3);T(4),q("ngTemplateOutlet",o)("ngTemplateOutletContext",Ts(3,l4,n)),T(),ce(n.isTransformationRequired&&((t=r.state().images[n.actionItemId])!=null&&t.src)?5:-1)}}function dre(i,e){if(i&1&&mt(0,cre,6,5,"div",53,d4),i&2){let t=C();gt(t.templates())}}function ure(i,e){if(i&1&&Rr(0,56),i&2){let t=C(3).$implicit;C(2);let n=dr(5);q("ngTemplateOutlet",n)("ngTemplateOutletContext",uv(2,c4,e,t))}}function fre(i,e){if(i&1&&le(0,ure,1,5,"ng-container",56),i&2){let t,n=C(2).$implicit,r=C(2);ce((t=r.state().images[n.actionItemId])?0:-1,t)}}function hre(i,e){if(i&1&&le(0,fre,1,1),i&2){let t,n=C().$implicit,r=C(2);ce((t=r.state().images[n.actionItemId])!=null&&t.src?0:-1)}}function pre(i,e){if(i&1){let t=Ae();x(0,"app-ui-accordion-panel",58),W("click",function(){let r=z(t).$implicit,o=C(2);return V(o.onSelectEntry(r.actionItemId))}),x(1,"app-ui-accordion-header")(2,"div",59),U(3,"i",60),x(4,"span",61),R(5),S(),R(6),S()(),x(7,"app-ui-accordion-content")(8,"div",53),Rr(9,56),le(10,hre,1,1),S()()()}if(i&2){let t=e.$implicit,n=C(2),r=dr(3);q("value",t.id),T(5),Tt(" Background \u2014 ",n.resolveLabel(t.actionItemId)," "),T(),Tt(" ",t.isTransformationRequired," "),T(3),q("ngTemplateOutlet",r)("ngTemplateOutletContext",Ts(6,l4,t)),T(),ce(t.isTransformationRequired?10:-1)}}function mre(i,e){if(i&1&&(x(0,"app-ui-accordion",4),mt(1,pre,11,8,"app-ui-accordion-panel",57,d4),S()),i&2){let t,n=C();q("value",((t=n.templates()[0])==null?null:t.id)??((t=n.templates()[0])==null?null:t.actionItemId)),T(),gt(n.templates())}}var S_=class i{MediaLibraryType=Jd;templates=_e([]);userUniqueId=_e("");apiKey=_e("");uploadError=F(null);backgroundState=Z(oh);customizer=Z(Dn);state=this.backgroundState.state;mediaLibraryBackgroundLoading=Me(()=>!!this.backgroundState.mediaLibraryBackgroundLoadingKey());minScale=this.backgroundState.minScale;maxScale=this.backgroundState.maxScale;scaleStep=this.backgroundState.scaleStep;minRotation=this.backgroundState.minRotation;maxRotation=this.backgroundState.maxRotation;rotationStep=this.backgroundState.rotationStep;minTranslate=this.backgroundState.minTranslate;maxTranslate=this.backgroundState.maxTranslate;translateStep=this.backgroundState.translateStep;minOpacity=this.backgroundState.minOpacity;maxOpacity=this.backgroundState.maxOpacity;opacityStep=this.backgroundState.opacityStep;onSelectEntry(e){this.backgroundState.select(e)}resolveLabel(e){return this.backgroundState.resolveLabel(e)}onFileChange(e,t){let n=t.files?.[0];n&&this.backgroundState.onFileSelected(e,n).then(r=>{r?this.uploadError.set(r):this.uploadError.set(null)})}clearUploadError(){this.uploadError.set(null)}onMediaLibraryBackgroundSelected(e,t){!e||!t||!e.blobResourceId||!e.blobUri||this.backgroundState.onMediaLibraryBackgroundSelected(t,e.blobResourceId,e.blobUri,e.blobName)}remove(e){this.backgroundState.remove(e)}applyToAll(e){this.backgroundState.applyToAll(e)}updateTransform(e,t,n){this.backgroundState.updateTransform(t,n,e)}step(e,t,n){this.backgroundState.stepTransform(t,n,e)}resetTransform(e){this.backgroundState.resetTransform(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-customizer-background-panel"]],inputs:{templates:[1,"templates"],userUniqueId:[1,"userUniqueId"],apiKey:[1,"apiKey"]},decls:9,vars:3,consts:[["uploadArea",""],["transformContent",""],[1,"panel-body"],["role","alert",1,"error-message"],[1,"child-accordion",3,"value"],["message","Loading background from media library...",3,"show"],[1,"ri-error-warning-line"],["type","button","aria-label","Close error message",1,"error-close-btn",3,"click"],[1,"ri-close-line"],[1,"bg-upload-row"],[1,"bg-upload-wrapper"],["mode","basic","chooseLabel","Upload Background","secondaryLabel","PNG, JPG, SVG, WebP","accept","image/png,image/jpeg,image/webp,image/svg+xml","customUpload","true",1,"w-full","upload-logo-btn",3,"onSelect"],[1,"bg-upload-hint"],[1,"bg-preview"],[1,"bg-media-library-section"],[1,"bg-filename"],["alt","Background preview",1,"bg-preview__img",3,"src"],["type","button",1,"bg-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"media-library-preview-box"],[1,"preview-header"],[1,"preview-title"],[1,"ri-image-gallery-line"],[3,"itemSelected","mediaType","userUniqueId","apiKey"],[1,"ri-file-image-line"],[1,"ri-image-line"],[1,"bg-transform"],[1,"bg-transform-header"],[1,"bg-transform-title"],[1,"ri-crop-line"],[1,"bg-transform-actions"],["type","button",1,"bg-apply-all-btn"],["type","button",1,"bg-reset-btn",3,"click"],[1,"ri-reset-left-line"],[1,"prop-row"],[1,"prop-label"],[1,"ri-zoom-in-line","prop-icon"],[1,"flex-1"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"stepper","mt-3"],[3,"onClick","text"],[1,"ri-subtract-line"],["type","number",1,"stepper-input",3,"ngModelChange","min","max","step","ngModel"],[1,"ri-add-line"],[1,"section-divider"],[1,"ri-refresh-line","prop-icon"],[1,"ri-arrow-left-right-line","prop-icon"],[1,"ri-arrow-up-down-line","prop-icon"],[1,"ri-contrast-line","prop-icon"],["type","button",1,"bg-apply-all-btn",3,"click"],[1,"ri-stack-fill"],[1,"bg-section"],[1,"bg-section-label"],[1,"ri-image-fill"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"value"],[3,"click","value"],[1,"accordion-header-content"],[1,"ri-image-fill","accordion-header-icon"],[1,"accordion-header-label"]],template:function(t,n){t&1&&(x(0,"div",2),le(1,Qie,6,1,"div",3),Bo(2,rre,10,4,"ng-template",null,0,cl)(4,sre,95,73,"ng-template",null,1,cl),le(6,dre,2,0)(7,mre,3,1,"app-ui-accordion",4),U(8,"app-ui-loader",5),S()),t&2&&(T(),ce(n.uploadError()?1:-1),T(5),ce(n.templates().length<=1?6:7),T(2),q("show",n.mediaLibraryBackgroundLoading()))},dependencies:[Ut,jc,fr,hl,kp,Is,Np,Fp,zo,ta,Vi,hh,_i,_r,xr,ea,ph,mh,Wc],styles:['[_nghost-%COMP%]{display:block}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:12px;background-color:#fee2e2;border:1px solid #fca5a5;border-radius:4px;color:#991b1b;font-size:13px;line-height:1.4;animation:_ngcontent-%COMP%_slideDown .3s ease-in-out}.error-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:16px;flex-shrink:0}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.error-close-btn[_ngcontent-%COMP%]{flex-shrink:0;background:none;border:none;padding:2px;cursor:pointer;color:#991b1b;font-size:16px;display:flex;align-items:center;justify-content:center;transition:opacity .2s}.error-close-btn[_ngcontent-%COMP%]:hover{opacity:.7}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.bg-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;padding:12px 14px}.bg-section-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;text-transform:uppercase;color:#111827;letter-spacing:.07em;margin-bottom:10px}.bg-section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.bg-upload-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px}.bg-upload-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}.bg-upload-hint[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-style:italic;font-weight:500}.bg-upload-zone[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:14px 12px;border:1.5px dashed #d1d5db;border-radius:10px;background:#fafafa;cursor:pointer;text-align:center;transition:border-color .18s,background .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.bg-upload-icon[_ngcontent-%COMP%]{font-size:24px;color:#9ca3af;transition:color .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover .bg-upload-icon[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.bg-upload-text[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#111827}.bg-upload-hint[_ngcontent-%COMP%]{font-size:11px;color:#64748b}.bg-preview[_ngcontent-%COMP%]{position:relative;width:72px;height:72px;flex-shrink:0;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;box-shadow:0 2px 8px #00000014}.bg-preview__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.bg-remove[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:none;background:#ef4444d9;color:#fff;font-size:11px;cursor:pointer;transition:background .15s,transform .15s}.bg-remove[_ngcontent-%COMP%]:hover{background:#ef4444;transform:scale(1.1)}.bg-filename[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;color:#475569;margin-bottom:4px;min-height:18px}.bg-filename[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;flex-shrink:0}.bg-transform[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #f0f0f0}.bg-transform-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:4px}.bg-transform-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.bg-transform-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.bg-transform-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.bg-reset-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:9999px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:11px;font-weight:500;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.bg-apply-all-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:9999px;border:1px solid rgb(var(--primary-color, 98 101 241) / .28);background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:11px;font-weight:600;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.bg-apply-all-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.bg-apply-all-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241) / .65);background:rgb(var(--primary-color, 98 101 241) / .16);color:rgb(var(--primary-color, 98 101 241))}.bg-reset-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.bg-reset-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:start;gap:8px;min-height:28px}.prop-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;flex-shrink:0;width:72px;font-size:12px;font-weight:600;color:#111827}.prop-icon[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:6px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:42px;text-align:right;font-size:12px;color:#334155;font-variant-numeric:tabular-nums}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:25px;flex-shrink:0}.stepper-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #e5e7eb;border-radius:50%;background:#fff;color:#6b7280;font-size:13px;cursor:pointer;transition:border-color .15s,color .15s}.stepper-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));border-radius:50%;color:rgb(var(--primary-color, 98 101 241))}.stepper-input[_ngcontent-%COMP%]{flex:1;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:12px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-reset[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#64748b;font-size:13px;cursor:pointer;transition:border-color .15s,color .15s}.stepper-reset[_ngcontent-%COMP%]:hover{border-color:#fca5a5;color:#ef4444}.section-divider[_ngcontent-%COMP%]{height:1px;background:#f0f0f0;margin:2px 0}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}.bg-section[_ngcontent-%COMP%]{padding:10px}.prop-label[_ngcontent-%COMP%]{width:60px}.stepper-input[_ngcontent-%COMP%]{width:42px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}.bg-section[_ngcontent-%COMP%]{padding:8px}}.bg-media-library-section[_ngcontent-%COMP%]{margin-top:14px}.select-from-library-btn[_ngcontent-%COMP%]{width:100%}.select-from-library-btn[_ngcontent-%COMP%] .p-button, .select-from-library-btn[_ngcontent-%COMP%] button{width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:10px 14px!important;background:linear-gradient(135deg,#6366f1,#8b5cf6)!important;color:#fff!important;border:none!important;border-radius:8px!important;font-size:13px!important;font-weight:600!important;cursor:pointer!important;transition:box-shadow .2s,transform .15s!important;box-shadow:0 2px 8px #6366f14d!important;letter-spacing:.01em!important}.select-from-library-btn[_ngcontent-%COMP%] .p-button:hover, .select-from-library-btn[_ngcontent-%COMP%] button:hover{box-shadow:0 4px 16px #6366f173!important;transform:translateY(-1px)!important}.media-library-preview-box[_ngcontent-%COMP%]{border:1.5px solid #e5e7eb;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 2px 10px #0000000f;animation:_ngcontent-%COMP%_fadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.preview-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#f8f8fc;border-bottom:1px solid #eeeefc}.preview-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#374151;letter-spacing:.02em}.preview-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#6366f1}.preview-close-btn[_ngcontent-%COMP%]{width:26px;height:26px;border-radius:6px;border:1px solid #e5e7eb;background:#fff;color:#9ca3af;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s,border-color .15s;padding:0}.preview-close-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#374151;border-color:#d1d5db}.media-library-preview-box[_ngcontent-%COMP%] app-media-library-items[_ngcontent-%COMP%]{display:block;padding:10px}'],changeDetection:0})};var tg={whiteThreshold:242,fadeRange:24},sc=class i{minOverlayScale=.1;maxOverlayScale=8;defaultLetterSpacing=0;minLetterSpacing=-50;maxLetterSpacing=150;textMeasureContext=null;customizerState=Z(Dn);imageCompressionService=Z(qs);printAreaMeasurementService=Z(Yl);placements=F([]);showPlacementGuides=F(!1);placementZones=F([]);placementZoneBounds=F(new Map);placementZoneNormalizedBounds=F(new Map);definedPlacementZoneCache=F(new Map);textWarpEnvelope=F(null);warpEnvelopeFileName=F(null);warpUploadError=F(null);selectedEffectByOverlayId=F(new Map);warpEffectRequestSerial=0;mediaLibraryLogoLoadingId=F(null);minTextFontSize=6;hasBoundary=Me(()=>this.placements().some(e=>e.specificAreaSvgLink&&e.type!=="BACKGROUND"));warpEnvelopeReady=Me(()=>!!this.textWarpEnvelope());warpEnvelopeSummary=Me(()=>{let e=this.textWarpEnvelope();if(!e)return null;let{viewBox:t}=e;return`${t.minX.toFixed(0)}, ${t.minY.toFixed(0)}, ${t.width.toFixed(0)}, ${t.height.toFixed(0)}`});activeOverlayId=this.customizerState.activeOverlayId;setPlacements(e){let t=e??[];this.placements.set(t),this.customizerState.setPersonalizationPlacements(t)}setShowPlacementGuides(e){this.showPlacementGuides.set(!!e),this.customizerState.render2d()}setPlacementZones(e){this.placementZones.set(e??[])}refreshFromSvg(){this.refreshPlacementZonesFromSvg(),this.loadDefinedZonesFromPersonalizations()}onTextInput(e,t,n){let r=t?.target?.value?.trim()??"",o=this.getTextOverlaysForPlacement(e.placementKey)[0]??null;if(o){this.updateTextOverlayText(o,r);return}this.createTextOverlay(e,n??yr,r)}createTextOverlay(e,t,n=""){if(!this.customizerState.svgDoc())return null;let r=!!e.specificAreaSvgLink,o=r?this.findPlacementZoneByKey(e.placementKey):null,s=this.getOverlayBoundingRect();if(!s.width||!s.height)return null;let a=this.computeDefaultFontSize(s,o),l=r&&o?this.getPlacementZoneCenter(o,s):this.normalizeSvgPoint(typeof e.x=="number"?e.x:s.width*.5,typeof e.y=="number"?e.y:s.height*.6),c={kind:"text",id:`${e.placementKey}-${Date.now()}`,text:n,fill:"#1f2937",fontSize:a,horizontalScale:1,verticalScale:1,normalizedX:l.nx,normalizedY:l.ny,angle:0,lockAspectRatio:!0,fontFamily:t??yr,fontWeight:"normal",fontStyle:"normal",lineHeight:1.2,letterSpacing:0,stroke:jl,strokeWidth:0,secondStroke:Wl,secondStrokeWidth:0,curveAmount:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:nh,warpEnabled:!1,placementKey:e.placementKey},d=r&&o?this.applyPlacementZoneTextBounds(c):c;return this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()}),d}updateTextOverlayText(e,t){let n=this.customizerState.overlays(),r=n.findIndex(l=>l.id===e.id);if(r<0)return;let o=n[r],s=this.applyPlacementZoneTextBounds(he(k({},o),{text:t?.trim()??""})),a=[...n];a[r]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.clearTextGlyphPlan(s.id),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}onLogoFileSelected(e,t){if(!this.customizerState.svgDoc())return null;let n=e.files?.[0];if(!n)return null;if(n.size>26214400){let s=`Logo file size must not exceed ${25}MB`;return console.warn(`[PersonalizationService] Logo upload rejected: file exceeds ${25} MB limit.`),s}if(!(n.type.startsWith("image/")||/\.(png|jpg|jpeg|webp|svg)$/i.test(n.name)))return null;let o=new FileReader;return o.onload=()=>{let s=o.result;if(typeof s!="string")return;let a=new Image;a.onload=()=>{let l=a.naturalWidth||a.width,c=a.naturalHeight||a.height;if(l<=0||c<=0)return;let d=this.buildLogoOverlay(s,n.name,l,c,t);d&&this.imageCompressionService.compressImageToDataUrl(s).then(u=>{d.imageSrc3d=u,this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}).catch(u=>{console.warn("[PersonalizationService] Failed to compress logo image, using original",u),this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})})},a.src=s},o.readAsDataURL(n),null}async removeWhiteBackgroundFromLogo(e){if(!e)return;let t=this.customizerState.overlays(),n=t.findIndex(c=>c.id===e);if(n<0)return;let r=t[n];if(r.kind!=="logo")return;let o=await this.removeWhiteBackgroundFromImage(r.imageSrc);if(!o)return;let s=await this.imageCompressionService.compressImageToDataUrl(o).catch(c=>(console.error("[PersonalizationService] Failed to compress processed logo:",c),o)),a=k(k({},r),r.logoBlobId?{processedImageSrc:o,imageSrc3d:s}:{imageSrc:o,imageSrc3d:s}),l=[...t];l[n]=a,this.customizerState.overlays.set(l),this.customizerState.setActiveOverlay(a),this.customizerState.refreshFabricOverlays(),await this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}togglePlacementGuides(e){this.setShowPlacementGuides(e),this.customizerState.render2d()}trackPlacementZone(e,t){return t.id}updateOverlayProperty(e,t,n){let r=this.customizerState.overlays(),o=r.findIndex(s=>s.id===e.id);if(o>=0){let s=he(k({},r[o]),{[t]:n}),a=[...r];a[o]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}}updateOverlayProperties(e,t){let n=this.customizerState.overlays(),r=n.findIndex(l=>l.id===e.id);if(r<0)return;let o=n[r];this.customizerState.clearOverlayRuntimeDimensions(o.id),Dt(o)&&this.customizerState.clearTextGlyphPlan(e.id);let s=k(k({},o),t);Dt(s)?(s=he(k({},s),{horizontalScale:this.normalizeScale(s.horizontalScale),verticalScale:this.normalizeScale(s.verticalScale)}),s=this.applyPlacementZoneTextBounds(s)):ai(s)&&(s=this.applyPlacementZoneLogoBounds(s));let a=[...n];a[r]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.refreshFabricOverlays(),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild()})}getOverlayDimensionsPx(e){if(!e)return{width:0,height:0};let t=this.customizerState.overlayRuntimeDimensionsPx().get(e.id);if(t)return{width:Math.max(t.width,1),height:Math.max(t.height,1)};let n=this.getOverlayBoundingRect();if(n.width<=0||n.height<=0)return{width:0,height:0};let r=this.resolveOverlayNormalizedSize(e);return{width:Math.max(r.width*n.width,1),height:Math.max(r.height*n.height,1)}}getOverlayDimensionsInches(e){if(!e)return{width:0,height:0};let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches(),r=this.customizerState.printAreaHeightInches(),o=r&&r>0?r:n;if(t.width<=0||!n||n<=0||!o||o<=0)return{width:0,height:0};let s=this.getOverlayDimensionsPx(e),a=t.height>0?t.height:t.width;return{width:this.printAreaMeasurementService.svgUnitsToInchesX(s.width,t.width,n),height:this.printAreaMeasurementService.svgUnitsToInchesY(s.height,a,o)}}getOverlayLetterSpacingInches(e){if(!e||e.kind!=="text")return 0;let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches();return t.width<=0||!n||n<=0?0:this.printAreaMeasurementService.svgUnitsToInchesX(e.letterSpacing??0,t.width,n)}updateOverlayDimensionsPx(e,t){let n=this.getOverlayBoundingRect();if(n.width<=0||n.height<=0)return;let r=this.getOverlayDimensionsPx(e);if(r.width<=0||r.height<=0)return;let o={width:r.width/n.width,height:r.height/n.height},s=e.lockAspectRatio??!0,a=o.width/o.height,l=this.normalizeNormalizedDimension(t.widthPx!==void 0?t.widthPx/n.width:o.width),c=this.normalizeNormalizedDimension(t.heightPx!==void 0?t.heightPx/n.height:o.height);if(s&&Number.isFinite(a)&&a>0&&(t.widthPx!==void 0&&t.heightPx===void 0?c=this.normalizeNormalizedDimension(l/a):t.heightPx!==void 0&&t.widthPx===void 0?l=this.normalizeNormalizedDimension(c*a):t.widthPx!==void 0&&t.heightPx!==void 0&&(c=this.normalizeNormalizedDimension(l/a))),ai(e)){this.updateOverlayProperties(e,{normalizedWidth:l,normalizedHeight:c}),this.customizerState.setOverlayRuntimeDimensionsPx(e.id,l*n.width,c*n.height);return}if(!Dt(e))return;let d=this.normalizeScale(e.horizontalScale),u=this.normalizeScale(e.verticalScale),f=o.width/d,h=o.height/u;if(f<=0||h<=0)return;let p=this.normalizeScale(l/f),v=this.normalizeScale(c/h);if(s)if(t.widthPx!==void 0&&t.heightPx===void 0)v=p;else if(t.heightPx!==void 0&&t.widthPx===void 0)p=v;else{let g=this.normalizeScale((p+v)/2);p=g,v=g}this.updateOverlayProperties(e,{horizontalScale:p,verticalScale:v}),this.customizerState.setOverlayRuntimeDimensionsPx(e.id,l*n.width,c*n.height)}updateOverlayDimensionsInches(e,t){let n=this.getOverlayBoundingRect(),r=this.customizerState.printAreaWidthInches(),o=this.customizerState.printAreaHeightInches(),s=o&&o>0?o:r;if(n.width<=0||!r||r<=0||!s||s<=0)return;let a=n.height>0?n.height:n.width,l=t.widthInches!==void 0?this.printAreaMeasurementService.inchesToSvgUnitsX(t.widthInches,n.width,r):void 0,c=t.heightInches!==void 0?this.printAreaMeasurementService.inchesToSvgUnitsY(t.heightInches,a,s):void 0;this.updateOverlayDimensionsPx(e,{widthPx:l,heightPx:c})}updateOverlayLetterSpacingInches(e,t){if(e.kind!=="text")return;let n=this.getOverlayBoundingRect(),r=this.customizerState.printAreaWidthInches();if(n.width<=0||!r||r<=0)return;let o=this.printAreaMeasurementService.inchesToSvgUnitsX(t,n.width,r);this.updateOverlayProperties(e,{letterSpacing:Math.max(this.minLetterSpacing,Math.min(this.maxLetterSpacing,o))})}setOverlayAspectRatioLock(e,t){this.updateOverlayProperties(e,{lockAspectRatio:!!t})}getOverlayDimensionLimitsPx(e){if(!e)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};if(ai(e))return{minWidth:Math.max(.02*t.width,1),maxWidth:Math.max(t.width,1),minHeight:Math.max(.02*t.height,1),maxHeight:Math.max(t.height,1)};if(!Dt(e))return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let n=this.resolveOverlayNormalizedSize(e),r=this.normalizeScale(e.horizontalScale),o=this.normalizeScale(e.verticalScale),s=n.width/r,a=n.height/o,l=Math.max(s*this.minOverlayScale*t.width,1),c=Math.max(s*this.maxOverlayScale*t.width,l),d=Math.max(a*this.minOverlayScale*t.height,1),u=Math.max(a*this.maxOverlayScale*t.height,d);return{minWidth:l,maxWidth:c,minHeight:d,maxHeight:u}}getOverlayDimensionLimitsInches(e){let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches(),r=this.customizerState.printAreaHeightInches(),o=r&&r>0?r:n;if(t.width<=0||!n||n<=0||!o||o<=0)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let s=this.getOverlayDimensionLimitsPx(e),a=t.height>0?t.height:t.width;return{minWidth:this.printAreaMeasurementService.svgUnitsToInchesX(s.minWidth,t.width,n),maxWidth:this.printAreaMeasurementService.svgUnitsToInchesX(s.maxWidth,t.width,n),minHeight:this.printAreaMeasurementService.svgUnitsToInchesY(s.minHeight,a,o),maxHeight:this.printAreaMeasurementService.svgUnitsToInchesY(s.maxHeight,a,o)}}getOverlayLetterSpacingLimitsInches(e){let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches();return!e||t.width<=0||!n||n<=0?{min:0,max:0}:{min:this.printAreaMeasurementService.svgUnitsToInchesX(this.minLetterSpacing,t.width,n),max:this.printAreaMeasurementService.svgUnitsToInchesX(this.maxLetterSpacing,t.width,n)}}getActiveOverlay(){let e=this.customizerState.activeOverlayId();return e?this.customizerState.overlays().find(t=>t.id===e)??null:null}setActiveOverlay(e){this.customizerState.setActiveOverlay(e),e&&(this.customizerState.refreshFabricOverlays(),this.customizerState.render2d())}onMediaLibraryLogoSelected(e,t){if(!e||!t?.placementKey)return;let n=new Image;n.onload=()=>{let r=n.naturalWidth||n.width,o=n.naturalHeight||n.height;(r<=0||o<=0)&&(r=100,o=100);let s={id:`overlay-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,kind:"logo",logoBlobId:e.blobResourceId,imageSrc:e.blobUri,imageName:"logo-from-library",normalizedX:.5,normalizedY:.5,angle:0,normalizedWidth:.3,normalizedHeight:.3,originalWidth:r,originalHeight:o,opacity:1,lockAspectRatio:!0,placementKey:t.placementKey};this.mediaLibraryLogoLoadingId.set(s.id),this.imageCompressionService.compressImageToDataUrl(e.blobUri).then(a=>{s.imageSrc3d=a;let l=this.customizerState.overlays();this.customizerState.overlays.set([...l,s]),this.customizerState.setActiveOverlay(s),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d(),setTimeout(()=>{this.mediaLibraryLogoLoadingId()===s.id&&this.mediaLibraryLogoLoadingId.set(null)},500)})}).catch(a=>{console.warn("[PersonalizationService] Failed to compress media library logo image, using original",a);let l=this.customizerState.overlays();this.customizerState.overlays.set([...l,s]),this.customizerState.setActiveOverlay(s),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d(),setTimeout(()=>{this.mediaLibraryLogoLoadingId()===s.id&&this.mediaLibraryLogoLoadingId.set(null)},500)})})},n.onerror=()=>{console.warn("[PersonalizationService] Failed to load image from media library:",e.blobUri)},n.src=e.blobUri}getOverlayForPlacement(e){if(!e)return null;let t=this.customizerState.overlays(),n=this.customizerState.activeOverlayId(),r=n&&t.find(s=>s.id===n&&s.placementKey===e);if(r)return r;let o=t.find(s=>s.kind==="text"&&s.placementKey===e);return o||(t.find(s=>s.placementKey===e)??null)}getLogosForPlacement(e){return e?this.customizerState.overlays().filter(t=>t.kind==="logo").filter(t=>t.placementKey===e):[]}getTextOverlaysForPlacement(e){return e?this.customizerState.overlays().filter(t=>t.kind==="text"&&t.placementKey===e):[]}removeOverlay(e){let t=this.customizerState.overlays(),n=t.filter(o=>o.id!==e);if(n.length===t.length)return;this.customizerState.overlays.set(n),this.customizerState.clearOverlayRuntimeDimensions(e),this.customizerState.activeOverlayId()===e&&this.customizerState.setActiveOverlay(n[0]??null),this.customizerState.refreshFabricOverlays(),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()}),this.selectedEffectByOverlayId.update(o=>{if(!o.has(e))return o;let s=new Map(o);return s.delete(e),s})}getSelectedEffectIdForOverlay(e){return e?this.selectedEffectByOverlayId().get(e)??null:null}setSelectedEffectByOverlay(e){let t=new Map;e.forEach(n=>{n?.overlayId&&t.set(n.overlayId,n.effectId??null)}),this.selectedEffectByOverlayId.set(t)}async applyTextEffect(e,t){if(!e||!Dt(e))return;let n=t?.fileUrl?.trim();if(!t||!n){this.warpUploadError.set(null),this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null});return}let r=++this.warpEffectRequestSerial;try{this.warpUploadError.set(null);let o=await fetch(n);if(!o.ok)throw new Error(`HTTP ${o.status}`);let s=await o.text();if(r!==this.warpEffectRequestSerial)return;let a=this.parseWarpEnvelope(s);if(!a){this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null});return}this.applyWarpEnvelope(a,t.name||n,!1),this.setEffectForOverlay(e.id,t.id??null),this.updateOverlayProperties(e,{warpEnabled:!0,warpEnvelope:a})}catch(o){if(console.error(Va.failedFetchEffectSvg,o),r!==this.warpEffectRequestSerial)return;this.warpUploadError.set(Va.unableLoadEffectSvgUrl),this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null})}}setEffectForOverlay(e,t){this.selectedEffectByOverlayId.update(n=>{let r=new Map(n);return r.set(e,t),r})}ingestWarpEnvelope(e,t){let n=this.parseWarpEnvelope(e);n&&this.applyWarpEnvelope(n,t)}parseWarpEnvelope(e){try{let n=new DOMParser().parseFromString(e,ss);if(n.querySelector(Yd))return this.warpUploadError.set(Va.warpSvgParsingError),null;let o=n.documentElement?.getAttribute("viewBox");if(!o)return this.warpUploadError.set(Va.warpSvgNeedsViewBox),null;let s=this.parseWarpViewBox(o);if(!s)return this.warpUploadError.set(Va.warpSvgInvalidViewBox),null;let a=n.getElementById("top"),l=n.getElementById("bottom"),c=a?.getAttribute("d")?.trim(),d=l?.getAttribute("d")?.trim();return!c||!d?(this.warpUploadError.set(Va.warpSvgNeedsTopBottomPath),null):(this.warpUploadError.set(null),{viewBox:s,topPathD:c,bottomPathD:d})}catch(t){return console.error(Va.failedIngestWarpEnvelope,t),this.warpUploadError.set(Va.warpEnvelopeReadFailed),null}}applyWarpEnvelope(e,t,n=!0){this.textWarpEnvelope.set(e),this.warpEnvelopeFileName.set(t),this.customizerState.setTextWarpEnvelope(e),this.customizerState.clearAllTextGlyphPlans(),this.customizerState.refreshFabricOverlays(),n&&this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}parseWarpViewBox(e){let t=e.split(/[,\s]+/).map(a=>Number.parseFloat(a)).filter(a=>Number.isFinite(a));if(t.length!==4)return null;let[n,r,o,s]=t;return o<=0||s<=0?null:{minX:n,minY:r,width:o,height:s}}isSupportedFontFile(e){if(!e)return!1;if(/\.otf$/i.test(e.name))return!0;let n=(e.type||"").toLowerCase();return n==="font/otf"||n==="application/x-font-otf"||n==="application/font-sfnt"}resolveOverlayLabel(e){if(e.placementKey){let t=this.findPlacementZoneByKey(e.placementKey);if(t)return t.label}return e.kind==="text"?"Enter Name":e.kind==="logo"?e.imageName??"Logo":e.id}clampNormalizedToPlacementZone(e,t,n){let s=Qt.clamp(t,0,1),a=Qt.clamp(n,0,1),l=e.placementKey;if(!l)return{x:s,y:a};let c=this.getPlacementZoneNormalizedBoundsByKey(l);if(!c)return{x:s,y:a};let d=this.estimateOverlayNormalizedSize(e),u=Math.max(d.width/2-0,0),f=Math.max(d.height/2-0,0),h=c.minX+u-0,p=c.maxX-u+0,v=c.minY+f-0,g=c.maxY-f+0;return h<p?s=Qt.clamp(s,h,p):s=(c.minX+c.maxX)/2,v<g?a=Qt.clamp(a,v,g):a=(c.minY+c.maxY)/2,{x:s,y:a}}applyPlacementZoneTextBounds(e){if(!e.placementKey)return e;let t=this.getPlacementZoneNormalizedBoundsByKey(e.placementKey);if(!t)return e;let n=t.maxX-t.minX,r=t.maxY-t.minY;if(n<=0||r<=0)return e;let o=k({},e),s=this.estimateOverlayNormalizedSize(o);if(s.width>n||s.height>r){let m=Math.min(n/s.width,r/s.height),b=Math.max((o.fontSize??this.minTextFontSize)*m,this.minTextFontSize),y=b/(o.fontSize||1);o=he(k({},o),{fontSize:b,letterSpacing:(o.letterSpacing??0)*y,strokeWidth:(o.strokeWidth??0)*y,secondStrokeWidth:(o.secondStrokeWidth??0)*y,shadowBlur:(o.shadowBlur??0)*y,shadowOffsetX:(o.shadowOffsetX??0)*y,shadowOffsetY:(o.shadowOffsetY??0)*y}),s=this.estimateOverlayNormalizedSize(o)}let a=0,l=0,c=Math.max(s.width/2-a,0),d=Math.max(s.height/2-l,0),u=t.minX+c-a,f=t.maxX-c+a,h=t.minY+d-l,p=t.maxY-d+l,v=u<=f?Qt.clamp(o.normalizedX,u,f):(t.minX+t.maxX)/2,g=h<=p?Qt.clamp(o.normalizedY,h,p):(t.minY+t.maxY)/2;return he(k({},o),{normalizedX:v,normalizedY:g})}applyPlacementZoneLogoBounds(e){if(!e.placementKey)return e;let t=this.getPlacementZoneNormalizedBoundsByKey(e.placementKey);if(!t)return e;let n=t.maxX-t.minX,r=t.maxY-t.minY;if(n<=0||r<=0)return e;let o=Math.min(.02,n),s=Math.min(.02,r),a=Math.max(e.normalizedWidth,o),l=Math.max(e.normalizedHeight,s),c=a>0?n/a:1,d=l>0?r/l:1,u=Math.min(c,d,1);u<1&&(a*=u,l*=u),a=Math.min(Math.max(a,o),n),l=Math.min(Math.max(l,s),r);let f=a/2,h=l/2,p=t.minX+f,v=t.maxX-f,g=t.minY+h,m=t.maxY-h,b=p<=v?Qt.clamp(e.normalizedX,p,v):(t.minX+t.maxX)/2,y=g<=m?Qt.clamp(e.normalizedY,g,m):(t.minY+t.maxY)/2;return he(k({},e),{normalizedWidth:a,normalizedHeight:l,normalizedX:b,normalizedY:y})}getPlacementZoneBoundsByKey(e){return this.placementZoneBounds().get(e)??null}getPlacementZoneNormalizedBoundsByKey(e){return this.placementZoneNormalizedBounds().get(e)??null}findPlacementZoneByKey(e){return this.placementZones().find(t=>t.placementKey===e)??null}refreshPlacementZonesFromSvg(){let e=this.customizerState.svgDoc();if(!e){this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.placementZoneNormalizedBounds.set(new Map);return}let t=this.getOverlayBoundingRect();if(!t.width||!t.height){this.placementZones.set([]);return}let n=Array.from(e.querySelectorAll("[placement-key]")),r=[],o=new Map,s=new Map;for(let a of n){let l=a.getAttribute(me.PLACEMENT_KEY)?.trim();if(!l)continue;let c=this.readElementBounds(a);if(!c)continue;let d=this.computePlacementZoneNormalizedBounds(c,t);if(!d)continue;let u=a.getAttribute("id")?.trim();u||(u=this.generatePlacementZoneId(l,e),a.setAttribute("id",u));let f=this.extractPlacementPathData(a);if(!f)continue;let h=this.normalizePlacementAllowedKinds(a.getAttribute(me.DATA_ALLOWED)),p={id:u,placementKey:l,label:a.getAttribute(me.DATA_LABEL)?.trim()??u??l,elementName:a.tagName.toLowerCase(),allowedKinds:h,required:(a.getAttribute(me.DATA_REQUIRED)??"false").toLowerCase()==="true",pathData:f,bounds:c};r.push(p),s.set(l,c),o.set(l,d)}r.sort((a,l)=>a.label.localeCompare(l.label)),this.placementZones.set(r),this.placementZoneBounds.set(s),this.placementZoneNormalizedBounds.set(o),this.reapplyDefinedPlacementZonesFromCache()}async loadDefinedZonesFromPersonalizations(){let e=this.customizerState.svgDoc();if(!e)return;let t=this.getOverlayBoundingRect();if(!t.width||!t.height)return;let n=this.placements().filter(r=>r.specificAreaSvgLink&&r.type!=="BACKGROUND");for(let r of n)try{let o=this.definedPlacementZoneCache().get(r.placementKey);if(o){this.upsertPlacementZoneDefinition(o.zone,o.bounds,o.normalized);continue}if(!r.specificAreaSvgLink)continue;let s=await fetch(r.specificAreaSvgLink);if(!s.ok)continue;let a=await s.text(),c=new DOMParser().parseFromString(a,ss);if(c.documentElement.nodeName.toLowerCase()!=="svg")continue;let d=c.documentElement.querySelector("path, circle, rect, polygon, ellipse, g");if(!d)continue;let u=this.extractPlacementPathData(d);if(!u)continue;let f=this.measurePathBounds(u)??this.readElementBounds(d);if(!f)continue;let h=this.computePlacementZoneNormalizedBounds(f,t);if(!h)continue;let p=this.generatePlacementZoneId(r.placementKey,e),v=["text","logo"],g={id:p,placementKey:r.placementKey,label:r.name||r.placementKey,elementName:"path",allowedKinds:v,required:!1,pathData:u,bounds:f};this.cacheDefinedPlacementZone(g,f,h),this.upsertPlacementZoneDefinition(g,f,h)}catch{}this.sortPlacementZones(),this.customizerState.render2d()}computePlacementZoneNormalizedBounds(e,t){if(!t.width||!t.height)return null;let n=(e.x-t.x)/t.width,r=(e.x+e.width-t.x)/t.width,o=(e.y-t.y)/t.height,s=(e.y+e.height-t.y)/t.height;return r<=n||s<=o?null:{minX:Qt.clamp(n,0,1),maxX:Qt.clamp(r,0,1),minY:Qt.clamp(o,0,1),maxY:Qt.clamp(s,0,1)}}measurePathBounds(e){if(!e||typeof document>"u")return null;let t=document.createElementNS(Di,"svg");t.setAttribute("width","0"),t.setAttribute("height","0"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.opacity="0",t.style.pointerEvents="none";let n=document.createElementNS(t.namespaceURI,"path");n.setAttribute("d",e),t.appendChild(n),document.body.appendChild(t);try{let r=n.getBBox();return!r||r.width<=0||r.height<=0?null:{x:r.x,y:r.y,width:r.width,height:r.height}}catch{return null}finally{t.parentNode?.removeChild(t)}}upsertPlacementZoneDefinition(e,t,n){this.placementZones.update(r=>{let o=[...r],s=o.findIndex(a=>a.placementKey===e.placementKey);return s>=0?o[s]=e:o.push(e),o}),this.placementZoneBounds.update(r=>{let o=new Map(r);return o.set(e.placementKey,t),o}),this.placementZoneNormalizedBounds.update(r=>{let o=new Map(r);return o.set(e.placementKey,n),o})}cacheDefinedPlacementZone(e,t,n){this.definedPlacementZoneCache.update(r=>{let o=new Map(r);return o.set(e.placementKey,{zone:e,bounds:t,normalized:n}),o})}reapplyDefinedPlacementZonesFromCache(){this.definedPlacementZoneCache().size&&(this.definedPlacementZoneCache().forEach(({zone:e,bounds:t,normalized:n})=>{this.findPlacementZoneByKey(e.placementKey)||this.upsertPlacementZoneDefinition(e,t,n)}),this.sortPlacementZones())}sortPlacementZones(){this.placementZones.update(e=>[...e].sort((t,n)=>t.label.localeCompare(n.label)))}normalizePlacementAllowedKinds(e){let t=(e??"").split(/[\s,]+/).map(r=>r.trim().toLowerCase()).filter(Boolean),n=new Set;return t.forEach(r=>{r==="text"||r==="texts"?n.add("text"):(r==="logo"||r==="logos"||r==="image")&&n.add("logo")}),n.size||n.add("text"),Array.from(n)}generatePlacementZoneId(e,t){let n=e&&e.trim().length?e.trim():"placement-zone",r=n,o=1;for(;t.getElementById(r);)r=`${n}-${o}`,o+=1;return r}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}extractPlacementPathData(e){let t=e.tagName.toLowerCase();if(t==="path")return e.getAttribute("d")?.trim()??null;if(t==="rect")return this.rectElementToPathData(e);if(t==="polygon")return this.polygonElementToPathData(e);if(t==="circle"){let n=e,r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),s=parseFloat(n.getAttribute("r")??"50");return this.circleToPath(r,o,s)}if(t==="ellipse"){let n=e,r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),s=parseFloat(n.getAttribute("rx")??"50"),a=parseFloat(n.getAttribute("ry")??"50");return this.ellipseToPath(r,o,s,a)}return null}rectElementToPathData(e){let t=Number.parseFloat(e.getAttribute("x")??"0"),n=Number.parseFloat(e.getAttribute("y")??"0"),r=Number.parseFloat(e.getAttribute("width")??"0"),o=Number.parseFloat(e.getAttribute("height")??"0");return!Number.isFinite(r)||!Number.isFinite(o)||r<=0||o<=0?null:`M${t},${n} h${r} v${o} h${-r} Z`}polygonElementToPathData(e){let t=e.getAttribute("points")?.trim().split(/[\s,]+/).map(r=>Number.parseFloat(r))??[];if(t.length<4||t.length%2!==0)return null;let n=[];for(let r=0;r<t.length;r+=2)n.push(`${t[r]},${t[r+1]}`);return n.length===0?null:`M${n[0]} L${n.slice(1).join(" ")} Z`}circleToPath(e,t,n){let r=e+n,o=e-n;return`M ${r} ${t} A ${n} ${n} 0 1 0 ${o} ${t} A ${n} ${n} 0 1 0 ${r} ${t}`}ellipseToPath(e,t,n,r){let o=e+n,s=e-n;return`M ${o} ${t} A ${n} ${r} 0 1 0 ${s} ${t} A ${n} ${r} 0 1 0 ${o} ${t}`}getOverlayBoundingRect(){let e=this.customizerState.svgDoc();if(!e)return{x:0,y:0,width:0,height:0};let t=e.documentElement,n=t.viewBox?.baseVal;if(n&&n.width>0&&n.height>0)return{x:n.x,y:n.y,width:n.width,height:n.height};let r=Number.parseFloat(t.getAttribute("width")??"0"),o=Number.parseFloat(t.getAttribute("height")??"0");return r>0&&o>0?{x:0,y:0,width:r,height:o}:{x:0,y:0,width:1e3,height:1e3}}normalizeSvgPoint(e,t){let n=this.getOverlayBoundingRect();return!n.width||!n.height?{nx:.5,ny:.5}:{nx:e/n.width,ny:t/n.height}}computeDefaultFontSize(e,t){let n=t?Math.min(t.bounds.width,t.bounds.height):Math.min(e.width,e.height),o=Math.min(Math.max(n*.12,20),150);return Math.round(o*100)/100}estimateOverlayNormalizedSize(e){let t=this.getOverlayBoundingRect();if(!t.width||!t.height)return{width:0,height:0};if(e.kind==="logo")return{width:e.normalizedWidth,height:e.normalizedHeight};let n=this.measureTextOverlaySizeInSvgUnits(e);return{width:n.width/t.width,height:n.height/t.height}}getTextMeasureContext(){if(this.textMeasureContext)return this.textMeasureContext;if(typeof document>"u")return null;let e=document.createElement("canvas");return this.textMeasureContext=e.getContext("2d"),this.textMeasureContext}measureTextOverlaySizeInSvgUnits(e){let t=Math.max(e.fontSize,1),n=e.lineHeight??1.2,r=Math.max(t*n,t),o=(e.text||"").split(/\r?\n/),s=o.length?o:[""],a=e.letterSpacing??0,l=e.fontStyle??"normal",c=e.fontWeight??"normal",d=(e.fontFamily??"sans-serif").trim()||"sans-serif",u=t*.6,f=this.getTextMeasureContext();f&&(f.font=`${l} ${c} ${t}px ${d}`);for(let _ of s){let w=_.length?_:" ",D=f?f.measureText(w).width:w.length*t*.58,A=Math.max(w.length-1,0)*a;u=Math.max(u,D+A)}let h=this.normalizeScale(e.horizontalScale),p=this.normalizeScale(e.verticalScale),v=Number.isFinite(e.strokeWidth)?e.strokeWidth:0,g=Number.isFinite(e.secondStrokeWidth)?e.secondStrokeWidth:0,m=g>0?(v+g)*2:v*2,b=Math.max(u+m,t*.6),y=Math.max(r*s.length+m,r);return{width:Math.max(b*h,1),height:Math.max(y*p,1)}}buildLogoOverlay(e,t,n,r,o){if(!this.customizerState.svgDoc())return null;let s=!!o.specificAreaSvgLink,a=s?this.findPlacementZoneByKey(o.placementKey):null,l=this.getOverlayBoundingRect(),c=r>0?n/r:1,d,u;if(s&&a){let p=this.getPlacementZoneNormalizedBoundsByKey(a.placementKey);if(p){let v=p.maxX-p.minX,g=p.maxY-p.minY,m=Math.min(v*.8,g*.8,1);d=m,u=m/c;let b=Math.min((p.maxX-p.minX)/d,(p.maxY-p.minY)/u,1);d*=b,u*=b}else d=.28,u=d/c}else if(o.width&&o.height){let p=o.width,v=o.height,g=Math.min(p/n,v/r,1);d=g,u=g}else d=.28,u=d/c,u>.6&&(u=.6,d=u*c),d>.6&&(d=.6,u=d/c);d=Math.max(Math.min(d,.9),.05),u=Math.max(Math.min(u,.9),.05);let f;if(s&&a){let p=this.getPlacementZoneCenter(a,l);f={nx:p.nx,ny:p.ny}}else f=typeof o.x=="number"&&typeof o.y=="number"?this.normalizeSvgPoint(o.x,o.y):{nx:.5,ny:.42};let h={kind:"logo",id:`logo-${Date.now()}`,normalizedX:f.nx,normalizedY:f.ny,angle:0,lockAspectRatio:!0,imageSrc:e,imageName:t,originalWidth:n,originalHeight:r,normalizedWidth:d,normalizedHeight:u,opacity:1,placementKey:o.placementKey};return s&&a&&(h=this.applyPlacementZoneLogoBounds(h)),h}async removeWhiteBackgroundFromImage(e){let t=e;if(e.startsWith("blob:")){let d=await this.convertBlobUriToDataUrl(e);if(!d)return console.error("[PersonalizationService] Failed to convert blob URI to data URL for background removal"),null;t=d}let n=await this.loadImage(t);if(!n)return console.error("[PersonalizationService] Failed to load image for background removal from source:",e),null;let r=n.naturalWidth||n.width,o=n.naturalHeight||n.height;if(r<=0||o<=0)return console.error("[PersonalizationService] Invalid image dimensions:",{width:r,height:o}),null;let s=document.createElement("canvas");s.width=r,s.height=o;let a=s.getContext("2d",{willReadFrequently:!0});if(!a)return console.error("[PersonalizationService] Failed to get canvas 2d context"),null;try{a.drawImage(n,0,0,r,o)}catch(d){return console.error("[PersonalizationService] Failed to draw image to canvas:",d),null}let l;try{l=a.getImageData(0,0,r,o)}catch(d){return console.error("[PersonalizationService] Failed to get image data from canvas (likely tainted canvas):",d),null}let c=l.data;for(let d=0;d<c.length;d+=4){let u=c[d],f=c[d+1],h=c[d+2],p=c[d+3];if(p===0)continue;let v=Math.min(u,f,h),g=tg.whiteThreshold-tg.fadeRange;if(v>=tg.whiteThreshold){c[d+3]=0;continue}if(v>g){let m=(tg.whiteThreshold-v)/tg.fadeRange;c[d+3]=Math.max(0,Math.min(255,Math.round(p*m)))}}return a.putImageData(l,0,0),s.toDataURL("image/png")}normalizeScale(e){return Number.isFinite(e)?Qt.clamp(e,this.minOverlayScale,this.maxOverlayScale):1}normalizeNormalizedDimension(e){return Number.isFinite(e)?Qt.clamp(e,.02,1):.02}resolveOverlayNormalizedSize(e){return this.estimateOverlayNormalizedSize(e)}loadImage(e){return new Promise(t=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=()=>{console.error("[PersonalizationService] Failed to load image from source:",e),t(null)},n.src=e})}getPlacementZoneCenter(e,t){let n=e.bounds.x+e.bounds.width/2,r=e.bounds.y+e.bounds.height/2;return{nx:t.width?(n-t.x)/t.width:.5,ny:t.height?(r-t.y)/t.height:.5}}reset(){this.placementZoneNormalizedBounds.set(new Map)}async convertBlobUriToDataUrl(e){try{let t=await fetch(e);if(!t.ok)return console.error("[PersonalizationService] Failed to fetch blob URI:",e,t.status),null;let n=await t.blob();return new Promise(r=>{let o=new FileReader;o.onload=()=>{let s=o.result;r(typeof s=="string"?s:null)},o.onerror=()=>{console.error("[PersonalizationService] Failed to read blob as data URL"),r(null)},o.readAsDataURL(n)})}catch(t){return console.error("[PersonalizationService] Error converting blob URI to data URL:",t),null}}refreshTextOverlays(){this.customizerState.refreshFabricOverlays(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var gh=class i{decimals=_e(2);el=Z(Oi);regex=Me(()=>new RegExp(`^-?\\d*(\\.\\d{0,${this.decimals()}})?$`));onInput(e){let t=e.target,n=t.value;n&&(this.regex().test(n)||(t.value=this.trim(n)))}onBlur(){let e=this.el.nativeElement,t=parseFloat(e.value);isNaN(t)||(e.value=t.toFixed(this.decimals()))}onKeyDown(e){["e","E","+"].includes(e.key)&&e.preventDefault()}trim(e){let t=e.split(".");return t.length>1?(t[1]=t[1].slice(0,this.decimals()),t.join(".")):e}static \u0275fac=function(t){return new(t||i)};static \u0275dir=In({type:i,selectors:[["","appDecimalLimit",""]],hostBindings:function(t,n){t&1&&W("input",function(o){return n.onInput(o)})("blur",function(){return n.onBlur()})("keydown",function(o){return n.onKeyDown(o)})},inputs:{decimals:[1,"decimals"]}})};var gre=()=>[],u4=i=>({$implicit:i}),w_=(i,e)=>e.id,vre=(i,e)=>e.value,f4=(i,e)=>e.placementKey;function bre(i,e){if(i&1){let t=Ae();x(0,"div",2)(1,"label",5)(2,"input",6),W("ngModelChange",function(r){z(t);let o=C();return V(o.onToggleGuides(r))}),S(),x(3,"span",7),U(4,"span",8),S(),x(5,"span",9),U(6,"i",10),R(7," Show Text Guides "),S()()()}if(i&2){let t=C();T(),dt("is-on",t.showGuides()),T(),q("ngModel",t.showGuides())}}function yre(i,e){i&1&&(x(0,"div",17),U(1,"i",22),x(2,"span",23),R(3,"No text lines yet"),S(),x(4,"span",24),R(5,'Click "Add Name" to start a new text line for this placement.'),S()())}function xre(i,e){if(i&1){let t=Ae();x(0,"div",26)(1,"input",27),W("ngModelChange",function(r){let o=z(t).$implicit,s=C(4);return V(s.onTextModelChange(o,r))})("focus",function(){let r=z(t).$implicit,o=C(4);return V(o.onSelectOverlay(r))})("click",function(){let r=z(t).$implicit,o=C(4);return V(o.onSelectOverlay(r))}),S(),x(2,"div",28)(3,"app-ui-button",29),W("onClick",function(){let r=z(t).$implicit,o=C(4);return V(o.onSelectOverlay(r))}),U(4,"i",30),S(),x(5,"app-ui-button",31),W("onClick",function(){let r=z(t).$implicit,o=C(4);return V(o.onRemoveTextOverlay(r))}),U(6,"i",32),S()()()}if(i&2){let t=e.$implicit,n=C(3).$implicit,r=C();dt("is-active",t.id===r.activeOverlayId()),T(),q("placeholder","Enter "+n.name)("ngModel",t.text),T(2),q("severity",t.id===r.activeOverlayId()?"primary":"secondary"),T(2),q("text",!0)}}function _re(i,e){if(i&1&&(x(0,"div",18),mt(1,xre,7,6,"div",25,w_),S()),i&2){let t=C(2).$implicit,n=C();T(),gt(n.textOverlaysForPlacement(t))}}function Sre(i,e){if(i&1&&(x(0,"span",36),R(1),S()),i&2){let t=C();T(),ze(t.imageName)}}function Cre(i,e){i&1&&(x(0,"div",54),R(1),S()),i&2&&(T(),ze(e))}function wre(i,e){i&1&&(x(0,"div",54),R(1),S()),i&2&&(T(),ze(e))}function Ere(i,e){if(i&1&&(x(0,"option",68),R(1),S()),i&2){let t=e.$implicit;q("value",t.value),T(),ze(t.label)}}function Mre(i,e){if(i&1){let t=Ae();U(0,"div",60),x(1,"div",39),U(2,"i",66),R(3," Typography"),S(),x(4,"div",41)(5,"span",42),R(6,"Font"),S(),x(7,"select",67),W("ngModelChange",function(r){z(t);let o=C(2),s=C(3);return V(s.onFontFamilyChange(o,r))}),mt(8,Ere,2,2,"option",68,vre),S()()}if(i&2){let t=C(2),n=C(2).$implicit,r=C();T(7),q("ngModel",t.fontFamily??r.defaultFontFamilyByPlacement().get(n.placementKey)??r.defaultCustomFontFamily),T(),gt(r.fontOptionsByPlacement().get(n.placementKey)??Tw(1,gre))}}function Tre(i,e){if(i&1){let t=Ae();U(0,"div",60),x(1,"div",39),U(2,"i",69),R(3," Colour"),S(),x(4,"div",70)(5,"span",42),R(6,"Fill"),S(),x(7,"div",71)(8,"app-customizer-color-panel",72),W("colorSelected",function(r){z(t);let o=C(2),s=C(3);return V(s.onFillChange(o,r))}),S()()(),x(9,"div",70)(10,"span",42),R(11,"Outline"),S(),x(12,"div",71)(13,"app-customizer-color-panel",72),W("colorSelected",function(r){z(t);let o=C(2),s=C(3);return V(s.onStrokeChange(o,r))}),S(),x(14,"div",63)(15,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=C(2),s=C(3);return V(s.onStrokeWidthChange(o,r))}),S(),x(16,"span",65),R(17),S()()()(),x(18,"div",70)(19,"span",42),R(20,"Outline 2"),S(),x(21,"div",71)(22,"app-customizer-color-panel",72),W("colorSelected",function(r){z(t);let o=C(2),s=C(3);return V(s.onSecondStrokeChange(o,r))}),S(),x(23,"div",63)(24,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=C(2),s=C(3);return V(s.onSecondStrokeWidthChange(o,r))}),S(),x(25,"span",65),R(26),S()()()()}if(i&2){let t=C(2),n=C(2).$implicit,r=C();T(8),q("palette",r.paletteByItemId().get(n.id))("activeColor",t.fill),T(5),q("palette",r.paletteByItemId().get(n.id))("activeColor",t.stroke),T(2),q("min",r.minStrokeWidth())("max",r.maxStrokeWidth())("step",r.strokeWidthStep())("ngModel",t.strokeWidth??r.minStrokeWidth()),T(2),Tt("",t.strokeWidth??r.minStrokeWidth(),"px"),T(5),q("palette",r.paletteByItemId().get(n.id))("activeColor",t.secondStroke),T(2),q("min",r.minStrokeWidth())("max",r.maxStrokeWidth())("step",r.strokeWidthStep())("ngModel",t.secondStrokeWidth??r.minStrokeWidth()),T(2),Tt("",t.secondStrokeWidth??r.minStrokeWidth(),"px")}}function Dre(i,e){if(i&1&&(x(0,"option",74),R(1),S()),i&2){let t=e.$implicit;q("ngValue",t.id),T(),ze(t.name)}}function Are(i,e){if(i&1){let t=Ae();U(0,"div",60),x(1,"div",39),U(2,"i",73),R(3," Effect"),S(),x(4,"div",41)(5,"span",42),R(6,"Style"),S(),x(7,"select",67),W("ngModelChange",function(r){z(t);let o=C(2),s=C(2).$implicit,a=C();return V(a.onEffectChange(o,s,r))}),x(8,"option",74),R(9,"\u2014 None \u2014"),S(),mt(10,Dre,2,2,"option",74,w_),S()()}if(i&2){let t=C(2),n=C(2).$implicit,r=C();T(7),q("ngModel",r.selectedEffectIdForOverlay(t)),T(),q("ngValue",null),T(2),gt(r.effectsByItemId().get(n.id))}}function Ire(i,e){if(i&1){let t=Ae();x(0,"div",37)(1,"div",39),U(2,"i",40),R(3," Sizing"),S(),x(4,"div",41)(5,"span",42),R(6,"Font Size"),S(),x(7,"div",43)(8,"app-ui-button",44),W("onClick",function(){z(t);let r=C(),o=C(3);return V(o.onFontSizeStep(r,-o.fontSizeStep()))}),U(9,"i",45),S(),x(10,"input",46),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onFontSizeChange(o,r))}),S(),x(11,"span",47),R(12,"px"),S(),x(13,"app-ui-button",44),W("onClick",function(){z(t);let r=C(),o=C(3);return V(o.onFontSizeStep(r,o.fontSizeStep()))}),U(14,"i",48),S()()(),x(15,"div",41)(16,"span",42),R(17,"Rotation"),S(),x(18,"div",43)(19,"app-ui-button",49),W("onClick",function(){z(t);let r=C(),o=C(3);return V(o.onRotationStep(r,-o.rotationStep()))}),U(20,"i",45),S(),x(21,"input",50),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onRotationChange(o,r))}),S(),x(22,"span",47),R(23,"\xB0"),S(),x(24,"app-ui-button",49),W("onClick",function(){z(t);let r=C(),o=C(3);return V(o.onRotationStep(r,o.rotationStep()))}),U(25,"i",48),S(),x(26,"app-ui-button",51),W("onClick",function(){z(t);let r=C(),o=C(3);return V(o.onRotationReset(r))}),U(27,"i",52),S()()(),x(28,"div",41)(29,"span",42),R(30,"Spacing"),S(),x(31,"div",43)(32,"input",46),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onLetterSpacingChange(o,r))}),S(),x(33,"span",47),R(34,"in"),S()()(),x(35,"div",41)(36,"span",42),R(37,"Width"),S(),x(38,"div",43)(39,"input",53),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onOverlayWidthChange(o,r))}),S(),x(40,"span",47),R(41,"in"),S()()(),le(42,Cre,2,1,"div",54),x(43,"div",41)(44,"span",42),R(45,"Height"),S(),x(46,"div",43)(47,"input",53),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onOverlayHeightChange(o,r))}),S(),x(48,"span",47),R(49,"in"),S()()(),le(50,wre,2,1,"div",54),x(51,"label",55)(52,"input",56),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onAspectRatioToggle(o,r))}),S(),U(53,"i",57),x(54,"span"),R(55,"Lock Ratio"),S()(),x(56,"app-ui-button",58),W("onClick",function(){z(t);let r=C(),o=C(3);return V(o.onResetTextDimensions(r))}),U(57,"i",59),R(58),S(),le(59,Mre,10,2),le(60,Tre,27,16),le(61,Are,12,2),U(62,"div",60),x(63,"div",39),U(64,"i",61),R(65," Shadow"),S(),x(66,"div",62)(67,"div",41)(68,"span",42),R(69,"Blur"),S(),x(70,"div",63)(71,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onShadowBlurChange(o,r))}),S(),x(72,"span",65),R(73),S()()(),x(74,"div",41)(75,"span",42),R(76,"Offset X"),S(),x(77,"div",63)(78,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onShadowOffsetXChange(o,r))}),S(),x(79,"span",65),R(80),S()()(),x(81,"div",41)(82,"span",42),R(83,"Offset Y"),S(),x(84,"div",63)(85,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=C(),s=C(3);return V(s.onShadowOffsetYChange(o,r))}),S(),x(86,"span",65),R(87),S()()()()()}if(i&2){let t,n,r,o,s,a=C(),l=C(2).$implicit,c=C();T(8),q("text",!0)("disabled",a.fontSize<=c.minFontSize()),T(2),q("ngModel",a.fontSize)("min",c.minFontSize())("max",c.maxFontSize())("step",c.fontSizeStep()),T(3),q("text",!0)("disabled",a.fontSize>=c.maxFontSize()),T(6),q("text",!0),T(2),q("ngModel",a.angle),T(3),q("text",!0),T(2),q("text",!0),T(6),q("ngModel",c.overlayLetterSpacingInches(a))("min",c.overlayLetterSpacingLimitsInches(a).min)("max",c.overlayLetterSpacingLimitsInches(a).max)("step",c.letterSpacingStep()),T(7),q("ngModel",c.overlayWidthInches(a))("min",c.minDimensionInches())("max",c.maxDimensionInches()),T(3),ce((t=c.overlayDimensionError(a,"width"))?42:-1,t),T(5),q("ngModel",c.overlayHeightInches(a))("min",c.minDimensionInches())("max",c.maxDimensionInches()),T(3),ce((n=c.overlayDimensionError(a,"height"))?50:-1,n),T(),dt("ratio-lock--on",c.isAspectRatioLocked(a)),T(),q("ngModel",c.isAspectRatioLocked(a)),T(4),q("text",!0),T(2),Tt(" ",c.labels.resetTextDimensions," "),T(),ce((r=c.fontOptionsByPlacement().get(l.placementKey))!=null&&r.length?59:-1),T(),ce((o=c.paletteByItemId().get(l.id))!=null&&o.length?60:-1),T(),ce((((s=c.effectsByItemId().get(l.id))==null?null:s.length)??0)>0?61:-1),T(10),q("min",c.minShadowBlur())("max",c.maxShadowBlur())("step",c.shadowBlurStep())("ngModel",a.shadowBlur??c.defaultShadowBlur()),T(2),Tt("",a.shadowBlur??c.defaultShadowBlur(),"px"),T(5),q("min",c.minShadowOffset())("max",c.maxShadowOffset())("step",c.shadowOffsetStep())("ngModel",a.shadowOffsetX??c.defaultShadowOffsetX()),T(2),Tt("",a.shadowOffsetX??c.defaultShadowOffsetX(),"px"),T(5),q("min",c.minShadowOffset())("max",c.maxShadowOffset())("step",c.shadowOffsetStep())("ngModel",a.shadowOffsetY??c.defaultShadowOffsetY()),T(2),Tt("",a.shadowOffsetY??c.defaultShadowOffsetY(),"px")}}function Pre(i,e){i&1&&(x(0,"div",38),U(1,"i",75),x(2,"p",76),R(3," Drag the logo inside any 2D view or directly on the 3D model to reposition it. Use the corner handles in the 2D preview to scale or rotate. "),S(),x(4,"p",77),U(5,"i",78),R(6," Tip: Switch the selected view to drop additional logos onto other areas of the garment. "),S()())}function Ore(i,e){if(i&1&&(x(0,"div",20)(1,"div",33),U(2,"i",34),x(3,"span",35),R(4),S(),le(5,Sre,2,1,"span",36),S(),le(6,Ire,88,47,"div",37)(7,Pre,7,0,"div",38),S()),i&2){let t=e,n=C(3);T(4),ze(n.resolveOverlayLabel(t)),T(),ce(t.kind===n.overlayKind.LOGO&&t.imageName?5:-1),T(),ce(t.kind===n.overlayKind.TEXT?6:7)}}function Rre(i,e){i&1&&(x(0,"div",21),U(1,"i",79),x(2,"span",24),R(3,"Add text for this placement to unlock size & rotation controls."),S()())}function kre(i,e){if(i&1){let t=Ae();x(0,"div",11)(1,"div",12)(2,"span",13),U(3,"i",14),R(4," Text Lines "),S(),x(5,"app-ui-button",15),W("onClick",function(){z(t);let r=C().$implicit,o=C();return V(o.onAddTextOverlay(r))}),U(6,"i",16),S()(),le(7,yre,6,0,"div",17)(8,_re,3,0,"div",18),S(),x(9,"div",11)(10,"div",12)(11,"span",13),U(12,"i",19),R(13," Overlay Transform "),S()(),le(14,Ore,8,3,"div",20)(15,Rre,4,0,"div",21),S()}if(i&2){let t,n=C().$implicit,r=C();T(5),q("label",dv("Add ",n.name))("text",!0),T(2),ce(r.textOverlaysForPlacement(n).length===0?7:8),T(7),ce((t=r.overlayForPlacement(n))?14:15,t)}}function Fre(i,e){if(i&1){let t=Ae();x(0,"div",81),U(1,"i",89),x(2,"span"),R(3),S(),x(4,"button",90),W("click",function(){z(t);let r=C(3);return V(r.clearLogoUploadError())}),U(5,"i",91),S()()}if(i&2){let t=C(3);T(3),ze(t.logoUploadError())}}function Nre(i,e){if(i&1){let t=Ae();x(0,"div",85)(1,"div",92)(2,"div",93)(3,"span",94),U(4,"i",95),R(5," Your Logo Library "),S()(),x(6,"app-media-library-items",96),W("itemSelected",function(r){z(t);let o=C(2).$implicit,s=C();return V(s.onMediaLibraryLogoSelected(r,o))}),S()()()}if(i&2){let t=C(3);T(6),q("mediaType",t.MediaLibraryType.LOGO)("userUniqueId",t.userUniqueId())("apiKey",t.apiKey())}}function Lre(i,e){if(i&1&&(x(0,"option",68),R(1),S()),i&2){let t=e.$implicit;q("value",t.id),T(),ze(t.imageName||"Logo")}}function Ure(i,e){if(i&1){let t=Ae();x(0,"div",41)(1,"span",42),R(2),S(),x(3,"select",67),W("ngModelChange",function(r){z(t);let o=C(3).$implicit,s=C();return V(s.onLogoSelectionChange(o,r))}),mt(4,Lre,2,2,"option",68,w_),S()()}if(i&2){let t=C(3).$implicit,n=C();T(2),ze(n.labels.logoToEdit),T(),q("ngModel",n.selectedLogoIdForPlacement(t)),T(),gt(n.logosForPlacement(t))}}function Bre(i,e){i&1&&(x(0,"div",54),R(1),S()),i&2&&(T(),ze(e))}function zre(i,e){i&1&&(x(0,"div",54),R(1),S()),i&2&&(T(),ze(e))}function Vre(i,e){if(i&1){let t=Ae();x(0,"div",86)(1,"div",39),U(2,"i",97),R(3," Logo Settings"),S(),le(4,Ure,6,2,"div",41),x(5,"div",41)(6,"span",42),R(7,"Width"),S(),x(8,"div",43)(9,"input",53),W("ngModelChange",function(r){let o=z(t),s=C(3);return V(s.onOverlayWidthChange(o,r))}),S(),x(10,"span",47),R(11,"in"),S()()(),le(12,Bre,2,1,"div",54),x(13,"div",41)(14,"span",42),R(15,"Height"),S(),x(16,"div",43)(17,"input",53),W("ngModelChange",function(r){let o=z(t),s=C(3);return V(s.onOverlayHeightChange(o,r))}),S(),x(18,"span",47),R(19,"in"),S()()(),le(20,zre,2,1,"div",54),x(21,"label",55)(22,"input",56),W("ngModelChange",function(r){let o=z(t),s=C(3);return V(s.onAspectRatioToggle(o,r))}),S(),U(23,"i",57),x(24,"span"),R(25,"Lock Ratio"),S()()()}if(i&2){let t,n,r=e,o=C(2).$implicit,s=C();T(4),ce(s.logosForPlacement(o).length>1?4:-1),T(5),q("ngModel",s.overlayWidthInches(r))("min",s.minDimensionInches())("max",s.maxDimensionInches()),T(3),ce((t=s.overlayDimensionError(r,"width"))?12:-1,t),T(5),q("ngModel",s.overlayHeightInches(r))("min",s.minDimensionInches())("max",s.maxDimensionInches()),T(3),ce((n=s.overlayDimensionError(r,"height"))?20:-1,n),T(),dt("ratio-lock--on",s.isAspectRatioLocked(r)),T(),q("ngModel",s.isAspectRatioLocked(r))}}function Hre(i,e){i&1&&(x(0,"div",17),U(1,"i",98),x(2,"span",23),R(3,"No logos yet"),S(),x(4,"span",24),R(5,"Upload a PNG, JPG, WebP, or SVG to place one."),S()())}function Gre(i,e){i&1&&U(0,"i",104)}function jre(i,e){i&1&&U(0,"i",105)}function Wre(i,e){if(i&1){let t=Ae();x(0,"div",100),W("click",function(){let r=z(t).$implicit,o=C(3).$implicit,s=C();return V(s.onLogoSelectionChange(o,r.id))}),U(1,"img",101),x(2,"div",102)(3,"button",103),W("click",function(r){let o=z(t).$implicit,s=C(4);return r.stopPropagation(),V(s.onRemoveWhiteBackground(o))}),le(4,Gre,1,0,"i",104)(5,jre,1,0,"i",105),S(),x(6,"button",106),W("click",function(r){let o=z(t).$implicit,s=C(4);return r.stopPropagation(),V(s.onLogoRemove(o))}),U(7,"i",32),S()()()}if(i&2){let t=e.$implicit,n=C(4);T(),q("src",t.imageSrc,fi)("alt",t.imageName||"Logo"),T(2),q("disabled",n.isRemovingWhiteBackground(t.id))("appTooltip",n.labels.removeWhiteBgTooltip),fn("aria-label",n.labels.removeWhiteBg),T(),ce(n.isRemovingWhiteBackground(t.id)?4:5)}}function $re(i,e){if(i&1&&(x(0,"div",88),mt(1,Wre,8,6,"div",99,w_),S()),i&2){let t=C(2).$implicit,n=C();T(),gt(n.logosForPlacement(t))}}function Yre(i,e){if(i&1){let t=Ae();x(0,"div",11)(1,"div",12)(2,"span",13),U(3,"i",80),R(4," Logo Upload "),S()(),le(5,Fre,6,1,"div",81),x(6,"app-ui-fileupload",82),W("onSelect",function(r){z(t);let o=C().$implicit,s=C();return V(s.onLogoFileSelected(r,o))}),S(),x(7,"p",83),U(8,"i",84),R(9," Logos drop onto the selected view. Adjust size and rotation from the 2D preview handles. Max file size: 25MB "),S(),le(10,Nre,7,3,"div",85),le(11,Vre,26,12,"div",86),x(12,"div",87),le(13,Hre,6,0,"div",17)(14,$re,3,0,"div",88),S()()}if(i&2){let t,n=C().$implicit,r=C();T(5),ce(r.logoUploadError()?5:-1),T(5),ce(r.userUniqueId()?10:-1),T(),ce((t=r.logoOverlayForPlacement(n))?11:-1,t),T(2),ce(r.logosForPlacement(n).length===0?13:14)}}function Xre(i,e){if(i&1&&(le(0,kre,16,5),le(1,Yre,15,4,"div",11)),i&2){let t=e.$implicit,n=C();ce(t.type===n.personalizationItemType.TEXT?0:-1),T(),ce(t.type===n.personalizationItemType.LOGO?1:-1)}}function qre(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",68)(1,"app-ui-accordion-header")(2,"div",107),U(3,"i"),x(4,"span",108),R(5),S()()(),x(6,"app-ui-accordion-content"),Rr(7,109),S()()),i&2){let t=e.$implicit,n=C(2),r=dr(3);q("value",t.id),T(3),ur(dv("",t.type===n.personalizationItemType.TEXT?"ri-text":"ri-image-line"," accordion-header-icon")),T(2),ze(t.name),T(2),q("ngTemplateOutlet",r)("ngTemplateOutletContext",Ts(7,u4,t))}}function Kre(i,e){if(i&1&&(x(0,"app-ui-accordion"),mt(1,qre,8,9,"app-ui-accordion-panel",68,f4),S()),i&2){let t=C();T(),gt(t.placements())}}function Zre(i,e){if(i&1&&(x(0,"div",110)(1,"div",111),U(2,"i"),x(3,"span"),R(4),S()(),Rr(5,109),S()),i&2){let t=e.$implicit,n=C(2),r=dr(3);T(2),ur(t.type===n.personalizationItemType.TEXT?"ri-text":"ri-image-line"),T(2),ze(t.name),T(),q("ngTemplateOutlet",r)("ngTemplateOutletContext",Ts(5,u4,t))}}function Jre(i,e){if(i&1&&(x(0,"div",3),mt(1,Zre,6,7,"div",110,f4),S()),i&2){let t=C();T(),gt(t.placements())}}var C_=class i{overlayKind=za;personalizationItemType=Ha;MediaLibraryType=Jd;defaultCustomFontFamily=yr;labels=bU;fontSizeDebounceTimer;items=_e([]);userUniqueId=_e("");apiKey=_e("");useAccordion=Me(()=>(this.items()??[]).length>1);paletteByItemId=Me(()=>{let e=new Map;for(let t of this.items()){if(!t?.id)continue;let n=new Map,r=t.packs??[];for(let o of r)if((o.type??"").toLowerCase().includes(Ga.COLOR))for(let s of o.dataSources??[]){if(!s||s.isActive===!1)continue;let a=s.colorCode?.trim();!a||n.has(a)||n.set(a,{label:(s.name??a).trim()||a,color:a,position:s.position??n.size})}e.set(t.id,[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,color:s})=>({label:o,color:s})))}return e});effectsByItemId=Me(()=>{let e=new Map;for(let t of this.items()){if(!t?.id)continue;let n=t.packs??[];e.set(t.id,n.filter(r=>(r.type??"").toLowerCase().includes(Ga.EFFECT)).flatMap(r=>r.dataSources).sort((r,o)=>r.position-o.position))}return e});personalization=Z(sc);customizer=Z(Dn);placements=this.personalization.placements;hasBoundary=this.personalization.hasBoundary;showGuides=this.personalization.showPlacementGuides;activeOverlayId=this.personalization.activeOverlayId;logoUploadError=F(null);fontSourceMap=F({});fontOptions=F([]);fontOptionsByPlacement=F(new Map);defaultFontFamilyByPlacement=Me(()=>{let e=new Map;return this.fontOptionsByPlacement().forEach((t,n)=>{e.set(n,t[0]?.value??yr)}),e});fontBinaryPromises=F(new Map);fontFacePromises=F(new Map);fontFacesReady=F(new Set);removingWhiteBgLogoIds=F(new Set);selectedLogoIdByPlacement=F(new Map);dimensionErrorsByOverlayId=F(new Map);mediaLibraryLogoLoading=this.personalization.mediaLibraryLogoLoadingId;isLoadingMediaLibraryLogo=Me(()=>!!this.mediaLibraryLogoLoading());minFontSize=F(12);maxFontSize=F(400);fontSizeStep=F(2);rotationStep=F(5);defaultFontWeight=F("normal");defaultFontStyle=F("normal");defaultLetterSpacing=F(0);strokeWidthStep=F(.5);minStrokeWidth=F(0);maxStrokeWidth=F(30);letterSpacingStep=F(.01);defaultCurveAmount=F(0);minCurveAmount=F(-100);maxCurveAmount=F(150);curveAmountStep=F(1);defaultShadowBlur=F(0);minShadowBlur=F(0);maxShadowBlur=F(60);shadowBlurStep=F(1);defaultShadowOffsetX=F(0);defaultShadowOffsetY=F(0);minShadowOffset=F(-120);maxShadowOffset=F(120);shadowOffsetStep=F(1);minDimensionInches=F(.01);maxDimensionInches=F(4e3);constructor(){Yt(()=>{this.personalization.setPlacements(this.items())}),Yt(()=>{this.ingestFontPacks(this.items())})}overlayForPlacement(e){return this.personalization.getOverlayForPlacement(e.placementKey)}logosForPlacement(e){return this.personalization.getLogosForPlacement(e.placementKey)}textOverlaysForPlacement(e){return this.personalization.getTextOverlaysForPlacement(e.placementKey)}onToggleGuides(e){this.personalization.togglePlacementGuides(e)}onTextInput(e,t){let n=this.defaultFontFamilyByPlacement().get(e.placementKey)??yr;this.queueFontFaceLoad(n),this.personalization.onTextInput(e,t,n)}onAddTextOverlay(e){let t=this.defaultFontFamilyByPlacement().get(e.placementKey)??yr;this.queueFontFaceLoad(t),this.personalization.createTextOverlay(e,t)}onTextModelChange(e,t){this.personalization.updateTextOverlayText(e,t)}onSelectOverlay(e){if(Dt(e)){let t=e.fontFamily?.trim()||yr;this.queueFontFaceLoad(t)}this.personalization.setActiveOverlay(e)}onRemoveTextOverlay(e){this.personalization.removeOverlay(e.id)}onLogoFileSelected(e,t){let n=this.personalization.onLogoFileSelected(e,t);n?this.logoUploadError.set(n):this.logoUploadError.set(null)}clearLogoUploadError(){this.logoUploadError.set(null)}onMediaLibraryLogoSelected(e,t){this.personalization.onMediaLibraryLogoSelected(e,t)}onLogoRemove(e){this.personalization.removeOverlay(e.id)}async onRemoveWhiteBackground(e){if(!this.removingWhiteBgLogoIds().has(e.id)){this.removingWhiteBgLogoIds.update(t=>{let n=new Set(t);return n.add(e.id),n});try{await this.personalization.removeWhiteBackgroundFromLogo(e.id)}finally{this.removingWhiteBgLogoIds.update(t=>{let n=new Set(t);return n.delete(e.id),n})}}}isRemovingWhiteBackground(e){return this.removingWhiteBgLogoIds().has(e)}resolveOverlayLabel(e){return this.personalization.resolveOverlayLabel(e)}onFontSizeChange(e,t,n=!0){if(!e||!Dt(e))return;let r=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(r)&&(n?(clearTimeout(this.fontSizeDebounceTimer),this.fontSizeDebounceTimer=setTimeout(()=>{this.personalization.updateOverlayProperties(e,{fontSize:Math.max(this.minFontSize(),Math.min(this.maxFontSize(),r))})},600)):this.personalization.updateOverlayProperties(e,{fontSize:Math.max(this.minFontSize(),Math.min(this.maxFontSize(),r))}))}onFontSizeStep(e,t){if(!e||!Dt(e))return;let n=e.fontSize||this.minFontSize();this.onFontSizeChange(e,n+t,!1)}onRotationChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{angle:n})}onRotationStep(e,t){if(!e||!Dt(e))return;let n=e.angle||0;this.onRotationChange(e,n+t)}onRotationReset(e){!e||!Dt(e)||this.personalization.updateOverlayProperties(e,{angle:0})}overlayWidthInches(e){return Math.round(this.personalization.getOverlayDimensionsInches(e).width*100)/100}overlayHeightInches(e){return Math.round(this.personalization.getOverlayDimensionsInches(e).height*100)/100}overlayLetterSpacingInches(e){return Math.round(this.personalization.getOverlayLetterSpacingInches(e)*100)/100}overlayLetterSpacingLimitsInches(e){return this.personalization.getOverlayLetterSpacingLimitsInches(e)}isAspectRatioLocked(e){return e.lockAspectRatio??!0}onAspectRatioToggle(e,t){this.personalization.setOverlayAspectRatioLock(e,!!t)}onOverlayWidthChange(e,t){this.applyOverlayDimensionChange(e,t,"width")}onOverlayHeightChange(e,t){this.applyOverlayDimensionChange(e,t,"height")}onResetTextDimensions(e){!e||!Dt(e)||(this.personalization.updateOverlayProperties(e,{horizontalScale:1,verticalScale:1}),this.setOverlayDimensionError(e.id,"width",null),this.setOverlayDimensionError(e.id,"height",null))}overlayDimensionError(e,t){return this.dimensionErrorsByOverlayId().get(e.id)?.[t]??null}onFontFamilyChange(e,t){if(!e||!Dt(e))return;let n=(t??"").trim();n&&this.queueFontFaceLoad(n),this.personalization.updateOverlayProperties(e,{fontFamily:t})}toggleFontWeight(e){if(!e||!Dt(e))return;let n=(e.fontWeight??this.defaultFontWeight())==="bold"?"normal":"bold";this.personalization.updateOverlayProperties(e,{fontWeight:n})}toggleFontStyle(e){if(!e||!Dt(e))return;let n=(e.fontStyle??this.defaultFontStyle())==="italic"?"normal":"italic";this.personalization.updateOverlayProperties(e,{fontStyle:n})}onFillChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="string"&&t.trim().length>0?t:e.fill;this.personalization.updateOverlayProperties(e,{fill:n})}onStrokeChange(e,t){if(!e||!Dt(e))return;let n=e.stroke??"#111827",r=typeof t=="string"&&t.trim().length>0?t:n;this.personalization.updateOverlayProperties(e,{stroke:r})}onStrokeWidthChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{strokeWidth:Math.max(this.minStrokeWidth(),Math.min(this.maxStrokeWidth(),n))})}onSecondStrokeChange(e,t){if(!e||!Dt(e))return;let n=e.secondStroke??"#ffffff",r=typeof t=="string"&&t.trim().length>0?t:n;this.personalization.updateOverlayProperties(e,{secondStroke:r})}onSecondStrokeWidthChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{secondStrokeWidth:Math.max(this.minStrokeWidth(),Math.min(this.maxStrokeWidth(),n))})}onLetterSpacingChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(n))return;let r=this.personalization.getOverlayLetterSpacingLimitsInches(e),o=Math.max(r.min,Math.min(r.max,n));this.personalization.updateOverlayLetterSpacingInches(e,o)}onCurveAmountChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{curveAmount:Math.max(this.minCurveAmount(),Math.min(this.maxCurveAmount(),n))})}onShadowBlurChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowBlur:Math.max(this.minShadowBlur(),Math.min(this.maxShadowBlur(),n))})}onShadowOffsetXChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowOffsetX:Math.max(this.minShadowOffset(),Math.min(this.maxShadowOffset(),n))})}onShadowOffsetYChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowOffsetY:Math.max(this.minShadowOffset(),Math.min(this.maxShadowOffset(),n))})}selectedEffectIdForOverlay(e){return e?.id?this.personalization.getSelectedEffectIdForOverlay(e.id):null}onEffectChange(e,t,n){if(!e||!Dt(e)||!t?.id)return;let o=(this.effectsByItemId().get(t.id)??[]).find(s=>s.id===n)??null;this.personalization.applyTextEffect(e,o)}logoOverlayForPlacement(e){let t=this.logosForPlacement(e);if(!t.length)return null;let n=this.selectedLogoIdByPlacement().get(e.placementKey);if(n){let o=t.find(s=>s.id===n);if(o)return o}let r=this.overlayForPlacement(e);return r&&ai(r)?r:t[0]??null}selectedLogoIdForPlacement(e){return this.logoOverlayForPlacement(e)?.id??null}onLogoSelectionChange(e,t){if(!e?.placementKey||!t)return;this.selectedLogoIdByPlacement.update(r=>{let o=new Map(r);return o.set(e.placementKey,t),o});let n=this.logosForPlacement(e).find(r=>r.id===t);n&&this.onSelectOverlay(n)}normalizeDimensionInput(e){let t=typeof e=="number"?e:Number.parseFloat(e);return Number.isFinite(t)?t:Number.NaN}applyOverlayDimensionChange(e,t,n){let r=n==="width"?this.labels.widthLabel:this.labels.heightLabel,o=this.normalizeDimensionInput(t);if(!Number.isFinite(o)){this.setOverlayDimensionError(e.id,n,`${r} is required.`);return}let s=this.personalization.getOverlayDimensionLimitsInches(e),a=n==="width"?s.minWidth:s.minHeight,l=n==="width"?s.maxWidth:s.maxHeight;if(o<a){this.setOverlayDimensionError(e.id,n,`Min required: ${a.toFixed(2)} in`);return}if(o>l){this.setOverlayDimensionError(e.id,n,`Max required: ${l.toFixed(2)} in`);return}if(this.setOverlayDimensionError(e.id,n,null),n==="width"){this.personalization.updateOverlayDimensionsInches(e,{widthInches:o});return}this.personalization.updateOverlayDimensionsInches(e,{heightInches:o})}setOverlayDimensionError(e,t,n){this.dimensionErrorsByOverlayId.update(r=>{let o=r.get(e)??{width:null,height:null};if(o[t]===n)return r;let s=new Map(r);return s.set(e,he(k({},o),{[t]:n})),s})}ingestFontPacks(e){let t={},n=new Map,r=new Map;e.forEach(a=>{if(!a?.placementKey)return;let l=new Map;(a.packs??[]).filter(d=>(d.type??"").toLowerCase().includes("font")).forEach(d=>{(d.dataSources??[]).forEach(u=>{if(!u||u.isActive===!1)return;let f=(u.fontFamily??u.name??"").trim();if(!f)return;let h=this.resolveFontSource(u);h&&(t[f]=h,n.has(f)||n.set(f,{label:(u.name??f).trim()||f,value:f,position:u.position??n.size+1}),l.has(f)||l.set(f,{label:(u.name??f).trim()||f,value:f,position:u.position??l.size+1}))})}),l.size&&r.set(a.placementKey,l)});let o=new Map;r.forEach((a,l)=>{o.set(l,[...a.values()].sort((c,d)=>c.position-d.position).map(({label:c,value:d})=>({label:c,value:d})))});let s=[...n.values()].sort((a,l)=>a.position-l.position).map(({label:a,value:l})=>({label:a,value:l}));this.fontSourceMap.set(t),this.fontOptions.set(s),this.fontOptionsByPlacement.set(o),this.queueInitialFontFaceLoads(e,s,o)}queueInitialFontFaceLoads(e,t,n){let r=new Set;if(n.forEach(o=>{let s=o[0]?.value?.trim();s&&r.add(s)}),e.forEach(o=>{this.personalization.getTextOverlaysForPlacement(o.placementKey).forEach(a=>{let l=a.fontFamily?.trim();l&&r.add(l)})}),!r.size){let o=t[0]?.value?.trim();o&&r.add(o)}r.forEach(o=>this.queueFontFaceLoad(o))}resolveFontSource(e){let t=e.fontUrl?.trim();return t||(e.fileUrl?.trim()?e.fileUrl:null)}queueFontFaceLoad(e){if(!this.isBrowser()||!this.fontSourceMap()[e]||this.fontFacesReady().has(e))return;let n=this.fontFacePromises().get(e);if(!n){if(n=this.ensureFontFaceLoaded(e)??void 0,!n)return;this.fontFacePromises.update(r=>{let o=new Map(r);return o.set(e,n),o})}n.then(()=>{this.fontFacesReady().has(e)||this.fontFacesReady.update(r=>{let o=new Set(r);return o.add(e),o}),this.personalization.refreshTextOverlays()}).catch(r=>{console.error(Yx(e),r)})}isBrowser(){return typeof window<"u"}ensureFontFaceLoaded(e){let t=this.fontBinaryPromises().get(e);return t?t.then(n=>new Promise((r,o)=>{let s=new FontFace(e,n,{style:"normal",weight:"normal",stretch:"normal"});s.load().then(()=>{document.fonts&&document.fonts.add(s),r()}).catch(o)})).catch(n=>{throw console.error(rU(e),n),n}):null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-customizer-personalization-panel"]],inputs:{items:[1,"items"],userUniqueId:[1,"userUniqueId"],apiKey:[1,"apiKey"]},decls:7,vars:3,consts:[["placementContent",""],[1,"panel-body"],[1,"guide-toggle-bar"],[1,"placement-list"],["message","Loading logo from media library...",3,"show"],[1,"guide-toggle-label"],["type","checkbox",1,"guide-toggle-input",3,"ngModelChange","ngModel"],[1,"guide-toggle-track"],[1,"guide-toggle-knob"],[1,"guide-toggle-text"],[1,"ri-ruler-2-line","guide-toggle-icon"],[1,"ctrl-section"],[1,"ctrl-section-header"],[1,"ctrl-section-title"],[1,"ri-text-wrap"],["severity","secondary",1,"add-name-btn",3,"onClick","label","text"],[1,"ri-add-circle-line"],[1,"empty-state"],[1,"text-overlay-list"],[1,"ri-tools-line"],[1,"transform-box"],[1,"empty-state","empty-state--sm"],[1,"ri-cursor-line","empty-state-icon"],[1,"empty-state-heading"],[1,"empty-state-sub"],[1,"text-overlay-row",3,"is-active"],[1,"text-overlay-row"],["type","text",1,"text-overlay-input",3,"ngModelChange","focus","click","placeholder","ngModel"],[1,"text-overlay-actions"],["appTooltip","Select to transform","tooltipPosition","top",3,"onClick","severity"],[1,"ri-compasses-2-fill"],["severity","secondary","appTooltip","Remove text line","tooltipPosition","top",1,"remove-btn",3,"onClick","text"],[1,"ri-delete-bin-6-fill"],[1,"transform-overlay-label"],[1,"ri-focus-3-line"],[1,"font-medium"],[1,"transform-overlay-filename"],[1,"name-number-overlay-box"],[1,"logo-hint"],[1,"prop-group-heading"],[1,"ri-font-size"],[1,"prop-row"],[1,"prop-label"],[1,"stepper"],[3,"onClick","text","disabled"],[1,"ri-subtract-line"],["type","number","appDecimalLimit","2",1,"stepper-input",3,"ngModelChange","ngModel","min","max","step"],[1,"stepper-unit"],[1,"ri-add-line"],[3,"onClick","text"],["type","number","appDecimalLimit","2","step","0.5",1,"stepper-input",3,"ngModelChange","ngModel"],["severity","secondary","appTooltip","Reset rotation","tooltipPosition","top",3,"onClick","text"],[1,"ri-reset-left-line"],["type","number","appDecimalLimit","2","step","0.01",1,"stepper-input",3,"ngModelChange","ngModel","min","max"],[1,"field-error"],[1,"ratio-lock"],["type","checkbox",1,"ratio-lock-input",3,"ngModelChange","ngModel"],[1,"ri-link"],["severity","secondary",1,"reset-size-btn",3,"onClick","text"],[1,"ri-restart-line"],[1,"section-divider"],[1,"ri-stack-line"],[1,"shadow-group"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"ri-font-family"],[1,"prop-select",3,"ngModelChange","ngModel"],[3,"value"],[1,"ri-palette-line"],[1,"prop-row","prop-row--top"],[1,"prop-control"],[3,"colorSelected","palette","activeColor"],[1,"ri-magic-line"],[3,"ngValue"],[1,"ri-drag-move-2-line","logo-hint-icon"],[1,"logo-hint-text"],[1,"logo-hint-tip"],[1,"ri-lightbulb-line"],[1,"ri-mouse-line","empty-state-icon"],[1,"ri-image-add-line"],["role","alert",1,"logo-error-message"],["mode","basic","chooseLabel","Upload Logo","accept","image/png,image/jpeg,image/webp,image/svg+xml","customUpload","true",1,"w-full","upload-logo-btn",3,"onSelect"],[1,"upload-hint"],[1,"ri-information-line"],[1,"media-library-section"],[1,"logo-settings-box"],[1,"logo-grid-wrapper"],[1,"logo-grid"],[1,"ri-error-warning-line"],["type","button","aria-label","Close error message",1,"error-close-btn",3,"click"],[1,"ri-close-line"],[1,"media-library-preview-box"],[1,"preview-header"],[1,"preview-title"],[1,"ri-image-gallery-line"],[3,"itemSelected","mediaType","userUniqueId","apiKey"],[1,"ri-aspect-ratio-line"],[1,"ri-image-2-line","empty-state-icon"],[1,"logo-card"],[1,"logo-card",3,"click"],[1,"logo-card-img",3,"src","alt"],[1,"logo-card-overlay"],["type","button","tooltipPosition","top",1,"logo-card-action",3,"click","disabled","appTooltip"],[1,"ri-loader-4-line","animate-spin"],[1,"ri-eraser-line"],["type","button","appTooltip","Remove","tooltipPosition","top",1,"logo-card-action","logo-card-action--danger",3,"click"],[1,"accordion-header-content"],[1,"accordion-header-label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"placement-section"],[1,"placement-section-header"]],template:function(t,n){t&1&&(x(0,"div",1),le(1,bre,8,3,"div",2),Bo(2,Xre,2,2,"ng-template",null,0,cl),le(4,Kre,3,0,"app-ui-accordion")(5,Jre,3,0,"div",3),U(6,"app-ui-loader",4),S()),t&2&&(T(),ce(n.hasBoundary()?1:-1),T(3),ce(n.useAccordion()?4:5),T(2),q("show",n.isLoadingMediaLibraryLogo()))},dependencies:[Ut,jc,fr,Wv,$v,hl,kp,vE,jv,Is,Np,Fp,zo,ta,hh,Vi,_i,_r,xr,oc,ea,bi,ph,mh,gh],styles:['.logo-error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:12px;background-color:#fee2e2;border:1px solid #fca5a5;border-radius:4px;color:#991b1b;font-size:13px;line-height:1.4;animation:_ngcontent-%COMP%_slideDown .3s ease-in-out}.logo-error-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:16px;flex-shrink:0}.logo-error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.error-close-btn[_ngcontent-%COMP%]{flex-shrink:0;background:none;border:none;padding:2px;cursor:pointer;color:#991b1b;font-size:16px;display:flex;align-items:center;justify-content:center;transition:opacity .2s}.error-close-btn[_ngcontent-%COMP%]:hover{opacity:.7}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.guide-toggle-bar[_ngcontent-%COMP%]{padding:10px 14px 8px;border-bottom:1px solid #f0f0f0}.guide-toggle-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.guide-toggle-input[_ngcontent-%COMP%]{position:absolute;opacity:0;width:0;height:0}.guide-toggle-track[_ngcontent-%COMP%]{position:relative;display:inline-block;width:36px;height:20px;background:#d1d5db;border-radius:9999px;transition:background .25s ease;flex-shrink:0}.guide-toggle-knob[_ngcontent-%COMP%]{position:absolute;top:3px;left:3px;width:14px;height:14px;background:#fff;border-radius:50%;box-shadow:0 1px 4px #0000002e;transition:transform .25s ease}.guide-toggle-label.is-on[_ngcontent-%COMP%] .guide-toggle-track[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241))}.guide-toggle-label.is-on[_ngcontent-%COMP%] .guide-toggle-knob[_ngcontent-%COMP%]{transform:translate(16px)}.guide-toggle-text[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#111827}.guide-toggle-icon[_ngcontent-%COMP%]{font-size:14px;color:#374151}.ctrl-section[_ngcontent-%COMP%]{padding:12px 14px;border-bottom:1px solid #f5f5f5}.ctrl-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.ctrl-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.ctrl-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.ctrl-section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.add-name-btn[_ngcontent-%COMP%]{font-size:13px!important}.text-overlay-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.text-overlay-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;transition:border-color .15s,box-shadow .15s}.text-overlay-row.is-active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.text-overlay-input[_ngcontent-%COMP%]{flex:1;min-width:0;border:none;outline:none;background:transparent;font-size:13px;color:#1f2937;padding:2px 0}.text-overlay-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.text-overlay-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px;flex-shrink:0}.remove-btn[_ngcontent-%COMP%]{color:#ef4444!important}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 12px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.empty-state--sm[_ngcontent-%COMP%]{padding:12px}.empty-state-icon[_ngcontent-%COMP%]{font-size:22px;color:#d1d5db;margin-bottom:2px}.empty-state-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#374151}.empty-state-sub[_ngcontent-%COMP%]{font-size:12px;color:#64748b;line-height:1.5}.transform-box[_ngcontent-%COMP%]{border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb;overflow:hidden}.transform-overlay-label[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:6px;padding:8px 12px;background:#fff;border-bottom:1px solid #e5e7eb;font-size:13px;font-weight:600;color:#111827}.transform-overlay-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));font-size:13px}.transform-overlay-filename[_ngcontent-%COMP%]{font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.name-number-overlay-box[_ngcontent-%COMP%]{padding:10px 12px;display:flex;flex-direction:column;gap:8px}.prop-group-heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:#64748b;margin-top:4px}.prop-group-heading[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px;color:rgb(var(--primary-color, 98 101 241))}.section-divider[_ngcontent-%COMP%]{height:1px;background:#e5e7eb;margin:4px -12px}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-height:28px}.prop-row--top[_ngcontent-%COMP%]{align-items:flex-start}.prop-label[_ngcontent-%COMP%]{flex-shrink:0;width:72px;font-size:12px;font-weight:600;color:#111827}.prop-control[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:6px}.prop-select[_ngcontent-%COMP%]{flex:1;border:1px solid #d1d5db;border-radius:6px;padding:4px 8px;font-size:12px;color:#1f2937;background:#fff;outline:none;transition:border-color .15s,box-shadow .15s}.prop-select[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .15)}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;width:100%}.stepper-input[_ngcontent-%COMP%]{width:100%;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:13px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-unit[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-weight:500}.field-error[_ngcontent-%COMP%]{margin-top:-4px;margin-left:80px;font-size:11px;color:#dc2626;line-height:1.3}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:36px;text-align:right;font-size:12px;color:#374151;font-variant-numeric:tabular-nums}.shadow-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px 10px;border-radius:8px;background:#00000006;border:1px solid #e9eaec}.ratio-lock[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;width:fit-content;margin-top:2px;font-size:12px;font-weight:600;color:#374151;cursor:pointer;-webkit-user-select:none;user-select:none}.ratio-lock-input[_ngcontent-%COMP%]{margin:0}.ratio-lock--on[_ngcontent-%COMP%]{color:#111827;font-weight:700}.reset-size-btn[_ngcontent-%COMP%]{width:fit-content;font-size:12px!important}.logo-settings-box[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:4px;padding:10px;border-radius:8px;border:1px solid #e5e7eb;background:#f9fafb;display:flex;flex-direction:column;gap:8px}.logo-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:12px}.logo-hint-icon[_ngcontent-%COMP%]{font-size:20px;color:#d1d5db;align-self:center}.logo-hint-text[_ngcontent-%COMP%]{font-size:12px;color:#374151;line-height:1.55;margin:0}.logo-hint-tip[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;font-size:11px;color:#6b7280;margin:0}.logo-hint-tip[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#f59e0b;font-size:12px;flex-shrink:0;margin-top:1px}.upload-hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;color:#64748b;margin:6px 0 0}.upload-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#94a3b8;flex-shrink:0}.upload-logo-btn[_ngcontent-%COMP%] button.p-button[_ngcontent-%COMP%]{font-size:14px!important}.logo-grid-wrapper[_ngcontent-%COMP%]{margin-top:10px}.logo-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.logo-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;overflow:hidden;border-radius:10px;border:1px solid #e5e7eb;background:#fff;box-shadow:0 1px 3px #0000000f}.logo-card-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.logo-card-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:space-between;padding:6px;opacity:.7;background:linear-gradient(160deg,rgba(0,0,0,.32) 0%,transparent 60%);transition:opacity .2s ease}.logo-card[_ngcontent-%COMP%]:hover .logo-card-overlay[_ngcontent-%COMP%]{opacity:1}.logo-card-action[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:none;background:#ffffffe0;color:#374151;font-size:13px;cursor:pointer;box-shadow:0 1px 4px #0000002e;transition:background .15s,color .15s,transform .15s}.logo-card-action[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241));color:#fff;transform:scale(1.1)}.logo-card-action--danger[_ngcontent-%COMP%]:hover{background:#ef4444;color:#fff}.logo-card-action[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.placement-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:13px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#111827;border-left:3px solid rgb(var(--primary-color, 98 101 241))}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}.prop-label[_ngcontent-%COMP%]{width:60px}.stepper-input[_ngcontent-%COMP%]{width:46px}.logo-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}}.media-library-section[_ngcontent-%COMP%]{margin-top:14px}.select-from-library-btn[_ngcontent-%COMP%]{width:100%}.select-from-library-btn[_ngcontent-%COMP%] .p-button, .select-from-library-btn[_ngcontent-%COMP%] button{width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:10px 14px!important;background:linear-gradient(135deg,#6366f1,#8b5cf6)!important;color:#fff!important;border:none!important;border-radius:8px!important;font-size:13px!important;font-weight:600!important;cursor:pointer!important;transition:box-shadow .2s,transform .15s!important;box-shadow:0 2px 8px #6366f14d!important;letter-spacing:.01em!important}.select-from-library-btn[_ngcontent-%COMP%] .p-button:hover, .select-from-library-btn[_ngcontent-%COMP%] button:hover{box-shadow:0 4px 16px #6366f173!important;transform:translateY(-1px)!important}.media-library-preview-box[_ngcontent-%COMP%]{border:1.5px solid #e5e7eb;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 2px 10px #0000000f;animation:_ngcontent-%COMP%_fadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.preview-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#f8f8fc;border-bottom:1px solid #eeeefc}.preview-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#374151;letter-spacing:.02em}.preview-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#6366f1}.preview-close-btn[_ngcontent-%COMP%]{width:26px;height:26px;border-radius:6px;border:1px solid #e5e7eb;background:#fff;color:#9ca3af;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s,border-color .15s;padding:0}.preview-close-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#374151;border-color:#d1d5db}.media-library-preview-box[_ngcontent-%COMP%] app-media-library-items[_ngcontent-%COMP%]{display:block;padding:10px}'],changeDetection:0})};var vh=class i{constructor(e,t){this.customizerState=e;this.dialogService=t}minPatternOpacity=0;maxPatternOpacity=1;patternOpacityStep=.05;patternPathInput=F("");patternFillInput=F(ql);patternOpacityInput=F(1);patternOverlays=F([]);state=Me(()=>({overlays:this.patternOverlays(),fill:this.patternFillInput(),opacity:this.patternOpacityInput()}));reset(){this.patternOverlays.set([]),this.patternPathInput.set(""),this.patternFillInput.set(ql),this.patternOpacityInput.set(1)}refreshFromSvg(){this.refreshPatternOverlaysFromSvg()}async onAddPatternPathFromUrl(e,t,n){let r=this.customizerState.svgDoc();if(!r){this.showErrorDialog($s.svgRequired,os.svgRequired);return}if(!e){this.showErrorDialog($s.svgUrlRequired,os.svgUrlRequired);return}if(!this.patternOverlays().some(o=>o.sourceUrl===e))try{let o=await fetch(e,{cache:"no-cache"});if(!o.ok)throw new Error(`Failed to load SVG (${o.status})`);let s=await o.text();if(!s||!s.includes(Xx)){this.showErrorDialog($s.invalidSvgContent,os.invalidSvgContent);return}let l=new DOMParser().parseFromString(s,ss);if(l.querySelector(Yd)){this.showErrorDialog($s.unableToParseSvg,os.unableToParseSvg);return}let c=Array.from(l.querySelectorAll("path"));if(c.length===0){this.showErrorDialog($s.noPathElements,os.noPathElements);return}let d=this.ensurePatternOverlayLayer();c.forEach((u,f)=>{let h=r.importNode(u,!0),p=h.getAttribute("d")?.trim();if(!p)return;let v=this.readPresentationValue(h,"fill"),g=this.readPresentationValue(h,"opacity"),m=v&&v.toLowerCase()!=="none"?v:this.patternFillInput().trim()||ql,b=this.clampPatternOpacity(g?Number.parseFloat(g):this.patternOpacityInput()),y=Math.round(b*1e3)/1e3,_=h.getAttribute("id")?.trim(),w=_??`overlay-${Date.now()}-${f}`,D=this.generatePatternOverlayId(w);this.patternOverlays().some(A=>A.id===D)||(h.setAttribute("id",D),_&&_!==D&&h.setAttribute(me.DATA_PATTERN_SOURCE_ID,_),h.setAttribute(me.DATA_PATTERN_SOURCE_URL,e),h.setAttribute(me.DATA_PATTERN_OVERLAY,"true"),t&&h.setAttribute(me.DATA_PATTERN_THUMBNAIL_URL,t),n&&h.setAttribute(me.DATA_PATTERN_PLACEMENT_ID,n),this.stripStyleProperty(h,"fill"),this.stripStyleProperty(h,"opacity"),h.setAttribute("fill",m),h.setAttribute("opacity",y.toString()),h.setAttribute("d",p),d.appendChild(h))}),this.patternFillInput.set(this.patternFillInput()||ql),this.patternOpacityInput.set(this.patternOpacityInput()),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(r)}catch(o){console.error(os.addPatternFromUrlFailed,o),this.showErrorDialog($s.failedApplyPatternSvg,os.failedApplyPatternSvg)}}onAddPatternPath(e,t){let n=this.customizerState.svgDoc();if(!n){this.showErrorDialog($s.svgRequired,os.svgRequired);return}let r=e.trim();if(!r)return;let o=this.parsePatternPathSnippet(r);if(!o){this.showErrorDialog($s.invalidSvgPath,os.invalidSvgPath);return}let s=n.importNode(o,!0),a=s.getAttribute("d")?.trim();if(!a){this.showErrorDialog($s.missingPathData,os.missingPathData);return}let l=this.readPresentationValue(s,"fill"),c=this.readPresentationValue(s,"opacity"),d=l&&l.toLowerCase()!=="none"?l:this.patternFillInput().trim()||ql,u=this.clampPatternOpacity(c?Number.parseFloat(c):this.patternOpacityInput()),f=Math.round(u*1e3)/1e3,h=this.ensurePatternOverlayLayer(),p=s.getAttribute("id")?.trim(),v=this.generatePatternOverlayId(p);this.patternOverlays().some(g=>g.id===v)||(s.setAttribute("id",v),p&&p!==v&&s.setAttribute(me.DATA_PATTERN_SOURCE_ID,p),s.setAttribute(me.DATA_PATTERN_OVERLAY,"true"),t&&s.setAttribute(me.DATA_PATTERN_PLACEMENT_ID,t),this.stripStyleProperty(s,"fill"),this.stripStyleProperty(s,"opacity"),s.setAttribute("fill",d),s.setAttribute("opacity",f.toString()),s.setAttribute("d",a),h.appendChild(s),this.patternPathInput.set(""),this.patternFillInput.set(d),this.patternOpacityInput.set(f),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(n))}onPatternOpacityInputChange(e){let t=typeof e=="number"?e:Number.parseFloat(e);if(Number.isFinite(t)){this.patternOpacityInput.set(this.clampPatternOpacity(t));return}this.patternOpacityInput.set(this.clampPatternOpacity(this.patternOpacityInput()))}onPatternFillChange(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=t?.trim();if(!r)return;let o=n.getElementById(e);!o||o.getAttribute(me.DATA_PATTERN_OVERLAY)!=="true"||(this.stripStyleProperty(o,"fill"),o.setAttribute("fill",r),this.updatePatternOverlayRecord(e,{fill:r}),this.customizerState.markSvgMutated(n))}onPatternOpacityChange(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(r))return;let o=this.clampPatternOpacity(r),s=n.getElementById(e);if(!s||s.getAttribute(me.DATA_PATTERN_OVERLAY)!=="true")return;this.stripStyleProperty(s,"opacity");let a=Math.round(o*1e3)/1e3;s.setAttribute("opacity",a.toString()),this.updatePatternOverlayRecord(e,{opacity:a}),this.customizerState.markSvgMutated(n)}onRemovePatternOverlay(e){let t=this.customizerState.svgDoc();if(!t)return;let n=t.getElementById(e);n&&n.getAttribute(me.DATA_PATTERN_OVERLAY)==="true"&&n.parentNode?.removeChild(n),this.patternOverlays.set(this.patternOverlays().filter(r=>r.id!==e)),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(t)}refreshPatternOverlaysFromSvg(){let e=this.customizerState.svgDoc();if(!e){this.patternOverlays.set([]);return}let n=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).map(r=>{let o=r.getAttribute("id")?.trim();o||(o=this.generatePatternOverlayId(),r.setAttribute("id",o));let s=this.readPresentationValue(r,"fill"),a=s&&s.toLowerCase()!=="none"?s:ql,l=this.readPresentationValue(r,"opacity"),c=this.clampPatternOpacity(l?Number.parseFloat(l):1),d=r.getAttribute(me.DATA_PATTERN_SOURCE_URL)?.trim(),u=r.getAttribute(me.DATA_PATTERN_THUMBNAIL_URL)?.trim()||void 0,f=r.getAttribute(me.DATA_PATTERN_PLACEMENT_ID)?.trim()||null;return{id:o,label:r.getAttribute(me.DATA_PATTERN_SOURCE_ID)?.trim()||o,fill:a,placementId:f,opacity:c,pathData:r.getAttribute("d")??"",sourceUrl:d,thumbnailUrl:u}});if(this.patternOverlays.set(n),n.length>0){let r=n[n.length-1];this.patternOpacityInput.set(r.opacity)}else this.patternFillInput.set(ql),this.patternOpacityInput.set(1)}parsePatternPathSnippet(e){let t=e.trim();if(!t)return null;let n=new DOMParser,r;if(t.startsWith("<"))r=n.parseFromString(`<svg xmlns="${Di}">${t}</svg>`,ss);else{r=n.parseFromString(`<svg xmlns="${Di}"></svg>`,ss);let a=r.createElementNS(Di,"path");a.setAttribute("d",t),r.documentElement.appendChild(a)}if(r.querySelector(Yd))return null;let o=r.querySelector("path");if(!o)return null;let s=o.getAttribute("d");return!s||s.trim().length===0?null:o}ensurePatternOverlayLayer(){let e=this.customizerState.svgDoc();if(!e)throw new Error("SVG document not loaded");let t=e.documentElement,n=t.namespaceURI||Di,r=t.querySelector("#PatternOverlayLayer");if(!r){r=e.createElementNS(n,"g"),r.setAttribute("id","PatternOverlayLayer"),r.setAttribute(me.DATA_PATTERN_LAYER,"true");let o=t.querySelector("#OverlayLayer");o?.parentNode?o.parentNode.insertBefore(r,o):t.appendChild(r)}return r}generatePatternOverlayId(e){let t=this.customizerState.svgDoc(),r=e&&e.trim().length>0?e.trim().replace(/\s+/g,"_"):"pattern-overlay";if(!t)return`${r}-${Date.now()}`;if(!t.getElementById(r))return r;let o=1,s=`${r}-${o}`;for(;t.getElementById(s);)o+=1,s=`${r}-${o}`;return s}clampPatternOpacity(e){return Number.isFinite(e)?Math.min(this.maxPatternOpacity,Math.max(this.minPatternOpacity,e)):1}readPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}stripStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return;let r=t.toLowerCase(),o=n.split(";").map(s=>s.trim()).filter(s=>s&&!s.toLowerCase().startsWith(`${r}:`));o.length>0?e.setAttribute("style",o.join(";")):e.removeAttribute("style")}updatePatternOverlayRecord(e,t){this.patternOverlays.update(n=>n.map(r=>r.id===e?k(k({},r),t):r))}showErrorDialog(e,t){this.dialogService.showDialog({type:"error",title:e,message:t,buttons:[{label:"Dismiss",action:"confirm",isPrimary:!0}]})}static \u0275fac=function(t){return new(t||i)(Ke(Dn),Ke(Mo))};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var h4=i=>({$implicit:i}),eoe=(i,e)=>e.id,toe=(i,e)=>e.id??i;function noe(i,e){i&1&&(x(0,"div",2),U(1,"i",3),x(2,"span",4),R(3,"No overlays available"),S(),x(4,"span",5),R(5,"No overlay options have been configured for this product."),S()())}function ioe(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",6)(1,"app-ui-accordion-header")(2,"div",8),U(3,"i",9),x(4,"span",10),R(5),S()()(),x(6,"app-ui-accordion-content"),Rr(7,11),S()()),i&2){let t=e.$implicit;C(2);let n=dr(3);q("value",t.id),T(5),ze(t.name),T(2),q("ngTemplateOutlet",n)("ngTemplateOutletContext",Ts(4,h4,t))}}function roe(i,e){if(i&1&&(x(0,"app-ui-accordion",6),mt(1,ioe,8,6,"app-ui-accordion-panel",6,sl().trackByOverlayId,!0),S()),i&2){let t=C(2);q("value",t.firstOverlayPanel()),T(),gt(t.overlayItems())}}function ooe(i,e){if(i&1&&(x(0,"div",12)(1,"div",13),U(2,"i",14),x(3,"span"),R(4),S()(),Rr(5,11),S()),i&2){let t=e.$implicit;C(2);let n=dr(3);T(4),ze(t.name),T(),q("ngTemplateOutlet",n)("ngTemplateOutletContext",Ts(3,h4,t))}}function soe(i,e){if(i&1&&(x(0,"div",7),mt(1,ooe,6,5,"div",12,sl().trackByOverlayId,!0),S()),i&2){let t=C(2);T(),gt(t.overlayItems())}}function aoe(i,e){i&1&&(x(0,"div",15),U(1,"i",17),x(2,"span",5),R(3,"No overlay packs available for this placement."),S()())}function loe(i,e){}function coe(i,e){if(i&1){let t=Ae();x(0,"div",20),W("click",function(){let r=z(t).$implicit,o=C(3).$implicit,s=C(2);return V(s.overlayState.onAddPatternPathFromUrl(r.fileUrl,r.thumbnailUrl,o.id))}),U(1,"img",21),x(2,"div",22)(3,"span",23),R(4),S()()()}if(i&2){let t=e.$implicit;q("appTooltip",t.name),T(),q("src",t.thumbnailUrl,fi)("alt",t.name),T(3),ze(t.name)}}function doe(i,e){if(i&1&&(le(0,loe,0,0),x(1,"div",18),mt(2,coe,5,4,"div",19,sl().trackByFileUrl,!0),S()),i&2){let t=e.$implicit;ce(t.name?0:-1),T(2),gt(t.dataSources)}}function uoe(i,e){if(i&1&&(x(0,"div",16),mt(1,doe,4,1,null,null,eoe),S()),i&2){let t=C().$implicit,n=C(2);T(),gt(n.getOverlayPacks(t))}}function foe(i,e){if(i&1&&le(0,aoe,4,0,"div",15)(1,uoe,3,0,"div",16),i&2){let t=e.$implicit,n=C(2);ce(n.getOverlayPacks(t).length===0?0:1)}}function hoe(i,e){if(i&1&&U(0,"img",32),i&2){let t=C().$implicit;q("src",t.thumbnailUrl||t.sourceUrl,fi)("alt",t.label)}}function poe(i,e){if(i&1&&(x(0,"span",33),R(1),ki(2,"slice"),S()),i&2){let t=C().$implicit;T(),ze(Aw(2,1,t.label,0,2))}}function moe(i,e){if(i&1){let t=Ae();x(0,"div",44),U(1,"i",45),R(2," Colour "),S(),x(3,"div",46)(4,"app-customizer-color-panel",47),W("colorSelected",function(r){z(t);let o=C().$implicit,s=C(3);return V(s.onOverlayColorSelected(o.id,r))}),S()()}if(i&2){let t=C().$implicit,n=C(3);T(4),q("items",n.colorPanelItems(t.id,t.placementId??null))}}function goe(i,e){if(i&1){let t=Ae();x(0,"app-ui-accordion-panel",6)(1,"app-ui-accordion-header")(2,"div",29)(3,"div",30)(4,"div",31),le(5,hoe,1,2,"img",32)(6,poe,3,5,"span",33),S(),x(7,"p",34),R(8),S()(),x(9,"button",35),W("click",function(r){let o=z(t).$implicit,s=C(3);return r.stopPropagation(),V(s.overlayState.onRemovePatternOverlay(o.id))}),U(10,"i",36),x(11,"span"),R(12,"Remove"),S()()()(),x(13,"app-ui-accordion-content")(14,"div",37)(15,"div",38),U(16,"i",39),R(17," Opacity "),S(),x(18,"div",40)(19,"div",41)(20,"app-ui-slider",42),W("ngModelChange",function(r){let o=z(t).$implicit,s=C(3);return V(s.overlayState.onPatternOpacityChange(o.id,r))}),S(),x(21,"span",43),R(22),ki(23,"number"),S()()(),le(24,moe,5,1),S()()()}if(i&2){let t=e.$implicit,n=C(3);q("value",t.id),T(5),ce(t.thumbnailUrl||t.sourceUrl?5:6),T(2),q("appTooltip",t.label),T(),ze(t.label),T(12),q("min",n.overlayState.minPatternOpacity)("max",n.overlayState.maxPatternOpacity)("step",n.overlayState.patternOpacityStep)("ngModel",t.opacity),T(2),ze(qi(23,10,t.opacity,"1.0-2")),T(2),ce(n.colorPanelItems(t.id,t.placementId??null).length?24:-1)}}function voe(i,e){if(i&1&&(x(0,"div",24)(1,"span",25),U(2,"i",26),R(3," Applied Overlays "),S(),x(4,"span",27),R(5),S()(),x(6,"app-ui-accordion",28),mt(7,goe,25,13,"app-ui-accordion-panel",6,toe),S()),i&2){let t=C(2);T(5),ze(t.appliedPatternOverlays().length),T(),q("multiple",!0),T(),gt(t.appliedPatternOverlays())}}function boe(i,e){if(i&1&&(le(0,roe,3,1,"app-ui-accordion",6)(1,soe,3,0,"div",7),Bo(2,foe,2,1,"ng-template",null,0,cl),le(4,voe,9,2)),i&2){let t=C();ce(t.useAccordion()?0:1),T(4),ce(t.appliedPatternOverlays().length>0?4:-1)}}var E_=class i{constructor(e){this.overlayState=e}items=_e.required();useAccordion=_e(!1,{transform:_v});overlayItems=Me(()=>(this.items()??[]).filter(e=>(e.type??"").toUpperCase()==="OVERLAY"));firstOverlayPanel=Me(()=>{let e=this.overlayItems()[0];if(!e)return null;let t=e;return t.id??t.actionPathIdsCsv??null});appliedPatternOverlays=Me(()=>{let e=new Set(this.overlayItems().map(t=>t.id).filter(t=>typeof t=="string"&&t.length>0));return e.size?this.overlayState.patternOverlays().filter(t=>!!t.placementId&&e.has(t.placementId)):[]});colorPanelItems(e,t){if(!e)return[];let n=t?(this.items()??[]).find(a=>a.id===t):null,r=n?this.buildColorCustomizationsForItem(n,e):[];if(r.length)return[...r];let o=this.overlayPackColorDataSources();if(!o.length)return[];let s={id:`overlay-color-pack-${e}`,name:"Overlay Colors",type:"Color",dataSources:o.map(a=>k({},a))};return[{id:`overlay-color-${e}`,stepId:"",dataSourcePackId:s.id,name:"Overlay Colors",type:"Color",actionPathIdsCsv:e,isTransformationRequired:!1,defaultValue:null,position:0,pack:s}]}getOverlayPacks(e){return(e.packs??[]).filter(t=>{let n=(t.type??"").toLowerCase();return n===Ga.OVERLAY||n===Ga.EFFECTS})}getOverlayColorPacks(e){return this.buildColorCustomizationsForItem(e,"")}trackByOverlayId(e,t){return t.id??e}trackByFileUrl(e,t){return t.fileUrl??e}buildColorCustomizationsForItem(e,t){return(e.packs??[]).filter(n=>(n.type??"").toLowerCase()===Ga.COLOR).map(n=>({id:"new-"+n.id,stepId:"new-"+n.id,dataSourcePackId:n.id,name:e.name+" Color",type:"Color",actionPathIdsCsv:t,isTransformationRequired:!1,defaultValue:"",position:10,pack:he(k({},n),{dataSources:[...n.dataSources??[]]})}))}overlayPackColorDataSources(){return this.overlayItems().flatMap(e=>this.getOverlayPacks(e).flatMap(t=>t.dataSources??[]).filter(t=>!!t.colorCode))}onOverlayColorSelected(e,t){e&&t&&this.overlayState.onPatternFillChange(e,t)}static \u0275fac=function(t){return new(t||i)(Gt(vh))};static \u0275cmp=it({type:i,selectors:[["app-overlay-panel"]],inputs:{items:[1,"items"],useAccordion:[1,"useAccordion"]},decls:3,vars:1,consts:[["pickerContent",""],[1,"overlay-panel"],[1,"empty-state"],[1,"ri-layout-grid-line","empty-state-icon"],[1,"empty-state-heading"],[1,"empty-state-sub"],[3,"value"],[1,"overlay-pick-sections"],[1,"accordion-header-content"],[1,"ri-layout-grid-line","accordion-header-icon"],[1,"accordion-header-label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"placement-section"],[1,"placement-section-header"],[1,"ri-layout-grid-line"],[1,"empty-state","empty-state--sm"],[1,"overlay-pick-section"],[1,"ri-image-2-line","empty-state-icon"],[1,"overlay-pick-grid"],[1,"overlay-pick-card",3,"appTooltip"],[1,"overlay-pick-card",3,"click","appTooltip"],[1,"overlay-pick-card__img",3,"src","alt"],[1,"overlay-pick-card__hover"],[1,"overlay-pick-card__name"],[1,"overlay-section-divider"],[1,"overlay-section-divider__label"],[1,"ri-check-double-line"],[1,"overlay-count-badge"],[1,"overlay-accordion",3,"multiple"],[1,"overlay-accordion__header"],[1,"overlay-card__meta"],["aria-hidden","true",1,"overlay-thumb"],[1,"overlay-thumb__img",3,"src","alt"],[1,"overlay-thumb__fallback"],[1,"overlay-name",3,"appTooltip"],["type","button",1,"overlay-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"overlay-card__body"],[1,"prop-group-heading"],[1,"ri-contrast-line"],[1,"overlay-opacity","w-full"],[1,"slider-row"],[1,"flex-1","overlay-slider",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"prop-group-heading",2,"margin-top","6px"],[1,"ri-palette-line"],[1,"overlay-colors"],[1,"overlay-color-panel",3,"colorSelected","items"]],template:function(t,n){t&1&&(x(0,"div",1),le(1,noe,6,0,"div",2)(2,boe,5,2),S()),t&2&&(T(),ce(n.overlayItems().length===0?1:2))},dependencies:[Ut,jc,fr,Is,zo,Vi,_i,_r,xr,oc,ea,bi,Yw,Wc],styles:[".overlay-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;padding:24px 16px;margin:12px 14px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.empty-state--sm[_ngcontent-%COMP%]{padding:14px 12px;margin:8px 0}.empty-state-icon[_ngcontent-%COMP%]{font-size:26px;color:#d1d5db;margin-bottom:4px}.empty-state-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#6b7280}.empty-state-sub[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;line-height:1.55}.overlay-pick-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#374151;border-left:3px solid rgb(var(--primary-color, 98 101 241))}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.overlay-pick-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:10px 14px}.pack-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#9ca3af}.pack-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.overlay-pick-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.overlay-pick-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;background:#f9fafb;cursor:pointer;box-shadow:0 1px 3px #0000000f;transition:border-color .18s,transform .18s,box-shadow .18s}.overlay-pick-card[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));transform:translateY(-2px) scale(1.02);box-shadow:0 6px 18px rgb(var(--primary-color, 98 101 241) / .18)}.overlay-pick-card[_ngcontent-%COMP%]:active{transform:scale(.97)}.overlay-pick-card__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:opacity .18s}.overlay-pick-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgba(17,24,39,.65) 0%,transparent 55%);opacity:0;transition:opacity .2s ease}.overlay-pick-card[_ngcontent-%COMP%]:hover .overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:991px){.overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:.75}.overlay-pick-card[_ngcontent-%COMP%]:hover .overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:1}}.overlay-pick-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5)}.overlay-section-divider[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px 8px;margin-top:4px;border-top:1px solid #f0f0f0}.overlay-section-divider__label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.overlay-section-divider__label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.overlay-count-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:9999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:10px;font-weight:700;line-height:1}.overlay-accordion[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.overlay-accordion__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding-right:10px}.overlay-card__meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0}.overlay-thumb[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:10px;border:1px solid #e5e7eb;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;background:#f9fafb}.overlay-thumb__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.overlay-thumb__fallback[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:#1f2937}.overlay-name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827;margin:0;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overlay-card__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px 12px 10px}.prop-group-heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#64748b}.prop-group-heading[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.overlay-opacity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.overlay-slider[_ngcontent-%COMP%]{accent-color:rgb(var(--primary-color, 98 101 241))}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:36px;text-align:right;font-size:11px;color:#6b7280;font-variant-numeric:tabular-nums}.overlay-colors[_ngcontent-%COMP%]{display:flex;align-items:center}.overlay-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:9999px;border:1px solid #fca5a5;background:#fff1f2;color:#b91c1c;font-weight:600;font-size:11px;cursor:pointer;flex-shrink:0;transition:background .15s,box-shadow .15s,transform .15s}.overlay-remove[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.overlay-remove[_ngcontent-%COMP%]:hover{background:#ffe4e6;box-shadow:0 4px 12px #ef44442e}.overlay-remove[_ngcontent-%COMP%]:active{transform:translateY(0)}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:991px){.overlay-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.overlay-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}.overlay-name[_ngcontent-%COMP%]{font-size:12px;max-width:130px}.overlay-thumb[_ngcontent-%COMP%]{width:34px;height:34px}}@media(max-width:480px){.overlay-pick-section[_ngcontent-%COMP%]{padding:8px 10px}.overlay-name[_ngcontent-%COMP%]{max-width:100px}}"],changeDetection:0})};var yoe=(i,e)=>e.id;function xoe(i,e){i&1&&(x(0,"div",9),U(1,"i",11),x(2,"span",12),R(3,"No layers yet"),S(),x(4,"span",13),R(5,"Add text or logo items to configure their render order."),S()())}function _oe(i,e){if(i&1&&(x(0,"div",21),R(1),S()),i&2){let t=C().$implicit;T(),ze(t.subtitle)}}function Soe(i,e){i&1&&(x(0,"span",23),R(1,"Front"),S())}function Coe(i,e){i&1&&(x(0,"span",24),R(1,"Back"),S())}function woe(i,e){if(i&1){let t=Ae();x(0,"div",15),W("dragstart",function(r){let o=z(t).$implicit,s=C(2);return V(s.onDragStart(r,o.id))})("dragover",function(r){let o=z(t).$implicit,s=C(2);return V(s.onDragOver(r,o.id))})("drop",function(r){let o=z(t).$implicit,s=C(2);return V(s.onDrop(r,o.id))})("dragend",function(){z(t);let r=C(2);return V(r.onDragEnd())})("click",function(){let r=z(t).$implicit,o=C(2);return V(o.onSelect(r.id))}),x(1,"div",16),U(2,"i",17),S(),x(3,"div",18),R(4),S(),x(5,"div",19)(6,"div",20),R(7),S(),le(8,_oe,2,1,"div",21),S(),x(9,"div",22),le(10,Soe,2,0,"span",23)(11,Coe,2,0,"span",24),S(),x(12,"div",25)(13,"app-ui-button",26),W("onClick",function(){let r=z(t).$implicit,o=C(2);return V(o.onMoveTowardFront(r.id))}),U(14,"i",27),S(),x(15,"app-ui-button",28),W("onClick",function(){let r=z(t).$implicit,o=C(2);return V(o.onMoveTowardBack(r.id))}),U(16,"i",29),S()()()}if(i&2){let t=e.$implicit,n=e.$index,r=C(2);dt("active",t.id===r.activeOverlayId())("dragging",t.id===r.draggedItemId)("drop-before",t.id===r.dropTargetId&&r.dropPosition==="before")("drop-after",t.id===r.dropTargetId&&r.dropPosition==="after"),T(3),dt("render-order-rank--first",n===0),T(),Tt(" ",n+1," "),T(3),ze(t.title),T(),ce(t.subtitle?8:-1),T(2),ce(n===0?10:n===r.items().length-1?11:-1),T(3),q("text",!0)("disabled",n===0),T(2),q("text",!0)("disabled",n===r.items().length-1)}}function Eoe(i,e){if(i&1&&(x(0,"div",10),mt(1,woe,17,18,"div",14,yoe),S()),i&2){let t=C();T(),gt(t.items())}}var M_=class i{items=_e([]);activeOverlayId=_e(null);moveTowardFront=Pt();moveTowardBack=Pt();selectItem=Pt();reorder=Pt();draggedItemId=null;dropTargetId=null;dropPosition="before";onMoveTowardFront(e){this.moveTowardFront.emit(e)}onMoveTowardBack(e){this.moveTowardBack.emit(e)}onSelect(e){this.selectItem.emit(e)}onDragStart(e,t){this.draggedItemId=t,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t))}onDragOver(e,t){if(!this.draggedItemId||this.draggedItemId===t)return;e.preventDefault();let n=e.currentTarget;if(!n)return;let r=n.getBoundingClientRect(),o=r.top+r.height/2;this.dropPosition=e.clientY>=o?"after":"before",this.dropTargetId=t}onDrop(e,t){if(!this.draggedItemId||this.draggedItemId===t){this.clearDragState();return}e.preventDefault(),this.emitReorder(this.draggedItemId,t,this.dropPosition),this.clearDragState()}onDragEnd(){this.clearDragState()}emitReorder(e,t,n){let r=this.items().map(d=>d.id),o=r.indexOf(e),s=r.indexOf(t);if(o<0||s<0)return;let a=[...r];a.splice(o,1);let l=s>o?s-1:s,c=n==="after"?l+1:l;a.splice(c,0,e),this.reorder.emit(a)}clearDragState(){this.draggedItemId=null,this.dropTargetId=null,this.dropPosition="before"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-render-order-panel"]],inputs:{items:[1,"items"],activeOverlayId:[1,"activeOverlayId"]},outputs:{moveTowardFront:"moveTowardFront",moveTowardBack:"moveTowardBack",selectItem:"selectItem",reorder:"reorder"},decls:14,vars:1,consts:[[1,"render-order-panel"],[1,"render-order-info"],[1,"render-order-info__row"],[1,"depth-label","depth-label--front"],[1,"ri-stack-line"],[1,"ri-arrow-down-line","render-order-info__arrow"],[1,"depth-label","depth-label--back"],[1,"ri-layers-line"],[1,"render-order-info__hint"],[1,"render-order-empty"],[1,"render-order-list"],[1,"ri-stack-line","render-order-empty__icon"],[1,"render-order-empty__title"],[1,"render-order-empty__hint"],["draggable","true",1,"render-order-item",3,"active","dragging","drop-before","drop-after"],["draggable","true",1,"render-order-item",3,"dragstart","dragover","drop","dragend","click"],["aria-hidden","true","appTooltip","Drag to reorder",1,"render-order-handle"],[1,"ri-draggable"],[1,"render-order-rank"],[1,"render-order-content"],[1,"render-order-title"],[1,"render-order-subtitle"],[1,"render-order-depth"],[1,"depth-pill","depth-pill--front"],[1,"depth-pill","depth-pill--back"],[1,"render-order-actions"],["appTooltip","Move forward",1,"ro-btn",3,"onClick","text","disabled"],[1,"ri-arrow-up-s-line"],["appTooltip","Move backward",1,"ro-btn",3,"onClick","text","disabled"],[1,"ri-arrow-down-s-line"]],template:function(t,n){t&1&&(x(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),U(4,"i",4),R(5," Front (top) "),S(),U(6,"i",5),x(7,"span",6),U(8,"i",7),R(9," Back (bottom) "),S()(),x(10,"p",8),R(11," Drag rows or use the arrows to change which item appears on top. "),S()(),le(12,xoe,6,0,"div",9)(13,Eoe,3,0,"div",10),S()),t&2&&(T(12),ce(n.items().length===0?12:13))},dependencies:[Ut,ta,bi],styles:[".render-order-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:12px 14px}.render-order-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:10px;background:linear-gradient(135deg,#f5f3ff,#eff6ff);border:1px solid #e5e7eb}.render-order-info__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.render-order-info__arrow[_ngcontent-%COMP%]{font-size:14px;color:#d1d5db;flex-shrink:0}.render-order-info__hint[_ngcontent-%COMP%]{margin:0;font-size:11px;color:#9ca3af;line-height:1.5}.depth-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.04em}.depth-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.depth-label--front[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.depth-label--back[_ngcontent-%COMP%]{color:#9ca3af}.render-order-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 14px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.render-order-empty__icon[_ngcontent-%COMP%]{font-size:28px;color:#d1d5db}.render-order-empty__title[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#374151}.render-order-empty__hint[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;line-height:1.5}.render-order-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.render-order-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;border:1.5px solid #e5e7eb;border-radius:10px;background:#fff;padding:8px 10px;cursor:pointer;transition:border-color .16s,box-shadow .16s,background .16s}.render-order-item[_ngcontent-%COMP%]:hover{border-color:#c7d2fe;background:#fafafe}.render-order-item.active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgb(var(--primary-color, 98 101 241) / .12);background:#f5f3ff}.render-order-item.dragging[_ngcontent-%COMP%]{opacity:.45;box-shadow:0 8px 24px #0000001a}.render-order-item.drop-before[_ngcontent-%COMP%]{box-shadow:inset 0 3px rgb(var(--primary-color, 98 101 241));border-color:rgb(var(--primary-color, 98 101 241))}.render-order-item.drop-after[_ngcontent-%COMP%]{box-shadow:inset 0 -3px rgb(var(--primary-color, 98 101 241));border-color:rgb(var(--primary-color, 98 101 241))}.render-order-handle[_ngcontent-%COMP%]{color:#d1d5db;font-size:16px;line-height:1;cursor:grab;flex-shrink:0;transition:color .15s}.render-order-item[_ngcontent-%COMP%]:hover .render-order-handle[_ngcontent-%COMP%]{color:#9ca3af}.render-order-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.render-order-rank[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:#f3f4f6;border:1px solid #e5e7eb;font-size:11px;font-weight:700;color:#6b7280;flex-shrink:0}.render-order-rank--first[_ngcontent-%COMP%]{background:#ede9fe;border-color:#c4b5fd;color:rgb(var(--primary-color, 98 101 241))}.render-order-content[_ngcontent-%COMP%]{flex:1;min-width:0}.render-order-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.render-order-subtitle[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.render-order-depth[_ngcontent-%COMP%]{flex-shrink:0;min-width:38px}.depth-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:2px 8px;border-radius:9999px;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.depth-pill--front[_ngcontent-%COMP%]{background:#ede9fe;color:rgb(var(--primary-color, 98 101 241))}.depth-pill--back[_ngcontent-%COMP%]{background:#f3f4f6;color:#9ca3af}.render-order-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px;flex-shrink:0}.ro-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:14px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.ro-btn[_ngcontent-%COMP%]:hover:not(:disabled){border-color:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.ro-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.render-order-panel[_ngcontent-%COMP%]{padding:8px 10px}.render-order-item[_ngcontent-%COMP%]{padding:6px 8px;gap:6px}.render-order-title[_ngcontent-%COMP%]{font-size:12px}.render-order-subtitle[_ngcontent-%COMP%]{font-size:10px}.render-order-rank[_ngcontent-%COMP%]{width:18px;height:18px;font-size:10px}.depth-pill[_ngcontent-%COMP%]{display:none}}@media(max-width:480px){.render-order-list[_ngcontent-%COMP%]{gap:4px}}"],changeDetection:0})};var T_=class i{gridEnabled=_e(!1);snapEnabled=_e(!1);showPlacementGuides=_e(!1);gridRatio=_e(.25);editorMode=_e("3d");threeDGridSizeNormalized=_e(10);twoDGridSizeInches=_e(1);onGridToggle=Pt();onSnapToggle=Pt();onGuidesToggle=Pt();onGridSizeChange=Pt();onTwoDGridSizeChange=Pt();onGridClick(){this.onGridToggle.emit()}onSnapClick(){this.onSnapToggle.emit()}onGuidesClick(){this.onGuidesToggle.emit()}onSliderChange(e){let t=parseFloat(e.target.value);isNaN(t)?t=this.twoDGridSizeInches():t=Math.max(.25,Math.min(4,t)),this.onTwoDGridSizeChange.emit(t.toString())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-canvas-guide-panel"]],inputs:{gridEnabled:[1,"gridEnabled"],snapEnabled:[1,"snapEnabled"],showPlacementGuides:[1,"showPlacementGuides"],gridRatio:[1,"gridRatio"],editorMode:[1,"editorMode"],threeDGridSizeNormalized:[1,"threeDGridSizeNormalized"],twoDGridSizeInches:[1,"twoDGridSizeInches"]},outputs:{onGridToggle:"onGridToggle",onSnapToggle:"onSnapToggle",onGuidesToggle:"onGuidesToggle",onGridSizeChange:"onGridSizeChange",onTwoDGridSizeChange:"onTwoDGridSizeChange"},decls:36,vars:13,consts:[[1,"canvas-guide-panel"],[1,"controls-section"],[1,"section-label"],[1,"ri-layout-grid-line"],[1,"toggle-buttons-group"],["type","button","aria-label","Toggle Grid",1,"control-btn",3,"click","title"],[1,"btn-label"],["type","button","aria-label","Toggle Snap to Grid",1,"control-btn",3,"click","title"],[1,"ri-focus-3-line"],["type","button","aria-label","Toggle Placement Guides",1,"control-btn",3,"click","title"],[1,"ri-guide-line"],[1,"grid-size-control"],[1,"control-label-header"],[1,"ri-settings-3-line"],[1,"control-label-text"],[1,"slider-container"],["type","range","min","0.25","max","4","step","0.01","aria-label","Grid size adjustment in inches",1,"control-slider",3,"input","value","title"],[1,"stepper"],["type","number","min","0.25","max","4","step","0.01","appTooltip","Grid size input in inches","appDecimalLimit","2",1,"stepper-input",3,"input","value","title"],[1,"stepper-unit"],[1,"controls-section","info-section"],[1,"info-text"],[1,"ri-information-line"]],template:function(t,n){t&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),U(3,"i",3),x(4,"span"),R(5,"Canvas Display"),S()(),x(6,"div",4)(7,"button",5),W("click",function(){return n.onGridClick()}),U(8,"i",3),x(9,"span",6),R(10,"Grid"),S()(),x(11,"button",7),W("click",function(){return n.onSnapClick()}),U(12,"i",8),x(13,"span",6),R(14,"Snap"),S()(),x(15,"button",9),W("click",function(){return n.onGuidesClick()}),U(16,"i",10),x(17,"span",6),R(18,"Guides"),S()()()(),x(19,"div",1)(20,"label",11)(21,"div",12),U(22,"i",13),x(23,"span",14),R(24,"Grid Size (in)"),S()(),x(25,"div",15)(26,"input",16),W("input",function(o){return n.onSliderChange(o)}),S(),x(27,"div",17)(28,"input",18),W("input",function(o){return n.onSliderChange(o)}),S(),x(29,"span",19),R(30," in "),S()()()()(),x(31,"div",20)(32,"div",21),U(33,"i",22),x(34,"p"),R(35,"Use these tools to align and position elements precisely on your canvas."),S()()()()),t&2&&(T(7),dt("active",n.gridEnabled()),q("title",n.gridEnabled()?"Hide Grid":"Show Grid"),T(4),dt("active",n.snapEnabled()),q("title",n.snapEnabled()?"Disable Snap":"Enable Snap"),T(4),dt("active",n.showPlacementGuides()),q("title",n.showPlacementGuides()?"Hide Guides":"Show Guides"),T(11),q("value",n.twoDGridSizeInches())("title","Adjust grid size in inches"),T(2),q("value",n.twoDGridSizeInches())("title","Enter grid size in inches"))},dependencies:[Ut,gh,bi],styles:[".canvas-guide-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.2rem;padding:.5rem 0}.controls-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139));padding:.25rem 0}.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.toggle-buttons-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}.control-btn[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;padding:.75rem;border:1.5px solid rgb(var(--border-color, 203 213 225));border-radius:.625rem;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:.65rem;font-weight:500;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.control-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.125rem;transition:transform .2s ease}.control-btn[_ngcontent-%COMP%]:hover:not(.active){border-color:rgb(var(--primary-color, 98 101 241) / .5);background:rgb(var(--primary-color, 98 101 241) / .08);transform:translateY(-1px)}.control-btn.active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241) / .15),rgb(var(--primary-color, 98 101 241) / .08));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgb(var(--primary-color, 98 101 241) / .1)}.control-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:inset 0 2px 4px #0000000d}.btn-label[_ngcontent-%COMP%]{display:block;white-space:nowrap}.grid-size-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.575rem;cursor:pointer}.control-label-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139))}.control-label-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.control-label-text[_ngcontent-%COMP%]{display:block}.slider-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.5rem;background:rgb(var(--surface-100, 248 250 252));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.5rem;transition:all .2s ease}.slider-container[_ngcontent-%COMP%]:focus-within{border-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--surface-card, 255 255 255));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .1)}.control-slider[_ngcontent-%COMP%]{flex:1;height:4px;appearance:none;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .3),rgb(var(--primary-color, 98 101 241)));border-radius:2px;outline:none;cursor:pointer;-webkit-appearance:none}.control-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));border:2px solid rgb(var(--surface-card, 255 255 255));cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.control-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.2);box-shadow:0 4px 8px rgb(var(--primary-color, 98 101 241) / .3)}.control-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));border:2px solid rgb(var(--surface-card, 255 255 255));cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.control-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.2);box-shadow:0 4px 8px rgb(var(--primary-color, 98 101 241) / .3)}.slider-value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:3rem;padding:.375rem .625rem;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.375rem;font-size:.75rem;font-weight:600;color:rgb(var(--primary-color, 98 101 241));text-align:center;white-space:nowrap;transition:all .2s ease}.info-section[_ngcontent-%COMP%]{margin-top:.5rem;padding-top:1rem;border-top:1px solid rgb(var(--border-color, 203 213 225))}.info-text[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.75rem;background:rgb(var(--primary-color, 98 101 241) / .08);border:1px solid rgb(var(--primary-color, 98 101 241) / .2);border-radius:.5rem;font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));line-height:1.4}.info-text[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem;color:rgb(var(--primary-color, 98 101 241));margin-top:.125rem}.info-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0}@media(max-width:640px){.canvas-guide-panel[_ngcontent-%COMP%]{gap:1rem;padding:.4rem 0}.toggle-buttons-group[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr);gap:.4rem}.control-btn[_ngcontent-%COMP%]{padding:.625rem;font-size:.6rem}.control-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem}.slider-container[_ngcontent-%COMP%]{padding:.4rem;gap:.5rem}}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.stepper-input[_ngcontent-%COMP%]{width:40px;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:13px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-unit[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-weight:500}"]})};var D_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-keyboard-shortcuts-panel"]],decls:157,vars:0,consts:[[1,"shortcuts-panel"],[1,"shortcuts-section"],[1,"section-label"],[1,"ri-map-pin-2-line"],[1,"shortcut-list"],[1,"shortcut-row"],[1,"keys"],[1,"key-sep"],[1,"key-drag"],[1,"shortcut-desc"],[1,"keys","button-key"],[1,"ri-history-line"],[1,"ri-drag-move-2-line"],[1,"keys","arrow-cluster"],[1,"arrow-cluster-inline"],[1,"ri-refresh-line"],[1,"info-note"],[1,"ri-information-line"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1)(2,"div",2),kt(3,"i",3),ue(4,"span"),R(5,"Canvas Navigation"),ve()(),ue(6,"div",4)(7,"div",5)(8,"div",6)(9,"kbd"),R(10,"Right Click"),ve(),ue(11,"span",7),R(12,"+"),ve(),ue(13,"span",8),R(14,"Drag"),ve()(),ue(15,"span",9),R(16,"Pan canvas"),ve()(),ue(17,"div",5)(18,"div",6)(19,"kbd"),R(20,"Scroll Wheel"),ve()(),ue(21,"span",9),R(22,"Zoom in/out"),ve()(),ue(23,"div",5)(24,"div",10),R(25," Reset Button "),ve(),ue(26,"span",9),R(27,"Reset view to default"),ve()()()(),ue(28,"div",1)(29,"div",2),kt(30,"i",11),ue(31,"span"),R(32,"History"),ve()(),ue(33,"div",4)(34,"div",5)(35,"div",6)(36,"kbd"),R(37,"Ctrl"),ve(),ue(38,"span",7),R(39,"+"),ve(),ue(40,"kbd"),R(41,"Z"),ve()(),ue(42,"span",9),R(43,"Undo"),ve()(),ue(44,"div",5)(45,"div",6)(46,"kbd"),R(47,"Ctrl"),ve(),ue(48,"span",7),R(49,"+"),ve(),ue(50,"kbd"),R(51,"Shift"),ve(),ue(52,"span",7),R(53,"+"),ve(),ue(54,"kbd"),R(55,"Z"),ve()(),ue(56,"span",9),R(57,"Redo"),ve()(),ue(58,"div",5)(59,"div",6)(60,"kbd"),R(61,"Ctrl"),ve(),ue(62,"span",7),R(63,"+"),ve(),ue(64,"kbd"),R(65,"Y"),ve()(),ue(66,"span",9),R(67,"Redo"),ve()()()(),ue(68,"div",1)(69,"div",2),kt(70,"i",12),ue(71,"span"),R(72,"Move Overlay"),ve()(),ue(73,"div",4)(74,"div",5)(75,"div",13)(76,"kbd"),R(77,"\u2191"),ve(),ue(78,"kbd"),R(79,"\u2193"),ve(),ue(80,"kbd"),R(81,"\u2190"),ve(),ue(82,"kbd"),R(83,"\u2192"),ve()(),ue(84,"span",9),R(85,"Move 1 px"),ve()(),ue(86,"div",5)(87,"div",6)(88,"kbd"),R(89,"Shift"),ve(),ue(90,"span",7),R(91,"+"),ve(),ue(92,"span",14)(93,"kbd"),R(94,"\u2191"),ve(),ue(95,"kbd"),R(96,"\u2193"),ve(),ue(97,"kbd"),R(98,"\u2190"),ve(),ue(99,"kbd"),R(100,"\u2192"),ve()()(),ue(101,"span",9),R(102,"Move 10 px"),ve()()()(),ue(103,"div",1)(104,"div",2),kt(105,"i",15),ue(106,"span"),R(107,"Rotate Overlay"),ve()(),ue(108,"div",4)(109,"div",5)(110,"div",6)(111,"kbd"),R(112,"Q"),ve()(),ue(113,"span",9),R(114,"Rotate counter-clockwise"),ve()(),ue(115,"div",5)(116,"div",6)(117,"kbd"),R(118,"E"),ve()(),ue(119,"span",9),R(120,"Rotate clockwise"),ve()(),ue(121,"div",5)(122,"div",6)(123,"kbd"),R(124,"Shift"),ve(),ue(125,"span",7),R(126,"+"),ve(),ue(127,"kbd"),R(128,"Q"),ve()(),ue(129,"span",9),R(130,"Rotate CCW fast (3\xD7)"),ve()(),ue(131,"div",5)(132,"div",6)(133,"kbd"),R(134,"Shift"),ve(),ue(135,"span",7),R(136,"+"),ve(),ue(137,"kbd"),R(138,"E"),ve()(),ue(139,"span",9),R(140,"Rotate CW fast (3\xD7)"),ve()(),ue(141,"div",5)(142,"div",6)(143,"kbd"),R(144,"["),ve()(),ue(145,"span",9),R(146,"Rotate counter-clockwise"),ve()(),ue(147,"div",5)(148,"div",6)(149,"kbd"),R(150,"]"),ve()(),ue(151,"span",9),R(152,"Rotate clockwise"),ve()()()(),ue(153,"div",16),kt(154,"i",17),ue(155,"p"),R(156,"Overlay shortcuts apply when an overlay is selected on the canvas."),ve()()())},styles:[".shortcuts-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.2rem;padding:.5rem 0}.shortcuts-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.section-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139));padding:.25rem 0}.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.shortcut-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.shortcut-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.45rem .6rem;background:rgb(var(--surface-100, 248 250 252));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.5rem}.keys[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}kbd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;padding:.1rem .4rem;font-family:inherit;font-size:.65rem;font-weight:600;line-height:1.4;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1.5px solid rgb(var(--border-color, 203 213 225));border-radius:.35rem;box-shadow:0 1px rgb(var(--border-color, 203 213 225));white-space:nowrap}.key-sep[_ngcontent-%COMP%]{font-size:.6rem;color:rgb(var(--text-color-secondary, 100 116 139))}.key-drag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:.1rem .4rem;font-family:inherit;font-size:.65rem;font-weight:600;color:rgb(var(--text-color-secondary, 100 116 139));background:transparent;border:none;font-style:italic}.button-key[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:.2rem .6rem;font-family:inherit;font-size:.65rem;font-weight:600;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--primary-color, 98 101 241) / .15);border:1.5px solid rgb(var(--primary-color, 98 101 241) / .3);border-radius:.35rem;white-space:nowrap}.arrow-cluster[_ngcontent-%COMP%]{gap:.2rem}.arrow-cluster-inline[_ngcontent-%COMP%]{display:inline-flex;gap:.2rem}.shortcut-desc[_ngcontent-%COMP%]{font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));text-align:right;flex:1}.info-note[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.75rem;background:rgb(var(--primary-color, 98 101 241) / .08);border:1px solid rgb(var(--primary-color, 98 101 241) / .2);border-radius:.5rem;font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));line-height:1.4}.info-note[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem;color:rgb(var(--primary-color, 98 101 241));margin-top:.125rem}.info-note[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0}@media(max-width:640px){.shortcuts-panel[_ngcontent-%COMP%]{gap:1rem;padding:.4rem 0}.shortcut-row[_ngcontent-%COMP%]{padding:.4rem .5rem}kbd[_ngcontent-%COMP%]{font-size:.6rem;min-width:1.35rem;padding:.1rem .3rem}}"]})};var Moe=(i,e)=>e.id;function Toe(i,e){if(i&1){let t=Ae();ue(0,"img",11),Ri("error",function(){z(t);let r=C().$implicit,o=C();return V(o.markThumbnailBroken(r==null?null:r.id))}),ve()}if(i&2){let t=C().$implicit;kr("src",t.thumbnailLink,fi)("alt",t.name||"Pre-design")}}function Doe(i,e){i&1&&(ue(0,"div",7),il(),ue(1,"svg",12),kt(2,"rect",13)(3,"path",14),ve()())}function Aoe(i,e){i&1&&(ue(0,"div",8),il(),ue(1,"svg",15),kt(2,"polyline",16),ve()())}function Ioe(i,e){if(i&1&&(ue(0,"p",10),R(1),ve()),i&2){let t=C().$implicit;T(),ze(t.name)}}function Poe(i,e){if(i&1){let t=Ae();ue(0,"div",4),Ri("click",function(){let r=z(t).$implicit,o=C();return V(o.onSelect(r))}),ue(1,"div",5),le(2,Toe,1,2,"img",6)(3,Doe,4,0,"div",7),le(4,Aoe,3,0,"div",8),ue(5,"div",9),le(6,Ioe,2,1,"p",10),ve()()()}if(i&2){let t=e.$implicit,n=C();dt("selected",(t==null?null:t.id)===n.selectedId()),T(2),ce(t.thumbnailLink&&!n.isThumbnailBroken(t==null?null:t.id)?2:3),T(2),ce((t==null?null:t.id)===n.selectedId()?4:-1),T(2),ce(t.name?6:-1)}}function Ooe(i,e){i&1&&(ue(0,"div",3),il(),ue(1,"svg",12),kt(2,"rect",13)(3,"path",17),ve(),yu(),ue(4,"span"),R(5,"No pre-designs available"),ve()())}var A_=class i{predesigns=_e([]);selectedId=_e(null);designSelected=Pt();brokenThumbById=F({});onSelect(e){e&&this.designSelected.emit(e)}isThumbnailBroken(e){return e?!!this.brokenThumbById()[e]:!1}markThumbnailBroken(e){e&&this.brokenThumbById.update(t=>he(k({},t),{[e]:!0}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-pre-designs-panel"]],inputs:{predesigns:[1,"predesigns"],selectedId:[1,"selectedId"]},outputs:{designSelected:"designSelected"},decls:5,vars:1,consts:[[1,"predesigns-panel"],[1,"predesigns-grid"],[1,"design-card",3,"selected"],[1,"predesigns-empty"],[1,"design-card",3,"click"],[1,"design-card__image-wrap"],["loading","lazy","decoding","async",1,"design-card__image",3,"src","alt"],["aria-label","Thumbnail unavailable",1,"design-card__placeholder"],[1,"design-card__tick"],[1,"design-card__hover"],[1,"design-card__name"],["loading","lazy","decoding","async",1,"design-card__image",3,"error","src","alt"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["x","3","y","3","width","18","height","18","rx","2"],["d","M3 16l5-5 4 4 3-3 6 6"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","3","stroke-linecap","round","stroke-linejoin","round"],["points","20 6 9 17 4 12"],["d","M3 9h18M9 21V9"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1),mt(2,Poe,7,5,"div",2,Moe),le(4,Ooe,6,0,"div",3),ve()()),t&2&&(T(2),gt(n.predesigns()),T(2),ce(n.predesigns().length?-1:4))},dependencies:[Ut],styles:['.predesigns-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:12px;overflow-y:auto}.predesigns-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.design-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;cursor:pointer;border-radius:10px;transition:transform .18s ease,box-shadow .18s ease}.design-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.design-card[_ngcontent-%COMP%]:hover .design-card__image-wrap[_ngcontent-%COMP%]{box-shadow:0 6px 20px #00000024;border-color:var(--p-primary-color, #6265f1)}.design-card__image-wrap[_ngcontent-%COMP%]{position:relative;aspect-ratio:1 / 1;border-radius:10px;overflow:hidden;border:2px solid #cbcbcb;background:var(--p-surface-100, #f4f4f5);transition:border-color .18s ease,box-shadow .18s ease}.design-card__image-wrap[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0000000a,#00000014,#0000000a 70%);background-size:200% 100%;animation:_ngcontent-%COMP%_predesign-skeleton 1.25s ease-in-out infinite}.design-card.selected[_ngcontent-%COMP%] .design-card__image-wrap[_ngcontent-%COMP%]{border-color:var(--p-primary-color, #6265f1);box-shadow:0 0 0 3px color-mix(in srgb,var(--p-primary-color, #6265f1) 25%,transparent)}.design-card__image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .22s ease;position:relative;z-index:1}.design-card[_ngcontent-%COMP%]:hover .design-card__image[_ngcontent-%COMP%]{transform:scale(1.04)}.design-card__placeholder[_ngcontent-%COMP%]{position:relative;z-index:1;width:100%;height:100%;display:grid;place-items:center;color:#00000073}.design-card__placeholder[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:42px;height:42px;opacity:.75}@keyframes _ngcontent-%COMP%_predesign-skeleton{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.design-card__image-wrap[_ngcontent-%COMP%]:before{animation:none}}.design-card__tick[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;width:24px;height:24px;border-radius:50%;background:var(--p-primary-color, #6265f1);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #00000040;animation:_ngcontent-%COMP%_tick-pop .2s ease}.design-card__tick[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px}@keyframes _ngcontent-%COMP%_tick-pop{0%{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}.design-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgb(0 0 0 / 65%) 0%,transparent 55%);z-index:999;opacity:0;transition:opacity .2s ease}.design-card[_ngcontent-%COMP%]:hover .design-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:992px){.design-card__hover[_ngcontent-%COMP%]{opacity:.75}.design-card[_ngcontent-%COMP%]:hover .design-card__hover[_ngcontent-%COMP%]{opacity:1}}.design-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5);margin:0}.predesigns-empty[_ngcontent-%COMP%]{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 16px;color:var(--p-text-muted-color, #888);font-size:13px}.predesigns-empty[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:40px;height:40px;opacity:.45}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:992px){.predesigns-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var I_=class i{api=Z(na);createSubmission(e,t,n,r,o,s){let a=new FormData;return a.append("file",e,e.name),n&&a.append("productId",n),r?.length&&a.append("views",r.join(",")),o?.length&&o.forEach(l=>{a.append("previewImages",l,l.name)}),s&&a.append("userUniqueId",s),this.api.post("design-submissions",a,{"X-API-Key":t},{loader:!0})}getSubmissionByNumber(e,t){return this.api.get(`design-submissions/${encodeURIComponent(e)}`,{},{"X-API-Key":t},{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var P_=class i{message="Loading\u2026";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-manifest-loader"]],inputs:{message:"message"},decls:20,vars:2,consts:[["role","status","aria-live","polite",1,"manifest-loader"],["aria-hidden","true",1,"loader"],[1,"box","box0"],[1,"box","box1"],[1,"box","box2"],[1,"box","box3"],[1,"box","box4"],[1,"box","box5"],[1,"box","box6"],[1,"box","box7"],[1,"message"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1)(2,"div",2),kt(3,"div"),ve(),ue(4,"div",3),kt(5,"div"),ve(),ue(6,"div",4),kt(7,"div"),ve(),ue(8,"div",5),kt(9,"div"),ve(),ue(10,"div",6),kt(11,"div"),ve(),ue(12,"div",7),kt(13,"div"),ve(),ue(14,"div",8),kt(15,"div"),ve(),ue(16,"div",9),kt(17,"div"),ve()(),ue(18,"p",10),R(19),ve()()),t&2&&(fn("aria-label",n.message),T(19),ze(n.message))},styles:['[_nghost-%COMP%]{display:block}.message[_ngcontent-%COMP%]{margin:0;text-align:center}.manifest-loader[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{zoom:.44}}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:before, .manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box0[_ngcontent-%COMP%]{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box1[_ngcontent-%COMP%]{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box2[_ngcontent-%COMP%]{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box3[_ngcontent-%COMP%]{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box4[_ngcontent-%COMP%]{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box5[_ngcontent-%COMP%]{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box6[_ngcontent-%COMP%]{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box7[_ngcontent-%COMP%]{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box0[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move0}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box0[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale0}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box1[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move1}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box1[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale1}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box2[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move2}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box2[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale2}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box3[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move3}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box3[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale3}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box4[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box4[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box5[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move5}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box5[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale5}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box6[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move6}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box6[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale6}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box7[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move7}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box7[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale7}@keyframes _ngcontent-%COMP%_box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_mask{0%,65%{opacity:0}66%,to{opacity:1}}'],changeDetection:0})};function Roe(i,e){if(i&1&&(ue(0,"p",13),R(1),ve()),i&2){let t=C();T(),ze(t.subtitle)}}var O_=class i{message="Saving design\u2026";subtitle=null;static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-save-loader"]],inputs:{message:"message",subtitle:"subtitle"},decls:16,vars:4,consts:[["role","status","aria-live","polite",1,"save-loader-container"],[1,"save-loader-content"],[1,"spinner-wrapper"],["viewBox","0 0 100 100",1,"spinner"],["cx","50","cy","50","r","45","fill","none","stroke","currentColor","stroke-width","4","stroke-dasharray","283.7","stroke-dashoffset","0","opacity","0.15"],["cx","50","cy","50","r","45","fill","none","stroke","url(#spinnerGradient)","stroke-width","4","stroke-dasharray","70.9","stroke-dashoffset","0","stroke-linecap","round"],["id","spinnerGradient","x1","0%","y1","0%","x2","100%","y2","100%"],["offset","0%","stop-color","var(--save-loader-color, #a70b0b)"],["offset","100%","stop-color","var(--save-loader-color, #a70b0b)","stop-opacity","0.3"],["role","img","aria-label","Save in progress",1,"success-icon"],[1,"ri-save-line"],[1,"text-content"],[1,"message"],[1,"subtitle"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1)(2,"div",2),il(),ue(3,"svg",3),kt(4,"circle",4)(5,"circle",5),ue(6,"defs")(7,"linearGradient",6),kt(8,"stop",7)(9,"stop",8),ve()()(),yu(),ue(10,"div",9),kt(11,"i",10),ve()(),ue(12,"div",11)(13,"p",12),R(14),ve(),le(15,Roe,2,1,"p",13),ve()()()),t&2&&(fn("aria-label",n.message),T(13),fn("aria-label",n.message),T(),ze(n.message),T(),ce(n.subtitle?15:-1))},styles:["[_nghost-%COMP%]{display:block}.save-loader-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem;padding:2rem}.save-loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1.25rem}.spinner-wrapper[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;display:flex;align-items:center;justify-content:center}.spinner[_ngcontent-%COMP%]{width:80px;height:80px;animation:_ngcontent-%COMP%_spin 2s linear infinite}.success-icon[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--save-loader-color, #a70b0b);opacity:.8}.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:32px;animation:_ngcontent-%COMP%_pulse-icon 2s ease-in-out infinite}.text-content[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600;color:var(--p-text-color, #0f172a);letter-spacing:.3px}.subtitle[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--p-text-color-secondary, #64748b);font-weight:400;letter-spacing:.2px}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_pulse-icon{0%,to{opacity:.6;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}@media(max-width:480px){.save-loader-container[_ngcontent-%COMP%]{padding:1.5rem 1rem;gap:1rem}.spinner-wrapper[_ngcontent-%COMP%], .spinner[_ngcontent-%COMP%]{width:64px;height:64px}.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px}.message[_ngcontent-%COMP%]{font-size:.95rem}.subtitle[_ngcontent-%COMP%]{font-size:.8rem}}"],changeDetection:0})};var R_=new Ze("SDK_RUNTIME_CONFIG");var p4=1024,m4=4096;async function k_(i,e,t,n){if(console.log("SVG ::::: ",i),console.log("OBJ ::::: ",e),console.log("MTL ::::: ",t),console.log("materialSourceUrl ::::: ",n),typeof window>"u"||typeof document>"u")throw new Error("Thumbnail generation requires a browser environment.");let r=new id;r.background=null;let o=new pi(45,1,.1,4e3),s=new Af({antialias:!0,alpha:!0});s.setSize(p4,p4,!1),s.setPixelRatio(Math.min(window.devicePixelRatio||1,3)),s.setClearColor(0,0),s.outputColorSpace=_n,s.toneMapping=dd,s.toneMappingExposure=1;let a=await koe(e,t,n),l=await zoe(i,s),c=new Set;Goe(a),joe(a),Yoe(a,l,c),$oe(r),r.add(a);let d=Qoe(r,a,o),u=[{key:"front",direction:new $(0,.15,1)},{key:"right",direction:new $(1,.15,0)},{key:"back",direction:new $(0,.15,-1)},{key:"left",direction:new $(-1,.15,0)}],f=[];try{for(let h of u){let p=h.direction.clone().normalize().multiplyScalar(d.distance).add(d.center);o.position.copy(p),o.lookAt(d.center),o.updateProjectionMatrix(),s.render(r,o),f.push({view:h.key,dataUrl:s.domElement.toDataURL("image/png")})}return f}finally{ese(a,c),c.has(l)||l.dispose(),s.dispose()}}async function koe(i,e,t){let n=new Qf;if(e?.value?.trim()){let o=new eh,s=e.type==="url"?g4(t??e.value):g4(t),a=e.type==="url"?await Foe(o,e.value,s):await y4(o,e.value,s);a.preload(),n.setMaterials(a)}return i.type==="url"?await n.loadAsync(i.value):n.parse(i.value)}async function Foe(i,e,t){let n=await fetch(e);if(!n.ok)throw new Error(`Failed to load MTL (${n.status})`);let r=await n.text();return y4(i,r,t)}function y4(i,e,t){return new Promise((n,r)=>{try{let o=Noe(e,t),s=i.parse(o,t);n(s)}catch(o){r(new Error(`Failed to parse MTL text: ${o instanceof Error?o.message:"Unknown error"}`))}})}function Noe(i,e){return i.trim()?i.split(/\r?\n/).map(t=>Loe(t,e)).join(`
|
|
4615
4615
|
`):i}function Loe(i,e){let t=i.match(/^(\s*)(map_\S+|bump|disp|decal|refl)\s+(.+)$/i);if(!t)return i;let[,n,r,o]=t,s=o.trim().split(/\s+/);if(!s.length)return i;let a=s[s.length-1];if(Uoe(a))return i;let l=Boe(e,a);return l?(s[s.length-1]=l,`${n}${r} ${s.join(" ")}`):i}function Uoe(i){let e=i.trim();return/^https?:\/\//i.test(e)||/^\/\//.test(e)}function Boe(i,e){let n=e.split("?")[0].split("#")[0].split(/[\\/]/).pop();if(!n)return e;if(!i)return n;try{return new URL(n,i).toString()}catch{let r=i.endsWith("/")?"":"/";return`${i}${r}${n}`}}async function zoe(i,e){let t=i.type==="url"?await Voe(i.value):i.value,n=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(n);try{let o=await Hoe(r),s=document.createElement("canvas");s.width=m4,s.height=m4;let a=s.getContext("2d");if(!a)throw new Error("Failed to create canvas context for SVG texture.");a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.clearRect(0,0,s.width,s.height);let l=o.width/o.height,c=s.width,d=s.height;l>1?d=s.height/l:c=s.width*l,a.drawImage(o,0,0,c,d);let u=new Rs(s);return u.colorSpace=_n,u.minFilter=bo,u.magFilter=Wn,u.anisotropy=e.capabilities.getMaxAnisotropy(),u.flipY=!0,u.wrapS=Li,u.wrapT=Li,u.needsUpdate=!0,u}finally{URL.revokeObjectURL(r)}}function g4(i){if(!i)return"";try{if(typeof window<"u")return new URL(".",new URL(i,window.location.href)).toString()}catch{}let e=i.split("?")[0].split("#")[0],t=e.lastIndexOf("/");return t>=0?e.slice(0,t+1):""}async function Voe(i){let e=await fetch(i,{cache:"no-cache"});if(!e.ok)throw new Error(`Failed to load SVG (${e.status})`);return e.text()}function Hoe(i){return new Promise((e,t)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=()=>t(new Error("Failed to decode SVG image.")),n.src=i})}function Goe(i){Woe(i);let t=new Ji().setFromObject(i).getSize(new $),n=Math.max(t.x,t.y,t.z);if(!Number.isFinite(n)||n<=0)return;i.scale.setScalar(4/n);let o=new Ji().setFromObject(i).getCenter(new $);i.position.sub(o),i.traverse(s=>{let a=s;!a.isMesh||!a.geometry||(a.geometry.computeVertexNormals(),a.castShadow=!1,a.receiveShadow=!1)})}function joe(i){let e=t=>{if(!t)return new Da({color:16777215,roughness:.8,metalness:.1});let n=t,r=t;return new Da({map:n.map??null,color:r.color?.clone()??new ut(16777215),roughness:.8,metalness:.1})};i.traverse(t=>{let n=t;if(!n.isMesh)return;let r=n.material;Array.isArray(r)?n.material=r.map(o=>e(o)):n.material=e(r),n.castShadow=!0,n.receiveShadow=!0})}function Woe(i){i.traverse(e=>{let t=e;if(!t.isMesh||!(t.geometry instanceof ni))return;let n=jx(t.geometry.clone(),1e-5);n.deleteAttribute("normal"),n.computeVertexNormals(),n.normalizeNormals(),n.computeBoundingBox(),n.computeBoundingSphere(),t.geometry.dispose(),t.geometry=n,(Array.isArray(t.material)?t.material:[t.material]).forEach(o=>{o&&("flatShading"in o&&(o.flatShading=!1),o.side=Zi,o.needsUpdate=!0)})})}function $oe(i){let e=new cd(16777215,.6);i.add(e);let t=new Wo(16777215,1.2);t.position.set(100,150,100),i.add(t);let n=new Wo(16777215,.6);n.position.set(-100,50,100),i.add(n);let r=new Wo(16777215,.8);r.position.set(0,100,-150),i.add(r);let o=new ld(16777215,13421772,.5);o.position.set(0,200,0),i.add(o)}function Yoe(i,e,t){let n=new WeakMap,r=new WeakMap,o=x4(e);i.traverse(s=>{let a=s;!a.isMesh||!a.material||(Array.isArray(a.material)?a.material.forEach(l=>{v4(l,e,o,n,r,t)}):v4(a.material,e,o,n,r,t))})}function v4(i,e,t,n,r,o){if(!Xoe(i))return;n.has(i)||n.set(i,i.map??null);let s=n.get(i)??null;if(Koe(i,!!s,r),!s||!t){s&&o.add(s),i.map=e,i.needsUpdate=!0;return}let a=x4(s),l=a?_4(a):null;if(!a||!l){o.add(s),i.map=e,i.needsUpdate=!0;return}let c=Joe(a,t,l.width,l.height);if(!c){o.add(s),i.map=e,i.needsUpdate=!0;return}o.add(s);let d=new Rs(c);Zoe(d,s,e),d.needsUpdate=!0,o.add(d),i.map=d,i.needsUpdate=!0}function Xoe(i){return"map"in i}function qoe(i){return"color"in i&&i.color instanceof ut}function Koe(i,e,t){if(qoe(i)){if(t.has(i)||t.set(i,i.color.clone()),e){i.color.copy(t.get(i));return}i.color.set(16777215)}}function Zoe(i,e,t){i.colorSpace=e.colorSpace??t.colorSpace,i.flipY=e.flipY,i.wrapS=e.wrapS,i.wrapT=e.wrapT,i.magFilter=e.magFilter,i.minFilter=e.minFilter,i.anisotropy=e.anisotropy||t.anisotropy,i.generateMipmaps=e.generateMipmaps,i.premultiplyAlpha=e.premultiplyAlpha,i.unpackAlignment=e.unpackAlignment,i.repeat.copy(e.repeat),i.offset.copy(e.offset),i.center.copy(e.center),i.rotation=e.rotation,i.matrixAutoUpdate=e.matrixAutoUpdate,i.matrix.copy(e.matrix)}function x4(i){let e=i.source?.data??i.image;if(!e)return null;let t=_4(e);return!t||t.width<=0||t.height<=0?null:e}function _4(i){if(i instanceof HTMLVideoElement)return!i.videoWidth||!i.videoHeight?null:{width:i.videoWidth,height:i.videoHeight};let e=i;return!e.width||!e.height?null:{width:e.width,height:e.height}}function Joe(i,e,t,n){let r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d");if(!o)return null;try{return o.clearRect(0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,o.drawImage(i,0,0,t,n),o.globalCompositeOperation="multiply",o.globalAlpha=1,o.drawImage(e,0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,r}catch{let s=document.createElement("canvas");s.width=t,s.height=n;let a=s.getContext("2d");return a?(a.clearRect(0,0,t,n),a.drawImage(i,0,0,t,n),a.drawImage(e,0,0,t,n),s):null}}function Qoe(i,e,t){let n=new Ji().setFromObject(e),r=n.getCenter(new $),o=n.getSize(new $),s=Math.max(o.x,o.y,o.z)*.5,a=Math.max(s,.5),l=t.fov*(Math.PI/180),c=a/Math.tan(l/2)*1.45;return t.near=Math.max(c/200,.05),t.far=Math.max(c*20,500),t.updateProjectionMatrix(),i.updateMatrixWorld(!0),{center:r,distance:c}}function ese(i,e){let t=new Set;i.traverse(n=>{let r=n;if(r.isMesh&&(r.geometry?.dispose(),!!r.material)){if(Array.isArray(r.material)){r.material.forEach(o=>b4(o,t));return}b4(r.material,t)}}),e.forEach(n=>{t.has(n)||(n.dispose(),t.add(n))})}function b4(i,e){let t=i;Qd(t.map,e),Qd(t.lightMap,e),Qd(t.normalMap,e),Qd(t.roughnessMap,e),Qd(t.metalnessMap,e),Qd(t.aoMap,e),Qd(t.emissiveMap,e),i.dispose()}function Qd(i,e){!i||e.has(i)||(i.dispose(),e.add(i))}var F_=class i{async generateThumbnails(e,t,n,r){return k_(e,t,n,r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var N_=(l=>(l.PREDESIGNS="predesigns",l.COLOR="color",l.PATTERN="pattern",l.PERSONALIZATION="personalization",l.OVERLAY="overlay",l.BACKGROUND="background",l.RENDER_ORDER="render-order",l.CANVAS_GUIDE="canvas-guide",l))(N_||{}),L_={PREDESIGNS:"predesigns-fixed",RENDER_ORDER:"render-order-fixed",CANVAS_GUIDE:"canvas-guide-fixed"},eu={DESIGNS:"Designs",RENDER_POSITION:"Render Position",CUSTOMIZATION:"Customization",PERSONALIZATION:"Personalization"},U_={PATTERN:"pattern",OVERLAY:"overlay",UNKNOWN:"Unknown"},S4="ri-stack-line",C4="panel";var tse=["*"],bh=class i{value=_e.required();valueChange=Pt();isActive(e){return this.value()===e}select(e){this.value()!==e&&this.valueChange.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tabs"]],inputs:{value:[1,"value"]},outputs:{valueChange:"valueChange"},ngContentSelectors:tse,decls:2,vars:0,consts:[[1,"ui-tabs"]],template:function(t,n){t&1&&(Mi(),ue(0,"div",0),Ti(1),ve())},styles:[".ui-tabs[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var nse=["*"],B_=class i{value=_e.required();tabs=Z(bh,{host:!0});active=Me(()=>this.tabs.isActive(this.value()));onSelect(){this.tabs.select(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tab"]],inputs:{value:[1,"value"]},ngContentSelectors:nse,decls:2,vars:2,consts:[["type","button",1,"ui-tab",3,"click"]],template:function(t,n){t&1&&(Mi(),ue(0,"button",0),Ri("click",function(){return n.onSelect()}),Ti(1),ve()),t&2&&dt("ui-tab--active",n.active())},styles:[".ui-tab[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:.84rem;font-weight:500;line-height:1;padding:.7rem .95rem .72rem;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color .2s ease,border-color .2s ease}.ui-tab[_ngcontent-%COMP%]:hover{color:rgb(var(--text-color, 15 23 42));border-bottom-color:rgb(var(--surface-300, 203 213 225))}.ui-tab--active[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));border-bottom-color:rgb(var(--primary-color, 98 101 241))}.ui-tab[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:inset 0 -2px rgb(var(--primary-color, 98 101 241))}"],changeDetection:0})};var ise=["*"],z_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tablist"]],ngContentSelectors:ise,decls:2,vars:0,consts:[[1,"ui-tablist"]],template:function(t,n){t&1&&(Mi(),ue(0,"div",0),Ti(1),ve())},styles:[".ui-tablist[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;padding:0}@media(max-width:992px){.ui-tablist[_ngcontent-%COMP%]{margin-top:5px}}"],changeDetection:0})};var V_=class i{buildStepLookup(e){let t=new Map,n=r=>{r.forEach(o=>{t.set(o.id,o),o.children?.length&&n(o.children)})};return n(e),t}flattenSteps(e,t=0){return[...e].sort((r,o)=>r.position-o.position).flatMap(r=>[{id:r.id,name:r.name,iconClass:r.iconClass,depth:t},...this.flattenSteps(r.children??[],t+1)])}buildParentNav(e,t,n){return[...[...e].filter(r=>!r.parentStepId).sort((r,o)=>r.position-o.position).map(r=>({id:r.id,name:r.name,iconClass:r.iconClass,depth:0})),{id:t,name:eu.RENDER_POSITION,iconClass:n,depth:0}]}buildPanelsByStep(e){let{stepNav:t,customizations:n,personalizationItems:r,stepLookup:o,renderOrderStepId:s,renderOrderItems:a}=e,l=new Map;t.forEach(d=>{this.buildCustomizationPanels(d.id,n,o).forEach(u=>this.addPanelToMap(l,d.id,u)),this.buildPersonalizationPanels(d.id,r,o).forEach(u=>this.addPanelToMap(l,d.id,u))}),this.addPanelToMap(l,s,{kind:"render-order",trackId:`${s}-${C4}`,title:eu.RENDER_POSITION,items:a});let c="canvas-guide-fixed";return this.addPanelToMap(l,c,{kind:"canvas-guide",trackId:`${c}-panel`,title:"Canvas Guide"}),l}hasPlacementType(e,t){return(e??"").trim().toUpperCase()===t}addPanelToMap(e,t,n){let r=e.get(t)??[];e.set(t,[...r,n])}buildCustomizationPanels(e,t,n){let r=t.filter(a=>a.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??eu.CUSTOMIZATION,s=r.reduce((a,l)=>{let c=l.type??U_.UNKNOWN;return a[c]=a[c]?[...a[c],l]:[l],a},{});return Object.entries(s).map(([a,l])=>{let c=[...l].sort((u,f)=>u.position-f.position),d=this.isPatternCustomizationType(a)?"pattern":"color";return{kind:d,trackId:`${e}-${d}-${a}`,title:o,customizations:c}})}buildPersonalizationPanels(e,t,n){let r=t.filter(d=>d.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??eu.PERSONALIZATION,s=[],a=r.filter(d=>this.hasPlacementType(d.type,"TEXT")||this.hasPlacementType(d.type,"LOGO"));a.length&&s.push({kind:"personalization",trackId:`${e}-personalization`,title:o,items:a});let l=r.filter(d=>this.hasPlacementType(d.type,"OVERLAY"));l.length&&s.push({kind:"overlay",trackId:`${e}-overlay`,title:o,items:l});let c=r.filter(d=>this.hasPlacementType(d.type,"BACKGROUND"));return c.length&&s.push({kind:"background",trackId:`${e}-background`,title:o,templates:c}),s}isPatternCustomizationType(e){let t=e.trim().toLowerCase();return t.includes(U_.PATTERN)||t===U_.OVERLAY}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var H_=class i{async fetchFileAsText(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file: ${t.statusText}`);return t.text()}createJsonFile(e,t){return new File([e],`${t}-${Date.now()}.json`,{type:"application/json"})}downloadFile(e){if(typeof document>"u")return;let t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download=e.name,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}async copyTextToClipboard(e){if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document>"u")return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}downloadDataUrlFile(e,t){if(typeof document>"u")return;let n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),document.body.removeChild(n)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};function M4(i){let e=i.svgDoc.documentElement;return{exportedAt:new Date().toISOString(),preDesignId:i.preDesignId,svg:{width:i.svgWidth,height:i.svgHeight,viewBox:i.svgViewBox,rootId:e?.getAttribute("id")??null,content:i.svgString},renderOrder:i.renderOrder,placements:i.placementZones.filter(t=>i.usedPlacementKeys.has(t.placementKey)).map(t=>({id:t.id,placementKey:t.placementKey,label:t.label,elementName:t.elementName,allowedKinds:t.allowedKinds,required:t.required,bounds:t.bounds})),paths:[...i.styledPaths,...i.textPathSummaries],overlays:{text:i.textOverlays,logo:i.logoOverlays},background:{selectedKey:i.selectedBackgroundKey&&i.backgrounds.some(t=>t.actionItemId===i.selectedBackgroundKey)?i.selectedBackgroundKey:null,items:i.backgrounds},pattern:{selectedUploadedPatternId:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternId:null,selectedFileUrl:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternFileUrl:null,definitions:i.filteredPatternDefinitions,overlays:i.usedPatternOverlays.map(t=>({id:t.id,label:t.label??null,placementId:t.placementId??null,fill:t.fill??null,opacity:t.opacity,sourceUrl:t.sourceUrl??null,thumbnailUrl:t.thumbnailUrl??null,pathData:t.pathData})),targets:i.patternTargets,colors:ose(i.svgDoc,i.usedPatternIds)}}}function T4(i){return new Set(Array.from(i.querySelectorAll('[data-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function D4(i){return new Set(Array.from(i.querySelectorAll('path[data-pattern-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function A4(i){return Array.from(i.querySelectorAll("path, rect, circle, ellipse, polygon, polyline")).filter(e=>!e.closest("defs")).filter(e=>!e.closest('[data-overlay="true"]')).map(e=>{let t=yh(e,"fill"),n=k4(e,t),r=F4(i,t);return{id:e.getAttribute("id")??null,tag:e.tagName,fill:r?.colors.length?r.colors:t,fillGradient:r,stroke:yh(e,"stroke"),strokeWidth:yh(e,"stroke-width"),opacity:yh(e,"opacity"),transform:e.getAttribute("transform"),patternFill:n}})}function I4(i){return Array.from(i.querySelectorAll("[id]")).filter(e=>!e.closest("defs")).map(e=>{let t=yh(e,"fill"),n=k4(e,t);return n?{targetId:e.id,patternId:n,fill:t}:null}).filter(e=>!!e)}function P4(i){let{patternOverlays:e,patternDefinitions:t,patternTargets:n,usedPatternOverlayIds:r}=i,o=new Set(n.map(l=>l.patternId)),s=e.filter(l=>{if(!r.has(l.id))return!1;let c=rse(l.fill);return c&&o.add(c),!0}),a=Object.fromEntries(Object.entries(t).filter(([l])=>o.has(l)));return{usedPatternIds:o,usedPatternOverlays:s,filteredPatternDefinitions:a}}function O4(i){let{textOverlays:e,logoOverlays:t,backgrounds:n,usedPatternOverlays:r}=i,o=new Set;return e.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),t.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),n.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),r.forEach(s=>{s.placementId&&o.add(s.placementId)}),o}function R4(i){return i.flatMap(e=>{let t=(e.text??"").trim()||e.id,n=[{id:t,tag:"text",fill:e.style.fill??null,fillGradient:null,stroke:null,strokeWidth:null,opacity:null,transform:null,patternFill:null}];return e.style.stroke&&(e.style.strokeWidth??0)>0&&n.push({id:`${t} Outline 1`,tag:"text-shadow",fill:e.style.stroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.strokeWidth}`,opacity:null,transform:null,patternFill:null}),e.style.secondStroke&&(e.style.secondStrokeWidth??0)>0&&n.push({id:`${t} Outline 2`,tag:"text-shadow",fill:e.style.secondStroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.secondStrokeWidth}`,opacity:null,transform:null,patternFill:null}),n})}function rse(i){return(i??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]??null}function yh(i,e){let t=i.getAttribute(e);if(t&&t.trim().length>0)return t.trim();let n=i.getAttribute("style");if(!n)return null;let r=e.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.split(":")[1]?.trim()??null;return s&&s.length>0?s:null}function k4(i,e){let t=i.getAttribute(me.DATA_PATTERN_FILL)?.trim();return t||((e??"").match(/^url\(#([^)]+)\)$/i)?.[1]??null)}function F4(i,e){let r=(e??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]?.trim();if(!r)return null;let o=(l,c=new Set)=>{if(!l||c.has(l))return null;c.add(l);let d=i.getElementById(l);if(!(d instanceof SVGLinearGradientElement)&&!(d instanceof SVGRadialGradientElement))return null;if(Array.from(d.querySelectorAll(":scope > stop")).length>0)return d;let f=d.getAttribute("href")??d.getAttributeNS($d,"href"),h=f?.startsWith("#")?f.slice(1).trim():null;return h?o(h,c)??d:d},s=o(r);if(!s)return null;let a=Array.from(s.querySelectorAll(":scope > stop")).map(l=>{let c=l.getAttribute("stop-color")?.trim()??w4(l,"stop-color")??null;if(!c)return null;let d=l.getAttribute("stop-opacity")?.trim()??w4(l,"stop-opacity"),u=d&&d.length>0?Number.parseFloat(d):NaN;return{offset:l.getAttribute("offset")?.trim()??null,color:c,opacity:Number.isFinite(u)?u:null}}).filter(l=>!!l);return a.length===0?null:{gradientId:r,type:s.tagName==="radialGradient"?"radialGradient":"linearGradient",colors:Array.from(new Set(a.map(l=>l.color))),stops:a}}function w4(i,e){let t=i.getAttribute("style");if(!t)return null;let n=e.toLowerCase(),r=t.split(";").map(s=>s.trim()).find(s=>s.toLowerCase().startsWith(`${n}:`));if(!r)return null;let o=r.split(":")[1]?.trim()??null;return o&&o.length>0?o:null}function ose(i,e){let t=sse(i);return Array.from(e).map(n=>{let r=i.getElementById(n);if(!(r instanceof SVGPatternElement))return null;let o=cse(r,i),s=new Map,a=c=>dse(i,s,c),l=c=>{let d=yh(c,"fill");return d&&d.length>0?d:lse(c,t)};return o.forEach(c=>{a(l(c)),Array.from(c.querySelectorAll("*")).forEach(u=>{a(l(u))})}),s.size===0?null:{patternId:n,colors:Array.from(s.values())}}).filter(n=>!!n)}function sse(i){let e=new Map;return Array.from(i.querySelectorAll("style")).forEach(n=>{let o=(n.textContent??"").matchAll(/([^{}]+)\{([^{}]*)\}/g);for(let s of o){let a=(s[1]??"").trim(),l=(s[2]??"").trim();if(!a||!l)continue;let c=l.match(/(?:^|;)\s*fill\s*:\s*([^;]+)\s*(?:;|$)/i);if(!c)continue;let d=c[1]?.trim()??"";if(!d)continue;a.split(",").map(f=>f.trim()).filter(f=>f.length>0).forEach(f=>{let h=ase(f);h&&e.set(h,d)})}}),e}function ase(i){let e=i.trim();if(!e)return null;let t=e.split(":")[0]?.trim()??"";if(!t)return null;let n=t.split(/[\s>+~]+/).map(o=>o.trim()).filter(o=>o.length>0),r=n[n.length-1]??"";return r&&(/^#[A-Za-z_][\w-]*$/.test(r)||/^\.[A-Za-z_][\w-]*$/.test(r)||/^[A-Za-z][\w-]*$/.test(r))?r.toLowerCase():null}function lse(i,e){let t=(i.getAttribute("id")??"").trim();if(t){let o=e.get(`#${t.toLowerCase()}`);if(o)return o}let n=(i.getAttribute("class")??"").trim();if(n){let o=n.split(/\s+/).map(s=>s.trim()).filter(s=>s.length>0);for(let s of o){let a=e.get(`.${s.toLowerCase()}`);if(a)return a}}return e.get(i.tagName.toLowerCase())??null}function cse(i,e){let t=[],n=new Set,r=i;for(;r;){let o=(r.getAttribute("id")??"").trim();if(o&&n.has(o))break;o&&n.add(o),t.push(r);let s=r.getAttribute("href")?.trim()??r.getAttributeNS($d,"href")?.trim(),a=s?.startsWith("#")?s.slice(1).trim():null;if(!a)break;let l=e.getElementById(a);r=l instanceof SVGPatternElement?l:null}return t}function dse(i,e,t){let n=(t??"").trim();if(!n)return;let r=F4(i,n);if(r?.colors.length){r.colors.forEach(a=>{let l=E4(a);if(!l)return;let c=l.toLowerCase();e.has(c)||e.set(c,l)});return}let o=E4(n);if(!o)return;let s=o.toLowerCase();e.has(s)||e.set(s,o)}function E4(i){let e=(i??"").trim();if(!e)return null;let t=e.toLowerCase();return t==="none"||t.startsWith("url(")?null:e}var G_=class i{buildDesignExportPayload(e){let{svgDoc:t,svgString:n,overlays:r,personalizationItems:o,placementZones:s,placementNameByKey:a,backgroundState:l,backgroundImageTemplates:c,patternState:d,patternOverlays:u,renderOrder:f,svgDimensions:h,svgViewBox:p,bounds:v,overlayDimensionsPxById:g,selectedEffectIdByOverlay:m,textStyleResolvers:b,selectedPredesignId:y}=e,_=this.buildEffectFileUrlById(o),w=T4(t),D=D4(t),A=A4(t),P=this.collectTextOverlayExports({overlays:r,bounds:v,effectFileUrlById:_,placementNameByKey:a,usedOverlayIds:w,selectedEffectIdByOverlay:m,overlayDimensionsPxById:g,textStyleResolvers:b}),E=this.collectLogoOverlayExports({overlays:r,bounds:v,placementNameByKey:a,overlayDimensionsPxById:g,usedOverlayIds:w}),I=this.collectBackgroundExports(t,l,c),L=I4(t),Y=P4({patternOverlays:u,patternDefinitions:d.definition,patternTargets:L,usedPatternOverlayIds:D}),G=O4({textOverlays:P,logoOverlays:E,backgrounds:I,usedPatternOverlays:Y.usedPatternOverlays}),Q=R4(P);return M4({preDesignId:y,svgDoc:t,svgString:n,svgWidth:h?.width??null,svgHeight:h?.height??null,svgViewBox:p,renderOrder:f,placementZones:s,usedPlacementKeys:G,styledPaths:A,textPathSummaries:Q,textOverlays:P,logoOverlays:E,selectedBackgroundKey:l.selectedKey,backgrounds:I,selectedPatternId:d.selectedId,selectedPatternFileUrl:d.selectedFileUrl,usedPatternIds:Y.usedPatternIds,filteredPatternDefinitions:Y.filteredPatternDefinitions,usedPatternOverlays:Y.usedPatternOverlays,patternTargets:L})}buildEffectFileUrlById(e){return e.reduce((t,n)=>((n.packs??[]).filter(o=>(o.type??"").toLowerCase().includes(Ga.EFFECT)).forEach(o=>{(o.dataSources??[]).forEach(s=>{let a=s?.id?.trim(),l=s?.fileUrl?.trim();a&&l&&t.set(a,l)})}),t),new Map)}collectTextOverlayExports(e){let{overlays:t,bounds:n,effectFileUrlById:r,placementNameByKey:o,usedOverlayIds:s,selectedEffectIdByOverlay:a,overlayDimensionsPxById:l,textStyleResolvers:c}=e;return t.filter(Dt).filter(d=>s.has(d.id)).map(d=>{let u=a.get(d.id)??null,f=u?r.get(u)??null:null,h=this.resolveFontFamily(d,c),p=this.resolveFontWeight(d,c),v=this.resolveFontStyle(d,c),g=this.resolveLetterSpacing(d,c),m=d.lineHeight??c.defaultLineHeight,b=this.resolveStrokeColor(d,c),y=d.strokeWidth??0,_=this.resolveSecondStrokeColor(d,c),w=d.secondStrokeWidth??0,D=this.resolveCurveAmount(d,c),A=d.shadowBlur??c.defaultShadowBlur,P=d.shadowOffsetX??c.defaultShadowOffsetX,E=d.shadowOffsetY??c.defaultShadowOffsetY,I=d.shadowColor??c.defaultShadowColor,L=Number.isFinite(d.horizontalScale)?Math.max(d.horizontalScale,.1):1,Y=Number.isFinite(d.verticalScale)?Math.max(d.verticalScale,.1):1,G=d.fontSize*Math.max((d.text??"").trim().length,1)*.5*L,Q=d.fontSize*(d.lineHeight??c.defaultLineHeight)*Y,ee=l?.get(d.id),te=ee&&Number.isFinite(ee.width)&&ee.width>0?ee.width:G,X=ee&&Number.isFinite(ee.height)&&ee.height>0?ee.height:Q,ie=Math.abs(A)>1e-4||Math.abs(P)>1e-4||Math.abs(E)>1e-4,Se={applied:[...b&&y>0?["stroke"]:[],..._&&w>0?["secondStroke"]:[],...ie?["shadow"]:[],...Math.abs(D)>1e-4?["curve"]:[],...d.warpEnabled===!0?["warp"]:[],...p==="bold"?["bold"]:[],...v==="italic"?["italic"]:[]],stroke:b&&y>0?{color:b,width:y}:null,secondStroke:_&&w>0?{color:_,width:w}:null,shadow:ie?{blur:A,offsetX:P,offsetY:E,color:I}:null,curve:Math.abs(D)>1e-4?{amount:D}:null,warp:d.warpEnabled===!0,bold:p==="bold",italic:v==="italic"};return{id:d.id,kind:d.kind,text:d.text,effectId:u,effectFileUrl:f,placementKey:d.placementKey??null,lockAspectRatio:d.lockAspectRatio??!0,placementName:d.placementKey?o.get(d.placementKey)??d.placementKey:null,transform:{normalizedX:d.normalizedX,normalizedY:d.normalizedY,absoluteCenterX:n.x+d.normalizedX*n.width,absoluteCenterY:n.y+d.normalizedY*n.height,angle:d.angle??0},style:{fill:d.fill,fontFamily:h,fontSize:d.fontSize,horizontalScale:L,verticalScale:Y,fontWeight:p,fontStyle:v,letterSpacing:g,lineHeight:m,stroke:b,strokeWidth:y,secondStroke:_,secondStrokeWidth:w,curveAmount:D,shadowBlur:A,shadowOffsetX:P,shadowOffsetY:E,shadowColor:I},dimensions:{renderedWidth:te,renderedHeight:X},effects:Se}})}collectLogoOverlayExports(e){let{overlays:t,bounds:n,placementNameByKey:r,overlayDimensionsPxById:o,usedOverlayIds:s}=e;return t.filter(ai).filter(a=>s.has(a.id)).map(a=>{let l=o?.get(a.id),c=l&&Number.isFinite(l.width)&&l.width>0?l.width:a.normalizedWidth*n.width,d=l&&Number.isFinite(l.height)&&l.height>0?l.height:a.normalizedHeight*n.height;return{id:a.id,kind:a.kind,logoBlobId:a.logoBlobId??null,imageName:a.imageName??null,imageSrc:a.imageSrc,processedImageSrc:a.processedImageSrc??null,placementKey:a.placementKey??null,lockAspectRatio:a.lockAspectRatio??!0,placementName:a.placementKey?r.get(a.placementKey)??a.placementKey:null,transform:{normalizedX:a.normalizedX,normalizedY:a.normalizedY,absoluteCenterX:n.x+a.normalizedX*n.width,absoluteCenterY:n.y+a.normalizedY*n.height,angle:a.angle??0},dimensions:{originalWidth:a.originalWidth,originalHeight:a.originalHeight,normalizedWidth:a.normalizedWidth,normalizedHeight:a.normalizedHeight,renderedWidth:c,renderedHeight:d},opacity:a.opacity??1}})}collectBackgroundExports(e,t,n){return n.map(r=>{let o=t.images[r.actionItemId],s=e.getElementById(r.actionItemId),a=s?.getAttribute("href")??s?.getAttributeNS($d,"href"),l=!!o?.transform&&(Math.abs((o.transform.scale??1)-1)>1e-4||Math.abs(o.transform.rotation??0)>1e-4||Math.abs(o.transform.translateX??0)>1e-4||Math.abs(o.transform.translateY??0)>1e-4||Math.abs((o.transform.opacity??1)-1)>1e-4);return{isUsed:!!o?.fileName||!!o?.src?.trim()||!!a?.trim()||l,placementKey:r.placementKey??null,templateId:r.id,actionItemId:r.actionItemId,name:r.name??null,imageSrc:o?.src??null,fileName:o?.fileName??null,transform:o?.transform??null,svgTransform:s?.getAttribute("transform")??null,svgOpacity:s?.getAttribute("opacity")??null,blobResourceId:o?.blobResourceId??null}}).filter(r=>r.isUsed).map(s=>{var a=s,{isUsed:r}=a,o=nn(a,["isUsed"]);return o})}resolveFontFamily(e,t){let n=e.fontFamily?.trim();return n&&n.length>0?n:t.defaultFontFamily}resolveFontWeight(e,t){return e.fontWeight??t.defaultFontWeight}resolveFontStyle(e,t){return e.fontStyle??t.defaultFontStyle}resolveLetterSpacing(e,t){return Number.isFinite(e.letterSpacing)?e.letterSpacing:t.defaultLetterSpacing}resolveStrokeColor(e,t){if(!((e.strokeWidth??0)>0))return null;let r=e.stroke?.trim();return r&&r.length>0?r:t.defaultStrokeColor}resolveSecondStrokeColor(e,t){if(!((e.secondStrokeWidth??0)>0))return null;let r=e.secondStroke?.trim();return r&&r.length>0?r:t.defaultSecondStrokeColor}resolveCurveAmount(e,t){return Number.isFinite(e.curveAmount)?e.curveAmount:t.defaultCurveAmount}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var use=10,fse=1,hse=3;var j_=class i{resolveHistoryAction(e){if(!e.ctrlKey&&!e.metaKey)return null;let t=e.key.toLowerCase();return t==="z"?e.shiftKey?"REDO":"UNDO":t==="y"?"REDO":null}resolveOverlayAction(e,t){let n=e.key.toLowerCase(),r=e.shiftKey?use:fse,o=t*hse;switch(n){case"arrowup":return{kind:"MOVE",deltaXPx:0,deltaYPx:-r};case"arrowdown":return{kind:"MOVE",deltaXPx:0,deltaYPx:r};case"arrowleft":return{kind:"MOVE",deltaXPx:-r,deltaYPx:0};case"arrowright":return{kind:"MOVE",deltaXPx:r,deltaYPx:0};case"q":return{kind:"ROTATE",deltaAngle:e.shiftKey?-o:-t};case"e":return{kind:"ROTATE",deltaAngle:e.shiftKey?o:t};case"[":return{kind:"ROTATE",deltaAngle:-t};case"]":return{kind:"ROTATE",deltaAngle:t};default:return null}}isTextInputTarget(e){let t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"||e.isContentEditable}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var N4=.08,W_=class i{constructor(e){this.measurementService=e}resolveLayerDefinition(e,t){if(!e)return null;let n=e.toLowerCase();return t.find(r=>r.name.toLowerCase()===n)??null}resolveLayerBoundsById(e){let t=e.pathId.trim();if(!t||!e.svgDoc)return{bounds:null};let n=t.toLowerCase();if(e.layerBoundsCache.has(n))return{bounds:e.layerBoundsCache.get(n)??null};let r=e.svgDoc.getElementById(t),o=this.readElementBounds(r);if((!o||o.width<=0||o.height<=0)&&e.svgText&&e.measurementRoot){let l=this.measurementService.queryMeasurementElementById(e.measurementRoot,t);o=this.readElementBounds(l)}let s=o&&o.width>0&&o.height>0?o:null,a=new Map(e.layerBoundsCache);return a.set(n,s),{bounds:s,nextCache:a}}combineBounds(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let l of e)l&&(t=Math.min(t,l.x),n=Math.min(n,l.y),r=Math.max(r,l.x+l.width),o=Math.max(o,l.y+l.height));if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o))return null;let s=r-t,a=o-n;return s<=0||a<=0?null:{x:t,y:n,width:s,height:a}}getLayerPreviewBounds(e,t){if(e.width<=0||e.height<=0||!t)return null;let n=t.width*N4,r=t.height*N4,o=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height,c=Math.max(t.x-n,o),d=Math.max(t.y-r,s),u=Math.min(t.x+t.width+n,a),f=Math.min(t.y+t.height+r,l);return u<=c||f<=d?e:{x:c,y:d,width:u-c,height:f-d}}normalizePreviewBounds(e,t){if(!e||e.width<=0||e.height<=0)return t;let n=t.x,r=t.y,o=t.x+t.width,s=t.y+t.height,a=Math.max(e.x,n),l=Math.max(e.y,r),c=Math.min(e.x+e.width,o),d=Math.min(e.y+e.height,s);return c<=a||d<=l?t:{x:a,y:l,width:c-a,height:d-l}}pointInsideBounds(e,t){return t.width<=0||t.height<=0?!1:e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}static \u0275fac=function(t){return new(t||i)(Ke(Kl))};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var $_=class i{api=Z(na);getManifest(e,t,n,r){return this.api.get(`products/${e}/manifest`,k(k({},t?{preDesignId:t}:{}),n!==void 0?{useCdnUrl:n}:{}),r?{"X-API-Key":r}:void 0,{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var Y_=class i{api=Z(na);getPublicDistributor(e){return this.api.get("public/distributor",{},{"X-API-Key":e},{loader:!1,skipHandleError:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var X_=class i{manifestApi=Z($_);publicDistributorApi=Z(Y_);resolveProductId(e){let t=e.runtimeConfig?.productId?.trim(),n=e.inputProductId?.trim();return t||n||e.fallbackProductId}resolveApiKey(e){let t=e.runtimeConfig?.apiKey?.trim(),n=e.inputApiKey?.trim();return t||n||null}buildManifestConfigSignature(e){let t=this.resolveProductId(e);if(!t)return null;let n=this.resolveApiKey(e)??"";return`${t}::${n}`}async fetchManifest(e){try{let t=await vc(this.manifestApi.getManifest(e.productId,e.preDesignId??null,e.useCdnUrl,e.apiKey));if(!t?.isSuccess)return{ok:!1,message:(t?.errors??["Unable to load manifest"])[0]};let n=t.data;if(!n)return{ok:!1,message:"Unable to load manifest"};let r=await this.resolveDistributorBranding(e.apiKey??null,n.distributorBranding??null);return n.distributorBranding=r,{ok:!0,data:n}}catch{return{ok:!1,message:"Unable to load manifest"}}}normalizeManifestData(e){let{data:t,preDesignId:n,selectedPredesignId:r,activeStepId:o}=e,s=t.preDesigns??[]??[],a=n??t.preDesignId??t.selectedPreDesignId??t.activePreDesignId??(!r&&s.length?s[0]?.id??null:null),l=(t.personalizationObjectIdMap??t.placements??[]).map(p=>k({},p));l.filter(p=>(p.type??"").trim().toUpperCase()==="BACKGROUND").forEach(p=>{let m=(p.actionPathIdsCsv??p.actionItemId??"").toString().trim().split(",").map(b=>b.trim()).filter(b=>b.length>0).map(b=>b.startsWith("#")?b.slice(1).trim():b).filter(b=>b.length>0).join(",");p.actionPathIdsCsv=m,p.actionItemId=m});let c=t.steps??[]??[],d=t.threeDFileLink??t.model?.url??"",u=t.mtlFileLink??t.model?.mtlUrl??null,f=this.normalizeThreeDVariants({variants:t.threeDVariants??[],fallbackThreeDFileLink:d,fallbackMaterialFileLink:u}),h=this.resolveSelectedThreeDVariant(f);return{resolvedPredesignId:a,selectedThreeDVariantId:h?.id??null,threeDVariants:f,threeDFileLink:h?.threeDFileLink??d,materialFileLink:h?.mtlFileLink??u,svgFileLink:t.svgFileLink??t.model?.svgUrl??"",svgViewBox:t.svgViewBox??null,printAreaWidthInches:Number.isFinite(t.printAreaWidthInches)?t.printAreaWidthInches:null,printAreaHeightInches:Number.isFinite(t.printAreaHeightInches)?t.printAreaHeightInches:null,customizations:t.customizations??[]??[],predesigns:s,steps:c,pathIdAccordingLayers:t.layers??[]??[],renderPathAccordingLayers:t.renderLayers??[]??[],isShowWholeLayersOption:!!t.isShowWholeLayersOption,placements:l,nextActiveStepId:o||c[0]?.id||null,manifestMeta:t.meta??null,distributorBranding:t.distributorBranding??null}}normalizeThreeDVariants(e){let t=(e.variants??[]).filter(n=>!!n?.id).map(n=>({id:n.id,name:n.name??"",key:n.key??"",position:Number.isFinite(n.position)?n.position:0,isDefault:!!n.isDefault,threeDFileLink:n.threeDFileLink??null,mtlFileLink:n.mtlFileLink??null})).sort((n,r)=>n.position-r.position||n.name.localeCompare(r.name,void 0,{sensitivity:"base"}));return t.length>0?t:e.fallbackThreeDFileLink?[{id:"default-model",name:"Default",key:"default-model",position:0,isDefault:!0,threeDFileLink:e.fallbackThreeDFileLink,mtlFileLink:e.fallbackMaterialFileLink}]:[]}resolveSelectedThreeDVariant(e){return e.length?e.find(t=>t.isDefault)??[...e].sort((t,n)=>t.position-n.position||t.name.localeCompare(n.name,void 0,{sensitivity:"base"}))[0]:null}async resolveDistributorBranding(e,t){if(!e)return t;try{let n=await vc(this.publicDistributorApi.getPublicDistributor(e)),r=this.mapPublicDistributorBranding(n);return r?{distributorId:r.distributorId||t?.distributorId||"",distributorName:r.distributorName??t?.distributorName??null,logoUrl:r.logoUrl??t?.logoUrl??null,themePrimaryColor:r.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:r.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:r.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}:t}catch{return t}}mapPublicDistributorBranding(e){return e?.id?{distributorId:e.id,distributorName:e.name??null,logoUrl:e.branding?.logoUrl??null,themePrimaryColor:e.branding?.primaryColor??null,themeSecondaryColor:e.branding?.secondaryColor??null,themeAccentColor:e.branding?.accentColor??null,themeMode:null}:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var q_=class i{constructor(e){this.manifestService=e}toIdentityInput(e){return{runtimeConfig:e.runtimeConfig,inputProductId:e.inputProductId,inputApiKey:e.inputApiKey,fallbackProductId:e.fallbackProductId}}resolveProductId(e){return this.manifestService.resolveProductId(this.toIdentityInput(e))}resolveApiKey(e){return this.manifestService.resolveApiKey(this.toIdentityInput(e))}buildConfigSignature(e){return this.manifestService.buildManifestConfigSignature(this.toIdentityInput(e))}async loadManifest(e){let t=this.toIdentityInput(e),n=this.manifestService.resolveProductId(t),r=this.manifestService.resolveApiKey(t),o=this.manifestService.buildManifestConfigSignature(t);if(!n)return{ok:!1,message:Ot.missingProductId,productId:null,signature:o};let s=await this.manifestService.fetchManifest({productId:n,preDesignId:e.preDesignId??null,useCdnUrl:e.runtimeConfig?!0:void 0,apiKey:r});return s.ok?{ok:!0,normalized:this.manifestService.normalizeManifestData({data:s.data,preDesignId:e.preDesignId,selectedPredesignId:e.selectedPredesignId,activeStepId:e.activeStepId}),productId:n,apiKey:r,signature:o}:{ok:!1,message:s.message||Ot.manifestLoadFailed,productId:n,signature:o}}static \u0275fac=function(t){return new(t||i)(Ke(X_))};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};var jD={COLOR:"color",PATTERN:"pattern"},L4="image/png",U4="lineargradient",B4=1;var K_=class i{constructor(e,t){this.colorState=e;this.customizerState=t}personalizationState=Z(sc);captureSnapshot(e){if(!e.manifestLoaded||!e.svgDoc)return null;let t=new Map,n=new Map;return e.customizations.forEach(r=>{if(!this.isColorCustomization(r)||!r.actionPathIdsCsv)return;let o=this.readAppliedColorForRegionIds(e.svgDoc,r.actionPathIdsCsv);o&&(t.set(r.actionPathIdsCsv,o),r.name&&n.set(r.name.trim().toLowerCase(),o))}),{targetPredesignId:e.targetPredesignId,colorsByRegion:t,colorsByCustomizationName:n,backgrounds:this.captureBackgroundCarryover(e.backgroundState),patternSelections:this.capturePatternSelections(e.svgDoc,e.customizations,e.patternState),overlayPatterns:this.captureOverlayPatterns(e.svgDoc,e.patternOverlayState),textOverlays:e.overlays.filter(Dt).map(r=>k({},r)),logoOverlays:e.overlays.filter(ai).map(r=>k({},r))}}captureOverlayPatterns(e,t){let n=t.state().overlays??[],r=n.reduce((a,l)=>(a.set(l.id,l),a),new Map),s=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).reduce((a,l)=>{let c=(l.getAttribute("id")??"").trim();if(!c)return a;let d=r.get(c),u=this.readSvgPresentationValue(l,"fill")??d?.fill??null,f=this.readSvgPresentationValue(l,"opacity")??(typeof d?.opacity=="number"?`${d.opacity}`:null),h=f!==null?Number.parseFloat(f):NaN,p=Number.isFinite(h)?Math.min(1,Math.max(0,h)):d?.opacity??1,v=(l.getAttribute(me.DATA_PATTERN_SOURCE_URL)??"").trim()||(d?.sourceUrl??"").trim();return v&&a.push({id:c,label:(l.getAttribute(me.DATA_PATTERN_SOURCE_ID)??"").trim()||d?.label||c,placementId:(l.getAttribute(me.DATA_PATTERN_PLACEMENT_ID)??"").trim()||d?.placementId||null,fill:u&&u.trim().length>0?u:void 0,opacity:p,pathData:l.getAttribute("d")??d?.pathData??"",sourceUrl:v,thumbnailUrl:(l.getAttribute(me.DATA_PATTERN_THUMBNAIL_URL)??"").trim()||d?.thumbnailUrl}),a},[]);return s.length>0?s:n.filter(a=>!!a.sourceUrl).map(a=>k({},a))}readSvgPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}async applyIfNeeded(e){let t=e.snapshot;if(!t||!e.selectedPredesignId||t.targetPredesignId!==e.selectedPredesignId)return!1;await this.restoreBackgroundCarryover(t.backgrounds,e),await this.restorePatternCarryover(t.patternSelections,e),await this.restoreOverlayPatternCarryover(t.overlayPatterns,e),this.restoreOverlayCarryover(t,e),this.restoreColorCarryover(t,e.customizations),await this.customizerState.syncOverlaysToSvgDoc().catch(()=>{});let n=this.customizerState.svgDoc();return n&&this.customizerState.markSvgMutated(n),e.backgroundState.refreshFromSvg(),e.patternState.refreshFromSvg(),e.patternOverlayState.refreshFromSvg(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild(),!0}captureBackgroundCarryover(e){let t=e.state(),n=t.templates??[],r=t.images??{};return n.reduce((o,s)=>{let a=r[s.actionItemId];return a?.src&&o.push({placementKey:s.placementKey,actionItemId:s.actionItemId,name:s.name,state:{src:a.src,fileName:a.fileName,transform:k({},a.transform)}}),o},[])}async restoreBackgroundCarryover(e,t){if(!e.length)return;let n=e.reduce((o,s)=>(o.set(s.placementKey,s),o),new Map),r=e.reduce((o,s)=>(o.set(s.name.trim().toLowerCase(),s),o),new Map);for(let o of t.backgroundTemplates){let s=n.get(o.placementKey)??r.get((o.name??"").trim().toLowerCase());if(!s?.state?.src)continue;let a=await this.createFileFromDataUrl(s.state.src,s.state.fileName??`${o.actionItemId}.png`);a&&(await t.backgroundState.onFileSelected(o.actionItemId,a),t.backgroundState.select(o.actionItemId),this.restoreBackgroundTransform(t.backgroundState,s.state.transform))}}restoreBackgroundTransform(e,t){e.updateTransform("scale",t.scale),e.updateTransform("rotation",t.rotation),e.updateTransform("translateX",t.translateX),e.updateTransform("translateY",t.translateY),e.updateTransform("opacity",t.opacity)}async createFileFromDataUrl(e,t){try{let r=await(await fetch(e)).blob(),o=r.type&&r.type.trim().length>0?r.type:L4;return new File([r],t,{type:o})}catch{return null}}capturePatternSelections(e,t,n){let r=n.selectedPatternFileUrl(),o=n.selectedUploadedPatternId(),s=o?n.patternDefinitionState()[o]??null:null;return r?t.filter(a=>this.isPatternCustomization(a)&&!!a.actionPathIdsCsv).map(a=>{let l=this.resolvePatternSourceMatch(a,r);if(!l)return null;let c=a.actionPathIdsCsv?this.readAppliedColorForRegionIds(e,a.actionPathIdsCsv):null;return{key:this.buildCustomizationCarryoverKey(a.id,a.name),dataSourceId:l.dataSourceId,sourceUrl:l.sourceUrl,transform:s?k({},s):null,color:c,sourceActionPathIdsCsv:a.actionPathIdsCsv??null,sourceName:(a.name??"").trim()||null}}).filter(a=>!!a):[]}async restorePatternCarryover(e,t){if(!e.length)return;let n=t.customizations.filter(s=>this.isPatternCustomization(s)&&!!s.actionPathIdsCsv),r=n.reduce((s,a)=>(s.set(this.buildCustomizationCarryoverKey(a.id,a.name),a),s),new Map),o=new Set;for(let s of e){let a=this.resolvePatternTargetCustomization(s,n,r,o);if(!a?.actionPathIdsCsv)continue;let l=this.resolvePatternSourceUrlForTarget(a,s);if(!l)continue;await t.patternState.applyPatternFromUrl(l,a.actionPathIdsCsv,!0);let c=t.patternState.selectedUploadedPatternId();c&&s.transform&&(t.patternState.onPatternDefinitionScaleChange(c,s.transform.scale),t.patternState.onPatternDefinitionRotationChange(c,s.transform.rotation),t.patternState.onPatternDefinitionTranslateXChange(c,s.transform.translateX),t.patternState.onPatternDefinitionTranslateYChange(c,s.transform.translateY),t.patternState.onPatternDefinitionOpacityChange(c,s.transform.opacity)),s.color&&this.colorState.applyColor(a.actionPathIdsCsv,s.color),o.add(this.buildCustomizationCarryoverKey(a.id,a.name))}}resolvePatternTargetCustomization(e,t,n,r){let o=n.get(e.key);if(o&&!r.has(this.buildCustomizationCarryoverKey(o.id,o.name)))return o;if(e.dataSourceId){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.pack?.dataSources??[]).some(d=>(d.id??"").trim()===e.dataSourceId)});if(a)return a}let s=(e.sourceName??"").trim().toLowerCase();if(s){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.name??"").trim().toLowerCase()===s});if(a)return a}if(e.sourceActionPathIdsCsv){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.actionPathIdsCsv??"").trim()===e.sourceActionPathIdsCsv});if(a)return a}return null}resolvePatternSourceMatch(e,t){let n=(e.pack?.dataSources??[]).find(r=>(r.fileUrl??"").trim()===t);return n?{dataSourceId:(n.id??"").trim()||null,sourceUrl:(n.fileUrl??"").trim()||t}:null}resolvePatternSourceUrlForTarget(e,t){let n=e.pack?.dataSources??[];if(t.dataSourceId){let a=(n.find(l=>(l.id??"").trim()===t.dataSourceId)?.fileUrl??"").trim();if(a)return a}let o=(n.find(s=>(s.fileUrl??"").trim()===t.sourceUrl)?.fileUrl??"").trim();return o||null}async restoreOverlayPatternCarryover(e,t){if(!e.length)return;let n=new Set(t.personalizationItems.map(o=>o.id)),r=this.groupOverlayPatternsForRestore(e,n);for(let o of r){await t.patternOverlayState.onAddPatternPathFromUrl(o.sourceUrl,o.thumbnailUrl,o.placementId);let s=t.patternOverlayState.state().overlays.filter(l=>(l.sourceUrl??"").trim()===o.sourceUrl&&(l.placementId??null)===o.placementId);if(!s.length)continue;let a=new Set;for(let l of o.overlays){let c=this.matchRestoredOverlayCandidate(l,s,a);c&&(a.add(c.id),t.patternOverlayState.onPatternOpacityChange(c.id,l.opacity),l.fill&&this.colorState.applyColor(c.id,l.fill))}}}groupOverlayPatternsForRestore(e,t){let n=new Map;for(let r of e){let o=(r.sourceUrl??"").trim();if(!o)continue;let s=r.placementId??null;if(s&&!t.has(s))continue;let a=`${o}::${s??""}`,l=n.get(a);if(l){l.overlays.push(r);continue}n.set(a,{sourceUrl:o,placementId:s,thumbnailUrl:r.thumbnailUrl,overlays:[r]})}return[...n.values()]}matchRestoredOverlayCandidate(e,t,n){let r=t.find(s=>!n.has(s.id)&&s.pathData===e.pathData);if(r)return r;let o=t.find(s=>!n.has(s.id)&&(s.label??"").trim()===(e.label??"").trim());return o||(t.find(s=>!n.has(s.id))??null)}restoreOverlayCarryover(e,t){let n=new Set(t.personalizationItems.map(s=>s.placementKey)),r=e.textOverlays.map(s=>k({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneTextBounds(k({},s)):s),o=e.logoOverlays.map(s=>k({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneLogoBounds(k({},s)):s);t.overlaysState.set([...r,...o]),t.activeOverlayIdState.set(null),this.customizerState.setActiveOverlay(null)}restoreColorCarryover(e,t){t.forEach(n=>{if(!this.isColorCustomization(n)||!n.actionPathIdsCsv)return;let r=e.colorsByRegion.get(n.actionPathIdsCsv),o=e.colorsByCustomizationName.get((n.name??"").trim().toLowerCase()),s=r??o;s&&this.colorState.applyColor(n.actionPathIdsCsv,s)})}isColorCustomization(e){return(e.type??"").trim().toLowerCase()===jD.COLOR}isPatternCustomization(e){return(e.type??"").trim().toLowerCase()===jD.PATTERN}buildCustomizationCarryoverKey(e,t){return`${(e??"").trim().toLowerCase()}::${(t??"").trim().toLowerCase()}`}readAppliedColorForRegionIds(e,t){let n=this.parseColorTargets(t);for(let{selector:r,stopIndex:o}of n){let s=Array.from(e.querySelectorAll(r));if(s.length===0)continue;let a=s[0];if(a.tagName.toLowerCase()===U4){let c=Array.from(a.querySelectorAll("stop"));if(!c.length)continue;let d=this.resolveGradientStopIndex(o,c.length),u=c[d],f=u.getAttribute("stop-color")??u.style.stopColor??"";if(f.trim())return f;continue}let l=a.getAttribute("fill")??a.style.fill??"";if(l.trim())return l}return null}parseColorTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length>0?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveGradientStopIndex(e,t){let n=Number.isFinite(e)?e:B4;return Math.min(Math.max(n,0),t-1)}static \u0275fac=function(t){return new(t||i)(Ke(uh),Ke(Dn))};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})};function mse(i,e){if(i&1){let t=Ae();x(0,"app-ui-button",11),W("onClick",function(){z(t);let r=C(2);return V(r.onClose())}),S()}i&2&&q("icon","ri-close-line")("text",!0)("rounded",!0)}function gse(i,e){if(i&1&&(x(0,"p",9),R(1),S()),i&2){let t,n=C(2);T(),ze((t=n.config())==null?null:t.subtitle)}}function vse(i,e){if(i&1){let t=Ae();x(0,"app-ui-button",13),W("onClick",function(){let r=z(t).$implicit,o=C(3);return V(o.onButtonClick(r))}),S()}if(i&2){let t=e.$implicit;q("label",t.label)("severity",t.isPrimary?"primary":"secondary")}}function bse(i,e){if(i&1&&(x(0,"div",10),mt(1,vse,1,2,"app-ui-button",12,al),S()),i&2){let t,n=C(2);T(),gt((t=n.config())==null?null:t.buttons)}}function yse(i,e){if(i&1){let t=Ae();x(0,"div",1),W("click",function(){z(t);let r=C();return V(r.onBackdropClick())}),x(1,"div",2),W("click",function(r){return r.stopPropagation()}),x(2,"div",3)(3,"div",4)(4,"h2",5),R(5),S(),le(6,mse,1,3,"app-ui-button",6),S(),x(7,"div",7)(8,"p",8),R(9),S(),le(10,gse,2,1,"p",9),S(),le(11,bse,3,0,"div",10),S()()()}if(i&2){let t,n,r,o,s,a,l=C();T(2),ur("dialog-type-"+(((t=l.config())==null?null:t.type)||"custom")),T(3),ze((n=l.config())==null?null:n.title),T(),ce((r=l.config())!=null&&r.closable?6:-1),T(3),ze((o=l.config())==null?null:o.message),T(),ce((s=l.config())!=null&&s.subtitle?10:-1),T(),ce((a=l.config())!=null&&a.buttons&&l.config().buttons.length>0?11:-1)}}var Z_=class i{dialogService=Z(Mo);isOpen=this.dialogService.isOpen;config=this.dialogService.currentConfig;ngOnInit(){}onClose(){this.dialogService.cancel()}onBackdropClick(){this.config()?.closable&&this.onClose()}onButtonClick(e){e.action==="confirm"?this.dialogService.confirm():e.action==="cancel"?this.dialogService.cancel():e.action==="custom"&&e.customId&&this.dialogService.handleCustomAction(e.customId)}getButtonClass(e){let t=["dialog-btn"];return e.isPrimary&&t.push("dialog-btn-primary"),e.isDestructive&&t.push("dialog-btn-destructive"),t.join(" ")}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-generic-dialog"]],decls:1,vars:1,consts:[[1,"dialog-overlay"],[1,"dialog-overlay",3,"click"],[1,"dialog-container",3,"click"],[1,"dialog"],[1,"dialog-header"],[1,"dialog-title"],["severity","primary","aria-label","Close dialog",3,"icon","text","rounded"],[1,"dialog-content"],[1,"dialog-message"],[1,"dialog-subtitle"],[1,"dialog-actions"],["severity","primary","aria-label","Close dialog",3,"onClick","icon","text","rounded"],[3,"label","severity"],[3,"onClick","label","severity"]],template:function(t,n){t&1&&le(0,yse,12,7,"div",0),t&2&&ce(n.isOpen()?0:-1)},dependencies:[Ut,ta],styles:[".dialog-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:_ngcontent-%COMP%_dialogFadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_dialogFadeIn{0%{opacity:0;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.dialog-container[_ngcontent-%COMP%]{position:relative;z-index:10000;animation:_ngcontent-%COMP%_dialogSlideUp .3s ease-out;max-width:90vw;max-height:90vh}@keyframes _ngcontent-%COMP%_dialogSlideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.dialog[_ngcontent-%COMP%]{background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:12px;box-shadow:0 20px 60px #0f172a26;overflow:hidden;min-width:380px;display:flex;flex-direction:column}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid rgb(var(--border-color, 203 213 225));background:linear-gradient(135deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)))}.dialog-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:rgb(var(--text-color, 15 23 42));line-height:1.3}.dialog-close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:18px;cursor:pointer;border-radius:6px;transition:all .2s;flex-shrink:0}.dialog-close[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.dialog-content[_ngcontent-%COMP%]{padding:24px;color:rgb(var(--text-color, 15 23 42))}.dialog-message[_ngcontent-%COMP%]{margin:0 0 12px;font-size:14px;line-height:1.5;font-weight:500}.dialog-message[_ngcontent-%COMP%]:last-child{margin-bottom:0}.dialog-subtitle[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;margin:0;line-height:1.5}.dialog-actions[_ngcontent-%COMP%]{display:flex;gap:12px;padding:20px 24px;border-top:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-100, 248 250 252) / .5);justify-content:flex-end}.dialog-btn[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;min-width:100px;text-align:center;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));border:1px solid rgb(var(--border-color, 203 213 225))}.dialog-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--text-color-secondary, 100 116 139))}.dialog-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.dialog-btn-primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.dialog-btn-primary[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 4px 12px #6265f14d}.dialog-btn-destructive[_ngcontent-%COMP%]{background:#ef4444;color:#fff;border:none}.dialog-btn-destructive[_ngcontent-%COMP%]:hover{background:#dc2626;box-shadow:0 4px 12px #ef44444d}.dialog-type-warning[_ngcontent-%COMP%]{border-top:4px solid rgb(249,115,22)}.dialog-type-success[_ngcontent-%COMP%]{border-top:4px solid rgb(16,185,129)}.dialog-type-error[_ngcontent-%COMP%]{border-top:4px solid rgb(239,68,68)}@media(max-width:640px){.dialog[_ngcontent-%COMP%]{min-width:350px;max-width:100%}.dialog-content[_ngcontent-%COMP%], .dialog-header[_ngcontent-%COMP%]{padding:20px}.dialog-btn[_ngcontent-%COMP%]{width:100%;min-width:unset}}"]})};var xse=(i,e)=>e.id;function _se(i,e){if(i&1){let t=Ae();x(0,"div",1)(1,"div",2),U(2,"i"),x(3,"div",3)(4,"span",4),R(5),S(),x(6,"span",5),R(7),S()()(),x(8,"button",6),W("click",function(){let r=z(t).$implicit,o=C();return V(o.onDismiss(r.id))}),U(9,"i",7),S()()}if(i&2){let t=e.$implicit,n=C();q("ngClass","toast--"+t.type),fn("aria-label",n.getAriaLabel(t.type)),T(2),ur("toast-icon "+n.getIcon(t.type)),T(3),ze(t.title),T(2),ze(t.message)}}var J_=class i{toasterService=Z(Fr);toasts=this.toasterService.toasts;onDismiss(e){this.toasterService.dismissToast(e)}getIcon(e){return{success:"ri-checkbox-circle-fill",error:"ri-close-circle-fill",warning:"ri-alert-fill",info:"ri-information-fill"}[e]}getAriaLabel(e){return{success:"Success notification",error:"Error notification",warning:"Warning notification",info:"Information notification"}[e]}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-toaster"]],decls:3,vars:0,consts:[[1,"toaster-container"],["role","alert",1,"toast",3,"ngClass"],[1,"toast-content"],[1,"toast-text"],[1,"toast-title"],[1,"toast-message"],["type","button","aria-label","Close notification",1,"toast-close",3,"click"],[1,"ri-close-line"]],template:function(t,n){t&1&&(x(0,"div",0),mt(1,_se,10,6,"div",1,xse),S()),t&2&&(T(),gt(n.toasts()))},dependencies:[Ut,Ww],styles:[".toaster-container[_ngcontent-%COMP%]{position:fixed;top:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:12px;pointer-events:none}.toast[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-radius:8px;box-shadow:0 4px 12px #00000026;animation:_ngcontent-%COMP%_slideIn .3s ease-out;pointer-events:auto;max-width:400px;min-width:280px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}@keyframes _ngcontent-%COMP%_slideIn{0%{transform:translate(400px);opacity:0}to{transform:translate(0);opacity:1}}.toast--success[_ngcontent-%COMP%]{background:linear-gradient(135deg,#10b981,#059669);color:#fff;border-left:4px solid #059669}.toast--error[_ngcontent-%COMP%]{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;border-left:4px solid #dc2626}.toast--warning[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border-left:4px solid #d97706}.toast--info[_ngcontent-%COMP%]{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-left:4px solid #2563eb}.toast-content[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;flex:1}.toast-icon[_ngcontent-%COMP%]{font-size:20px;flex-shrink:0;margin-top:2px}.toast-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.toast-title[_ngcontent-%COMP%]{font-weight:600;font-size:14px;letter-spacing:.3px}.toast-message[_ngcontent-%COMP%]{font-weight:400;font-size:13px;opacity:.95;line-height:1.4}.toast-close[_ngcontent-%COMP%]{background:none;border:none;color:inherit;font-size:18px;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease;flex-shrink:0;opacity:1}.toast-close[_ngcontent-%COMP%]:hover{background-color:#fff3}.toast-close[_ngcontent-%COMP%]:focus{outline:2px solid rgba(255,255,255,.5);outline-offset:2px}@media(max-width:640px){.toaster-container[_ngcontent-%COMP%]{left:12px;right:12px;top:12px}.toast[_ngcontent-%COMP%]{min-width:auto}}"],changeDetection:0})};var Sse=["threeDUI"],z4=(i,e)=>e.id,V4=(i,e)=>e.trackId;function Cse(i,e){if(i&1&&U(0,"img",4),i&2){let t=C();q("src",t.distributorHeaderLogoUrl(),fi)}}function wse(i,e){i&1&&(x(0,"app-ui-tab",15),R(1,"2D Editor"),S(),x(2,"app-ui-tab",16),R(3,"Both"),S())}function Ese(i,e){if(i&1&&(x(0,"div",12),U(1,"app-manifest-loader",17),S()),i&2){let t=C();T(),q("message",t.manifestLoaderMessage)}}function Mse(i,e){if(i&1){let t=Ae();x(0,"button",22),W("click",function(){z(t);let r=C(2);return V(r.retryManifestLoad())}),R(1," Retry "),S()}}function Tse(i,e){if(i&1&&(x(0,"div",12)(1,"div",18)(2,"div",19),R(3,"Unable to load manifest"),S(),x(4,"div",20),R(5),S(),le(6,Mse,2,0,"button",21),S()()),i&2){let t=C();T(5),ze(t.manifestError()),T(),ce(t.isSdkRuntime()?-1:6)}}function Dse(i,e){if(i&1&&(x(0,"div",13),U(1,"app-save-loader",23),S()),i&2){let t=C();T(),q("message",t.designSaveMessage()||"Saving design\u2026")("subtitle","Please wait while your design is being processed")}}function Ase(i,e){i&1&&U(0,"app-three-d-loader")}function Ise(i,e){if(i&1){let t=Ae();x(0,"app-three-d-ui",46,0),mp("svgTextChange",function(r){z(t);let o=C(2);return Ms(o.svgText,r)||(o.svgText=r),V(r)})("svgDimensionsChange",function(r){z(t);let o=C(2);return Ms(o.svgDimensions,r)||(o.svgDimensions=r),V(r)})("svgViewBoxChange",function(r){z(t);let o=C(2);return Ms(o.svgViewBox,r)||(o.svgViewBox=r),V(r)})("showPlacementGuidesChange",function(r){z(t);let o=C(2);return Ms(o.showPlacementGuides,r)||(o.showPlacementGuides=r),V(r)})("placementZonesChange",function(r){z(t);let o=C(2);return Ms(o.placementZones,r)||(o.placementZones=r),V(r)})("overlaysChange",function(r){z(t);let o=C(2);return Ms(o.overlays,r)||(o.overlays=r),V(r)})("activeOverlayIdChange",function(r){z(t);let o=C(2);return Ms(o.activeOverlayId,r)||(o.activeOverlayId=r),V(r)}),W("activeOverlayChange",function(r){z(t);let o=C(2);return V(o.setActiveOverlay(r))})("threeDVariantSelected",function(r){z(t);let o=C(2);return V(o.onThreeDVariantSelected(r))})("overlayPositionChange",function(r){z(t);let o=C(2);return V(o.onOverlayPositionChange(r))})("overlayRotationChange",function(r){z(t);let o=C(2);return V(o.onOverlayRotationChange(r))})("overlayResizeChange",function(r){z(t);let o=C(2);return V(o.onOverlayResizeChange(r))})("onUndo",function(){z(t);let r=C(2);return V(r.onUndo())})("onRedo",function(){z(t);let r=C(2);return V(r.onRedo())}),S()}if(i&2){let t=C(2);q("isModelLoading",t.isModelLoading()),Hc("svgText",t.svgText),q("isActive",t.editorMode()!=="2d")("threeDVariants",t.threeDVariants())("selectedThreeDVariantId",t.selectedThreeDVariantId())("mtlText",t.mtlText())("objText",t.objText())("materialSourceUrl",t.materialFileLink()),Hc("svgDimensions",t.svgDimensions),q("overlayBounds",t.threeDOverlayBounds())("printAreaWidthInches",t.printAreaWidthInches())("printAreaHeightInches",t.printAreaHeightInches())("gridSizeInches",t.twoDGridSizeInches()),Hc("svgViewBox",t.svgViewBox)("showPlacementGuides",t.showPlacementGuides)("placementZones",t.placementZones)("overlays",t.overlays)("activeOverlayId",t.activeOverlayId),q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("gridSize",t.threeDGridSizeNormalized())}}function Pse(i,e){i&1&&(x(0,"div",50)(1,"div",51),U(2,"i",49),x(3,"span"),R(4,"Keyboard Shortcuts"),S()(),U(5,"app-keyboard-shortcuts-panel"),S())}function Ose(i,e){if(i&1){let t=Ae();x(0,"div",47),W("click",function(r){return r.stopPropagation()}),x(1,"button",48),W("click",function(r){z(t);let o=C(2);return V(o.toggleShortcuts(r))}),U(2,"i",49),S(),le(3,Pse,6,0,"div",50),S()}if(i&2){let t=C(2);T(),dt("active",t.showShortcuts()),T(2),ce(t.showShortcuts()?3:-1)}}function Rse(i,e){if(i&1&&(x(0,"div",32),U(1,"app-manifest-loader",17),x(2,"p",52),R(3),S()()),i&2){let t=C(2);T(),q("message",t.predesignLoaderMessage),T(2),ze(t.predesignLoaderSubtitle)}}function kse(i,e){i&1&&(x(0,"p",35),R(1,"No actions available for this step."),S())}function Fse(i,e){if(i&1){let t=Ae();x(0,"app-pre-designs-panel",63),W("designSelected",function(r){z(t);let o=C(4);return V(o.onPredesignSelected(r))}),S()}if(i&2){let t=C().$implicit,n=C(3);q("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Nse(i,e){if(i&1&&U(0,"app-customizer-color-panel",57),i&2){let t=C().$implicit;q("items",t.customizations)}}function Lse(i,e){if(i&1&&U(0,"app-customizer-pattern-panel",57),i&2){let t=C().$implicit;q("items",t.customizations)}}function Use(i,e){if(i&1&&U(0,"app-customizer-personalization-panel",58),i&2){let t=C().$implicit,n=C(3);q("items",t.items)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Bse(i,e){if(i&1&&U(0,"app-overlay-panel",59),i&2){let t=C().$implicit;q("items",t.items)("useAccordion",t.items.length>1)}}function zse(i,e){if(i&1&&U(0,"app-customizer-background-panel",60),i&2){let t=C().$implicit,n=C(3);q("templates",t.templates)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Vse(i,e){if(i&1){let t=Ae();x(0,"app-render-order-panel",64),W("moveTowardFront",function(r){z(t);let o=C(4);return V(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){z(t);let o=C(4);return V(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){z(t);let o=C(4);return V(o.onRenderOrderReorder(r))})("selectItem",function(r){z(t);let o=C(4);return V(o.onRenderOrderSelect(r))}),S()}if(i&2){let t=C().$implicit,n=C(3);q("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function Hse(i,e){if(i&1){let t=Ae();x(0,"app-canvas-guide-panel",65),W("onGridToggle",function(){z(t);let r=C(4);return V(r.onGridToggle())})("onSnapToggle",function(){z(t);let r=C(4);return V(r.onSnapToggle())})("onGuidesToggle",function(){z(t);let r=C(4);return V(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){z(t);let o=C(4);return V(o.onTwoDGridSizeChange(r))}),S()}if(i&2){let t=C(4);q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function Gse(i,e){if(i&1&&(x(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2"),R(4),S()(),x(5,"div",55),le(6,Fse,1,2,"app-pre-designs-panel",56)(7,Nse,1,1,"app-customizer-color-panel",57)(8,Lse,1,1,"app-customizer-pattern-panel",57)(9,Use,1,3,"app-customizer-personalization-panel",58)(10,Bse,1,2,"app-overlay-panel",59)(11,zse,1,3,"app-customizer-background-panel",60)(12,Vse,1,2,"app-render-order-panel",61)(13,Hse,1,7,"app-canvas-guide-panel",62),S()()()),i&2){let t,n=e.$implicit,r=C(3);T(4),ze(n.title),T(2),ce((t=n.kind)===r.panelKind.PREDESIGNS?6:t===r.panelKind.COLOR?7:t===r.panelKind.PATTERN?8:t===r.panelKind.PERSONALIZATION?9:t===r.panelKind.OVERLAY?10:t===r.panelKind.BACKGROUND?11:t===r.panelKind.RENDER_ORDER?12:t===r.panelKind.CANVAS_GUIDE?13:-1)}}function jse(i,e){if(i&1&&mt(0,Gse,14,2,"section",36,V4),i&2){let t=C(2);gt(t.activePanels())}}function Wse(i,e){if(i&1){let t=Ae();x(0,"app-pre-designs-panel",63),W("designSelected",function(r){z(t);let o=C(4);return V(o.onPredesignSelected(r))}),S()}if(i&2){let t=C().$implicit,n=C(3);q("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function $se(i,e){if(i&1&&U(0,"app-customizer-color-panel",57),i&2){let t=C().$implicit;q("items",t.customizations)}}function Yse(i,e){if(i&1&&U(0,"app-customizer-pattern-panel",57),i&2){let t=C().$implicit;q("items",t.customizations)}}function Xse(i,e){if(i&1&&U(0,"app-customizer-personalization-panel",58),i&2){let t=C().$implicit,n=C(3);q("items",t.items)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function qse(i,e){if(i&1&&U(0,"app-overlay-panel",59),i&2){let t=C().$implicit;q("items",t.items)("useAccordion",t.items.length>1)}}function Kse(i,e){if(i&1&&U(0,"app-customizer-background-panel",60),i&2){let t=C().$implicit,n=C(3);q("templates",t.templates)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Zse(i,e){if(i&1){let t=Ae();x(0,"app-render-order-panel",64),W("moveTowardFront",function(r){z(t);let o=C(4);return V(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){z(t);let o=C(4);return V(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){z(t);let o=C(4);return V(o.onRenderOrderReorder(r))})("selectItem",function(r){z(t);let o=C(4);return V(o.onRenderOrderSelect(r))}),S()}if(i&2){let t=C().$implicit,n=C(3);q("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function Jse(i,e){if(i&1){let t=Ae();x(0,"app-canvas-guide-panel",65),W("onGridToggle",function(){z(t);let r=C(4);return V(r.onGridToggle())})("onSnapToggle",function(){z(t);let r=C(4);return V(r.onSnapToggle())})("onGuidesToggle",function(){z(t);let r=C(4);return V(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){z(t);let o=C(4);return V(o.onTwoDGridSizeChange(r))}),S()}if(i&2){let t=C(4);q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function Qse(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",68)(1,"app-ui-accordion-header")(2,"div",69)(3,"span"),R(4),S()()(),x(5,"app-ui-accordion-content")(6,"div",70),le(7,Wse,1,2,"app-pre-designs-panel",56)(8,$se,1,1,"app-customizer-color-panel",57)(9,Yse,1,1,"app-customizer-pattern-panel",57)(10,Xse,1,3,"app-customizer-personalization-panel",58)(11,qse,1,2,"app-overlay-panel",59)(12,Kse,1,3,"app-customizer-background-panel",60)(13,Zse,1,2,"app-render-order-panel",61)(14,Jse,1,7,"app-canvas-guide-panel",62),S()()()),i&2){let t,n=e.$implicit,r=C(3);q("value",n.trackId),T(4),ze(n.title),T(3),ce((t=n.kind)===r.panelKind.PREDESIGNS?7:t===r.panelKind.COLOR?8:t===r.panelKind.PATTERN?9:t===r.panelKind.PERSONALIZATION?10:t===r.panelKind.OVERLAY?11:t===r.panelKind.BACKGROUND?12:t===r.panelKind.RENDER_ORDER?13:t===r.panelKind.CANVAS_GUIDE?14:-1)}}function eae(i,e){if(i&1&&(x(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2",66),R(4),S()(),x(5,"div",55)(6,"app-ui-accordion",67),mt(7,Qse,15,3,"app-ui-accordion-panel",68,V4),S()()()()),i&2){let t,n=C(2);T(4),ze(n.selectedStepLabel()),T(2),q("value",(t=n.activePanels()[0])==null?null:t.trackId),T(),gt(n.activePanels())}}function tae(i,e){i&1&&(U(0,"i",72),x(1,"span"),R(2,"Hide Options"),S())}function nae(i,e){i&1&&(U(0,"i",73),x(1,"span"),R(2,"Show Options"),S())}function iae(i,e){if(i&1){let t=Ae();x(0,"button",71),W("click",function(){z(t);let r=C(2);return V(r.toggleMobilePanel())}),le(1,tae,3,0)(2,nae,3,0),S()}if(i&2){let t=C(2);fn("aria-label",t.mobilePanelVisible()?"Hide options panel":"Show options panel"),T(),ce(t.mobilePanelVisible()?1:2)}}function rae(i,e){i&1&&(U(0,"i",72),x(1,"span"),R(2,"Show Preview"),S())}function oae(i,e){i&1&&(U(0,"i",75),x(1,"span"),R(2,"Expand Panel"),S())}function sae(i,e){if(i&1){let t=Ae();x(0,"button",74),W("click",function(){z(t);let r=C(2);return V(r.toggleMobileCanvas())}),le(1,rae,3,0)(2,oae,3,0),S()}if(i&2){let t=C(2);T(),ce(t.mobileCanvasHidden()?1:2)}}function aae(i,e){if(i&1&&U(0,"i"),i&2){let t=C().$implicit;ur(t.iconClass)}}function lae(i,e){if(i&1){let t=Ae();x(0,"button",77),W("click",function(){let r=z(t).$implicit,o=C(3);return V(o.onNavItemClick(r.id))}),le(1,aae,1,2,"i",78),x(2,"span",79),R(3),S()()}if(i&2){let t=e.$implicit,n=C(3);dt("active",t.id===n.activeStepId()),T(),ce(t.iconClass?1:-1),T(),co("padding-left",t.depth*12,"px"),T(),ze(t.name)}}function cae(i,e){if(i&1&&(x(0,"div",42),mt(1,lae,4,6,"button",76,z4),S()),i&2){let t=C(2);T(),gt(t.hiddenNavItems())}}function dae(i,e){if(i&1&&U(0,"i"),i&2){let t=C().$implicit;ur(t.iconClass)}}function uae(i,e){if(i&1){let t=Ae();x(0,"button",80),W("click",function(){let r=z(t).$implicit,o=C(2);return V(o.onNavItemClick(r.id))}),le(1,dae,1,2,"i",78),x(2,"span",79),R(3),S()()}if(i&2){let t=e.$implicit,n=C(2);dt("active",t.id===n.activeStepId()),T(),ce(t.iconClass?1:-1),T(),co("padding-left",t.depth*12,"px"),T(),ze(t.name)}}function fae(i,e){i&1&&(U(0,"i",82),x(1,"span",79),R(2,"Hide"),S())}function hae(i,e){i&1&&(U(0,"i",83),x(1,"span",79),R(2,"Show More"),S())}function pae(i,e){if(i&1){let t=Ae();x(0,"button",81),W("click",function(){z(t);let r=C(2);return V(r.toggleNavExpanded())}),le(1,fae,3,0)(2,hae,3,0),S()}if(i&2){let t=C(2);T(),ce(t.navExpanded()?1:2)}}function mae(i,e){if(i&1){let t=Ae();x(0,"div",24)(1,"main",25)(2,"section",26)(3,"div",26)(4,"app-two-d-ui",27),W("layerToggle",function(r){z(t);let o=C();return V(o.onLayerToggle(r))})("canvasReady",function(r){z(t);let o=C();return V(o.onTwoDCanvasReady(r))})("canvasDetached",function(){z(t);let r=C();return V(r.onTwoDCanvasDestroyed())})("zoomIn",function(){z(t);let r=C();return V(r.onTwoDZoomIn())})("zoomOut",function(){z(t);let r=C();return V(r.onTwoDZoomOut())})("resetView",function(){z(t);let r=C();return V(r.onTwoDReset())})("onUndo",function(){z(t);let r=C();return V(r.onUndo())})("onRedo",function(){z(t);let r=C();return V(r.onRedo())}),S()()(),x(5,"section",26)(6,"main",28)(7,"div",29),le(8,Ase,1,0,"app-three-d-loader"),le(9,Ise,2,21,"app-three-d-ui",30),S()()(),le(10,Ose,4,3,"div",31),le(11,Rse,4,2,"div",32),S(),x(12,"section",33)(13,"aside",34),le(14,kse,2,0,"p",35)(15,jse,2,0)(16,eae,9,2,"section",36),S()(),x(17,"section",37)(18,"div",38)(19,"div",39),le(20,iae,3,2,"button",40),le(21,sae,3,1,"button",41),S(),le(22,cae,3,0,"div",42),x(23,"div",43),mt(24,uae,4,6,"button",44,z4),le(26,pae,3,1,"button",45),S()()()()}if(i&2){let t=C();dt("mobile-panel-hidden",!t.mobilePanelVisible())("mobile-canvas-hidden",t.mobileCanvasHidden()),T(),dt("single",t.editorMode()!=="both")("canvas-loading",t.showCanvasManifestLoader()),T(),dt("hidden",t.editorMode()==="3d"),T(2),q("svgText",t.svgText())("isActive",t.editorMode()!=="3d")("layers",t.layers())("selectedLayerKey",t.selectedLayerKey())("isShowAllLayersOption",t.isShowWholeLayersOption())("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridSize",t.twoDGridSize()),T(),dt("hidden",t.editorMode()==="2d"),T(3),ce(t.loading()?8:-1),T(),ce(t.editorMode()==="3d"||t.editorMode()==="both"?9:-1),T(),ce(t.isMobile()?-1:10),T(),ce(t.showCanvasManifestLoader()?11:-1),T(3),ce(t.activePanels().length===0?14:t.activePanels().length===1?15:16),T(6),ce(t.mobileCanvasHidden()?-1:20),T(),ce(t.mobilePanelVisible()?21:-1),T(),ce(t.navExpanded()?22:-1),T(),dt("nav-expanded",t.navExpanded()),T(),gt(t.visibleNavItems()),T(2),ce(t.hiddenNavItems().length>0?26:-1)}}var Q_=class i{panelKind=N_;apiKey=_e.required();productId=_e.required();submissionNumber=_e(null);predesignId=_e(null);userUniqueId=_e(null);threeDUI=Lu("threeDUI");editorMode=F("3d");customizerState=Z(Dn);measurementService=Z(Kl);fontAssetService=Z(p_);textLayoutService=Z(m_);printAreaMeasurementService=Z(Yl);svgRenderService=Z(g_);overlayStyleService=Z(v_);renderOrderState=Z(b_);backgroundState=Z(oh);personalizationState=Z(sc);patternState=Z(fh);patternOverlayState=Z(vh);designHistory=Z(Gl);destroyRef=Z(ui);manifestFlowService=Z(q_);threeThumbnailService=Z(F_);submissionApi=Z(I_);toaster=Z(Fr);panelService=Z(V_);fileService=Z(H_);designExportService=Z(G_);themeService=Z(th);keyboardShortcutService=Z(j_);layerBoundsService=Z(W_);imageCompressionService=Z(qs);predesignCarryoverService=Z(K_);dialogService=Z(Mo);sdkRuntimeConfig=Z(R_,{optional:!0});selectedStepLabel=Me(()=>this.parentNav().find(e=>e.id===this.activeStepId())?.name??"");fallbackProductId=Z3;isSdkRuntime=F(!!this.sdkRuntimeConfig);mobilePanelVisible=F(!0);mobileCanvasHidden=F(!1);isMobile=F(!1);toggleMobileCanvas(){this.mobileCanvasHidden.update(e=>!e)}manifestLoading=F(!1);manifestError=F(null);predesignSwitchLoading=F(!1);showBlockingManifestLoader=Me(()=>this.manifestLoading()&&!this.predesignSwitchLoading());showCanvasManifestLoader=Me(()=>this.manifestLoading()&&this.predesignSwitchLoading());showBlockingManifestError=Me(()=>!!this.manifestError()&&!this.manifestLoaded);manifestLoaderMessage="Loading product manifest\u2026";predesignLoaderMessage="Applying selected design\u2026";predesignLoaderSubtitle="Updating 2D and 3D previews";selectedPredesignId=F(null);designSavingInProgress=F(!1);designSaveMessage=F(null);distributorHeaderLogoUrl=F(null);submissionThumbnailViews=["front","right","back","left"];manifestRequestToken=null;pendingPredesignCarryover=null;viewInitialized=!1;manifestLoaded=!1;filesLoaded=!1;hasInitializedManifestLoad=!1;lastManifestConfigSignature=null;pendingSubmissionPayload=null;editableSubmissionCompressionToken=null;suspendTextureRebuild=!1;pendingTextureRebuildWhileSuspended=!1;pendingEditableTextEffects=F([]);appliedEditableTextEffectKeys=F(new Set);replayPendingEffectsInFlight=!1;svgText=this.customizerState.svgTextState;svgDoc=this.customizerState.svgDocState;svgTextForExport=F(null);baseSvgText=F(null);predesignBaseSvgText=F(null);mtlText=F(null);objText=F(null);threeDVariants=F([]);selectedThreeDVariantId=F(null);showThreeDVariantSwitch=Me(()=>this.threeDVariants().length>1);threeDFileLink=F("");materialFileLink=F(null);pathIdAccordingLayers=F([]);renderPathAccordingLayers=F([]);layers=Me(()=>this.pathIdAccordingLayers().map(e=>e.name));selectedLayerKey=F(null);placementZones=this.personalizationState.placementZones;showPlacementGuides=this.personalizationState.showPlacementGuides;loading=F(!1);isModelLoading=F(!1);sanitizer=Z(Mp);minFontSize=F(12);maxFontSize=F(400);fontSizeStep=F(2);rotationStep=F(5);builtInFontOptions=F(Jx.map(({label:e,value:t})=>({label:e,value:t})));fontOptions=F([...this.builtInFontOptions()]);defaultFontFamily=F(this.builtInFontOptions()[0]?.value??Jx[0]?.value??yr);defaultFontWeight=F("normal");defaultFontStyle=F("normal");defaultLineHeight=F(1.2);defaultLetterSpacing=F(0);strokeWidthStep=F(.5);letterSpacingStep=F(.5);defaultCurveAmount=F(0);defaultShadowBlur=F(0);shadowBlurStep=F(1);defaultShadowOffsetX=F(0);defaultShadowOffsetY=F(0);defaultShadowColor=F(nh);warpEnvelopeFileName=F(null);warpUploadError=F(null);overlays=this.customizerState.overlays;svgDimensions=F(null);svgViewBox=F({minX:0,minY:0,width:1e3,height:1e3});activeOverlayId=F(null);threeDOverlayBounds=Me(()=>this.getOverlayBoundingRect());gridEnabled=F(!1);snapEnabled=F(!1);gridRatio=F((Kr.TWO_D_GRID_SIZE-8)/112);printAreaWidthInches=Me(()=>this.customizerState.printAreaWidthInches());printAreaHeightInches=Me(()=>this.customizerState.printAreaHeightInches());twoDGridSizeInches=F(1);twoDGridStepPx=Me(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox(),o=this.twoDGridSizeInches();return e&&e>0&&n&&n>0&&o>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(o,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(o,r.height,n)))}:{x:Kr.TWO_D_GRID_SIZE,y:Kr.TWO_D_GRID_SIZE}});twoDGridSize=Me(()=>this.twoDGridStepPx().x);twoDGridMajorStepPx=Me(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox();return e&&e>0&&n&&n>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(1,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(1,r.height,n)))}:{x:Kr.INCH_IN_PIXELS,y:Kr.INCH_IN_PIXELS}});twoDGridMajorSize=Me(()=>this.twoDGridMajorStepPx().x);threeDGridSizeNormalized=Me(()=>{let e=this.gridRatio();return Math.round((e*(.2-.01)+.01)*100)/100});svgFileLink=F("");customizations=F([]);predesigns=F([]);isShowWholeLayersOption=F(!1);personlizationPlacements=Me(()=>this.personalizationState.placements());twoDCanvasElement=null;fabricCanvas=null;fabricCanvasCleanup=null;fabricCanvasSyncDimensions=null;fabricReady=F(!1);canvasLoadToken=F(null);baseElementCache=this.customizerState.baseElementCache;baseBBoxCache=this.customizerState.baseBBoxCache;measurementHost=this.customizerState.measurementHost;measurementSvgRoot=this.customizerState.measurementSvgRoot;measurementCloneDirty=this.customizerState.measurementCloneDirty;canvasTransform=F(null);fabricLayoutState=F(null);fabricViewZoom=F(1);minFabricViewZoom=F(.25);maxFabricViewZoom=F(5);isBrowser=this.customizerState.isBrowser;textureUpdateScheduled=F(!1);overlaySyncPromise=F(Promise.resolve());backgroundImageTemplates=Me(()=>this.backgroundState.state().templates);placementZoneBounds=F(new Map);overlayFabricObjects=F(new Map);fabricVisibleOverlayIds=F(new Set);layerBoundsCache=this.customizerState.layerBoundsCache;pendingLogoLoads=F(new Map);fontSourceMap=F(k({},fD));fontBinaryPromises=F(new Map);fontOutlinePromises=F(new Map);fontFacePromises=F(new Map);fontFacesReady=F(new Set);svgImageHrefCache=new Map;svgImageHrefPending=new Map;canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;historyInitialized=!1;historyDebounceHandle=null;sdkReadyNotified=!1;isUndoingRedoing=F(!1);historyCaptureSuspended=!1;preserveHistoryOnNextSvgLoad=!1;placementGuideObjects=F(new Map);fabricGridState=F({horizontal:[],vertical:[]});fabricGuideState=F({lines:[]});twoDSnapRuntime=F(zi());twoDCursorCanvasPoint=F(null);twoDDraggingOverlayId=F(null);fabricSelectionClearSuppressionCount=0;lastHandledRenderCommandId=0;lastHandledTextureCommandId=0;lastHandledOverlaySyncCommandId=0;predesignStepId=L_.PREDESIGNS;renderOrderStepId=L_.RENDER_ORDER;canvasGuideStepId=L_.CANVAS_GUIDE;steps=F([]);personalizationItems=F([]);activeStepId=F(null);activeRenderOrderItemId=Me(()=>this.activeOverlayId()?`overlay:${this.activeOverlayId()}`:null);stepNav=Me(()=>this.panelService.flattenSteps(this.steps()));renderOrderItems=Me(()=>{let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});return this.renderOrderState.stack().map(t=>e.get(t)).filter(t=>!!t)});stepLookup=Me(()=>this.panelService.buildStepLookup(this.steps()));parentNav=Me(()=>this.panelService.buildParentNav(this.steps(),this.renderOrderStepId,S4));navExpanded=F(!1);dynamicSlotId=F(null);isDesktop=F(!0);showShortcuts=F(!1);toggleShortcuts(e){e.stopPropagation(),this.showShortcuts.update(t=>!t)}closeShortcuts(){this.showShortcuts.set(!1)}onResize(){if(this.isBrowser()){let e=window.innerWidth;this.isDesktop.set(e>=992),this.isMobile.set(e<768)}}allNavItems=Me(()=>{let e=this.predesigns(),t=[];return e&&e.length>0&&t.push({id:this.predesignStepId,name:"Designs",iconClass:"ri-pencil-fill",depth:0}),t.push(...this.parentNav()),t.push({id:this.canvasGuideStepId,name:"Canvas Guide",iconClass:"ri-layout-grid-line",depth:0}),t});visibleNavItems=Me(()=>{let e=this.allNavItems();if(this.isDesktop()||e.length<=4)return e;let t=this.dynamicSlotId(),n=this.activeStepId(),r=n&&e.findIndex(a=>a.id===n)>=3?n:t;(!r||e.findIndex(a=>a.id===r)<3)&&(r=e[3].id);let o=e.slice(0,3),s=e.find(a=>a.id===r)||e[3];return[...o,s]});hiddenNavItems=Me(()=>{let e=this.allNavItems();if(e.length<=4)return[];let t=new Set(this.visibleNavItems().map(n=>n.id));return e.filter(n=>!t.has(n.id))});toggleNavExpanded(){this.navExpanded.update(e=>!e)}onNavItemClick(e){this.setActiveStep(e),this.navExpanded.set(!1),this.dynamicSlotId.set(e)}predesignPanel=Me(()=>{let e=this.predesigns();return e.length?{kind:"predesigns",trackId:this.predesignStepId,title:eu.DESIGNS,predesigns:e}:null});canvasGuidePanel=Me(()=>({kind:"canvas-guide",trackId:this.canvasGuideStepId,title:"Canvas Guide"}));panelsByStep=Me(()=>this.panelService.buildPanelsByStep({stepNav:this.stepNav(),customizations:this.customizations(),personalizationItems:this.personalizationItems(),stepLookup:this.stepLookup(),renderOrderStepId:this.renderOrderStepId,renderOrderItems:this.renderOrderItems()}));activePanels=Me(()=>{let e=this.activeStepId();if(!e)return[];if(e===this.predesignStepId){let s=this.predesignPanel();return s?[s]:[]}if(e===this.renderOrderStepId)return this.panelsByStep().get(this.renderOrderStepId)??[];if(e===this.canvasGuideStepId){let s=this.canvasGuidePanel();return s?[s]:[]}let t=this.stepLookup(),n=this.panelsByStep(),r=s=>{let a=n.get(s.id)??[],l=(s.children??[]).flatMap(c=>r(c));return[...a,...l]},o=t.get(e);return o?r(o):[]});constructor(){Yt(()=>{this.customizerState.fabricReadyState.set(this.fabricReady())}),Yt(()=>{this.customizerState.canvasTransformState.set(this.canvasTransform())}),Yt(()=>{let e=this.customizerState.render2dCommandId();e===0||e===this.lastHandledRenderCommandId||(this.lastHandledRenderCommandId=e,hn(()=>this.render2dView()))}),Yt(()=>{let e=this.customizerState.textureRebuildCommandId();e===0||e===this.lastHandledTextureCommandId||(this.lastHandledTextureCommandId=e,hn(()=>this.requestTextureRebuild()))}),Yt(()=>{let e=this.customizerState.overlaySyncCommandId();e===0||e===this.lastHandledOverlaySyncCommandId||(this.lastHandledOverlaySyncCommandId=e,hn(()=>{this.syncOverlaysToSvgDoc().then(()=>this.customizerState.completeOverlaySyncCommand(e)).catch(t=>this.customizerState.completeOverlaySyncCommand(e,t))}))}),Yt(()=>{this.apiKey(),this.productId();let e=this.submissionNumber()?.trim()??"",t=this.predesignId()?.trim()??"";if(!this.hasInitializedManifestLoad)return;let n=this.getManifestConfigSignature(),r=n?`${n}::${e}::${t}`:null;!r||r===this.lastManifestConfigSignature||(this.lastManifestConfigSignature=r,hn(()=>{if(e){this.selectedPredesignId.set(null),this.bootstrapEditableSubmission(e);return}t?this.selectedPredesignId.set(t):this.selectedPredesignId.set(null),this.pendingSubmissionPayload=null,this.loadManifest(t||void 0)}))}),Yt(()=>{let e=this.fabricReady(),t=this.showPlacementGuides(),n=this.placementZones().length,r=!!this.canvasTransform(),o=this.fabricCanvas;if(!o||!e||!r||n===0){o&&(hn(()=>this.clearPlacementGuides(o)),o.requestRenderAll());return}if(!t){hn(()=>this.clearPlacementGuides(o)),o.requestRenderAll();return}hn(()=>this.updatePlacementGuideVisibility())}),Yt(()=>{this.gridEnabled(),this.twoDGridStepPx(),this.twoDGridMajorStepPx(),this.twoDGridSizeInches(),hn(()=>this.render2dView())}),Yt(()=>{this.svgDoc(),this.svgText(),this.overlays(),this.patternState.state(),this.patternOverlayState.state().overlays,this.backgroundState.state().images,this.backgroundImageTemplates(),this.renderPathAccordingLayers(),hn(()=>this.synchronizeRenderOrderStack())}),Yt(()=>{this.svgText(),this.overlays(),this.selectedLayerKey(),this.showPlacementGuides(),this.backgroundState.state(),this.patternState.state(),hn(()=>{this.isUndoingRedoing()?this.isUndoingRedoing.set(!1):this.scheduleHistoryCapture()})}),Yt(()=>{this.ingestFontPacks(this.personalizationItems())}),Yt(()=>{this.personalizationItems(),this.overlays(),this.pendingEditableTextEffects().length&&hn(()=>{this.replayPendingEditableTextEffects()})}),Yt(()=>{let e=this.svgDoc();hn(()=>{if(!e){this.baseElementCache.set(null),this.baseBBoxCache.set(null);return}let t=e.documentElement;if(this.baseElementCache.set(t),t instanceof SVGGraphicsElement)try{this.baseBBoxCache.set(t.getBBox())}catch{this.baseBBoxCache.set(null)}})}),Yt(()=>{let e=this.editorMode();hn(()=>{(e==="3d"||e==="both")&&setTimeout(()=>{this.threeDUI()?.resizeHandler()},0),(e==="2d"||e==="both")&&setTimeout(()=>{this.fabricCanvasSyncDimensions?.(),this.render2dView()},0)})}),this.fontAssetService.queueFontFaceLoad(this.defaultFontFamily(),this.fontDeps()),this.registerKeyboardShortcuts()}ngOnInit(){if(this.isBrowser()){let n=window.innerWidth;this.isDesktop.set(n>=992),this.isMobile.set(n<768)}let e=this.submissionNumber()?.trim()??"",t=this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput());if(this.lastManifestConfigSignature=t?`${t}::${e}`:null,this.hasInitializedManifestLoad=!0,e){this.bootstrapEditableSubmission(e);return}}async bootstrapEditableSubmission(e){let t=this.resolveApiKey();if(this.pendingEditableTextEffects.set([]),this.appliedEditableTextEffectKeys.set(new Set),!t){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.missingApiKey);return}this.manifestLoading.set(!0);let n=this.resolveProductId()?.trim();if(!n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.missingProductId),this.manifestLoading.set(!1);return}this.manifestError.set(null);try{let r=await vc(this.submissionApi.getSubmissionByNumber(e,t)),o=this.resolveEditableSubmissionData(r?.data);if(!r?.isSuccess||!o){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let l=r?.errors?.[0]??r?.message??Ot.submissionNotFound;this.manifestError.set(l),this.manifestLoading.set(!1),this.toaster.showError(l);return}let s=o.productId?.trim();if(!s||s!==n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.submissionProductMismatch),this.manifestLoading.set(!1),this.toaster.showError(Ot.submissionProductMismatch);return}if(!this.isValidEditablePayload(o.designPayload)){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.submissionInvalidPayload),this.toaster.showError(Ot.submissionInvalidPayload),this.manifestLoading.set(!1);return}let a=o.preDesignId?.trim()||null;this.selectedPredesignId.set(a),this.pendingSubmissionPayload=o.designPayload,await this.loadManifest(a)}catch{this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestLoading.set(!1),this.manifestError.set(Ot.submissionLoadFailed),this.toaster.showError(Ot.submissionLoadFailed)}}resolveEditableSubmissionData(e){if(!e)return null;if(Array.isArray(e)){let t=e[0];return t&&typeof t=="object"?t:null}return typeof e!="object"?null:e}isValidEditablePayload(e){if(!e||typeof e!="object")return!1;let t=e.svg?.content,n=e.svg?.contentUrl,r=typeof t=="string"&&t.trim().length>0,o=typeof n=="string"&&n.trim().length>0;return r||o}async loadManifest(e){let t=Symbol();this.manifestRequestToken=t;let n=!!e&&this.manifestLoaded;this.manifestLoading.set(!0),this.predesignSwitchLoading.set(n),this.manifestError.set(null),n||(this.manifestLoaded=!1),this.filesLoaded=!1;try{let r=await this.manifestFlowService.loadManifest(he(k({},this.getManifestIdentityInput()),{preDesignId:e??null,selectedPredesignId:this.selectedPredesignId(),activeStepId:this.activeStepId()}));if(this.manifestRequestToken!==t)return;if(!r.ok){this.pendingPredesignCarryover=null,this.manifestError.set(r.message),this.notifyManifestLoadFailed(r.message);return}this.applyManifestData(r.normalized)}catch{if(this.manifestRequestToken!==t)return;this.pendingPredesignCarryover=null,this.manifestError.set(Ot.manifestLoadFailed),this.notifyManifestLoadFailed(Ot.manifestLoadFailed)}finally{this.manifestRequestToken===t&&(this.manifestLoading.set(!1),this.predesignSwitchLoading.set(!1))}}retryManifestLoad(){this.loadManifest()}toggleMobilePanel(){this.mobilePanelVisible.update(e=>!e)}async onPredesignSelected(e){let t=e?.id??null;t&&(this.manifestLoading()||t===this.selectedPredesignId()||(this.pendingPredesignCarryover=this.capturePredesignCarryover(t),this.preserveHistoryOnNextSvgLoad=!1,this.selectedPredesignId.set(t),await this.loadManifest(t)))}async onThreeDVariantSelected(e){let t=e?.trim()??"";if(!t||t===this.selectedThreeDVariantId()||this.isModelLoading())return;let n=this.threeDVariants().find(r=>r.id===t);if(!(!n||!n.threeDFileLink)){this.selectedThreeDVariantId.set(n.id),this.threeDFileLink.set(n.threeDFileLink??""),this.materialFileLink.set(n.mtlFileLink??null);try{this.isModelLoading.set(!0),await this.loadThreeDModelFiles(),this.isModelLoading.set(!1),this.threeDUI()?.rebuildSVGTexture()}catch(r){this.isModelLoading.set(!1),console.error(Ot.errorLoadingFilesFromUrls,r),this.toaster.showError(Ot.manifestAssetsLoadFailed)}}}tryLoadFilesFromManifest(e=!1){!this.viewInitialized||!this.manifestLoaded||this.filesLoaded||(this.filesLoaded=!0,this.loadFilesFromUrls(e))}ngAfterViewInit(){this.initFabricCanvases(),this.viewInitialized=!0,this.tryLoadFilesFromManifest()}registerKeyboardShortcuts(){if(!this.isBrowser)return;let e=t=>{let n=t.composedPath?.()[0]||t.target;if(n&&this.keyboardShortcutService.isTextInputTarget(n))return;let r=this.keyboardShortcutService.resolveHistoryAction(t);if(r==="UNDO"){this.onUndo(),t.preventDefault();return}if(r==="REDO"){this.onRedo(),t.preventDefault();return}this.tryHandleOverlayKeyboardShortcut(t)&&t.preventDefault()};window.addEventListener("keydown",e,{passive:!1}),this.destroyRef.onDestroy(()=>window.removeEventListener("keydown",e))}tryHandleOverlayKeyboardShortcut(e){let t=this.keyboardShortcutService.resolveOverlayAction(e,this.rotationStep());return t?t.kind==="MOVE"?this.nudgeActiveOverlayByPixels(t.deltaXPx,t.deltaYPx):this.rotateActiveOverlayByStep(t.deltaAngle):!1}nudgeActiveOverlayByPixels(e,t){let n=this.resolveKeyboardTargetOverlay();if(!n)return!1;let r=this.getOverlayBoundingRect();if(r.width<=0||r.height<=0)return!1;let o=n.normalizedX+e/r.width,s=n.normalizedY+t/r.height;return this.setOverlayNormalizedPosition(n,o,s),!0}rotateActiveOverlayByStep(e){let t=this.resolveKeyboardTargetOverlay();return t?(this.onOverlayRotationChange({overlay:t,angle:(t.angle??0)+e}),!0):!1}resolveKeyboardTargetOverlay(){let e=this.findOverlayById(this.activeOverlayId());if(e)return e;if(this.editorMode()==="2d")return null;let t=this.overlays(),n=t.length>0?t[t.length-1]:null;return n?(this.setActiveOverlay(n),n):null}async loadFilesFromUrls(e=!1){this.preserveHistoryOnNextSvgLoad=!1;try{if(this.loading.set(!0),this.svgFileLink()){let n=await this.fileService.fetchFileAsText(this.svgFileLink());if(this.svgText.set(n),this.loadSVGFromText(n,!0),await this.applyPredesignCarryoverIfNeeded(),this.pendingSubmissionPayload)try{await this.applyEditableSubmissionPayload(this.pendingSubmissionPayload),this.pendingSubmissionPayload=null}catch(r){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let o=r instanceof Error&&r.message===Ot.submissionInvalidPayload?Ot.submissionInvalidPayload:Ot.submissionLoadFailed;this.manifestError.set(o),this.toaster.showError(o);return}}if(await this.loadThreeDModelFiles(),this.loading.set(!1),this.sdkRuntimeConfig&&!this.sdkReadyNotified){this.sdkReadyNotified=!0;let n=this.resolveProductId();n&&this.sdkRuntimeConfig.onReady?.({productId:n})}e&&setTimeout(()=>{this.threeDUI()?.rebuildSVGTexture()},0)}catch(n){if(console.error(Ot.errorLoadingFilesFromUrls,n),this.sdkRuntimeConfig){this.manifestError.set(Ot.manifestAssetsLoadFailed);let r=this.resolveProductId();r&&this.sdkRuntimeConfig.onAssetLoadFailed?.({productId:r,code:"ASSET_LOAD_FAILED",message:Ot.manifestAssetsLoadDetail})}this.loading.set(!1)}}async loadThreeDModelFiles(){this.objText.set(null),this.mtlText.set(null),this.threeDFileLink()&&this.objText.set(await this.fileService.fetchFileAsText(this.threeDFileLink())),this.materialFileLink()&&this.mtlText.set(await this.fileService.fetchFileAsText(this.materialFileLink()))}async applyEditableSubmissionPayload(e){let t=Symbol();this.editableSubmissionCompressionToken=t,this.suspendTextureRebuild=!0,this.pendingTextureRebuildWhileSuspended=!1,this.predesignBaseSvgText.set(this.baseSvgText());let n=e.svg?.content?.trim()??"";if(!n){let r=e.svg?.contentUrl?.trim();if(!r)throw new Error(Ot.submissionInvalidPayload);n=(await this.fileService.fetchFileAsText(r)).trim()}if(!n)throw new Error(Ot.submissionInvalidPayload);try{this.loadSVGFromText(n,!1);let r=this.parseTextOverlays(e.overlays?.text??[]),o=this.parseLogoOverlays(e.overlays?.logo??[]),s=this.ensureUniqueOverlayIds([...r,...o]);this.overlays.set(s),this.hydrateEditableOverlayRuntimeDimensions(e,s),this.activeOverlayId.set(s[0]?.id??null);let a=(e.overlays?.text??[]).filter(c=>!!c?.id).map(c=>({overlayId:c.id,effectId:c.effectId??null}));if(this.personalizationState.setSelectedEffectByOverlay(a),this.appliedEditableTextEffectKeys.set(new Set),this.pendingEditableTextEffects.set(this.buildPendingEditableTextEffects(e.overlays?.text??[],s)),await this.replayPendingEditableTextEffects(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),e.background?.selectedKey&&this.backgroundState.select(e.background.selectedKey),await this.prepareEditableSubmissionAssetsFor3d(s,t),this.editableSubmissionCompressionToken!==t)return;e.pattern?.selectedUploadedPatternId&&this.patternState.setSelectedUploadedPattern(e.pattern.selectedUploadedPatternId),this.patternState.setSelectedPatternFileUrl(e.pattern?.selectedFileUrl??null);let l=(e.renderOrder??[]).filter(c=>typeof c=="string"&&c.trim().length>0);if(l.length){this.renderOrderState.enableManualOrdering(),this.renderOrderState.setStack(l);let c=this.svgDoc()?.documentElement;c&&this.renderOrderState.applyStackToSvg(c,this.renderPathAccordingLayers())}await this.syncOverlaysToSvgDoc(),this.requestTextureRebuild(),this.render2dView(),this.resetHistoryWithCurrentState("Edited submission initial state")}finally{if(this.editableSubmissionCompressionToken!==t)return;this.editableSubmissionCompressionToken=null,this.suspendTextureRebuild=!1,this.pendingTextureRebuildWhileSuspended&&(this.pendingTextureRebuildWhileSuspended=!1,this.requestTextureRebuild())}}async prepareEditableSubmissionAssetsFor3d(e,t){await Promise.all([this.compressEditableSubmissionLogoOverlaysFor3d(e,t),this.backgroundState.ensureCompressedSourcesFor3d()]),this.editableSubmissionCompressionToken===t&&this.overlays.set([...e])}async compressEditableSubmissionLogoOverlaysFor3d(e,t){let n=e.filter(ai);n.length&&await Promise.all(n.map(async r=>{let o=r.imageSrc?.trim();if(!(!o||r.imageSrc3d))try{let s=await this.imageCompressionService.compressImageToDataUrl(o);if(this.editableSubmissionCompressionToken!==t)return;r.imageSrc3d=s}catch(s){console.warn("[CustomizerUiComponent] Failed to compress editable submission logo, using original",s)}}))}parseTextOverlays(e){return e.filter(t=>!!t?.id).map(t=>({id:t.id,kind:"text",text:t.text??"",fill:t.style?.fill??"#1f2937",fontSize:Number.isFinite(t.style?.fontSize)?t.style?.fontSize:24,horizontalScale:this.normalizeOverlayScale(t.style?.horizontalScale,1),verticalScale:this.normalizeOverlayScale(t.style?.verticalScale,1),fontFamily:t.style?.fontFamily??this.defaultFontFamily(),fontWeight:t.style?.fontWeight??this.defaultFontWeight(),fontStyle:t.style?.fontStyle??this.defaultFontStyle(),letterSpacing:Number.isFinite(t.style?.letterSpacing)?t.style?.letterSpacing:this.defaultLetterSpacing(),lineHeight:Number.isFinite(t.style?.lineHeight)?t.style?.lineHeight:this.defaultLineHeight(),stroke:t.style?.stroke??jl,strokeWidth:Number.isFinite(t.style?.strokeWidth)?t.style?.strokeWidth:0,secondStroke:t.style?.secondStroke??Wl,secondStrokeWidth:Number.isFinite(t.style?.secondStrokeWidth)?t.style?.secondStrokeWidth:0,curveAmount:Number.isFinite(t.style?.curveAmount)?t.style?.curveAmount:this.defaultCurveAmount(),shadowBlur:Number.isFinite(t.style?.shadowBlur)?t.style?.shadowBlur:this.defaultShadowBlur(),shadowOffsetX:Number.isFinite(t.style?.shadowOffsetX)?t.style?.shadowOffsetX:this.defaultShadowOffsetX(),shadowOffsetY:Number.isFinite(t.style?.shadowOffsetY)?t.style?.shadowOffsetY:this.defaultShadowOffsetY(),shadowColor:t.style?.shadowColor??nh,warpEnabled:t.effects?.warp===!0,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,placementKey:t.placementKey??null,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0}))}parseLogoOverlays(e){return e.filter(t=>!!t?.id&&!!t?.imageSrc).map(t=>({id:t.id,kind:"logo",logoBlobId:t.logoBlobId??null,imageSrc:t.imageSrc,imageName:t.imageName??void 0,placementKey:t.placementKey??null,opacity:Number.isFinite(t.opacity)?t.opacity:1,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0,originalWidth:Number.isFinite(t.dimensions?.originalWidth)?t.dimensions?.originalWidth:0,originalHeight:Number.isFinite(t.dimensions?.originalHeight)?t.dimensions?.originalHeight:0,normalizedWidth:this.normalizeOverlayCoordinate(t.dimensions?.normalizedWidth,.2),normalizedHeight:this.normalizeOverlayCoordinate(t.dimensions?.normalizedHeight,.2),processedImageSrc:t.processedImageSrc??null}))}hydrateOverlaysFromSvgBase(){let e=this.svgDoc();if(!e){this.overlays.set([]),this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null);return}let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0){this.overlays.set([]),this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null);return}let n=[],r=Array.from(e.querySelectorAll('[data-overlay="true"]'));for(let a of r){if(a.tagName.toLowerCase()==="image"){let d=this.tryExtractLogoOverlayFromSvgNode(a,t);d&&n.push(d);continue}let c=this.tryExtractTextOverlayFromSvgNode(a,t);c&&n.push(c)}let o=this.ensureUniqueOverlayIds(n);this.overlays.set(o);let s=o[0]??null;this.activeOverlayId.set(s?.id??null),this.customizerState.setActiveOverlay(s)}tryExtractTextOverlayFromSvgNode(e,t){if(!(e.tagName.toLowerCase()==="g"&&(e.getAttribute(me.DATA_OVERLAY_KIND)?.trim()?.toLowerCase()==="text"||!!e.querySelector("path"))))return null;let o=this.parseSvgTransform(e.getAttribute("transform")),s=o.translateX,a=o.translateY;if(!Number.isFinite(s)||!Number.isFinite(a))return null;let l=this.normalizeOverlayCoordinate((s-t.x)/t.width,.5),c=this.normalizeOverlayCoordinate((a-t.y)/t.height,.5),d=this.readOverlayPlacementKey(e),u=this.resolveExtractedOverlayPlacementKey({explicitPlacementKey:d,kind:"text",normalizedX:l,normalizedY:c});if(!u)return null;let f=e.getAttribute(me.DATA_OVERLAY_TEXT)?.trim()??e.getAttribute("aria-label")?.trim()??"";if(!f)return null;let h=e.querySelector("path"),p=e.getAttribute(me.DATA_OVERLAY_FILL)?.trim()??h?.getAttribute("fill")?.trim()??"#1f2937",v={id:e.getAttribute("id")?.trim()||`text-${Date.now()}`,kind:"text",placementKey:u,text:f,fill:p,fontSize:this.readFiniteAttr(e,me.DATA_OVERLAY_FONT_SIZE,24),horizontalScale:this.normalizeOverlayScale(this.readFiniteAttr(e,me.DATA_OVERLAY_SCALE_X,o.scaleX),o.scaleX),verticalScale:this.normalizeOverlayScale(this.readFiniteAttr(e,me.DATA_OVERLAY_SCALE_Y,o.scaleY),o.scaleY),fontFamily:e.getAttribute(me.DATA_OVERLAY_FONT_FAMILY)?.trim()||this.defaultFontFamily()||void 0,fontWeight:e.getAttribute(me.DATA_OVERLAY_FONT_WEIGHT)?.trim()==="bold"?"bold":this.defaultFontWeight(),fontStyle:e.getAttribute(me.DATA_OVERLAY_FONT_STYLE)?.trim()==="italic"?"italic":this.defaultFontStyle(),lineHeight:this.readFiniteAttr(e,me.DATA_OVERLAY_LINE_HEIGHT,this.defaultLineHeight()),letterSpacing:this.readFiniteAttr(e,me.DATA_OVERLAY_LETTER_SPACING,this.defaultLetterSpacing()),stroke:e.getAttribute(me.DATA_OVERLAY_STROKE)?.trim()||jl,strokeWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_STROKE_WIDTH,0),secondStroke:e.getAttribute(me.DATA_OVERLAY_SECOND_STROKE)?.trim()||Wl,secondStrokeWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_SECOND_STROKE_WIDTH,0),curveAmount:this.readFiniteAttr(e,me.DATA_OVERLAY_CURVE_AMOUNT,this.defaultCurveAmount()),shadowBlur:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_BLUR,this.defaultShadowBlur()),shadowOffsetX:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_OFFSET_X,this.defaultShadowOffsetX()),shadowOffsetY:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_OFFSET_Y,this.defaultShadowOffsetY()),shadowColor:e.getAttribute(me.DATA_OVERLAY_SHADOW_COLOR)?.trim()||this.defaultShadowColor(),warpEnabled:e.getAttribute(me.DATA_OVERLAY_WARP_ENABLED)==="true",lockAspectRatio:e.getAttribute(me.DATA_OVERLAY_LOCK_RATIO)!=="false",normalizedX:l,normalizedY:c,angle:this.normalizeAngle(o.rotate)};return v=this.applyPlacementZoneTextBounds(v),v}tryExtractLogoOverlayFromSvgNode(e,t){let n=this.readFiniteAttr(e,"width",0),r=this.readFiniteAttr(e,"height",0);if(n<=0||r<=0)return null;let o=this.parseSvgTransform(e.getAttribute("transform")),s=this.readFiniteAttr(e,"x",0),a=this.readFiniteAttr(e,"y",0),l=Number.isFinite(o.translateX)?o.translateX:0,c=Number.isFinite(o.translateY)?o.translateY:0,d=s+n/2+l,u=a+r/2+c,f=this.normalizeOverlayCoordinate((d-t.x)/t.width,.5),h=this.normalizeOverlayCoordinate((u-t.y)/t.height,.5),p=this.readOverlayPlacementKey(e),v=this.resolveExtractedOverlayPlacementKey({explicitPlacementKey:p,kind:"logo",normalizedX:f,normalizedY:h});if(!v)return null;let g=e.getAttribute("href")?.trim()??e.getAttributeNS($d,"href")?.trim()??"";if(!g)return null;let m={id:e.getAttribute("id")?.trim()||`logo-${Date.now()}`,kind:"logo",placementKey:v,imageSrc:g,imageName:e.getAttribute(me.DATA_SOURCE_NAME)?.trim()||void 0,originalWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_original_WIDTH,n),originalHeight:this.readFiniteAttr(e,me.DATA_OVERLAY_original_HEIGHT,r),normalizedWidth:this.normalizeOverlayCoordinate(n/t.width,.2),normalizedHeight:this.normalizeOverlayCoordinate(r/t.height,.2),lockAspectRatio:e.getAttribute(me.DATA_OVERLAY_LOCK_RATIO)!=="false",normalizedX:f,normalizedY:h,angle:this.normalizeAngle(o.rotate),opacity:this.readFiniteAttr(e,"opacity",1)};return m=this.applyPlacementZoneLogoBounds(m),m}readFiniteAttr(e,t,n){let r=e.getAttribute(t);if(!r)return n;let o=Number.parseFloat(r);return Number.isFinite(o)?o:n}parseSvgTransform(e){let t=e?.trim()??"";if(!t)return{translateX:Number.NaN,translateY:Number.NaN,scaleX:1,scaleY:1,rotate:0};let n=t.match(/translate\(([-+]?\d*\.?\d+)(?:[\s,]+)([-+]?\d*\.?\d+)\)/i),r=t.match(/scale\(([-+]?\d*\.?\d+)(?:[\s,]+([-+]?\d*\.?\d+))?\)/i),o=t.match(/rotate\(([-+]?\d*\.?\d+)/i),s=t.match(/matrix\(\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*\)/i),a=s?Number.parseFloat(s[5]):Number.NaN,l=s?Number.parseFloat(s[6]):Number.NaN,c=n?Number.parseFloat(n[1]):a,d=n?Number.parseFloat(n[2]):l,u=r?Number.parseFloat(r[1]):1,f=r?Number.parseFloat(r[2]??r[1]):1,h=o?Number.parseFloat(o[1]):0;return{translateX:c,translateY:d,scaleX:Number.isFinite(u)?u:1,scaleY:Number.isFinite(f)?f:1,rotate:Number.isFinite(h)?h:0}}readOverlayPlacementKey(e){let t=e.getAttribute(me.DATA_PLACEMENT_KEY)?.trim()??e.getAttribute(me.PLACEMENT_KEY)?.trim()??e.getAttribute(me.DATA_PLACEMENT)?.trim()??e.getAttribute(me.PLACEMENTKEY)?.trim()??null;return t&&t.length>0?t:null}resolveExtractedOverlayPlacementKey(e){let{explicitPlacementKey:t,kind:n,normalizedX:r,normalizedY:o}=e,s=n==="text"?new Set(["TEXT"]):new Set(["LOGO","OVERLAY"]),a=h=>h.trim().replace(/^[#@]+/,"").toLowerCase(),l=new Set((this.personalizationItems()??[]).filter(h=>h?.placementKey&&s.has((h.type??"").trim().toUpperCase())).map(h=>h.placementKey)),c=new Map;if(Array.from(l).forEach(h=>{c.set(a(h),h)}),t){if(l.has(t))return t;let h=a(t),p=c.get(h);if(p)return p}let d=l.size>0?Array.from(l):this.personalizationState.placementZones().map(h=>h.placementKey),u=null,f=Number.POSITIVE_INFINITY;for(let h of d){let p=this.personalizationState.getPlacementZoneNormalizedBoundsByKey(h);if(!p)continue;if(r>=p.minX&&r<=p.maxX&&o>=p.minY&&o<=p.maxY)return h;let v=Qt.clamp(r,p.minX,p.maxX),g=Qt.clamp(o,p.minY,p.maxY),m=Math.hypot(r-v,o-g);m<f&&(f=m,u=h)}return u||(l.size===1?Array.from(l)[0]:t||null)}hydrateEditableOverlayRuntimeDimensions(e,t){let n=new Map,r=new Map(t.filter(Dt).map(s=>[s.id,s]));(e.overlays?.text??[]).forEach(s=>{if(!s?.id)return;let a=r.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})});let o=new Map(t.filter(ai).map(s=>[s.id,s]));(e.overlays?.logo??[]).forEach(s=>{if(!s?.id)return;let a=o.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})}),this.customizerState.overlayRuntimeDimensionsPx.set(n)}normalizeOverlayCoordinate(e,t){return Number.isFinite(e)?Qt.clamp(e,0,1):t}normalizeOverlayScale(e,t){return Number.isFinite(e)?Qt.clamp(e,.1,8):t}buildPendingEditableTextEffects(e,t){let n=new Map(t.filter(Dt).map(o=>[o.id,o])),r=[];for(let o of e){let s=o?.effectId?.trim();if(!o?.id||!s)continue;let a=n.get(o.id);a&&r.push({overlayId:a.id,placementKey:a.placementKey??o.placementKey??null,effectId:s})}return r}async replayPendingEditableTextEffects(){if(this.replayPendingEffectsInFlight)return;let e=this.pendingEditableTextEffects();if(!(!e.length||!this.hasAnyEffectDataSources())){this.replayPendingEffectsInFlight=!0;try{let t=new Map(this.overlays().map(o=>[o.id,o])),n=new Set(this.appliedEditableTextEffectKeys()),r=[];for(let o of e){let s=`${o.overlayId}::${o.effectId}`;if(n.has(s))continue;let a=t.get(o.overlayId);if(!a||!Dt(a))continue;let l=this.findEffectDataSource(o.effectId,o.placementKey);if(!l){r.push(o);continue}await this.personalizationState.applyTextEffect(a,l),n.add(s)}this.appliedEditableTextEffectKeys.set(n),this.pendingEditableTextEffects.set(r)}finally{this.replayPendingEffectsInFlight=!1}}}hasAnyEffectDataSources(){return(this.personalizationItems()??[]).some(e=>(e.packs??[]).some(t=>(t.type??"").toLowerCase().includes("effect")&&(t.dataSources?.length??0)>0))}findEffectDataSource(e,t){let n=e.trim();if(!n)return null;let r=(this.personalizationItems()??[]).filter(o=>!t||o.placementKey===t).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n);return r||((this.personalizationItems()??[]).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n)??null)}ensureUniqueOverlayIds(e){let t=new Map;return e.map(n=>{let r=t.get(n.id)??0;return t.set(n.id,r+1),r===0?n:he(k({},n),{id:`${n.id}-${r}`})})}capturePredesignCarryover(e){return this.predesignCarryoverService.captureSnapshot({targetPredesignId:e,manifestLoaded:this.manifestLoaded,svgDoc:this.svgDoc(),customizations:this.customizations(),overlays:this.overlays(),backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}async applyPredesignCarryoverIfNeeded(){let e=this.pendingPredesignCarryover;if(!e)return;let t=this.selectedPredesignId();this.pendingPredesignCarryover=null,await this.predesignCarryoverService.applyIfNeeded({snapshot:e,selectedPredesignId:t,customizations:this.customizations(),personalizationItems:this.personalizationItems(),backgroundTemplates:this.backgroundImageTemplates(),overlaysState:this.overlays,activeOverlayIdState:this.activeOverlayId,backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}applyManifestData(e){this.predesignBaseSvgText.set(null),e.distributorBranding?(this.themeService.applyDistributorBranding(e.distributorBranding,{lock:!0}),this.distributorHeaderLogoUrl.set(e.distributorBranding.logoUrl??null)):(this.themeService.clearDistributorBranding(),this.distributorHeaderLogoUrl.set(null)),this.editorMode.set((e.isShowWholeLayersOption||e.pathIdAccordingLayers.length>0)&&!this.isMobile()?"both":"3d"),e.resolvedPredesignId&&this.selectedPredesignId.set(e.resolvedPredesignId);let t=e.threeDVariants.find(r=>r.id===this.selectedThreeDVariantId())??e.threeDVariants.find(r=>r.id===e.selectedThreeDVariantId)??e.threeDVariants.find(r=>r.isDefault)??e.threeDVariants[0]??null;this.threeDVariants.set(e.threeDVariants),this.selectedThreeDVariantId.set(t?.id??e.selectedThreeDVariantId),this.threeDFileLink.set(t?.threeDFileLink??e.threeDFileLink??""),this.materialFileLink.set(t?.mtlFileLink??e.materialFileLink),this.svgFileLink.set(e.svgFileLink),e.svgViewBox&&this.svgViewBox.set(e.svgViewBox),this.customizations.set(e.customizations),this.predesigns.set(e.predesigns),this.steps.set(e.steps),this.pathIdAccordingLayers.set(e.pathIdAccordingLayers),this.renderPathAccordingLayers.set(e.renderPathAccordingLayers),this.isShowWholeLayersOption.set(e.isShowWholeLayersOption),this.customizerState.setPrintAreaInches(e.printAreaWidthInches,e.printAreaHeightInches),this.personalizationState.setPlacements(e.placements),this.backgroundState.setTemplates(e.placements),this.personalizationItems.set(e.placements),e.nextActiveStepId&&!this.activeStepId()&&this.activeStepId.set(e.nextActiveStepId),this.sdkReadyNotified=!1,this.manifestLoaded=!0;let n=this.resolveProductId();this.sdkRuntimeConfig&&n&&this.sdkRuntimeConfig.onManifestLoaded?.({productId:n,manifestMeta:e.manifestMeta}),this.tryLoadFilesFromManifest(!0)}getManifestIdentityInput(){return{runtimeConfig:this.sdkRuntimeConfig,inputProductId:this.productId(),inputApiKey:this.apiKey(),fallbackProductId:this.fallbackProductId}}resolveProductId(){return this.manifestFlowService.resolveProductId(this.getManifestIdentityInput())}resolveApiKey(){return this.manifestFlowService.resolveApiKey(this.getManifestIdentityInput())}getManifestConfigSignature(){return this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput())}notifyManifestLoadFailed(e){if(!this.sdkRuntimeConfig)return;let t=this.resolveProductId();t&&this.sdkRuntimeConfig.onManifestLoadFailed?.({productId:t,code:"MANIFEST_LOAD_FAILED",message:e})}loadSVGFromText(e,t=!0){this.baseSvgText.set(e),this.svgText.set(e),this.measurementCloneDirty.set(!0),this.overlays.set([]),this.customizerState.clearAllTextGlyphPlans(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.fabricLayoutState.set(null),this.svgDimensions.set(null),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3}),this.activeOverlayId.set(null);let n=this.isShowWholeLayersOption()?null:this.pathIdAccordingLayers()[0]?.name??null;this.selectedLayerKey.set(n),this.patternState.reset(),this.patternOverlayState.reset(),this.renderOrderState.reset(),this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.personalizationState.reset(),this.backgroundState.reset(),this.resetFabricViewTransform(),this.parseSVGRegions(this.svgText()),this.personalizationState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),this.hydrateOverlaysFromSvgBase(),this.syncOverlaysToSvgDoc().catch(r=>{console.error(Ot.overlaySyncFailed,r)}).finally(()=>{this.render2dView(),this.requestTextureRebuild()}),t&&!this.designHistory.isRestoring()&&this.resetHistoryWithCurrentState("Initial state")}resetHistoryWithCurrentState(e){let t=this.buildHistorySnapshot(e);this.designHistory.seed(t),this.historyInitialized=!0}scheduleHistoryCapture(e){!this.historyInitialized||this.designHistory.isRestoring()||this.historyCaptureSuspended||(this.historyDebounceHandle&&clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=setTimeout(()=>{this.designHistory.record(this.buildHistorySnapshot(e)),this.historyDebounceHandle=null},120))}setHistoryCaptureSuspended(e){this.historyCaptureSuspended=e,e&&this.historyDebounceHandle&&(clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=null)}buildHistorySnapshot(e,t){let n=t===void 0?this.selectedPredesignId():t;return{svgText:this.svgText(),overlays:JSON.parse(JSON.stringify(this.overlays()??[])),activeOverlayId:this.activeOverlayId(),selectedLayerKey:this.selectedLayerKey(),showPlacementGuides:this.showPlacementGuides(),selectedPredesignId:n,label:e,timestamp:Date.now()}}async applySnapshot(e){this.designHistory.beginRestore();try{let t=this.selectedPredesignId(),n=e.selectedPredesignId??null;if(t!==n){this.selectedPredesignId.set(n),await this.loadManifest(n);return}e.svgText?this.loadSVGFromText(e.svgText,!1):(this.svgText.set(null),this.render2dView()),this.overlays.set(JSON.parse(JSON.stringify(e.overlays??[]))),this.activeOverlayId.set(e.activeOverlayId??null),this.selectedLayerKey.set(e.selectedLayerKey??null),this.showPlacementGuides.set(!!e.showPlacementGuides),this.syncOverlaysToSvgDoc().finally(()=>{this.requestTextureRebuild(),this.render2dView()})}finally{this.designHistory.endRestore(),this.historyInitialized=!0}}onUndo(){let e=this.designHistory.undo(this.buildHistorySnapshot("undo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onRedo(){let e=this.designHistory.redo(this.buildHistorySnapshot("redo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onTwoDCanvasReady(e){this.twoDCanvasElement!==e&&(this.twoDCanvasElement=e,this.initFabricCanvases())}onTwoDCanvasDestroyed(){this.twoDCanvasElement=null,this.disposeFabricCanvases()}render2dView(){this.render2dViewAsync(),this.updatePlacementGuideVisibility()}async render2dViewAsync(){if(!this.fabricReady()||!this.fabricCanvas)return;try{await this.overlaySyncPromise()}catch{return}if(!this.svgDoc()){this.fabricCanvas.clear(),this.fabricCanvas.renderAll(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.twoDSnapRuntime.set(zi());return}let e=this.getActiveLayerPathIds(),t=this.renderOrderState.resolveFabricVisibleOverlayIds(this.overlays()),n=this.overlays().map(s=>s.id).filter(s=>!t.has(s));this.fabricVisibleOverlayIds.set(t);let r=this.svgRenderService.buildSvgForView(this.svgDoc(),this.pathIdAccordingLayers(),e.length>0?e:void 0,{preserveOverlayIds:n}),o=e.length>0?this.getLayerPreviewBounds(e):null;this.renderSvgOnCanvas(this.fabricCanvas,r,o),this.fabricGuideState.set({lines:[]}),this.twoDSnapRuntime.set(zi())}onLayerToggle(e){let t=this.selectedLayerKey(),n=this.isShowWholeLayersOption(),r=e===null||t===e?n?null:t:e;t!==r&&(this.selectedLayerKey.set(r),this.render2dView())}getActiveLayerPathIds(){let e=this.selectedLayerKey();if(!e)return[];let t=this.pathIdAccordingLayers().find(n=>n.name.toLowerCase()===e.toLowerCase());return t?t.actionPathIdsCsv.split(",").map(n=>n.replace("#","").trim()):[]}getAllLayerPathIds(){let e=new Set;for(let t of this.pathIdAccordingLayers())for(let n of t.actionPathIdsCsv.split(",")){let r=n.replace("#","").trim();r&&e.add(r)}return[...e]}renderSvgOnCanvas(e,t,n){let r=this.overlayFabricObjects().size>0,o=this.canvasTransform();if(!t){e.clear(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.canvasLoadToken.set(null),e.backgroundImage=void 0,e.renderAll();return}let s=Symbol();this.canvasLoadToken.set(s),this.svgDimensions()||this.computeSvgDimensions();let a=this.getOverlayBoundingRect(),l=this.normalizePreviewBounds(n??null,a);gU({canvas:e,svgMarkup:t,fabricViewZoom:this.fabricViewZoom(),svgViewBox:this.svgViewBox(),svgDimensions:this.svgDimensions(),targetBounds:l,baseBounds:a,loadToken:s}).then(c=>{if(!c||this.canvasLoadToken()!==c.token)return;let{image:d,transform:u,layout:f}=c;r&&o||(e.clear(),this.overlayFabricObjects.set(new Map)),e.backgroundImage=d,this.canvasTransform.set(u),this.fabricLayoutState.set(f),this.renderOverlaysOnCanvas(e),this.renderTwoDAlignmentLayers(e),e.requestRenderAll(),this.canvasLoadToken.set(null)}).catch(c=>{console.error(Ot.failedRenderSvgOnCanvas,c),this.canvasLoadToken.set(null)})}createOverlayTextObject(e,t,n){let r=this.getCachedTextGlyphPlan(e);if(!r)return this.ensureTextGlyphPlan(e),this.overlayFabricObjects().get(e.id);let o=this.getTextGlyphPlanSignature(e),s=this.getTextLayoutSignature(e),a=this.overlayFabricObjects().get(e.id);if(a){let _=a.textPlanSignature,w=a.layoutSignature;if(_===o&&w===s)return this.applyShadowToFabricGroup(a,e),a}a&&(t.getActiveObject()===a&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(a),this.overlayFabricObjects.update(_=>{let w=new Map(_);return w.delete(e.id),w}));let l=this.getOrBuildTextLayout(e,r);if(!l.length)return null;let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,g=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0,m=(_,w,D,A,P)=>{let E=new zs(_.d,{fill:e.fill,stroke:w,strokeWidth:D,strokeLineJoin:"round",strokeLineCap:"round",paintFirst:A,originX:"center",originY:"center",left:_.x,angle:_.angle,strokeUniform:!0});return E.outlineLayer=P,E},b=[];l.forEach(_=>{g>0&&b.push(m(_,e.fill,g,"stroke","faux-bold"));let w=h>0?p+(d>0?u:0):0;w>0&&b.push(m(_,f??void 0,w,"stroke","secondary-stroke"));let D=d>0?u:0;b.push(m(_,c??void 0,D,D>0?"stroke":"fill","primary-stroke"))});let y=new ts(b,{originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,centeredRotation:!0,lockScalingFlip:!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)});return y.set("lockUniScaling",e.lockAspectRatio??!0),y.set("skewX",e.fontStyle==="italic"?-12:0),y.set("skewY",0),y.dataOverlayId=e.id,y.textPlanSignature=o,y.layoutSignature=s,this.applyShadowToFabricGroup(y,e),y.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,y),this.constrainOverlayWithinView(e,y)}),y.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,y),this.constrainOverlayWithinView(e,y)}),y.on("modified",()=>{this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let _=this.resolveOverlayForFabricObject(y);_&&Dt(_)&&this.finalizeOverlayFromFabric(_,y)}),y.on("mousedown",()=>{let _=this.resolveOverlayForFabricObject(y);_&&this.setActiveOverlay(_)}),y.on("selected",()=>{let _=this.resolveOverlayForFabricObject(y);_&&this.setActiveOverlay(_)}),this.overlayFabricObjects.update(_=>{let w=new Map(_);return w.set(e.id,y),w}),t.add(y),this.activeOverlayId()===e.id&&t.setActiveObject(y),t.requestRenderAll(),y}ensureLogoFabricObject(e,t){let n=e.processedImageSrc??e.imageSrc,r=this.overlayFabricObjects().get(e.id);if(r){if(r.dataImageSrc!==n)t.getActiveObject()===r&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(r),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(e.id),l});else return this.syncFabricObjectWithOverlay(e,r),this.activeOverlayId()===e.id&&t.setActiveObject(r),r;this.pendingLogoLoads.update(a=>{let l=new Map(a);return l.delete(e.id),l}),t.getObjects().includes(r)&&t.requestRenderAll()}let o=Symbol();return this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.set(e.id,o),a}),jr.fromURL(n).then(s=>{this.pendingLogoLoads().get(e.id)===o&&(s.set({originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,lockScalingFlip:!0,lockUniScaling:e.lockAspectRatio??!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12}),s.dataOverlayId=e.id,s.dataImageSrc=n,s.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,s),this.constrainOverlayWithinView(e,s)}),s.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,s),this.constrainOverlayWithinView(e,s)}),s.on("modified",()=>{this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let a=this.resolveOverlayForFabricObject(s);a&&ai(a)&&this.finalizeOverlayFromFabric(a,s)}),s.on("mousedown",()=>{let a=this.resolveOverlayForFabricObject(s);a&&this.setActiveOverlay(a)}),s.on("selected",()=>{let a=this.resolveOverlayForFabricObject(s);a&&this.setActiveOverlay(a)}),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.set(e.id,s),l}),t.add(s),this.syncFabricObjectWithOverlay(e,s),this.constrainOverlayWithinView(e,s),this.applyFabricStackByOverlayOrder(t),this.activeOverlayId()===e.id&&t.setActiveObject(s),t.requestRenderAll())}).finally(()=>{this.pendingLogoLoads().get(e.id)===o&&this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.delete(e.id),a})}),null}renderOverlaysOnCanvas(e){let t=this.canvasTransform();if(!t){e.requestRenderAll();return}this.renderPlacementGuides(e);let n=new Set;this.overlays().forEach(o=>{if(this.fabricVisibleOverlayIds().has(o.id)&&this.overlayMatchesLayer(o,this.selectedLayerKey()))if(Dt(o)){if(o.text.trim().length===0)return;let s=this.overlayFabricObjects().get(o.id),a=this.getTextGlyphPlanSignature(o),l=this.getTextLayoutSignature(o),c=!s||s.textPlanSignature!==a||s.layoutSignature!==l,d=c?this.createOverlayTextObject(o,e,t):s;d&&(!c&&d instanceof ts&&(this.applyShadowToFabricGroup(d,o),d.layoutSignature=l,d.textPlanSignature=a),this.syncFabricObjectWithOverlay(o,d),this.activeOverlayId()===o.id&&e.setActiveObject(d),n.add(o.id))}else ai(o)&&this.ensureLogoFabricObject(o,e)&&n.add(o.id)}),Array.from(this.overlayFabricObjects().entries()).forEach(([o,s])=>{n.has(o)||(e.getActiveObject()===s&&this.discardActiveObjectWithoutSelectionClear(e),e.remove(s),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(o),l}))}),this.applyFabricStackByOverlayOrder(e);let r=this.activeOverlayId();if(r){let o=this.overlayFabricObjects().get(r);o&&e.setActiveObject(o)}e.requestRenderAll()}applyFabricStackByOverlayOrder(e){this.overlays().forEach(r=>{if(!this.fabricVisibleOverlayIds().has(r.id)||!this.overlayMatchesLayer(r,this.selectedLayerKey())||Dt(r)&&r.text.trim().length===0)return;let o=this.overlayFabricObjects().get(r.id);o&&e.bringObjectToFront(o)});let t=this.fabricGridState();t.horizontal.forEach(r=>e.bringObjectToFront(r)),t.vertical.forEach(r=>e.bringObjectToFront(r)),this.fabricGuideState().lines.forEach(r=>e.bringObjectToFront(r))}updatePlacementGuideVisibility(){let e=this.fabricCanvas,t=this.canvasTransform();!e||!t||(this.renderPlacementGuides(e),e.requestRenderAll(),this.threeDUI()?.currentObject()&&this.requestTextureRebuild())}renderPlacementGuides(e){let t=this.canvasTransform();if(!t){this.clearPlacementGuides(e);return}let n=this.placementZones().map(o=>({placementKey:o.placementKey,allowedKinds:o.allowedKinds,bounds:o.bounds})),r=vU(e,{show:this.showPlacementGuides()&&n.length>0,transform:t,zones:n,state:{objects:this.placementGuideObjects()}});this.placementGuideObjects.set(r.objects)}clearPlacementGuides(e){this.placementGuideObjects().size&&(uD(e,this.placementGuideObjects()),this.placementGuideObjects.set(new Map))}renderTwoDAlignmentLayers(e){let t=this.activeOverlay(),n=t?this.overlayFabricObjects().get(t.id):null,r=n?.left??null,o=n?.top??null,s=this.twoDCursorCanvasPoint()}clearTwoDSmartGuides(){this.fabricCanvas&&this.fabricGuideState.set(lD(this.fabricCanvas,this.fabricGuideState()))}applySmartAlignmentForFabricMove(e,t){let n=this.fabricCanvas;if(!n)return;let r=t.left??0,o=t.top??0;if(this.twoDCursorCanvasPoint.set({x:r,y:o}),!this.snapEnabled()){this.twoDSnapRuntime.set(zi()),this.clearTwoDSmartGuides();return}let s=Math.max((t.getScaledWidth()||0)/2,1),a=Math.max((t.getScaledHeight()||0)/2,1),l={id:e.id,cx:r,cy:o,halfW:s,halfH:a},c=this.overlays().filter(f=>f.id!==e.id).map(f=>this.overlayFabricObjects().get(f.id)).filter(f=>!!f).map(f=>({id:f?.dataOverlayId,cx:f.left??0,cy:f.top??0,halfW:Math.max((f.getScaledWidth()||0)/2,1),halfH:Math.max((f.getScaledHeight()||0)/2,1)})),d=this.getTwoDGridStepPx(),u=qx({x:r,y:o},l,c,{x:n.getWidth()/2,y:n.getHeight()/2},{snapEnabled:this.snapEnabled(),snapToGrid:this.gridEnabled(),gridStepX:d.x,gridStepY:d.y,tolerance:Kr.TWO_D_SNAP_TOLERANCE_PX},this.twoDSnapRuntime());this.twoDSnapRuntime.set(u.state),t.set({left:u.x,top:u.y}),t.setCoords(),this.fabricGuideState.set(cU(n,u.guides,this.fabricGuideState(),n.getWidth(),n.getHeight()))}resolveOverlayForFabricObject(e){let t=e?.dataOverlayId;return t?this.findOverlayById(t)??null:null}syncFabricObjectWithOverlay(e,t){let n=this.canvasTransform();if(!n)return;let r=this.getOverlayBoundingRect(),o=r.x+e.normalizedX*r.width,s=r.y+e.normalizedY*r.height,a=n.offsetX+o*n.scale,l=n.offsetY+s*n.scale;if(Dt(e)){let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,v=this.getShadowCanvasShift(e,n),g=a+v.x,m=l+v.y,b=t;b.getObjects().forEach(y=>{if(y instanceof zs){let _=y.outlineLayer,w,D=0,A="fill";if(_==="faux-bold"){let P=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0;w=e.fill,D=P,A=P>0?"stroke":"fill"}else _==="secondary-stroke"?(w=f??void 0,D=h>0?p+(d>0?u:0):0,A=D>0?"stroke":"fill"):(w=c??void 0,D=d>0?u:0,A=D>0?"stroke":"fill");y.set({fill:e.fill,stroke:w,strokeWidth:D,paintFirst:A,strokeUniform:!0}),y.dirty=!0}}),b.dirty=!0,b.set({originX:"center",originY:"center",angle:e.angle??0,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)}),b.set("lockUniScaling",e.lockAspectRatio??!0),b.setPositionByOrigin(new re(g,m),"center","center"),this.applyShadowToFabricGroup(b,e),b.setCoords(),this.publishOverlayRuntimeDimensions(e.id,b);return}if(ai(e)){let c=t,d=e.normalizedWidth*r.width,u=e.normalizedHeight*r.height,f=Math.max(c.width??d,1),h=Math.max(c.height??u,1),p=d*n.scale/f,v=u*n.scale/h;c.set({originX:"center",originY:"center",angle:e.angle??0,lockUniScaling:e.lockAspectRatio??!0,scaleX:p,scaleY:v,opacity:e.opacity??1}),c.setPositionByOrigin(new re(a,l),"center","center"),c.setCoords(),this.publishOverlayRuntimeDimensions(e.id,c)}}applyShadowToFabricGroup(e,t){let n=this.resolveShadowSettings(t);this.overlayStyleService.applyShadowToFabricGroup(e,n)}finalizeOverlayFromFabric(e,t){let n=this.canvasTransform(),r=this.getOverlayBoundingRect();if(!n||r.width<=0||r.height<=0)return;let o=t.left??n.offsetX,s=t.top??n.offsetY;if(Dt(e)){let f=this.getShadowCanvasShift(e,n);o-=f.x,s-=f.y}let a=(o-n.offsetX)/n.scale,l=(s-n.offsetY)/n.scale,c=(a-r.x)/r.width,d=(l-r.y)/r.height,u=this.clampNormalizedToPlacementZone(e,c,d);if(e.normalizedX=u.x,e.normalizedY=u.y,e.angle=this.normalizeAngle(t.angle??0),Dt(e)){let f=t,h=Math.abs(f.scaleX??n.scale),p=Math.abs(f.scaleY??h),v=n.scale||1,g=this.normalizeOverlayScale(h/v,1),m=this.normalizeOverlayScale(p/v,g);if(e.lockAspectRatio??!0){let b=this.normalizeOverlayScale((g+m)/2,1);g=b,m=b}if(e.horizontalScale=g,e.verticalScale=m,this.customizerState.clearTextGlyphPlan(e.id),e.placementKey){let b=this.applyPlacementZoneTextBounds(k({},e));Object.assign(e,b)}}else if(ai(e)){let f=t.getScaledWidth()||0,h=t.getScaledHeight()||0,p=f/n.scale,v=h/n.scale;if(e.lockAspectRatio??!0){let g=Math.max(e.normalizedWidth,.02)*r.width,m=Math.max(e.normalizedHeight,.02)*r.height,b=g>0?p/g:1,y=m>0?v/m:b,_=this.normalizeOverlayScale((b+y)/2,1);e.normalizedWidth=Math.min(Math.max(Math.max(e.normalizedWidth,.02)*_,.02),1),e.normalizedHeight=Math.min(Math.max(Math.max(e.normalizedHeight,.02)*_,.02),1)}else p>0&&(e.normalizedWidth=Math.min(Math.max(p/r.width,.02),1)),v>0&&(e.normalizedHeight=Math.min(Math.max(v/r.height,.02),1));if(typeof t.opacity=="number"&&(e.opacity=t.opacity),e.placementKey){let g=this.applyPlacementZoneLogoBounds(k({},e));Object.assign(e,g)}}this.commitOverlayUpdate(),this.customizerState.clearOverlayRuntimeDimensions(e.id),this.syncFabricObjectWithOverlay(e,t),t.canvas?.requestRenderAll()}publishOverlayRuntimeDimensions(e,t){let n=this.canvasTransform();if(!n||n.scale<=0)return;let r=Math.max((t.getScaledWidth()||0)/n.scale,1),o=Math.max((t.getScaledHeight()||0)/n.scale,1);this.customizerState.setOverlayRuntimeDimensionsPx(e,r,o)}constrainOverlayWithinView(e,t){let n=this.canvasTransform();if(!n)return;let o=(e.placementKey?this.personalizationState.getPlacementZoneBoundsByKey(e.placementKey):null)??this.getOverlayBoundingRect(),s=(t.getScaledWidth()||0)/2,a=(t.getScaledHeight()||0)/2,l=n.offsetX+o.x*n.scale+s,c=n.offsetX+(o.x+o.width)*n.scale-s,d=n.offsetY+o.y*n.scale+a,u=n.offsetY+(o.y+o.height)*n.scale-a,f=Math.min(Math.max(t.left??l,l),c),h=Math.min(Math.max(t.top??d,d),u);t.set({left:f,top:h}),t.setCoords()}getOverlayBoundingRect(){let e=this.getBaseBoundingBox();!this.svgDimensions()&&!e&&this.computeSvgDimensions();let t=this.svgDimensions(),n=this.svgViewBox(),r=t?{width:t.width,height:t.height,x:n.minX,y:n.minY}:null;return Wx(e,r)}getOverlayCenterPoint(e){let t=this.getOverlayBoundingRect();return{x:t.x+e.normalizedX*t.width,y:t.y+e.normalizedY*t.height}}overlayMatchesLayer(e,t){if(e.placementKey||!t)return!0;let n=this.resolveLayerDefinition(t);if(!n)return!0;let r=this.getOverlayCenterPoint(e),o=!1;for(let s of n.actionPathIdsCsv){let a=this.getLayerBoundsById(s);if(a&&(o=!0,this.pointInsideBounds(r,a)))return!0}return!o}resolveLayerDefinition(e){return this.layerBoundsService.resolveLayerDefinition(e,this.pathIdAccordingLayers())}getLayerBoundsById(e){let t=this.layerBoundsService.resolveLayerBoundsById({pathId:e,svgDoc:this.svgDoc(),svgText:this.svgText(),layerBoundsCache:this.layerBoundsCache(),measurementRoot:this.svgText()?this.ensureMeasurementSvgClone():null});return t.nextCache&&this.layerBoundsCache.set(t.nextCache),t.bounds}combineBoundsForPathIds(e){let t=e.map(n=>this.getLayerBoundsById(n));return this.layerBoundsService.combineBounds(t)}getLayerPreviewBounds(e){if(e.length===0)return null;let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return null;let n=this.combineBoundsForPathIds(e);return this.layerBoundsService.getLayerPreviewBounds(t,n)}normalizePreviewBounds(e,t){return this.layerBoundsService.normalizePreviewBounds(e,t)}pointInsideBounds(e,t){return this.layerBoundsService.pointInsideBounds(e,t)}readElementBounds(e){return this.layerBoundsService.readElementBounds(e)}ensureMeasurementSvgClone(){return this.customizerState.ensureMeasurementSvgClone(this.svgText)}refreshPlacementZonesFromSvg(){this.personalizationState.refreshFromSvg()}clampNormalizedToPlacementZone(e,t,n){return this.personalizationState.clampNormalizedToPlacementZone(e,t,n)}applyPlacementZoneTextBounds(e){return this.personalizationState.applyPlacementZoneTextBounds(e)}applyPlacementZoneLogoBounds(e){return this.personalizationState.applyPlacementZoneLogoBounds(e)}resolveOverlayLabel(e){return this.personalizationState.resolveOverlayLabel(e)}setActiveOverlay(e){if(!e){this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null),this.fabricCanvas&&this.fabricCanvas.getActiveObject()&&(this.fabricCanvas.discardActiveObject(),this.fabricCanvas.requestRenderAll()),this.threeDUI()?.rebuildSVGTexture();return}this.activeOverlayId.set(e.id),this.customizerState.setActiveOverlay(e),this.threeDUI()?.rebuildSVGTexture();let t=this.overlayFabricObjects().get(e.id);this.fabricCanvas&&t&&this.fabricCanvas.getActiveObject()!==t&&(this.fabricCanvas.setActiveObject(t),this.fabricCanvas.requestRenderAll())}findOverlayById(e){return e?this.overlays().find(t=>t.id===e)??null:null}async commitOverlayUpdate(){this.overlays.set([...this.overlays()]),await this.syncOverlaysToSvgDoc(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}onRenderOrderMoveTowardFront(e){let t=this.renderOrderState.moveInStack(e,-1);t&&this.applyRenderStackChange(t)}onRenderOrderMoveTowardBack(e){let t=this.renderOrderState.moveInStack(e,1);t&&this.applyRenderStackChange(t)}onRenderOrderReorder(e){let t=this.renderOrderState.reorderInStack(e);t&&this.applyRenderStackChange(t)}onRenderOrderSelect(e){let[t,n]=this.renderOrderState.parseRenderItemId(e);if(t!=="overlay")return;let r=this.findOverlayById(n);r&&this.setActiveOverlay(r)}async applyRenderStackChange(e){if(this.renderOrderState.enableManualOrdering(),!this.renderOrderState.setStack(e))return;let t=this.renderOrderState.syncOverlayOrderFromStack(this.overlays(),e);t!==this.overlays()&&this.overlays.set(t),await this.syncOverlaysToSvgDoc();let n=this.svgDoc();n&&this.customizerState.markSvgMutated(n),this.patternOverlayState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}synchronizeRenderOrderStack(){let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});this.renderOrderState.synchronizeStack(e,this.svgDoc(),this.renderPathAccordingLayers())}applyRenderOrderStackToSvg(e){return this.renderOrderState.applyStackToSvg(e,this.renderPathAccordingLayers())}buildPlacementNameByKeyMap(){return this.personalizationItems().reduce((e,t)=>(t?.placementKey&&e.set(t.placementKey,t.name??t.placementKey),e),new Map)}resolveFontFamily(e){let t=e.fontFamily,n=t&&t.trim().length>0?t:this.defaultFontFamily(),r=this.fontSourceMap()[n]?n:this.defaultFontFamily();return this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()),r}resolveFontWeight(e){return e.fontWeight??this.defaultFontWeight()}resolveFontStyle(e){return e.fontStyle??this.defaultFontStyle()}resolveLetterSpacing(e){let t=e.letterSpacing;return Number.isFinite(t)?t:this.defaultLetterSpacing()}resolveStrokeColor(e){if(!((e.strokeWidth??0)>0))return null;let n=e.stroke;return n&&n.trim().length>0?n:jl}resolveSecondStrokeColor(e){if(!((e.secondStrokeWidth??0)>0))return null;let n=e.secondStroke;return n&&n.trim().length>0?n:Wl}resolveCurveAmount(e){let t=e.curveAmount;return Number.isFinite(t)?t:this.defaultCurveAmount()}resolveCurveControlY(e){let t=this.resolveCurveAmount(e)/100,n=e.fontSize||this.minFontSize();return t*n}shadowDefaults(){return{blur:this.defaultShadowBlur(),offsetX:this.defaultShadowOffsetX(),offsetY:this.defaultShadowOffsetY(),color:this.defaultShadowColor()}}resolveShadowSettings(e){return this.overlayStyleService.resolveShadowSettings(e,this.shadowDefaults())}getShadowCanvasShift(e,t){let n=this.resolveShadowSettings(e);return this.overlayStyleService.getShadowCanvasShift(n,t?.scale??1)}getTextGlyphPlanSignature(e){return[e.text,this.resolveFontFamily(e),this.resolveFontWeight(e),this.resolveFontStyle(e),e.fontSize,this.resolveLetterSpacing(e)].join("|")}getTextLayoutSignature(e){let t=e.warpEnvelope??null,n=e.warpEnabled&&t?`warp:on:${t.viewBox.minX},${t.viewBox.minY},${t.viewBox.width},${t.viewBox.height}|${t.topPathD}|${t.bottomPathD}`:"warp:off",r=(e.secondStrokeWidth??0)>0?"1":"0";return`${this.getTextGlyphPlanSignature(e)}|curve:${this.resolveCurveAmount(e)}|${n}|ss:${r}`}async computeTextGlyphPlan(e){let t=await this.resolveOpentypeFont(e);return this.textLayoutService.computeTextGlyphPlan(e,{font:t,letterSpacing:this.resolveLetterSpacing(e)})}async getOrBuildTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);if(n)return n;let r=await this.computeTextGlyphPlan(e);return r&&this.customizerState.storeTextGlyphPlan(e.id,t,r),r}getCachedTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);return n||(this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e)),null)}ensureTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e);this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e))}getOrBuildTextLayout(e,t){let n=this.getTextLayoutSignature(e),r=this.customizerState.textLayoutCache().get(e.id);if(r&&r.signature===n)return r.layout.map(s=>k({},s));let o=this.textLayoutService.buildTextLayoutFromPlan(e,t,this.textLayoutCtx(e));return this.customizerState.textLayoutCache.update(s=>{var a=new Map(s);return a.set(e.id,{signature:n,layout:o}),a}),o.map(s=>k({},s))}textLayoutCtx(e){let t=e.warpEnvelope??null;return{shouldApplyWarp:!!(e.warpEnabled&&t),textWarpEnvelope:t,curveControlY:this.resolveCurveControlY(e)}}ingestFontPacks(e){let t=k({},fD),n=new Map;this.builtInFontOptions().forEach(({label:o,value:s},a)=>{n.set(s,{label:o,value:s,position:a})}),e.forEach(o=>{(o.packs??[]).filter(a=>(a.type??"").toLowerCase().includes("font")).forEach(a=>{(a.dataSources??[]).forEach(l=>{if(!l||l.isActive===!1)return;let c=(l.fontFamily??l.name??"").trim();if(!c)return;let d=this.resolveFontSource(l);d&&(t[c]=d,n.has(c)||n.set(c,{label:(l.name??c).trim()||c,value:c,position:l.position??n.size+1}))})})});let r=[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,value:s})=>({label:o,value:s}));this.fontSourceMap.set(t),this.fontOptions.set(r),this.queueInitialFontFaceLoads(r)}queueInitialFontFaceLoads(e){let t=new Set,n=this.defaultFontFamily().trim();if(n&&t.add(n),this.overlays().filter(Dt).forEach(r=>{let o=r.fontFamily?.trim();o&&t.add(o)}),!t.size){let r=e[0]?.value?.trim();r&&t.add(r)}t.forEach(r=>this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()))}fontDeps(){return{isBrowser:this.isBrowser,fontSourceMap:this.fontSourceMap,fontFacesReady:this.fontFacesReady,fontFacePromises:this.fontFacePromises,fontBinaryPromises:this.fontBinaryPromises,fontOutlinePromises:this.fontOutlinePromises,defaultFontFamily:this.defaultFontFamily}}resolveFontSource(e){let t=e?.fontUrl?.trim?.();return t||(e?.fileUrl?.trim?.()?e.fileUrl:null)}resolveOpentypeFont(e){return this.fontAssetService.resolveOpentypeFont(e,this.fontDeps())}normalizeFontSize(e){if(!Number.isFinite(e))return this.minFontSize();let t=Math.round(e);return Math.min(this.maxFontSize(),Math.max(this.minFontSize(),t))}normalizeAngle(e){if(!Number.isFinite(e))return 0;let t=e%360;return t>180?t-=360:t<=-180&&(t+=360),Math.round(t*10)/10}activeOverlay(){let e=this.findOverlayById(this.activeOverlayId());return e&&this.overlayMatchesLayer(e,this.selectedLayerKey())?e:null}onOverlayPositionChange(e){this.setOverlayNormalizedPosition(e.overlay,e.normalizedX,e.normalizedY)}onOverlayRotationChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;t.angle=this.normalizeAngle(e.angle),this.commitOverlayUpdate();let n=this.overlayFabricObjects().get(t.id);n&&(this.syncFabricObjectWithOverlay(t,n),n.canvas?.requestRenderAll())}onOverlayResizeChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;let n=k({},t);if(this.customizerState.clearOverlayRuntimeDimensions(n.id),Dt(t)&&"fontSize"in e&&(n=he(k({},n),{fontSize:this.normalizeFontSize(e.fontSize)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(k({},n)))),Dt(t)&&"horizontalScale"in e&&"verticalScale"in e&&(n=he(k({},n),{horizontalScale:this.normalizeOverlayScale(e.horizontalScale,1),verticalScale:this.normalizeOverlayScale(e.verticalScale,1)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(k({},n)))),ai(t)&&"normalizedWidth"in e&&"normalizedHeight"in e){if(t.lockAspectRatio??!0){let l=Math.max(t.normalizedWidth,.02),c=Math.max(t.normalizedHeight,.02),d=Math.max(e.normalizedWidth,.02)/l,u=Math.max(e.normalizedHeight,.02)/c,f=Math.max((d+u)/2,.02);n=he(k({},n),{normalizedWidth:Math.min(Math.max(l*f,.02),1),normalizedHeight:Math.min(Math.max(c*f,.02),1)})}else n=he(k({},n),{normalizedWidth:Math.min(Math.max(e.normalizedWidth,.02),1),normalizedHeight:Math.min(Math.max(e.normalizedHeight,.02),1)});n.placementKey&&(n=this.applyPlacementZoneLogoBounds(k({},n)))}let r=this.overlays(),o=r.findIndex(l=>l.id===n.id);if(o<0)return;let s=[...r];s[o]=n,this.overlays.set(s),this.customizerState.setActiveOverlay(n),this.commitOverlayUpdate();let a=this.overlayFabricObjects().get(n.id);a&&(this.syncFabricObjectWithOverlay(n,a),a.canvas?.requestRenderAll())}setOverlayNormalizedPosition(e,t,n){this.setActiveOverlay(e);let{x:r,y:o}=this.clampNormalizedToPlacementZone(e,t,n);if(Math.abs(r-e.normalizedX)<1e-4&&Math.abs(o-e.normalizedY)<1e-4)return;e.normalizedX=r,e.normalizedY=o,this.commitOverlayUpdate();let s=this.overlayFabricObjects().get(e.id);s&&(this.syncFabricObjectWithOverlay(e,s),s.canvas?.requestRenderAll())}syncOverlaysToSvgDoc(){let e=this.executeOverlaySync();return this.overlaySyncPromise.set(e.catch(t=>{throw console.error(Ot.overlaySyncFailed,t),t})),this.overlaySyncPromise()}async buildSvgText(e,t){if(!this.svgDoc())return;let n=this.svgDoc()?.documentElement;if(!n)return;let r=this.svgRenderService.ensureDefsElement(this.svgDoc());if(!r)return;this.svgRenderService.clearOverlayFilterDefs(r),Array.from(n.querySelectorAll('[data-overlay="true"]')).forEach(l=>{l.parentNode?.removeChild(l)});let o=n.querySelector("#OverlayLayer");o&&!o.childNodes.length&&o.parentNode?.removeChild(o),this.svgDimensions()||this.computeSvgDimensions();let s=n.namespaceURI||Di,a=this.getOverlayBoundingRect();for(let l of this.overlays()){let c=a.x+l.normalizedX*a.width,d=a.y+l.normalizedY*a.height;if(Dt(l)){if(l.text.trim().length===0)continue;try{let u=await this.getOrBuildTextGlyphPlan(l);if(!u||u.glyphs.length===0)continue;let f=this.getOrBuildTextLayout(l,u);if(!f.length)continue;let h=this.resolveStrokeColor(l),p=l.strokeWidth??0,v=this.resolveSecondStrokeColor(l),g=l.secondStrokeWidth??0,m=this.resolveShadowSettings(l);this.svgRenderService.appendTextOverlayAsPath({overlay:l,layout:f,center:{x:c,y:d},overlayContainer:n,defs:r,svgDoc:this.svgDoc(),strokeColor:h,strokeWidth:p,secondStrokeColor:v,secondStrokeWidth:g,shadowSettings:m});let b=this.svgDoc()?.getElementById(l.id);b&&(b.setAttribute(me.DATA_OVERLAY_KIND,"text"),b.setAttribute(me.DATA_OVERLAY_TEXT,l.text),b.setAttribute(me.DATA_PLACEMENT_KEY,l.placementKey??""),b.setAttribute(me.PLACEMENT_KEY,l.placementKey??""),b.setAttribute(me.DATA_OVERLAY_FILL,l.fill),b.setAttribute(me.DATA_OVERLAY_FONT_SIZE,`${l.fontSize??24}`),b.setAttribute(me.DATA_OVERLAY_SCALE_X,`${this.normalizeOverlayScale(l.horizontalScale,1)}`),b.setAttribute(me.DATA_OVERLAY_SCALE_Y,`${this.normalizeOverlayScale(l.verticalScale,1)}`),b.setAttribute(me.DATA_OVERLAY_FONT_FAMILY,this.resolveFontFamily(l)),b.setAttribute(me.DATA_OVERLAY_FONT_WEIGHT,this.resolveFontWeight(l)),b.setAttribute(me.DATA_OVERLAY_FONT_STYLE,this.resolveFontStyle(l)),b.setAttribute(me.DATA_OVERLAY_LETTER_SPACING,`${this.resolveLetterSpacing(l)}`),b.setAttribute(me.DATA_OVERLAY_LINE_HEIGHT,`${l.lineHeight??1.2}`),b.setAttribute(me.DATA_OVERLAY_STROKE,l.stroke??jl),b.setAttribute(me.DATA_OVERLAY_STROKE_WIDTH,`${l.strokeWidth??0}`),b.setAttribute(me.DATA_OVERLAY_SECOND_STROKE,l.secondStroke??Wl),b.setAttribute(me.DATA_OVERLAY_SECOND_STROKE_WIDTH,`${l.secondStrokeWidth??0}`),b.setAttribute(me.DATA_OVERLAY_CURVE_AMOUNT,`${l.curveAmount??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_BLUR,`${l.shadowBlur??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_OFFSET_X,`${l.shadowOffsetX??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_OFFSET_Y,`${l.shadowOffsetY??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_COLOR,l.shadowColor??nh),b.setAttribute(me.DATA_OVERLAY_WARP_ENABLED,l.warpEnabled?"true":"false"),b.setAttribute(me.DATA_OVERLAY_LOCK_RATIO,l.lockAspectRatio===!1?"false":"true"))}catch(u){console.error(eU(l.id),u)}continue}if(ai(l)){let u=l.normalizedWidth*a.width,f=l.normalizedHeight*a.height;if(u<=0||f<=0)continue;let h=c-u/2,p=d-f/2,v=this.svgDoc().createElementNS(s,"image");v.setAttribute("id",l.id),v.setAttribute(me.DATA_OVERLAY_KEY,"true"),v.setAttribute(me.DATA_OVERLAY_KIND,"logo"),v.setAttribute(me.DATA_PLACEMENT_KEY,l.placementKey??""),v.setAttribute(me.PLACEMENT_KEY,l.placementKey??""),v.setAttribute("x",`${h}`),v.setAttribute("y",`${p}`),v.setAttribute("width",`${u}`),v.setAttribute("height",`${f}`),v.setAttribute(me.DATA_OVERLAY_original_WIDTH,`${l.originalWidth||u}`),v.setAttribute(me.DATA_OVERLAY_original_HEIGHT,`${l.originalHeight||f}`),v.setAttribute(me.DATA_OVERLAY_LOCK_RATIO,l.lockAspectRatio===!1?"false":"true"),v.setAttribute("preserveAspectRatio","none"),l.opacity!==void 0&&v.setAttribute("opacity",`${l.opacity}`);let g;e==="compressed"?g=l.imageSrc3d||l.imageSrc:g=l.imageSrc;let m=await this.resolveSvgImageHref(g);v.setAttribute("href",m);let b=l.angle??0;Math.abs(b)>.01&&v.setAttribute("transform",`rotate(${b} ${c} ${d})`),l.imageName&&v.setAttribute("data-source-name",l.imageName),n.appendChild(v)}}this.synchronizeRenderOrderStack(),this.applyRenderOrderStackToSvg(n),await this.backgroundState.syncBackgroundsToSvgWithQuality(e),t.set(new XMLSerializer().serializeToString(this.svgDoc())),this.measurementCloneDirty.set(!0)}async executeOverlaySyncForView(){return this.buildSvgText("compressed",this.svgText)}async executeOverlaySyncForExport(){return this.buildSvgText("original",this.svgTextForExport)}async executeOverlaySync(){return this.executeOverlaySyncForView()}async resolveSvgImageHref(e){let t=e?.trim()??"";if(!t)return"";if(t.startsWith("data:"))return t;let n=this.svgImageHrefCache.get(t);if(n)return n;let r=this.svgImageHrefPending.get(t);if(r)return r;let o=this.convertImageUrlToDataUrl(t).then(s=>{let a=s||t;return this.svgImageHrefCache.set(t,a),a}).finally(()=>{this.svgImageHrefPending.delete(t)});return this.svgImageHrefPending.set(t,o),o}async convertImageUrlToDataUrl(e){try{let t=await fetch(e,{mode:"cors",credentials:"omit"});if(!t.ok)return null;let n=await t.blob();return!n||n.size===0?null:await this.blobToDataUrl(n)}catch{return null}}blobToDataUrl(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(typeof o=="string"){t(o);return}n(new Error("Unable to convert blob to data URL."))},r.onerror=()=>n(r.error??new Error("FileReader failed.")),r.readAsDataURL(e)})}computeSvgDimensions(){if(!this.svgDoc()){this.svgDimensions.set(null);return}let e=this.svgDoc()?.documentElement;if(!e){this.svgDimensions.set(null);return}let t=e.getAttribute("viewBox");if(t){let a=t.split(/[\s,]+/).map(l=>Number.parseFloat(l)).filter(l=>Number.isFinite(l));if(a.length===4){let[l,c,d,u]=a;if(d>0&&u>0){this.svgDimensions.set({width:d,height:u}),this.svgViewBox.set({minX:l,minY:c,width:d,height:u});return}}}let n=e.getAttribute("width"),r=e.getAttribute("height"),o=n?Number.parseFloat(n):NaN,s=r?Number.parseFloat(r):NaN;if(Number.isFinite(o)&&Number.isFinite(s)&&o>0&&s>0){this.svgDimensions.set({width:o,height:s}),this.svgViewBox.set({minX:0,minY:0,width:o,height:s});return}this.svgDimensions.set({width:1e3,height:1e3}),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3})}requestTextureRebuild(){if(this.svgText()){if(this.suspendTextureRebuild){this.pendingTextureRebuildWhileSuspended=!0;return}this.textureUpdateScheduled()||(this.textureUpdateScheduled.set(!0),requestAnimationFrame(()=>{this.overlaySyncPromise().catch(()=>{}).finally(()=>{this.textureUpdateScheduled.set(!1),this.svgText()&&this.threeDUI()?.rebuildSVGTexture()})}))}}getBaseElement(){return this.svgDoc()?this.baseElementCache()?this.baseElementCache():this.svgDoc()?.documentElement:null}getBaseBoundingBox(){if(this.baseBBoxCache())return this.baseBBoxCache();let e=this.getBaseElement();if(!e||!(e instanceof SVGGraphicsElement))return null;try{return e.getBBox()}catch{return null}}invalidateBaseCaches(){this.customizerState.invalidateBaseCaches(()=>this.refreshPlacementZonesFromSvg())}disposeFabricCanvases(){this.fabricCanvas&&(this.clearPlacementGuides(this.fabricCanvas),this.fabricGridState.set(oU(this.fabricCanvas,this.fabricGridState())),this.fabricGuideState.set(lD(this.fabricCanvas,this.fabricGuideState())),this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null)),this.placementGuideObjects.set(new Map),this.fabricReady.set(!1),this.overlayFabricObjects.set(new Map),this.pendingLogoLoads.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.twoDSnapRuntime.set(zi()),this.twoDCursorCanvasPoint.set(null),this.twoDDraggingOverlayId.set(null)}initFabricCanvases(){if(!this.twoDCanvasElement){this.disposeFabricCanvases();return}this.setupFabricCanvasInstance(this.twoDCanvasElement)}setupFabricCanvasInstance(e){this.fabricCanvas&&(this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null));let{canvas:t,events:n,cleanup:r,syncDimensions:o}=pU(e),s=h=>{let v=h.detail?.overlayId;if(!v)return;let g=this.findOverlayById(v);g&&this.setActiveOverlay(g)},a=()=>{this.fabricSelectionClearSuppressionCount>0||(this.activeOverlayId.set(null),this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides())},l=h=>{let g=(h.detail?.deltaY??0)<0?1.08:.92;this.updateFabricViewZoom(g)},c=h=>{let v=h.detail?.multiplier;!Number.isFinite(v)||v<=0||this.updateFabricViewZoom(v)},d=()=>{this.render2dView()},u=h=>{let v=h.detail;!v||!Number.isFinite(v.x)||!Number.isFinite(v.y)||this.twoDCursorCanvasPoint.set({x:v.x,y:v.y})};n.addEventListener(si.OVERLAY_SELECT,s),n.addEventListener(si.SELECTION_CLEARED,a),n.addEventListener(si.WHEEL,l),n.addEventListener(si.PINCH,c),n.addEventListener(si.POINTER_MOVE,u),n.addEventListener(si.RESIZE,d);let f=()=>{n.removeEventListener(si.OVERLAY_SELECT,s),n.removeEventListener(si.SELECTION_CLEARED,a),n.removeEventListener(si.WHEEL,l),n.removeEventListener(si.PINCH,c),n.removeEventListener(si.POINTER_MOVE,u),n.removeEventListener(si.RESIZE,d),r()};this.fabricCanvasCleanup=f,this.fabricCanvasSyncDimensions=o,this.fabricCanvas=t,this.customizerState.fabricCanvasState.set(t),t.on("after:render",h=>{if(this.gridEnabled()){let p=h.ctx,v=t.viewportTransform;if(p&&v){let g=this.getTwoDGridStepPx(),m=this.getTwoDGridMajorStepPx();aU(p,t.getWidth(),t.getHeight(),v,g.x,g.y,m.x,m.y)}}}),this.fabricReady.set(!0),this.render2dView()}discardActiveObjectWithoutSelectionClear(e){this.fabricSelectionClearSuppressionCount+=1;try{e.discardActiveObject()}finally{queueMicrotask(()=>{this.fabricSelectionClearSuppressionCount=Math.max(0,this.fabricSelectionClearSuppressionCount-1)})}}resetFabricViewTransform(){this.fabricViewZoom.set(1),this.fabricCanvas&&this.fabricCanvas.setViewportTransform([1,0,0,1,0,0])}updateFabricViewZoom(e){let t=Qt.clamp(this.fabricViewZoom()*e,this.minFabricViewZoom(),this.maxFabricViewZoom());Math.abs(t-this.fabricViewZoom())<.001||(this.fabricViewZoom.set(t),this.applyFabricViewZoom()||this.render2dView())}applyFabricViewZoom(){if(!this.fabricCanvas||!this.canvasTransform()||!this.fabricLayoutState())return!1;let{baseScale:e,targetBounds:t,canvasWidth:n,canvasHeight:r,pxPerUnit:o}=this.fabricLayoutState(),s=e*this.fabricViewZoom(),a=t.width*s,l=t.height*s,c=(n-a)/2-t.x*s,d=(r-l)/2-t.y*s,u=s/(o||1);this.canvasTransform.set({scale:s,offsetX:c,offsetY:d});let f=this.fabricCanvas.backgroundImage;return f&&f.set({left:c,top:d,scaleX:u,scaleY:u,originX:"left",originY:"top",selectable:!1,evented:!1}),this.renderOverlaysOnCanvas(this.fabricCanvas),this.fabricCanvas.requestRenderAll(),!0}ngOnDestroy(){this.disposeFabricCanvases(),this.twoDCanvasElement=null,this.measurementService.disposeMeasurementHost(this.measurementHost),this.measurementSvgRoot.set(null),this.customizerState.resetWarpResources()}parseSVGRegions(e){let t=new DOMParser;this.svgDoc.set(t.parseFromString(e,ss)),this.invalidateBaseCaches(),this.computeSvgDimensions(),this.backgroundState.refreshFromSvg(),this.refreshPlacementZonesFromSvg()}async exportCurrentSvg(){if(!this.svgDoc()){console.warn(Ot.noSvgLoadedToExport);return}this.downloadCurrentSvgSnapshot()}async onSaveDesignClick(){if(!this.svgDoc()){this.toaster.showError(Ot.noSvgDocumentLoaded);return}this.designSavingInProgress.set(!0),this.designSaveMessage.set("Preparing design\u2026");try{await this.syncOverlaysToSvgDoc(),await this.executeOverlaySyncForExport();let t=this.svgTextForExport();if(!t){this.toaster.showError(Ot.failedToSerializeSvg);return}let n=this.buildDesignExportPayload(t),r=JSON.stringify(n,null,2),o=this.fileService.createJsonFile(r,q3),s=this.resolveApiKey(),a=this.resolveProductId();if(!s){this.toaster.showError(Ot.missingApiKey);return}this.designSaveMessage.set("Generating preview images\u2026");let l;try{l=await this.generateSubmissionThumbnails()}catch(u){let f=u instanceof Error?u.message:Ot.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}let c,d=l.map(u=>u.view);try{let u=Date.now();c=l.map(f=>this.dataUrlToPngFile(f.dataUrl,f.view,u))}catch(u){let f=u instanceof Error?u.message:Ot.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}this.designSaveMessage.set("Uploading design\u2026");try{let u=await vc(this.submissionApi.createSubmission(o,s,a??void 0,d,c,this.userUniqueId()));if(!u?.isSuccess||!u?.data){let h=u?.errors?.[0]??Ot.designSubmissionFailed;this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:h,errors:u?.errors??void 0}),this.toaster.showError(h);return}let f=u.data;this.sdkRuntimeConfig?.onSubmissionSuccess?.({productId:a??void 0,previews:this.mapSubmissionPreviewUrls(f),submissionNumber:f.submissionNumber,personalizationPlacements:f.personalizationPlacements})}catch{this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:Ot.designSubmissionFailed}),this.toaster.showError(Ot.designSubmissionFailed)}}finally{this.designSavingInProgress.set(!1),this.designSaveMessage.set(null)}}async onResetDesignClick(){let e=this.predesignBaseSvgText()||this.baseSvgText();if(!e){this.toaster.showError("No design loaded to reset to");return}if((await this.dialogService.showDialog({type:"confirmation",title:"Reset Design",message:"Are you sure you want to reset all customizations?",subtitle:"This will remove all applied customizations and revert to the current base design.",buttons:[{label:"Cancel",action:"cancel"},{label:"Reset",action:"confirm",isPrimary:!0,isDestructive:!0}]})).action==="confirm")try{this.loadSVGFromText(e,!0),this.toaster.showSuccess("All customizations have been reset")}catch(n){let r=n instanceof Error?n.message:"Failed to reset design";this.toaster.showError(r)}}onExitClick(){this.sdkRuntimeConfig?.onClose?.()}async generateSubmissionThumbnails(){let e=this.svgDoc();if(!e)throw new Error(Ot.noSvgDesignLoaded);await this.syncOverlaysToSvgDoc();let t=this.svgRenderService.serializeSvg(e);if(!t)throw new Error(Ot.failedSerializeSvgForThumbnail);let n=this.objText();if(!n)throw new Error(Ot.no3dModelForThumbnail);let r=this.mtlText();try{let o={type:"text",value:t},s={type:"text",value:n},a=r?{type:"text",value:r}:void 0,l=await this.threeThumbnailService.generateThumbnails(o,s,a,this.materialFileLink());if(!l.length)throw new Error(Ot.noThumbnailsGenerated);return this.normalizeSubmissionThumbnails(l)}catch(o){throw o instanceof Error?o:new Error(Ot.failedGenerateThumbnails)}}normalizeSubmissionThumbnails(e){let t=new Map,n=new Set(this.submissionThumbnailViews);if(e.forEach(r=>{n.has(r.view)&&(t.has(r.view)||t.set(r.view,r))}),t.size!==this.submissionThumbnailViews.length)throw new Error(Ot.invalidSubmissionThumbnails);return this.submissionThumbnailViews.map(r=>t.get(r))}dataUrlToPngFile(e,t,n=Date.now()){let r=/^data:(image\/png);base64,(.+)$/i.exec(e);if(!r)throw new Error(Ot.failedGenerateSubmissionThumbnails);let o=r[1],s=atob(r[2]),a=new Uint8Array(s.length);for(let l=0;l<s.length;l+=1)a[l]=s.charCodeAt(l);return new File([a],`preview-${t}-${n}.png`,{type:o})}mapSubmissionPreviewUrls(e){return(e.previews??[]).map(t=>({viewType:t.viewType,url:t.url,width:t.width,height:t.height})).filter(t=>!!t.url)}get getSvgTextForFinal(){return this.svgText()?this.sanitizer.bypassSecurityTrustHtml(this.svgText()):null}onTwoDZoomIn(){this.updateFabricViewZoom(1.1)}onTwoDZoomOut(){this.updateFabricViewZoom(.9)}onTwoDReset(){this.resetFabricViewTransform(),this.updateFabricViewZoom(1),this.render2dView()}onGridToggle(){this.gridEnabled.update(e=>!e)}onSnapToggle(){this.snapEnabled.update(e=>!e)}onGuidesToggle(){this.showPlacementGuides.update(e=>!e)}onGridSizeChange(e){let t=Number(e);if(!Number.isFinite(t))return;let n=Math.max(0,Math.min(1,t));this.gridRatio.set(n)}getTwoDGridStepPx(){let e=this.canvasTransform(),t=this.twoDGridStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}getTwoDGridMajorStepPx(){let e=this.canvasTransform(),t=this.twoDGridMajorStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}onTwoDGridSizeChange(e){let t=Number(e);Number.isFinite(t)&&this.twoDGridSizeInches.set(Math.max(.25,Math.min(4,t)))}setActiveStep(e){this.activeStepId.set(e)}downloadCurrentSvgSnapshot(){let e=this.serializeCurrentSvgSnapshot();return e?(this.svgRenderService.downloadSvg(e,`${K3}-${Date.now()}.svg`),e):null}serializeCurrentSvgSnapshot(){let e=this.svgRenderService.serializeSvg(this.svgDoc());return e||null}buildDesignExportPayload(e){let t=this.svgDoc();if(!t)return{};let n=this.overlays().reduce((o,s)=>{let a=this.personalizationState.getSelectedEffectIdForOverlay(s.id);return a&&o.set(s.id,a),o},new Map),r=this.collectOverlayDimensionsPxById(this.overlays());return this.designExportService.buildDesignExportPayload({selectedPredesignId:this.selectedPredesignId(),svgDoc:t,svgString:e,overlays:this.overlays(),personalizationItems:this.personalizationItems(),placementZones:this.placementZones(),placementNameByKey:this.buildPlacementNameByKeyMap(),backgroundState:this.backgroundState.state(),backgroundImageTemplates:this.backgroundImageTemplates(),patternState:this.patternState.state(),patternOverlays:this.patternOverlayState.state().overlays,renderOrder:this.renderOrderState.stack(),svgDimensions:this.svgDimensions(),svgViewBox:this.svgViewBox(),bounds:this.getOverlayBoundingRect(),overlayDimensionsPxById:r,selectedEffectIdByOverlay:n,textStyleResolvers:{defaultFontFamily:this.defaultFontFamily(),defaultFontWeight:this.defaultFontWeight(),defaultFontStyle:this.defaultFontStyle(),defaultLetterSpacing:this.defaultLetterSpacing(),defaultStrokeColor:jl,defaultSecondStrokeColor:Wl,defaultCurveAmount:this.defaultCurveAmount(),defaultLineHeight:this.defaultLineHeight(),defaultShadowBlur:this.defaultShadowBlur(),defaultShadowOffsetX:this.defaultShadowOffsetX(),defaultShadowOffsetY:this.defaultShadowOffsetY(),defaultShadowColor:this.defaultShadowColor()}})}collectOverlayDimensionsPxById(e){let t=new Map;return e.forEach(n=>{let r=this.personalizationState.getOverlayDimensionsPx(n);if(r.width>0&&r.height>0){t.set(n.id,{width:r.width,height:r.height});return}let o=this.customizerState.overlayRuntimeDimensionsPx().get(n.id);o&&o.width>0&&o.height>0&&t.set(n.id,{width:o.width,height:o.height})}),t}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-customizer-ui"]],viewQuery:function(t,n){t&1&&ll(n.threeDUI,Sse,5),t&2&&Vc()},hostBindings:function(t,n){t&1&&W("click",function(){return n.closeShortcuts()},XC)("resize",function(){return n.onResize()},YC)},inputs:{apiKey:[1,"apiKey"],productId:[1,"productId"],submissionNumber:[1,"submissionNumber"],predesignId:[1,"predesignId"],userUniqueId:[1,"userUniqueId"]},decls:23,vars:8,consts:[["threeDUI",""],[1,"header"],[1,"flex","items-center","justify-between"],[1,"brand"],["alt","Distributor logo",1,"brand-logo-img",3,"src"],[1,"header-right"],["type","button","title","Exit and close the customizer",1,"btn-exit",3,"click","disabled"],["type","button","title","Reset all customizations to the current predesign base",1,"btn-reset",3,"click","disabled"],["type","button",1,"btn-save",3,"click","disabled"],[1,"header-bottom"],[3,"valueChange","value"],["value","3d"],[1,"manifest-loader-overlay"],[1,"save-loader-overlay"],[1,"flex","editor-main-box",3,"mobile-panel-hidden","mobile-canvas-hidden"],["value","2d"],["value","both"],[3,"message"],["role","alert",1,"manifest-error-card"],[1,"manifest-error-title"],[1,"manifest-error-message"],["type","button",1,"manifest-retry-btn"],["type","button",1,"manifest-retry-btn",3,"click"],[3,"message","subtitle"],[1,"flex","editor-main-box"],[1,"main-canvas-area","flex-1"],[1,"view-section"],[3,"layerToggle","canvasReady","canvasDetached","zoomIn","zoomOut","resetView","onUndo","onRedo","svgText","isActive","layers","selectedLayerKey","isShowAllLayersOption","gridEnabled","snapEnabled","showPlacementGuides","gridSize"],[1,"canvas-area","canvas-area-single"],[1,"jersey-model"],[1,"w-full",3,"isModelLoading","svgText","isActive","threeDVariants","selectedThreeDVariantId","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap"],["role","status","aria-live","polite",1,"canvas-manifest-loader"],[1,"right-panel-shell"],[1,"right-panel"],[1,"text-sm","text-surface-500"],[1,""],[1,"icon-nav-shell"],[1,"panel-icon-nav"],[1,"mobile-actions-bar"],["type","button",1,"mobile-panel-toggle"],["type","button",1,"mobile-canvas-toggle"],[1,"expanded-nav-menu"],[1,"icon-nav-list"],[1,"icon-btn",3,"active"],[1,"icon-btn","toggle-more-btn"],[1,"w-full",3,"svgTextChange","svgDimensionsChange","svgViewBoxChange","showPlacementGuidesChange","placementZonesChange","overlaysChange","activeOverlayIdChange","activeOverlayChange","threeDVariantSelected","overlayPositionChange","overlayRotationChange","overlayResizeChange","onUndo","onRedo","isModelLoading","svgText","isActive","threeDVariants","selectedThreeDVariantId","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap",3,"click"],["title","Keyboard Shortcuts",1,"shortcuts-fab",3,"click"],[1,"ri-keyboard-line"],[1,"shortcuts-popover"],[1,"shortcuts-popover-header"],[1,"canvas-manifest-loader-subtitle"],[1,"panel-content"],[1,"panel-header"],[1,"panel-scroll-body"],[3,"predesigns","selectedId"],[3,"items"],[3,"items","userUniqueId","apiKey"],[3,"items","useAccordion"],[3,"templates","userUniqueId","apiKey"],[3,"items","activeOverlayId"],[3,"gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[3,"designSelected","predesigns","selectedId"],[3,"moveTowardFront","moveTowardBack","reorder","selectItem","items","activeOverlayId"],[3,"onGridToggle","onSnapToggle","onGuidesToggle","onTwoDGridSizeChange","gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[1,"text-gray-900"],[1,"child-accordion",3,"value"],[3,"value"],[1,"flex","items-center","gap-2"],[1,"child-panel"],["type","button",1,"mobile-panel-toggle",3,"click"],[1,"ri-arrow-down-s-line"],[1,"ri-arrow-up-s-line"],["type","button",1,"mobile-canvas-toggle",3,"click"],[1,"ri-fullscreen-line"],[1,"icon-btn","expanded-btn",3,"active"],[1,"icon-btn","expanded-btn",3,"click"],[3,"class"],[1,"w-full"],[1,"icon-btn",3,"click"],[1,"icon-btn","toggle-more-btn",3,"click"],[1,"ri-close-line"],[1,"ri-more-fill"]],template:function(t,n){t&1&&(U(0,"app-ui-toaster"),x(1,"header",1)(2,"div",2)(3,"div",3),le(4,Cse,1,1,"img",4),S(),x(5,"div",5)(6,"button",6),W("click",function(){return n.onExitClick()}),R(7," Exit "),S(),x(8,"button",7),W("click",function(){return n.onResetDesignClick()}),R(9," Reset "),S(),x(10,"button",8),W("click",function(){return n.onSaveDesignClick()}),R(11),S()()(),x(12,"div",9)(13,"app-ui-tabs",10),mp("valueChange",function(o){return Ms(n.editorMode,o)||(n.editorMode=o),o}),x(14,"app-ui-tablist")(15,"app-ui-tab",11),R(16,"3D Editor"),S(),le(17,wse,4,0),S()()()(),le(18,Ese,2,1,"div",12)(19,Tse,7,2,"div",12)(20,Dse,2,2,"div",13)(21,mae,27,32,"div",14),U(22,"app-generic-dialog")),t&2&&(T(4),ce(n.distributorHeaderLogoUrl()?4:-1),T(2),q("disabled",n.designSavingInProgress()),T(2),q("disabled",n.designSavingInProgress()),T(2),q("disabled",n.designSavingInProgress()),T(),Tt(" ",n.designSavingInProgress()?"Saving\u2026":"Save Design"," "),T(2),Hc("value",n.editorMode),T(4),ce(n.isShowWholeLayersOption()||n.layers().length>0?17:-1),T(),ce(n.showBlockingManifestLoader()?18:n.showBlockingManifestError()?19:n.designSavingInProgress()?20:21))},dependencies:[Ut,fr,Zx,Kx,oc,x_,S_,C_,E_,M_,T_,A_,bh,z_,B_,Vi,_i,_r,xr,P_,O_,ih,Z_,D_,J_],styles:[`@layer properties;@layer theme,utilities;@layer theme{:root,:host{--color-gray-300: oklch(87.2% .01 258.338);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-white: #fff;--spacing: .25rem;--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--font-weight-medium: 500;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.visible{visibility:visible}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.container{width:100%}@media(width>=40rem){.container{max-width:40rem}}@media(width>=48rem){.container{max-width:48rem}}@media(width>=64rem){.container{max-width:64rem}}@media(width>=80rem){.container{max-width:80rem}}@media(width>=96rem){.container{max-width:96rem}}.mt-3{margin-top:calc(var(--spacing) * 3)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-full{height:100%}.w-2{width:calc(var(--spacing) * 2)}.w-full{width:100%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.resize{resize:both}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:calc(infinity * 1px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.bg-white{background-color:var(--color-white)}.object-center{object-position:center}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-1{padding-block:calc(var(--spacing) * 1)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.shadow{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.ease-in-out{--tw-ease: var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media(width>=48rem){.md\\:hidden{display:none}}}@font-face{font-family:remixicon;src:url("./media/remixicon.eot?t=1769685282643");src:url("./media/remixicon.eot?t=1769685282643#iefix") format("embedded-opentype"),url("./media/remixicon.woff2?t=1769685282643") format("woff2"),url("./media/remixicon.woff?t=1769685282643") format("woff"),url("./media/remixicon.ttf?t=1769685282643") format("truetype"),url("./media/remixicon.svg?t=1769685282643#remixicon") format("svg");font-display:swap}[class^=ri-],[class*=" ri-"]{font-family:remixicon!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:"\\ea01"}.ri-24-hours-line:before{content:"\\ea02"}.ri-4k-fill:before{content:"\\ea03"}.ri-4k-line:before{content:"\\ea04"}.ri-a-b:before{content:"\\ea05"}.ri-account-box-fill:before{content:"\\ea06"}.ri-account-box-line:before{content:"\\ea07"}.ri-account-circle-fill:before{content:"\\ea08"}.ri-account-circle-line:before{content:"\\ea09"}.ri-account-pin-box-fill:before{content:"\\ea0a"}.ri-account-pin-box-line:before{content:"\\ea0b"}.ri-account-pin-circle-fill:before{content:"\\ea0c"}.ri-account-pin-circle-line:before{content:"\\ea0d"}.ri-add-box-fill:before{content:"\\ea0e"}.ri-add-box-line:before{content:"\\ea0f"}.ri-add-circle-fill:before{content:"\\ea10"}.ri-add-circle-line:before{content:"\\ea11"}.ri-add-fill:before{content:"\\ea12"}.ri-add-line:before{content:"\\ea13"}.ri-admin-fill:before{content:"\\ea14"}.ri-admin-line:before{content:"\\ea15"}.ri-advertisement-fill:before{content:"\\ea16"}.ri-advertisement-line:before{content:"\\ea17"}.ri-airplay-fill:before{content:"\\ea18"}.ri-airplay-line:before{content:"\\ea19"}.ri-alarm-fill:before{content:"\\ea1a"}.ri-alarm-line:before{content:"\\ea1b"}.ri-alarm-warning-fill:before{content:"\\ea1c"}.ri-alarm-warning-line:before{content:"\\ea1d"}.ri-album-fill:before{content:"\\ea1e"}.ri-album-line:before{content:"\\ea1f"}.ri-alert-fill:before{content:"\\ea20"}.ri-alert-line:before{content:"\\ea21"}.ri-aliens-fill:before{content:"\\ea22"}.ri-aliens-line:before{content:"\\ea23"}.ri-align-bottom:before{content:"\\ea24"}.ri-align-center:before{content:"\\ea25"}.ri-align-justify:before{content:"\\ea26"}.ri-align-left:before{content:"\\ea27"}.ri-align-right:before{content:"\\ea28"}.ri-align-top:before{content:"\\ea29"}.ri-align-vertically:before{content:"\\ea2a"}.ri-alipay-fill:before{content:"\\ea2b"}.ri-alipay-line:before{content:"\\ea2c"}.ri-amazon-fill:before{content:"\\ea2d"}.ri-amazon-line:before{content:"\\ea2e"}.ri-anchor-fill:before{content:"\\ea2f"}.ri-anchor-line:before{content:"\\ea30"}.ri-ancient-gate-fill:before{content:"\\ea31"}.ri-ancient-gate-line:before{content:"\\ea32"}.ri-ancient-pavilion-fill:before{content:"\\ea33"}.ri-ancient-pavilion-line:before{content:"\\ea34"}.ri-android-fill:before{content:"\\ea35"}.ri-android-line:before{content:"\\ea36"}.ri-angularjs-fill:before{content:"\\ea37"}.ri-angularjs-line:before{content:"\\ea38"}.ri-anticlockwise-2-fill:before{content:"\\ea39"}.ri-anticlockwise-2-line:before{content:"\\ea3a"}.ri-anticlockwise-fill:before{content:"\\ea3b"}.ri-anticlockwise-line:before{content:"\\ea3c"}.ri-app-store-fill:before{content:"\\ea3d"}.ri-app-store-line:before{content:"\\ea3e"}.ri-apple-fill:before{content:"\\ea3f"}.ri-apple-line:before{content:"\\ea40"}.ri-apps-2-fill:before{content:"\\ea41"}.ri-apps-2-line:before{content:"\\ea42"}.ri-apps-fill:before{content:"\\ea43"}.ri-apps-line:before{content:"\\ea44"}.ri-archive-drawer-fill:before{content:"\\ea45"}.ri-archive-drawer-line:before{content:"\\ea46"}.ri-archive-fill:before{content:"\\ea47"}.ri-archive-line:before{content:"\\ea48"}.ri-arrow-down-circle-fill:before{content:"\\ea49"}.ri-arrow-down-circle-line:before{content:"\\ea4a"}.ri-arrow-down-fill:before{content:"\\ea4b"}.ri-arrow-down-line:before{content:"\\ea4c"}.ri-arrow-down-s-fill:before{content:"\\ea4d"}.ri-arrow-down-s-line:before{content:"\\ea4e"}.ri-arrow-drop-down-fill:before{content:"\\ea4f"}.ri-arrow-drop-down-line:before{content:"\\ea50"}.ri-arrow-drop-left-fill:before{content:"\\ea51"}.ri-arrow-drop-left-line:before{content:"\\ea52"}.ri-arrow-drop-right-fill:before{content:"\\ea53"}.ri-arrow-drop-right-line:before{content:"\\ea54"}.ri-arrow-drop-up-fill:before{content:"\\ea55"}.ri-arrow-drop-up-line:before{content:"\\ea56"}.ri-arrow-go-back-fill:before{content:"\\ea57"}.ri-arrow-go-back-line:before{content:"\\ea58"}.ri-arrow-go-forward-fill:before{content:"\\ea59"}.ri-arrow-go-forward-line:before{content:"\\ea5a"}.ri-arrow-left-circle-fill:before{content:"\\ea5b"}.ri-arrow-left-circle-line:before{content:"\\ea5c"}.ri-arrow-left-down-fill:before{content:"\\ea5d"}.ri-arrow-left-down-line:before{content:"\\ea5e"}.ri-arrow-left-fill:before{content:"\\ea5f"}.ri-arrow-left-line:before{content:"\\ea60"}.ri-arrow-left-right-fill:before{content:"\\ea61"}.ri-arrow-left-right-line:before{content:"\\ea62"}.ri-arrow-left-s-fill:before{content:"\\ea63"}.ri-arrow-left-s-line:before{content:"\\ea64"}.ri-arrow-left-up-fill:before{content:"\\ea65"}.ri-arrow-left-up-line:before{content:"\\ea66"}.ri-arrow-right-circle-fill:before{content:"\\ea67"}.ri-arrow-right-circle-line:before{content:"\\ea68"}.ri-arrow-right-down-fill:before{content:"\\ea69"}.ri-arrow-right-down-line:before{content:"\\ea6a"}.ri-arrow-right-fill:before{content:"\\ea6b"}.ri-arrow-right-line:before{content:"\\ea6c"}.ri-arrow-right-s-fill:before{content:"\\ea6d"}.ri-arrow-right-s-line:before{content:"\\ea6e"}.ri-arrow-right-up-fill:before{content:"\\ea6f"}.ri-arrow-right-up-line:before{content:"\\ea70"}.ri-arrow-up-circle-fill:before{content:"\\ea71"}.ri-arrow-up-circle-line:before{content:"\\ea72"}.ri-arrow-up-down-fill:before{content:"\\ea73"}.ri-arrow-up-down-line:before{content:"\\ea74"}.ri-arrow-up-fill:before{content:"\\ea75"}.ri-arrow-up-line:before{content:"\\ea76"}.ri-arrow-up-s-fill:before{content:"\\ea77"}.ri-arrow-up-s-line:before{content:"\\ea78"}.ri-artboard-2-fill:before{content:"\\ea79"}.ri-artboard-2-line:before{content:"\\ea7a"}.ri-artboard-fill:before{content:"\\ea7b"}.ri-artboard-line:before{content:"\\ea7c"}.ri-article-fill:before{content:"\\ea7d"}.ri-article-line:before{content:"\\ea7e"}.ri-aspect-ratio-fill:before{content:"\\ea7f"}.ri-aspect-ratio-line:before{content:"\\ea80"}.ri-asterisk:before{content:"\\ea81"}.ri-at-fill:before{content:"\\ea82"}.ri-at-line:before{content:"\\ea83"}.ri-attachment-2:before{content:"\\ea84"}.ri-attachment-fill:before{content:"\\ea85"}.ri-attachment-line:before{content:"\\ea86"}.ri-auction-fill:before{content:"\\ea87"}.ri-auction-line:before{content:"\\ea88"}.ri-award-fill:before{content:"\\ea89"}.ri-award-line:before{content:"\\ea8a"}.ri-baidu-fill:before{content:"\\ea8b"}.ri-baidu-line:before{content:"\\ea8c"}.ri-ball-pen-fill:before{content:"\\ea8d"}.ri-ball-pen-line:before{content:"\\ea8e"}.ri-bank-card-2-fill:before{content:"\\ea8f"}.ri-bank-card-2-line:before{content:"\\ea90"}.ri-bank-card-fill:before{content:"\\ea91"}.ri-bank-card-line:before{content:"\\ea92"}.ri-bank-fill:before{content:"\\ea93"}.ri-bank-line:before{content:"\\ea94"}.ri-bar-chart-2-fill:before{content:"\\ea95"}.ri-bar-chart-2-line:before{content:"\\ea96"}.ri-bar-chart-box-fill:before{content:"\\ea97"}.ri-bar-chart-box-line:before{content:"\\ea98"}.ri-bar-chart-fill:before{content:"\\ea99"}.ri-bar-chart-grouped-fill:before{content:"\\ea9a"}.ri-bar-chart-grouped-line:before{content:"\\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\\ea9d"}.ri-bar-chart-line:before{content:"\\ea9e"}.ri-barcode-box-fill:before{content:"\\ea9f"}.ri-barcode-box-line:before{content:"\\eaa0"}.ri-barcode-fill:before{content:"\\eaa1"}.ri-barcode-line:before{content:"\\eaa2"}.ri-barricade-fill:before{content:"\\eaa3"}.ri-barricade-line:before{content:"\\eaa4"}.ri-base-station-fill:before{content:"\\eaa5"}.ri-base-station-line:before{content:"\\eaa6"}.ri-basketball-fill:before{content:"\\eaa7"}.ri-basketball-line:before{content:"\\eaa8"}.ri-battery-2-charge-fill:before{content:"\\eaa9"}.ri-battery-2-charge-line:before{content:"\\eaaa"}.ri-battery-2-fill:before{content:"\\eaab"}.ri-battery-2-line:before{content:"\\eaac"}.ri-battery-charge-fill:before{content:"\\eaad"}.ri-battery-charge-line:before{content:"\\eaae"}.ri-battery-fill:before{content:"\\eaaf"}.ri-battery-line:before{content:"\\eab0"}.ri-battery-low-fill:before{content:"\\eab1"}.ri-battery-low-line:before{content:"\\eab2"}.ri-battery-saver-fill:before{content:"\\eab3"}.ri-battery-saver-line:before{content:"\\eab4"}.ri-battery-share-fill:before{content:"\\eab5"}.ri-battery-share-line:before{content:"\\eab6"}.ri-bear-smile-fill:before{content:"\\eab7"}.ri-bear-smile-line:before{content:"\\eab8"}.ri-behance-fill:before{content:"\\eab9"}.ri-behance-line:before{content:"\\eaba"}.ri-bell-fill:before{content:"\\eabb"}.ri-bell-line:before{content:"\\eabc"}.ri-bike-fill:before{content:"\\eabd"}.ri-bike-line:before{content:"\\eabe"}.ri-bilibili-fill:before{content:"\\eabf"}.ri-bilibili-line:before{content:"\\eac0"}.ri-bill-fill:before{content:"\\eac1"}.ri-bill-line:before{content:"\\eac2"}.ri-billiards-fill:before{content:"\\eac3"}.ri-billiards-line:before{content:"\\eac4"}.ri-bit-coin-fill:before{content:"\\eac5"}.ri-bit-coin-line:before{content:"\\eac6"}.ri-blaze-fill:before{content:"\\eac7"}.ri-blaze-line:before{content:"\\eac8"}.ri-bluetooth-connect-fill:before{content:"\\eac9"}.ri-bluetooth-connect-line:before{content:"\\eaca"}.ri-bluetooth-fill:before{content:"\\eacb"}.ri-bluetooth-line:before{content:"\\eacc"}.ri-blur-off-fill:before{content:"\\eacd"}.ri-blur-off-line:before{content:"\\eace"}.ri-body-scan-fill:before{content:"\\eacf"}.ri-body-scan-line:before{content:"\\ead0"}.ri-bold:before{content:"\\ead1"}.ri-book-2-fill:before{content:"\\ead2"}.ri-book-2-line:before{content:"\\ead3"}.ri-book-3-fill:before{content:"\\ead4"}.ri-book-3-line:before{content:"\\ead5"}.ri-book-fill:before{content:"\\ead6"}.ri-book-line:before{content:"\\ead7"}.ri-book-marked-fill:before{content:"\\ead8"}.ri-book-marked-line:before{content:"\\ead9"}.ri-book-open-fill:before{content:"\\eada"}.ri-book-open-line:before{content:"\\eadb"}.ri-book-read-fill:before{content:"\\eadc"}.ri-book-read-line:before{content:"\\eadd"}.ri-booklet-fill:before{content:"\\eade"}.ri-booklet-line:before{content:"\\eadf"}.ri-bookmark-2-fill:before{content:"\\eae0"}.ri-bookmark-2-line:before{content:"\\eae1"}.ri-bookmark-3-fill:before{content:"\\eae2"}.ri-bookmark-3-line:before{content:"\\eae3"}.ri-bookmark-fill:before{content:"\\eae4"}.ri-bookmark-line:before{content:"\\eae5"}.ri-boxing-fill:before{content:"\\eae6"}.ri-boxing-line:before{content:"\\eae7"}.ri-braces-fill:before{content:"\\eae8"}.ri-braces-line:before{content:"\\eae9"}.ri-brackets-fill:before{content:"\\eaea"}.ri-brackets-line:before{content:"\\eaeb"}.ri-briefcase-2-fill:before{content:"\\eaec"}.ri-briefcase-2-line:before{content:"\\eaed"}.ri-briefcase-3-fill:before{content:"\\eaee"}.ri-briefcase-3-line:before{content:"\\eaef"}.ri-briefcase-4-fill:before{content:"\\eaf0"}.ri-briefcase-4-line:before{content:"\\eaf1"}.ri-briefcase-5-fill:before{content:"\\eaf2"}.ri-briefcase-5-line:before{content:"\\eaf3"}.ri-briefcase-fill:before{content:"\\eaf4"}.ri-briefcase-line:before{content:"\\eaf5"}.ri-bring-forward:before{content:"\\eaf6"}.ri-bring-to-front:before{content:"\\eaf7"}.ri-broadcast-fill:before{content:"\\eaf8"}.ri-broadcast-line:before{content:"\\eaf9"}.ri-brush-2-fill:before{content:"\\eafa"}.ri-brush-2-line:before{content:"\\eafb"}.ri-brush-3-fill:before{content:"\\eafc"}.ri-brush-3-line:before{content:"\\eafd"}.ri-brush-4-fill:before{content:"\\eafe"}.ri-brush-4-line:before{content:"\\eaff"}.ri-brush-fill:before{content:"\\eb00"}.ri-brush-line:before{content:"\\eb01"}.ri-bubble-chart-fill:before{content:"\\eb02"}.ri-bubble-chart-line:before{content:"\\eb03"}.ri-bug-2-fill:before{content:"\\eb04"}.ri-bug-2-line:before{content:"\\eb05"}.ri-bug-fill:before{content:"\\eb06"}.ri-bug-line:before{content:"\\eb07"}.ri-building-2-fill:before{content:"\\eb08"}.ri-building-2-line:before{content:"\\eb09"}.ri-building-3-fill:before{content:"\\eb0a"}.ri-building-3-line:before{content:"\\eb0b"}.ri-building-4-fill:before{content:"\\eb0c"}.ri-building-4-line:before{content:"\\eb0d"}.ri-building-fill:before{content:"\\eb0e"}.ri-building-line:before{content:"\\eb0f"}.ri-bus-2-fill:before{content:"\\eb10"}.ri-bus-2-line:before{content:"\\eb11"}.ri-bus-fill:before{content:"\\eb12"}.ri-bus-line:before{content:"\\eb13"}.ri-bus-wifi-fill:before{content:"\\eb14"}.ri-bus-wifi-line:before{content:"\\eb15"}.ri-cactus-fill:before{content:"\\eb16"}.ri-cactus-line:before{content:"\\eb17"}.ri-cake-2-fill:before{content:"\\eb18"}.ri-cake-2-line:before{content:"\\eb19"}.ri-cake-3-fill:before{content:"\\eb1a"}.ri-cake-3-line:before{content:"\\eb1b"}.ri-cake-fill:before{content:"\\eb1c"}.ri-cake-line:before{content:"\\eb1d"}.ri-calculator-fill:before{content:"\\eb1e"}.ri-calculator-line:before{content:"\\eb1f"}.ri-calendar-2-fill:before{content:"\\eb20"}.ri-calendar-2-line:before{content:"\\eb21"}.ri-calendar-check-fill:before{content:"\\eb22"}.ri-calendar-check-line:before{content:"\\eb23"}.ri-calendar-event-fill:before{content:"\\eb24"}.ri-calendar-event-line:before{content:"\\eb25"}.ri-calendar-fill:before{content:"\\eb26"}.ri-calendar-line:before{content:"\\eb27"}.ri-calendar-todo-fill:before{content:"\\eb28"}.ri-calendar-todo-line:before{content:"\\eb29"}.ri-camera-2-fill:before{content:"\\eb2a"}.ri-camera-2-line:before{content:"\\eb2b"}.ri-camera-3-fill:before{content:"\\eb2c"}.ri-camera-3-line:before{content:"\\eb2d"}.ri-camera-fill:before{content:"\\eb2e"}.ri-camera-lens-fill:before{content:"\\eb2f"}.ri-camera-lens-line:before{content:"\\eb30"}.ri-camera-line:before{content:"\\eb31"}.ri-camera-off-fill:before{content:"\\eb32"}.ri-camera-off-line:before{content:"\\eb33"}.ri-camera-switch-fill:before{content:"\\eb34"}.ri-camera-switch-line:before{content:"\\eb35"}.ri-capsule-fill:before{content:"\\eb36"}.ri-capsule-line:before{content:"\\eb37"}.ri-car-fill:before{content:"\\eb38"}.ri-car-line:before{content:"\\eb39"}.ri-car-washing-fill:before{content:"\\eb3a"}.ri-car-washing-line:before{content:"\\eb3b"}.ri-caravan-fill:before{content:"\\eb3c"}.ri-caravan-line:before{content:"\\eb3d"}.ri-cast-fill:before{content:"\\eb3e"}.ri-cast-line:before{content:"\\eb3f"}.ri-cellphone-fill:before{content:"\\eb40"}.ri-cellphone-line:before{content:"\\eb41"}.ri-celsius-fill:before{content:"\\eb42"}.ri-celsius-line:before{content:"\\eb43"}.ri-centos-fill:before{content:"\\eb44"}.ri-centos-line:before{content:"\\eb45"}.ri-character-recognition-fill:before{content:"\\eb46"}.ri-character-recognition-line:before{content:"\\eb47"}.ri-charging-pile-2-fill:before{content:"\\eb48"}.ri-charging-pile-2-line:before{content:"\\eb49"}.ri-charging-pile-fill:before{content:"\\eb4a"}.ri-charging-pile-line:before{content:"\\eb4b"}.ri-chat-1-fill:before{content:"\\eb4c"}.ri-chat-1-line:before{content:"\\eb4d"}.ri-chat-2-fill:before{content:"\\eb4e"}.ri-chat-2-line:before{content:"\\eb4f"}.ri-chat-3-fill:before{content:"\\eb50"}.ri-chat-3-line:before{content:"\\eb51"}.ri-chat-4-fill:before{content:"\\eb52"}.ri-chat-4-line:before{content:"\\eb53"}.ri-chat-check-fill:before{content:"\\eb54"}.ri-chat-check-line:before{content:"\\eb55"}.ri-chat-delete-fill:before{content:"\\eb56"}.ri-chat-delete-line:before{content:"\\eb57"}.ri-chat-download-fill:before{content:"\\eb58"}.ri-chat-download-line:before{content:"\\eb59"}.ri-chat-follow-up-fill:before{content:"\\eb5a"}.ri-chat-follow-up-line:before{content:"\\eb5b"}.ri-chat-forward-fill:before{content:"\\eb5c"}.ri-chat-forward-line:before{content:"\\eb5d"}.ri-chat-heart-fill:before{content:"\\eb5e"}.ri-chat-heart-line:before{content:"\\eb5f"}.ri-chat-history-fill:before{content:"\\eb60"}.ri-chat-history-line:before{content:"\\eb61"}.ri-chat-new-fill:before{content:"\\eb62"}.ri-chat-new-line:before{content:"\\eb63"}.ri-chat-off-fill:before{content:"\\eb64"}.ri-chat-off-line:before{content:"\\eb65"}.ri-chat-poll-fill:before{content:"\\eb66"}.ri-chat-poll-line:before{content:"\\eb67"}.ri-chat-private-fill:before{content:"\\eb68"}.ri-chat-private-line:before{content:"\\eb69"}.ri-chat-quote-fill:before{content:"\\eb6a"}.ri-chat-quote-line:before{content:"\\eb6b"}.ri-chat-settings-fill:before{content:"\\eb6c"}.ri-chat-settings-line:before{content:"\\eb6d"}.ri-chat-smile-2-fill:before{content:"\\eb6e"}.ri-chat-smile-2-line:before{content:"\\eb6f"}.ri-chat-smile-3-fill:before{content:"\\eb70"}.ri-chat-smile-3-line:before{content:"\\eb71"}.ri-chat-smile-fill:before{content:"\\eb72"}.ri-chat-smile-line:before{content:"\\eb73"}.ri-chat-upload-fill:before{content:"\\eb74"}.ri-chat-upload-line:before{content:"\\eb75"}.ri-chat-voice-fill:before{content:"\\eb76"}.ri-chat-voice-line:before{content:"\\eb77"}.ri-check-double-fill:before{content:"\\eb78"}.ri-check-double-line:before{content:"\\eb79"}.ri-check-fill:before{content:"\\eb7a"}.ri-check-line:before{content:"\\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\\eb7d"}.ri-checkbox-blank-fill:before{content:"\\eb7e"}.ri-checkbox-blank-line:before{content:"\\eb7f"}.ri-checkbox-circle-fill:before{content:"\\eb80"}.ri-checkbox-circle-line:before{content:"\\eb81"}.ri-checkbox-fill:before{content:"\\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\\eb83"}.ri-checkbox-indeterminate-line:before{content:"\\eb84"}.ri-checkbox-line:before{content:"\\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\\eb87"}.ri-checkbox-multiple-fill:before{content:"\\eb88"}.ri-checkbox-multiple-line:before{content:"\\eb89"}.ri-china-railway-fill:before{content:"\\eb8a"}.ri-china-railway-line:before{content:"\\eb8b"}.ri-chrome-fill:before{content:"\\eb8c"}.ri-chrome-line:before{content:"\\eb8d"}.ri-clapperboard-fill:before{content:"\\eb8e"}.ri-clapperboard-line:before{content:"\\eb8f"}.ri-clipboard-fill:before{content:"\\eb90"}.ri-clipboard-line:before{content:"\\eb91"}.ri-clockwise-2-fill:before{content:"\\eb92"}.ri-clockwise-2-line:before{content:"\\eb93"}.ri-clockwise-fill:before{content:"\\eb94"}.ri-clockwise-line:before{content:"\\eb95"}.ri-close-circle-fill:before{content:"\\eb96"}.ri-close-circle-line:before{content:"\\eb97"}.ri-close-fill:before{content:"\\eb98"}.ri-close-line:before{content:"\\eb99"}.ri-closed-captioning-fill:before{content:"\\eb9a"}.ri-closed-captioning-line:before{content:"\\eb9b"}.ri-cloud-fill:before{content:"\\eb9c"}.ri-cloud-line:before{content:"\\eb9d"}.ri-cloud-off-fill:before{content:"\\eb9e"}.ri-cloud-off-line:before{content:"\\eb9f"}.ri-cloud-windy-fill:before{content:"\\eba0"}.ri-cloud-windy-line:before{content:"\\eba1"}.ri-cloudy-2-fill:before{content:"\\eba2"}.ri-cloudy-2-line:before{content:"\\eba3"}.ri-cloudy-fill:before{content:"\\eba4"}.ri-cloudy-line:before{content:"\\eba5"}.ri-code-box-fill:before{content:"\\eba6"}.ri-code-box-line:before{content:"\\eba7"}.ri-code-fill:before{content:"\\eba8"}.ri-code-line:before{content:"\\eba9"}.ri-code-s-fill:before{content:"\\ebaa"}.ri-code-s-line:before{content:"\\ebab"}.ri-code-s-slash-fill:before{content:"\\ebac"}.ri-code-s-slash-line:before{content:"\\ebad"}.ri-code-view:before{content:"\\ebae"}.ri-codepen-fill:before{content:"\\ebaf"}.ri-codepen-line:before{content:"\\ebb0"}.ri-coin-fill:before{content:"\\ebb1"}.ri-coin-line:before{content:"\\ebb2"}.ri-coins-fill:before{content:"\\ebb3"}.ri-coins-line:before{content:"\\ebb4"}.ri-collage-fill:before{content:"\\ebb5"}.ri-collage-line:before{content:"\\ebb6"}.ri-command-fill:before{content:"\\ebb7"}.ri-command-line:before{content:"\\ebb8"}.ri-community-fill:before{content:"\\ebb9"}.ri-community-line:before{content:"\\ebba"}.ri-compass-2-fill:before{content:"\\ebbb"}.ri-compass-2-line:before{content:"\\ebbc"}.ri-compass-3-fill:before{content:"\\ebbd"}.ri-compass-3-line:before{content:"\\ebbe"}.ri-compass-4-fill:before{content:"\\ebbf"}.ri-compass-4-line:before{content:"\\ebc0"}.ri-compass-discover-fill:before{content:"\\ebc1"}.ri-compass-discover-line:before{content:"\\ebc2"}.ri-compass-fill:before{content:"\\ebc3"}.ri-compass-line:before{content:"\\ebc4"}.ri-compasses-2-fill:before{content:"\\ebc5"}.ri-compasses-2-line:before{content:"\\ebc6"}.ri-compasses-fill:before{content:"\\ebc7"}.ri-compasses-line:before{content:"\\ebc8"}.ri-computer-fill:before{content:"\\ebc9"}.ri-computer-line:before{content:"\\ebca"}.ri-contacts-book-2-fill:before{content:"\\ebcb"}.ri-contacts-book-2-line:before{content:"\\ebcc"}.ri-contacts-book-fill:before{content:"\\ebcd"}.ri-contacts-book-line:before{content:"\\ebce"}.ri-contacts-book-upload-fill:before{content:"\\ebcf"}.ri-contacts-book-upload-line:before{content:"\\ebd0"}.ri-contacts-fill:before{content:"\\ebd1"}.ri-contacts-line:before{content:"\\ebd2"}.ri-contrast-2-fill:before{content:"\\ebd3"}.ri-contrast-2-line:before{content:"\\ebd4"}.ri-contrast-drop-2-fill:before{content:"\\ebd5"}.ri-contrast-drop-2-line:before{content:"\\ebd6"}.ri-contrast-drop-fill:before{content:"\\ebd7"}.ri-contrast-drop-line:before{content:"\\ebd8"}.ri-contrast-fill:before{content:"\\ebd9"}.ri-contrast-line:before{content:"\\ebda"}.ri-copper-coin-fill:before{content:"\\ebdb"}.ri-copper-coin-line:before{content:"\\ebdc"}.ri-copper-diamond-fill:before{content:"\\ebdd"}.ri-copper-diamond-line:before{content:"\\ebde"}.ri-copyleft-fill:before{content:"\\ebdf"}.ri-copyleft-line:before{content:"\\ebe0"}.ri-copyright-fill:before{content:"\\ebe1"}.ri-copyright-line:before{content:"\\ebe2"}.ri-coreos-fill:before{content:"\\ebe3"}.ri-coreos-line:before{content:"\\ebe4"}.ri-coupon-2-fill:before{content:"\\ebe5"}.ri-coupon-2-line:before{content:"\\ebe6"}.ri-coupon-3-fill:before{content:"\\ebe7"}.ri-coupon-3-line:before{content:"\\ebe8"}.ri-coupon-4-fill:before{content:"\\ebe9"}.ri-coupon-4-line:before{content:"\\ebea"}.ri-coupon-5-fill:before{content:"\\ebeb"}.ri-coupon-5-line:before{content:"\\ebec"}.ri-coupon-fill:before{content:"\\ebed"}.ri-coupon-line:before{content:"\\ebee"}.ri-cpu-fill:before{content:"\\ebef"}.ri-cpu-line:before{content:"\\ebf0"}.ri-creative-commons-by-fill:before{content:"\\ebf1"}.ri-creative-commons-by-line:before{content:"\\ebf2"}.ri-creative-commons-fill:before{content:"\\ebf3"}.ri-creative-commons-line:before{content:"\\ebf4"}.ri-creative-commons-nc-fill:before{content:"\\ebf5"}.ri-creative-commons-nc-line:before{content:"\\ebf6"}.ri-creative-commons-nd-fill:before{content:"\\ebf7"}.ri-creative-commons-nd-line:before{content:"\\ebf8"}.ri-creative-commons-sa-fill:before{content:"\\ebf9"}.ri-creative-commons-sa-line:before{content:"\\ebfa"}.ri-creative-commons-zero-fill:before{content:"\\ebfb"}.ri-creative-commons-zero-line:before{content:"\\ebfc"}.ri-criminal-fill:before{content:"\\ebfd"}.ri-criminal-line:before{content:"\\ebfe"}.ri-crop-2-fill:before{content:"\\ebff"}.ri-crop-2-line:before{content:"\\ec00"}.ri-crop-fill:before{content:"\\ec01"}.ri-crop-line:before{content:"\\ec02"}.ri-css3-fill:before{content:"\\ec03"}.ri-css3-line:before{content:"\\ec04"}.ri-cup-fill:before{content:"\\ec05"}.ri-cup-line:before{content:"\\ec06"}.ri-currency-fill:before{content:"\\ec07"}.ri-currency-line:before{content:"\\ec08"}.ri-cursor-fill:before{content:"\\ec09"}.ri-cursor-line:before{content:"\\ec0a"}.ri-customer-service-2-fill:before{content:"\\ec0b"}.ri-customer-service-2-line:before{content:"\\ec0c"}.ri-customer-service-fill:before{content:"\\ec0d"}.ri-customer-service-line:before{content:"\\ec0e"}.ri-dashboard-2-fill:before{content:"\\ec0f"}.ri-dashboard-2-line:before{content:"\\ec10"}.ri-dashboard-3-fill:before{content:"\\ec11"}.ri-dashboard-3-line:before{content:"\\ec12"}.ri-dashboard-fill:before{content:"\\ec13"}.ri-dashboard-line:before{content:"\\ec14"}.ri-database-2-fill:before{content:"\\ec15"}.ri-database-2-line:before{content:"\\ec16"}.ri-database-fill:before{content:"\\ec17"}.ri-database-line:before{content:"\\ec18"}.ri-delete-back-2-fill:before{content:"\\ec19"}.ri-delete-back-2-line:before{content:"\\ec1a"}.ri-delete-back-fill:before{content:"\\ec1b"}.ri-delete-back-line:before{content:"\\ec1c"}.ri-delete-bin-2-fill:before{content:"\\ec1d"}.ri-delete-bin-2-line:before{content:"\\ec1e"}.ri-delete-bin-3-fill:before{content:"\\ec1f"}.ri-delete-bin-3-line:before{content:"\\ec20"}.ri-delete-bin-4-fill:before{content:"\\ec21"}.ri-delete-bin-4-line:before{content:"\\ec22"}.ri-delete-bin-5-fill:before{content:"\\ec23"}.ri-delete-bin-5-line:before{content:"\\ec24"}.ri-delete-bin-6-fill:before{content:"\\ec25"}.ri-delete-bin-6-line:before{content:"\\ec26"}.ri-delete-bin-7-fill:before{content:"\\ec27"}.ri-delete-bin-7-line:before{content:"\\ec28"}.ri-delete-bin-fill:before{content:"\\ec29"}.ri-delete-bin-line:before{content:"\\ec2a"}.ri-delete-column:before{content:"\\ec2b"}.ri-delete-row:before{content:"\\ec2c"}.ri-device-fill:before{content:"\\ec2d"}.ri-device-line:before{content:"\\ec2e"}.ri-device-recover-fill:before{content:"\\ec2f"}.ri-device-recover-line:before{content:"\\ec30"}.ri-dingding-fill:before{content:"\\ec31"}.ri-dingding-line:before{content:"\\ec32"}.ri-direction-fill:before{content:"\\ec33"}.ri-direction-line:before{content:"\\ec34"}.ri-disc-fill:before{content:"\\ec35"}.ri-disc-line:before{content:"\\ec36"}.ri-discord-fill:before{content:"\\ec37"}.ri-discord-line:before{content:"\\ec38"}.ri-discuss-fill:before{content:"\\ec39"}.ri-discuss-line:before{content:"\\ec3a"}.ri-dislike-fill:before{content:"\\ec3b"}.ri-dislike-line:before{content:"\\ec3c"}.ri-disqus-fill:before{content:"\\ec3d"}.ri-disqus-line:before{content:"\\ec3e"}.ri-divide-fill:before{content:"\\ec3f"}.ri-divide-line:before{content:"\\ec40"}.ri-donut-chart-fill:before{content:"\\ec41"}.ri-donut-chart-line:before{content:"\\ec42"}.ri-door-closed-fill:before{content:"\\ec43"}.ri-door-closed-line:before{content:"\\ec44"}.ri-door-fill:before{content:"\\ec45"}.ri-door-line:before{content:"\\ec46"}.ri-door-lock-box-fill:before{content:"\\ec47"}.ri-door-lock-box-line:before{content:"\\ec48"}.ri-door-lock-fill:before{content:"\\ec49"}.ri-door-lock-line:before{content:"\\ec4a"}.ri-door-open-fill:before{content:"\\ec4b"}.ri-door-open-line:before{content:"\\ec4c"}.ri-dossier-fill:before{content:"\\ec4d"}.ri-dossier-line:before{content:"\\ec4e"}.ri-douban-fill:before{content:"\\ec4f"}.ri-douban-line:before{content:"\\ec50"}.ri-double-quotes-l:before{content:"\\ec51"}.ri-double-quotes-r:before{content:"\\ec52"}.ri-download-2-fill:before{content:"\\ec53"}.ri-download-2-line:before{content:"\\ec54"}.ri-download-cloud-2-fill:before{content:"\\ec55"}.ri-download-cloud-2-line:before{content:"\\ec56"}.ri-download-cloud-fill:before{content:"\\ec57"}.ri-download-cloud-line:before{content:"\\ec58"}.ri-download-fill:before{content:"\\ec59"}.ri-download-line:before{content:"\\ec5a"}.ri-draft-fill:before{content:"\\ec5b"}.ri-draft-line:before{content:"\\ec5c"}.ri-drag-drop-fill:before{content:"\\ec5d"}.ri-drag-drop-line:before{content:"\\ec5e"}.ri-drag-move-2-fill:before{content:"\\ec5f"}.ri-drag-move-2-line:before{content:"\\ec60"}.ri-drag-move-fill:before{content:"\\ec61"}.ri-drag-move-line:before{content:"\\ec62"}.ri-dribbble-fill:before{content:"\\ec63"}.ri-dribbble-line:before{content:"\\ec64"}.ri-drive-fill:before{content:"\\ec65"}.ri-drive-line:before{content:"\\ec66"}.ri-drizzle-fill:before{content:"\\ec67"}.ri-drizzle-line:before{content:"\\ec68"}.ri-drop-fill:before{content:"\\ec69"}.ri-drop-line:before{content:"\\ec6a"}.ri-dropbox-fill:before{content:"\\ec6b"}.ri-dropbox-line:before{content:"\\ec6c"}.ri-dual-sim-1-fill:before{content:"\\ec6d"}.ri-dual-sim-1-line:before{content:"\\ec6e"}.ri-dual-sim-2-fill:before{content:"\\ec6f"}.ri-dual-sim-2-line:before{content:"\\ec70"}.ri-dv-fill:before{content:"\\ec71"}.ri-dv-line:before{content:"\\ec72"}.ri-dvd-fill:before{content:"\\ec73"}.ri-dvd-line:before{content:"\\ec74"}.ri-e-bike-2-fill:before{content:"\\ec75"}.ri-e-bike-2-line:before{content:"\\ec76"}.ri-e-bike-fill:before{content:"\\ec77"}.ri-e-bike-line:before{content:"\\ec78"}.ri-earth-fill:before{content:"\\ec79"}.ri-earth-line:before{content:"\\ec7a"}.ri-earthquake-fill:before{content:"\\ec7b"}.ri-earthquake-line:before{content:"\\ec7c"}.ri-edge-fill:before{content:"\\ec7d"}.ri-edge-line:before{content:"\\ec7e"}.ri-edit-2-fill:before{content:"\\ec7f"}.ri-edit-2-line:before{content:"\\ec80"}.ri-edit-box-fill:before{content:"\\ec81"}.ri-edit-box-line:before{content:"\\ec82"}.ri-edit-circle-fill:before{content:"\\ec83"}.ri-edit-circle-line:before{content:"\\ec84"}.ri-edit-fill:before{content:"\\ec85"}.ri-edit-line:before{content:"\\ec86"}.ri-eject-fill:before{content:"\\ec87"}.ri-eject-line:before{content:"\\ec88"}.ri-emotion-2-fill:before{content:"\\ec89"}.ri-emotion-2-line:before{content:"\\ec8a"}.ri-emotion-fill:before{content:"\\ec8b"}.ri-emotion-happy-fill:before{content:"\\ec8c"}.ri-emotion-happy-line:before{content:"\\ec8d"}.ri-emotion-laugh-fill:before{content:"\\ec8e"}.ri-emotion-laugh-line:before{content:"\\ec8f"}.ri-emotion-line:before{content:"\\ec90"}.ri-emotion-normal-fill:before{content:"\\ec91"}.ri-emotion-normal-line:before{content:"\\ec92"}.ri-emotion-sad-fill:before{content:"\\ec93"}.ri-emotion-sad-line:before{content:"\\ec94"}.ri-emotion-unhappy-fill:before{content:"\\ec95"}.ri-emotion-unhappy-line:before{content:"\\ec96"}.ri-empathize-fill:before{content:"\\ec97"}.ri-empathize-line:before{content:"\\ec98"}.ri-emphasis-cn:before{content:"\\ec99"}.ri-emphasis:before{content:"\\ec9a"}.ri-english-input:before{content:"\\ec9b"}.ri-equalizer-fill:before{content:"\\ec9c"}.ri-equalizer-line:before{content:"\\ec9d"}.ri-eraser-fill:before{content:"\\ec9e"}.ri-eraser-line:before{content:"\\ec9f"}.ri-error-warning-fill:before{content:"\\eca0"}.ri-error-warning-line:before{content:"\\eca1"}.ri-evernote-fill:before{content:"\\eca2"}.ri-evernote-line:before{content:"\\eca3"}.ri-exchange-box-fill:before{content:"\\eca4"}.ri-exchange-box-line:before{content:"\\eca5"}.ri-exchange-cny-fill:before{content:"\\eca6"}.ri-exchange-cny-line:before{content:"\\eca7"}.ri-exchange-dollar-fill:before{content:"\\eca8"}.ri-exchange-dollar-line:before{content:"\\eca9"}.ri-exchange-fill:before{content:"\\ecaa"}.ri-exchange-funds-fill:before{content:"\\ecab"}.ri-exchange-funds-line:before{content:"\\ecac"}.ri-exchange-line:before{content:"\\ecad"}.ri-external-link-fill:before{content:"\\ecae"}.ri-external-link-line:before{content:"\\ecaf"}.ri-eye-2-fill:before{content:"\\ecb0"}.ri-eye-2-line:before{content:"\\ecb1"}.ri-eye-close-fill:before{content:"\\ecb2"}.ri-eye-close-line:before{content:"\\ecb3"}.ri-eye-fill:before{content:"\\ecb4"}.ri-eye-line:before{content:"\\ecb5"}.ri-eye-off-fill:before{content:"\\ecb6"}.ri-eye-off-line:before{content:"\\ecb7"}.ri-facebook-box-fill:before{content:"\\ecb8"}.ri-facebook-box-line:before{content:"\\ecb9"}.ri-facebook-circle-fill:before{content:"\\ecba"}.ri-facebook-circle-line:before{content:"\\ecbb"}.ri-facebook-fill:before{content:"\\ecbc"}.ri-facebook-line:before{content:"\\ecbd"}.ri-fahrenheit-fill:before{content:"\\ecbe"}.ri-fahrenheit-line:before{content:"\\ecbf"}.ri-feedback-fill:before{content:"\\ecc0"}.ri-feedback-line:before{content:"\\ecc1"}.ri-file-2-fill:before{content:"\\ecc2"}.ri-file-2-line:before{content:"\\ecc3"}.ri-file-3-fill:before{content:"\\ecc4"}.ri-file-3-line:before{content:"\\ecc5"}.ri-file-4-fill:before{content:"\\ecc6"}.ri-file-4-line:before{content:"\\ecc7"}.ri-file-add-fill:before{content:"\\ecc8"}.ri-file-add-line:before{content:"\\ecc9"}.ri-file-chart-2-fill:before{content:"\\ecca"}.ri-file-chart-2-line:before{content:"\\eccb"}.ri-file-chart-fill:before{content:"\\eccc"}.ri-file-chart-line:before{content:"\\eccd"}.ri-file-cloud-fill:before{content:"\\ecce"}.ri-file-cloud-line:before{content:"\\eccf"}.ri-file-code-fill:before{content:"\\ecd0"}.ri-file-code-line:before{content:"\\ecd1"}.ri-file-copy-2-fill:before{content:"\\ecd2"}.ri-file-copy-2-line:before{content:"\\ecd3"}.ri-file-copy-fill:before{content:"\\ecd4"}.ri-file-copy-line:before{content:"\\ecd5"}.ri-file-damage-fill:before{content:"\\ecd6"}.ri-file-damage-line:before{content:"\\ecd7"}.ri-file-download-fill:before{content:"\\ecd8"}.ri-file-download-line:before{content:"\\ecd9"}.ri-file-edit-fill:before{content:"\\ecda"}.ri-file-edit-line:before{content:"\\ecdb"}.ri-file-excel-2-fill:before{content:"\\ecdc"}.ri-file-excel-2-line:before{content:"\\ecdd"}.ri-file-excel-fill:before{content:"\\ecde"}.ri-file-excel-line:before{content:"\\ecdf"}.ri-file-fill:before{content:"\\ece0"}.ri-file-forbid-fill:before{content:"\\ece1"}.ri-file-forbid-line:before{content:"\\ece2"}.ri-file-gif-fill:before{content:"\\ece3"}.ri-file-gif-line:before{content:"\\ece4"}.ri-file-history-fill:before{content:"\\ece5"}.ri-file-history-line:before{content:"\\ece6"}.ri-file-hwp-fill:before{content:"\\ece7"}.ri-file-hwp-line:before{content:"\\ece8"}.ri-file-info-fill:before{content:"\\ece9"}.ri-file-info-line:before{content:"\\ecea"}.ri-file-line:before{content:"\\eceb"}.ri-file-list-2-fill:before{content:"\\ecec"}.ri-file-list-2-line:before{content:"\\eced"}.ri-file-list-3-fill:before{content:"\\ecee"}.ri-file-list-3-line:before{content:"\\ecef"}.ri-file-list-fill:before{content:"\\ecf0"}.ri-file-list-line:before{content:"\\ecf1"}.ri-file-lock-fill:before{content:"\\ecf2"}.ri-file-lock-line:before{content:"\\ecf3"}.ri-file-marked-fill:before{content:"\\ecf4"}.ri-file-marked-line:before{content:"\\ecf5"}.ri-file-music-fill:before{content:"\\ecf6"}.ri-file-music-line:before{content:"\\ecf7"}.ri-file-paper-2-fill:before{content:"\\ecf8"}.ri-file-paper-2-line:before{content:"\\ecf9"}.ri-file-paper-fill:before{content:"\\ecfa"}.ri-file-paper-line:before{content:"\\ecfb"}.ri-file-pdf-fill:before{content:"\\ecfc"}.ri-file-pdf-line:before{content:"\\ecfd"}.ri-file-ppt-2-fill:before{content:"\\ecfe"}.ri-file-ppt-2-line:before{content:"\\ecff"}.ri-file-ppt-fill:before{content:"\\ed00"}.ri-file-ppt-line:before{content:"\\ed01"}.ri-file-reduce-fill:before{content:"\\ed02"}.ri-file-reduce-line:before{content:"\\ed03"}.ri-file-search-fill:before{content:"\\ed04"}.ri-file-search-line:before{content:"\\ed05"}.ri-file-settings-fill:before{content:"\\ed06"}.ri-file-settings-line:before{content:"\\ed07"}.ri-file-shield-2-fill:before{content:"\\ed08"}.ri-file-shield-2-line:before{content:"\\ed09"}.ri-file-shield-fill:before{content:"\\ed0a"}.ri-file-shield-line:before{content:"\\ed0b"}.ri-file-shred-fill:before{content:"\\ed0c"}.ri-file-shred-line:before{content:"\\ed0d"}.ri-file-text-fill:before{content:"\\ed0e"}.ri-file-text-line:before{content:"\\ed0f"}.ri-file-transfer-fill:before{content:"\\ed10"}.ri-file-transfer-line:before{content:"\\ed11"}.ri-file-unknow-fill:before{content:"\\ed12"}.ri-file-unknow-line:before{content:"\\ed13"}.ri-file-upload-fill:before{content:"\\ed14"}.ri-file-upload-line:before{content:"\\ed15"}.ri-file-user-fill:before{content:"\\ed16"}.ri-file-user-line:before{content:"\\ed17"}.ri-file-warning-fill:before{content:"\\ed18"}.ri-file-warning-line:before{content:"\\ed19"}.ri-file-word-2-fill:before{content:"\\ed1a"}.ri-file-word-2-line:before{content:"\\ed1b"}.ri-file-word-fill:before{content:"\\ed1c"}.ri-file-word-line:before{content:"\\ed1d"}.ri-file-zip-fill:before{content:"\\ed1e"}.ri-file-zip-line:before{content:"\\ed1f"}.ri-film-fill:before{content:"\\ed20"}.ri-film-line:before{content:"\\ed21"}.ri-filter-2-fill:before{content:"\\ed22"}.ri-filter-2-line:before{content:"\\ed23"}.ri-filter-3-fill:before{content:"\\ed24"}.ri-filter-3-line:before{content:"\\ed25"}.ri-filter-fill:before{content:"\\ed26"}.ri-filter-line:before{content:"\\ed27"}.ri-filter-off-fill:before{content:"\\ed28"}.ri-filter-off-line:before{content:"\\ed29"}.ri-find-replace-fill:before{content:"\\ed2a"}.ri-find-replace-line:before{content:"\\ed2b"}.ri-finder-fill:before{content:"\\ed2c"}.ri-finder-line:before{content:"\\ed2d"}.ri-fingerprint-2-fill:before{content:"\\ed2e"}.ri-fingerprint-2-line:before{content:"\\ed2f"}.ri-fingerprint-fill:before{content:"\\ed30"}.ri-fingerprint-line:before{content:"\\ed31"}.ri-fire-fill:before{content:"\\ed32"}.ri-fire-line:before{content:"\\ed33"}.ri-firefox-fill:before{content:"\\ed34"}.ri-firefox-line:before{content:"\\ed35"}.ri-first-aid-kit-fill:before{content:"\\ed36"}.ri-first-aid-kit-line:before{content:"\\ed37"}.ri-flag-2-fill:before{content:"\\ed38"}.ri-flag-2-line:before{content:"\\ed39"}.ri-flag-fill:before{content:"\\ed3a"}.ri-flag-line:before{content:"\\ed3b"}.ri-flashlight-fill:before{content:"\\ed3c"}.ri-flashlight-line:before{content:"\\ed3d"}.ri-flask-fill:before{content:"\\ed3e"}.ri-flask-line:before{content:"\\ed3f"}.ri-flight-land-fill:before{content:"\\ed40"}.ri-flight-land-line:before{content:"\\ed41"}.ri-flight-takeoff-fill:before{content:"\\ed42"}.ri-flight-takeoff-line:before{content:"\\ed43"}.ri-flood-fill:before{content:"\\ed44"}.ri-flood-line:before{content:"\\ed45"}.ri-flow-chart:before{content:"\\ed46"}.ri-flutter-fill:before{content:"\\ed47"}.ri-flutter-line:before{content:"\\ed48"}.ri-focus-2-fill:before{content:"\\ed49"}.ri-focus-2-line:before{content:"\\ed4a"}.ri-focus-3-fill:before{content:"\\ed4b"}.ri-focus-3-line:before{content:"\\ed4c"}.ri-focus-fill:before{content:"\\ed4d"}.ri-focus-line:before{content:"\\ed4e"}.ri-foggy-fill:before{content:"\\ed4f"}.ri-foggy-line:before{content:"\\ed50"}.ri-folder-2-fill:before{content:"\\ed51"}.ri-folder-2-line:before{content:"\\ed52"}.ri-folder-3-fill:before{content:"\\ed53"}.ri-folder-3-line:before{content:"\\ed54"}.ri-folder-4-fill:before{content:"\\ed55"}.ri-folder-4-line:before{content:"\\ed56"}.ri-folder-5-fill:before{content:"\\ed57"}.ri-folder-5-line:before{content:"\\ed58"}.ri-folder-add-fill:before{content:"\\ed59"}.ri-folder-add-line:before{content:"\\ed5a"}.ri-folder-chart-2-fill:before{content:"\\ed5b"}.ri-folder-chart-2-line:before{content:"\\ed5c"}.ri-folder-chart-fill:before{content:"\\ed5d"}.ri-folder-chart-line:before{content:"\\ed5e"}.ri-folder-download-fill:before{content:"\\ed5f"}.ri-folder-download-line:before{content:"\\ed60"}.ri-folder-fill:before{content:"\\ed61"}.ri-folder-forbid-fill:before{content:"\\ed62"}.ri-folder-forbid-line:before{content:"\\ed63"}.ri-folder-history-fill:before{content:"\\ed64"}.ri-folder-history-line:before{content:"\\ed65"}.ri-folder-info-fill:before{content:"\\ed66"}.ri-folder-info-line:before{content:"\\ed67"}.ri-folder-keyhole-fill:before{content:"\\ed68"}.ri-folder-keyhole-line:before{content:"\\ed69"}.ri-folder-line:before{content:"\\ed6a"}.ri-folder-lock-fill:before{content:"\\ed6b"}.ri-folder-lock-line:before{content:"\\ed6c"}.ri-folder-music-fill:before{content:"\\ed6d"}.ri-folder-music-line:before{content:"\\ed6e"}.ri-folder-open-fill:before{content:"\\ed6f"}.ri-folder-open-line:before{content:"\\ed70"}.ri-folder-received-fill:before{content:"\\ed71"}.ri-folder-received-line:before{content:"\\ed72"}.ri-folder-reduce-fill:before{content:"\\ed73"}.ri-folder-reduce-line:before{content:"\\ed74"}.ri-folder-settings-fill:before{content:"\\ed75"}.ri-folder-settings-line:before{content:"\\ed76"}.ri-folder-shared-fill:before{content:"\\ed77"}.ri-folder-shared-line:before{content:"\\ed78"}.ri-folder-shield-2-fill:before{content:"\\ed79"}.ri-folder-shield-2-line:before{content:"\\ed7a"}.ri-folder-shield-fill:before{content:"\\ed7b"}.ri-folder-shield-line:before{content:"\\ed7c"}.ri-folder-transfer-fill:before{content:"\\ed7d"}.ri-folder-transfer-line:before{content:"\\ed7e"}.ri-folder-unknow-fill:before{content:"\\ed7f"}.ri-folder-unknow-line:before{content:"\\ed80"}.ri-folder-upload-fill:before{content:"\\ed81"}.ri-folder-upload-line:before{content:"\\ed82"}.ri-folder-user-fill:before{content:"\\ed83"}.ri-folder-user-line:before{content:"\\ed84"}.ri-folder-warning-fill:before{content:"\\ed85"}.ri-folder-warning-line:before{content:"\\ed86"}.ri-folder-zip-fill:before{content:"\\ed87"}.ri-folder-zip-line:before{content:"\\ed88"}.ri-folders-fill:before{content:"\\ed89"}.ri-folders-line:before{content:"\\ed8a"}.ri-font-color:before{content:"\\ed8b"}.ri-font-size-2:before{content:"\\ed8c"}.ri-font-size:before{content:"\\ed8d"}.ri-football-fill:before{content:"\\ed8e"}.ri-football-line:before{content:"\\ed8f"}.ri-footprint-fill:before{content:"\\ed90"}.ri-footprint-line:before{content:"\\ed91"}.ri-forbid-2-fill:before{content:"\\ed92"}.ri-forbid-2-line:before{content:"\\ed93"}.ri-forbid-fill:before{content:"\\ed94"}.ri-forbid-line:before{content:"\\ed95"}.ri-format-clear:before{content:"\\ed96"}.ri-fridge-fill:before{content:"\\ed97"}.ri-fridge-line:before{content:"\\ed98"}.ri-fullscreen-exit-fill:before{content:"\\ed99"}.ri-fullscreen-exit-line:before{content:"\\ed9a"}.ri-fullscreen-fill:before{content:"\\ed9b"}.ri-fullscreen-line:before{content:"\\ed9c"}.ri-function-fill:before{content:"\\ed9d"}.ri-function-line:before{content:"\\ed9e"}.ri-functions:before{content:"\\ed9f"}.ri-funds-box-fill:before{content:"\\eda0"}.ri-funds-box-line:before{content:"\\eda1"}.ri-funds-fill:before{content:"\\eda2"}.ri-funds-line:before{content:"\\eda3"}.ri-gallery-fill:before{content:"\\eda4"}.ri-gallery-line:before{content:"\\eda5"}.ri-gallery-upload-fill:before{content:"\\eda6"}.ri-gallery-upload-line:before{content:"\\eda7"}.ri-game-fill:before{content:"\\eda8"}.ri-game-line:before{content:"\\eda9"}.ri-gamepad-fill:before{content:"\\edaa"}.ri-gamepad-line:before{content:"\\edab"}.ri-gas-station-fill:before{content:"\\edac"}.ri-gas-station-line:before{content:"\\edad"}.ri-gatsby-fill:before{content:"\\edae"}.ri-gatsby-line:before{content:"\\edaf"}.ri-genderless-fill:before{content:"\\edb0"}.ri-genderless-line:before{content:"\\edb1"}.ri-ghost-2-fill:before{content:"\\edb2"}.ri-ghost-2-line:before{content:"\\edb3"}.ri-ghost-fill:before{content:"\\edb4"}.ri-ghost-line:before{content:"\\edb5"}.ri-ghost-smile-fill:before{content:"\\edb6"}.ri-ghost-smile-line:before{content:"\\edb7"}.ri-gift-2-fill:before{content:"\\edb8"}.ri-gift-2-line:before{content:"\\edb9"}.ri-gift-fill:before{content:"\\edba"}.ri-gift-line:before{content:"\\edbb"}.ri-git-branch-fill:before{content:"\\edbc"}.ri-git-branch-line:before{content:"\\edbd"}.ri-git-commit-fill:before{content:"\\edbe"}.ri-git-commit-line:before{content:"\\edbf"}.ri-git-merge-fill:before{content:"\\edc0"}.ri-git-merge-line:before{content:"\\edc1"}.ri-git-pull-request-fill:before{content:"\\edc2"}.ri-git-pull-request-line:before{content:"\\edc3"}.ri-git-repository-commits-fill:before{content:"\\edc4"}.ri-git-repository-commits-line:before{content:"\\edc5"}.ri-git-repository-fill:before{content:"\\edc6"}.ri-git-repository-line:before{content:"\\edc7"}.ri-git-repository-private-fill:before{content:"\\edc8"}.ri-git-repository-private-line:before{content:"\\edc9"}.ri-github-fill:before{content:"\\edca"}.ri-github-line:before{content:"\\edcb"}.ri-gitlab-fill:before{content:"\\edcc"}.ri-gitlab-line:before{content:"\\edcd"}.ri-global-fill:before{content:"\\edce"}.ri-global-line:before{content:"\\edcf"}.ri-globe-fill:before{content:"\\edd0"}.ri-globe-line:before{content:"\\edd1"}.ri-goblet-fill:before{content:"\\edd2"}.ri-goblet-line:before{content:"\\edd3"}.ri-google-fill:before{content:"\\edd4"}.ri-google-line:before{content:"\\edd5"}.ri-google-play-fill:before{content:"\\edd6"}.ri-google-play-line:before{content:"\\edd7"}.ri-government-fill:before{content:"\\edd8"}.ri-government-line:before{content:"\\edd9"}.ri-gps-fill:before{content:"\\edda"}.ri-gps-line:before{content:"\\eddb"}.ri-gradienter-fill:before{content:"\\eddc"}.ri-gradienter-line:before{content:"\\eddd"}.ri-grid-fill:before{content:"\\edde"}.ri-grid-line:before{content:"\\eddf"}.ri-group-2-fill:before{content:"\\ede0"}.ri-group-2-line:before{content:"\\ede1"}.ri-group-fill:before{content:"\\ede2"}.ri-group-line:before{content:"\\ede3"}.ri-guide-fill:before{content:"\\ede4"}.ri-guide-line:before{content:"\\ede5"}.ri-h-1:before{content:"\\ede6"}.ri-h-2:before{content:"\\ede7"}.ri-h-3:before{content:"\\ede8"}.ri-h-4:before{content:"\\ede9"}.ri-h-5:before{content:"\\edea"}.ri-h-6:before{content:"\\edeb"}.ri-hail-fill:before{content:"\\edec"}.ri-hail-line:before{content:"\\eded"}.ri-hammer-fill:before{content:"\\edee"}.ri-hammer-line:before{content:"\\edef"}.ri-hand-coin-fill:before{content:"\\edf0"}.ri-hand-coin-line:before{content:"\\edf1"}.ri-hand-heart-fill:before{content:"\\edf2"}.ri-hand-heart-line:before{content:"\\edf3"}.ri-hand-sanitizer-fill:before{content:"\\edf4"}.ri-hand-sanitizer-line:before{content:"\\edf5"}.ri-handbag-fill:before{content:"\\edf6"}.ri-handbag-line:before{content:"\\edf7"}.ri-hard-drive-2-fill:before{content:"\\edf8"}.ri-hard-drive-2-line:before{content:"\\edf9"}.ri-hard-drive-fill:before{content:"\\edfa"}.ri-hard-drive-line:before{content:"\\edfb"}.ri-hashtag:before{content:"\\edfc"}.ri-haze-2-fill:before{content:"\\edfd"}.ri-haze-2-line:before{content:"\\edfe"}.ri-haze-fill:before{content:"\\edff"}.ri-haze-line:before{content:"\\ee00"}.ri-hd-fill:before{content:"\\ee01"}.ri-hd-line:before{content:"\\ee02"}.ri-heading:before{content:"\\ee03"}.ri-headphone-fill:before{content:"\\ee04"}.ri-headphone-line:before{content:"\\ee05"}.ri-health-book-fill:before{content:"\\ee06"}.ri-health-book-line:before{content:"\\ee07"}.ri-heart-2-fill:before{content:"\\ee08"}.ri-heart-2-line:before{content:"\\ee09"}.ri-heart-3-fill:before{content:"\\ee0a"}.ri-heart-3-line:before{content:"\\ee0b"}.ri-heart-add-fill:before{content:"\\ee0c"}.ri-heart-add-line:before{content:"\\ee0d"}.ri-heart-fill:before{content:"\\ee0e"}.ri-heart-line:before{content:"\\ee0f"}.ri-heart-pulse-fill:before{content:"\\ee10"}.ri-heart-pulse-line:before{content:"\\ee11"}.ri-hearts-fill:before{content:"\\ee12"}.ri-hearts-line:before{content:"\\ee13"}.ri-heavy-showers-fill:before{content:"\\ee14"}.ri-heavy-showers-line:before{content:"\\ee15"}.ri-history-fill:before{content:"\\ee16"}.ri-history-line:before{content:"\\ee17"}.ri-home-2-fill:before{content:"\\ee18"}.ri-home-2-line:before{content:"\\ee19"}.ri-home-3-fill:before{content:"\\ee1a"}.ri-home-3-line:before{content:"\\ee1b"}.ri-home-4-fill:before{content:"\\ee1c"}.ri-home-4-line:before{content:"\\ee1d"}.ri-home-5-fill:before{content:"\\ee1e"}.ri-home-5-line:before{content:"\\ee1f"}.ri-home-6-fill:before{content:"\\ee20"}.ri-home-6-line:before{content:"\\ee21"}.ri-home-7-fill:before{content:"\\ee22"}.ri-home-7-line:before{content:"\\ee23"}.ri-home-8-fill:before{content:"\\ee24"}.ri-home-8-line:before{content:"\\ee25"}.ri-home-fill:before{content:"\\ee26"}.ri-home-gear-fill:before{content:"\\ee27"}.ri-home-gear-line:before{content:"\\ee28"}.ri-home-heart-fill:before{content:"\\ee29"}.ri-home-heart-line:before{content:"\\ee2a"}.ri-home-line:before{content:"\\ee2b"}.ri-home-smile-2-fill:before{content:"\\ee2c"}.ri-home-smile-2-line:before{content:"\\ee2d"}.ri-home-smile-fill:before{content:"\\ee2e"}.ri-home-smile-line:before{content:"\\ee2f"}.ri-home-wifi-fill:before{content:"\\ee30"}.ri-home-wifi-line:before{content:"\\ee31"}.ri-honor-of-kings-fill:before{content:"\\ee32"}.ri-honor-of-kings-line:before{content:"\\ee33"}.ri-honour-fill:before{content:"\\ee34"}.ri-honour-line:before{content:"\\ee35"}.ri-hospital-fill:before{content:"\\ee36"}.ri-hospital-line:before{content:"\\ee37"}.ri-hotel-bed-fill:before{content:"\\ee38"}.ri-hotel-bed-line:before{content:"\\ee39"}.ri-hotel-fill:before{content:"\\ee3a"}.ri-hotel-line:before{content:"\\ee3b"}.ri-hotspot-fill:before{content:"\\ee3c"}.ri-hotspot-line:before{content:"\\ee3d"}.ri-hq-fill:before{content:"\\ee3e"}.ri-hq-line:before{content:"\\ee3f"}.ri-html5-fill:before{content:"\\ee40"}.ri-html5-line:before{content:"\\ee41"}.ri-ie-fill:before{content:"\\ee42"}.ri-ie-line:before{content:"\\ee43"}.ri-image-2-fill:before{content:"\\ee44"}.ri-image-2-line:before{content:"\\ee45"}.ri-image-add-fill:before{content:"\\ee46"}.ri-image-add-line:before{content:"\\ee47"}.ri-image-edit-fill:before{content:"\\ee48"}.ri-image-edit-line:before{content:"\\ee49"}.ri-image-fill:before{content:"\\ee4a"}.ri-image-line:before{content:"\\ee4b"}.ri-inbox-archive-fill:before{content:"\\ee4c"}.ri-inbox-archive-line:before{content:"\\ee4d"}.ri-inbox-fill:before{content:"\\ee4e"}.ri-inbox-line:before{content:"\\ee4f"}.ri-inbox-unarchive-fill:before{content:"\\ee50"}.ri-inbox-unarchive-line:before{content:"\\ee51"}.ri-increase-decrease-fill:before{content:"\\ee52"}.ri-increase-decrease-line:before{content:"\\ee53"}.ri-indent-decrease:before{content:"\\ee54"}.ri-indent-increase:before{content:"\\ee55"}.ri-indeterminate-circle-fill:before{content:"\\ee56"}.ri-indeterminate-circle-line:before{content:"\\ee57"}.ri-information-fill:before{content:"\\ee58"}.ri-information-line:before{content:"\\ee59"}.ri-infrared-thermometer-fill:before{content:"\\ee5a"}.ri-infrared-thermometer-line:before{content:"\\ee5b"}.ri-ink-bottle-fill:before{content:"\\ee5c"}.ri-ink-bottle-line:before{content:"\\ee5d"}.ri-input-cursor-move:before{content:"\\ee5e"}.ri-input-method-fill:before{content:"\\ee5f"}.ri-input-method-line:before{content:"\\ee60"}.ri-insert-column-left:before{content:"\\ee61"}.ri-insert-column-right:before{content:"\\ee62"}.ri-insert-row-bottom:before{content:"\\ee63"}.ri-insert-row-top:before{content:"\\ee64"}.ri-instagram-fill:before{content:"\\ee65"}.ri-instagram-line:before{content:"\\ee66"}.ri-install-fill:before{content:"\\ee67"}.ri-install-line:before{content:"\\ee68"}.ri-invision-fill:before{content:"\\ee69"}.ri-invision-line:before{content:"\\ee6a"}.ri-italic:before{content:"\\ee6b"}.ri-kakao-talk-fill:before{content:"\\ee6c"}.ri-kakao-talk-line:before{content:"\\ee6d"}.ri-key-2-fill:before{content:"\\ee6e"}.ri-key-2-line:before{content:"\\ee6f"}.ri-key-fill:before{content:"\\ee70"}.ri-key-line:before{content:"\\ee71"}.ri-keyboard-box-fill:before{content:"\\ee72"}.ri-keyboard-box-line:before{content:"\\ee73"}.ri-keyboard-fill:before{content:"\\ee74"}.ri-keyboard-line:before{content:"\\ee75"}.ri-keynote-fill:before{content:"\\ee76"}.ri-keynote-line:before{content:"\\ee77"}.ri-knife-blood-fill:before{content:"\\ee78"}.ri-knife-blood-line:before{content:"\\ee79"}.ri-knife-fill:before{content:"\\ee7a"}.ri-knife-line:before{content:"\\ee7b"}.ri-landscape-fill:before{content:"\\ee7c"}.ri-landscape-line:before{content:"\\ee7d"}.ri-layout-2-fill:before{content:"\\ee7e"}.ri-layout-2-line:before{content:"\\ee7f"}.ri-layout-3-fill:before{content:"\\ee80"}.ri-layout-3-line:before{content:"\\ee81"}.ri-layout-4-fill:before{content:"\\ee82"}.ri-layout-4-line:before{content:"\\ee83"}.ri-layout-5-fill:before{content:"\\ee84"}.ri-layout-5-line:before{content:"\\ee85"}.ri-layout-6-fill:before{content:"\\ee86"}.ri-layout-6-line:before{content:"\\ee87"}.ri-layout-bottom-2-fill:before{content:"\\ee88"}.ri-layout-bottom-2-line:before{content:"\\ee89"}.ri-layout-bottom-fill:before{content:"\\ee8a"}.ri-layout-bottom-line:before{content:"\\ee8b"}.ri-layout-column-fill:before{content:"\\ee8c"}.ri-layout-column-line:before{content:"\\ee8d"}.ri-layout-fill:before{content:"\\ee8e"}.ri-layout-grid-fill:before{content:"\\ee8f"}.ri-layout-grid-line:before{content:"\\ee90"}.ri-layout-left-2-fill:before{content:"\\ee91"}.ri-layout-left-2-line:before{content:"\\ee92"}.ri-layout-left-fill:before{content:"\\ee93"}.ri-layout-left-line:before{content:"\\ee94"}.ri-layout-line:before{content:"\\ee95"}.ri-layout-masonry-fill:before{content:"\\ee96"}.ri-layout-masonry-line:before{content:"\\ee97"}.ri-layout-right-2-fill:before{content:"\\ee98"}.ri-layout-right-2-line:before{content:"\\ee99"}.ri-layout-right-fill:before{content:"\\ee9a"}.ri-layout-right-line:before{content:"\\ee9b"}.ri-layout-row-fill:before{content:"\\ee9c"}.ri-layout-row-line:before{content:"\\ee9d"}.ri-layout-top-2-fill:before{content:"\\ee9e"}.ri-layout-top-2-line:before{content:"\\ee9f"}.ri-layout-top-fill:before{content:"\\eea0"}.ri-layout-top-line:before{content:"\\eea1"}.ri-leaf-fill:before{content:"\\eea2"}.ri-leaf-line:before{content:"\\eea3"}.ri-lifebuoy-fill:before{content:"\\eea4"}.ri-lifebuoy-line:before{content:"\\eea5"}.ri-lightbulb-fill:before{content:"\\eea6"}.ri-lightbulb-flash-fill:before{content:"\\eea7"}.ri-lightbulb-flash-line:before{content:"\\eea8"}.ri-lightbulb-line:before{content:"\\eea9"}.ri-line-chart-fill:before{content:"\\eeaa"}.ri-line-chart-line:before{content:"\\eeab"}.ri-line-fill:before{content:"\\eeac"}.ri-line-height:before{content:"\\eead"}.ri-line-line:before{content:"\\eeae"}.ri-link-m:before{content:"\\eeaf"}.ri-link-unlink-m:before{content:"\\eeb0"}.ri-link-unlink:before{content:"\\eeb1"}.ri-link:before{content:"\\eeb2"}.ri-linkedin-box-fill:before{content:"\\eeb3"}.ri-linkedin-box-line:before{content:"\\eeb4"}.ri-linkedin-fill:before{content:"\\eeb5"}.ri-linkedin-line:before{content:"\\eeb6"}.ri-links-fill:before{content:"\\eeb7"}.ri-links-line:before{content:"\\eeb8"}.ri-list-check-2:before{content:"\\eeb9"}.ri-list-check:before{content:"\\eeba"}.ri-list-ordered:before{content:"\\eebb"}.ri-list-settings-fill:before{content:"\\eebc"}.ri-list-settings-line:before{content:"\\eebd"}.ri-list-unordered:before{content:"\\eebe"}.ri-live-fill:before{content:"\\eebf"}.ri-live-line:before{content:"\\eec0"}.ri-loader-2-fill:before{content:"\\eec1"}.ri-loader-2-line:before{content:"\\eec2"}.ri-loader-3-fill:before{content:"\\eec3"}.ri-loader-3-line:before{content:"\\eec4"}.ri-loader-4-fill:before{content:"\\eec5"}.ri-loader-4-line:before{content:"\\eec6"}.ri-loader-5-fill:before{content:"\\eec7"}.ri-loader-5-line:before{content:"\\eec8"}.ri-loader-fill:before{content:"\\eec9"}.ri-loader-line:before{content:"\\eeca"}.ri-lock-2-fill:before{content:"\\eecb"}.ri-lock-2-line:before{content:"\\eecc"}.ri-lock-fill:before{content:"\\eecd"}.ri-lock-line:before{content:"\\eece"}.ri-lock-password-fill:before{content:"\\eecf"}.ri-lock-password-line:before{content:"\\eed0"}.ri-lock-unlock-fill:before{content:"\\eed1"}.ri-lock-unlock-line:before{content:"\\eed2"}.ri-login-box-fill:before{content:"\\eed3"}.ri-login-box-line:before{content:"\\eed4"}.ri-login-circle-fill:before{content:"\\eed5"}.ri-login-circle-line:before{content:"\\eed6"}.ri-logout-box-fill:before{content:"\\eed7"}.ri-logout-box-line:before{content:"\\eed8"}.ri-logout-box-r-fill:before{content:"\\eed9"}.ri-logout-box-r-line:before{content:"\\eeda"}.ri-logout-circle-fill:before{content:"\\eedb"}.ri-logout-circle-line:before{content:"\\eedc"}.ri-logout-circle-r-fill:before{content:"\\eedd"}.ri-logout-circle-r-line:before{content:"\\eede"}.ri-luggage-cart-fill:before{content:"\\eedf"}.ri-luggage-cart-line:before{content:"\\eee0"}.ri-luggage-deposit-fill:before{content:"\\eee1"}.ri-luggage-deposit-line:before{content:"\\eee2"}.ri-lungs-fill:before{content:"\\eee3"}.ri-lungs-line:before{content:"\\eee4"}.ri-mac-fill:before{content:"\\eee5"}.ri-mac-line:before{content:"\\eee6"}.ri-macbook-fill:before{content:"\\eee7"}.ri-macbook-line:before{content:"\\eee8"}.ri-magic-fill:before{content:"\\eee9"}.ri-magic-line:before{content:"\\eeea"}.ri-mail-add-fill:before{content:"\\eeeb"}.ri-mail-add-line:before{content:"\\eeec"}.ri-mail-check-fill:before{content:"\\eeed"}.ri-mail-check-line:before{content:"\\eeee"}.ri-mail-close-fill:before{content:"\\eeef"}.ri-mail-close-line:before{content:"\\eef0"}.ri-mail-download-fill:before{content:"\\eef1"}.ri-mail-download-line:before{content:"\\eef2"}.ri-mail-fill:before{content:"\\eef3"}.ri-mail-forbid-fill:before{content:"\\eef4"}.ri-mail-forbid-line:before{content:"\\eef5"}.ri-mail-line:before{content:"\\eef6"}.ri-mail-lock-fill:before{content:"\\eef7"}.ri-mail-lock-line:before{content:"\\eef8"}.ri-mail-open-fill:before{content:"\\eef9"}.ri-mail-open-line:before{content:"\\eefa"}.ri-mail-send-fill:before{content:"\\eefb"}.ri-mail-send-line:before{content:"\\eefc"}.ri-mail-settings-fill:before{content:"\\eefd"}.ri-mail-settings-line:before{content:"\\eefe"}.ri-mail-star-fill:before{content:"\\eeff"}.ri-mail-star-line:before{content:"\\ef00"}.ri-mail-unread-fill:before{content:"\\ef01"}.ri-mail-unread-line:before{content:"\\ef02"}.ri-mail-volume-fill:before{content:"\\ef03"}.ri-mail-volume-line:before{content:"\\ef04"}.ri-map-2-fill:before{content:"\\ef05"}.ri-map-2-line:before{content:"\\ef06"}.ri-map-fill:before{content:"\\ef07"}.ri-map-line:before{content:"\\ef08"}.ri-map-pin-2-fill:before{content:"\\ef09"}.ri-map-pin-2-line:before{content:"\\ef0a"}.ri-map-pin-3-fill:before{content:"\\ef0b"}.ri-map-pin-3-line:before{content:"\\ef0c"}.ri-map-pin-4-fill:before{content:"\\ef0d"}.ri-map-pin-4-line:before{content:"\\ef0e"}.ri-map-pin-5-fill:before{content:"\\ef0f"}.ri-map-pin-5-line:before{content:"\\ef10"}.ri-map-pin-add-fill:before{content:"\\ef11"}.ri-map-pin-add-line:before{content:"\\ef12"}.ri-map-pin-fill:before{content:"\\ef13"}.ri-map-pin-line:before{content:"\\ef14"}.ri-map-pin-range-fill:before{content:"\\ef15"}.ri-map-pin-range-line:before{content:"\\ef16"}.ri-map-pin-time-fill:before{content:"\\ef17"}.ri-map-pin-time-line:before{content:"\\ef18"}.ri-map-pin-user-fill:before{content:"\\ef19"}.ri-map-pin-user-line:before{content:"\\ef1a"}.ri-mark-pen-fill:before{content:"\\ef1b"}.ri-mark-pen-line:before{content:"\\ef1c"}.ri-markdown-fill:before{content:"\\ef1d"}.ri-markdown-line:before{content:"\\ef1e"}.ri-markup-fill:before{content:"\\ef1f"}.ri-markup-line:before{content:"\\ef20"}.ri-mastercard-fill:before{content:"\\ef21"}.ri-mastercard-line:before{content:"\\ef22"}.ri-mastodon-fill:before{content:"\\ef23"}.ri-mastodon-line:before{content:"\\ef24"}.ri-medal-2-fill:before{content:"\\ef25"}.ri-medal-2-line:before{content:"\\ef26"}.ri-medal-fill:before{content:"\\ef27"}.ri-medal-line:before{content:"\\ef28"}.ri-medicine-bottle-fill:before{content:"\\ef29"}.ri-medicine-bottle-line:before{content:"\\ef2a"}.ri-medium-fill:before{content:"\\ef2b"}.ri-medium-line:before{content:"\\ef2c"}.ri-men-fill:before{content:"\\ef2d"}.ri-men-line:before{content:"\\ef2e"}.ri-mental-health-fill:before{content:"\\ef2f"}.ri-mental-health-line:before{content:"\\ef30"}.ri-menu-2-fill:before{content:"\\ef31"}.ri-menu-2-line:before{content:"\\ef32"}.ri-menu-3-fill:before{content:"\\ef33"}.ri-menu-3-line:before{content:"\\ef34"}.ri-menu-4-fill:before{content:"\\ef35"}.ri-menu-4-line:before{content:"\\ef36"}.ri-menu-5-fill:before{content:"\\ef37"}.ri-menu-5-line:before{content:"\\ef38"}.ri-menu-add-fill:before{content:"\\ef39"}.ri-menu-add-line:before{content:"\\ef3a"}.ri-menu-fill:before{content:"\\ef3b"}.ri-menu-fold-fill:before{content:"\\ef3c"}.ri-menu-fold-line:before{content:"\\ef3d"}.ri-menu-line:before{content:"\\ef3e"}.ri-menu-unfold-fill:before{content:"\\ef3f"}.ri-menu-unfold-line:before{content:"\\ef40"}.ri-merge-cells-horizontal:before{content:"\\ef41"}.ri-merge-cells-vertical:before{content:"\\ef42"}.ri-message-2-fill:before{content:"\\ef43"}.ri-message-2-line:before{content:"\\ef44"}.ri-message-3-fill:before{content:"\\ef45"}.ri-message-3-line:before{content:"\\ef46"}.ri-message-fill:before{content:"\\ef47"}.ri-message-line:before{content:"\\ef48"}.ri-messenger-fill:before{content:"\\ef49"}.ri-messenger-line:before{content:"\\ef4a"}.ri-meteor-fill:before{content:"\\ef4b"}.ri-meteor-line:before{content:"\\ef4c"}.ri-mic-2-fill:before{content:"\\ef4d"}.ri-mic-2-line:before{content:"\\ef4e"}.ri-mic-fill:before{content:"\\ef4f"}.ri-mic-line:before{content:"\\ef50"}.ri-mic-off-fill:before{content:"\\ef51"}.ri-mic-off-line:before{content:"\\ef52"}.ri-mickey-fill:before{content:"\\ef53"}.ri-mickey-line:before{content:"\\ef54"}.ri-microscope-fill:before{content:"\\ef55"}.ri-microscope-line:before{content:"\\ef56"}.ri-microsoft-fill:before{content:"\\ef57"}.ri-microsoft-line:before{content:"\\ef58"}.ri-mind-map:before{content:"\\ef59"}.ri-mini-program-fill:before{content:"\\ef5a"}.ri-mini-program-line:before{content:"\\ef5b"}.ri-mist-fill:before{content:"\\ef5c"}.ri-mist-line:before{content:"\\ef5d"}.ri-money-cny-box-fill:before{content:"\\ef5e"}.ri-money-cny-box-line:before{content:"\\ef5f"}.ri-money-cny-circle-fill:before{content:"\\ef60"}.ri-money-cny-circle-line:before{content:"\\ef61"}.ri-money-dollar-box-fill:before{content:"\\ef62"}.ri-money-dollar-box-line:before{content:"\\ef63"}.ri-money-dollar-circle-fill:before{content:"\\ef64"}.ri-money-dollar-circle-line:before{content:"\\ef65"}.ri-money-euro-box-fill:before{content:"\\ef66"}.ri-money-euro-box-line:before{content:"\\ef67"}.ri-money-euro-circle-fill:before{content:"\\ef68"}.ri-money-euro-circle-line:before{content:"\\ef69"}.ri-money-pound-box-fill:before{content:"\\ef6a"}.ri-money-pound-box-line:before{content:"\\ef6b"}.ri-money-pound-circle-fill:before{content:"\\ef6c"}.ri-money-pound-circle-line:before{content:"\\ef6d"}.ri-moon-clear-fill:before{content:"\\ef6e"}.ri-moon-clear-line:before{content:"\\ef6f"}.ri-moon-cloudy-fill:before{content:"\\ef70"}.ri-moon-cloudy-line:before{content:"\\ef71"}.ri-moon-fill:before{content:"\\ef72"}.ri-moon-foggy-fill:before{content:"\\ef73"}.ri-moon-foggy-line:before{content:"\\ef74"}.ri-moon-line:before{content:"\\ef75"}.ri-more-2-fill:before{content:"\\ef76"}.ri-more-2-line:before{content:"\\ef77"}.ri-more-fill:before{content:"\\ef78"}.ri-more-line:before{content:"\\ef79"}.ri-motorbike-fill:before{content:"\\ef7a"}.ri-motorbike-line:before{content:"\\ef7b"}.ri-mouse-fill:before{content:"\\ef7c"}.ri-mouse-line:before{content:"\\ef7d"}.ri-movie-2-fill:before{content:"\\ef7e"}.ri-movie-2-line:before{content:"\\ef7f"}.ri-movie-fill:before{content:"\\ef80"}.ri-movie-line:before{content:"\\ef81"}.ri-music-2-fill:before{content:"\\ef82"}.ri-music-2-line:before{content:"\\ef83"}.ri-music-fill:before{content:"\\ef84"}.ri-music-line:before{content:"\\ef85"}.ri-mv-fill:before{content:"\\ef86"}.ri-mv-line:before{content:"\\ef87"}.ri-navigation-fill:before{content:"\\ef88"}.ri-navigation-line:before{content:"\\ef89"}.ri-netease-cloud-music-fill:before{content:"\\ef8a"}.ri-netease-cloud-music-line:before{content:"\\ef8b"}.ri-netflix-fill:before{content:"\\ef8c"}.ri-netflix-line:before{content:"\\ef8d"}.ri-newspaper-fill:before{content:"\\ef8e"}.ri-newspaper-line:before{content:"\\ef8f"}.ri-node-tree:before{content:"\\ef90"}.ri-notification-2-fill:before{content:"\\ef91"}.ri-notification-2-line:before{content:"\\ef92"}.ri-notification-3-fill:before{content:"\\ef93"}.ri-notification-3-line:before{content:"\\ef94"}.ri-notification-4-fill:before{content:"\\ef95"}.ri-notification-4-line:before{content:"\\ef96"}.ri-notification-badge-fill:before{content:"\\ef97"}.ri-notification-badge-line:before{content:"\\ef98"}.ri-notification-fill:before{content:"\\ef99"}.ri-notification-line:before{content:"\\ef9a"}.ri-notification-off-fill:before{content:"\\ef9b"}.ri-notification-off-line:before{content:"\\ef9c"}.ri-npmjs-fill:before{content:"\\ef9d"}.ri-npmjs-line:before{content:"\\ef9e"}.ri-number-0:before{content:"\\ef9f"}.ri-number-1:before{content:"\\efa0"}.ri-number-2:before{content:"\\efa1"}.ri-number-3:before{content:"\\efa2"}.ri-number-4:before{content:"\\efa3"}.ri-number-5:before{content:"\\efa4"}.ri-number-6:before{content:"\\efa5"}.ri-number-7:before{content:"\\efa6"}.ri-number-8:before{content:"\\efa7"}.ri-number-9:before{content:"\\efa8"}.ri-numbers-fill:before{content:"\\efa9"}.ri-numbers-line:before{content:"\\efaa"}.ri-nurse-fill:before{content:"\\efab"}.ri-nurse-line:before{content:"\\efac"}.ri-oil-fill:before{content:"\\efad"}.ri-oil-line:before{content:"\\efae"}.ri-omega:before{content:"\\efaf"}.ri-open-arm-fill:before{content:"\\efb0"}.ri-open-arm-line:before{content:"\\efb1"}.ri-open-source-fill:before{content:"\\efb2"}.ri-open-source-line:before{content:"\\efb3"}.ri-opera-fill:before{content:"\\efb4"}.ri-opera-line:before{content:"\\efb5"}.ri-order-play-fill:before{content:"\\efb6"}.ri-order-play-line:before{content:"\\efb7"}.ri-organization-chart:before{content:"\\efb8"}.ri-outlet-2-fill:before{content:"\\efb9"}.ri-outlet-2-line:before{content:"\\efba"}.ri-outlet-fill:before{content:"\\efbb"}.ri-outlet-line:before{content:"\\efbc"}.ri-page-separator:before{content:"\\efbd"}.ri-pages-fill:before{content:"\\efbe"}.ri-pages-line:before{content:"\\efbf"}.ri-paint-brush-fill:before{content:"\\efc0"}.ri-paint-brush-line:before{content:"\\efc1"}.ri-paint-fill:before{content:"\\efc2"}.ri-paint-line:before{content:"\\efc3"}.ri-palette-fill:before{content:"\\efc4"}.ri-palette-line:before{content:"\\efc5"}.ri-pantone-fill:before{content:"\\efc6"}.ri-pantone-line:before{content:"\\efc7"}.ri-paragraph:before{content:"\\efc8"}.ri-parent-fill:before{content:"\\efc9"}.ri-parent-line:before{content:"\\efca"}.ri-parentheses-fill:before{content:"\\efcb"}.ri-parentheses-line:before{content:"\\efcc"}.ri-parking-box-fill:before{content:"\\efcd"}.ri-parking-box-line:before{content:"\\efce"}.ri-parking-fill:before{content:"\\efcf"}.ri-parking-line:before{content:"\\efd0"}.ri-passport-fill:before{content:"\\efd1"}.ri-passport-line:before{content:"\\efd2"}.ri-patreon-fill:before{content:"\\efd3"}.ri-patreon-line:before{content:"\\efd4"}.ri-pause-circle-fill:before{content:"\\efd5"}.ri-pause-circle-line:before{content:"\\efd6"}.ri-pause-fill:before{content:"\\efd7"}.ri-pause-line:before{content:"\\efd8"}.ri-pause-mini-fill:before{content:"\\efd9"}.ri-pause-mini-line:before{content:"\\efda"}.ri-paypal-fill:before{content:"\\efdb"}.ri-paypal-line:before{content:"\\efdc"}.ri-pen-nib-fill:before{content:"\\efdd"}.ri-pen-nib-line:before{content:"\\efde"}.ri-pencil-fill:before{content:"\\efdf"}.ri-pencil-line:before{content:"\\efe0"}.ri-pencil-ruler-2-fill:before{content:"\\efe1"}.ri-pencil-ruler-2-line:before{content:"\\efe2"}.ri-pencil-ruler-fill:before{content:"\\efe3"}.ri-pencil-ruler-line:before{content:"\\efe4"}.ri-percent-fill:before{content:"\\efe5"}.ri-percent-line:before{content:"\\efe6"}.ri-phone-camera-fill:before{content:"\\efe7"}.ri-phone-camera-line:before{content:"\\efe8"}.ri-phone-fill:before{content:"\\efe9"}.ri-phone-find-fill:before{content:"\\efea"}.ri-phone-find-line:before{content:"\\efeb"}.ri-phone-line:before{content:"\\efec"}.ri-phone-lock-fill:before{content:"\\efed"}.ri-phone-lock-line:before{content:"\\efee"}.ri-picture-in-picture-2-fill:before{content:"\\efef"}.ri-picture-in-picture-2-line:before{content:"\\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\\eff1"}.ri-picture-in-picture-exit-line:before{content:"\\eff2"}.ri-picture-in-picture-fill:before{content:"\\eff3"}.ri-picture-in-picture-line:before{content:"\\eff4"}.ri-pie-chart-2-fill:before{content:"\\eff5"}.ri-pie-chart-2-line:before{content:"\\eff6"}.ri-pie-chart-box-fill:before{content:"\\eff7"}.ri-pie-chart-box-line:before{content:"\\eff8"}.ri-pie-chart-fill:before{content:"\\eff9"}.ri-pie-chart-line:before{content:"\\effa"}.ri-pin-distance-fill:before{content:"\\effb"}.ri-pin-distance-line:before{content:"\\effc"}.ri-ping-pong-fill:before{content:"\\effd"}.ri-ping-pong-line:before{content:"\\effe"}.ri-pinterest-fill:before{content:"\\efff"}.ri-pinterest-line:before{content:"\\f000"}.ri-pinyin-input:before{content:"\\f001"}.ri-pixelfed-fill:before{content:"\\f002"}.ri-pixelfed-line:before{content:"\\f003"}.ri-plane-fill:before{content:"\\f004"}.ri-plane-line:before{content:"\\f005"}.ri-plant-fill:before{content:"\\f006"}.ri-plant-line:before{content:"\\f007"}.ri-play-circle-fill:before{content:"\\f008"}.ri-play-circle-line:before{content:"\\f009"}.ri-play-fill:before{content:"\\f00a"}.ri-play-line:before{content:"\\f00b"}.ri-play-list-2-fill:before{content:"\\f00c"}.ri-play-list-2-line:before{content:"\\f00d"}.ri-play-list-add-fill:before{content:"\\f00e"}.ri-play-list-add-line:before{content:"\\f00f"}.ri-play-list-fill:before{content:"\\f010"}.ri-play-list-line:before{content:"\\f011"}.ri-play-mini-fill:before{content:"\\f012"}.ri-play-mini-line:before{content:"\\f013"}.ri-playstation-fill:before{content:"\\f014"}.ri-playstation-line:before{content:"\\f015"}.ri-plug-2-fill:before{content:"\\f016"}.ri-plug-2-line:before{content:"\\f017"}.ri-plug-fill:before{content:"\\f018"}.ri-plug-line:before{content:"\\f019"}.ri-polaroid-2-fill:before{content:"\\f01a"}.ri-polaroid-2-line:before{content:"\\f01b"}.ri-polaroid-fill:before{content:"\\f01c"}.ri-polaroid-line:before{content:"\\f01d"}.ri-police-car-fill:before{content:"\\f01e"}.ri-police-car-line:before{content:"\\f01f"}.ri-price-tag-2-fill:before{content:"\\f020"}.ri-price-tag-2-line:before{content:"\\f021"}.ri-price-tag-3-fill:before{content:"\\f022"}.ri-price-tag-3-line:before{content:"\\f023"}.ri-price-tag-fill:before{content:"\\f024"}.ri-price-tag-line:before{content:"\\f025"}.ri-printer-cloud-fill:before{content:"\\f026"}.ri-printer-cloud-line:before{content:"\\f027"}.ri-printer-fill:before{content:"\\f028"}.ri-printer-line:before{content:"\\f029"}.ri-product-hunt-fill:before{content:"\\f02a"}.ri-product-hunt-line:before{content:"\\f02b"}.ri-profile-fill:before{content:"\\f02c"}.ri-profile-line:before{content:"\\f02d"}.ri-projector-2-fill:before{content:"\\f02e"}.ri-projector-2-line:before{content:"\\f02f"}.ri-projector-fill:before{content:"\\f030"}.ri-projector-line:before{content:"\\f031"}.ri-psychotherapy-fill:before{content:"\\f032"}.ri-psychotherapy-line:before{content:"\\f033"}.ri-pulse-fill:before{content:"\\f034"}.ri-pulse-line:before{content:"\\f035"}.ri-pushpin-2-fill:before{content:"\\f036"}.ri-pushpin-2-line:before{content:"\\f037"}.ri-pushpin-fill:before{content:"\\f038"}.ri-pushpin-line:before{content:"\\f039"}.ri-qq-fill:before{content:"\\f03a"}.ri-qq-line:before{content:"\\f03b"}.ri-qr-code-fill:before{content:"\\f03c"}.ri-qr-code-line:before{content:"\\f03d"}.ri-qr-scan-2-fill:before{content:"\\f03e"}.ri-qr-scan-2-line:before{content:"\\f03f"}.ri-qr-scan-fill:before{content:"\\f040"}.ri-qr-scan-line:before{content:"\\f041"}.ri-question-answer-fill:before{content:"\\f042"}.ri-question-answer-line:before{content:"\\f043"}.ri-question-fill:before{content:"\\f044"}.ri-question-line:before{content:"\\f045"}.ri-question-mark:before{content:"\\f046"}.ri-questionnaire-fill:before{content:"\\f047"}.ri-questionnaire-line:before{content:"\\f048"}.ri-quill-pen-fill:before{content:"\\f049"}.ri-quill-pen-line:before{content:"\\f04a"}.ri-radar-fill:before{content:"\\f04b"}.ri-radar-line:before{content:"\\f04c"}.ri-radio-2-fill:before{content:"\\f04d"}.ri-radio-2-line:before{content:"\\f04e"}.ri-radio-button-fill:before{content:"\\f04f"}.ri-radio-button-line:before{content:"\\f050"}.ri-radio-fill:before{content:"\\f051"}.ri-radio-line:before{content:"\\f052"}.ri-rainbow-fill:before{content:"\\f053"}.ri-rainbow-line:before{content:"\\f054"}.ri-rainy-fill:before{content:"\\f055"}.ri-rainy-line:before{content:"\\f056"}.ri-reactjs-fill:before{content:"\\f057"}.ri-reactjs-line:before{content:"\\f058"}.ri-record-circle-fill:before{content:"\\f059"}.ri-record-circle-line:before{content:"\\f05a"}.ri-record-mail-fill:before{content:"\\f05b"}.ri-record-mail-line:before{content:"\\f05c"}.ri-recycle-fill:before{content:"\\f05d"}.ri-recycle-line:before{content:"\\f05e"}.ri-red-packet-fill:before{content:"\\f05f"}.ri-red-packet-line:before{content:"\\f060"}.ri-reddit-fill:before{content:"\\f061"}.ri-reddit-line:before{content:"\\f062"}.ri-refresh-fill:before{content:"\\f063"}.ri-refresh-line:before{content:"\\f064"}.ri-refund-2-fill:before{content:"\\f065"}.ri-refund-2-line:before{content:"\\f066"}.ri-refund-fill:before{content:"\\f067"}.ri-refund-line:before{content:"\\f068"}.ri-registered-fill:before{content:"\\f069"}.ri-registered-line:before{content:"\\f06a"}.ri-remixicon-fill:before{content:"\\f06b"}.ri-remixicon-line:before{content:"\\f06c"}.ri-remote-control-2-fill:before{content:"\\f06d"}.ri-remote-control-2-line:before{content:"\\f06e"}.ri-remote-control-fill:before{content:"\\f06f"}.ri-remote-control-line:before{content:"\\f070"}.ri-repeat-2-fill:before{content:"\\f071"}.ri-repeat-2-line:before{content:"\\f072"}.ri-repeat-fill:before{content:"\\f073"}.ri-repeat-line:before{content:"\\f074"}.ri-repeat-one-fill:before{content:"\\f075"}.ri-repeat-one-line:before{content:"\\f076"}.ri-reply-all-fill:before{content:"\\f077"}.ri-reply-all-line:before{content:"\\f078"}.ri-reply-fill:before{content:"\\f079"}.ri-reply-line:before{content:"\\f07a"}.ri-reserved-fill:before{content:"\\f07b"}.ri-reserved-line:before{content:"\\f07c"}.ri-rest-time-fill:before{content:"\\f07d"}.ri-rest-time-line:before{content:"\\f07e"}.ri-restart-fill:before{content:"\\f07f"}.ri-restart-line:before{content:"\\f080"}.ri-restaurant-2-fill:before{content:"\\f081"}.ri-restaurant-2-line:before{content:"\\f082"}.ri-restaurant-fill:before{content:"\\f083"}.ri-restaurant-line:before{content:"\\f084"}.ri-rewind-fill:before{content:"\\f085"}.ri-rewind-line:before{content:"\\f086"}.ri-rewind-mini-fill:before{content:"\\f087"}.ri-rewind-mini-line:before{content:"\\f088"}.ri-rhythm-fill:before{content:"\\f089"}.ri-rhythm-line:before{content:"\\f08a"}.ri-riding-fill:before{content:"\\f08b"}.ri-riding-line:before{content:"\\f08c"}.ri-road-map-fill:before{content:"\\f08d"}.ri-road-map-line:before{content:"\\f08e"}.ri-roadster-fill:before{content:"\\f08f"}.ri-roadster-line:before{content:"\\f090"}.ri-robot-fill:before{content:"\\f091"}.ri-robot-line:before{content:"\\f092"}.ri-rocket-2-fill:before{content:"\\f093"}.ri-rocket-2-line:before{content:"\\f094"}.ri-rocket-fill:before{content:"\\f095"}.ri-rocket-line:before{content:"\\f096"}.ri-rotate-lock-fill:before{content:"\\f097"}.ri-rotate-lock-line:before{content:"\\f098"}.ri-rounded-corner:before{content:"\\f099"}.ri-route-fill:before{content:"\\f09a"}.ri-route-line:before{content:"\\f09b"}.ri-router-fill:before{content:"\\f09c"}.ri-router-line:before{content:"\\f09d"}.ri-rss-fill:before{content:"\\f09e"}.ri-rss-line:before{content:"\\f09f"}.ri-ruler-2-fill:before{content:"\\f0a0"}.ri-ruler-2-line:before{content:"\\f0a1"}.ri-ruler-fill:before{content:"\\f0a2"}.ri-ruler-line:before{content:"\\f0a3"}.ri-run-fill:before{content:"\\f0a4"}.ri-run-line:before{content:"\\f0a5"}.ri-safari-fill:before{content:"\\f0a6"}.ri-safari-line:before{content:"\\f0a7"}.ri-safe-2-fill:before{content:"\\f0a8"}.ri-safe-2-line:before{content:"\\f0a9"}.ri-safe-fill:before{content:"\\f0aa"}.ri-safe-line:before{content:"\\f0ab"}.ri-sailboat-fill:before{content:"\\f0ac"}.ri-sailboat-line:before{content:"\\f0ad"}.ri-save-2-fill:before{content:"\\f0ae"}.ri-save-2-line:before{content:"\\f0af"}.ri-save-3-fill:before{content:"\\f0b0"}.ri-save-3-line:before{content:"\\f0b1"}.ri-save-fill:before{content:"\\f0b2"}.ri-save-line:before{content:"\\f0b3"}.ri-scales-2-fill:before{content:"\\f0b4"}.ri-scales-2-line:before{content:"\\f0b5"}.ri-scales-3-fill:before{content:"\\f0b6"}.ri-scales-3-line:before{content:"\\f0b7"}.ri-scales-fill:before{content:"\\f0b8"}.ri-scales-line:before{content:"\\f0b9"}.ri-scan-2-fill:before{content:"\\f0ba"}.ri-scan-2-line:before{content:"\\f0bb"}.ri-scan-fill:before{content:"\\f0bc"}.ri-scan-line:before{content:"\\f0bd"}.ri-scissors-2-fill:before{content:"\\f0be"}.ri-scissors-2-line:before{content:"\\f0bf"}.ri-scissors-cut-fill:before{content:"\\f0c0"}.ri-scissors-cut-line:before{content:"\\f0c1"}.ri-scissors-fill:before{content:"\\f0c2"}.ri-scissors-line:before{content:"\\f0c3"}.ri-screenshot-2-fill:before{content:"\\f0c4"}.ri-screenshot-2-line:before{content:"\\f0c5"}.ri-screenshot-fill:before{content:"\\f0c6"}.ri-screenshot-line:before{content:"\\f0c7"}.ri-sd-card-fill:before{content:"\\f0c8"}.ri-sd-card-line:before{content:"\\f0c9"}.ri-sd-card-mini-fill:before{content:"\\f0ca"}.ri-sd-card-mini-line:before{content:"\\f0cb"}.ri-search-2-fill:before{content:"\\f0cc"}.ri-search-2-line:before{content:"\\f0cd"}.ri-search-eye-fill:before{content:"\\f0ce"}.ri-search-eye-line:before{content:"\\f0cf"}.ri-search-fill:before{content:"\\f0d0"}.ri-search-line:before{content:"\\f0d1"}.ri-secure-payment-fill:before{content:"\\f0d2"}.ri-secure-payment-line:before{content:"\\f0d3"}.ri-seedling-fill:before{content:"\\f0d4"}.ri-seedling-line:before{content:"\\f0d5"}.ri-send-backward:before{content:"\\f0d6"}.ri-send-plane-2-fill:before{content:"\\f0d7"}.ri-send-plane-2-line:before{content:"\\f0d8"}.ri-send-plane-fill:before{content:"\\f0d9"}.ri-send-plane-line:before{content:"\\f0da"}.ri-send-to-back:before{content:"\\f0db"}.ri-sensor-fill:before{content:"\\f0dc"}.ri-sensor-line:before{content:"\\f0dd"}.ri-separator:before{content:"\\f0de"}.ri-server-fill:before{content:"\\f0df"}.ri-server-line:before{content:"\\f0e0"}.ri-service-fill:before{content:"\\f0e1"}.ri-service-line:before{content:"\\f0e2"}.ri-settings-2-fill:before{content:"\\f0e3"}.ri-settings-2-line:before{content:"\\f0e4"}.ri-settings-3-fill:before{content:"\\f0e5"}.ri-settings-3-line:before{content:"\\f0e6"}.ri-settings-4-fill:before{content:"\\f0e7"}.ri-settings-4-line:before{content:"\\f0e8"}.ri-settings-5-fill:before{content:"\\f0e9"}.ri-settings-5-line:before{content:"\\f0ea"}.ri-settings-6-fill:before{content:"\\f0eb"}.ri-settings-6-line:before{content:"\\f0ec"}.ri-settings-fill:before{content:"\\f0ed"}.ri-settings-line:before{content:"\\f0ee"}.ri-shape-2-fill:before{content:"\\f0ef"}.ri-shape-2-line:before{content:"\\f0f0"}.ri-shape-fill:before{content:"\\f0f1"}.ri-shape-line:before{content:"\\f0f2"}.ri-share-box-fill:before{content:"\\f0f3"}.ri-share-box-line:before{content:"\\f0f4"}.ri-share-circle-fill:before{content:"\\f0f5"}.ri-share-circle-line:before{content:"\\f0f6"}.ri-share-fill:before{content:"\\f0f7"}.ri-share-forward-2-fill:before{content:"\\f0f8"}.ri-share-forward-2-line:before{content:"\\f0f9"}.ri-share-forward-box-fill:before{content:"\\f0fa"}.ri-share-forward-box-line:before{content:"\\f0fb"}.ri-share-forward-fill:before{content:"\\f0fc"}.ri-share-forward-line:before{content:"\\f0fd"}.ri-share-line:before{content:"\\f0fe"}.ri-shield-check-fill:before{content:"\\f0ff"}.ri-shield-check-line:before{content:"\\f100"}.ri-shield-cross-fill:before{content:"\\f101"}.ri-shield-cross-line:before{content:"\\f102"}.ri-shield-fill:before{content:"\\f103"}.ri-shield-flash-fill:before{content:"\\f104"}.ri-shield-flash-line:before{content:"\\f105"}.ri-shield-keyhole-fill:before{content:"\\f106"}.ri-shield-keyhole-line:before{content:"\\f107"}.ri-shield-line:before{content:"\\f108"}.ri-shield-star-fill:before{content:"\\f109"}.ri-shield-star-line:before{content:"\\f10a"}.ri-shield-user-fill:before{content:"\\f10b"}.ri-shield-user-line:before{content:"\\f10c"}.ri-ship-2-fill:before{content:"\\f10d"}.ri-ship-2-line:before{content:"\\f10e"}.ri-ship-fill:before{content:"\\f10f"}.ri-ship-line:before{content:"\\f110"}.ri-shirt-fill:before{content:"\\f111"}.ri-shirt-line:before{content:"\\f112"}.ri-shopping-bag-2-fill:before{content:"\\f113"}.ri-shopping-bag-2-line:before{content:"\\f114"}.ri-shopping-bag-3-fill:before{content:"\\f115"}.ri-shopping-bag-3-line:before{content:"\\f116"}.ri-shopping-bag-fill:before{content:"\\f117"}.ri-shopping-bag-line:before{content:"\\f118"}.ri-shopping-basket-2-fill:before{content:"\\f119"}.ri-shopping-basket-2-line:before{content:"\\f11a"}.ri-shopping-basket-fill:before{content:"\\f11b"}.ri-shopping-basket-line:before{content:"\\f11c"}.ri-shopping-cart-2-fill:before{content:"\\f11d"}.ri-shopping-cart-2-line:before{content:"\\f11e"}.ri-shopping-cart-fill:before{content:"\\f11f"}.ri-shopping-cart-line:before{content:"\\f120"}.ri-showers-fill:before{content:"\\f121"}.ri-showers-line:before{content:"\\f122"}.ri-shuffle-fill:before{content:"\\f123"}.ri-shuffle-line:before{content:"\\f124"}.ri-shut-down-fill:before{content:"\\f125"}.ri-shut-down-line:before{content:"\\f126"}.ri-side-bar-fill:before{content:"\\f127"}.ri-side-bar-line:before{content:"\\f128"}.ri-signal-tower-fill:before{content:"\\f129"}.ri-signal-tower-line:before{content:"\\f12a"}.ri-signal-wifi-1-fill:before{content:"\\f12b"}.ri-signal-wifi-1-line:before{content:"\\f12c"}.ri-signal-wifi-2-fill:before{content:"\\f12d"}.ri-signal-wifi-2-line:before{content:"\\f12e"}.ri-signal-wifi-3-fill:before{content:"\\f12f"}.ri-signal-wifi-3-line:before{content:"\\f130"}.ri-signal-wifi-error-fill:before{content:"\\f131"}.ri-signal-wifi-error-line:before{content:"\\f132"}.ri-signal-wifi-fill:before{content:"\\f133"}.ri-signal-wifi-line:before{content:"\\f134"}.ri-signal-wifi-off-fill:before{content:"\\f135"}.ri-signal-wifi-off-line:before{content:"\\f136"}.ri-sim-card-2-fill:before{content:"\\f137"}.ri-sim-card-2-line:before{content:"\\f138"}.ri-sim-card-fill:before{content:"\\f139"}.ri-sim-card-line:before{content:"\\f13a"}.ri-single-quotes-l:before{content:"\\f13b"}.ri-single-quotes-r:before{content:"\\f13c"}.ri-sip-fill:before{content:"\\f13d"}.ri-sip-line:before{content:"\\f13e"}.ri-skip-back-fill:before{content:"\\f13f"}.ri-skip-back-line:before{content:"\\f140"}.ri-skip-back-mini-fill:before{content:"\\f141"}.ri-skip-back-mini-line:before{content:"\\f142"}.ri-skip-forward-fill:before{content:"\\f143"}.ri-skip-forward-line:before{content:"\\f144"}.ri-skip-forward-mini-fill:before{content:"\\f145"}.ri-skip-forward-mini-line:before{content:"\\f146"}.ri-skull-2-fill:before{content:"\\f147"}.ri-skull-2-line:before{content:"\\f148"}.ri-skull-fill:before{content:"\\f149"}.ri-skull-line:before{content:"\\f14a"}.ri-skype-fill:before{content:"\\f14b"}.ri-skype-line:before{content:"\\f14c"}.ri-slack-fill:before{content:"\\f14d"}.ri-slack-line:before{content:"\\f14e"}.ri-slice-fill:before{content:"\\f14f"}.ri-slice-line:before{content:"\\f150"}.ri-slideshow-2-fill:before{content:"\\f151"}.ri-slideshow-2-line:before{content:"\\f152"}.ri-slideshow-3-fill:before{content:"\\f153"}.ri-slideshow-3-line:before{content:"\\f154"}.ri-slideshow-4-fill:before{content:"\\f155"}.ri-slideshow-4-line:before{content:"\\f156"}.ri-slideshow-fill:before{content:"\\f157"}.ri-slideshow-line:before{content:"\\f158"}.ri-smartphone-fill:before{content:"\\f159"}.ri-smartphone-line:before{content:"\\f15a"}.ri-snapchat-fill:before{content:"\\f15b"}.ri-snapchat-line:before{content:"\\f15c"}.ri-snowy-fill:before{content:"\\f15d"}.ri-snowy-line:before{content:"\\f15e"}.ri-sort-asc:before{content:"\\f15f"}.ri-sort-desc:before{content:"\\f160"}.ri-sound-module-fill:before{content:"\\f161"}.ri-sound-module-line:before{content:"\\f162"}.ri-soundcloud-fill:before{content:"\\f163"}.ri-soundcloud-line:before{content:"\\f164"}.ri-space-ship-fill:before{content:"\\f165"}.ri-space-ship-line:before{content:"\\f166"}.ri-space:before{content:"\\f167"}.ri-spam-2-fill:before{content:"\\f168"}.ri-spam-2-line:before{content:"\\f169"}.ri-spam-3-fill:before{content:"\\f16a"}.ri-spam-3-line:before{content:"\\f16b"}.ri-spam-fill:before{content:"\\f16c"}.ri-spam-line:before{content:"\\f16d"}.ri-speaker-2-fill:before{content:"\\f16e"}.ri-speaker-2-line:before{content:"\\f16f"}.ri-speaker-3-fill:before{content:"\\f170"}.ri-speaker-3-line:before{content:"\\f171"}.ri-speaker-fill:before{content:"\\f172"}.ri-speaker-line:before{content:"\\f173"}.ri-spectrum-fill:before{content:"\\f174"}.ri-spectrum-line:before{content:"\\f175"}.ri-speed-fill:before{content:"\\f176"}.ri-speed-line:before{content:"\\f177"}.ri-speed-mini-fill:before{content:"\\f178"}.ri-speed-mini-line:before{content:"\\f179"}.ri-split-cells-horizontal:before{content:"\\f17a"}.ri-split-cells-vertical:before{content:"\\f17b"}.ri-spotify-fill:before{content:"\\f17c"}.ri-spotify-line:before{content:"\\f17d"}.ri-spy-fill:before{content:"\\f17e"}.ri-spy-line:before{content:"\\f17f"}.ri-stack-fill:before{content:"\\f180"}.ri-stack-line:before{content:"\\f181"}.ri-stack-overflow-fill:before{content:"\\f182"}.ri-stack-overflow-line:before{content:"\\f183"}.ri-stackshare-fill:before{content:"\\f184"}.ri-stackshare-line:before{content:"\\f185"}.ri-star-fill:before{content:"\\f186"}.ri-star-half-fill:before{content:"\\f187"}.ri-star-half-line:before{content:"\\f188"}.ri-star-half-s-fill:before{content:"\\f189"}.ri-star-half-s-line:before{content:"\\f18a"}.ri-star-line:before{content:"\\f18b"}.ri-star-s-fill:before{content:"\\f18c"}.ri-star-s-line:before{content:"\\f18d"}.ri-star-smile-fill:before{content:"\\f18e"}.ri-star-smile-line:before{content:"\\f18f"}.ri-steam-fill:before{content:"\\f190"}.ri-steam-line:before{content:"\\f191"}.ri-steering-2-fill:before{content:"\\f192"}.ri-steering-2-line:before{content:"\\f193"}.ri-steering-fill:before{content:"\\f194"}.ri-steering-line:before{content:"\\f195"}.ri-stethoscope-fill:before{content:"\\f196"}.ri-stethoscope-line:before{content:"\\f197"}.ri-sticky-note-2-fill:before{content:"\\f198"}.ri-sticky-note-2-line:before{content:"\\f199"}.ri-sticky-note-fill:before{content:"\\f19a"}.ri-sticky-note-line:before{content:"\\f19b"}.ri-stock-fill:before{content:"\\f19c"}.ri-stock-line:before{content:"\\f19d"}.ri-stop-circle-fill:before{content:"\\f19e"}.ri-stop-circle-line:before{content:"\\f19f"}.ri-stop-fill:before{content:"\\f1a0"}.ri-stop-line:before{content:"\\f1a1"}.ri-stop-mini-fill:before{content:"\\f1a2"}.ri-stop-mini-line:before{content:"\\f1a3"}.ri-store-2-fill:before{content:"\\f1a4"}.ri-store-2-line:before{content:"\\f1a5"}.ri-store-3-fill:before{content:"\\f1a6"}.ri-store-3-line:before{content:"\\f1a7"}.ri-store-fill:before{content:"\\f1a8"}.ri-store-line:before{content:"\\f1a9"}.ri-strikethrough-2:before{content:"\\f1aa"}.ri-strikethrough:before{content:"\\f1ab"}.ri-subscript-2:before{content:"\\f1ac"}.ri-subscript:before{content:"\\f1ad"}.ri-subtract-fill:before{content:"\\f1ae"}.ri-subtract-line:before{content:"\\f1af"}.ri-subway-fill:before{content:"\\f1b0"}.ri-subway-line:before{content:"\\f1b1"}.ri-subway-wifi-fill:before{content:"\\f1b2"}.ri-subway-wifi-line:before{content:"\\f1b3"}.ri-suitcase-2-fill:before{content:"\\f1b4"}.ri-suitcase-2-line:before{content:"\\f1b5"}.ri-suitcase-3-fill:before{content:"\\f1b6"}.ri-suitcase-3-line:before{content:"\\f1b7"}.ri-suitcase-fill:before{content:"\\f1b8"}.ri-suitcase-line:before{content:"\\f1b9"}.ri-sun-cloudy-fill:before{content:"\\f1ba"}.ri-sun-cloudy-line:before{content:"\\f1bb"}.ri-sun-fill:before{content:"\\f1bc"}.ri-sun-foggy-fill:before{content:"\\f1bd"}.ri-sun-foggy-line:before{content:"\\f1be"}.ri-sun-line:before{content:"\\f1bf"}.ri-superscript-2:before{content:"\\f1c0"}.ri-superscript:before{content:"\\f1c1"}.ri-surgical-mask-fill:before{content:"\\f1c2"}.ri-surgical-mask-line:before{content:"\\f1c3"}.ri-surround-sound-fill:before{content:"\\f1c4"}.ri-surround-sound-line:before{content:"\\f1c5"}.ri-survey-fill:before{content:"\\f1c6"}.ri-survey-line:before{content:"\\f1c7"}.ri-swap-box-fill:before{content:"\\f1c8"}.ri-swap-box-line:before{content:"\\f1c9"}.ri-swap-fill:before{content:"\\f1ca"}.ri-swap-line:before{content:"\\f1cb"}.ri-switch-fill:before{content:"\\f1cc"}.ri-switch-line:before{content:"\\f1cd"}.ri-sword-fill:before{content:"\\f1ce"}.ri-sword-line:before{content:"\\f1cf"}.ri-syringe-fill:before{content:"\\f1d0"}.ri-syringe-line:before{content:"\\f1d1"}.ri-t-box-fill:before{content:"\\f1d2"}.ri-t-box-line:before{content:"\\f1d3"}.ri-t-shirt-2-fill:before{content:"\\f1d4"}.ri-t-shirt-2-line:before{content:"\\f1d5"}.ri-t-shirt-air-fill:before{content:"\\f1d6"}.ri-t-shirt-air-line:before{content:"\\f1d7"}.ri-t-shirt-fill:before{content:"\\f1d8"}.ri-t-shirt-line:before{content:"\\f1d9"}.ri-table-2:before{content:"\\f1da"}.ri-table-alt-fill:before{content:"\\f1db"}.ri-table-alt-line:before{content:"\\f1dc"}.ri-table-fill:before{content:"\\f1dd"}.ri-table-line:before{content:"\\f1de"}.ri-tablet-fill:before{content:"\\f1df"}.ri-tablet-line:before{content:"\\f1e0"}.ri-takeaway-fill:before{content:"\\f1e1"}.ri-takeaway-line:before{content:"\\f1e2"}.ri-taobao-fill:before{content:"\\f1e3"}.ri-taobao-line:before{content:"\\f1e4"}.ri-tape-fill:before{content:"\\f1e5"}.ri-tape-line:before{content:"\\f1e6"}.ri-task-fill:before{content:"\\f1e7"}.ri-task-line:before{content:"\\f1e8"}.ri-taxi-fill:before{content:"\\f1e9"}.ri-taxi-line:before{content:"\\f1ea"}.ri-taxi-wifi-fill:before{content:"\\f1eb"}.ri-taxi-wifi-line:before{content:"\\f1ec"}.ri-team-fill:before{content:"\\f1ed"}.ri-team-line:before{content:"\\f1ee"}.ri-telegram-fill:before{content:"\\f1ef"}.ri-telegram-line:before{content:"\\f1f0"}.ri-temp-cold-fill:before{content:"\\f1f1"}.ri-temp-cold-line:before{content:"\\f1f2"}.ri-temp-hot-fill:before{content:"\\f1f3"}.ri-temp-hot-line:before{content:"\\f1f4"}.ri-terminal-box-fill:before{content:"\\f1f5"}.ri-terminal-box-line:before{content:"\\f1f6"}.ri-terminal-fill:before{content:"\\f1f7"}.ri-terminal-line:before{content:"\\f1f8"}.ri-terminal-window-fill:before{content:"\\f1f9"}.ri-terminal-window-line:before{content:"\\f1fa"}.ri-test-tube-fill:before{content:"\\f1fb"}.ri-test-tube-line:before{content:"\\f1fc"}.ri-text-direction-l:before{content:"\\f1fd"}.ri-text-direction-r:before{content:"\\f1fe"}.ri-text-spacing:before{content:"\\f1ff"}.ri-text-wrap:before{content:"\\f200"}.ri-text:before{content:"\\f201"}.ri-thermometer-fill:before{content:"\\f202"}.ri-thermometer-line:before{content:"\\f203"}.ri-thumb-down-fill:before{content:"\\f204"}.ri-thumb-down-line:before{content:"\\f205"}.ri-thumb-up-fill:before{content:"\\f206"}.ri-thumb-up-line:before{content:"\\f207"}.ri-thunderstorms-fill:before{content:"\\f208"}.ri-thunderstorms-line:before{content:"\\f209"}.ri-ticket-2-fill:before{content:"\\f20a"}.ri-ticket-2-line:before{content:"\\f20b"}.ri-ticket-fill:before{content:"\\f20c"}.ri-ticket-line:before{content:"\\f20d"}.ri-time-fill:before{content:"\\f20e"}.ri-time-line:before{content:"\\f20f"}.ri-timer-2-fill:before{content:"\\f210"}.ri-timer-2-line:before{content:"\\f211"}.ri-timer-fill:before{content:"\\f212"}.ri-timer-flash-fill:before{content:"\\f213"}.ri-timer-flash-line:before{content:"\\f214"}.ri-timer-line:before{content:"\\f215"}.ri-todo-fill:before{content:"\\f216"}.ri-todo-line:before{content:"\\f217"}.ri-toggle-fill:before{content:"\\f218"}.ri-toggle-line:before{content:"\\f219"}.ri-tools-fill:before{content:"\\f21a"}.ri-tools-line:before{content:"\\f21b"}.ri-tornado-fill:before{content:"\\f21c"}.ri-tornado-line:before{content:"\\f21d"}.ri-trademark-fill:before{content:"\\f21e"}.ri-trademark-line:before{content:"\\f21f"}.ri-traffic-light-fill:before{content:"\\f220"}.ri-traffic-light-line:before{content:"\\f221"}.ri-train-fill:before{content:"\\f222"}.ri-train-line:before{content:"\\f223"}.ri-train-wifi-fill:before{content:"\\f224"}.ri-train-wifi-line:before{content:"\\f225"}.ri-translate-2:before{content:"\\f226"}.ri-translate:before{content:"\\f227"}.ri-travesti-fill:before{content:"\\f228"}.ri-travesti-line:before{content:"\\f229"}.ri-treasure-map-fill:before{content:"\\f22a"}.ri-treasure-map-line:before{content:"\\f22b"}.ri-trello-fill:before{content:"\\f22c"}.ri-trello-line:before{content:"\\f22d"}.ri-trophy-fill:before{content:"\\f22e"}.ri-trophy-line:before{content:"\\f22f"}.ri-truck-fill:before{content:"\\f230"}.ri-truck-line:before{content:"\\f231"}.ri-tumblr-fill:before{content:"\\f232"}.ri-tumblr-line:before{content:"\\f233"}.ri-tv-2-fill:before{content:"\\f234"}.ri-tv-2-line:before{content:"\\f235"}.ri-tv-fill:before{content:"\\f236"}.ri-tv-line:before{content:"\\f237"}.ri-twitch-fill:before{content:"\\f238"}.ri-twitch-line:before{content:"\\f239"}.ri-twitter-fill:before{content:"\\f23a"}.ri-twitter-line:before{content:"\\f23b"}.ri-typhoon-fill:before{content:"\\f23c"}.ri-typhoon-line:before{content:"\\f23d"}.ri-u-disk-fill:before{content:"\\f23e"}.ri-u-disk-line:before{content:"\\f23f"}.ri-ubuntu-fill:before{content:"\\f240"}.ri-ubuntu-line:before{content:"\\f241"}.ri-umbrella-fill:before{content:"\\f242"}.ri-umbrella-line:before{content:"\\f243"}.ri-underline:before{content:"\\f244"}.ri-uninstall-fill:before{content:"\\f245"}.ri-uninstall-line:before{content:"\\f246"}.ri-unsplash-fill:before{content:"\\f247"}.ri-unsplash-line:before{content:"\\f248"}.ri-upload-2-fill:before{content:"\\f249"}.ri-upload-2-line:before{content:"\\f24a"}.ri-upload-cloud-2-fill:before{content:"\\f24b"}.ri-upload-cloud-2-line:before{content:"\\f24c"}.ri-upload-cloud-fill:before{content:"\\f24d"}.ri-upload-cloud-line:before{content:"\\f24e"}.ri-upload-fill:before{content:"\\f24f"}.ri-upload-line:before{content:"\\f250"}.ri-usb-fill:before{content:"\\f251"}.ri-usb-line:before{content:"\\f252"}.ri-user-2-fill:before{content:"\\f253"}.ri-user-2-line:before{content:"\\f254"}.ri-user-3-fill:before{content:"\\f255"}.ri-user-3-line:before{content:"\\f256"}.ri-user-4-fill:before{content:"\\f257"}.ri-user-4-line:before{content:"\\f258"}.ri-user-5-fill:before{content:"\\f259"}.ri-user-5-line:before{content:"\\f25a"}.ri-user-6-fill:before{content:"\\f25b"}.ri-user-6-line:before{content:"\\f25c"}.ri-user-add-fill:before{content:"\\f25d"}.ri-user-add-line:before{content:"\\f25e"}.ri-user-fill:before{content:"\\f25f"}.ri-user-follow-fill:before{content:"\\f260"}.ri-user-follow-line:before{content:"\\f261"}.ri-user-heart-fill:before{content:"\\f262"}.ri-user-heart-line:before{content:"\\f263"}.ri-user-line:before{content:"\\f264"}.ri-user-location-fill:before{content:"\\f265"}.ri-user-location-line:before{content:"\\f266"}.ri-user-received-2-fill:before{content:"\\f267"}.ri-user-received-2-line:before{content:"\\f268"}.ri-user-received-fill:before{content:"\\f269"}.ri-user-received-line:before{content:"\\f26a"}.ri-user-search-fill:before{content:"\\f26b"}.ri-user-search-line:before{content:"\\f26c"}.ri-user-settings-fill:before{content:"\\f26d"}.ri-user-settings-line:before{content:"\\f26e"}.ri-user-shared-2-fill:before{content:"\\f26f"}.ri-user-shared-2-line:before{content:"\\f270"}.ri-user-shared-fill:before{content:"\\f271"}.ri-user-shared-line:before{content:"\\f272"}.ri-user-smile-fill:before{content:"\\f273"}.ri-user-smile-line:before{content:"\\f274"}.ri-user-star-fill:before{content:"\\f275"}.ri-user-star-line:before{content:"\\f276"}.ri-user-unfollow-fill:before{content:"\\f277"}.ri-user-unfollow-line:before{content:"\\f278"}.ri-user-voice-fill:before{content:"\\f279"}.ri-user-voice-line:before{content:"\\f27a"}.ri-video-add-fill:before{content:"\\f27b"}.ri-video-add-line:before{content:"\\f27c"}.ri-video-chat-fill:before{content:"\\f27d"}.ri-video-chat-line:before{content:"\\f27e"}.ri-video-download-fill:before{content:"\\f27f"}.ri-video-download-line:before{content:"\\f280"}.ri-video-fill:before{content:"\\f281"}.ri-video-line:before{content:"\\f282"}.ri-video-upload-fill:before{content:"\\f283"}.ri-video-upload-line:before{content:"\\f284"}.ri-vidicon-2-fill:before{content:"\\f285"}.ri-vidicon-2-line:before{content:"\\f286"}.ri-vidicon-fill:before{content:"\\f287"}.ri-vidicon-line:before{content:"\\f288"}.ri-vimeo-fill:before{content:"\\f289"}.ri-vimeo-line:before{content:"\\f28a"}.ri-vip-crown-2-fill:before{content:"\\f28b"}.ri-vip-crown-2-line:before{content:"\\f28c"}.ri-vip-crown-fill:before{content:"\\f28d"}.ri-vip-crown-line:before{content:"\\f28e"}.ri-vip-diamond-fill:before{content:"\\f28f"}.ri-vip-diamond-line:before{content:"\\f290"}.ri-vip-fill:before{content:"\\f291"}.ri-vip-line:before{content:"\\f292"}.ri-virus-fill:before{content:"\\f293"}.ri-virus-line:before{content:"\\f294"}.ri-visa-fill:before{content:"\\f295"}.ri-visa-line:before{content:"\\f296"}.ri-voice-recognition-fill:before{content:"\\f297"}.ri-voice-recognition-line:before{content:"\\f298"}.ri-voiceprint-fill:before{content:"\\f299"}.ri-voiceprint-line:before{content:"\\f29a"}.ri-volume-down-fill:before{content:"\\f29b"}.ri-volume-down-line:before{content:"\\f29c"}.ri-volume-mute-fill:before{content:"\\f29d"}.ri-volume-mute-line:before{content:"\\f29e"}.ri-volume-off-vibrate-fill:before{content:"\\f29f"}.ri-volume-off-vibrate-line:before{content:"\\f2a0"}.ri-volume-up-fill:before{content:"\\f2a1"}.ri-volume-up-line:before{content:"\\f2a2"}.ri-volume-vibrate-fill:before{content:"\\f2a3"}.ri-volume-vibrate-line:before{content:"\\f2a4"}.ri-vuejs-fill:before{content:"\\f2a5"}.ri-vuejs-line:before{content:"\\f2a6"}.ri-walk-fill:before{content:"\\f2a7"}.ri-walk-line:before{content:"\\f2a8"}.ri-wallet-2-fill:before{content:"\\f2a9"}.ri-wallet-2-line:before{content:"\\f2aa"}.ri-wallet-3-fill:before{content:"\\f2ab"}.ri-wallet-3-line:before{content:"\\f2ac"}.ri-wallet-fill:before{content:"\\f2ad"}.ri-wallet-line:before{content:"\\f2ae"}.ri-water-flash-fill:before{content:"\\f2af"}.ri-water-flash-line:before{content:"\\f2b0"}.ri-webcam-fill:before{content:"\\f2b1"}.ri-webcam-line:before{content:"\\f2b2"}.ri-wechat-2-fill:before{content:"\\f2b3"}.ri-wechat-2-line:before{content:"\\f2b4"}.ri-wechat-fill:before{content:"\\f2b5"}.ri-wechat-line:before{content:"\\f2b6"}.ri-wechat-pay-fill:before{content:"\\f2b7"}.ri-wechat-pay-line:before{content:"\\f2b8"}.ri-weibo-fill:before{content:"\\f2b9"}.ri-weibo-line:before{content:"\\f2ba"}.ri-whatsapp-fill:before{content:"\\f2bb"}.ri-whatsapp-line:before{content:"\\f2bc"}.ri-wheelchair-fill:before{content:"\\f2bd"}.ri-wheelchair-line:before{content:"\\f2be"}.ri-wifi-fill:before{content:"\\f2bf"}.ri-wifi-line:before{content:"\\f2c0"}.ri-wifi-off-fill:before{content:"\\f2c1"}.ri-wifi-off-line:before{content:"\\f2c2"}.ri-window-2-fill:before{content:"\\f2c3"}.ri-window-2-line:before{content:"\\f2c4"}.ri-window-fill:before{content:"\\f2c5"}.ri-window-line:before{content:"\\f2c6"}.ri-windows-fill:before{content:"\\f2c7"}.ri-windows-line:before{content:"\\f2c8"}.ri-windy-fill:before{content:"\\f2c9"}.ri-windy-line:before{content:"\\f2ca"}.ri-wireless-charging-fill:before{content:"\\f2cb"}.ri-wireless-charging-line:before{content:"\\f2cc"}.ri-women-fill:before{content:"\\f2cd"}.ri-women-line:before{content:"\\f2ce"}.ri-wubi-input:before{content:"\\f2cf"}.ri-xbox-fill:before{content:"\\f2d0"}.ri-xbox-line:before{content:"\\f2d1"}.ri-xing-fill:before{content:"\\f2d2"}.ri-xing-line:before{content:"\\f2d3"}.ri-youtube-fill:before{content:"\\f2d4"}.ri-youtube-line:before{content:"\\f2d5"}.ri-zcool-fill:before{content:"\\f2d6"}.ri-zcool-line:before{content:"\\f2d7"}.ri-zhihu-fill:before{content:"\\f2d8"}.ri-zhihu-line:before{content:"\\f2d9"}.ri-zoom-in-fill:before{content:"\\f2da"}.ri-zoom-in-line:before{content:"\\f2db"}.ri-zoom-out-fill:before{content:"\\f2dc"}.ri-zoom-out-line:before{content:"\\f2dd"}.ri-zzz-fill:before{content:"\\f2de"}.ri-zzz-line:before{content:"\\f2df"}.ri-arrow-down-double-fill:before{content:"\\f2e0"}.ri-arrow-down-double-line:before{content:"\\f2e1"}.ri-arrow-left-double-fill:before{content:"\\f2e2"}.ri-arrow-left-double-line:before{content:"\\f2e3"}.ri-arrow-right-double-fill:before{content:"\\f2e4"}.ri-arrow-right-double-line:before{content:"\\f2e5"}.ri-arrow-turn-back-fill:before{content:"\\f2e6"}.ri-arrow-turn-back-line:before{content:"\\f2e7"}.ri-arrow-turn-forward-fill:before{content:"\\f2e8"}.ri-arrow-turn-forward-line:before{content:"\\f2e9"}.ri-arrow-up-double-fill:before{content:"\\f2ea"}.ri-arrow-up-double-line:before{content:"\\f2eb"}.ri-bard-fill:before{content:"\\f2ec"}.ri-bard-line:before{content:"\\f2ed"}.ri-bootstrap-fill:before{content:"\\f2ee"}.ri-bootstrap-line:before{content:"\\f2ef"}.ri-box-1-fill:before{content:"\\f2f0"}.ri-box-1-line:before{content:"\\f2f1"}.ri-box-2-fill:before{content:"\\f2f2"}.ri-box-2-line:before{content:"\\f2f3"}.ri-box-3-fill:before{content:"\\f2f4"}.ri-box-3-line:before{content:"\\f2f5"}.ri-brain-fill:before{content:"\\f2f6"}.ri-brain-line:before{content:"\\f2f7"}.ri-candle-fill:before{content:"\\f2f8"}.ri-candle-line:before{content:"\\f2f9"}.ri-cash-fill:before{content:"\\f2fa"}.ri-cash-line:before{content:"\\f2fb"}.ri-contract-left-fill:before{content:"\\f2fc"}.ri-contract-left-line:before{content:"\\f2fd"}.ri-contract-left-right-fill:before{content:"\\f2fe"}.ri-contract-left-right-line:before{content:"\\f2ff"}.ri-contract-right-fill:before{content:"\\f300"}.ri-contract-right-line:before{content:"\\f301"}.ri-contract-up-down-fill:before{content:"\\f302"}.ri-contract-up-down-line:before{content:"\\f303"}.ri-copilot-fill:before{content:"\\f304"}.ri-copilot-line:before{content:"\\f305"}.ri-corner-down-left-fill:before{content:"\\f306"}.ri-corner-down-left-line:before{content:"\\f307"}.ri-corner-down-right-fill:before{content:"\\f308"}.ri-corner-down-right-line:before{content:"\\f309"}.ri-corner-left-down-fill:before{content:"\\f30a"}.ri-corner-left-down-line:before{content:"\\f30b"}.ri-corner-left-up-fill:before{content:"\\f30c"}.ri-corner-left-up-line:before{content:"\\f30d"}.ri-corner-right-down-fill:before{content:"\\f30e"}.ri-corner-right-down-line:before{content:"\\f30f"}.ri-corner-right-up-fill:before{content:"\\f310"}.ri-corner-right-up-line:before{content:"\\f311"}.ri-corner-up-left-double-fill:before{content:"\\f312"}.ri-corner-up-left-double-line:before{content:"\\f313"}.ri-corner-up-left-fill:before{content:"\\f314"}.ri-corner-up-left-line:before{content:"\\f315"}.ri-corner-up-right-double-fill:before{content:"\\f316"}.ri-corner-up-right-double-line:before{content:"\\f317"}.ri-corner-up-right-fill:before{content:"\\f318"}.ri-corner-up-right-line:before{content:"\\f319"}.ri-cross-fill:before{content:"\\f31a"}.ri-cross-line:before{content:"\\f31b"}.ri-edge-new-fill:before{content:"\\f31c"}.ri-edge-new-line:before{content:"\\f31d"}.ri-equal-fill:before{content:"\\f31e"}.ri-equal-line:before{content:"\\f31f"}.ri-expand-left-fill:before{content:"\\f320"}.ri-expand-left-line:before{content:"\\f321"}.ri-expand-left-right-fill:before{content:"\\f322"}.ri-expand-left-right-line:before{content:"\\f323"}.ri-expand-right-fill:before{content:"\\f324"}.ri-expand-right-line:before{content:"\\f325"}.ri-expand-up-down-fill:before{content:"\\f326"}.ri-expand-up-down-line:before{content:"\\f327"}.ri-flickr-fill:before{content:"\\f328"}.ri-flickr-line:before{content:"\\f329"}.ri-forward-10-fill:before{content:"\\f32a"}.ri-forward-10-line:before{content:"\\f32b"}.ri-forward-15-fill:before{content:"\\f32c"}.ri-forward-15-line:before{content:"\\f32d"}.ri-forward-30-fill:before{content:"\\f32e"}.ri-forward-30-line:before{content:"\\f32f"}.ri-forward-5-fill:before{content:"\\f330"}.ri-forward-5-line:before{content:"\\f331"}.ri-graduation-cap-fill:before{content:"\\f332"}.ri-graduation-cap-line:before{content:"\\f333"}.ri-home-office-fill:before{content:"\\f334"}.ri-home-office-line:before{content:"\\f335"}.ri-hourglass-2-fill:before{content:"\\f336"}.ri-hourglass-2-line:before{content:"\\f337"}.ri-hourglass-fill:before{content:"\\f338"}.ri-hourglass-line:before{content:"\\f339"}.ri-javascript-fill:before{content:"\\f33a"}.ri-javascript-line:before{content:"\\f33b"}.ri-loop-left-fill:before{content:"\\f33c"}.ri-loop-left-line:before{content:"\\f33d"}.ri-loop-right-fill:before{content:"\\f33e"}.ri-loop-right-line:before{content:"\\f33f"}.ri-memories-fill:before{content:"\\f340"}.ri-memories-line:before{content:"\\f341"}.ri-meta-fill:before{content:"\\f342"}.ri-meta-line:before{content:"\\f343"}.ri-microsoft-loop-fill:before{content:"\\f344"}.ri-microsoft-loop-line:before{content:"\\f345"}.ri-nft-fill:before{content:"\\f346"}.ri-nft-line:before{content:"\\f347"}.ri-notion-fill:before{content:"\\f348"}.ri-notion-line:before{content:"\\f349"}.ri-openai-fill:before{content:"\\f34a"}.ri-openai-line:before{content:"\\f34b"}.ri-overline:before{content:"\\f34c"}.ri-p2p-fill:before{content:"\\f34d"}.ri-p2p-line:before{content:"\\f34e"}.ri-presentation-fill:before{content:"\\f34f"}.ri-presentation-line:before{content:"\\f350"}.ri-replay-10-fill:before{content:"\\f351"}.ri-replay-10-line:before{content:"\\f352"}.ri-replay-15-fill:before{content:"\\f353"}.ri-replay-15-line:before{content:"\\f354"}.ri-replay-30-fill:before{content:"\\f355"}.ri-replay-30-line:before{content:"\\f356"}.ri-replay-5-fill:before{content:"\\f357"}.ri-replay-5-line:before{content:"\\f358"}.ri-school-fill:before{content:"\\f359"}.ri-school-line:before{content:"\\f35a"}.ri-shining-2-fill:before{content:"\\f35b"}.ri-shining-2-line:before{content:"\\f35c"}.ri-shining-fill:before{content:"\\f35d"}.ri-shining-line:before{content:"\\f35e"}.ri-sketching:before{content:"\\f35f"}.ri-skip-down-fill:before{content:"\\f360"}.ri-skip-down-line:before{content:"\\f361"}.ri-skip-left-fill:before{content:"\\f362"}.ri-skip-left-line:before{content:"\\f363"}.ri-skip-right-fill:before{content:"\\f364"}.ri-skip-right-line:before{content:"\\f365"}.ri-skip-up-fill:before{content:"\\f366"}.ri-skip-up-line:before{content:"\\f367"}.ri-slow-down-fill:before{content:"\\f368"}.ri-slow-down-line:before{content:"\\f369"}.ri-sparkling-2-fill:before{content:"\\f36a"}.ri-sparkling-2-line:before{content:"\\f36b"}.ri-sparkling-fill:before{content:"\\f36c"}.ri-sparkling-line:before{content:"\\f36d"}.ri-speak-fill:before{content:"\\f36e"}.ri-speak-line:before{content:"\\f36f"}.ri-speed-up-fill:before{content:"\\f370"}.ri-speed-up-line:before{content:"\\f371"}.ri-tiktok-fill:before{content:"\\f372"}.ri-tiktok-line:before{content:"\\f373"}.ri-token-swap-fill:before{content:"\\f374"}.ri-token-swap-line:before{content:"\\f375"}.ri-unpin-fill:before{content:"\\f376"}.ri-unpin-line:before{content:"\\f377"}.ri-wechat-channels-fill:before{content:"\\f378"}.ri-wechat-channels-line:before{content:"\\f379"}.ri-wordpress-fill:before{content:"\\f37a"}.ri-wordpress-line:before{content:"\\f37b"}.ri-blender-fill:before{content:"\\f37c"}.ri-blender-line:before{content:"\\f37d"}.ri-emoji-sticker-fill:before{content:"\\f37e"}.ri-emoji-sticker-line:before{content:"\\f37f"}.ri-git-close-pull-request-fill:before{content:"\\f380"}.ri-git-close-pull-request-line:before{content:"\\f381"}.ri-instance-fill:before{content:"\\f382"}.ri-instance-line:before{content:"\\f383"}.ri-megaphone-fill:before{content:"\\f384"}.ri-megaphone-line:before{content:"\\f385"}.ri-pass-expired-fill:before{content:"\\f386"}.ri-pass-expired-line:before{content:"\\f387"}.ri-pass-pending-fill:before{content:"\\f388"}.ri-pass-pending-line:before{content:"\\f389"}.ri-pass-valid-fill:before{content:"\\f38a"}.ri-pass-valid-line:before{content:"\\f38b"}.ri-ai-generate:before{content:"\\f38c"}.ri-calendar-close-fill:before{content:"\\f38d"}.ri-calendar-close-line:before{content:"\\f38e"}.ri-draggable:before{content:"\\f38f"}.ri-font-family:before{content:"\\f390"}.ri-font-mono:before{content:"\\f391"}.ri-font-sans-serif:before{content:"\\f392"}.ri-hard-drive-3-fill:before{content:"\\f393"}.ri-hard-drive-3-line:before{content:"\\f394"}.ri-kick-fill:before{content:"\\f395"}.ri-kick-line:before{content:"\\f396"}.ri-list-check-3:before{content:"\\f397"}.ri-list-indefinite:before{content:"\\f398"}.ri-list-ordered-2:before{content:"\\f399"}.ri-list-radio:before{content:"\\f39a"}.ri-openbase-fill:before{content:"\\f39b"}.ri-openbase-line:before{content:"\\f39c"}.ri-planet-fill:before{content:"\\f39d"}.ri-planet-line:before{content:"\\f39e"}.ri-prohibited-fill:before{content:"\\f39f"}.ri-prohibited-line:before{content:"\\f3a0"}.ri-quote-text:before{content:"\\f3a1"}.ri-seo-fill:before{content:"\\f3a2"}.ri-seo-line:before{content:"\\f3a3"}.ri-slash-commands:before{content:"\\f3a4"}.ri-archive-2-fill:before{content:"\\f3a5"}.ri-archive-2-line:before{content:"\\f3a6"}.ri-inbox-2-fill:before{content:"\\f3a7"}.ri-inbox-2-line:before{content:"\\f3a8"}.ri-shake-hands-fill:before{content:"\\f3a9"}.ri-shake-hands-line:before{content:"\\f3aa"}.ri-supabase-fill:before{content:"\\f3ab"}.ri-supabase-line:before{content:"\\f3ac"}.ri-water-percent-fill:before{content:"\\f3ad"}.ri-water-percent-line:before{content:"\\f3ae"}.ri-yuque-fill:before{content:"\\f3af"}.ri-yuque-line:before{content:"\\f3b0"}.ri-crosshair-2-fill:before{content:"\\f3b1"}.ri-crosshair-2-line:before{content:"\\f3b2"}.ri-crosshair-fill:before{content:"\\f3b3"}.ri-crosshair-line:before{content:"\\f3b4"}.ri-file-close-fill:before{content:"\\f3b5"}.ri-file-close-line:before{content:"\\f3b6"}.ri-infinity-fill:before{content:"\\f3b7"}.ri-infinity-line:before{content:"\\f3b8"}.ri-rfid-fill:before{content:"\\f3b9"}.ri-rfid-line:before{content:"\\f3ba"}.ri-slash-commands-2:before{content:"\\f3bb"}.ri-user-forbid-fill:before{content:"\\f3bc"}.ri-user-forbid-line:before{content:"\\f3bd"}.ri-beer-fill:before{content:"\\f3be"}.ri-beer-line:before{content:"\\f3bf"}.ri-circle-fill:before{content:"\\f3c0"}.ri-circle-line:before{content:"\\f3c1"}.ri-dropdown-list:before{content:"\\f3c2"}.ri-file-image-fill:before{content:"\\f3c3"}.ri-file-image-line:before{content:"\\f3c4"}.ri-file-pdf-2-fill:before{content:"\\f3c5"}.ri-file-pdf-2-line:before{content:"\\f3c6"}.ri-file-video-fill:before{content:"\\f3c7"}.ri-file-video-line:before{content:"\\f3c8"}.ri-folder-image-fill:before{content:"\\f3c9"}.ri-folder-image-line:before{content:"\\f3ca"}.ri-folder-video-fill:before{content:"\\f3cb"}.ri-folder-video-line:before{content:"\\f3cc"}.ri-hexagon-fill:before{content:"\\f3cd"}.ri-hexagon-line:before{content:"\\f3ce"}.ri-menu-search-fill:before{content:"\\f3cf"}.ri-menu-search-line:before{content:"\\f3d0"}.ri-octagon-fill:before{content:"\\f3d1"}.ri-octagon-line:before{content:"\\f3d2"}.ri-pentagon-fill:before{content:"\\f3d3"}.ri-pentagon-line:before{content:"\\f3d4"}.ri-rectangle-fill:before{content:"\\f3d5"}.ri-rectangle-line:before{content:"\\f3d6"}.ri-robot-2-fill:before{content:"\\f3d7"}.ri-robot-2-line:before{content:"\\f3d8"}.ri-shapes-fill:before{content:"\\f3d9"}.ri-shapes-line:before{content:"\\f3da"}.ri-square-fill:before{content:"\\f3db"}.ri-square-line:before{content:"\\f3dc"}.ri-tent-fill:before{content:"\\f3dd"}.ri-tent-line:before{content:"\\f3de"}.ri-threads-fill:before{content:"\\f3df"}.ri-threads-line:before{content:"\\f3e0"}.ri-tree-fill:before{content:"\\f3e1"}.ri-tree-line:before{content:"\\f3e2"}.ri-triangle-fill:before{content:"\\f3e3"}.ri-triangle-line:before{content:"\\f3e4"}.ri-twitter-x-fill:before{content:"\\f3e5"}.ri-twitter-x-line:before{content:"\\f3e6"}.ri-verified-badge-fill:before{content:"\\f3e7"}.ri-verified-badge-line:before{content:"\\f3e8"}.ri-armchair-fill:before{content:"\\f3e9"}.ri-armchair-line:before{content:"\\f3ea"}.ri-bnb-fill:before{content:"\\f3eb"}.ri-bnb-line:before{content:"\\f3ec"}.ri-bread-fill:before{content:"\\f3ed"}.ri-bread-line:before{content:"\\f3ee"}.ri-btc-fill:before{content:"\\f3ef"}.ri-btc-line:before{content:"\\f3f0"}.ri-calendar-schedule-fill:before{content:"\\f3f1"}.ri-calendar-schedule-line:before{content:"\\f3f2"}.ri-dice-1-fill:before{content:"\\f3f3"}.ri-dice-1-line:before{content:"\\f3f4"}.ri-dice-2-fill:before{content:"\\f3f5"}.ri-dice-2-line:before{content:"\\f3f6"}.ri-dice-3-fill:before{content:"\\f3f7"}.ri-dice-3-line:before{content:"\\f3f8"}.ri-dice-4-fill:before{content:"\\f3f9"}.ri-dice-4-line:before{content:"\\f3fa"}.ri-dice-5-fill:before{content:"\\f3fb"}.ri-dice-5-line:before{content:"\\f3fc"}.ri-dice-6-fill:before{content:"\\f3fd"}.ri-dice-6-line:before{content:"\\f3fe"}.ri-dice-fill:before{content:"\\f3ff"}.ri-dice-line:before{content:"\\f400"}.ri-drinks-fill:before{content:"\\f401"}.ri-drinks-line:before{content:"\\f402"}.ri-equalizer-2-fill:before{content:"\\f403"}.ri-equalizer-2-line:before{content:"\\f404"}.ri-equalizer-3-fill:before{content:"\\f405"}.ri-equalizer-3-line:before{content:"\\f406"}.ri-eth-fill:before{content:"\\f407"}.ri-eth-line:before{content:"\\f408"}.ri-flower-fill:before{content:"\\f409"}.ri-flower-line:before{content:"\\f40a"}.ri-glasses-2-fill:before{content:"\\f40b"}.ri-glasses-2-line:before{content:"\\f40c"}.ri-glasses-fill:before{content:"\\f40d"}.ri-glasses-line:before{content:"\\f40e"}.ri-goggles-fill:before{content:"\\f40f"}.ri-goggles-line:before{content:"\\f410"}.ri-image-circle-fill:before{content:"\\f411"}.ri-image-circle-line:before{content:"\\f412"}.ri-info-i:before{content:"\\f413"}.ri-money-rupee-circle-fill:before{content:"\\f414"}.ri-money-rupee-circle-line:before{content:"\\f415"}.ri-news-fill:before{content:"\\f416"}.ri-news-line:before{content:"\\f417"}.ri-robot-3-fill:before{content:"\\f418"}.ri-robot-3-line:before{content:"\\f419"}.ri-share-2-fill:before{content:"\\f41a"}.ri-share-2-line:before{content:"\\f41b"}.ri-sofa-fill:before{content:"\\f41c"}.ri-sofa-line:before{content:"\\f41d"}.ri-svelte-fill:before{content:"\\f41e"}.ri-svelte-line:before{content:"\\f41f"}.ri-vk-fill:before{content:"\\f420"}.ri-vk-line:before{content:"\\f421"}.ri-xrp-fill:before{content:"\\f422"}.ri-xrp-line:before{content:"\\f423"}.ri-xtz-fill:before{content:"\\f424"}.ri-xtz-line:before{content:"\\f425"}.ri-archive-stack-fill:before{content:"\\f426"}.ri-archive-stack-line:before{content:"\\f427"}.ri-bowl-fill:before{content:"\\f428"}.ri-bowl-line:before{content:"\\f429"}.ri-calendar-view:before{content:"\\f42a"}.ri-carousel-view:before{content:"\\f42b"}.ri-code-block:before{content:"\\f42c"}.ri-color-filter-fill:before{content:"\\f42d"}.ri-color-filter-line:before{content:"\\f42e"}.ri-contacts-book-3-fill:before{content:"\\f42f"}.ri-contacts-book-3-line:before{content:"\\f430"}.ri-contract-fill:before{content:"\\f431"}.ri-contract-line:before{content:"\\f432"}.ri-drinks-2-fill:before{content:"\\f433"}.ri-drinks-2-line:before{content:"\\f434"}.ri-export-fill:before{content:"\\f435"}.ri-export-line:before{content:"\\f436"}.ri-file-check-fill:before{content:"\\f437"}.ri-file-check-line:before{content:"\\f438"}.ri-focus-mode:before{content:"\\f439"}.ri-folder-6-fill:before{content:"\\f43a"}.ri-folder-6-line:before{content:"\\f43b"}.ri-folder-check-fill:before{content:"\\f43c"}.ri-folder-check-line:before{content:"\\f43d"}.ri-folder-close-fill:before{content:"\\f43e"}.ri-folder-close-line:before{content:"\\f43f"}.ri-folder-cloud-fill:before{content:"\\f440"}.ri-folder-cloud-line:before{content:"\\f441"}.ri-gallery-view-2:before{content:"\\f442"}.ri-gallery-view:before{content:"\\f443"}.ri-hand:before{content:"\\f444"}.ri-import-fill:before{content:"\\f445"}.ri-import-line:before{content:"\\f446"}.ri-information-2-fill:before{content:"\\f447"}.ri-information-2-line:before{content:"\\f448"}.ri-kanban-view-2:before{content:"\\f449"}.ri-kanban-view:before{content:"\\f44a"}.ri-list-view:before{content:"\\f44b"}.ri-lock-star-fill:before{content:"\\f44c"}.ri-lock-star-line:before{content:"\\f44d"}.ri-puzzle-2-fill:before{content:"\\f44e"}.ri-puzzle-2-line:before{content:"\\f44f"}.ri-puzzle-fill:before{content:"\\f450"}.ri-puzzle-line:before{content:"\\f451"}.ri-ram-2-fill:before{content:"\\f452"}.ri-ram-2-line:before{content:"\\f453"}.ri-ram-fill:before{content:"\\f454"}.ri-ram-line:before{content:"\\f455"}.ri-receipt-fill:before{content:"\\f456"}.ri-receipt-line:before{content:"\\f457"}.ri-shadow-fill:before{content:"\\f458"}.ri-shadow-line:before{content:"\\f459"}.ri-sidebar-fold-fill:before{content:"\\f45a"}.ri-sidebar-fold-line:before{content:"\\f45b"}.ri-sidebar-unfold-fill:before{content:"\\f45c"}.ri-sidebar-unfold-line:before{content:"\\f45d"}.ri-slideshow-view:before{content:"\\f45e"}.ri-sort-alphabet-asc:before{content:"\\f45f"}.ri-sort-alphabet-desc:before{content:"\\f460"}.ri-sort-number-asc:before{content:"\\f461"}.ri-sort-number-desc:before{content:"\\f462"}.ri-stacked-view:before{content:"\\f463"}.ri-sticky-note-add-fill:before{content:"\\f464"}.ri-sticky-note-add-line:before{content:"\\f465"}.ri-swap-2-fill:before{content:"\\f466"}.ri-swap-2-line:before{content:"\\f467"}.ri-swap-3-fill:before{content:"\\f468"}.ri-swap-3-line:before{content:"\\f469"}.ri-table-3:before{content:"\\f46a"}.ri-table-view:before{content:"\\f46b"}.ri-text-block:before{content:"\\f46c"}.ri-text-snippet:before{content:"\\f46d"}.ri-timeline-view:before{content:"\\f46e"}.ri-blogger-fill:before{content:"\\f46f"}.ri-blogger-line:before{content:"\\f470"}.ri-chat-thread-fill:before{content:"\\f471"}.ri-chat-thread-line:before{content:"\\f472"}.ri-discount-percent-fill:before{content:"\\f473"}.ri-discount-percent-line:before{content:"\\f474"}.ri-exchange-2-fill:before{content:"\\f475"}.ri-exchange-2-line:before{content:"\\f476"}.ri-git-fork-fill:before{content:"\\f477"}.ri-git-fork-line:before{content:"\\f478"}.ri-input-field:before{content:"\\f479"}.ri-progress-1-fill:before{content:"\\f47a"}.ri-progress-1-line:before{content:"\\f47b"}.ri-progress-2-fill:before{content:"\\f47c"}.ri-progress-2-line:before{content:"\\f47d"}.ri-progress-3-fill:before{content:"\\f47e"}.ri-progress-3-line:before{content:"\\f47f"}.ri-progress-4-fill:before{content:"\\f480"}.ri-progress-4-line:before{content:"\\f481"}.ri-progress-5-fill:before{content:"\\f482"}.ri-progress-5-line:before{content:"\\f483"}.ri-progress-6-fill:before{content:"\\f484"}.ri-progress-6-line:before{content:"\\f485"}.ri-progress-7-fill:before{content:"\\f486"}.ri-progress-7-line:before{content:"\\f487"}.ri-progress-8-fill:before{content:"\\f488"}.ri-progress-8-line:before{content:"\\f489"}.ri-remix-run-fill:before{content:"\\f48a"}.ri-remix-run-line:before{content:"\\f48b"}.ri-signpost-fill:before{content:"\\f48c"}.ri-signpost-line:before{content:"\\f48d"}.ri-time-zone-fill:before{content:"\\f48e"}.ri-time-zone-line:before{content:"\\f48f"}.ri-arrow-down-wide-fill:before{content:"\\f490"}.ri-arrow-down-wide-line:before{content:"\\f491"}.ri-arrow-left-wide-fill:before{content:"\\f492"}.ri-arrow-left-wide-line:before{content:"\\f493"}.ri-arrow-right-wide-fill:before{content:"\\f494"}.ri-arrow-right-wide-line:before{content:"\\f495"}.ri-arrow-up-wide-fill:before{content:"\\f496"}.ri-arrow-up-wide-line:before{content:"\\f497"}.ri-bluesky-fill:before{content:"\\f498"}.ri-bluesky-line:before{content:"\\f499"}.ri-expand-height-fill:before{content:"\\f49a"}.ri-expand-height-line:before{content:"\\f49b"}.ri-expand-width-fill:before{content:"\\f49c"}.ri-expand-width-line:before{content:"\\f49d"}.ri-forward-end-fill:before{content:"\\f49e"}.ri-forward-end-line:before{content:"\\f49f"}.ri-forward-end-mini-fill:before{content:"\\f4a0"}.ri-forward-end-mini-line:before{content:"\\f4a1"}.ri-friendica-fill:before{content:"\\f4a2"}.ri-friendica-line:before{content:"\\f4a3"}.ri-git-pr-draft-fill:before{content:"\\f4a4"}.ri-git-pr-draft-line:before{content:"\\f4a5"}.ri-play-reverse-fill:before{content:"\\f4a6"}.ri-play-reverse-line:before{content:"\\f4a7"}.ri-play-reverse-mini-fill:before{content:"\\f4a8"}.ri-play-reverse-mini-line:before{content:"\\f4a9"}.ri-rewind-start-fill:before{content:"\\f4aa"}.ri-rewind-start-line:before{content:"\\f4ab"}.ri-rewind-start-mini-fill:before{content:"\\f4ac"}.ri-rewind-start-mini-line:before{content:"\\f4ad"}.ri-scroll-to-bottom-fill:before{content:"\\f4ae"}.ri-scroll-to-bottom-line:before{content:"\\f4af"}.ri-add-large-fill:before{content:"\\f4b0"}.ri-add-large-line:before{content:"\\f4b1"}.ri-aed-electrodes-fill:before{content:"\\f4b2"}.ri-aed-electrodes-line:before{content:"\\f4b3"}.ri-aed-fill:before{content:"\\f4b4"}.ri-aed-line:before{content:"\\f4b5"}.ri-alibaba-cloud-fill:before{content:"\\f4b6"}.ri-alibaba-cloud-line:before{content:"\\f4b7"}.ri-align-item-bottom-fill:before{content:"\\f4b8"}.ri-align-item-bottom-line:before{content:"\\f4b9"}.ri-align-item-horizontal-center-fill:before{content:"\\f4ba"}.ri-align-item-horizontal-center-line:before{content:"\\f4bb"}.ri-align-item-left-fill:before{content:"\\f4bc"}.ri-align-item-left-line:before{content:"\\f4bd"}.ri-align-item-right-fill:before{content:"\\f4be"}.ri-align-item-right-line:before{content:"\\f4bf"}.ri-align-item-top-fill:before{content:"\\f4c0"}.ri-align-item-top-line:before{content:"\\f4c1"}.ri-align-item-vertical-center-fill:before{content:"\\f4c2"}.ri-align-item-vertical-center-line:before{content:"\\f4c3"}.ri-apps-2-add-fill:before{content:"\\f4c4"}.ri-apps-2-add-line:before{content:"\\f4c5"}.ri-close-large-fill:before{content:"\\f4c6"}.ri-close-large-line:before{content:"\\f4c7"}.ri-collapse-diagonal-2-fill:before{content:"\\f4c8"}.ri-collapse-diagonal-2-line:before{content:"\\f4c9"}.ri-collapse-diagonal-fill:before{content:"\\f4ca"}.ri-collapse-diagonal-line:before{content:"\\f4cb"}.ri-dashboard-horizontal-fill:before{content:"\\f4cc"}.ri-dashboard-horizontal-line:before{content:"\\f4cd"}.ri-expand-diagonal-2-fill:before{content:"\\f4ce"}.ri-expand-diagonal-2-line:before{content:"\\f4cf"}.ri-expand-diagonal-fill:before{content:"\\f4d0"}.ri-expand-diagonal-line:before{content:"\\f4d1"}.ri-firebase-fill:before{content:"\\f4d2"}.ri-firebase-line:before{content:"\\f4d3"}.ri-flip-horizontal-2-fill:before{content:"\\f4d4"}.ri-flip-horizontal-2-line:before{content:"\\f4d5"}.ri-flip-horizontal-fill:before{content:"\\f4d6"}.ri-flip-horizontal-line:before{content:"\\f4d7"}.ri-flip-vertical-2-fill:before{content:"\\f4d8"}.ri-flip-vertical-2-line:before{content:"\\f4d9"}.ri-flip-vertical-fill:before{content:"\\f4da"}.ri-flip-vertical-line:before{content:"\\f4db"}.ri-formula:before{content:"\\f4dc"}.ri-function-add-fill:before{content:"\\f4dd"}.ri-function-add-line:before{content:"\\f4de"}.ri-goblet-2-fill:before{content:"\\f4df"}.ri-goblet-2-line:before{content:"\\f4e0"}.ri-golf-ball-fill:before{content:"\\f4e1"}.ri-golf-ball-line:before{content:"\\f4e2"}.ri-group-3-fill:before{content:"\\f4e3"}.ri-group-3-line:before{content:"\\f4e4"}.ri-heart-add-2-fill:before{content:"\\f4e5"}.ri-heart-add-2-line:before{content:"\\f4e6"}.ri-id-card-fill:before{content:"\\f4e7"}.ri-id-card-line:before{content:"\\f4e8"}.ri-information-off-fill:before{content:"\\f4e9"}.ri-information-off-line:before{content:"\\f4ea"}.ri-java-fill:before{content:"\\f4eb"}.ri-java-line:before{content:"\\f4ec"}.ri-layout-grid-2-fill:before{content:"\\f4ed"}.ri-layout-grid-2-line:before{content:"\\f4ee"}.ri-layout-horizontal-fill:before{content:"\\f4ef"}.ri-layout-horizontal-line:before{content:"\\f4f0"}.ri-layout-vertical-fill:before{content:"\\f4f1"}.ri-layout-vertical-line:before{content:"\\f4f2"}.ri-menu-fold-2-fill:before{content:"\\f4f3"}.ri-menu-fold-2-line:before{content:"\\f4f4"}.ri-menu-fold-3-fill:before{content:"\\f4f5"}.ri-menu-fold-3-line:before{content:"\\f4f6"}.ri-menu-fold-4-fill:before{content:"\\f4f7"}.ri-menu-fold-4-line:before{content:"\\f4f8"}.ri-menu-unfold-2-fill:before{content:"\\f4f9"}.ri-menu-unfold-2-line:before{content:"\\f4fa"}.ri-menu-unfold-3-fill:before{content:"\\f4fb"}.ri-menu-unfold-3-line:before{content:"\\f4fc"}.ri-menu-unfold-4-fill:before{content:"\\f4fd"}.ri-menu-unfold-4-line:before{content:"\\f4fe"}.ri-mobile-download-fill:before{content:"\\f4ff"}.ri-mobile-download-line:before{content:"\\f500"}.ri-nextjs-fill:before{content:"\\f501"}.ri-nextjs-line:before{content:"\\f502"}.ri-nodejs-fill:before{content:"\\f503"}.ri-nodejs-line:before{content:"\\f504"}.ri-pause-large-fill:before{content:"\\f505"}.ri-pause-large-line:before{content:"\\f506"}.ri-play-large-fill:before{content:"\\f507"}.ri-play-large-line:before{content:"\\f508"}.ri-play-reverse-large-fill:before{content:"\\f509"}.ri-play-reverse-large-line:before{content:"\\f50a"}.ri-police-badge-fill:before{content:"\\f50b"}.ri-police-badge-line:before{content:"\\f50c"}.ri-prohibited-2-fill:before{content:"\\f50d"}.ri-prohibited-2-line:before{content:"\\f50e"}.ri-shopping-bag-4-fill:before{content:"\\f50f"}.ri-shopping-bag-4-line:before{content:"\\f510"}.ri-snowflake-fill:before{content:"\\f511"}.ri-snowflake-line:before{content:"\\f512"}.ri-square-root:before{content:"\\f513"}.ri-stop-large-fill:before{content:"\\f514"}.ri-stop-large-line:before{content:"\\f515"}.ri-tailwind-css-fill:before{content:"\\f516"}.ri-tailwind-css-line:before{content:"\\f517"}.ri-tooth-fill:before{content:"\\f518"}.ri-tooth-line:before{content:"\\f519"}.ri-video-off-fill:before{content:"\\f51a"}.ri-video-off-line:before{content:"\\f51b"}.ri-video-on-fill:before{content:"\\f51c"}.ri-video-on-line:before{content:"\\f51d"}.ri-webhook-fill:before{content:"\\f51e"}.ri-webhook-line:before{content:"\\f51f"}.ri-weight-fill:before{content:"\\f520"}.ri-weight-line:before{content:"\\f521"}.ri-book-shelf-fill:before{content:"\\f522"}.ri-book-shelf-line:before{content:"\\f523"}.ri-brain-2-fill:before{content:"\\f524"}.ri-brain-2-line:before{content:"\\f525"}.ri-chat-search-fill:before{content:"\\f526"}.ri-chat-search-line:before{content:"\\f527"}.ri-chat-unread-fill:before{content:"\\f528"}.ri-chat-unread-line:before{content:"\\f529"}.ri-collapse-horizontal-fill:before{content:"\\f52a"}.ri-collapse-horizontal-line:before{content:"\\f52b"}.ri-collapse-vertical-fill:before{content:"\\f52c"}.ri-collapse-vertical-line:before{content:"\\f52d"}.ri-dna-fill:before{content:"\\f52e"}.ri-dna-line:before{content:"\\f52f"}.ri-dropper-fill:before{content:"\\f530"}.ri-dropper-line:before{content:"\\f531"}.ri-expand-diagonal-s-2-fill:before{content:"\\f532"}.ri-expand-diagonal-s-2-line:before{content:"\\f533"}.ri-expand-diagonal-s-fill:before{content:"\\f534"}.ri-expand-diagonal-s-line:before{content:"\\f535"}.ri-expand-horizontal-fill:before{content:"\\f536"}.ri-expand-horizontal-line:before{content:"\\f537"}.ri-expand-horizontal-s-fill:before{content:"\\f538"}.ri-expand-horizontal-s-line:before{content:"\\f539"}.ri-expand-vertical-fill:before{content:"\\f53a"}.ri-expand-vertical-line:before{content:"\\f53b"}.ri-expand-vertical-s-fill:before{content:"\\f53c"}.ri-expand-vertical-s-line:before{content:"\\f53d"}.ri-gemini-fill:before{content:"\\f53e"}.ri-gemini-line:before{content:"\\f53f"}.ri-reset-left-fill:before{content:"\\f540"}.ri-reset-left-line:before{content:"\\f541"}.ri-reset-right-fill:before{content:"\\f542"}.ri-reset-right-line:before{content:"\\f543"}.ri-stairs-fill:before{content:"\\f544"}.ri-stairs-line:before{content:"\\f545"}.ri-telegram-2-fill:before{content:"\\f546"}.ri-telegram-2-line:before{content:"\\f547"}.ri-triangular-flag-fill:before{content:"\\f548"}.ri-triangular-flag-line:before{content:"\\f549"}.ri-user-minus-fill:before{content:"\\f54a"}.ri-user-minus-line:before{content:"\\f54b"}.ri-account-box-2-fill:before{content:"\\f54c"}.ri-account-box-2-line:before{content:"\\f54d"}.ri-account-circle-2-fill:before{content:"\\f54e"}.ri-account-circle-2-line:before{content:"\\f54f"}.ri-alarm-snooze-fill:before{content:"\\f550"}.ri-alarm-snooze-line:before{content:"\\f551"}.ri-arrow-down-box-fill:before{content:"\\f552"}.ri-arrow-down-box-line:before{content:"\\f553"}.ri-arrow-left-box-fill:before{content:"\\f554"}.ri-arrow-left-box-line:before{content:"\\f555"}.ri-arrow-left-down-box-fill:before{content:"\\f556"}.ri-arrow-left-down-box-line:before{content:"\\f557"}.ri-arrow-left-up-box-fill:before{content:"\\f558"}.ri-arrow-left-up-box-line:before{content:"\\f559"}.ri-arrow-right-box-fill:before{content:"\\f55a"}.ri-arrow-right-box-line:before{content:"\\f55b"}.ri-arrow-right-down-box-fill:before{content:"\\f55c"}.ri-arrow-right-down-box-line:before{content:"\\f55d"}.ri-arrow-right-up-box-fill:before{content:"\\f55e"}.ri-arrow-right-up-box-line:before{content:"\\f55f"}.ri-arrow-up-box-fill:before{content:"\\f560"}.ri-arrow-up-box-line:before{content:"\\f561"}.ri-bar-chart-box-ai-fill:before{content:"\\f562"}.ri-bar-chart-box-ai-line:before{content:"\\f563"}.ri-brush-ai-fill:before{content:"\\f564"}.ri-brush-ai-line:before{content:"\\f565"}.ri-camera-ai-fill:before{content:"\\f566"}.ri-camera-ai-line:before{content:"\\f567"}.ri-chat-ai-fill:before{content:"\\f568"}.ri-chat-ai-line:before{content:"\\f569"}.ri-chat-smile-ai-fill:before{content:"\\f56a"}.ri-chat-smile-ai-line:before{content:"\\f56b"}.ri-chat-voice-ai-fill:before{content:"\\f56c"}.ri-chat-voice-ai-line:before{content:"\\f56d"}.ri-code-ai-fill:before{content:"\\f56e"}.ri-code-ai-line:before{content:"\\f56f"}.ri-color-filter-ai-fill:before{content:"\\f570"}.ri-color-filter-ai-line:before{content:"\\f571"}.ri-custom-size:before{content:"\\f572"}.ri-fediverse-fill:before{content:"\\f573"}.ri-fediverse-line:before{content:"\\f574"}.ri-flag-off-fill:before{content:"\\f575"}.ri-flag-off-line:before{content:"\\f576"}.ri-home-9-fill:before{content:"\\f577"}.ri-home-9-line:before{content:"\\f578"}.ri-image-ai-fill:before{content:"\\f579"}.ri-image-ai-line:before{content:"\\f57a"}.ri-image-circle-ai-fill:before{content:"\\f57b"}.ri-image-circle-ai-line:before{content:"\\f57c"}.ri-info-card-fill:before{content:"\\f57d"}.ri-info-card-line:before{content:"\\f57e"}.ri-landscape-ai-fill:before{content:"\\f57f"}.ri-landscape-ai-line:before{content:"\\f580"}.ri-letter-spacing-2:before{content:"\\f581"}.ri-line-height-2:before{content:"\\f582"}.ri-mail-ai-fill:before{content:"\\f583"}.ri-mail-ai-line:before{content:"\\f584"}.ri-mic-2-ai-fill:before{content:"\\f585"}.ri-mic-2-ai-line:before{content:"\\f586"}.ri-mic-ai-fill:before{content:"\\f587"}.ri-mic-ai-line:before{content:"\\f588"}.ri-movie-ai-fill:before{content:"\\f589"}.ri-movie-ai-line:before{content:"\\f58a"}.ri-music-ai-fill:before{content:"\\f58b"}.ri-music-ai-line:before{content:"\\f58c"}.ri-notification-snooze-fill:before{content:"\\f58d"}.ri-notification-snooze-line:before{content:"\\f58e"}.ri-php-fill:before{content:"\\f58f"}.ri-php-line:before{content:"\\f590"}.ri-pix-fill:before{content:"\\f591"}.ri-pix-line:before{content:"\\f592"}.ri-pulse-ai-fill:before{content:"\\f593"}.ri-pulse-ai-line:before{content:"\\f594"}.ri-quill-pen-ai-fill:before{content:"\\f595"}.ri-quill-pen-ai-line:before{content:"\\f596"}.ri-speak-ai-fill:before{content:"\\f597"}.ri-speak-ai-line:before{content:"\\f598"}.ri-star-off-fill:before{content:"\\f599"}.ri-star-off-line:before{content:"\\f59a"}.ri-translate-ai-2:before{content:"\\f59b"}.ri-translate-ai:before{content:"\\f59c"}.ri-user-community-fill:before{content:"\\f59d"}.ri-user-community-line:before{content:"\\f59e"}.ri-vercel-fill:before{content:"\\f59f"}.ri-vercel-line:before{content:"\\f5a0"}.ri-video-ai-fill:before{content:"\\f5a1"}.ri-video-ai-line:before{content:"\\f5a2"}.ri-video-on-ai-fill:before{content:"\\f5a3"}.ri-video-on-ai-line:before{content:"\\f5a4"}.ri-voice-ai-fill:before{content:"\\f5a5"}.ri-voice-ai-line:before{content:"\\f5a6"}.ri-ai-generate-2:before{content:"\\f5a7"}.ri-ai-generate-text:before{content:"\\f5a8"}.ri-anthropic-fill:before{content:"\\f5a9"}.ri-anthropic-line:before{content:"\\f5aa"}.ri-apps-2-ai-fill:before{content:"\\f5ab"}.ri-apps-2-ai-line:before{content:"\\f5ac"}.ri-camera-lens-ai-fill:before{content:"\\f5ad"}.ri-camera-lens-ai-line:before{content:"\\f5ae"}.ri-clapperboard-ai-fill:before{content:"\\f5af"}.ri-clapperboard-ai-line:before{content:"\\f5b0"}.ri-claude-fill:before{content:"\\f5b1"}.ri-claude-line:before{content:"\\f5b2"}.ri-closed-captioning-ai-fill:before{content:"\\f5b3"}.ri-closed-captioning-ai-line:before{content:"\\f5b4"}.ri-dvd-ai-fill:before{content:"\\f5b5"}.ri-dvd-ai-line:before{content:"\\f5b6"}.ri-film-ai-fill:before{content:"\\f5b7"}.ri-film-ai-line:before{content:"\\f5b8"}.ri-font-size-ai:before{content:"\\f5b9"}.ri-mixtral-fill:before{content:"\\f5ba"}.ri-mixtral-line:before{content:"\\f5bb"}.ri-movie-2-ai-fill:before{content:"\\f5bc"}.ri-movie-2-ai-line:before{content:"\\f5bd"}.ri-mv-ai-fill:before{content:"\\f5be"}.ri-mv-ai-line:before{content:"\\f5bf"}.ri-perplexity-fill:before{content:"\\f5c0"}.ri-perplexity-line:before{content:"\\f5c1"}.ri-poker-clubs-fill:before{content:"\\f5c2"}.ri-poker-clubs-line:before{content:"\\f5c3"}.ri-poker-diamonds-fill:before{content:"\\f5c4"}.ri-poker-diamonds-line:before{content:"\\f5c5"}.ri-poker-hearts-fill:before{content:"\\f5c6"}.ri-poker-hearts-line:before{content:"\\f5c7"}.ri-poker-spades-fill:before{content:"\\f5c8"}.ri-poker-spades-line:before{content:"\\f5c9"}.ri-safe-3-fill:before{content:"\\f5ca"}.ri-safe-3-line:before{content:"\\f5cb"}.ri-accessibility-fill:before{content:"\\f5cc"}.ri-accessibility-line:before{content:"\\f5cd"}.ri-alarm-add-fill:before{content:"\\f5ce"}.ri-alarm-add-line:before{content:"\\f5cf"}.ri-arrow-down-long-fill:before{content:"\\f5d0"}.ri-arrow-down-long-line:before{content:"\\f5d1"}.ri-arrow-left-down-long-fill:before{content:"\\f5d2"}.ri-arrow-left-down-long-line:before{content:"\\f5d3"}.ri-arrow-left-long-fill:before{content:"\\f5d4"}.ri-arrow-left-long-line:before{content:"\\f5d5"}.ri-arrow-left-up-long-fill:before{content:"\\f5d6"}.ri-arrow-left-up-long-line:before{content:"\\f5d7"}.ri-arrow-right-down-long-fill:before{content:"\\f5d8"}.ri-arrow-right-down-long-line:before{content:"\\f5d9"}.ri-arrow-right-long-fill:before{content:"\\f5da"}.ri-arrow-right-long-line:before{content:"\\f5db"}.ri-arrow-right-up-long-fill:before{content:"\\f5dc"}.ri-arrow-right-up-long-line:before{content:"\\f5dd"}.ri-arrow-up-long-fill:before{content:"\\f5de"}.ri-arrow-up-long-line:before{content:"\\f5df"}.ri-chess-fill:before{content:"\\f5e0"}.ri-chess-line:before{content:"\\f5e1"}.ri-diamond-fill:before{content:"\\f5e2"}.ri-diamond-line:before{content:"\\f5e3"}.ri-diamond-ring-fill:before{content:"\\f5e4"}.ri-diamond-ring-line:before{content:"\\f5e5"}.ri-figma-fill:before{content:"\\f5e6"}.ri-figma-line:before{content:"\\f5e7"}.ri-firefox-browser-fill:before{content:"\\f5e8"}.ri-firefox-browser-line:before{content:"\\f5e9"}.ri-jewelry-fill:before{content:"\\f5ea"}.ri-jewelry-line:before{content:"\\f5eb"}.ri-multi-image-fill:before{content:"\\f5ec"}.ri-multi-image-line:before{content:"\\f5ed"}.ri-no-credit-card-fill:before{content:"\\f5ee"}.ri-no-credit-card-line:before{content:"\\f5ef"}.ri-service-bell-fill:before{content:"\\f5f0"}.ri-service-bell-line:before{content:"\\f5f1"}.ri-ai-agent-fill:before{content:"\\f5f2"}.ri-ai-agent-line:before{content:"\\f5f3"}.ri-ai-generate-2-fill:before{content:"\\f5f4"}.ri-ai-generate-2-line:before{content:"\\f5f5"}.ri-ai-generate-3d-fill:before{content:"\\f5f6"}.ri-ai-generate-3d-line:before{content:"\\f5f7"}.ri-ai:before{content:"\\f5f8"}.ri-apps-ai-fill:before{content:"\\f5f9"}.ri-apps-ai-line:before{content:"\\f5fa"}.ri-atom-fill:before{content:"\\f5fb"}.ri-atom-line:before{content:"\\f5fc"}.ri-book-ai-fill:before{content:"\\f5fd"}.ri-book-ai-line:before{content:"\\f5fe"}.ri-brain-3-fill:before{content:"\\f5ff"}.ri-brain-3-line:before{content:"\\f600"}.ri-brain-ai-3-fill:before{content:"\\f601"}.ri-brain-ai-3-line:before{content:"\\f602"}.ri-brush-ai-3-fill:before{content:"\\f603"}.ri-brush-ai-3-line:before{content:"\\f604"}.ri-camera-4-fill:before{content:"\\f605"}.ri-camera-4-line:before{content:"\\f606"}.ri-camera-ai-2-fill:before{content:"\\f607"}.ri-camera-ai-2-line:before{content:"\\f608"}.ri-chat-ai-2-fill:before{content:"\\f609"}.ri-chat-ai-2-line:before{content:"\\f60a"}.ri-chat-ai-3-fill:before{content:"\\f60b"}.ri-chat-ai-3-line:before{content:"\\f60c"}.ri-chat-ai-4-fill:before{content:"\\f60d"}.ri-chat-ai-4-line:before{content:"\\f60e"}.ri-chat-smile-ai-3-fill:before{content:"\\f60f"}.ri-chat-smile-ai-3-line:before{content:"\\f610"}.ri-deepseek-fill:before{content:"\\f611"}.ri-deepseek-line:before{content:"\\f612"}.ri-file-ai-2-fill:before{content:"\\f613"}.ri-file-ai-2-line:before{content:"\\f614"}.ri-file-ai-fill:before{content:"\\f615"}.ri-file-ai-line:before{content:"\\f616"}.ri-function-ai-fill:before{content:"\\f617"}.ri-function-ai-line:before{content:"\\f618"}.ri-game-2-fill:before{content:"\\f619"}.ri-game-2-line:before{content:"\\f61a"}.ri-goblet-broken-fill:before{content:"\\f61b"}.ri-goblet-broken-line:before{content:"\\f61c"}.ri-lightbulb-ai-fill:before{content:"\\f61d"}.ri-lightbulb-ai-line:before{content:"\\f61e"}.ri-loop-left-ai-fill:before{content:"\\f61f"}.ri-loop-left-ai-line:before{content:"\\f620"}.ri-loop-right-ai-fill:before{content:"\\f621"}.ri-loop-right-ai-line:before{content:"\\f622"}.ri-message-ai-3-fill:before{content:"\\f623"}.ri-message-ai-3-line:before{content:"\\f624"}.ri-painting-ai-fill:before{content:"\\f625"}.ri-painting-ai-line:before{content:"\\f626"}.ri-painting-fill:before{content:"\\f627"}.ri-painting-line:before{content:"\\f628"}.ri-pencil-ai-2-fill:before{content:"\\f629"}.ri-pencil-ai-2-line:before{content:"\\f62a"}.ri-pencil-ai-fill:before{content:"\\f62b"}.ri-pencil-ai-line:before{content:"\\f62c"}.ri-remix-fill:before{content:"\\f62d"}.ri-remix-line:before{content:"\\f62e"}.ri-search-ai-2-fill:before{content:"\\f62f"}.ri-search-ai-2-line:before{content:"\\f630"}.ri-search-ai-3-fill:before{content:"\\f631"}.ri-search-ai-3-line:before{content:"\\f632"}.ri-search-ai-4-fill:before{content:"\\f633"}.ri-search-ai-4-line:before{content:"\\f634"}.ri-search-ai-fill:before{content:"\\f635"}.ri-search-ai-line:before{content:"\\f636"}.ri-speech-to-text-fill:before{content:"\\f637"}.ri-speech-to-text-line:before{content:"\\f638"}.ri-target-fill:before{content:"\\f639"}.ri-target-line:before{content:"\\f63a"}.ri-text-to-speech-fill:before{content:"\\f63b"}.ri-text-to-speech-line:before{content:"\\f63c"}.ri-wrench-fill:before{content:"\\f63d"}.ri-wrench-line:before{content:"\\f63e"}.ri-area-chart-fill:before{content:"\\f63f"}.ri-area-chart-line:before{content:"\\f640"}.ri-baseball-fill:before{content:"\\f641"}.ri-baseball-line:before{content:"\\f642"}.ri-binoculars-fill:before{content:"\\f643"}.ri-binoculars-line:before{content:"\\f644"}.ri-cursor-hand:before{content:"\\f645"}.ri-emotion-add-fill:before{content:"\\f646"}.ri-emotion-add-line:before{content:"\\f647"}.ri-file-scan-fill:before{content:"\\f648"}.ri-file-scan-line:before{content:"\\f649"}.ri-fiverr-fill:before{content:"\\f64a"}.ri-fiverr-line:before{content:"\\f64b"}.ri-font-serif:before{content:"\\f64c"}.ri-ghost-3-fill:before{content:"\\f64d"}.ri-ghost-3-line:before{content:"\\f64e"}.ri-gitee-fill:before{content:"\\f64f"}.ri-gitee-line:before{content:"\\f650"}.ri-global-off-fill:before{content:"\\f651"}.ri-global-off-line:before{content:"\\f652"}.ri-image-download-fill:before{content:"\\f653"}.ri-image-download-line:before{content:"\\f654"}.ri-image-upload-fill:before{content:"\\f655"}.ri-image-upload-line:before{content:"\\f656"}.ri-issues-fill:before{content:"\\f657"}.ri-issues-line:before{content:"\\f658"}.ri-issues-reopen-fill:before{content:"\\f659"}.ri-issues-reopen-line:before{content:"\\f65a"}.ri-network-error-fill:before{content:"\\f65b"}.ri-network-error-line:before{content:"\\f65c"}.ri-network-fill:before{content:"\\f65d"}.ri-network-line:before{content:"\\f65e"}.ri-network-off-fill:before{content:"\\f65f"}.ri-network-off-line:before{content:"\\f660"}.ri-piano-fill:before{content:"\\f661"}.ri-piano-grand-fill:before{content:"\\f662"}.ri-piano-grand-line:before{content:"\\f663"}.ri-piano-line:before{content:"\\f664"}.ri-plug-3-fill:before{content:"\\f665"}.ri-plug-3-line:before{content:"\\f666"}.ri-send-ins-fill:before{content:"\\f667"}.ri-send-ins-line:before{content:"\\f668"}.ri-signal-cellular-1-fill:before{content:"\\f669"}.ri-signal-cellular-1-line:before{content:"\\f66a"}.ri-signal-cellular-2-fill:before{content:"\\f66b"}.ri-signal-cellular-2-line:before{content:"\\f66c"}.ri-signal-cellular-3-fill:before{content:"\\f66d"}.ri-signal-cellular-3-line:before{content:"\\f66e"}.ri-signal-cellular-off-fill:before{content:"\\f66f"}.ri-signal-cellular-off-line:before{content:"\\f670"}.ri-stacked-chart-fill:before{content:"\\f671"}.ri-stacked-chart-line:before{content:"\\f672"}.ri-upwork-fill:before{content:"\\f673"}.ri-upwork-line:before{content:"\\f674"}.ri-brain-4-fill:before{content:"\\f675"}.ri-brain-4-line:before{content:"\\f676"}.ri-certificate-2-fill:before{content:"\\f677"}.ri-certificate-2-line:before{content:"\\f678"}.ri-certificate-fill:before{content:"\\f679"}.ri-certificate-line:before{content:"\\f67a"}.ri-cookie-fill:before{content:"\\f67b"}.ri-cookie-line:before{content:"\\f67c"}.ri-cursor-ai-fill:before{content:"\\f67d"}.ri-cursor-ai-line:before{content:"\\f67e"}.ri-draw-fill:before{content:"\\f67f"}.ri-draw-line:before{content:"\\f680"}.ri-ghost-4-fill:before{content:"\\f681"}.ri-ghost-4-line:before{content:"\\f682"}.ri-gitbook-fill:before{content:"\\f683"}.ri-gitbook-line:before{content:"\\f684"}.ri-grok-ai-fill:before{content:"\\f685"}.ri-grok-ai-line:before{content:"\\f686"}.ri-hand-2:before{content:"\\f687"}.ri-megaphone-2-fill:before{content:"\\f688"}.ri-megaphone-2-line:before{content:"\\f689"}.ri-microsoft-copilot-fill:before{content:"\\f68a"}.ri-microsoft-copilot-line:before{content:"\\f68b"}.ri-mosaic-fill:before{content:"\\f68c"}.ri-mosaic-line:before{content:"\\f68d"}.ri-qr-scan-ai-fill:before{content:"\\f68e"}.ri-qr-scan-ai-line:before{content:"\\f68f"}.ri-qwen-ai-fill:before{content:"\\f690"}.ri-qwen-ai-line:before{content:"\\f691"}.ri-reddit-2-fill:before{content:"\\f692"}.ri-reddit-2-line:before{content:"\\f693"}.ri-sim-card-warning-fill:before{content:"\\f694"}.ri-sim-card-warning-line:before{content:"\\f695"}.ri-space-ship-2-fill:before{content:"\\f696"}.ri-space-ship-2-line:before{content:"\\f697"}.ri-subreddit-fill:before{content:"\\f698"}.ri-subreddit-line:before{content:"\\f699"}.ri-zhipu-ai-fill:before{content:"\\f69a"}.ri-zhipu-ai-line:before{content:"\\f69b"}.ri-connector-fill:before{content:"\\f69c"}.ri-connector-line:before{content:"\\f69d"}html{height:100%}body{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:rgb(var(--surface-ground));color:rgb(var(--text-color));overscroll-behavior:none}app-root{display:flex;flex-direction:column;height:100%}body.theme-light{--primary-color: 98 101 241;--secondary-color: 16 185 129;--accent-color: 245 158 11;--surface-card: 255 255 255;--surface-100: 248 250 252;--surface-200: 226 232 240;--border-color: 203 213 225;--text-color: 15 23 42;--text-color-secondary: 100 116 139}body.theme-dark{--primary-color: 139 143 255;--secondary-color: 34 197 94;--accent-color: 251 191 36;--surface-card: 30 41 59;--surface-100: 51 65 85;--surface-200: 71 85 105;--border-color: 100 116 139;--text-color: 226 232 240;--text-color-secondary: 148 163 184}body.theme-ocean{--primary-color: 14 116 144;--secondary-color: 6 182 212;--accent-color: 249 115 22;--surface-card: 248 250 252;--surface-100: 240 249 255;--surface-200: 186 230 253;--border-color: 125 211 252;--text-color: 8 47 73;--text-color-secondary: 14 116 144}:host{font-family:Montserrat,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}::-webkit-scrollbar{width:3px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #d3d3d3;border-radius:10px}::-webkit-scrollbar-thumb{background:rgb(var(--primary-color, 98 101 241));border-radius:10px}::-webkit-scrollbar-thumb:hover{background:rgb(var(--primary-color, 98 101 241) / .86)}.panel-scroll-body{max-height:calc(100dvh - 190px);overflow-y:auto;overflow-x:hidden}.panel-body{display:flex;flex-direction:column;gap:.95rem;min-height:0;padding:.35rem .15rem .6rem}.panel-body .child-panel{border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.9rem;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));box-shadow:0 8px 22px #0f172a0f;padding:.9rem}.panel-body .child-panel__label{display:inline-flex;align-items:center;gap:.35rem;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--primary-color, 98 101 241));margin-bottom:.65rem}.panel-body .child-accordion{width:100%}.panel-body .child-panel :where(input,select,textarea){background:rgb(var(--surface-card, 255 255 255))}.canvas-content{height:calc(100dvh - 180px)}.p-slider.p-slider-horizontal{height:5px!important}.ri-add-line,.ri-subtract-line{width:25px;height:25px;background:#fff;border-radius:50%;color:#585858;border:1px solid #585858;line-height:1.9}:is(.ri-add-line,.ri-subtract-line):hover{border-color:#6265f1;color:#6265f1}.p-button-text:not(:disabled):hover{background:transparent!important}.slider-scale-box{background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.75rem;padding:.65rem;box-shadow:0 5px 14px #0f172a0d}@media(max-width:991px){.panel-scroll-body{max-height:unset}.canvas-content{height:auto;min-height:0;flex:1}.editor-main-box{min-height:auto}}@media(max-width:640px){.panel-body{gap:.65rem;padding:.25rem .1rem .5rem}.panel-body .child-panel{padding:.65rem}}@media(max-width:480px){.panel-body{gap:.5rem;padding:.2rem .1rem .4rem}.panel-body .child-panel{padding:.5rem;border-radius:.65rem}}.name-number-overlay-box .p-button,.name-number-overlay-box .p-button-icon,.name-number-overlay-box .p-button-label{color:#333!important;transform:none!important}.name-number-overlay-box .p-fileupload-choose-button,.name-number-overlay-box .p-fileupload-choose-button .p-button-label{color:#fff!important}.panel-body .p-accordion.p-component{width:100%}.p-accordioncontent[data-p-active=false] .p-accordioncontent-content{display:none}.manifest-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader .message{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader .loader{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader .loader{zoom:.44}}.manifest-loader .loader .box{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader .loader .box div{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader .loader .box div:before,.manifest-loader .loader .box div:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader .loader .box div:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader .loader .box.box0{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader .loader .box.box1{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader .loader .box.box2{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader .loader .box.box3{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader .loader .box.box4{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader .loader .box.box5{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader .loader .box.box6{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader .loader .box.box7{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader .loader .box0{animation-name:box-move0}.manifest-loader .loader .box0 div{animation-name:box-scale0}.manifest-loader .loader .box1{animation-name:box-move1}.manifest-loader .loader .box1 div{animation-name:box-scale1}.manifest-loader .loader .box2{animation-name:box-move2}.manifest-loader .loader .box2 div{animation-name:box-scale2}.manifest-loader .loader .box3{animation-name:box-move3}.manifest-loader .loader .box3 div{animation-name:box-scale3}.manifest-loader .loader .box4{animation-name:box-move4}.manifest-loader .loader .box4 div{animation-name:box-scale4}.manifest-loader .loader .box5{animation-name:box-move5}.manifest-loader .loader .box5 div{animation-name:box-scale5}.manifest-loader .loader .box6{animation-name:box-move6}.manifest-loader .loader .box6 div{animation-name:box-scale6}.manifest-loader .loader .box7{animation-name:box-move7}.manifest-loader .loader .box7 div{animation-name:box-scale7}@keyframes box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes mask{0%,65%{opacity:0}66%,to{opacity:1}}.p-accordion-panel:last-child .p-accordion-header{border:none!important}.viewer-container{width:100%;height:80%;display:block}:host ::ng-deep canvas[data-view]{width:100%!important;height:100%!important}.header{padding:12px 20px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a14}.header-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;margin-bottom:0;flex-wrap:wrap}.logo{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42))}.brand{display:flex;align-items:center;min-height:32px}.brand-logo-img{width:auto;height:32px;max-width:240px;object-fit:contain;display:block}.tabs{display:flex;gap:5px}.tab{padding:8px 20px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.tab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.tab:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .12)}.header-right{display:flex;gap:10px;align-items:center}.btn-export,.btn-save{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost{padding:8px 12px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost:disabled{opacity:.5;cursor:not-allowed}.btn-ghost:not(:disabled):hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.btn-export:hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.btn-export:disabled,.btn-save:disabled{opacity:.6;cursor:not-allowed}.btn-reset{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-reset:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--secondary-color, 16 185 129))}.btn-reset:disabled{opacity:.6;cursor:not-allowed}.btn-exit{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-exit:hover{background:rgb(var(--surface-100, 248 250 252));border-color:#ef4444}.btn-exit:disabled{opacity:.6;cursor:not-allowed}.btn-menu{padding:8px 12px;border:none;background:transparent;font-size:20px;cursor:pointer;color:rgb(var(--text-color-secondary, 100 116 139))}.unified-alignment-controls{display:flex;align-items:center;height:auto}.alignment-controls-container{display:flex;align-items:center;width:100%}.controls-group{display:flex;align-items:center;gap:16px;padding:10px 16px;background:linear-gradient(135deg,rgb(var(--surface-50, 248 250 252) / .8),rgb(var(--surface-100, 248 250 252) / .6));border:1px solid rgb(var(--border-color, 203 213 225) / .6);border-radius:8px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.toggle-buttons{display:flex;align-items:center;gap:6px;padding:0;background:rgb(var(--surface-card, 255 255 255));border-radius:6px;border:1px solid rgb(var(--border-color, 203 213 225))}.alignment-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;font-weight:500;cursor:pointer;border-radius:5px;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.alignment-btn i{font-size:16px;display:flex;align-items:center}.alignment-btn .btn-label{white-space:nowrap;font-weight:500}.alignment-btn:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .08);color:rgb(var(--text-color, 15 23 42))}.alignment-btn.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4)}.alignment-btn.active:hover{background:rgb(var(--primary-color, 98 101 241) / .92)}.grid-size-section{display:flex;align-items:center}.grid-size-label{display:flex;flex-direction:column;gap:8px;cursor:pointer}.label-header{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:rgb(var(--text-color, 15 23 42));text-transform:uppercase;letter-spacing:.5px}.label-header i{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.slider-wrapper{display:flex;align-items:center;gap:10px;min-width:280px}.grid-size-slider{flex:1;height:6px;border-radius:3px;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .2),rgb(var(--primary-color, 98 101 241) / .1));outline:none;-webkit-appearance:none;appearance:none;cursor:pointer}.grid-size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-webkit-slider-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;border:none;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-moz-range-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-track{background:transparent;border:none}.grid-size-slider::-moz-range-progress{background:rgb(var(--primary-color, 98 101 241) / .3);border-radius:3px}.grid-size-value{display:flex;align-items:center;justify-content:center;min-width:56px;padding:4px 8px;font-size:12px;font-weight:500;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:4px;font-family:inherit}@media(max-width:1200px){.controls-group{gap:12px;padding:8px 12px}.slider-wrapper{min-width:220px}}@media(max-width:768px){.unified-alignment-controls{width:100%}.alignment-controls-container{flex-direction:column;gap:10px}.controls-group{flex-direction:column;gap:10px;width:100%}.toggle-buttons{width:100%;justify-content:space-between}.alignment-btn{flex:1;padding:10px 12px}.alignment-btn .btn-label{display:none}.grid-size-section,.grid-size-label{width:100%}.slider-wrapper{width:100%;min-width:unset}.grid-size-value{padding:6px 10px;font-size:11px}}@media(max-width:480px){.controls-group{padding:8px 10px;gap:8px}.toggle-buttons{gap:4px}.alignment-btn{padding:8px 10px;font-size:12px}.alignment-btn i{font-size:15px}.label-header{font-size:11px}.slider-wrapper{gap:8px}}.main-container{display:flex;height:calc(100dvh - 57px);background:rgb(var(--surface-100, 248 250 252))}.canvas-area{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgb(var(--border-color, 203 213 225));overflow:hidden}.canvas-area.canvas-area-single{grid-template-columns:1fr}.view-section{display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));position:relative;overflow:hidden}.view-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.view-header h3{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-header .view-controls{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.canvas-toolbar{position:absolute;top:70px;left:20px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.canvas-toolbar-2d{top:70px}.toolbar-btn{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn:hover{background:rgb(var(--surface-100, 248 250 252))}.view-controls{display:flex;gap:5px}.view-btn,.view-btn-2d{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active,.view-btn-2d.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn:hover:not(.active),.view-btn-2d:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-content{flex:1;display:flex;align-items:center;justify-content:center}.jersey-model,.jersey-2d{display:flex;flex-direction:column;align-items:center;gap:20px}.model-text{text-align:center}.model-text h3{font-size:18px;color:#666;margin-bottom:5px}.model-text p{font-size:13px;color:#999}.canvas-footer{display:flex;justify-content:center;align-items:center;gap:20px;padding:16px;background:#fff;border-radius:0;margin:0;border-top:1px solid #e0e0e0}.zoom-control{display:flex;align-items:center;gap:10px;font-size:13px;color:#666}.zoom-btn{width:32px;height:32px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.zoom-btn:hover{background:#f5f5f5}.zoom-value{min-width:50px;text-align:center;font-weight:500;color:#1a1a1a}.view-options{display:flex;gap:10px}.option-btn{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:14px;border-radius:6px;transition:all .2s}.option-btn:hover{background:#f5f5f5}.right-panel{width:420px;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;box-shadow:inset 1px 0 #fffc}.right-panel>section{display:flex;flex:1;min-height:0}.right-panel-shell,.icon-nav-shell{display:flex;min-height:0;height:100%}.panel-icon-nav{width:90px;height:100%;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;justify-content:space-between}.icon-nav-list{display:flex;flex-direction:column;overflow:auto}.icon-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 10px;border:none;background:transparent;color:#666;font-size:11px;cursor:pointer;transition:all .2s;border-left:3px solid transparent}.icon-btn i{font-size:20px}.icon-btn.active{color:rgb(var(--primary-color, 98 101 241));border-left-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--primary-color, 98 101 241) / .12)}.icon-btn:hover:not(.active){background:#f5f5f5}.icon-nav-bottom{display:flex;justify-content:center;gap:5px;padding:16px 10px;border-top:1px solid #e0e0e0}.icon-btn-small{width:36px;height:36px;padding:6px;border:none;background:transparent;color:#666;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.icon-btn-small:hover{background:#f0f0f0}.toggle-more-btn,.expanded-nav-menu,.mobile-canvas-toggle,.mobile-actions-bar{display:none}.panel-content{width:100%;display:flex;flex:1;flex-direction:column;min-height:0}.panel-content[style*="display: flex"]{display:flex!important}.panel-header{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #eef2f7;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255) / .98),rgb(var(--surface-100, 248 250 252) / .88));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.panel-header h2{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0 0 4px;letter-spacing:.01em}.panel-subtitle{font-size:13px;color:#666;margin:0}.help-btn{width:28px;height:28px;border:2px solid #2196f3;background:#fff;color:#2196f3;border-radius:50%;cursor:pointer;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:all .2s}.help-btn:hover{background:#2196f3;color:#fff}.panel-tabs{display:flex;border-bottom:2px solid #f0f0f0;padding:0 24px}.panel-tab{flex:1;padding:12px 16px;border:none;background:transparent;color:#666;font-size:14px;font-weight:500;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .2s}.panel-tab.active{color:#2196f3;border-bottom-color:#2196f3}.panel-tab:hover:not(.active){color:#333}.tab-content{flex:1;overflow-y:auto}.panel-body{flex:1}.color-list{padding:0}.color-item{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}.color-item:hover{background:#f8f8f8}.color-preview{width:40px;height:40px;border-radius:50%;flex-shrink:0;box-shadow:0 2px 4px #0000001a}.color-label{flex:1;font-size:15px;color:#1a1a1a;font-weight:400}.arrow-btn{width:32px;height:32px;border:none;background:transparent;color:#999;font-size:24px;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.arrow-btn:hover{background:#f0f0f0;color:#666}.custom-color-section{padding:24px}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:16px}.color-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative}.color-swatch.white{background:#fff}.color-swatch.black{background:#000}.color-swatch.active{border-color:#1a1a1a;border-width:3px}.color-swatch.active:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.color-swatch.white.active:after{color:#1a1a1a}.color-swatch.add-color{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.color-swatch:hover{border-color:#999}.custom-color{margin-top:15px}.custom-color label{display:block;font-size:12px;color:#666;margin-bottom:8px}.color-input-group{display:flex;gap:10px;align-items:center}.color-input{flex:1;padding:10px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#666}.color-picker{width:50px;height:42px;border:none;border-radius:6px;cursor:pointer;background:#000}.pattern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:15px}.pattern-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}.pattern-swatch.active{border-color:#1a1a1a;border-width:3px}.pattern-swatch.active:first-child:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.pattern-swatch:first-child{background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;color:#666}.pattern-swatch.solid{background:#5a5a5a}.pattern-swatch.diagonal-lines{background:repeating-linear-gradient(45deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.dots{background:radial-gradient(circle,#5a5a5a 1px,transparent 1px);background-size:8px 8px}.pattern-swatch.horizontal-lines{background:repeating-linear-gradient(0deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.add-pattern{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.pattern-swatch:hover{border-color:#999}.slider-control{margin-top:15px}.slider-control label{display:block;font-size:12px;color:#666;margin-bottom:10px}.slider{width:100%;height:6px;border-radius:3px;background:#e0e0e0;outline:none;-webkit-appearance:none;appearance:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;box-shadow:0 2px 4px #0003}.slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;border:none;box-shadow:0 2px 4px #0003}.form-group{margin-bottom:16px}.form-group label{display:block;font-size:12px;color:#666;margin-bottom:8px;font-weight:500}.form-row{display:flex;gap:12px;margin-bottom:16px}.form-group.half{flex:1}.text-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;transition:all .2s}.text-input:focus{outline:none;border-color:#1a1a1a}.text-input::placeholder{color:#999}.number-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a}.dropdown{width:100%;padding:10px 32px 10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;background:#fff;cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.dropdown:hover{border-color:#999}.dropdown.small{font-size:13px}.text-formatting{display:flex;gap:8px;margin-bottom:16px}.format-btn{flex:1;padding:10px;border:1px solid #e0e0e0;background:#fff;font-size:14px;font-weight:700;cursor:pointer;border-radius:6px;transition:all .2s}.format-btn.italic{font-style:italic;font-weight:700}.format-btn:hover{background:#f5f5f5;border-color:#999}.format-btn.active{background:#1a1a1a;color:#fff;border-color:#1a1a1a}.upload-area{width:100%;padding:40px 20px;border:2px dashed #d0d0d0;border-radius:8px;text-align:center;cursor:pointer;transition:all .2s;margin-bottom:16px;background:#fafafa}.upload-area:hover{border-color:#999;background:#f5f5f5}.upload-icon{width:48px;height:48px;margin:0 auto 12px;background:#e0e0e0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;color:#666}.upload-text{font-size:14px;color:#1a1a1a;margin-bottom:4px;font-weight:500}.upload-hint{font-size:12px;color:#999}.add-btn{width:100%;padding:12px;border:none;background:#1a1a1a;color:#fff;font-size:14px;font-weight:600;cursor:pointer;border-radius:6px;transition:all .2s}.add-btn:hover{background:#333}.button-row{display:flex;gap:10px}.action-btn{padding:10px 16px;border:1px solid #e0e0e0;background:#fff;color:#1a1a1a;font-size:13px;font-weight:500;cursor:pointer;border-radius:6px;transition:all .2s}.action-btn.half{flex:1}.action-btn:hover{background:#f5f5f5;border-color:#999}.panel-content::-webkit-scrollbar,.tab-content::-webkit-scrollbar,.panel-body::-webkit-scrollbar{width:6px}.panel-content::-webkit-scrollbar-track,.tab-content::-webkit-scrollbar-track,.panel-body::-webkit-scrollbar-track{background:rgb(var(--surface-100, 248 250 252))}.panel-content::-webkit-scrollbar-thumb,.tab-content::-webkit-scrollbar-thumb,.panel-body::-webkit-scrollbar-thumb{background:rgb(var(--surface-400, 148 163 184));border-radius:3px}.panel-content::-webkit-scrollbar-thumb:hover,.tab-content::-webkit-scrollbar-thumb:hover,.panel-body::-webkit-scrollbar-thumb:hover{background:rgb(var(--surface-500, 100 116 139))}.main-canvas-area{display:grid;grid-template-columns:1fr 1fr;min-height:0;background:rgb(var(--surface-100, 248 250 252));position:relative}.main-canvas-area.single{grid-template-columns:1fr}.view-section{position:relative;display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));overflow:hidden}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:1px solid rgb(var(--surface-300, 203 213 225))}.view-section.hidden{display:none}.editor-main-box{height:calc(100% - 112px);max-height:calc(100dvh - 112px)!important;align-items:stretch;overflow:hidden}.main-canvas-area.single{padding-right:20px}.main-canvas-area .view-section,.main-canvas-area .view-section>.view-section,.canvas-area,.canvas-area-single,.jersey-model,app-two-d-ui,app-three-d-ui{min-height:0;height:100%}.main-canvas-area.canvas-loading .view-section{pointer-events:none}.canvas-manifest-loader{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;background:rgb(var(--surface-0, 255 255 255));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@supports (color: color-mix(in lab,red,red)){.canvas-manifest-loader{background:color-mix(in srgb,rgb(var(--surface-0, 255 255 255)) 85%,transparent)}}.canvas-manifest-loader :where(.manifest-loader .loader){--primary: rgb(var(--primary-color, 98 101 241));width:160px;height:220px}.canvas-manifest-loader-subtitle{margin:0;font-size:.8125rem;font-weight:500;color:rgb(var(--text-color-secondary, 100 116 139))}.panel-scroll-body{flex:1;min-height:0;max-height:none;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:.45rem .65rem .85rem}@media(max-width:1199px){.right-panel{width:360px}.panel-icon-nav{width:78px}.main-canvas-area.single{padding-right:12px}.main-canvas-area:not(.single){grid-auto-rows:1fr;grid-template-columns:1fr}}.mobile-panel-toggle{display:none}@media(max-width:991px){:host{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.header{flex-shrink:0}.editor-main-box{flex:1;min-height:0;display:flex;flex-direction:column;height:auto;padding-bottom:100px}.main-canvas-area{flex:1;min-height:0;width:100%;grid-template-columns:1fr;grid-auto-rows:1fr;padding:0;overflow-y:auto}.main-canvas-area:not(.single){grid-auto-rows:minmax(220px,1fr)}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:0;border-top:1px solid rgb(var(--surface-300, 203 213 225))}.right-panel-shell,.icon-nav-shell{flex-shrink:0;width:100%;height:auto}.right-panel,.panel-icon-nav{width:100%;height:auto;border-left:0;border-top:1px solid rgb(var(--surface-200, 226 232 240))}.right-panel{max-height:min(44svh,400px);overflow:hidden;background:rgb(var(--surface-card, 255 255 255))}.panel-content{display:flex;min-height:0}.panel-header{position:sticky;top:0;z-index:2;background:rgb(var(--surface-card, 255 255 255));padding:12px 16px 10px}.panel-header h2{font-size:16px;line-height:1.2}.panel-scroll-body{flex:1;min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 8px 10px}.panel-icon-nav{position:fixed;bottom:0;left:0;width:100%;z-index:30;background:rgb(var(--surface-card, 255 255 255));box-shadow:0 -3px 14px #0f172a14;border-top:1px solid rgb(var(--surface-200, 226 232 240));z-index:9999999}.icon-nav-list{flex-direction:row;overflow-x:auto;gap:6px;padding:6px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;justify-content:space-between;z-index:1024}.icon-nav-list::-webkit-scrollbar{display:none}.icon-btn{min-width:80px;min-height:52px;border-radius:10px;padding:8px;gap:4px;border-left:0;border-bottom:3px solid transparent;flex:0 0 auto;font-size:11px}.icon-btn.active{border-bottom-color:rgb(var(--primary-color, 98 101 241));border-left-color:transparent}.icon-nav-bottom{padding:8px;border-top:1px solid rgb(var(--surface-100, 248 250 252))}.icon-btn-small{width:40px;height:40px}.toggle-more-btn{display:flex}.expanded-nav-menu{display:flex;inset:auto 0 100%;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;border-radius:8px 8px 0 0;box-shadow:0 -4px 12px #0f172a1a;border:1px solid rgb(var(--border-color, 203 213 225));border-left:none;border-right:none;border-bottom:none;padding:4px 8px;margin-bottom:-1px;gap:6px;justify-content:space-between}.expanded-nav-menu .icon-btn{min-width:80px;min-height:52px;border-left:0;border-bottom:3px solid transparent;padding:8px;width:auto}.mobile-actions-bar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--surface-100, 248 250 252))}.mobile-panel-toggle{display:flex;align-items:center;gap:6px;padding:8px 14px;border:none;border-radius:6px;background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s}.mobile-panel-toggle:active{background:rgb(var(--primary-color, 98 101 241) / .2)}.mobile-panel-toggle i{font-size:18px;line-height:1}.main-canvas-area{position:relative}.mobile-panel-hidden .right-panel-shell{max-height:0!important;overflow:hidden!important;border-top:0!important;pointer-events:none}.mobile-panel-hidden .main-canvas-area{flex:1 1 100%}.mobile-canvas-hidden .main-canvas-area{display:none!important}.mobile-canvas-hidden .right-panel{max-height:none;height:100%;flex:1}.mobile-canvas-hidden .panel-scroll-body{max-height:100%!important}.mobile-canvas-toggle{display:flex;align-items:center;justify-content:center;gap:6px;padding:2px 7px;background:transparent;border:1px solid rgb(var(--surface-200, 226 232 240));border-radius:6px;color:rgb(var(--text-color, 15 23 42));font-size:13px;font-weight:600;cursor:pointer;transition:background .2s;margin-left:auto}.mobile-canvas-toggle:active{background:rgb(var(--surface-100, 248 250 252))}.mobile-canvas-toggle i{font-size:16px}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}.brand-logo-img{height:24px}}@media(max-width:640px){.header{padding:8px 12px 0}.header>div{flex-wrap:wrap;gap:6px}.header-right{gap:6px;flex-wrap:wrap}.logo{font-size:17px}.btn-export,.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 10px}.main-canvas-area{grid-auto-rows:1fr}.right-panel{max-height:min(45svh,380px)}.panel-header{padding:10px 12px 8px}.panel-header h2{font-size:15px}.panel-scroll-body{max-height:min(38svh,310px);padding:0 6px 8px}.icon-btn{min-width:68px;min-height:50px;padding:6px 4px;font-size:10px}.icon-btn i{font-size:18px}.icon-nav-list{gap:2px;padding:4px 6px}.icon-nav-bottom{padding:4px 6px}.expanded-nav-menu .icon-btn{min-width:68px;min-height:50px}.mobile-panel-toggle{font-size:12px;padding:7px 14px;bottom:10px}.mobile-panel-toggle i{font-size:16px}}@media(max-width:480px){.header{padding:6px 10px 0}.logo{font-size:16px}.btn-export{display:none}.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 12px}.right-panel{max-height:min(46svh,360px)}.panel-scroll-body{max-height:min(39svh,235px)}.icon-btn{min-width:60px;min-height:48px;gap:3px;font-size:9px}.icon-btn i{font-size:17px}.expanded-nav-menu .icon-btn{min-width:60px;min-height:48px}.mobile-panel-toggle{font-size:11px;padding:6px 12px;gap:4px;bottom:8px}.mobile-panel-toggle i{font-size:15px}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.editor-main-box{flex-direction:row;flex-wrap:nowrap}.main-canvas-area{flex:1;min-width:0;grid-template-columns:1fr;grid-auto-rows:100%}.mobile-panel-toggle{bottom:8px;left:auto;right:12px;transform:none;font-size:12px;padding:6px 12px}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{max-height:unset!important;width:0!important;overflow:hidden!important;border:none!important}.right-panel-shell{flex-direction:column;width:auto;height:100%;flex-shrink:0}.right-panel{width:280px;max-height:100%;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240))}.panel-scroll-body{max-height:100%}.icon-nav-shell{width:auto;height:100%;flex-shrink:0}.panel-icon-nav{width:64px;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240));box-shadow:none;overflow-y:auto}.icon-nav-list{flex-direction:column;overflow-x:visible;overflow-y:auto;padding:4px}.icon-btn{min-width:unset;min-height:52px;width:100%;border-bottom:0;border-left:3px solid transparent;font-size:9px}.icon-btn.active{border-left-color:rgb(var(--primary-color, 98 101 241));border-bottom-color:transparent}}.manifest-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92))}.save-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.manifest-error-card{width:min(520px,calc(100vw - 2rem));padding:1.25rem;border-radius:12px;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e2e8f0);box-shadow:0 10px 30px #02061726}.manifest-error-title{font-size:1rem;font-weight:700;color:var(--p-text-color, #0f172a);margin-bottom:.5rem}.manifest-error-message{color:var(--p-text-muted-color, #475569);margin-bottom:1rem;word-break:break-word}.manifest-retry-btn{appearance:none;border:0;border-radius:10px;padding:.6rem 1rem;font-weight:600;cursor:pointer;background:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-contrast-color, 255 255 255))}.manifest-retry-btn:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.toggle-text{position:absolute;top:50%;transform:translateY(-50%);font-size:14px;font-weight:500;transition:opacity .2s ease;line-height:0}.off-text{left:38px;color:rgb(var(--text-color, 15 23 42))}.on-text{right:38px;color:rgb(var(--primary-contrast-color, 255 255 255));opacity:0}.toggle-input:checked+.toggle-track{background:rgb(var(--primary-color, 98 101 241))}.toggle-input:checked+.toggle-track .off-text{opacity:0}.toggle-input:checked+.toggle-track .on-text{opacity:1}.toggle-input:checked~.toggle-knob{transform:translate(96px)}.child-accordion{width:100%!important}@media(min-width:992px)and (max-width:1350px){.mobile-panel-toggle{display:flex;align-items:center;gap:6px;position:absolute;bottom:20px;right:20px;z-index:20;padding:8px 18px;border:none;border-radius:999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 16px #6265f159;white-space:nowrap;transition:background .2s,box-shadow .2s,transform .15s}.mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 6px 20px #6265f16b}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{display:none!important}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}}.jersey-model{position:relative}.shortcuts-wrap{position:absolute;bottom:12px;right:12px;z-index:20}.shortcuts-fab{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:8px;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:18px;cursor:pointer;box-shadow:0 2px 8px #0f172a26;transition:all .2s}.shortcuts-fab:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.shortcuts-fab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 4px 12px rgb(var(--primary-color, 98 101 241) / .4)}.shortcuts-popover{position:absolute;bottom:calc(100% + 10px);right:0;width:300px;height:360px;overflow-y:auto;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:10px;box-shadow:0 8px 24px #0f172a24;padding:.75rem}.shortcuts-popover-header{display:flex;align-items:center;gap:.5rem;font-size:.8rem;font-weight:700;color:rgb(var(--text-color, 15 23 42));padding-bottom:.6rem;margin-bottom:.25rem;border-bottom:1px solid rgb(var(--border-color, 203 213 225))}.shortcuts-popover-header i{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.mobile-canvas-hidden .panel-scroll-body{height:100%;max-height:100%}.mobile-canvas-hidden .panel-content,.mobile-canvas-hidden .right-panel,.mobile-canvas-hidden .right-panel-shell{height:100%}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-ease: initial}}}
|
|
4616
4616
|
/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
|
|
4617
|
-
`],encapsulation:3,changeDetection:0})};var Pn={MANIFEST_LOADED:"manifest-loaded",SDK_READY:"sdk-ready",SUBMISSION_SUCCESS:"submission:success",SUBMISSION_FAILED:"submission:failed",ERROR:"error",CLOSED:"closed"};var e1=class extends Error{constructor(t,n){super(n);this.code=t}},WD=class extends HTMLElement{bootstrapped=!1;appRef=null;componentRef=null;hostElement=null;connectedCallback(){this.bootstrapped||(this.bootstrapped=!0,this.initialize())}disconnectedCallback(){this.destroyRuntime()}async saveDesign(){let e=this.componentRef?.instance;if(!e||typeof e.onSaveDesignClick!="function")throw new Error("Customizer save action is not available.");await e.onSaveDesignClick()}async initialize(){try{let e=this.readConfig();this.hostElement=document.createElement("div"),this.hostElement.style.height="100%",this.appendChild(this.hostElement),this.appRef=await tE({providers:[...Fk(),{provide:R_,useValue:{productId:e.productId,apiKey:e.apiKey,predesignId:e.predesignId,submissionNumber:e.submissionNumber,locale:e.locale,readonly:e.readonly,theme:e.theme,onManifestLoaded:t=>{this.emit(Pn.MANIFEST_LOADED,t)},onManifestLoadFailed:t=>{this.emit(Pn.ERROR,t),this.destroyRuntime()},onReady:t=>{this.emit(Pn.SDK_READY,t)},onSubmissionSuccess:t=>{this.emit(Pn.SUBMISSION_SUCCESS,t)},onSubmissionFailed:t=>{this.emit(Pn.SUBMISSION_FAILED,t)},onAssetLoadFailed:t=>{this.emit(Pn.ERROR,t),this.destroyRuntime()},onClose:()=>{this.emit(Pn.CLOSED,void 0)}}}]}),this.componentRef=KR(Q_,{environmentInjector:this.appRef.injector,hostElement:this.hostElement}),this.componentRef.setInput("apiKey",e.apiKey),this.componentRef.setInput("productId",e.productId),this.componentRef.setInput("predesignId",e.predesignId),this.componentRef.setInput("submissionNumber",e.submissionNumber),this.appRef.attachView(this.componentRef.hostView)}catch(e){this.emit(Pn.ERROR,{code:this.resolveErrorCode(e),message:this.toMessage(e)}),this.destroyRuntime()}}readConfig(){let e=(this.getAttribute("api-key")??"").trim(),t=(this.getAttribute("product-id")??"").trim();if(!e||!t)throw new e1("INVALID_CONFIG","Missing required attributes: api-key and product-id are required.");return{apiKey:e,productId:t,predesignId:(this.getAttribute("predesign-id")??"")?.trim()??void 0,submissionNumber:(this.getAttribute("submission-number")??"")?.trim()??void 0,locale:(this.getAttribute("locale")??"").trim()||void 0,theme:(this.getAttribute("theme")??"").trim()||void 0,readonly:this.hasAttribute("readonly")}}resolveErrorCode(e){return e instanceof e1?e.code:"RUNTIME_ERROR"}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}toMessage(e){return e instanceof Error&&e.message?e.message:"Unexpected SDK runtime error."}destroyRuntime(){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),this.appRef&&(this.appRef.destroy(),this.appRef=null),this.hostElement&&this.hostElement.parentElement===this&&this.removeChild(this.hostElement),this.hostElement=null,this.bootstrapped=!1}};function H4(){customElements.get("pixeasy-customizer")||customElements.define("pixeasy-customizer",WD)}var t1=class{element=null;containerEl=null;handlers=new Map;domUnsubscribers=[];open(e){this.close(!1);let t=this.resolveContainer(e.container),n=document.createElement("pixeasy-customizer");return n.setAttribute("api-key",e.apiKey),n.setAttribute("product-id",e.productId),e.predesignId&&n.setAttribute("predesign-id",e.predesignId),e.submissionNumber&&n.setAttribute("submission-number",e.submissionNumber),e.locale&&n.setAttribute("locale",e.locale),e.theme&&n.setAttribute("theme",e.theme),e.readonly&&n.setAttribute("readonly",""),this.bindDomEvents(n),t.appendChild(n),this.element=n,this.containerEl=t,this}on(e,t){let n=this.handlers.get(e)??new Set;return n.add(t),this.handlers.set(e,n),this}off(e,t){return this.handlers.get(e)?.delete(t),this}close(e=!0){return this.domUnsubscribers.forEach(t=>t()),this.domUnsubscribers=[],this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element),this.element=null,this.containerEl=null,e&&this.emit(Pn.CLOSED,void 0),this}async saveDesign(){if(!this.element)throw new Error("Customizer is not open.");let e=this.element;if(typeof e.saveDesign!="function")throw new Error("Save is not supported by the customizer runtime.");await Promise.resolve(e.saveDesign())}bindDomEvents(e){this.bind(e,Pn.MANIFEST_LOADED,t=>{this.emit(Pn.MANIFEST_LOADED,t.detail)}),this.bind(e,Pn.SDK_READY,t=>{this.emit(Pn.SDK_READY,t.detail)}),this.bind(e,Pn.SUBMISSION_SUCCESS,t=>{this.emit(Pn.SUBMISSION_SUCCESS,t.detail)}),this.bind(e,Pn.SUBMISSION_FAILED,t=>{this.emit(Pn.SUBMISSION_FAILED,t.detail)}),this.bind(e,Pn.ERROR,t=>{this.emit(Pn.ERROR,t.detail)}),this.bind(e,Pn.CLOSED,t=>{this.emit(Pn.CLOSED,t.detail)})}bind(e,t,n){e.addEventListener(t,n),this.domUnsubscribers.push(()=>e.removeEventListener(t,n))}emit(e,t){this.handlers.get(e)?.forEach(n=>{try{n(t)}catch(r){console.error("Pixeasy builder event handler failed",r)}})}resolveContainer(e){if(typeof e!="string")return e;let t=document.getElementById(e);if(!t)throw new Error(`Container not found: ${e}`);return t}};function gae(){return new t1}H4();export{t1 as PixeasyBuilder,Pn as SDK_EVENTS,gae as createPixeasyBuilder,H4 as definePixeasyCustomizerElement,k_ as generateThumbnails};
|
|
4617
|
+
`],encapsulation:3,changeDetection:0})};var Pn={MANIFEST_LOADED:"manifest-loaded",SDK_READY:"sdk-ready",SUBMISSION_SUCCESS:"submission:success",SUBMISSION_FAILED:"submission:failed",ERROR:"error",CLOSED:"closed"};var e1=class extends Error{constructor(t,n){super(n);this.code=t}},WD=class extends HTMLElement{bootstrapped=!1;appRef=null;componentRef=null;hostElement=null;connectedCallback(){this.bootstrapped||(this.bootstrapped=!0,this.initialize())}disconnectedCallback(){this.destroyRuntime()}async saveDesign(){let e=this.componentRef?.instance;if(!e||typeof e.onSaveDesignClick!="function")throw new Error("Customizer save action is not available.");await e.onSaveDesignClick()}async initialize(){try{let e=this.readConfig();this.hostElement=document.createElement("div"),this.hostElement.style.height="100%",this.appendChild(this.hostElement),this.appRef=await tE({providers:[...Fk(),{provide:R_,useValue:{productId:e.productId,apiKey:e.apiKey,predesignId:e.predesignId,submissionNumber:e.submissionNumber,userUniqueId:e.userUniqueId,locale:e.locale,readonly:e.readonly,theme:e.theme,onManifestLoaded:t=>{this.emit(Pn.MANIFEST_LOADED,t)},onManifestLoadFailed:t=>{this.emit(Pn.ERROR,t),this.destroyRuntime()},onReady:t=>{this.emit(Pn.SDK_READY,t)},onSubmissionSuccess:t=>{this.emit(Pn.SUBMISSION_SUCCESS,t)},onSubmissionFailed:t=>{this.emit(Pn.SUBMISSION_FAILED,t)},onAssetLoadFailed:t=>{this.emit(Pn.ERROR,t),this.destroyRuntime()},onClose:()=>{this.emit(Pn.CLOSED,void 0)}}}]}),this.componentRef=KR(Q_,{environmentInjector:this.appRef.injector,hostElement:this.hostElement}),this.componentRef.setInput("apiKey",e.apiKey),this.componentRef.setInput("productId",e.productId),this.componentRef.setInput("predesignId",e.predesignId),this.componentRef.setInput("submissionNumber",e.submissionNumber),this.componentRef.setInput("userUniqueId",e.userUniqueId),this.appRef.attachView(this.componentRef.hostView)}catch(e){this.emit(Pn.ERROR,{code:this.resolveErrorCode(e),message:this.toMessage(e)}),this.destroyRuntime()}}readConfig(){let e=(this.getAttribute("api-key")??"").trim(),t=(this.getAttribute("product-id")??"").trim();if(!e||!t)throw new e1("INVALID_CONFIG","Missing required attributes: api-key and product-id are required.");return{apiKey:e,productId:t,predesignId:(this.getAttribute("predesign-id")??"")?.trim()??void 0,submissionNumber:(this.getAttribute("submission-number")??"")?.trim()??void 0,userUniqueId:(this.getAttribute("user-unique-id")??"")?.trim()??void 0,locale:(this.getAttribute("locale")??"").trim()||void 0,theme:(this.getAttribute("theme")??"").trim()||void 0,readonly:this.hasAttribute("readonly")}}resolveErrorCode(e){return e instanceof e1?e.code:"RUNTIME_ERROR"}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}toMessage(e){return e instanceof Error&&e.message?e.message:"Unexpected SDK runtime error."}destroyRuntime(){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),this.appRef&&(this.appRef.destroy(),this.appRef=null),this.hostElement&&this.hostElement.parentElement===this&&this.removeChild(this.hostElement),this.hostElement=null,this.bootstrapped=!1}};function H4(){customElements.get("pixeasy-customizer")||customElements.define("pixeasy-customizer",WD)}var t1=class{element=null;containerEl=null;handlers=new Map;domUnsubscribers=[];open(e){this.close(!1);let t=this.resolveContainer(e.container),n=document.createElement("pixeasy-customizer");return n.setAttribute("api-key",e.apiKey),e.userUniqueId&&n.setAttribute("user-unique-id",e.userUniqueId),n.setAttribute("product-id",e.productId),e.predesignId&&n.setAttribute("predesign-id",e.predesignId),e.submissionNumber&&n.setAttribute("submission-number",e.submissionNumber),e.locale&&n.setAttribute("locale",e.locale),e.theme&&n.setAttribute("theme",e.theme),e.readonly&&n.setAttribute("readonly",""),this.bindDomEvents(n),t.appendChild(n),this.element=n,this.containerEl=t,this}on(e,t){let n=this.handlers.get(e)??new Set;return n.add(t),this.handlers.set(e,n),this}off(e,t){return this.handlers.get(e)?.delete(t),this}close(e=!0){return this.domUnsubscribers.forEach(t=>t()),this.domUnsubscribers=[],this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element),this.element=null,this.containerEl=null,e&&this.emit(Pn.CLOSED,void 0),this}async saveDesign(){if(!this.element)throw new Error("Customizer is not open.");let e=this.element;if(typeof e.saveDesign!="function")throw new Error("Save is not supported by the customizer runtime.");await Promise.resolve(e.saveDesign())}bindDomEvents(e){this.bind(e,Pn.MANIFEST_LOADED,t=>{this.emit(Pn.MANIFEST_LOADED,t.detail)}),this.bind(e,Pn.SDK_READY,t=>{this.emit(Pn.SDK_READY,t.detail)}),this.bind(e,Pn.SUBMISSION_SUCCESS,t=>{this.emit(Pn.SUBMISSION_SUCCESS,t.detail)}),this.bind(e,Pn.SUBMISSION_FAILED,t=>{this.emit(Pn.SUBMISSION_FAILED,t.detail)}),this.bind(e,Pn.ERROR,t=>{this.emit(Pn.ERROR,t.detail)}),this.bind(e,Pn.CLOSED,t=>{this.emit(Pn.CLOSED,t.detail)})}bind(e,t,n){e.addEventListener(t,n),this.domUnsubscribers.push(()=>e.removeEventListener(t,n))}emit(e,t){this.handlers.get(e)?.forEach(n=>{try{n(t)}catch(r){console.error("Pixeasy builder event handler failed",r)}})}resolveContainer(e){if(typeof e!="string")return e;let t=document.getElementById(e);if(!t)throw new Error(`Container not found: ${e}`);return t}};function gae(){return new t1}H4();export{t1 as PixeasyBuilder,Pn as SDK_EVENTS,gae as createPixeasyBuilder,H4 as definePixeasyCustomizerElement,k_ as generateThumbnails};
|
|
4618
4618
|
|
|
4619
4619
|
|
|
4620
4620
|
|