PageSourceSearch

https://photomize.ai/main-FU2W7LZZ.js

js photomize.ai collected 2026-10-05 15:11:37 UTC 378,356 bytes, 9 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e7d83a54-f5ee-556c-9ef8-bbe4a5c00576")}catch(e){}}();
3import{a as ne,b as vt,e as Ld,f as da,i as ki,j as Ho,k as Dn}from"./chunk-JJSZFUPX.js";import{a as Ko}from"./chunk-NZ76BIQF.js";import{a as rd,b as Kf,c as ad,d as Ji,e as li,f as Xi,g as Go,h as qd}from"./chunk-VXZCIFGK.js";import"./chunk-2TW6TDXC.js";import{a as ci}from"./chunk-GFGJQVBS.js";import{a as Wd}from"./chunk-WX3N2U7T.js";import{a as pa,g as jd}from"./chunk-PIBMQMTV.js";import{a as Id}from"./chunk-FL4JA6TN.js";import{a as Ad}from"./chunk-VD7TJUSQ.js";import{a as Pd}from"./chunk-LXOGCNHO.js";import{a as Dd}from"./chunk-NMTQHFYV.js";import{b as ca,c as At}from"./chunk-NUIUGYWL.js";import"./chunk-V7TGTYB6.js";import"./chunk-RVOK4ZL6.js";import"./chunk-NWZMITYP.js";import"./chunk-JIGR6WYW.js";import"./chunk-DCO3RN3V.js";import"./chunk-OYPE2T6J.js";import{a as jo,b as pd}from"./chunk-OCWHXB6P.js";import{a as cd,d as dd}from"./chunk-NPLA36WG.js";import{a as Qi}from"./chunk-JEPI4WVY.js";import{a as ld}from"./chunk-WEE2RI57.js";import"./chunk-HKLYHNYX.js";import{a as Ed}from"./chunk-4FBUVR5W.js";import"./chunk-ZLRRYXF5.js";import{a as qo}from"./chunk-PD4DQWG4.js";import{a as $d}from"./chunk-ZSFBZ3WW.js";import"./chunk-BXVBE3AY.js";import"./chunk-S4ONBT2N.js";import"./chunk-4TX2JZID.js";import{f as Od}from"./chunk-DJA6RC4I.js";import{a as si}from"./chunk-VXNPTIT7.js";import{a as Rd,b as Vd}from"./chunk-L4LGR6GQ.js";import{a as kd}from"./chunk-4Q5GN3EI.js";import{b as Nd,d as Fd}from"./chunk-D45LGKT4.js";import{a as en}from"./chunk-FZ6NAF34.js";import"./chunk-7VMLCE2D.js";import"./chunk-2PQXPJA3.js";import{a as Wo}from"./chunk-F5YPVJ3X.js";import{a as ua,b as zd,c as Bd,d as Ud}from"./chunk-DHOA4IIX.js";import"./chunk-Y4H2OSEK.js";import"./chunk-LCNRBPTG.js";import"./chunk-W3VMPJ55.js";import"./chunk-DEJXTVFN.js";import"./chunk-HCH2OUKK.js";import{a as Md,b as Td}from"./chunk-GGFPRHOX.js";import{a as Sd}from"./chunk-XEBPL6O4.js";import"./chunk-5PKFD2CL.js";import{a as Cd}from"./chunk-A3UE2OZO.js";import{a as aa,b as sa,c as zc,d as la,e as Uf,f as ct,g as Zi}from"./chunk-ADXX7NLT.js";import{a as vd,b as bd}from"./chunk-3C3XJMHA.js";import{a as gd}from"./chunk-JMB4KWMP.js";import{a as yd}from"./chunk-JAQLR2Q7.js";import{a as _d}from"./chunk-R2QCM4DO.js";import"./chunk-56C4C5VC.js";import{a as fd}from"./chunk-SYRCI3RW.js";import"./chunk-H2N65AFT.js";import{a as hd}from"./chunk-IOT6Y33M.js";import"./chunk-AAPGHKKU.js";import"./chunk-DF6GF4M2.js";import"./chunk-BLC7PPIL.js";import"./chunk-MVMTTYM5.js";import"./chunk-4AZ4LQOT.js";import{d as Gc,i as Kc,n as Yc,u as Zc,v as Qc}from"./chunk-KCAFF3QI.js";import{a as od,b as Gf}from"./chunk-CHX6DW4F.js";import{a as Hc,b as Hf}from"./chunk-WMJHJFNW.js";import{a as Jc,c as Xc,e as ed,t as td,v as id}from"./chunk-54ESFE64.js";import"./chunk-4GGKC7AF.js";import"./chunk-OG6GQ722.js";import{a as Bc,b as $f}from"./chunk-5BEQU43M.js";import{a as An}from"./chunk-5JC6VLEA.js";import"./chunk-UJMZXBAE.js";import"./chunk-3TVDK3KJ.js";import"./chunk-W2LC4IPO.js";import"./chunk-HFVUNG6T.js";import"./chunk-GPLKUB2G.js";import"./chunk-2UAYOOGW.js";import{a as xd}from"./chunk-M7IIQ6GA.js";import{a as ud}from"./chunk-X6VWAUKZ.js";import{a as Wc,b as Wf}from"./chunk-BRHDZXVN.js";import{b as sd}from"./chunk-TSMBYGRH.js";import{a as Pn}from"./chunk-22ZDUHGG.js";import{d as md,e as wd}from"./chunk-WCBQ5CER.js";import"./chunk-EBAWWDTB.js";import"./chunk-3SPXQ5HU.js";import{a as Pt,b as On}from"./chunk-QSOBCHM3.js";import{a as ai,b as $o}from"./chunk-CSJHLTMW.js";import"./chunk-RKOH2R6G.js";import"./chunk-RLTNLI46.js";import{a as Uc,b as qf}from"./chunk-6YPEF4RD.js";import{a as nd,b as pe,c as ae,d as se}from"./chunk-EWCEBJQB.js";import{a as Pc,b as Nf,c as Ac,d as Ff,e as Ic,f as Nc,g as Rf,h as Bo,i as Fc}from"./chunk-GOB2MLSZ.js";import{c as Dc,d as Lf}from"./chunk-6BI4CYIT.js";import"./chunk-5WYNDLZN.js";import{a as $c,b as qc,c as jc,d as jf}from"./chunk-CP3LLI2Y.js";import{A as zf,B as Ze,C as Ti,D as ri,E as Uo,F as Vc,G as Bf,a as hc,b as Ef,c as Ki,d as oa,e as Ee,f as yt,j as lt,k as Yi,l as Lc,m as Vf,z as Rc}from"./chunk-WLS5PXSX.js";import{a as oi,c as ra}from"./chunk-KJG6SPTD.js";import"./chunk-3AV55DWH.js";import{a as Mc,c as kn,d as Tc,h as kc,k as Ec,q as Oc,r as En}from"./chunk-J3X4DSFV.js";
3import{a as Q,c as ee,d as ti,e as gc,g as re}from"./chunk-XQER5GND.js";import{A as Ul,B as $l,C as ql,D as jl,E as ea,F as Wl,G as ta,H as Hl,I as Lo,J as ic,K as Tf,L as xc,M as Af,P as Gi,Q as na,a as El,b as Qr,c as Ao,d as Ol,f as Do,g as Mn,h as Io,i as No,j as Jr,k as Xr,l as Pl,m as Al,o as Dl,q as Il,r as Nl,s as Fl,t as Ll,u as Rl,v as Vl,w as Mf,x as Fo,y as zl,z as Bl}from"./chunk-3K6RRJY2.js";import{b as Sc,c as If}from"./chunk-Z245VEHW.js";import{b as wc,d as Cc,f as Df}from"./chunk-TYWISVRT.js";import{A as Hi,B as Mi,G as vc,H as bc,I as Pf,J as De,K as Ot,a as nc,b as kf,t as ii,u as yc,v as ni}from"./chunk-WMGGFCV5.js";import{a as K,b as zt}from"./chunk-RUKFHUIK.js";import{A as uc,B as pc,D as mc,O as fc,h as Tn,j as rc,k as ac,l as sc,x as cc,z as dc}from"./chunk-GL64VH2W.js";import{D as _c,H as Of}from"./chunk-RZ4KGIAZ.js";import{a as k,b as Vo,c as Ge}from"./chunk-UCGMODSB.js";import{a as zo,c as oc,e as ia}from"./chunk-FVTEBN2S.js";import{$ as u,$c as Tl,A as Ys,Ab as R,Bb as To,Bc as gl,C as Wt,Cb as A,Cc as _l,Da as Ui,Db as Rt,Dc as b,E as gt,Eb as h,Fc as yl,Ga as tl,H as Co,Ha as d,Ia as il,Ib as Kt,Jb as Yt,Ka as Gr,Kb as Zt,Mb as ll,Mc as ke,N as Zs,Na as nl,Nb as cl,Nc as Fe,O as Qs,Ob as Si,Oc as qi,P as wi,Pa as Gt,Pb as xe,Pc as Pe,Qb as ie,Qc as vl,R as zi,Rb as Yr,Rc as Sf,S as Se,Sb as Ae,Sc as bl,Ta as U,Tb as f,Tc as Oo,U as Wr,Ub as T,Uc as xl,V as ce,Vb as V,Vc as wl,Wb as ko,Wc as Cl,X as H,Xc as Zr,Yb as dl,Z as Ci,Zb as ul,Zc as Sl,_ as Ue,_a as ol,_b as pl,_c as Ml,a as Hs,aa as Js,ab as Kr,ac as Cn,ad as kl,bb as rl,bd as Po,c as Et,cc as Vt,cd as Gl,db as al,dc as $i,dd as Le,ea as w,ec as ml,ed as Kl,fa as C,fb as sl,fd as Yl,ga as fe,gd as Zl,ha as Ht,hc as y,hd as ji,ia as wn,ic as v,id as Xt,ja as Lt,jb as de,jc as Eo,jd as Ro,k as Gs,ka as So,kb as S,kd as Ql,l as et,la as Xs,lb as M,lc as fl,ld as G,md as ei,n as ue,na as X,nc as I,nd as Wi,o as bi,ob as _e,oc as Qt,od as Jl,p as xi,pb as ye,pd as Xl,q as Ks,qa as Bi,qb as Z,qd as ec,rb as c,rc as _t,rd as tc,sb as p,sc as Jt,t as wo,ta as el,tb as E,tc as hl,td as ve,ua as Mo,ub as J,vb as oe,wb as st,wc as Sn,xa as ze,y as jr,ya as Hr,z as we}from"./chunk-RDODF2UC.js";import"./chunk-IIZMPRM3.js";import{N as lc}from"./chunk-SEUGDT2U.js";import"./chunk-PWFA5UZL.js";import"./chunk-NQEAW6VA.js";import{a as O,b as te,c as Ws,d as xn,h as Cf,j as F}from"./chunk-CIEFSZ4O.js";Po();Lo();Lo();Lo();b();b();Mf();Zr();ve();ve();Se();Bi();var Kd=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__;function Yf(n={}){return[Ll(),Fl(),Vl(),Fo(),Ul(),ql(),Rl(),$l(),Bl(),zl()]}function Yd(n){let e=O({defaultIntegrations:Yf()},n);return Nl(e,"angular"),Zf(),jl(e)}function Zf(){let e=Wr?.major&&parseInt(Wr.major,10);e&&(e<14&&Kd&&Qr.warn(`This Sentry SDK does not officially support Angular ${e}.`,"This SDK only supports Angular 14 and above.","If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.","Otherwise, please consider upgrading your Angular version."),Dl("angular",{version:e}))}var Qf=typeof Zone<"u"&&Zone.root?.run;function tn(n){return Qf?Zone.root.run(n):n()}function Jf(n){return n&&n.ngOriginalError?n.ngOriginalError:n}function Xf(n){return Zd(n.error)?n.error:typeof ErrorEvent<"u"&&n.error instanceof ErrorEvent&&n.error.message?n.error.message:typeof n.error=="string"?`Server returned code ${n.status} with body "${n.error}"`:n.message}function Zd(n){if(n instanceof Error)return!0;if(n===null||typeof n!="object")return!1;let e=n;return Ao(e.name)&&Ao(e.message)&&(e.stack===void 0||Ao(e.stack))}var eh=(()=>{class n{constructor(i){this._options=O({logErrors:!0},i)}ngOnDestroy(){this._removeAfterSendEventListener&&this._removeAfterSendEventListener()}handleError(i){let t=this._extractError(i)||"Handled unknown error",o=tn(()=>Al(t,{mechanism:{type:"auto.function.angular.error_handler",handled:!1}}));if(this._options.logErrors&&El(()=>console.error(t)),this._options.showDialog){let r=Do();r&&!this._removeAfterSendEventListener?this._removeAfterSendEventListener=r.on("afterSendEvent",a=>{!a.type&&a.event_id&&tn(()=>{ea(te(O({},this._options.dialogOptions),{eventId:a.event_id}))})}):r||tn(()=>{ea(te(O({},this._options.dialogOptions),{eventId:o}))})}}_extractError(i){if(this._options.extractor){let t=this._defaultExtractor.bind(this);return this._options.extractor(i,t)}return this._defaultExtractor(i)}_defaultExtractor(i){let t=Jf(i);return t instanceof Oo?Xf(t):typeof t=="string"||Zd(t)?t:null}}return n.\u0275fac=function(i){return new(i||n)(Ue("errorHandlerOptions"))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Qd(n){return new eh(n)}var th="ui.angular.routing";var ih;function nh(n,e){let i=e&&No(e).data||{};e&&i[Mn]==="url"&&(e.updateName(n),e.setAttribute(Mn,"route"),e.setAttribute(Io,`auto.${No(e).op}.angular`))}var Jd=(()=>{class n{constructor(i){this._router=i,this.navStart$=this._router.events.pipe(we(t=>t instanceof Gl),zi(t=>{if(!ih){Kd&&Qr.error("Angular integration has tracing enabled, but Tracing integration is not configured");return}this._routingSpan&&(this._routingSpan.end(),this._routingSpan=null);let o=Do(),r=Il(t.url);if(o){this._isPageloadOngoing()?this._pageloadOngoing=!1:tn(()=>{Hl(o,{name:r,attributes:{[Io]:"auto.navigation.angular",[Mn]:"url"}})}),this._routingSpan=tn(()=>Pl({name:`${t.url}`,op:th,attributes:O({[Io]:"auto.ui.angular",[Mn]:"url",url:r},t.navigationTrigger&&{navigationTrigger:t.navigationTrigger})}))||null;return}})),this.resEnd$=this._router.events.pipe(we(t=>t instanceof Zl),zi(t=>{let o=oh(t.state.root);o&&Ol().setTransactionName(o);let r=Xr(),a=r&&Jr(r);nh(o,a)})),this.navEnd$=this._router.events.pipe(we(t=>t instanceof Le||t instanceof Kl||t instanceof Yl),zi(()=>{this._routingSpan&&(tn(()=>{this._routingSpan.end()}),this._routingSpan=null)})),this._routingSpan=null,this._pageloadOngoing=!0,this._subscription=new Hs,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.resEnd$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}ngOnDestroy(){this._subscription.unsubscribe()}_isPageloadOngoing(){if(!this._pageloadOngoing)return!1;let i=Xr();if(!i)return this._pageloadOngoing=!1,!1;let t=Jr(i);return this._pageloadOngoing=No(t).op==="pageload",this._pageloadOngoing}}return n.\u0275fac=function(i){return new(i||n)(Ue(G))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function oh(n){let e=[],i=n?.firstChild;for(;i;
3){let o=i?.routeConfig&&i.routeConfig.path;if(o==null)break;e.push(o),i=i.firstChild}let t=e.filter(o=>o).join("/");return t?`/${t}/`:"/"}Lo();Tf();Pe();b();ve();Bi();zt();Bf();ad();Vf();zf();na();Ti();Pe();b();ia();ve();Se();zt();na();Ti();Ot();$o();Ge();Zi();Uf();b();var rh="https://accounts.google.com/gsi/client",ah=6e3,Xd=(()=>{let e=class e{constructor(){this.platformId=u(ze),this.platformService=u(De),this.domainDetection=u(Pn),this.authService=u(ct),this.authFlow=u(dd),this.appState=u(ld),this.globalLoading=u(ai),this.posthog=u(Gi),this.analytics=u(Ze),this.adConsent=u(qo),this.crossDomain=u(Qi),this.router=u(G),this.destroyRef=u(So),this.started=!1,this.evaluating=!1,this.gisInitialized=!1,this.credentialReceived=!1,this.activeSurface=null,this.activeHandoffSource=!1,this.handoffPending=!1}initialize(){if(this.started||!Fe(this.platformId))return;this.started=!0,this.trace("initialize"),this.destroyRef.onDestroy(()=>this.cancel());let t=this.readHandoffParams();t?(this.handoffPending=!0,this.trace("handoff:consume"),this.consumeHandoff(t.code,t.surface).finally(()=>{this.handoffPending=!1,this.evaluateAndPrompt()})):this.evaluateAndPrompt(),this.router.events.pipe(we(o=>o instanceof Le),zo(this.destroyRef)).subscribe(()=>{this.evaluateAndPrompt()})}cancel(){try{window.google?.accounts?.id?.cancel()}catch{}}config(){let t=K.googleOneTap;if(!K.production&&t){let o=window.__PMZ_ONE_TAP_E2E__;o&&(t=te(O(O({},t),o),{surfaces:O(O({},t.surfaces),o.surfaces??{})}))}return t??{enabled:!1,clientId:null,flagKey:"",surfaces:{}}}evaluateAndPrompt(){return F(this,null,function*(){if(!this.evaluating){if(this.gisInitialized&&this.alreadyPrompted()){this.currentSurface()||this.cancel();return}this.evaluating=!0;try{yield this.runGatingLadder()}catch(t){k.warn("One Tap evaluation failed:",t)}finally{this.evaluating=!1}}})}trace(t){if(!K.production)try{let o=window;(o.__PMZ_ONE_TAP_TRACE__??=[]).push(t)}catch{}}runGatingLadder(){return F(this,null,function*(){if(!Fe(this.platformId))return;if(this.trace("browser"),this.handoffPending)return this.trace("stop:handoff-pending");if(this.platformService.isNative())return this.trace("stop:native");let t=this.config();if(!t.enabled||!t.clientId)return this.trace("stop:config");let o=this.isHandoffSource(t);if(!this.domainDetection.isPhotomizeDomain()&&!this.isLocalDev()&&!o)return this.trace("stop:domain");let r=this.currentSurface();if(!r||!this.surfaceEnabled(t,r))return this.trace(`stop:surface:${r??"none"}`);if(this.alreadyPrompted())return this.trace("stop:already-prompted");if(this.authService.hasImmediateAuthEvidence())return this.trace("stop:auth-evidence");if(this.authFlowInFlight())return this.trace("stop:auth-flow-in-flight");try{yield ue(this.authService.authReady$.pipe(Co(s=>s===!0),bi(8e3)))}catch{return this.trace("stop:auth-never-settled")}if(this.authService.hasCurrentUser)return this.trace("stop:signed-in");if(yield this.waitForOverlayIdle(),this.adConsent.bannerVisible()&&(this.trace("wait:consent"),yield this.adConsent.whenDecided()),!(yield this.flagEnabled(t)))return this.trace("stop:flag");let a=this.currentSurface();if(!a||!this.surfaceEnabled(t,a))return this.trace("stop:surface-post-flag");this.trace(o?"prompt:handoff":"prompt"),this.activeHandoffSource=o,yield this.loadAndPrompt(t,a)})}isHandoffSource(t){return t.crossDomainHandoff===!0&&this.crossDomain.shouldRedirectToDifferentDomain(this.hostname(t))}hostname(t){return t.hostname??window.location.hostname}readHandoffParams(){try{let t=new URLSearchParams(window.location.search),o=t.get(aa);return o?{code:o,surface:t.get(sa)}:null}catch{return null}}stripHandoffParams(){return F(this,null,function*(){if(!this.router.navigated)try{yield ue(this.router.events.pipe(we(t=>t instanceof Le),Co(),bi(8e3)))}catch{}yield this.router.navigate([],{queryParams:{[aa]:null,[sa]:null},queryParamsHandling:"merge",replaceUrl:!0})})}consumeHandoff(t,o){return F(this,null,function*(){if(this.platformService.isNative())return;yield this.stripHandoffParams();try{yield ue(this.authService.authReady$.pipe(Co(a=>a===!0),bi(8e3)))}catch{return this.trace("handoff:auth-never-settled")}if(this.authService.hasCurrentUser)return this.trace("handoff:already-signed-in");yield this.waitForOverlayIdle();let r=yield this.authFlow.completeGoogleOneTapHandoff(t,o);if(!r.success&&this.authService.hasCurrentUser)return this.trace("handoff:failed-but-signed-in");this.trace(r.success?"handoff:done":"handoff:failed")})}loadAndPrompt(t,o){return F(this,null,function*(){if(!("IdentityCredential"in window)){this.analytics.trackUserInteraction("google_one_tap_prompt","unsupported",o);return}let r=yield this.loadGisScript(),a=window.google?.accounts?.id;if(!(!r||!a)){this.activeSurface=o,a.initialize({client_id:t.clientId,callback:s=>{this.onCredential(s)},use_fedcm_for_prompt:!0,auto_select:!1,cancel_on_tap_outside:!1,context:"signin"}),a.prompt(s=>this.onMoment(s,o)),this.gisInitialized=!0;
3try{sessionStorage.setItem(la,"1")}catch{}}})}loadGisScript(){return F(this,null,function*(){return window.google?.accounts?.id?!0:(window.__pmzGisLoading||(window.__pmzGisLoading=new Promise(t=>{let o=document.createElement("script");o.src=rh,o.async=!0,o.defer=!0;let r=(s,l)=>{this.posthog.capture(l?"one_tap_script_blocked":"one_tap_script_ok"),t(s)},a=setTimeout(()=>{r(!!window.google?.accounts?.id,!0)},ah);o.addEventListener("load",()=>{clearTimeout(a);let s=!!window.google?.accounts?.id;r(s,!s)}),o.addEventListener("error",()=>{clearTimeout(a),r(!1,!0)}),document.head.appendChild(o)})),window.__pmzGisLoading)})}onCredential(t){return F(this,null,function*(){if(!t?.credential)return;this.credentialReceived=!0,this.cancel();let o=this.activeSurface??"home_landing";if(this.activeHandoffSource){yield this.authFlow.handoffGoogleOneTap(t.credential,{surface:o,hostname:this.hostname(this.config())});return}yield this.authFlow.signInWithGoogleOneTap(t.credential,{surface:o,selectBy:t.select_by})})}onMoment(t,o){let r=l=>{try{return typeof l=="function"?l.call(t):!1}catch{return!1}},a=l=>{try{return typeof l=="function"?l.call(t):void 0}catch{return}};!r(t.isDismissedMoment)||a(t.getDismissedReason)==="credential_returned"||this.credentialReceived||this.analytics.trackUserInteraction("google_one_tap_prompt","dismissed",o)}currentSurface(){let t=null,o=this.router.routerState.snapshot.root;for(;o&&(o.data?.oneTapSurface&&(t=o.data.oneTapSurface),o=o.firstChild,!!o););return t}surfaceEnabled(t,o){try{let r=localStorage.getItem(zc);if(r)return r.split(",").map(a=>a.trim()).includes(o)}catch{}return t.surfaces[o]===!0}authFlowInFlight(){if(this.appState.redirectProcessingActive||this.appState.authFlowInProgress)return!0;try{return sessionStorage.getItem("pmz_google_signin_pending")==="1"||sessionStorage.getItem("google_oauth_return")==="1"||sessionStorage.getItem("auth_resume_pending")==="1"||localStorage.getItem("authFlowInProgress")==="true"}catch{return!1}}waitForOverlayIdle(){return F(this,null,function*(){let t=Date.now()+5e3;for(;this.globalLoading.isCurrentlyLoading&&Date.now()<t;)yield new Promise(o=>setTimeout(o,100))})}flagEnabled(t){return F(this,null,function*(){let o=yield this.posthog.getFeatureFlag(t.flagKey).catch(()=>{});return o===void 0&&(yield this.posthog.whenInitialized(),o=yield this.posthog.getFeatureFlag(t.flagKey).catch(()=>{})),o!==void 0&&this.posthog.capture("$feature_flag_called",{$feature_flag:t.flagKey,$feature_flag_response:o}),o===!0||o==="true"})}alreadyPrompted(){try{return sessionStorage.getItem(la)==="1"}catch{return!1}}isLocalDev(){return!K.production&&window.location.hostname==="localhost"}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Pe();re();b();function sh(n,e){if(n&1&&(J(0,"div",5)(1,"div",7)(2,"span",8),f(3),y(4,"transloco"),oe(),J(5,"span",9),f(6),oe()(),st(7,"div",10),J(8,"div",7)(9,"span",8),f(10),y(11,"transloco"),oe(),J(12,"span",9),f(13),oe()()()),n&2){let i=h();d(3),T(v(4,4,"versionCheck.yourVersion")),d(3),T(i.versionInfo().currentInstalledVersion),d(4),T(v(11,6,"versionCheck.requiredVersion")),d(3),T(i.versionInfo().minimumRequiredVersion)}}var eu=(()=>{let e=class e{constructor(){this.versionCheckService=u(jo),this.versionInfo=this.versionCheckService.versionInfo}onUpdate(){return F(this,null,function*(){yield this.versionCheckService.openStore()})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-force-update-screen"]],decls:13,vars:10,consts:[[1,"force-update-overlay"],[1,"logo-wrapper"],["src","images/logo/logo.webp","alt","Photomize",1,"logo-img"],[1,"update-title"],[1,"update-message"],[1,"version-card"],[1,"update-btn",3,"click"],[1,"version-row"],[1,"version-label"],[1,"version-value"],[1,"version-divider"]],template:function(o,r){o&1&&(J(0,"div",0)(1,"div",1),st(2,"img",2),oe(),J(3,"h1",3),f(4),y(5,"transloco"),oe(),J(6,"p",4),f(7),y(8,"transloco"),oe(),S(9,sh,14,8,"div",5),J(10,"button",6),Rt("click",function(){return r.onUpdate()}),f(11),y(12,"transloco"),oe()()),o&2&&(d(4),T(v(5,4,"versionCheck.title")),d(3),T(v(8,6,"versionCheck.message")),d(2),M(r.versionInfo()?9:-1),d(2),V(" ",v(12,8,"versionCheck.updateButton")," "))},dependencies:[ke,ee],styles:[".force-update-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(135deg,#667eea,#764ba2);padding:max(env(safe-area-inset-top),2rem) max(env(safe-area-inset-right),1.5rem) max(env(safe-area-inset-bottom),2rem) max(env(safe-area-inset-left),1.5rem);text-align:center;font-family:Mulish,system-ui,sans-serif}.logo-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}.logo-img[_ngcontent-%COMP%]{height:3rem;width:auto;filter:brightness(0) invert(1);opacity:.95}.update-title[_ngcontent-%COMP%]{color:#fff;font-size:1.75rem;font-weight:800;letter-spacing:-.02em;margin:0 0 .75rem;line-height:1.2}.update-message[_ngcontent-%COMP%]{color:#ffffffd9;font-size:1rem;line-height:1.6;max-width:20rem;margin:0 0 2rem}.version-card[_ngcontent-%COMP%]{background:#ffffff1f;border:1px solid rgba(255,255,255,.2);border-radius:14px;padding:1rem 1.5rem;margin-bottom:2rem;width:100%;max-width:18rem;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.version-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:.25rem 0}.version-divider[_ngcontent-%COMP%]{height:1px;background:#fff3;margin:.5rem 0}.version-label[_ngcontent-%COMP%]{color:#ffffffb3;font-size:.8125rem;font-weight:500}.version-value[_ngcontent-%COMP%]{color:#fff;font-size:.875rem;font-weight:700}.update-btn[_ngcontent-%COMP%]{display:block;width:100%;max-width:18rem;padding:1rem 2rem;background:#fff;color:#667eea;font-family:Mulish,system-ui,sans-serif;font-size:1rem;font-weight:800;letter-spacing:.01em;border:none;border-radius:14px;cursor:pointer;box-shadow:0 4px 24px #00000026;transition:transform .15s ease,box-shadow .15s ease}.update-btn[_ngcontent-%COMP%]:active{transform:scale(.97);box-shadow:0 2px 12px #0000001a}"]});let n=e;return n})();$f();b();re();En();b();var lh=["acceptButton"];function ch(n,e){if(n&1){let i=R();J(0,"div",1),y(1,"transloco"),st(2,"div",2),J(3,"div",3)(4,"div",4),st(5,"img",5),J(6,"div",6)(7,"p",7),f(8),y(9,"transloco"),oe(),J(10,"p",8),f(11),y(12,"transloco"),oe(),J(13,"a",9),f(14),y(15,"transloco"),oe()()(),J(16,"div",10)(17,"button",11,0),Rt("click",function(){w(i);let o=h();return C(o.consent.decide("granted"))}),f(19),y(20,"transloco"),oe(),J(21,"button",12),Rt("click",function(){w(i);let o=h();return C(o.consent.decide("denied"))}),f(22),y(23,"transloco"),oe()()()()}if(n&2){let i=h();de("aria-label",v(1,7,"consentBanner.message")),d(8),V(" ",v(9,9,i.messageKey())," "),d(3),V(" ",v(12,11,"consentBanner.reassurance")," "),d(2),To("href",i.privacyUrl(),Ui),d(),V(" ",v(15,13,"consentBanner.privacy")," "),d(5),V(" ",v(20,15,"consentBanner.accept")," "),d(3),V(" ",v(23,17,"consentBanner.decline")," ")}}var tu=(()=>{let e=class e{constructor(){this.consent=u(qo),this.transloco=u(Q),this.acceptButton=hl("acceptButton"),this.focusedFor=null,this.messageKey=I(()=>this.consent.bannerVariant()==="checkout"?"consentBanner.checkoutMessage":"consentBanner.message"),this.privacyUrl=I(()=>Oc(this.transloco.getActiveLang()))}ngAfterViewChecked(){let t=this.acceptButton()?.nativeElement??null;t&&t!==this.focusedFor?(this.focusedFor=t,t.focus({preventScroll:!0})):t||(this.focusedFor=null)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-consent-banner"]],viewQuery:function(o,r){o&1&&ll(r.acceptButton,lh,5),o&2&&cl()},decls:1,vars:1,consts:[["acceptButton",""],["role","dialog","aria-modal","true","data-testid","consent-banner",1,"fixed","inset-0","z-[900]","flex","items-end","justify-center","p-3","pb-5","sm:items-center"],["data-testid","consent-scrim",1,"consent-scrim","absolute","
3inset-0"],[1,"consent-card","relative","w-full","max-w-[420px]","rounded-2xl","p-4"],[1,"flex","items-start","gap-3"],["src","/images/phozi/phozi.webp","alt","Phozi",1,"phozi","h-16","w-16","shrink-0","object-contain"],[1,"min-w-0"],["data-testid","consent-message",1,"text-sm","font-medium","leading-snug",2,"color","var(--color-text-primary)"],[1,"mt-1","text-xs","leading-snug",2,"color","var(--color-text-muted)"],["target","_blank","rel","noopener","data-testid","consent-privacy-link",1,"mt-1","inline-block","text-xs","underline",2,"color","var(--color-text-muted)",3,"href"],[1,"mt-3","flex","gap-2"],["type","button","data-testid","consent-accept",1,"btn-accept","flex-1","rounded-xl","px-4","py-2.5","text-sm","font-semibold","transition-colors",3,"click"],["type","button","data-testid","consent-decline",1,"btn-decline","flex-1","rounded-xl","px-4","py-2.5","text-sm","font-semibold","transition-colors",3,"click"]],template:function(o,r){o&1&&S(0,ch,24,19,"div",1),o&2&&M(r.consent.bannerVisible()?0:-1)},dependencies:[ee],styles:[".consent-scrim[_ngcontent-%COMP%]{background:var(--color-scrim);animation:_ngcontent-%COMP%_consent-fade-in .24s ease-out both}@keyframes _ngcontent-%COMP%_consent-fade-in{0%{opacity:0}to{opacity:1}}.consent-card[_ngcontent-%COMP%]{background:var(--color-surface-elevated);border:1px solid var(--color-border);box-shadow:0 12px 40px var(--color-shadow);animation:_ngcontent-%COMP%_consent-slide-up .32s cubic-bezier(.34,1.56,.64,1) both}@keyframes _ngcontent-%COMP%_consent-slide-up{0%{opacity:0;transform:translateY(24px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}.phozi[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_phozi-sway 3.6s ease-in-out infinite;transform-origin:bottom center;filter:drop-shadow(0 8px 24px rgba(192,132,252,.18))}@keyframes _ngcontent-%COMP%_phozi-sway{0%{transform:rotate(-2.5deg)}50%{transform:rotate(2.5deg)}to{transform:rotate(-2.5deg)}}@media(prefers-reduced-motion:reduce){.consent-card[_ngcontent-%COMP%], .consent-scrim[_ngcontent-%COMP%], .phozi[_ngcontent-%COMP%]{animation:none}}.btn-accept[_ngcontent-%COMP%]{background:var(--brand-primary);color:#fff}.btn-accept[_ngcontent-%COMP%]:hover{background:var(--brand-primary-600)}.btn-decline[_ngcontent-%COMP%]{background:var(--color-muted-bg);border:1px solid var(--color-border);color:var(--color-text-primary)}.btn-decline[_ngcontent-%COMP%]:hover{background:var(--color-hover)}"],changeDetection:0});let n=e;return n})();b();Mi();Ot();b();Mi();se();re();b();ve();re();On();Ef();oa();b();var iu=(()=>{let e=class e{constructor(){this.router=u(G),this.transloco=u(Q),this.queue=u(Pt),this.guidedCreator=u(At),this.photographerModels=u(hc),this.creatorAvailability=u(Ki),this.query=X(""),this.activeIndex=X(0),this.createItems=I(()=>{let t=[{id:"guided",section:"create",label:this.transloco.translate("guidedCreator.entry.title"),hint:this.transloco.translate("guidedCreator.entry.subtitle"),icon:"flag",keywords:"wizard kreator guide",run:()=>this.guidedCreator.open()}];for(let o of ca)o.id==="creator"&&!this.creatorAvailability.flagEnabled()||t.push({id:`create-${o.id}`,section:"create",label:this.transloco.translate(o.labelKey),hint:this.transloco.translate(o.descriptionKey),icon:o.icon,run:()=>o.id==="creator"?this.go("/studio/creator/templates"):this.guidedCreator.open({app:o.id})});return t}),this.yoursItems=I(()=>this.photographerModels.allModels().filter(o=>!o.is_sample&&md(o.generation_status??"")).slice(0,5).map(o=>({id:`model-${o.id}`,section:"yours",label:o.name??this.transloco.translate("commandPalette.trainedModel"),hint:this.transloco.translate("commandPalette.trainedModel"),icon:"photo_camera",keywords:"model fotograf photographer",run:()=>this.go("/studio/photographer/sessions")}))),this.recentItems=I(()=>this.queue.recentCompleted().map(t=>({id:`recent-${t.id}`,section:"recent",label:t.title,hint:t.appLabel,icon:t.iconName,keywords:t.appLabel,run:()=>{this.router.navigateByUrl(t.galleryRoute)}}))),this.gotoItems=I(()=>{let t=r=>this.transloco.translate(r),o=this.creatorAvailability.flagEnabled()?[{id:"goto-creator",section:"goto",label:t("commandPalette.goto.creator"),icon:"auto_fix_high",run:()=>this.go("/studio/creator/templates")}
3,{id:"goto-creations",section:"goto",label:t("commandPalette.goto.creations"),icon:"movie_filter",run:()=>this.go("/studio/creator/runs")}]:[];return[{id:"goto-home",section:"goto",label:t("commandPalette.goto.home"),icon:"home",run:()=>this.go("/studio/home")},{id:"goto-gallery",section:"goto",label:t("commandPalette.goto.gallery"),icon:"perm_media",run:()=>this.go("/studio/gallery")},...o,{id:"goto-wallet",section:"goto",label:t("commandPalette.goto.wallet"),icon:"toll",run:()=>this.go("/studio/wallet")}]}),this.results=I(()=>{let t=[...this.createItems(),...this.yoursItems(),...this.recentItems(),...this.gotoItems()],o=this.query().trim().toLowerCase();return o?t.filter(r=>`${r.label} ${r.hint??""} ${r.keywords??""}`.toLowerCase().includes(o)):t}),this.sections=I(()=>{let t=["create","yours","recent","goto"],o=this.results();return t.map(r=>({section:r,items:o.filter(a=>a.section===r)})).filter(r=>r.items.length>0)}),this.creatorAvailability.isAvailable()}lang(){return this.transloco.getActiveLang()||"en"}go(t){this.router.navigateByUrl(`/${this.lang()}${t}`)}setQuery(t){this.query.set(t),this.activeIndex.set(0)}move(t){let o=this.results().length;o&&this.activeIndex.set((this.activeIndex()+t+o)%o)}runActive(){let t=this.results()[this.activeIndex()];return t?(t.run(),!0):!1}reset(){this.query.set(""),this.activeIndex.set(0)}appIds(){return ca.map(t=>t.id)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();se();re();var dh=["searchInput"],uh=(n,e)=>e.section,ph=(n,e)=>e.id;function mh(n,e){if(n&1&&(c(0,"span",12),f(1),p()),n&2){let i=h().$implicit;d(),T(i.hint)}}function fh(n,e){if(n&1){let i=R();c(0,"button",8),A("click",function(){let o=w(i).$implicit,r=h(2);return C(r.run(o))}),c(1,"mat-icon",9),f(2),p(),c(3,"span",10)(4,"span",11),f(5),p(),S(6,mh,2,1,"span",12),p()()}if(n&2){let i=e.$implicit,t=h(2);ie("is-active",t.isActive(i)),de("data-testid","command-"+i.id),d(2),T(i.icon),d(3),T(i.label),d(),M(i.hint?6:-1)}}function hh(n,e){if(n&1&&(c(0,"div",6),f(1),y(2,"transloco"),p(),_e(3,fh,7,6,"button",7,ph)),n&2){let i=e.$implicit;d(),V(" ",v(2,1,"commandPalette.section."+i.section)," "),d(2),ye(i.items)}}function gh(n,e){n&1&&(c(0,"p",5),f(1),y(2,"transloco"),p()),n&2&&(d(),V(" ",v(2,1,"commandPalette.empty")," "))}var nu=(()=>{let e=class e{constructor(){this.store=u(iu),this.dialogRef=u(ii)}ngOnInit(){this.store.reset(),setTimeout(()=>this.searchInput?.nativeElement.focus())}isActive(t){return this.store.results()[this.store.activeIndex()]?.id===t.id}onInput(t){this.store.setQuery(t.target.value)}onKeydown(t){if(t.key==="ArrowDown")t.preventDefault(),this.store.move(1);else if(t.key==="ArrowUp")t.preventDefault(),this.store.move(-1);else if(t.key==="Enter"){t.preventDefault();let o=this.store.results()[this.store.activeIndex()];o&&this.run(o)}}run(t){this.dialogRef.close(),t.run()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["pmz-command-palette"]],viewQuery:function(o,r){if(o&1&&Kt(dh,5),o&2){let a;Yt(a=Zt())&&(r.searchInput=a.first)}},decls:12,vars:5,consts:[["searchInput",""],[1,"cp-search"],["type","text","data-testid","command-palette-input",1,"cp-input",3,"input","keydown","value","placeholder"],[1,"cp-kbd"],[1,"cp-results"],[1,"cp-empty"],[1,"cp-section"],["type","button",1,"cp-item",3,"is-active"],["type","button",1,"cp-item",3,"click"],[1,"cp-item-icon"],[1,"cp-item-text"],[1,"cp-item-label"],[1,"cp-item-hint"]],template:function(o,r){if(o&1){let a=R();c(0,"div",1)(1,"mat-icon"),f(2,"search"),p(),c(3,"input",2,0),y(5,"transloco"),A("input",function(l){return w(a),C(r.onInput(l))})("keydown",function(l){return w(a),C(r.onKeydown(l))}),p(),c(6,"kbd",3),f(7,"esc"),p()(),c(8,"div",4),_e(9,hh,5,3,null,null,uh,!1,gh,3,3,"p",5),p()}o&2&&(d(3),Z("value",r.store.query())("placeholder",v(5,3,"commandPalette.placeholder")),d(6),ye(r.store.sections()))},dependencies:[ae,pe,ti,ee],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;max-height:inherit;background:var(--color-background);color:var(--color-text-primary);border-radius:inherit;overflow:hidden}.cp-search[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--color-border);color:var(--color-text-secondary)}.cp-input[_ngcontent-%COMP%]{flex:1;background:transparent;border:none;outline:none;color:var(--color-text-primary);font-size:15px}.cp-kbd[_ngcontent-%COMP%]{padding:2px 6px;border-radius:6px;border:1px solid var(--color-border);font-size:10px;color:var(--color-text-muted)}.cp-results[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:8px}.cp-section[_ngcontent-%COMP%]{padding:10px 10px 4px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--color-text-muted)}.cp-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;width:100%;padding:9px 10px;border:none;border-radius:10px;background:transparent;color:inherit;text-align:start;cursor:pointer}.cp-item[_ngcontent-%COMP%]:hover, .cp-item.is-active[_ngcontent-%COMP%]{background:var(--color-hover)}.cp-item-icon[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.cp-item-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.cp-item-label[_ngcontent-%COMP%]{font-size:14px}.cp-item-hint[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cp-empty[_ngcontent-%COMP%]{padding:28px 12px;text-align:center;font-size:13px;color:var(--color-text-muted)}"],changeDetection:0});let n=e;return n})();b();var Yo=(()=>{let e=class e{constructor(){this.dialog=u(ni),this.platform=u(De),this.ref=null}isOpen(){return!!this.ref}toggle(){if(this.ref){this.ref.close();return}this.open()}open(){if(this.ref)return this.ref;let t=this.platform.isDesktop();return this.ref=this.dialog.open(nu,{width:t?"min(620px, 100vw)":"100vw",maxWidth:t?"min(620px, 100vw)":"100vw",height:t?"auto":"100dvh",maxHeight:t?"70dvh":"100dvh",panelClass:"pmz-command-palette-panel",backdropClass:"pmz-command-palette-backdrop",autoF
3ocus:!1,position:t?{top:"12vh"}:{top:"0"}}),this.ref.afterClosed().subscribe(()=>this.ref=null),this.ref}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();$o();b();Ot();b();se();re();b();se();re();function _h(n,e){n&1&&(c(0,"div",4),E(1,"span")(2,"span")(3,"span"),p())}function yh(n,e){if(n&1){let i=R();c(0,"div",1),A("pointerdown",function(o){w(i);let r=h();return C(r.onPointerDown(o))})("pointermove",function(o){w(i);let r=h();return C(r.onPointerMove(o))})("pointerup",function(o){w(i);let r=h();return C(r.onPointerUp(o))})("pointercancel",function(o){w(i);let r=h();return C(r.onPointerUp(o))}),c(1,"button",2),y(2,"transloco"),A("click",function(){w(i);let o=h();return C(o.playback.close())}),c(3,"mat-icon"),f(4,"close"),p()(),c(5,"button",3),y(6,"transloco"),y(7,"transloco"),A("click",function(){let o=w(i),r=h();return C(r.playback.isPlaying()?r.playback.pause():r.playback.toggle(o))}),c(8,"mat-icon"),f(9),p()(),S(10,_h,4,0,"div",4),p()}if(n&2){let i,t,o=h();xe("left",(i=o.pos())==null?null:i.x,"px")("top",(t=o.pos())==null?null:t.y,"px"),ie("is-positioned",o.pos()!==null)("is-dragging",o.dragging()),d(),de("aria-label",v(2,14,"inspireWall.musicPlayer.close")),d(4),ie("is-playing",o.playback.isPlaying()),de("aria-label",o.playback.isPlaying()?v(6,16,"inspireWall.musicPlayer.pause"):v(7,18,"inspireWall.musicPlayer.play")),d(4),T(o.playback.isPlaying()?"pause":"play_arrow"),d(),M(o.playback.isPlaying()?10:-1)}}var ou=(()=>{let e=class e{constructor(){this.playback=u(Wo),this.pos=X(null),this.dragging=X(!1),this.start=null}onPointerDown(t){if(t.button!==0)return;let o=t.currentTarget.getBoundingClientRect();this.start={px:t.clientX,py:t.clientY,ox:o.left,oy:o.top,w:o.width,h:o.height}}onPointerMove(t){let o=this.start;if(!o)return;let r=t.clientX-o.px,a=t.clientY-o.py;if(!this.dragging()&&Math.hypot(r,a)<4)return;this.dragging()||(this.dragging.set(!0),t.currentTarget.setPointerCapture(t.pointerId));let s=8,l=window.innerWidth-o.w-s,m=window.innerHeight-o.h-s,g=Math.min(Math.max(s,o.ox+r),Math.max(s,l)),_=Math.min(Math.max(s,o.oy+a),Math.max(s,m));this.pos.set({x:g,y:_})}onPointerUp(t){this.dragging()&&(t.currentTarget.releasePointerCapture?.(t.pointerId),setTimeout(()=>this.dragging.set(!1))),this.start=null}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-music-mini-player-desktop"]],decls:1,vars:1,consts:[["role","region","aria-label","Music player",1,"cluster",3,"is-positioned","is-dragging","left","top"],["role","region","aria-label","Music player",1,"cluster",3,"pointerdown","pointermove","pointerup","pointercancel"],["type","button",1,"close-btn",3,"click"],["type","button",1,"play-btn",3,"click"],["aria-hidden","true",1,"eq"]],template:function(o,r){if(o&1&&S(0,yh,11,20,"div",0),o&2){let a;M((a=r.playback.currentTrack())?0:-1,a)}},dependencies:[ae,pe,ti,ee],styles:['[_nghost-%COMP%]{display:contents}.cluster[_ngcontent-%COMP%]{position:fixed;z-index:200;inset-inline-end:16px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 7px;border-radius:999px;background:#141416e6;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.14);box-shadow:0 12px 36px #00000080;cursor:grab;touch-action:none;animation:_ngcontent-%COMP%_cluster-in .28s cubic-bezier(.2,.8,.2,1) both}.cluster.is-positioned[_ngcontent-%COMP%]{inset-inline-end:auto;transform:none}.cluster.is-dragging[_ngcontent-%COMP%]{cursor:grabbing;animation:none;-webkit-user-select:none;user-select:none}@keyframes _ngcontent-%COMP%_cluster-in{0%{transform:translate(120%,-50%);opacity:0}to{transform:translateY(-50%);opacity:1}}@media(prefers-reduced-motion:reduce){.cluster[_ngcontent-%COMP%]{animation:none}}.close-btn[_ngcontent-%COMP%]{width:24px;height:24px;border-radius:50%;border:none;background:#ffffff14;color:#ffffffb3;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:color .15s,background .15s}.close-btn[_ngcontent-%COMP%]:hover{color:#fff;background:#ffffff29}.close-btn[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.play-btn[_ngcontent-%COMP%]{position:relative;width:48px;height:48px;border-radius:50%;border:none;background:linear-gradient(135deg,#3b82f6,#8b5cf6,#ec4899);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:filter .15s}.play-btn[_ngcontent-%COMP%]:hover{filter:brightness(1.15)}.play-btn[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:26px;width:26px;height:26px}.play-btn.is-playing[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid rgba(139,92,246,.6);animation:_ngcontent-%COMP%_pulse-ring 1.4s ease-out infinite}@keyframes _ngcontent-%COMP%_pulse-ring{0%{transform:scale(.92);opacity:.9}to{transform:scale(1.25);opacity:0}
3}.eq[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:2px;height:14px}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{width:3px;border-radius:1px;background:linear-gradient(#c4b5fd,#ec4899);animation:_ngcontent-%COMP%_eq-bounce .9s ease-in-out infinite}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(1){height:60%;animation-delay:0s}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(2){height:100%;animation-delay:.15s}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(3){height:45%;animation-delay:.3s}@keyframes _ngcontent-%COMP%_eq-bounce{0%,to{transform:scaleY(.4)}50%{transform:scaleY(1)}}@media(prefers-reduced-motion:reduce){.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .play-btn.is-playing[_ngcontent-%COMP%]:after{animation:none}}'],changeDetection:0});let n=e;return n})();b();se();re();b();se();re();function vh(n,e){n&1&&(c(0,"div",3),E(1,"span")(2,"span")(3,"span"),p())}function bh(n,e){if(n&1){let i=R();c(0,"div",0)(1,"button",1),y(2,"transloco"),A("click",function(){w(i);let o=h();return C(o.playback.close())}),c(3,"mat-icon"),f(4,"close"),p()(),c(5,"button",2),y(6,"transloco"),y(7,"transloco"),A("click",function(){let o=w(i),r=h();return C(r.playback.isPlaying()?r.playback.pause():r.playback.toggle(o))}),c(8,"mat-icon"),f(9),p()(),S(10,vh,4,0,"div",3),p()}if(n&2){let i=h();d(),de("aria-label",v(2,6,"inspireWall.musicPlayer.close")),d(4),ie("is-playing",i.playback.isPlaying()),de("aria-label",i.playback.isPlaying()?v(6,8,"inspireWall.musicPlayer.pause"):v(7,10,"inspireWall.musicPlayer.play")),d(4),T(i.playback.isPlaying()?"pause":"play_arrow"),d(),M(i.playback.isPlaying()?10:-1)}}var ru=(()=>{let e=class e{constructor(){this.playback=u(Wo)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-music-mini-player-mobile"]],decls:1,vars:1,consts:[["role","region","aria-label","Music player",1,"cluster"],["type","button",1,"close-btn",3,"click"],["type","button",1,"play-btn",3,"click"],["aria-hidden","true",1,"eq"]],template:function(o,r){if(o&1&&S(0,bh,11,12,"div",0),o&2){let a;M((a=r.playback.currentTrack())?0:-1,a)}},dependencies:[ae,pe,ti,ee],styles:['[_nghost-%COMP%]{display:contents}.cluster[_ngcontent-%COMP%]{position:fixed;z-index:200;inset-inline-end:10px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 7px;border-radius:999px;background:#141416e6;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.14);box-shadow:0 12px 36px #00000080;animation:_ngcontent-%COMP%_cluster-in .28s cubic-bezier(.2,.8,.2,1) both}@keyframes _ngcontent-%COMP%_cluster-in{0%{transform:translate(120%,-50%);opacity:0}to{transform:translateY(-50%);opacity:1}}@media(prefers-reduced-motion:reduce){.cluster[_ngcontent-%COMP%]{animation:none}}.close-btn[_ngcontent-%COMP%]{width:24px;height:24px;border-radius:50%;border:none;background:#ffffff14;color:#ffffffb3;display:flex;align-items:center;justify-content:center;cursor:pointer}.close-btn[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.play-btn[_ngcontent-%COMP%]{position:relative;width:48px;height:48px;border-radius:50%;border:none;background:linear-gradient(135deg,#3b82f6,#8b5cf6,#ec4899);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}.play-btn[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:26px;width:26px;height:26px}.play-btn.is-playing[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid rgba(139,92,246,.6);animation:_ngcontent-%COMP%_pulse-ring 1.4s ease-out infinite}@keyframes _ngcontent-%COMP%_pulse-ring{0%{transform:scale(.92);opacity:.9}to{transform:scale(1.25);opacity:0}}.eq[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:2px;height:14px}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{width:3px;border-radius:1px;background:linear-gradient(#c4b5fd,#ec4899);animation:_ngcontent-%COMP%_eq-bounce .9s ease-in-out infinite}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(1){height:60%;animation-delay:0s}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(2){height:100%;animation-delay:.15s}.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(3){height:45%;animation-delay:.3s}@keyframes _ngcontent-%COMP%_eq-bounce{0%,to{transform:scaleY(.4)}50%{transform:scaleY(1)}}@media(prefers-reduced-motion:reduce){.eq[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .play-btn.is-playing[_ngcontent-%COMP%]:after{animation:none}}'],changeDetection:0});let n=e;return n})();b();function xh(n,e){n&1&&E(0,"app-music-mini-player-desktop")}function wh(n,e){n&1&&E(0,"app-music-mini-player-mobile")}var au=(()=>{let e=class e{constructor(){this.platform=u(De),this.isDesktop=this.platform.isDesktop}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-music-mini-player"]],decls:2,vars:1,template:function(o,r){o&1&&S(0,xh,1,0,"app-music-mini-player-desktop")(1,wh,1,0,"app-music-mini-player-mobile"),o&2&&M(r.isDesktop()?0:1)},dependencies:[ou,ru],encapsulation:2,changeDetection:0});let n=e;return n})();b();se();qf();b();se();var Ch=(n,e)=>e.label;function Sh(n,e){if(n&1&&(c(0,"p",9),f(1),p()),n&2){let i=h();d(),T(i.subtitle)}}function Mh(n,e){if(n&1&&(c(0,"mat-icon",16),f(1),p()),n&2){let i=h().$implicit;d(),T(i.icon)}}function Th(n,e){if(n&1&&(c(0,"button",15),S(1,Mh,2,1,"mat-icon",16),f(2),p()),n&2){let i=e.$implicit,t=h(3);Ae(t.actionClass(i)),Z("appAsyncButton",t.runAction(i)),d(),M(i.icon?1:-1),d(),V(" ",i.label," ")}}function kh(n,e){if(n&1&&(c(0,"div",12),_e(1,Th,3,5,"button",14,Ch),p()),n&2){let i=h();d(),ye(i.actions)}}function Eh(n,e){if(n&1&&(c(0,"div",13),E(1,"div",17),p()),n&2){let i=h(2);d(),Ae(i.stripClass()),xe("--dur",i.duration()+"ms")}}function Oh(n,e){if(n&1){let i=R();c(0,"div",0)(1,"div",1),E(2,"div",2),c(3,"div",3)(4,"div",4)(5,"div",5)(6,"mat-icon",6),f(7),p()(),c(8,"div",7)(9,"p",8),f(10),p(),S(11,Sh,2,1,"p",9),p(),c(12,"button",10),A("click",function(){w(i);let o=h();return C(o.svc.dismiss())}),c(13,"mat-icon",11),f(14,"close"),p()()(),S(15,kh,3,0,"div",12),p(),S(16,Eh,2,4,"div",13),p()()}if(n&2){let i=e,t=h();de("data-notif-id",i.id),d(2),Ae(t.stripClass()),d(3),Ae(t.iconBgClass()),d(2),V(" ",i.icon," "),d(3),T(i.title),d(),M(i.subtitle?11:-1),d(4),M(i.actions!=null&&i.actions.length?15:-1),d(),M(t.duration()>0?16:-1)}}var su=(()=>{let e=class e{constructor(){this.svc=u(Uc),this.duration=I(()=>this.svc.current()?.duration??5e3),this.stripClass=I(()=>{let t=this.svc.current()?.iconVariant??"gradient";return{gradient:"bg-gradient-to-r from-blue-500 via-purple-500 to-pink-500",success:"bg-green-500",info:"bg-blue-500",warn:"bg-amber-500"}[t]}),this.iconBgClass=I(()=>{let t=this.svc.current()?.iconVariant??"gradient";return{gradient:"bg-gradient-to-br from-blue-500 via-purple-500 to-pink-500",success:"bg-green-500/80",info:"bg-blue-500/80",warn:"bg-amber-500/80"}[t]})}actionClass(t){return t.variant==="ghost"?"bg-white/8 text-white/70 hover:bg-white/12 hover:text-white border border-white/10":"bg-gradient-to-r from-blue-500 via-purple-500 to-pink-500 text-white shadow-md hover:shadow-lg hover:scale-[1.02]"}runAction(t){return()=>(this.svc.dismiss(),t.action())}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-toast"]],decls:1,vars:1,consts:[["data-testid","app-toast",1,"fixed","inset-x-0","bottom-10","z-[100000]","flex","justify-center","px-4","md:bottom-14"],[1,"pmz-notif","w-full","max-w-sm","overflow-hidden","rounded-2xl","border","border-white/10","shadow-2xl","shadow-black/50",2,"background","#1c1c22"],[1,"h-0.5","w-full"],[1,"p-4"],[1,"flex","items-start","gap-3"],[1,"shrink-0","flex","h-10","w-10","items-center","justify-center","rounded-xl"],[1,"text-white",2,"font-size","20px","width","20px","height","20px"],[1,"flex-1","min-w-0","pt-0.5"],[1,"text-sm","font-semibold","text-white","leading-snug"],[1,"mt-0.5","text-xs","text-white/55","leading-snug"],["type","button",1,"shrink-0","flex","h-7","w-7","items-center","justify-center","rounded-lg","text-white/40","transition","hover:bg-white/10","hover:text-white/70",3,"click"],[2,"font-size","16px","width","16px","height","16px"],[1,"mt-3","flex","gap-2"],[1,"h-0.5","w-full","bg-white/5"],["type","button",1,"flex-1","flex","items-center","justify-center","gap-1.5","rounded-xl","px-3","py-2","text-xs","font-semibold","transition-all","duration-150","active:scale-95",3,"class","appAsyncButton"],["type","button",1,"flex-1","flex","items-center","justify-center","gap-1.5","rounded-xl","px-3","py-2","text-xs","font-semibold","transition-all","duration-150","active:scale-95",3,"appAsyncButton"],[2,"font-size","14px","width","14px","height","14px"],[1,"pmz-progress","h-full"]],template:function(o,r){if(o&1&&S(0,Oh,17,10,"div",0),o&2){let a;M((a=r.svc.current())?0:-1,a)}},dependencies:[ae,pe,kd],styles:["[_nghost-%COMP%]{pointer-events:none}
3.pmz-notif[_ngcontent-%COMP%]{pointer-events:all;animation:_ngcontent-%COMP%_pmz-slide-up .24s cubic-bezier(.34,1.56,.64,1) both}@keyframes _ngcontent-%COMP%_pmz-slide-up{0%{opacity:0;transform:translateY(20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.pmz-progress[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pmz-shrink var(--dur, 5s) linear forwards}@keyframes _ngcontent-%COMP%_pmz-shrink{0%{width:100%}to{width:0%}}"],changeDetection:0});let n=e;return n})();Ge();b();var Ph=()=>[import("./chunk-FIN6D3FW.js").then(n=>n.QaVariantPanelComponent)];function Ah(n,e){n&1&&E(0,"app-force-update-screen")}function Dh(n,e){n&1&&E(0,"app-qa-variant-panel")}function Ih(n,e){n&1&&(ol(0,Dh,1,0),al(1,0,Ph),sl())}function Nh(n,e){if(n&1&&(E(0,"router-outlet")(1,"mobile-user-menu")(2,"app-toast")(3,"app-consent-banner")(4,"app-music-mini-player"),S(5,Ih,3,0)),n&2){let i=h();d(5),M(i.showQaPanel()?5:-1)}}var lu=(()=>{let e=class e{onDocumentKeydown(t){t.key!=="k"||!(t.metaKey||t.ctrlKey)||(t.preventDefault(),this.palette.toggle())}constructor(t){this.seoService=t,this.palette=u(Yo),this.guidedCreator=u(At),this.router=u(G),this.activatedRoute=u(ji),this.platformId=u(ze),this.appInitializer=u(pd),this.globalLoading=u(ai),this.appReadyTriggered=!1,this.lastStateCheck="",this.appStateSignal=u(Vc),this.qaPanel=u(Bc),this.showQaPanel=this.qaPanel.visible,this.versionCheckService=u(jo),this.posthogService=u(Gi),this.analytics=u(Ze),this.analyticsConfig=u(Lc),this.gtm=u(Rc),this.logger=u(Vo),this.firstTouchAttribution=u(sd),this.googleOneTap=u(Xd),this.pendingCheckout=u(ud),this.injector=u(wn)}ngOnInit(){return F(this,null,function*(){if(Fe(this.platformId)){this.firstTouchAttribution.capture(),this.qaPanel.resolveInitial(),this.guidedCreator.isEnabled(),this.guidedCreator.restoreFromUrl(),this.logger.debug("Browser initialization started"),this.logger.debug("PostHog config",{hasKey:!!K.posthog.key,host:K.posthog.host});let t=K.production?void 0:window.__POSTHOG_E2E_INIT__;if(this.analyticsConfig.isDestinationEnabled("posthog")||t){let o=t?.host??K.posthog.host;this.posthogService.init(t?.key??K.posthog.key,O({api_host:o,ui_host:this.getPostHogUiHost(o),capture_exceptions:K.production,disable_external_dependency_loading:!1,advanced_disable_flags:!1},t?{disable_compression:!0,opt_out_useragent_filter:!0}:{}))}this.gtm.init(),this.injector.get(Qi).replayEarlyAuthClick(),this.analytics.initNativeLifecycle(),yield this.appInitializer.initializeApp(),this.googleOneTap.initialize(),this.setupNavigationMonitoring(),this.setupStateBasedReadinessDetection(),this.pendingCheckout.startWatching(),this.pendingCheckout.resolvePending()}qi(this.platformId)&&(this.logger.debug("Server-side rendering: Starting SEO setup"),this.handleCurrentRoute(),this.router.events.pipe(we(t=>t instanceof Le)).subscribe(()=>{this.handleCurrentRoute()}))})}getPostHogUiHost(t){return t.startsWith("http")?t.replace("https://eu.i.posthog.com","https://eu.posthog.com").replace("https://us.i.posthog.com","https://us.posthog.com"):"https://eu.posthog.com"}handleCurrentRoute(){let t=this.activatedRoute;for(;t.firstChild;)t=t.firstChild;let o=t.snapshot.data;if(this.logger.debug(`Processing route: ${this.router.url}`),o.skipSeo===!0){this.logger.debug("Route has skipSeo flag, skipping");return}o.seoKey?(k.debug(`[APP] Applying SEO for key: ${o.seoKey}`),this.seoService.setMetaForPage(o.seoKey,o.isPublic!==!1)):o.isPublic===!1&&(k.debug("[APP] Applying minimal SEO for non-public route"),this.seoService.setMetaForPage("app",!1)),o.robots&&this.seoService.setRobotsMeta(o.robots)}setupNavigationMonitoring(){Fe(this.platformId)&&(k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: Setting up navigation monitoring`),this.router.events.pipe(we(t=>t instanceof Le)).subscribe(t=>{k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: Navigation to: ${t.url}`)}))}setupStateBasedReadinessDetection(){if(!Fe(this.platformId))return;k.debug("[APP] Setting up state-based readiness detection...");let t=!1,o=null,r=null,a=null,s=()=>{o&&(clearTimeout(o),o=null),r&&(clearInterval(r),r=null),a&&(clearTimeout(a),a=null)},l=this.router.url;l&&l!=="/"?(k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: Navigation already completed to: ${l}`),t=!0,o=setTimeout(()=>{this.appReadyTriggered||this.checkAppReadiness("navigation_delay",s)},1e3)):this.router.events.pipe(we(g=>g instanceof Le),gt(1)).subscribe(g=>{k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: First navigation complete to: ${g.url}`),t=!0,o=setTimeout(()=>{this.appReadyTriggered||this.checkAppReadiness("navigation_delay",s)},1e3)});let m=()=>{if(this.appReadyTriggered)return;let g=this.appStateSignal.isLoading(),_=this.appStateSignal.isWalletLoading(),D=this.globalLoading.
3isCurrentlyLoading,x=`${g}-${_}-${D}-${t}`;this.lastStateCheck!==x&&(k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: State check \u2014 AppState: ${g}, Wallet: ${_}, Global: ${D}, NavComplete: ${t}`),this.lastStateCheck=x),!g&&!_&&t&&this.checkAppReadiness("state_ready",s)};k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: Starting app readiness monitoring`),r=setInterval(()=>{if(this.appReadyTriggered){s();return}m()},200),a=setTimeout(()=>{this.appReadyTriggered||(k.warn(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: Fallback timeout reached \u2014 forcing app ready`),s(),this.appReadyTriggered=!0,this.appInitializer.markAppAsReady())},2e4)}checkAppReadiness(t,o){if(this.appReadyTriggered)return;let r=this.appStateSignal.isLoading(),a=this.appStateSignal.isWalletLoading(),s=this.globalLoading.isCurrentlyLoading;!r&&!a&&!s?(k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: App ready via ${t}`),this.appReadyTriggered=!0,o?.(),this.appInitializer.markAppAsReady()):k.debug(`[AUTH-PERF] ${performance.now().toFixed(2)}ms: Not ready (${t}) \u2014 AppState: ${r}, Wallet: ${a}, Global: ${s}`)}};e.\u0275fac=function(o){return new(o||e)(Gt(Ed,8))},e.\u0275cmp=U({type:e,selectors:[["app-root"]],hostBindings:function(o,r){o&1&&A("keydown",function(s){return r.onDocumentKeydown(s)},tl)},decls:2,vars:1,template:function(o,r){o&1&&S(0,Ah,1,0,"app-force-update-screen")(1,Nh,6,1),o&2&&M(r.versionCheckService.updateRequired()?0:1)},dependencies:[Xt,rd,eu,su,tu,au],styles:["[_nghost-%COMP%]{display:flex;flex:1 1 auto;width:100%;height:100%}"]});let n=e;return n})();b();sc();b();b();b();Se();var ga=new Ci("MAT_DATE_LOCALE",{providedIn:"root",factory:Fh});function Fh(){return u(fl)}var nn="Method not implemented",Bt=class{locale;_localeChanges=new Et;localeChanges=this._localeChanges;setTime(e,i,t,o){throw new Error(nn)}getHours(e){throw new Error(nn)}getMinutes(e){throw new Error(nn)}getSeconds(e){throw new Error(nn)}parseTime(e,i){throw new Error(nn)}addSeconds(e,i){throw new Error(nn)}getValidDateOrNull(e){return this.isDateInstance(e)&&this.isValid(e)?e:null}deserialize(e){return e==null||this.isDateInstance(e)&&this.isValid(e)?e:this.invalid()}setLocale(e){this.locale=e,this._localeChanges.next()}compareDate(e,i){return this.getYear(e)-this.getYear(i)||this.getMonth(e)-this.getMonth(i)||this.getDate(e)-this.getDate(i)}compareTime(e,i){return this.getHours(e)-this.getHours(i)||this.getMinutes(e)-this.getMinutes(i)||this.getSeconds(e)-this.getSeconds(i)}sameDate(e,i){if(e&&i){let t=this.isValid(e),o=this.isValid(i);return t&&o?!this.compareDate(e,i):t==o}return e==i}sameTime(e,i){if(e&&i){let t=this.isValid(e),o=this.isValid(i);return t&&o?!this.compareTime(e,i):t==o}return e==i}clampDate(e,i,t){return i&&this.compareDate(e,i)<0?i:t&&this.compareDate(e,t)>0?t:e}},Zo=new Ci("mat-date-formats");var Ut=class extends Error{},Qo=class extends Ut{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},Jo=class extends Ut{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},Xo=class extends Ut{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},bt=class extends Ut{},on=class extends Ut{constructor(e){super(`Invalid unit ${e}`)}},Ie=class extends Ut{},xt=class extends Ut{constructor(){super("Zone is an abstract class")}};var N="numeric",wt="short",tt="long",di={year:N,month:N,day:N},In={year:N,month:wt,day:N},_a={year:N,month:wt,day:N,weekday:wt},Nn={year:N,month:tt,day:N},Fn={year:N,month:tt,day:N,weekday:tt},Ln={hour:N,minute:N},Rn={hour:N,minute:N,second:N},Vn={hour:N,minute:N,second:N,timeZoneName:wt},zn={hour:N,minute:N,second:N,timeZoneName:tt},Bn={hour:N,minute:N,hourCycle:"h23"},Un={hour:N,minute:N,second:N,hourCycle:"h23"},$n={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:wt},qn={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:tt},jn={year:N,month:N,day:N,hour:N,minute:N},Wn={year:N,month:N,day:N,hour:N,minute:N,second:N},Hn={year:N,month:wt,day:N,hour:N,minute:N},Gn={year:N,month:wt,day:N,hour:N,minute:N,second:N},ya={year:N,month:wt,day:N,weekday:wt,hour:N,minute:N},Kn={year:N,month:tt,day:N,hour:N,minute:N,timeZoneName:wt},Yn={year:N,month:tt,day:N,hour:N,minute:N,second:N,timeZoneName:wt},Zn={year:N,month:tt,day:N,weekday:tt,hour:N,minute:N,timeZoneName:tt},Qn={year:N,month:tt,day:N,weekday:tt,hour:N,minute:N,second:N,timeZoneName:tt};var it=class{get type(){throw new xt}get name(){throw new xt}get ianaName(){return this.name}get isUniversal(){throw new xt}offsetName(e,i){throw new xt}formatOffset(e,i){throw new xt}offset(e){throw new xt}equals(e){throw new xt}get isValid(){throw new xt}};var va=null,Ei=class n extends it{static get instance(){return va===null&&(va=new n),va}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:i,locale:t}){return tr(e,i,t)}formatOffset(e,i){return ui(this.offset(e),i)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}};var nr={};function Lh(n){return nr[n]||(nr[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),nr[n]}var Rh={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Vh(n,e){let i=n.format(e).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,o,r,a,s,l,m,g]=t;return[a,o,r,s,l,m,g]}function zh(n,e){let i=n.formatToParts(e),t=[];for(let o=0;o<i.length;o++){let{type:r,value:a}=i[o],s=Rh[r];r==="era"?t[s]=a:q(s)||(t[s]=parseInt(a,10))}return t}var ir={},Ye=class n extends it{static create(e){return ir[e]||(ir[e]=new n(e)),ir[e]}static resetCache(){ir={},nr={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=n.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:i,locale:t}){return tr(e,i,t,this.name)}formatOffset(e,i){return ui(this.offset(e),i)}offset(e){let i=new Date(e);if(isNaN(i))return NaN;let t=Lh(this.name),[o,r,a,s,l,m,g]=t.formatToParts?zh(t,i):Vh(t,i);s==="BC"&&(o=-Math.abs(o)+1);let D=rn({year:o,month:r,day:a,hour:l===24?0:l,minute:m,second:g,millisecond:0}),x=+i,P=x%1e3;return x-=P>=0?P:1e3+P,(D-x)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}};var cu={};function Bh(n,e={}){let i=JSON.stringify([n,e]),t=cu[i];
3return t||(t=new Intl.ListFormat(n,e),cu[i]=t),t}var ba={};function xa(n,e={}){let i=JSON.stringify([n,e]),t=ba[i];return t||(t=new Intl.DateTimeFormat(n,e),ba[i]=t),t}var wa={};function Uh(n,e={}){let i=JSON.stringify([n,e]),t=wa[i];return t||(t=new Intl.NumberFormat(n,e),wa[i]=t),t}var Ca={};function $h(n,e={}){let a=e,{base:i}=a,t=xn(a,["base"]),o=JSON.stringify([n,t]),r=Ca[o];return r||(r=new Intl.RelativeTimeFormat(n,e),Ca[o]=r),r}var Jn=null;function qh(){return Jn||(Jn=new Intl.DateTimeFormat().resolvedOptions().locale,Jn)}var du={};function jh(n){let e=du[n];if(!e){let i=new Intl.Locale(n);e="getWeekInfo"in i?i.getWeekInfo():i.weekInfo,du[n]=e}return e}function Wh(n){let e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));let i=n.indexOf("-u-");if(i===-1)return[n];{let t,o;try{t=xa(n).resolvedOptions(),o=n}catch{let l=n.substring(0,i);t=xa(l).resolvedOptions(),o=l}let{numberingSystem:r,calendar:a}=t;return[o,r,a]}}function Hh(n,e,i){return(i||e)&&(n.includes("-u-")||(n+="-u"),i&&(n+=`-ca-${i}`),e&&(n+=`-nu-${e}`)),n}function Gh(n){let e=[];for(let i=1;i<=12;i++){let t=Y.utc(2009,i,1);e.push(n(t))}return e}function Kh(n){let e=[];for(let i=1;i<=7;i++){let t=Y.utc(2016,11,13+i);e.push(n(t))}return e}function or(n,e,i,t){let o=n.listingMode();return o==="error"?null:o==="en"?i(e):t(e)}function Yh(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}var Sa=class{constructor(e,i,t){this.padTo=t.padTo||0,this.floor=t.floor||!1;let s=t,{padTo:o,floor:r}=s,a=xn(s,["padTo","floor"]);if(!i||Object.keys(a).length>0){let l=O({useGrouping:!1},t);t.padTo>0&&(l.minimumIntegerDigits=t.padTo),this.inf=Uh(e,l)}}format(e){if(this.inf){let i=this.floor?Math.floor(e):e;return this.inf.format(i)}else{let i=this.floor?Math.floor(e):an(e,3);return Te(i,this.padTo)}}},Ma=class{constructor(e,i,t){this.opts=t,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let a=-1*(e.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Ye.create(s).valid?(o=s,this.dt=e):(o="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,o=e.zone.name):(o="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let r=O({},this.opts);r.timeZone=r.timeZone||o,this.dtf=xa(i,r)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(i=>{if(i.type==="timeZoneName"){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return te(O({},i),{value:t})}else return i}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Ta=class{constructor(e,i,t){this.opts=O({style:"long"},t),!i&&rr()&&(this.rtf=$h(e,t))}format(e,i){return this.rtf?this.rtf.format(e,i):uu(i,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,i){return this.rtf?this.rtf.formatToParts(e,i):[]}},Zh={firstDay:1,minimalDays:4,weekend:[6,7]},be=class n{static fromOpts(e){return n.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,i,t,o,r=!1){let a=e||ge.defaultLocale,s=a||(r?"en-US":qh()),l=i||ge.defaultNumberingSystem,m=t||ge.defaultOutputCalendar,g=Xn(o)||ge.defaultWeekSettings;return new n(s,l,m,g,a)}static resetCache(){Jn=null,ba={},wa={},Ca={}}static fromObject({locale:e,numberingSystem:i,outputCalendar:t,weekSettings:o}={}){return n.create(e,i,t,o)}constructor(e,i,t,o,r){let[a,s,l]=Wh(e);this.locale=a,this.numberingSystem=i||s||null,this.outputCalendar=t||l||null,this.weekSettings=o,this.intl=Hh(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Yh(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),i=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&i?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:n.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Xn(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone(te(O({},e),{defaultToEN:!0}))}redefaultToSystem(e={}){return this.clone(te(O({},e),{defaultToEN:!1}))}months(e,i=!1){return or(this,e,ka,()=>{let t=i?{month:e,day:"numeric"}:{month:e},o=i?"format":"standalone";return this.monthsCache[o][e]||(this.monthsCache[o][e]=Gh(r=>this.extract(r,t,"month"))),this.monthsCache[o][e]})}weekdays(e,i=!1){return or(this,e,Ea,()=>{let t=i?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},o=i?"format":"standalone";return this.weekdaysCache[o][e]||(this.weekdaysCache[o][e]=Kh(r=>this.extract(r,t,"weekday"))),this.weekdaysCache[o][e]})}meridiems(){return or(this,void 0,()=>Oa,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Y.utc(2016,11,13,9),Y.utc(2016,11,13,19)].map(i=>this.extract(i,e,"dayperiod"))}return this.meridiemCache})}eras(e){return or(this,e,Pa,()=>{let i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Y.utc(-40,1,1),Y.utc(2017,1,1)].map(t=>this.extract(t,i,"era"))),this.eraCache[e]}
3)}extract(e,i,t){let o=this.dtFormatter(e,i),r=o.formatToParts(),a=r.find(s=>s.type.toLowerCase()===t);return a?a.value:null}numberFormatter(e={}){return new Sa(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,i={}){return new Ma(e,this.intl,i)}relFormatter(e={}){return new Ta(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Bh(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ar()?jh(this.locale):Zh}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}};var Da=null,$e=class n extends it{static get utcInstance(){return Da===null&&(Da=new n(0)),Da}static instance(e){return e===0?n.utcInstance:new n(e)}static parseSpecifier(e){if(e){let i=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(i)return new n(Oi(i[1],i[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ui(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ui(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,i){return ui(this.fixed,i)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}};var eo=class extends it{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Ct(n,e){let i;if(q(n)||n===null)return e;if(n instanceof it)return n;if(pu(n)){let t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Ei.instance:t==="utc"||t==="gmt"?$e.utcInstance:$e.parseSpecifier(t)||Ye.create(n)}else return Dt(n)?$e.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new eo(n)}var mu=()=>Date.now(),fu="system",hu=null,gu=null,_u=null,yu=60,vu,bu=null,ge=class{static get now(){return mu}static set now(e){mu=e}static set defaultZone(e){fu=e}static get defaultZone(){return Ct(fu,Ei.instance)}static get defaultLocale(){return hu}static set defaultLocale(e){hu=e}static get defaultNumberingSystem(){return gu}static set defaultNumberingSystem(e){gu=e}
vendor: 4,300 bytes, line 3
3static get defaultOutputCalendar(){return _u}static set defaultOutputCalendar(e){_u=e}static get defaultWeekSettings(){return bu}static set defaultWeekSettings(e){bu=Xn(e)}static get twoDigitCutoffYear(){return yu}static set twoDigitCutoffYear(e){yu=e%100}static get throwOnInvalid(){return vu}static set throwOnInvalid(e){vu=e}static resetCaches(){be.resetCache(),Ye.resetCache()}};var qe=class{constructor(e,i){this.reason=e,this.explanation=i}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var xu=[0,31,59,90,120,151,181,212,243,273,304,334],wu=[0,31,60,91,121,152,182,213,244,274,305,335];function dt(n,e){return new qe("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function sr(n,e,i){let t=new Date(Date.UTC(n,e-1,i));n<100&&n>=0&&t.setUTCFullYear(t.getUTCFullYear()-1900);let o=t.getUTCDay();return o===0?7:o}function Cu(n,e,i){return i+(Ai(n)?wu:xu)[e-1]}function Su(n,e){let i=Ai(n)?wu:xu,t=i.findIndex(r=>r<e),o=e-i[t];return{month:t+1,day:o}}function lr(n,e){return(n-e+7)%7+1}function to(n,e=4,i=1){let{year:t,month:o,day:r}=n,a=Cu(t,o,r),s=lr(sr(t,o,r),i),l=Math.floor((a-s+14-e)/7),m;return l<1?(m=t-1,l=Pi(m,e,i)):l>Pi(t,e,i)?(m=t+1,l=1):m=t,O({weekYear:m,weekNumber:l,weekday:s},no(n))}function Ia(n,e=4,i=1){let{weekYear:t,weekNumber:o,weekday:r}=n,a=lr(sr(t,1,e),i),s=pi(t),l=o*7+r-a-7+e,m;l<1?(m=t-1,l+=pi(m)):l>s?(m=t+1,l-=pi(t)):m=t;let{month:g,day:_}=Su(m,l);return O({year:m,month:g,day:_},no(n))}function cr(n){let{year:e,month:i,day:t}=n,o=Cu(e,i,t);return O({year:e,ordinal:o},no(n))}function Na(n){let{year:e,ordinal:i}=n,{month:t,day:o}=Su(e,i);return O({year:e,month:t,day:o},no(n))}function Fa(n,e){if(!q(n.localWeekday)||!q(n.localWeekNumber)||!q(n.localWeekYear)){if(!q(n.weekday)||!q(n.weekNumber)||!q(n.weekYear))throw new bt("Cannot mix locale-based week fields with ISO-based week fields");return q(n.localWeekday)||(n.weekday=n.localWeekday),q(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),q(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Mu(n,e=4,i=1){let t=io(n.weekYear),o=nt(n.weekNumber,1,Pi(n.weekYear,e,i)),r=nt(n.weekday,1,7);return t?o?r?!1:dt("weekday",n.weekday):dt("week",n.weekNumber):dt("weekYear",n.weekYear)}function Tu(n){let e=io(n.year),i=nt(n.ordinal,1,pi(n.year));return e?i?!1:dt("ordinal",n.ordinal):dt("year",n.year)}function La(n){let e=io(n.year),i=nt(n.month,1,12),t=nt(n.day,1,sn(n.year,n.month));return e?i?t?!1:dt("day",n.day):dt("month",n.month):dt("year",n.year)}function Ra(n){let{hour:e,minute:i,second:t,millisecond:o}=n,r=nt(e,0,23)||e===24&&i===0&&t===0&&o===0,a=nt(i,0,59),s=nt(t,0,59),l=nt(o,0,999);return r?a?s?l?!1:dt("millisecond",o):dt("second",t):dt("minute",i):dt("hour",e)}function q(n){return typeof n>"u"}function Dt(n){return typeof n=="number"}function io(n){return typeof n=="number"&&n%1===0}function pu(n){return typeof n=="string"}function Eu(n){return Object.prototype.toString.call(n)==="[object Date]"}function rr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ar(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Ou(n){return Array.isArray(n)?n:[n]}function Va(n,e,i){if(n.length!==0)return n.reduce((t,o)=>{let r=[e(o),o];return t&&i(t[0],r[0])===t[0]?t:r},null)[1]}function Pu(n,e){return e.reduce((i,t)=>(i[t]=n[t],i),{})}function mi(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Xn(n){if(n==null)return null;if(typeof n!="object")throw new Ie("Week settings must be an object");if(!nt(n.firstDay,1,7)||!nt(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!nt(e,1,7)))throw new Ie("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function nt(n,e,i){return io(n)&&n>=e&&n<=i}function Qh(n,e){return n-e*Math.floor(n/e)}function Te(n,e=2){let i=n<0,t;return i?t="-"+(""+-n).padStart(e,"0"):t=(""+n).padStart(e,"0"),t}function $t(n){if(!(q(n)||n===null||n===""))return parseInt(n,10)}
3function fi(n){if(!(q(n)||n===null||n===""))return parseFloat(n)}function oo(n){if(!(q(n)||n===null||n==="")){let e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function an(n,e,i=!1){let t=10**e;return(i?Math.trunc:Math.round)(n*t)/t}function Ai(n){return n%4===0&&(n%100!==0||n%400===0)}function pi(n){return Ai(n)?366:365}function sn(n,e){let i=Qh(e-1,12)+1,t=n+(e-i)/12;return i===2?Ai(t)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function rn(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function ku(n,e,i){return-lr(sr(n,1,e),i)+e-1}function Pi(n,e=4,i=1){let t=ku(n,e,i),o=ku(n+1,e,i);return(pi(n)-t+o)/7}function ro(n){return n>99?n:n>ge.twoDigitCutoffYear?1900+n:2e3+n}function tr(n,e,i,t=null){let o=new Date(n),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};t&&(r.timeZone=t);let a=O({timeZoneName:e},r),s=new Intl.DateTimeFormat(i,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function Oi(n,e){let i=parseInt(n,10);Number.isNaN(i)&&(i=0);let t=parseInt(e,10)||0,o=i<0||Object.is(i,-0)?-t:t;return i*60+o}function za(n){let e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Ie(`Invalid unit value ${n}`);return e}function ln(n,e){let i={};for(let t in n)if(mi(n,t)){let o=n[t];if(o==null)continue;i[e(t)]=za(o)}return i}function ui(n,e){let i=Math.trunc(Math.abs(n/60)),t=Math.trunc(Math.abs(n%60)),o=n>=0?"+":"-";switch(e){case"short":return`${o}${Te(i,2)}:${Te(t,2)}`;case"narrow":return`${o}${i}${t>0?`:${t}`:""}`;case"techie":return`${o}${Te(i,2)}${Te(t,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function no(n){return Pu(n,["hour","minute","second","millisecond"])}var Jh=["January","February","March","April","May","June","July","August","September","October","November","December"],Ba=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Xh=["J","F","M","A","M","J","J","A","S","O","N","D"];function ka(n){switch(n){case"narrow":return[...Xh];case"short":return[...Ba];case"long":return[...Jh];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ua=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],$a=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],eg=["M","T","W","T","F","S","S"];function Ea(n){switch(n){case"narrow":return[...eg];case"short":return[...$a];case"long":return[...Ua];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Oa=["AM","PM"],tg=["Before Christ","Anno Domini"],ig=["BC","AD"],ng=["B","A"];function Pa(n){switch(n){case"narrow":return[...ng];case"short":return[...ig];case"long":return[...tg];default:return null}}function Au(n){return Oa[n.hour<12?0:1]}function Du(n,e){return Ea(e)[n.weekday-1]}function Iu(n,e){return ka(e)[n.month-1]}function Nu(n,e){return Pa(e)[n.year<0?0:1]}function uu(n,e,i="always",t=!1){let o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(n)===-1;if(i==="auto"&&r){let _=n==="days";switch(e){case 1:return _?"tomorrow":`next ${o[n][0]}`;case-1:return _?"yesterday":`last ${o[n][0]}`;case 0:return _?"today":`this ${o[n][0]}`;default:}}let a=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,m=o[n],g=t?l?m[1]:m[2]||m[1]:l?o[n][0]:n;return a?`${s} ${g} ago`:`in ${s} ${g}`}function Fu(n,e){let i="";for(let t of n)t.literal?i+=t.val:i+=e(t.val);return i}var og={D:di,DD:In,DDD:Nn,DDDD:Fn,t:Ln,tt:Rn,ttt:Vn,tttt:zn,T:Bn,TT:Un,TTT:$n,TTTT:qn,f:jn,ff:Hn,fff:Kn,ffff:Zn,F:Wn,FF:Gn,FFF:Yn,FFFF:Qn},je=class n{static create(e,i={}){return new n(e,i)}static parseFormat(e){let i=null,t="",o=!1,r=[];for(let a=0;a<e.length;a++){let s=e.charAt(a);s==="'"?(t.length>0&&r.push({literal:o||/^\s+$/.test(t),val:t}),i=null,t="",o=!o):o||s===i?t+=s:(t.length>0&&r.push({literal:/^\s+$/.test(t),val:t}),t=s,i=s)}return t.length>0&&r.push({literal:o||/^\s+$/.test(t),val:t}),r}static macroTokenToFormatOpts(e){return og[e]}constructor(e,i){this.opts=i,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,i){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem(
3)),this.systemLoc.dtFormatter(e,O(O({},this.opts),i)).format()}dtFormatter(e,i={}){return this.loc.dtFormatter(e,O(O({},this.opts),i))}formatDateTime(e,i){return this.dtFormatter(e,i).format()}formatDateTimeParts(e,i){return this.dtFormatter(e,i).formatToParts()}formatInterval(e,i){return this.dtFormatter(e.start,i).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,i){return this.dtFormatter(e,i).resolvedOptions()}num(e,i=0){if(this.opts.forceSimple)return Te(e,i);let t=O({},this.opts);return i>0&&(t.padTo=i),this.loc.numberFormatter(t).format(e)}formatDateTimeFromString(e,i){let t=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(x,P)=>this.loc.extract(e,x,P),a=x=>e.isOffsetFixed&&e.offset===0&&x.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,x.format):"",s=()=>t?Au(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(x,P)=>t?Iu(e,x):r(P?{month:x}:{month:x,day:"numeric"},"month"),m=(x,P)=>t?Du(e,x):r(P?{weekday:x}:{weekday:x,month:"long",day:"numeric"},"weekday"),g=x=>{let P=n.macroTokenToFormatOpts(x);return P?this.formatWithSystemDefault(e,P):x},_=x=>t?Nu(e,x):r({era:x},"era"),D=x=>{switch(x){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return o?r({day:"numeric"},"day"):this.num(e.day);case"dd":return o?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return m("short",!0);case"cccc":return m("long",!0);case"ccccc":return m("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return m("short",!1);case"EEEE":return m("long",!1);case"EEEEE":return m("narrow",!1);case"L":return o?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return o?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?r({month:"numeric"},"month"):this.num(e.month);case"MM":return o?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?r({year:"numeric"},"year"):this.num(e.year);case"yy":return o?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return o?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return o?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return _("short");case"GG":return _("long");case"GGGGG":return _("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return g(x)}};return Fu(n.parseFormat(i),D)}formatDurationFromString(e,i){let t=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>m=>{let g=t(m);return g?this.num(l.get(g),m.length):m},r=n.parseFormat(i),a=r.reduce((l,{literal:m,val:g})=>m?l:l.concat(g),[]),s=e.shiftTo(...a.map(t).filter(l=>l));return Fu(r,o(s))}};var Ru=/[A-Za-z_+-]{1,256}
3(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function dn(...n){let e=n.reduce((i,t)=>i+t.source,"");return RegExp(`^${e}$`)}function un(...n){return e=>n.reduce(([i,t,o],r)=>{let[a,s,l]=r(e,o);return[O(O({},i),a),s||t,l]},[{},null,1]).slice(0,2)}function pn(n,...e){if(n==null)return[null,null];for(let[i,t]of e){let o=i.exec(n);if(o)return t(o)}return[null,null]}function Vu(...n){return(e,i)=>{let t={},o;for(o=0;o<n.length;o++)t[n[o]]=$t(e[i+o]);return[t,null,i+o]}}var zu=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,rg=`(?:${zu.source}?(?:\\[(${Ru.source})\\])?)?`,qa=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Bu=RegExp(`${qa.source}${rg}`),ja=RegExp(`(?:T${Bu.source})?`),ag=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,sg=/(\d{4})-?W(\d\d)(?:-?(\d))?/,lg=/(\d{4})-?(\d{3})/,cg=Vu("weekYear","weekNumber","weekDay"),dg=Vu("year","ordinal"),ug=/(\d{4})-(\d\d)-(\d\d)/,Uu=RegExp(`${qa.source} ?(?:${zu.source}|(${Ru.source}))?`),pg=RegExp(`(?: ${Uu.source})?`);function cn(n,e,i){let t=n[e];return q(t)?i:$t(t)}function mg(n,e){return[{year:cn(n,e),month:cn(n,e+1,1),day:cn(n,e+2,1)},null,e+3]}function mn(n,e){return[{hours:cn(n,e,0),minutes:cn(n,e+1,0),seconds:cn(n,e+2,0),milliseconds:oo(n[e+3])},null,e+4]}function ao(n,e){let i=!n[e]&&!n[e+1],t=Oi(n[e+1],n[e+2]),o=i?null:$e.instance(t);return[{},o,e+3]}function so(n,e){let i=n[e]?Ye.create(n[e]):null;return[{},i,e+1]}var fg=RegExp(`^T?${qa.source}$`),hg=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function gg(n){let[e,i,t,o,r,a,s,l,m]=n,g=e[0]==="-",_=l&&l[0]==="-",D=(x,P=!1)=>x!==void 0&&(P||x&&g)?-x:x;return[{years:D(fi(i)),months:D(fi(t)),weeks:D(fi(o)),days:D(fi(r)),hours:D(fi(a)),minutes:D(fi(s)),seconds:D(fi(l),l==="-0"),milliseconds:D(oo(m),_)}]}var _g={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Wa(n,e,i,t,o,r,a){let s={year:e.length===2?ro($t(e)):$t(e),month:Ba.indexOf(i)+1,day:$t(t),hour:$t(o),minute:$t(r)};return a&&(s.second=$t(a)),n&&(s.weekday=n.length>3?Ua.indexOf(n)+1:$a.indexOf(n)+1),s}var yg=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function vg(n){let[,e,i,t,o,r,a,s,l,m,g,_]=n,D=Wa(e,o,t,i,r,a,s),x;return l?x=_g[l]:m?x=0:x=Oi(g,_),[D,new $e(x)]}function bg(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var xg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,wg=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Cg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Lu(n){let[,e,i,t,o,r,a,s]=n;return[Wa(e,o,t,i,r,a,s),$e.utcInstance]}function Sg(n){let[,e,i,t,o,r,a,s]=n;return[Wa(e,s,i,t,o,r,a),$e.utcInstance]}var Mg=dn(ag,ja),Tg=dn(sg,ja),kg=dn(lg,ja),Eg=dn(Bu),$u=un(mg,mn,ao,so),Og=un(cg,mn,ao,so),Pg=un(dg,mn,ao,so),Ag=un(mn,ao,so);function qu(n){return pn(n,[Mg,$u],[Tg,Og],[kg,Pg],[Eg,Ag])}function ju(n){return pn(bg(n),[yg,vg])}function Wu(n){return pn(n,[xg,Lu],[wg,Lu],[Cg,Sg])}function Hu(n){return pn(n,[hg,gg])}var Dg=un(mn);function Gu(n){return pn(n,[fg,Dg])}var Ig=dn(ug,pg),Ng=dn(Uu),Fg=un(mn,ao,so);function Ku(n){return pn(n,[Ig,$u],[Ng,Fg])}var Yu="Invalid Duration",Qu={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Lg=O({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3}}
3,Qu),ut=146097/400,fn=146097/4800,Rg=O({years:{quarters:4,months:12,weeks:ut/7,days:ut,hours:ut*24,minutes:ut*24*60,seconds:ut*24*60*60,milliseconds:ut*24*60*60*1e3},quarters:{months:3,weeks:ut/28,days:ut/4,hours:ut*24/4,minutes:ut*24*60/4,seconds:ut*24*60*60/4,milliseconds:ut*24*60*60*1e3/4},months:{weeks:fn/7,days:fn,hours:fn*24,minutes:fn*24*60,seconds:fn*24*60*60,milliseconds:fn*24*60*60*1e3}},Qu),Di=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Vg=Di.slice(0).reverse();function hi(n,e,i=!1){let t={values:i?e.values:O(O({},n.values),e.values||{}),loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new Oe(t)}function Ju(n,e){let i=e.milliseconds??0;for(let t of Vg.slice(1))e[t]&&(i+=e[t]*n[t].milliseconds);return i}function Zu(n,e){let i=Ju(n,e)<0?-1:1;Di.reduceRight((t,o)=>{if(q(e[o]))return t;if(t){let r=e[t]*i,a=n[o][t],s=Math.floor(r/a);e[o]+=s*i,e[t]-=s*a*i}return o},null),Di.reduce((t,o)=>{if(q(e[o]))return t;if(t){let r=e[t]%1;e[t]-=r,e[o]+=r*n[t][o]}return o},null)}function zg(n){let e={};for(let[i,t]of Object.entries(n))t!==0&&(e[i]=t);return e}var Oe=class n{constructor(e){let i=e.conversionAccuracy==="longterm"||!1,t=i?Rg:Lg;e.matrix&&(t=e.matrix),this.values=e.values,this.loc=e.loc||be.create(),this.conversionAccuracy=i?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t,this.isLuxonDuration=!0}static fromMillis(e,i){return n.fromObject({milliseconds:e},i)}static fromObject(e,i={}){if(e==null||typeof e!="object")throw new Ie(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new n({values:ln(e,n.normalizeUnit),loc:be.fromObject(i),conversionAccuracy:i.conversionAccuracy,matrix:i.matrix})}static fromDurationLike(e){if(Dt(e))return n.fromMillis(e);if(n.isDuration(e))return e;if(typeof e=="object")return n.fromObject(e);throw new Ie(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,i){let[t]=Hu(e);return t?n.fromObject(t,i):n.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,i){let[t]=Gu(e);return t?n.fromObject(t,i):n.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,i=null){if(!e)throw new Ie("need to specify a reason the Duration is invalid");let t=e instanceof qe?e:new qe(e,i);if(ge.throwOnInvalid)throw new Xo(t);return new n({invalid:t})}static normalizeUnit(e){let i={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!i)throw new on(e);return i}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,i={}){let t=te(O({},i),{floor:i.round!==!1&&i.floor!==!1});return this.isValid?je.create(this.loc,t).formatDurationFromString(this,e):Yu}toHuman(e={}){if(!this.isValid)return Yu;let i=Di.map(t=>{let o=this.values[t];return q(o)?null:this.loc.numberFormatter(te(O({style:"unit",unitDisplay:"long"},e),{unit:t.slice(0,-1)})).format(o)}).filter(t=>t);return this.loc.listFormatter(O({type:"conjunction",style:e.listStyle||"narrow"},e)).format(i)}toObject(){return this.isValid?O({},this.values):{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=an(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let i=this.toMillis();return i<0||i>=864e5?null:(e=te(O({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e),{includeOffset:!1}),Y.fromMillis(i,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Ju(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let i=n.fromDurationLike(e),t={};for(let o of Di)(mi(i.values,o)||mi(this.values,o))&&(t[o]=i.get(o)+this.get(o));return hi(this,{values:t},!0)}minus(e){if(!this.isValid)return this;let i=n.fromDurationLike(e);return this.plus(i.negate())}mapUnits(e){if(!this.isValid)return this;let i={};for(let t of Object.keys(this.values))i[t]=za(e(this.values[t],t));return hi(this,{values:i},!0)}get(e){return this[n.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let i=O(O({},this.values),ln(e,n.normalizeUnit));return hi(this,{values:i})}reconfigure({locale:e,numberingSystem:i,conversionAccuracy:t,matrix:o}={}){let a={loc:this.loc.clone({locale:e,numberingSystem:i}),matrix:o,conversionAccuracy:t};return hi(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return Zu(this.matrix,e),hi(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=zg(this.normalize().shiftToAll().toObject());return hi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>
vendor: 11,690 bytes, line 3
3n.normalizeUnit(a));let i={},t={},o=this.toObject(),r;for(let a of Di)if(e.indexOf(a)>=0){r=a;let s=0;for(let m in t)s+=this.matrix[m][a]*t[m],t[m]=0;Dt(o[a])&&(s+=o[a]);let l=Math.trunc(s);i[a]=l,t[a]=(s*1e3-l*1e3)/1e3}else Dt(o[a])&&(t[a]=o[a]);for(let a in t)t[a]!==0&&(i[r]+=a===r?t[a]:t[a]/this.matrix[r][a]);return Zu(this.matrix,i),hi(this,{values:i},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let i of Object.keys(this.values))e[i]=this.values[i]===0?0:-this.values[i];return hi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function i(t,o){return t===void 0||t===0?o===void 0||o===0:t===o}for(let t of Di)if(!i(this.values[t],e.values[t]))return!1;return!0}};var hn="Invalid Interval";function Bg(n,e){return!n||!n.isValid?gi.invalid("missing or invalid start"):!e||!e.isValid?gi.invalid("missing or invalid end"):e<n?gi.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}var gi=class n{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,i=null){if(!e)throw new Ie("need to specify a reason the Interval is invalid");let t=e instanceof qe?e:new qe(e,i);if(ge.throwOnInvalid)throw new Jo(t);return new n({invalid:t})}static fromDateTimes(e,i){let t=gn(e),o=gn(i),r=Bg(t,o);return r??new n({start:t,end:o})}static after(e,i){let t=Oe.fromDurationLike(i),o=gn(e);return n.fromDateTimes(o,o.plus(t))}static before(e,i){let t=Oe.fromDurationLike(i),o=gn(e);return n.fromDateTimes(o.minus(t),o)}static fromISO(e,i){let[t,o]=(e||"").split("/",2);if(t&&o){let r,a;try{r=Y.fromISO(t,i),a=r.isValid}catch{a=!1}let s,l;try{s=Y.fromISO(o,i),l=s.isValid}catch{l=!1}if(a&&l)return n.fromDateTimes(r,s);if(a){let m=Oe.fromISO(o,i);if(m.isValid)return n.after(r,m)}else if(l){let m=Oe.fromISO(t,i);if(m.isValid)return n.before(s,m)}}return n.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",i){if(!this.isValid)return NaN;let t=this.start.startOf(e,i),o;return i?.useLocaleWeeks?o=this.end.reconfigure({locale:t.locale}):o=this.end,o=o.startOf(e,i),Math.floor(o.diff(t,e).get(e))+(o.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:i}={}){return this.isValid?n.fromDateTimes(e||this.s,i||this.e):this}splitAt(...e){if(!this.isValid)return[];let i=e.map(gn).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),t=[],{s:o}=this,r=0;for(;o<this.e;){let a=i[r]||this.e,s=+a>+this.e?this.e:a;t.push(n.fromDateTimes(o,s)),o=s,r+=1}return t}splitBy(e){let i=Oe.fromDurationLike(e);if(!this.isValid||!i.isValid||i.as("milliseconds")===0)return[];let{s:t}=this,o=1,r,a=[];for(;t<this.e;){let s=this.start.plus(i.mapUnits(l=>l*o));r=+s>+this.e?this.e:s,a.push(n.fromDateTimes(t,r)),t=r,o+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let i=this.s>e.s?this.s:e.s,t=this.e<e.e?this.e:e.e;return i>=t?null:n.fromDateTimes(i,t)}union(e){if(!this.isValid)return this;let i=this.s<e.s?this.s:e.s,t=this.e>e.e?this.e:e.e;return n.fromDateTimes(i,t)}static merge(e){let[i,t]=e.sort((o,r)=>o.s-r.s).reduce(([o,r],a)=>r?r.overlaps(a)||r.abutsStart(a)?[o,r.union(a)]:[o.concat([r]),a]:[o,a],[[],null]);return t&&i.push(t),i}static xor(e){let i=null,t=0,o=[],r=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...r),s=a.sort((l,m)=>l.time-m.time);for(let l of s)t+=l.type==="s"?1:-1,t===1?i=l.time:(i&&+i!=+l.time&&o.push(n.fromDateTimes(i,l.time)),i=null);return n.merge(o)}difference(...e){return n.xor([this].concat(e)).map(i=>this.intersection(i)).filter(i=>i&&!i.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:hn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=di,i={}){return this.isValid?je.create(this.s.loc.clone(i),e).formatInterval(this):hn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:hn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:hn}toFormat(e,{separator:i=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${i}${this.e.toFormat(e)}`:hn}toDuration(e,i){return this.isValid?this.e.diff(this.s,e,i):Oe.invalid(this.invalidReason)}mapEndpoints(e){return n.fromDateTimes(e(this.s),e(this.e))}};var pt=class{static hasDST(e=ge.defaultZone){let i=Y.now().setZone(e).set({month:12});return!e.isUniversal&&i.offset!==i.set({month:6}).offset}static isValidIANAZone(e){return Ye.isValidZone(e)}static normalizeZone(e){return Ct(e,ge.defaultZone)}static getStartOfWeek({locale:e=null,locObj:i=null}={}){return(i||be.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:i=null}={}){return(i||be.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:i=null}={}){return(i||be.create(e)).getWeekendDays().slice()}static months(e="long",{locale:i=null,numberingSystem:t=null,locObj:o=null,outputCalendar:r="gregory"}={}){return(o||be.create(i,t,r)).months(e)}static monthsFormat(e="long",{locale:i=null,numberingSystem:t=null,locObj:o=null,outputCalendar:r="gregory"}={}){return(o||be.create(i,t,r)).months(e,!0)}static weekdays(e="long",{locale:i=null,numberingSystem:t=null,locObj:o=null}={}){return(o||be.create(i,t,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:i=null,numberingSystem:t=null,locObj:o=null}={}){return(o||be.create(i,t,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return be.create(e).meridiems()}static eras(e="short",{locale:i=null}={}){return be.create(i,null,"gregory").eras(e)}static features(){return{relative:rr(),localeWeek:ar()}}};function Xu(n,e){let i=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),t=i(e)-i(n);return Math.floor(Oe.fromMillis(t).as("days"))}function Ug(n,e,i){let t=[["years",(l,m)=>m.year-l.year],["quarters",(l,m)=>m.quarter-l.quarter+(m.year-l.year)*4],["months",(l,m)=>m.month-l.month+(m.year-l.year)*12],["weeks",(l,m)=>{let g=Xu(l,m);return(g-g%7)/7}],["days",Xu]],o={},r=n,a,s;for(let[l,m]of t)i.indexOf(l)>=0&&(a=l,o[l]=m(n,e),s=r.plus(o),s>e?(o[l]--,n=r.plus(o),n>e&&(s=n,o[l]--,n=r.plus(o))):n=s);return[n,o,s,a]}function ep(n,e,i,t){let[o,r,a,s]=Ug(n,e,i),l=e-o,m=i.filter(_=>["hours","minutes","seconds","milliseconds"].indexOf(_)>=0);m.length===0&&(a<e&&(a=o.plus({[s]:1})),a!==o&&(r[s]=(r[s]||0)+l/(a-o)));let g=Oe.fromObject(r,t);return m.length>0?Oe.fromMillis(l,t).shiftTo(...m).plus(g):g}var Ha={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},tp={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},$g=Ha.hanidec.replace(/[\[|\]]/g,"").split("");function ip(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let i=0;i<n.length;i++){let t=n.charCodeAt(i);if(n[i].search(Ha.hanidec)!==-1)e+=$g.indexOf(n[i]);else for(let o in tp){let[r,a]=tp[o];t>=r&&t<=a&&(e+=t-r)}}return parseInt(e,10)}else return e}function mt({numberingSystem:n},e=""){return new RegExp(`${Ha[n||"latn"]}${e}`)}var qg="missing Intl.DateTimeFormat.formatToParts support";function he(n,e=i=>i){return{regex:n,deser:([i])=>e(ip(i))}}var jg="\xA0",rp=`[ ${jg}]`,ap=new RegExp(rp,"g");function Wg(n){return n.replace(/\./g,"\\.?").replace(ap,rp)}function np(n){return n.replace(/\./g,"").replace(ap," ").toLowerCase()}function St(n,e){return n===null?null:{regex:RegExp(n.map(Wg).join("|")),deser:([i])=>n.findIndex(t=>np(i)===np(t))+e}}function op(n,e){return{regex:n,deser:([,i,t])=>Oi(i,t),groups:e}}function dr(n){return{regex:n,deser:([e])=>e}}function Hg(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Gg(n,e){let i=mt(e),t=mt(e,"{2}"),o=mt(e,"{3}"),r=mt(e,"{4}"),a=mt(e,"{6}"),s=mt(e,"{1,2}"),l=mt(e,"{1,3}"),m=mt(e,"{1,6}"),g=mt(e,"{1,9}"),_=mt(e,"{2,4}"),D=mt(e,"{4,6}"),x=B=>({regex:RegExp(Hg(B.val)),deser:([me])=>me,literal:!0}),z=(B=>{if(n.literal)return x(B);switch(B.val){case"G":return St(e.eras("short"),0);case"GG":return St(e.eras("long"),0);case"y":return he(m);case"yy":return he(_,ro);case"yyyy":return he(r);case"yyyyy":return he(D);case"yyyyyy":return he(a);case"M":return he(s);case"MM":return he(t);case"MMM":return St(e.months("short",!0),1);case"MMMM":return St(e.months("long",!0),1);case"L":return he(s);case"LL":return he(t);case"LLL":return St(e.months("short",!1),1);case"LLLL":return St(e.months("long",!1),1);case"d":return he(s);case"dd":return he(t);case"o":return he(l);case"ooo":return he(o);case"HH":return he(t);case"H":return he(s);case"hh":return he(t);case"h":return he(s);case"mm":return he(t);case"m":return he(s);case"q":return he(s);case"qq":return he(t);case"s":return he(s);case"ss":return he(t);case"S":return he(l);case"SSS":return he(o);case"u":return dr(g);case"uu":return dr(s);case"uuu":return he(i);case"a":return St(e.meridiems(),0);case"kkkk":return he(r);case"kk":return he(_,ro);case"W":return he(s);
3case"WW":return he(t);case"E":case"c":return he(i);case"EEE":return St(e.weekdays("short",!1),1);case"EEEE":return St(e.weekdays("long",!1),1);case"ccc":return St(e.weekdays("short",!0),1);case"cccc":return St(e.weekdays("long",!0),1);case"Z":case"ZZ":return op(new RegExp(`([+-]${s.source})(?::(${t.source}))?`),2);case"ZZZ":return op(new RegExp(`([+-]${s.source})(${t.source})?`),2);case"z":return dr(/[a-z_+-/]{1,256}?/i);case" ":return dr(/[^\S\n\r]/);default:return x(B)}})(n)||{invalidReason:qg};return z.token=n,z}var Kg={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Yg(n,e,i){let{type:t,value:o}=n;if(t==="literal"){let l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}let r=e[t],a=t;t==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=i.hour12?"hour12":"hour24");let s=Kg[a];if(typeof s=="object"&&(s=s[r]),s)return{literal:!1,val:s}}function Zg(n){return[`^${n.map(i=>i.regex).reduce((i,t)=>`${i}(${t.source})`,"")}$`,n]}function Qg(n,e,i){let t=n.match(e);if(t){let o={},r=1;for(let a in i)if(mi(i,a)){let s=i[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(t.slice(r,r+l))),r+=l}return[t,o]}else return[t,{}]}function Jg(n){let e=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},i=null,t;return q(n.z)||(i=Ye.create(n.z)),q(n.Z)||(i||(i=new $e(n.Z)),t=n.Z),q(n.q)||(n.M=(n.q-1)*3+1),q(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),q(n.u)||(n.S=oo(n.u)),[Object.keys(n).reduce((r,a)=>{let s=e(a);return s&&(r[s]=n[a]),r},{}),i,t]}var Ga=null;function Xg(){return Ga||(Ga=Y.fromMillis(1555555555555)),Ga}function e0(n,e){if(n.literal)return n;let i=je.macroTokenToFormatOpts(n.val),t=Za(i,e);return t==null||t.includes(void 0)?n:t}function Ka(n,e){return Array.prototype.concat(...n.map(i=>e0(i,e)))}function Ya(n,e,i){let t=Ka(je.parseFormat(i),n),o=t.map(a=>Gg(a,n)),r=o.find(a=>a.invalidReason);if(r)return{input:e,tokens:t,invalidReason:r.invalidReason};{let[a,s]=Zg(o),l=RegExp(a,"i"),[m,g]=Qg(e,l,s),[_,D,x]=g?Jg(g):[null,null,void 0];if(mi(g,"a")&&mi(g,"H"))throw new bt("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:t,regex:l,rawMatches:m,matches:g,result:_,zone:D,specificOffset:x}}}function sp(n,e,i){let{result:t,zone:o,specificOffset:r,invalidReason:a}=Ya(n,e,i);return[t,o,r,a]}function Za(n,e){if(!n)return null;let t=je.create(e,n).dtFormatter(Xg()),o=t.formatToParts(),r=t.resolvedOptions();return o.map(a=>Yg(a,n,r))}var Qa="Invalid DateTime",lp=864e13;function ur(n){return new qe("unsupported zone",`the zone "${n.name}" is not supported`)}function Ja(n){return n.weekData===null&&(n.weekData=to(n.c)),n.weekData}function Xa(n){return n.localWeekData===null&&(n.localWeekData=to(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function Ii(n,e){let i={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Y(te(O(O({},i),e),{old:i}))}function hp(n,e,i){let t=n-e*60*1e3,o=i.offset(t);if(e===o)return[t,e];t-=(o-e)*60*1e3;let r=i.offset(t);return o===r?[t,o]:[n-Math.min(o,r)*60*1e3,Math.max(o,r)]}function pr(n,e){n+=e*60*1e3;let i=new Date(n);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function fr(n,e,i){return hp(rn(n),e,i)}function cp(n,e){let i=n.o,t=n.c.year+Math.trunc(e.years),o=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,r=te(O({},n.c),{year:t,month:o,day:Math.min(n.c.day,sn(t,o))+Math.trunc(e.days)+Math.trunc(e.weeks)*7}),a=Oe.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=rn(r),[l,m]=hp(s,i,n.zone);return a!==0&&(l+=a,m=n.zone.offset(l)),{ts:l,o:m}}function lo(n,e,i,t,o,r){let{setZone:a,zone:s}=i;if(n&&Object.keys(n).length!==0||e){let l=e||s,m=Y.fromObject(n,te(O({},i),{zone:l,specificOffset:r}));return a?m:m.setZone(s)}
3else return Y.invalid(new qe("unparsable",`the input "${o}" can't be parsed as ${t}`))}function mr(n,e,i=!0){return n.isValid?je.create(be.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(n,e):null}function es(n,e){let i=n.c.year>9999||n.c.year<0,t="";return i&&n.c.year>=0&&(t+="+"),t+=Te(n.c.year,i?6:4),e?(t+="-",t+=Te(n.c.month),t+="-",t+=Te(n.c.day)):(t+=Te(n.c.month),t+=Te(n.c.day)),t}function dp(n,e,i,t,o,r){let a=Te(n.c.hour);return e?(a+=":",a+=Te(n.c.minute),(n.c.millisecond!==0||n.c.second!==0||!i)&&(a+=":")):a+=Te(n.c.minute),(n.c.millisecond!==0||n.c.second!==0||!i)&&(a+=Te(n.c.second),(n.c.millisecond!==0||!t)&&(a+=".",a+=Te(n.c.millisecond,3))),o&&(n.isOffsetFixed&&n.offset===0&&!r?a+="Z":n.o<0?(a+="-",a+=Te(Math.trunc(-n.o/60)),a+=":",a+=Te(Math.trunc(-n.o%60))):(a+="+",a+=Te(Math.trunc(n.o/60)),a+=":",a+=Te(Math.trunc(n.o%60)))),r&&(a+="["+n.zone.ianaName+"]"),a}var gp={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},t0={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},i0={ordinal:1,hour:0,minute:0,second:0,millisecond:0},_p=["year","month","day","hour","minute","second","millisecond"],n0=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],o0=["year","ordinal","hour","minute","second","millisecond"];function r0(n){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new on(n);return e}function up(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return r0(n)}}function pp(n,e){let i=Ct(e.zone,ge.defaultZone),t=be.fromObject(e),o=ge.now(),r,a;if(q(n.year))r=o;else{for(let m of _p)q(n[m])&&(n[m]=gp[m]);let s=La(n)||Ra(n);if(s)return Y.invalid(s);let l=i.offset(o);[r,a]=fr(n,l,i)}return new Y({ts:r,zone:i,loc:t,o:a})}function mp(n,e,i){let t=q(i.round)?!0:i.round,o=(a,s)=>(a=an(a,t||i.calendary?0:2,!0),e.loc.clone(i).relFormatter(i).format(a,s)),r=a=>i.calendary?e.hasSame(n,a)?0:e.startOf(a).diff(n.startOf(a),a).get(a):e.diff(n,a).get(a);if(i.unit)return o(r(i.unit),i.unit);for(let a of i.units){let s=r(a);if(Math.abs(s)>=1)return o(s,a)}return o(n>e?-0:0,i.units[i.units.length-1])}function fp(n){let e={},i;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],i=Array.from(n).slice(0,n.length-1)):i=Array.from(n),[e,i]}var Y=class n{constructor(e){let i=e.zone||ge.defaultZone,t=e.invalid||(Number.isNaN(e.ts)?new qe("invalid input"):null)||(i.isValid?null:ur(i));this.ts=q(e.ts)?ge.now():e.ts;let o=null,r=null;if(!t)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(i))[o,r]=[e.old.c,e.old.o];else{let s=i.offset(this.ts);o=pr(this.ts,s),t=Number.isNaN(o.year)?new qe("invalid input"):null,o=t?null:o,r=t?null:s}this._zone=i,this.loc=e.loc||be.create(),this.invalid=t,this.weekData=null,this.localWeekData=null,this.c=o,this.o=r,this.isLuxonDateTime=!0}static now(){return new n({})}static local(){let[e,i]=fp(arguments),[t,o,r,a,s,l,m]=i;return pp({year:t,month:o,day:r,hour:a,minute:s,second:l,millisecond:m},e)}static utc(){let[e,i]=fp(arguments),[t,o,r,a,s,l,m]=i;return e.zone=$e.utcInstance,pp({year:t,month:o,day:r,hour:a,minute:s,second:l,millisecond:m},e)}static fromJSDate(e,i={}){let t=Eu(e)?e.valueOf():NaN;if(Number.isNaN(t))return n.invalid("invalid input");let o=Ct(i.zone,ge.defaultZone);return o.isValid?new n({ts:t,zone:o,loc:be.fromObject(i)}):n.invalid(ur(o))}static fromMillis(e,i={}){if(Dt(e))return e<-lp||e>lp?n.invalid("Timestamp out of range"):new n({ts:e,zone:Ct(i.zone,ge.defaultZone),loc:be.fromObject(i)});throw new Ie(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,i={}
3){if(Dt(e))return new n({ts:e*1e3,zone:Ct(i.zone,ge.defaultZone),loc:be.fromObject(i)});throw new Ie("fromSeconds requires a numerical input")}static fromObject(e,i={}){e=e||{};let t=Ct(i.zone,ge.defaultZone);if(!t.isValid)return n.invalid(ur(t));let o=be.fromObject(i),r=ln(e,up),{minDaysInFirstWeek:a,startOfWeek:s}=Fa(r,o),l=ge.now(),m=q(i.specificOffset)?t.offset(l):i.specificOffset,g=!q(r.ordinal),_=!q(r.year),D=!q(r.month)||!q(r.day),x=_||D,P=r.weekYear||r.weekNumber;if((x||g)&&P)throw new bt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(D&&g)throw new bt("Can't mix ordinal dates with month/day");let z=P||r.weekday&&!x,B,me,Ce=pr(l,m);z?(B=n0,me=t0,Ce=to(Ce,a,s)):g?(B=o0,me=i0,Ce=cr(Ce)):(B=_p,me=gp);let Re=!1;for(let rt of B){let bo=r[rt];q(bo)?Re?r[rt]=me[rt]:r[rt]=Ce[rt]:Re=!0}let Ne=z?Mu(r,a,s):g?Tu(r):La(r),Ft=Ne||Ra(r);if(Ft)return n.invalid(Ft);let ot=z?Ia(r,a,s):g?Na(r):r,[Be,We]=fr(ot,m,t),ht=new n({ts:Be,zone:t,o:We,loc:o});return r.weekday&&x&&e.weekday!==ht.weekday?n.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${ht.toISO()}`):ht}static fromISO(e,i={}){let[t,o]=qu(e);return lo(t,o,i,"ISO 8601",e)}static fromRFC2822(e,i={}){let[t,o]=ju(e);return lo(t,o,i,"RFC 2822",e)}static fromHTTP(e,i={}){let[t,o]=Wu(e);return lo(t,o,i,"HTTP",i)}static fromFormat(e,i,t={}){if(q(e)||q(i))throw new Ie("fromFormat requires an input string and a format");let{locale:o=null,numberingSystem:r=null}=t,a=be.fromOpts({locale:o,numberingSystem:r,defaultToEN:!0}),[s,l,m,g]=sp(a,e,i);return g?n.invalid(g):lo(s,l,t,`format ${i}`,e,m)}static fromString(e,i,t={}){return n.fromFormat(e,i,t)}static fromSQL(e,i={}){let[t,o]=Ku(e);return lo(t,o,i,"SQL",e)}static invalid(e,i=null){if(!e)throw new Ie("need to specify a reason the DateTime is invalid");let t=e instanceof qe?e:new qe(e,i);if(ge.throwOnInvalid)throw new Qo(t);return new n({invalid:t})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,i={}){let t=Za(e,be.fromObject(i));return t?t.map(o=>o?o.val:null).join(""):null}static expandFormat(e,i={}){return Ka(je.parseFormat(e),be.fromObject(i)).map(o=>o.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}
vendor: 4,262 bytes, line 3
3get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ja(this).weekYear:NaN}get weekNumber(){return this.isValid?Ja(this).weekNumber:NaN}get weekday(){return this.isValid?Ja(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Xa(this).weekday:NaN}get localWeekNumber(){return this.isValid?Xa(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Xa(this).weekYear:NaN}get ordinal(){return this.isValid?cr(this.c).ordinal:NaN}get monthShort(){return this.isValid?pt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?pt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?pt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?pt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,i=6e4,t=rn(this.c),o=this.zone.offset(t-e),r=this.zone.offset(t+e),a=this.zone.offset(t-o*i),s=this.zone.offset(t-r*i);if(a===s)return[this];let l=t-a*i,m=t-s*i,g=pr(l,a),_=pr(m,s);return g.hour===_.hour&&g.minute===_.minute&&g.second===_.second&&g.millisecond===_.millisecond?[Ii(this,{ts:l}),Ii(this,{ts:m})]:[this]}get isInLeapYear(){return Ai(this.year)}get daysInMonth(){return sn(this.year,this.month)}get daysInYear(){return this.isValid?pi(this.year):NaN}get weeksInWeekYear(){return this.isValid?Pi(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Pi(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:i,numberingSystem:t,calendar:o}=je.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:i,numberingSystem:t,outputCalendar:o}}toUTC(e=0,i={}){return this.setZone($e.instance(e),i)}toLocal(){return this.setZone(ge.defaultZone)}setZone(e,{keepLocalTime:i=!1,keepCalendarTime:t=!1}={}){if(e=Ct(e,ge.defaultZone),e.equals(this.zone))return this;if(e.isValid){let o=this.ts;if(i||t){let r=e.offset(this.ts),a=this.toObject();[o]=fr(a,r,e)}return Ii(this,{ts:o,zone:e})}else return n.invalid(ur(e))}reconfigure({locale:e,numberingSystem:i,outputCalendar:t}={}){let o=this.loc.clone({locale:e,numberingSystem:i,outputCalendar:t});return Ii(this,{loc:o})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let i=ln(e,up),{minDaysInFirstWeek:t,startOfWeek:o}=Fa(i,this.loc),r=!q(i.weekYear)||!q(i.weekNumber)||!q(i.weekday),a=!q(i.ordinal),s=!q(i.year),l=!q(i.month)||!q(i.day),m=s||l,g=i.weekYear||i.weekNumber;if((m||a)&&g)throw new bt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new bt("Can't mix ordinal dates with month/day");let _;r?_=Ia(O(O({},to(this.c,t,o)),i),t,o):q(i.ordinal)?(_=O(O({},this.toObject()),i),q(i.day)&&(_.day=Math.min(sn(_.year,_.month),_.day))):_=Na(O(O({},cr(this.c)),i));let[D,x]=fr(_,this.o,this.zone);return Ii(this,{ts:D,o:x})}plus(e){if(!this.isValid)return this;let i=Oe.fromDurationLike(e);return Ii(this,cp(this,i))}minus(e){if(!this.isValid)return this;let i=Oe.fromDurationLike(e).negate();return Ii(this,cp(this,i))}startOf(e,{useLocaleWeeks:i=!1}
3={}){if(!this.isValid)return this;let t={},o=Oe.normalizeUnit(e);switch(o){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break;case"milliseconds":break}if(o==="weeks")if(i){let r=this.loc.getStartOfWeek(),{weekday:a}=this;a<r&&(t.weekNumber=this.weekNumber-1),t.weekday=r}else t.weekday=1;if(o==="quarters"){let r=Math.ceil(this.month/3);t.month=(r-1)*3+1}return this.set(t)}endOf(e,i){return this.isValid?this.plus({[e]:1}).startOf(e,i).minus(1):this}toFormat(e,i={}){return this.isValid?je.create(this.loc.redefaultToEN(i)).formatDateTimeFromString(this,e):Qa}toLocaleString(e=di,i={}){return this.isValid?je.create(this.loc.clone(i),e).formatDateTime(this):Qa}toLocaleParts(e={}){return this.isValid?je.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:i=!1,suppressMilliseconds:t=!1,includeOffset:o=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;let a=e==="extended",s=es(this,a);return s+="T",s+=dp(this,a,i,t,o,r),s}toISODate({format:e="extended"}={}){return this.isValid?es(this,e==="extended"):null}toISOWeekDate(){return mr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:i=!1,includeOffset:t=!0,includePrefix:o=!1,extendedZone:r=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+dp(this,a==="extended",i,e,t,r):null}toRFC2822(){return mr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return mr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?es(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:i=!1,includeOffsetSpace:t=!0}={}){let o="HH:mm:ss.SSS";return(i||e)&&(t&&(o+=" "),i?o+="z":e&&(o+="ZZ")),mr(this,o,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Qa}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let i=O({},this.c);return e.includeConfig&&(i.outputCalendar=this.outputCalendar,i.numberingSystem=this.loc.numberingSystem,i.locale=this.loc.locale),i}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,i="milliseconds",t={}){if(!this.isValid||!e.isValid)return Oe.invalid("created by diffing an invalid DateTime");let o=O({locale:this.locale,numberingSystem:this.numberingSystem},t),r=Ou(i).map(Oe.normalizeUnit),a=e.valueOf()>this.valueOf(),s=a?this:e,l=a?e:this,m=ep(s,l,r,o);return a?m.negate():m}diffNow(e="milliseconds",i={}){return this.diff(n.now(),e,i)}until(e){return this.isValid?gi.fromDateTimes(this,e):this}hasSame(e,i,t){if(!this.isValid)return!1;let o=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(i,t)<=o&&o<=r.endOf(i,t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let i=e.base||n.fromObject({},{zone:this.zone}),t=e.padding?this<i?-e.padding:e.padding:0,o=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(o=e.unit,r=void 0),mp(i,this.plus(t),te(O({},e),{numeric:"always",units:o,unit:r}))}toRelativeCalendar(e={}){return this.isValid?mp(e.base||n.fromObject({},{zone:this.zone}),this,te(O({},e),{numeric:"auto",units:["years","months","days"],calendary:!0})):null}static min(...e){if(!e.every(n.isDateTime))throw new Ie("min requires all arguments be DateTimes");return Va(e,i=>i.valueOf(),Math.min)}static max(...e){if(!e.every(n.isDateTime))throw new Ie("max requires all arguments be DateTimes");return Va(e,i=>i.valueOf(),Math.max)}static fromFormatExplain(e,i,t={}){let{locale:o=null,numberingSystem:r=null}=t,a=be.fromOpts({locale:o,numberingSystem:r,defaultToEN:!0});return Ya(a,e,i)}static fromStringExplain(e,i,t={}){return n.fromFormatExplain(e,i,t)}static get DATE_SHORT(){return di}static get DATE_MED(){return In}static get DATE_MED_WITH_WEEKDAY(){return _a}static get DATE_FULL(){return Nn}static get DATE_HUGE(){return Fn}static get TIME_SIMPLE(){return Ln}static get TIME_WITH_SECONDS(){return Rn}static get TIME_WITH_SHORT_OFFSET(){return Vn}static get TIME_WITH_LONG_OFFSET(){return zn}static get TIME_24_SIMPLE(){return Bn}static get TIME_24_WITH_SECONDS(){return Un}static get TIME_24_WITH_SHORT_OFFSET(){return $n}static get TIME_24_WITH_LONG_OFFSET(){return qn}static get DATETIME_SHORT(){return jn}static get DATETIME_SHORT_WITH_SECONDS(){return Wn}static get DATETIME_MED(){return Hn}static get DATETIME_MED_WITH_SECONDS(){return Gn}static get DATETIME_MED_WITH_WEEKDAY(){return ya}static get DATETIME_FULL(){return Kn}static get DATETIME_FULL_WITH_SECONDS(){return Yn}static get DATETIME_HUGE(){return Zn}static get DATETIME_HUGE_WITH_SECONDS(){return Qn}};function gn(n){if(Y.isDateTime(n))return n;if(n&&n.valueOf&&Dt(n.valueOf()))return Y.fromJSDate(n);if(n&&typeof n=="object")return Y.fromObject(n);throw new Ie(`Unknown datetime argument: ${n}, of type ${typeof n}`)}var a0=new Ci("MAT_LUXON_DATE_ADAPTER_OPTIONS",{providedIn:"root",factory:s0});function s0(){return{useUtc:!1,defaultOutputCalendar:"gregory"}}function l0(n,e){let i=Array(n);for(let t=0;t<n;t++)i[t]=e(t);return i}var yp=(()=>{class n extends Bt{_useUTC;_firstDayOfWeek;_defaultOutputCalendar;constructor(){super();let i=u(ga,{optional:!0}),t=u(a0,{optional:!0});this._useUTC=!!t?.useUtc,this._firstDayOfWeek=t?.firstDayOfWeek,this._defaultOutputCalendar=t?.defaultOutputCalendar||"gregory",this.setLocale(i||Y.local().locale)}getYear(i){return i.year}getMonth(i){return i.month-1}getDate(i){return i.day}getDayOfWeek(i){return i.weekday}getMonthNames(i){return pt.months(i,{locale:this.locale,outputCalendar:this._defaultOutputCalendar})}getDateNames(){let i=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return l0(31,t=>i.format(Y.utc(2017,1,t+1).toJSDate()))}getDayOfWeekNames(i){let t=pt.weekdays(i,{locale:this.locale});return t.unshift(t.pop()),t}getYearName(i){return i.toFormat("yyyy",this._getOptions())}getFirstDayOfWeek(){return this._firstDayOfWeek??pt.getStartOfWeek({locale:this.locale})}getNumDaysInMonth(i){return i.daysInMonth}clone(i){return Y.fromObject(i.toObject(),this._getOptions())}createDate(i,t,o){let r=this._getOptions();if(t<0||t>11)throw Error(`Invalid month index "${t}". Month index has to be between 0 and 11.`);if(o<1)throw Error(`Invalid date "${o}". Date has to be greater than 0.`);let a=this._useUTC?Y.utc(i,t+1,o,r):Y.local(i,t+1,o,r);if(!this.isValid(a))throw Error(`Invalid date "${o}". Reason: "${a.invalidReason}".`);return a}today(){let i=this._getOptions();return this._useUTC?Y.utc(i):Y.local(i)}parse(i,t){let o=this._getOptions();if(typeof i=="string"&&i.length>0){let r=Y.fromISO(i,o);if(this.isValid(r))return r;let a=Array.isArray(t)?t:[t];if(!t.length)throw Error("Formats array must not be empty.");for(let s of a){let l=Y.fromFormat(i,s,o);if(this.isValid(l))return l}return this.invalid()}else{if(typeof i=="number")return Y.fromMillis(i,o);if(i instanceof Date)return Y.fromJSDate(i,o);if(i instanceof Y)return Y.fromMillis(i.toMillis(),o)}return null}format(i,t){if(!this.isValid(i))throw Error("LuxonDateAdapter: Cannot format invalid date.");return this._useUTC?i.setLocale(this.locale).setZone("utc").toFormat(t):i.setLocale(this.locale).toFormat(t)}addCalendarYears(i,t){return i.reconfigure(this._getOptions()).plus({years:t})}addCalendarMonths(i,t){return i.reconfigure(this._getOptions()).plus({months:t})}addCalendarDays(i,t){return i.reconfigure(this._getOptions()).plus({days:t})}toIso8601(i){return i.toISO()}deserialize(i){let t=this._getOptions(),o;if(i instanceof Date&&(o=Y.fromJSDate(i,t)),typeof i=="string"){if(!i)return null;o=Y.fromISO(i,t)}return o&&this.isValid(o)?o:super.deserialize(i)}isDateInstance(i){return i instanceof Y}isValid(i){return i.isValid}
3invalid(){return Y.invalid("Invalid Luxon DateTime object.")}setTime(i,t,o,r){return this.clone(i).set({hour:t,minute:o,second:r,millisecond:0})}getHours(i){return i.hour}getMinutes(i){return i.minute}getSeconds(i){return i.second}parseTime(i,t){let o=this.parse(i,t);return(!o||!this.isValid(o))&&typeof i=="string"&&this.parse(i.replace(/[^0-9:(AM|PM)]/gi,""),t)||o}addSeconds(i,t){return i.reconfigure(this._getOptions()).plus({seconds:t})}_getOptions(){return{zone:this._useUTC?"utc":void 0,locale:this.locale,outputCalendar:this._defaultOutputCalendar}}static \u0275fac=function(t){return new(t||n)};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})();b();var mS=Math.pow(2,31)-1;var ts=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"};function c0(){return new ts}var vp=new Ci("mat-snack-bar-default-options",{providedIn:"root",factory:c0});ve();re();Se();zt();b();On();b();Se();b();var bp=(()=>{let e=class e{constructor(){this.backendService=u(Pd),this.imageStorage=u(yd)}pollOnce(t){return F(this,null,function*(){let o=yield ue(this.backendService.getImageStatus(t.predictionId)),r={status:o.status,progress:o.progress,resultUrl:o.image_url,thumbnailUrl:o.image_url,error:o.error};return o.gs_uri&&(r.extra=te(O({},t.extra),{gsUri:o.gs_uri})),r})}onTerminal(t){return F(this,null,function*(){if(t.status==="succeeded"&&t.resultUrl){let o=t.resumeState;yield this.imageStorage.saveImage({prediction_id:t.predictionId,prompt:o.prompt??"",model_id:o.modelId??"",image_url:t.resultUrl,gs_uri:t.extra?.gsUri,aspect_ratio:o.aspectRatio})}})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();fc();re();Se();If();On();na();Ge();Qc();var xp="custom-design",d0={starting:"starting",queued:"starting",processing:"processing","action-required":"action-required",succeeded:"succeeded",completed:"succeeded",failed:"failed",canceled:"failed",cancelled:"failed"};function is(n){return d0[n??""]??"processing"}function u0(n){switch(n){case"succeeded":return 100;case"processing":case"action-required":return 50;case"starting":return 10;default:return 0}}var wp=[{type:"image",path:n=>`users/${n}/generated_images`,mintFunction:"mint_image_media_urls_function",appLabelKey:"imageGenerator.title",iconName:"image",galleryRoute:n=>`/${n}/studio/image-generator/gallery`,resumeRoute:(n,e)=>`/${n}/studio/image-generator/generate/${e.model_id??""}`,resumeState:n=>({prompt:n.prompt,modelId:n.model_id,aspectRatio:n.aspect_ratio,style:n.style})},{type:"music",path:n=>`users/${n}/generated_music`,mintFunction:"mint_music_media_urls_function",appLabelKey:"musicCreator.selection.title",iconName:"music_note",galleryRoute:n=>`/${n}/studio/music-creator/gallery`,resumeRoute:(n,e)=>`/${n}/studio/music-creator/design/${e.model_id??""}`,resumeState:n=>({prompt:n.prompt,modelId:n.model_id,style:n.style})},{type:"voice",path:n=>`users/${n}/generated_audio`,mintFunction:"mint_voice_media_urls_function",appLabelKey:"voiceCreator.tts.appLabel",iconName:"mic",galleryRoute:n=>`/${n}/studio/voice-creator/audio`,resumeRoute:(n,e)=>`/${n}/studio/voice-creator/generate/${e.model_id??""}`,resumeState:n=>({text:n.text??n.prompt,modelId:n.model_id,voiceId:n.voice_id})},{type:"photo-edit",path:n=>`users/${n}/generated_photo_edits`,mintFunction:"mint_photoedit_media_urls_function",appLabelKey:"photoEditor.title",iconName:"auto_fix_high",galleryRoute:n=>`/${n}/studio/photo-editor/gallery`,resumeRoute:(n,e)=>e.use_case_id===xp?`/${n}/studio/photo-editor/design`:`/${n}/studio/photo-editor/edit/${e.use_case_id??""}`,resumeState:n=>n.use_case_id===xp?{promptText:n.prompt}:{useCaseId:n.use_case_id,prompt:n.prompt},extra:n=>({use_case_id:n.use_case_id,prompt:n.prompt,source_urls:[]})},{type:"workflow",path:n=>`users/${n}/creator_runs`,mintFunction:"mint_creator_media_urls_function",appLabelKey:"multiApps.creator",iconName:"auto_fix_high",galleryRoute:n=>`/${n}/studio/creator/runs`,resumeRoute:(n,e)=>`/${n}/studio/creator/run/${e.run_id??e.id}`,resumeState:n=>({runId:n.run_id??n.id,workflowId:n.workflow_id,workflowName:n.workflow_name}),extra:n=>({plan_done:n.plan_done??0,plan_total:n.plan_total??0})},{type:"video",path:()=>"video_generations",constraints:n=>[Zc("user_id","==",n)],mintFunction:"mint_video_media_urls_function",appLabelKey:"videoMaker.appLabel",iconName:"videocam",galleryRoute:n=>`/${n}/studio/video-maker/videos`,resumeRoute:(n,e)=>`/${n}/studio/video-maker/generate/${e.model_id??""}`,resumeState:n=>({prompt:n.prompt,modelId:n.model_id,settings:n.settings})}];function Cp(n,e,i,t,o,r){let a=is(e.status),s=typeof e.created_at=="number"?e.created_at:Date.parse(String(e.created_at??""))||Date.now();return te(O({id:r(),predictionId:e.prediction_id??e.id,type:n.type,appLabel:t,title:(e.prompt??e.text??e.workflow_name??t).slice(0,60)||t,iconName:n.iconName,status:a,progress:u0(a),startedAt:s,updatedAt:Date.now(),resumeRoute:n.resumeRoute(i,e),galleryRoute:n.galleryRoute(i),resumeState:n.resumeState(e),resultUrl:o,thumbnailUrl:o},a==="failed"&&e.error?{error:e.error}:{}),{extra:O(O({},n.extra?.(e)??{}),e.gs_uri?{gsUri:e.gs_uri}:{})})}b();var ns="generation-push-sync",p0=1440*60*1e3;function m0(n){if(typeof n.created_at=="number")return n.created_at;let e=Date.parse(String(n.created_at??""));return Number.isFinite(e)?e:null}function f0(){return`gs_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,10)}`}var Sp=(()=>{let e=class e{constructor(){this.auth=u(cc,{optional:!0}),this.firestore=u(si),this.functions=u(Sc),this.queue=u(Pt),this.posthog=u(Gi),this.transloco=u(Q,{optional:!0}),this.authSub=null,this.collectionSubs=[],this.activeUid=null,this.started=!1,this.flagRetryDelaysMs=[5e3,15e3,6e4],this.ingestedTerminal=new Set}initialize(){return F(this,null,function*(){if(this.started||!this.auth)return;let t=yield this.posthog.getFeatureFlag(ns).catch(()=>{});if(t===void 0&&(yield this.posthog.whenInitialized(),t=yield this.posthog.getFeatureFlag(ns).catch(()=>{})),t===void 0)for(let o of this.flagRetryDelaysMs){if(yield new Promise(r=>setTimeout(r,o)),this.started)return;if(t=yield this.posthog.getFeatureFlag(ns).catch(()=>{}),t!==void 0)break}t!==!0&&t!=="true"||this.started||(this.started=!0,this.authSub=uc(this.auth).subscribe(o=>{let r=o?.uid??null;r!==this.activeUid&&(this.activeUid=r,this.ingestedTerminal.clear(),this.unsubscribeCollections(),r&&this.subscribeCollections(r))}))})}teardown(){this.authSub?.unsubscribe(),this.authSub=null,this.unsubscribeCollections(),this.started=!1}subscribeCollections(t){for(let o of wp){let r=this.firestore.watchCollection(o.path(t),o.constraints?.(t)??[]).subscribe(a=>{for(let s of a)this.ingestDoc(o,s,t)});this.collectionSubs.push(r)}}unsubscribeCollections(){for(let t of this.collectionSubs)t.unsubscribe();this.collectionSubs=[]}ingestDoc(t,o,r){return F(this,null,function*(){if(o.backend!=="hub")return;let a=o.prediction_id??o.id;if(!a)return;let s=is(o.status),l=s==="succeeded"||s==="failed";if(l&&this.ingestedTerminal.has(a))return;if(l&&this.queue.hasTerminalItem(a)){this.ingestedTerminal.add(a);return}let m=m0(o);if(l&&m!==null&&Date.now()-m>p0){this.ingestedTerminal.add(a);return}let g;if(s==="succeeded"&&o.gs_uri&&(g=yield this.mintUrl(t,r,o.gs_uri).catch(x=>{k.warn("push sync mint failed",x)}),!g))return;let _=this.transloco?.getActiveLang?.()??"en",D=Cp(t,o,_,this.appLabel(t),g,f0);yield this.queue.pushItem(D),l&&this.ingestedTerminal.add(a)})}mintUrl(t,o,r){return F(this,null,function*(){return(yield ue(this.functions.callFunction(t.mintFunction,{gs_uris:[r]})))?.urls?.[r]})}appLabel(t){let o=this.transloco?.translate?.(t.appLabelKey);return o&&o!==t.appLabelKey?o:t.type}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Se();b();var Mp=(()=>{let e=class e{constructor(){this.backendService=u(Ad),this.musicStorage=u(gd)}pollOnce(t){return F(this,null,function*(){let o=yield ue(this.backendService.getMusicStatus(t.predictionId)),r={status:o.status,progress:o.progress,resultUrl:o.audio_url,error:o.error},a=o.gs_uri;return a&&(r.extra=te(O({},t.extra),{gsUri:a})),r})}onTerminal(t){return F(this,null,function*(){if(t.status==="succeeded"&&t.resultUrl){let o=t.resumeState;yield this.musicStorage.saveAudio({prediction_id:t.predictionId,prompt:o.prompt??"",style:o.style,model_id:o.modelId??"",audio_url:t.resultUrl,gs_uri:t.extra?.gsUri})}})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Se();Ti();b();var Tp=(()=>{let e=class e{constructor(){this.backendService=u(Cd),this.storage=u(fd),this.analytics=u(Ze)}pollOnce(t){return F(this,null,function*(){let o=t.extra??{},r=yield ue(this.backendService.pollEdit({prediction_id:t.predictionId,use_case_id:o.use_case_id??"",source_urls:o.source_urls??[]}));return r.status==="succeeded"&&r.result_url?{status:"succeeded",progress:100,resultUrl:r.result_url}
3:r.status==="starting"||r.status==="processing"?O({status:r.status,progress:r.progress??t.progress},r.prediction_id&&r.prediction_id!==t.predictionId?{predictionId:r.prediction_id}:{}):{status:"failed",error:r.error||"Generation failed"}})}onTerminal(t){return F(this,null,function*(){t.status!=="succeeded"||!t.resultUrl||(yield this.storage.saveEdit({use_case_id:t.extra?.use_case_id??"custom-design",result_url:t.resultUrl,original_url:t.resultUrl,source_urls:t.extra?.source_urls??[],prompt:t.extra?.prompt??t.extra?.custom_prompt}),this.analytics.trackGenerationCompleted("photo_edit_generation_completed",{use_case_id:t.extra?.use_case_id??"custom-design",prediction_id:t.predictionId,duration_ms:Date.now()-t.startedAt}))})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Se();Yi();b();var kp=(()=>{let e=class e{constructor(){this.firestoreService=u(si),this.userService=u(lt)}pollOnce(t){return F(this,null,function*(){let o=this.userService.currentUser?.uid;if(!o)return{};let r=t.predictionId,a=yield ue(this.firestoreService.getDocument(`premium/${o}/predictions/${r}`));if(!a)return{};let s=this.mapStatus(a.status),l=a.outputs?.[0];return{status:s,progress:a.progress??0,resultUrl:l,error:a.error}})}mapStatus(t){switch(t){case"completed":return"succeeded";case"failed":case"cancelled":return"failed";case"processing":return"processing";default:return"starting"}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Se();b();var Ep=(()=>{let e=class e{constructor(){this.firestore=u(si)}pollOnce(t){return F(this,null,function*(){let o=t.extra?.sessionId;if(!o)return{};let r=yield ue(this.firestore.getDocument(`session_update/${o}`));if(!r)return{};switch(r.status){case"completed":return{status:"succeeded",progress:100};case"failed":return{status:"failed",error:"Session failed"};default:return{status:"processing"}}})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Se();b();var Op=(()=>{let e=class e{constructor(){this.firestore=u(si)}pollOnce(t){return F(this,null,function*(){let o=yield ue(this.firestore.getDocument(`model_updates/${t.predictionId}`));if(!o)return{};switch(o.status){case"completed":return{status:"succeeded",progress:100};case"error":case"failed":return{status:"failed",error:o.error||"Training failed"};default:return{status:"processing"}}})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Se();Ti();Ge();b();var Pp=(()=>{let e=class e{constructor(){this.backendService=u(Sd),this.videoStorage=u(hd),this.analytics=u(Ze)}pollOnce(t){return F(this,null,function*(){let o=yield ue(this.backendService.getPublicPredictionStatus(t.predictionId)),a={status:o.status==="canceled"?"failed":o.status,progress:o.progress??0,resultUrl:o.video_url,thumbnailUrl:o.thumbnail_url,error:o.error},s=o.gs_uri;return s&&(a.extra=te(O({},t.extra),{gsUri:s})),a})}onTerminal(t){return F(this,null,function*(){if(t.status!=="succeeded"||!t.resultUrl)return;let o=t.resumeState??{},r=o.settings,a=o.duration??r?.duration??5;try{if((yield this.videoStorage.loadVideoMetadata()).some(l=>l.predictionId===t.predictionId))return;yield this.videoStorage.saveVideo({url:t.resultUrl,prompt:o.prompt??"",modelId:o.modelId??"",photoId:o.photoId??"",duration:a,predictionId:t.predictionId,gsUri:t.extra?.gsUri}),this.analytics.trackGenerationCompleted("video_generation_completed",{prediction_id:t.predictionId,duration_ms:Date.now()-t.startedAt})}catch(s){k.error("VideoPoller: failed to save video to storage",s)}})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();Se();b();var Ap=(()=>{let e=class e{constructor(){this.backendService=u(Dd),this.voiceStorage=u(_d)}pollOnce(t){return F(this,null,function*(){let o=yield ue(this.backendService.getSpeechStatus(t.predictionId)),r={status:o.status,progress:o.progress,resultUrl:o.audio_url,error:o.error},a=o.gs_uri;return a&&(r.extra=te(O({},t.extra),{gsUri:a})),r})}onTerminal(t){return F(this,null,function*(){if(t.status==="succeeded"&&t.resultUrl){let o=t.resumeState;yield this.voiceStorage.saveAudio({prediction_id:t.predictionId,model_id:o.modelId??"",voice_id:o.voiceId??"",text:o.text??"",audio_url:t.resultUrl,gs_uri:t.extra?.gsUri})}})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();re();Ti();b();var Dp=(()=>{let e=class e{constructor(){this.backend=u(Id),this.storage=u(vd),this.analytics=u(Ze),this.transloco=u(Q)}pollOnce(t){return F(this,null,function*(){let o=yield this.backend.getRun(t.predictionId),r=o.plan??{done:0,total:0,nodes:[]},a=r.total>0?Math.round(r.done/r.total*100):t.progress,s=o.status==="canceled"?"failed":o.status;return{status:s,progress:s==="succeeded"?100:a,error:o.error??void 0,extra:te(O({},t.extra),{plan_done:r.done,plan_total:r.total})}})}onTerminal(t){return F(this,null,function*(){if(t.status!=="succeeded"){t.status==="failed"&&this.analytics.trackCreatorRunFinished("creator_run_failed",t.predictionId,{error:t.error});return}let o=t.resumeState,{files:r}=yield this.backend.getRunFiles(t.predictionId,this.transloco.getActiveLang());yield this.storage.saveRunFiles(t.predictionId,o.workflowName??t.title,r),this.analytics.trackCreatorRunFinished("creator_run_succeeded",t.predictionId,{files:r.length})})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();Zr();sc();fc();Qc();Df();Po();b();b();b();b();function Ip(n){return new ce(3e3,!1)}function h0(){return new ce(3100,!1)}function g0(){return new ce(3101,!1)}function _0(n){return new ce(3001,!1)}function y0(n){return new ce(3003,!1)}function v0(n){return new ce(3004,!1)}function Fp(n,e){return new ce(3005,!1)}function Lp(){return new ce(3006,!1)}function Rp(){return new ce(3007,!1)}function Vp(n,e){return new ce(3008,!1)}function zp(n){return new ce(3002,!1)}function Bp(n,e,i,t,o){return new ce(3010,!1)}function Up(){return new ce(3011,!1)}function $p(){return new ce(3012,!1)}function qp(){return new ce(3200,!1)}function jp(){return new ce(3202,!1)}function Wp(){return new ce(3013,!1)}function Hp(n){return new ce(3014,!1)}function Gp(n){return new ce(3015,!1)}function Kp(n){return new ce(3016,!1)}function Yp(n,e){return new ce(3404,!1)}function b0(n){return new ce(3502,!1)}function Zp(n){return new ce(3503,!1)}function Qp(){return new ce(3300,!1)}function Jp(n){return new ce(3504,!1)}function Xp(n){return new ce(3301,!1)}function em(n,e){return new ce(3302,!1)}function tm(n){return new ce(3303,!1)}function im(n,e){return new ce(3400,!1)}function nm(n){return new ce(3401,!1)}function om(n){return new ce(3402,!1)}function rm(n,e){return new ce(3505,!1)}function qt(n){switch(n.length){case 0:return new ki;case 1:return n[0];default:return new Ho(n)}}function ss(n,e,i=new Map,t=new Map){let o=[],r=[],a=-1,s=null;if(e.forEach(l=>{let m=l.get("offset"),g=m==a,_=g&&s||new Map;l.forEach((D,x)=>{let P=x,z=D;if(x!=="offset")switch(P=n.normalizePropertyName(P,o),z){case Dn:z=i.get(x);break;case vt:z=t.get(x);break;default:z=n.normalizeStyleValue(x,P,z,o);break}_.set(P,z)}),g||r.push(_),s=_,a=m}),o.length)throw b0(o);return r}function hr(n,e,i,t){switch(e){case"start":n.onStart(()=>t(i&&os(i,"start",n)));break;case"done":n.onDone(()=>t(i&&os(i,"done",n)));break;
vendor: 56,451 bytes, line 3
3case"destroy":n.onDestroy(()=>t(i&&os(i,"destroy",n)));break}}function os(n,e,i){let t=i.totalTime,o=!!i.disabled,r=gr(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,t??n.totalTime,o),a=n._data;return a!=null&&(r._data=a),r}function gr(n,e,i,t,o="",r=0,a){return{element:n,triggerName:e,fromState:i,toState:t,phaseName:o,totalTime:r,disabled:!!a}}function Qe(n,e,i){let t=n.get(e);return t||n.set(e,t=i),t}function ls(n){let e=n.indexOf(":"),i=n.substring(1,e),t=n.slice(e+1);return[i,t]}var x0=typeof document>"u"?null:document.documentElement;function _r(n){let e=n.parentNode||n.host||null;return e===x0?null:e}function w0(n){return n.substring(1,6)=="ebkit"}var Ni=null,Np=!1;function am(n){Ni||(Ni=C0()||{},Np=Ni.style?"WebkitAppearance"in Ni.style:!1);let e=!0;return Ni.style&&!w0(n)&&(e=n in Ni.style,!e&&Np&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Ni.style)),e}function C0(){return typeof document<"u"?document.body:null}function cs(n,e){for(;e;){if(e===n)return!0;e=_r(e)}return!1}function ds(n,e,i){if(i)return Array.from(n.querySelectorAll(e));let t=n.querySelector(e);return t?[t]:[]}var S0=1e3,us="{{",M0="}}",ps="ng-enter",yr="ng-leave",co="ng-trigger",uo=".ng-trigger",ms="ng-animating",vr=".ng-animating";function It(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:rs(parseFloat(e[1]),e[2])}function rs(n,e){return e==="s"?n*S0:n}function po(n,e,i){return n.hasOwnProperty("duration")?n:k0(n,e,i)}var T0=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function k0(n,e,i){let t,o=0,r="";if(typeof n=="string"){let a=n.match(T0);if(a===null)return e.push(Ip(n)),{duration:0,delay:0,easing:""};t=rs(parseFloat(a[1]),a[2]);let s=a[3];s!=null&&(o=rs(parseFloat(s),a[4]));let l=a[5];l&&(r=l)}else t=n;if(!i){let a=!1,s=e.length;t<0&&(e.push(h0()),a=!0),o<0&&(e.push(g0()),a=!0),a&&e.splice(s,0,Ip(n))}return{duration:t,delay:o,easing:r}}function sm(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function Mt(n,e,i){e.forEach((t,o)=>{let r=br(o);i&&!i.has(o)&&i.set(o,n.style[r]),n.style[r]=t})}function _i(n,e){e.forEach((i,t)=>{let o=br(t);n.style[o]=""})}function _n(n){return Array.isArray(n)?n.length==1?n[0]:Ld(n):n}function lm(n,e,i){let t=e.params||{},o=fs(n);o.length&&o.forEach(r=>{t.hasOwnProperty(r)||i.push(_0(r))})}var as=new RegExp(`${us}\\s*(.+?)\\s*${M0}`,"g");function fs(n){let e=[];if(typeof n=="string"){let i;for(;i=as.exec(n);)e.push(i[1]);as.lastIndex=0}return e}function yn(n,e,i){let t=`${n}`,o=t.replace(as,(r,a)=>{let s=e[a];return s==null&&(i.push(y0(a)),s=""),s.toString()});return o==t?n:o}var E0=/-+([a-z0-9])/g;function br(n){return n.replace(E0,(...e)=>e[1].toUpperCase())}function cm(n,e){return n===0||e===0}function dm(n,e,i){if(i.size&&e.length){let t=e[0],o=[];if(i.forEach((r,a)=>{t.has(a)||o.push(a),t.set(a,r)}),o.length)for(let r=1;r<e.length;r++){let a=e[r];o.forEach(s=>a.set(s,xr(n,s)))}}return e}function Je(n,e,i){switch(e.type){case ne.Trigger:return n.visitTrigger(e,i);case ne.State:return n.visitState(e,i);case ne.Transition:return n.visitTransition(e,i);case ne.Sequence:return n.visitSequence(e,i);case ne.Group:return n.visitGroup(e,i);case ne.Animate:return n.visitAnimate(e,i);case ne.Keyframes:return n.visitKeyframes(e,i);case ne.Style:return n.visitStyle(e,i);case ne.Reference:return n.visitReference(e,i);case ne.AnimateChild:return n.visitAnimateChild(e,i);case ne.AnimateRef:return n.visitAnimateRef(e,i);case ne.Query:return n.visitQuery(e,i);case ne.Stagger:return n.visitStagger(e,i);default:throw v0(e.type)}}function xr(n,e){return window.getComputedStyle(n)[e]}var As=(()=>{class n{validateStyleProperty(i){return am(i)}containsElement(i,t){return cs(i,t)}getParentElement(i){return _r(i)}query(i,t,o){return ds(i,t,o)}computeStyle(i,t,o){return o||""}animate(i,t,o,r,a,s=[],l){return new ki(o,r)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})(),Li=class{static NOOP=new As},Ri=class{};var O0=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Tr=class extends Ri{normalizePropertyName(e,i){return br(e)}normalizeStyleValue(e,i,t,o){let r="",a=t.toString().trim();if(O0.has(i)&&t!==0&&t!=="0")if(typeof t=="number")r="px";else{let s=t.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&s[1].length==0&&o.push(Fp(e,t))}return a+r}};var kr="*";function P0(n,e){let i=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(t=>A0(t,i,e)):i.push(n),i}function A0(n,e,i){if(n[0]==":"){let l=D0(n,i);if(typeof l=="function"){e.push(l);return}n=l}let t=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return i.push(Gp(n)),e;let o=t[1],r=t[2],a=t[3];e.push(um(o,a));let s=o==kr&&a==kr;r[0]=="<"&&!s&&e.push(um(a,o))}function D0(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(i,t)=>parseFloat(t)>parseFloat(i);case":decrement":return(i,t)=>parseFloat(t)<parseFloat(i);default:return e.push(Kp(n)),"* => *"}}var wr=new Set(["true","1"]),Cr=new Set(["false","0"]);function um(n,e){let i=wr.has(n)||Cr.has(n),t=wr.has(e)||Cr.has(e);return(o,r)=>{let a=n==kr||n==o,s=e==kr||e==r;return!a&&i&&typeof o=="boolean"&&(a=o?wr.has(n):Cr.has(n)),!s&&t&&typeof r=="boolean"&&(s=r?wr.has(e):Cr.has(e)),a&&s}}var xm=":self",I0=new RegExp(`s*${xm}s*,?`,"g");function wm(n,e,i,t){return new bs(n).build(e,i,t)}var pm="",bs=class{_driver;constructor(e){this._driver=e}build(e,i,t){let o=new xs(i);return this._resetContextStyleTimingState(o),Je(this,_n(e),o)}_resetContextStyleTimingState(e){e.currentQuerySelector=pm,e.collectedStyles=new Map,e.collectedStyles.set(pm,new Map),e.currentTime=0}visitTrigger(e,i){let t=i.queryCount=0,o=i.depCount=0,r=[],a=[];return e.name.charAt(0)=="@"&&i.errors.push(Lp()),e.definitions.forEach(s=>{if(this._resetContextStyleTimingState(i),s.type==ne.State){let l=s,m=l.name;m.toString().split(/\s*,\s*/).forEach(g=>{l.name=g,r.push(this.visitState(l,i))}),l.name=m}else if(s.type==ne.Transition){let l=this.visitTransition(s,i);t+=l.queryCount,o+=l.depCount,a.push(l)}else i.errors.push(Rp())}),{type:ne.Trigger,name:e.name,states:r,transitions:a,queryCount:t,depCount:o,options:null}}visitState(e,i){let t=this.visitStyle(e.styles,i),o=e.options&&e.options.params||null;if(t.containsDynamicStyles){let r=new Set,a=o||{};t.styles.forEach(s=>{s instanceof Map&&s.forEach(l=>{fs(l).forEach(m=>{a.hasOwnProperty(m)||r.add(m)})})}),r.size&&i.errors.push(Vp(e.name,[...r.values()]))}return{type:ne.State,name:e.name,style:t,options:o?{params:o}:null}}visitTransition(e,i){i.queryCount=0,i.depCount=0;let t=Je(this,_n(e.animation),i),o=P0(e.expr,i.errors);return{type:ne.Transition,matchers:o,animation:t,queryCount:i.queryCount,depCount:i.depCount,options:Fi(e.options)}}visitSequence(e,i){return{type:ne.Sequence,steps:e.steps.map(t=>Je(this,t,i)),options:Fi(e.options)}}visitGroup(e,i){let t=i.currentTime,o=0,r=e.steps.map(a=>{i.currentTime=t;let s=Je(this,a,i);return o=Math.max(o,i.currentTime),s});return i.currentTime=o,{type:ne.Group,steps:r,options:Fi(e.options)}}visitAnimate(e,i){let t=R0(e.timings,i.errors);i.currentAnimateTimings=t;let o,r=e.styles?e.styles:da({});if(r.type==ne.Keyframes)o=this.visitKeyframes(r,i);else{let a=e.styles,s=!1;if(!a){s=!0;let m={};t.easing&&(m.easing=t.easing),a=da(m)}i.currentTime+=t.duration+t.delay;let l=this.visitStyle(a,i);l.isEmptyStep=s,o=l}return i.currentAnimateTimings=null,{type:ne.Animate,timings:t,style:o,options:null}}visitStyle(e,i){let t=this._makeStyleAst(e,i);return this._validateStyleAst(t,i),t}_makeStyleAst(e,i){let t=[],o=Array.isArray(e.styles)?e.styles:[e.styles];for(let s of o)typeof s=="string"?s===vt?t.push(s):i.errors.push(zp(s)):t.push(new Map(Object.entries(s)));let r=!1,a=null;return t.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(a=s.get("easing"),s.delete("easing")),!r)){for(let l of s.values())if(l.toString().indexOf(us)>=0){r=!0;break}}}),{type:ne.Style,styles:t,easing:a,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,i){let t=i.currentAnimateTimings,o=i.currentTime,r=i.currentTime;t&&r>0&&(r-=t.duration+t.delay),e.styles.forEach(a=>{typeof a!="string"&&a.forEach((s,l)=>{let m=i.collectedStyles.get(i.currentQuerySelector),g=m.get(l),_=!0;g&&(r!=o&&r>=g.startTime&&o<=g.endTime&&(i.errors.push(Bp(l,g.startTime,g.endTime,r,o)),_=!1),r=g.startTime),_&&m.set(l,{startTime:r,endTime:o}),i.options&&lm(s,i.options,i.errors)})})}visitKeyframes(e,i){let t={type:ne.Keyframes,styles:[],options:null};if(!i.currentAnimateTimings)return i.errors.push(Up()),t;let o=1,r=0,a=[],s=!1,l=!1,m=0,g=e.steps.map(me=>{let Ce=this._makeStyleAst(me,i),Re=Ce.offset!=null?Ce.offset:L0(Ce.styles),Ne=0;return Re!=null&&(r++,Ne=Ce.offset=Re),l=l||Ne<0||Ne>1,s=s||Ne<m,m=Ne,a.push(Ne),Ce});l&&i.errors.push($p()),s&&i.errors.push(qp());let _=e.steps.length,D=0;r>0&&r<_?i.errors.push(jp()):r==0&&(D=o/(_-1));let x=_-1,P=i.currentTime,z=i.currentAnimateTimings,B=z.duration;return g.forEach((me,Ce)=>{let Re=D>0?Ce==x?1:D*Ce:a[Ce],Ne=Re*B;i.currentTime=P+z.delay+Ne,z.duration=Ne,this._validateStyleAst(me,i),me.offset=Re,t.styles.push(me)}),t}visitReference(e,i){return{type:ne.Reference,animation:Je(this,_n(e.animation),i),options:Fi(e.options)}}visitAnimateChild(e,i){return i.depCount++,{type:ne.AnimateChild,options:Fi(e.options)}}visitAnimateRef(e,i){return{type:ne.AnimateRef,animation:this.visitReference(e.animation,i),options:Fi(e.options)}}visitQuery(e,i){let t=i.currentQuerySelector,o=e.options||{};i.queryCount++,i.currentQuery=e;let[r,a]=N0(e.selector);i.currentQuerySelector=t.length?t+" "+r:r,Qe(i.collectedStyles,i.currentQuerySelector,new Map);let s=Je(this,_n(e.animation),i);return i.currentQuery=null,i.currentQuerySelector=t,{type:ne.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:a,animation:s,originalSelector:e.selector,options:Fi(e.options)}}visitStagger(e,i){i.currentQuery||i.errors.push(Wp());let t=e.timings==="full"?{duration:0,delay:0,easing:"full"}:po(e.timings,i.errors,!0);return{type:ne.Stagger,animation:Je(this,_n(e.animation),i),timings:t,options:null}}};function N0(n){let e=!!n.split(/\s*,\s*/).find(i=>i==xm);return e&&(n=n.replace(I0,"")),n=n.replace(/@\*/g,uo).replace(/@\w+/g,i=>uo+"-"+i.slice(1)).replace(/:animating/g,vr),[n,e]}function F0(n){return n?O({},n):null}var xs=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function L0(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(i=>{if(i instanceof Map&&i.has("offset")){let t=i;e=parseFloat(t.get("offset")),t.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let i=n;e=parseFloat(i.get("offset")),i.delete("offset")}return e}function R0(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=po(n,e).duration;return hs(r,0,"")}let i=n;if(i.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=hs(0,0,"");return r.dynamic=!0,r.strValue=i,r}let o=po(i,e);return hs(o.duration,o.delay,o.easing)}function Fi(n){return n?(n=O({},n),n.params&&(n.params=F0(n.params))):n={},n}function hs(n,e,i){return{duration:n,delay:e,easing:i}}function Ds(n,e,i,t,o,r,a=null,s=!1){return{type:1,element:n,keyframes:e,preStyleProps:i,postStyleProps:t,duration:o,delay:r,totalTime:o+r,easing:a,subTimeline:s}}var fo=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,i){let t=this._map.get(e);t||this._map.set(e,t=[]),t.push(...i)}has(e){return this._map.has(e)}clear(){this._map.clear()}},V0=1,z0=":enter",B0=new RegExp(z0,"g"),U0=":leave",$0=new RegExp(U0,"g");function Cm(n,e,i,t,o,r=new Map,a=new Map,s,l,m=[]){return new ws().buildKeyframes(n,e,i,t,o,r,a,s,l,m)}var ws=class{buildKeyframes(e,i,t,o,r,a,s,l,m,g=[]){m=m||new fo;let _=new Cs(e,i,m,o,r,g,[]);_.options=l;let D=l.delay?It(l.delay):0;_.currentTimeline.delayNextStep(D),_.currentTimeline.setStyles([a],null,_.errors,l),Je(this,t,_);let x=_.timelines.filter(P=>P.containsAnimation());if(x.length&&s.size){let P;for(let z=x.length-1;z>=0;z--){let B=x[z];if(B.element===i){P=B;break}}P&&!P.allowOnlyTimelineStyles()&&P.setStyles([s],null,_.errors,l)}return x.length?x.map(P=>P.buildKeyframes()):[Ds(i,[],[],[],0,D,"",!1)]}visitTrigger(e,i){}visitState(e,i){}visitTransition(e,i){}visitAnimateChild(e,i){let t=i.subInstructions.get(i.element);if(t){let o=i.createSubContext(e.options),r=i.currentTimeline.currentTime,a=this._visitSubInstructions(t,o,o.options);r!=a&&i.transformIntoNewTimeline(a)}i.previousNode=e}visitAnimateRef(e,i){let t=i.createSubContext(e.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],i,t),this.visitReference(e.animation,t),i.transformIntoNewTimeline(t.currentTimeline.currentTime),i.previousNode=e}_applyAnimationRefDelays(e,i,t){for(let o of e){let r=o?.delay;if(r){let a=typeof r=="number"?r:It(yn(r,o?.params??{},i.errors));t.delayNextStep(a)}}}_visitSubInstructions(e,i,t){let r=i.currentTimeline.currentTime,a=t.duration!=null?It(t.duration):null,s=t.delay!=null?It(t.delay):null;return a!==0&&e.forEach(l=>{let m=i.appendInstructionToTimeline(l,a,s);r=Math.max(r,m.duration+m.delay)}),r}visitReference(e,i){i.updateOptions(e.options,!0),Je(this,e.animation,i),i.previousNode=e}visitSequence(e,i){let t=i.subContextCount,o=i,r=e.options;if(r&&(r.params||r.delay)&&(o=i.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==ne.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=Er);let a=It(r.delay);o.delayNextStep(a)}e.steps.length&&(e.steps.forEach(a=>Je(this,a,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>t&&o.transformIntoNewTimeline()),i.previousNode=e}visitGroup(e,i){let t=[],o=i.currentTimeline.currentTime,r=e.options&&e.options.delay?It(e.options.delay):0;e.steps.forEach(a=>{let s=i.createSubContext(e.options);r&&s.delayNextStep(r),Je(this,a,s),o=Math.max(o,s.currentTimeline.currentTime),t.push(s.currentTimeline)}),t.forEach(a=>i.currentTimeline.mergeTimelineCollectedStyles(a)),i.transformIntoNewTimeline(o),i.previousNode=e}_visitTiming(e,i){if(e.dynamic){let t=e.strValue,o=i.params?yn(t,i.params,i.errors):t;return po(o,i.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,i){let t=i.currentAnimateTimings=this._visitTiming(e.timings,i),o=i.currentTimeline;t.delay&&(i.incrementTime(t.delay),o.snapshotCurrentStyles());let r=e.style;r.type==ne.Keyframes?this.visitKeyframes(r,i):(i.incrementTime(t.duration),this.visitStyle(r,i),o.applyStylesToKeyframe()),i.currentAnimateTimings=null,i.previousNode=e}visitStyle(e,i){let t=i.currentTimeline,o=i.currentAnimateTimings;!o&&t.hasCurrentStyleProperties()&&t.forwardFrame();let r=o&&o.easing||e.easing;e.isEmptyStep?t.applyEmptyStep(r):t.setStyles(e.styles,r,i.errors,i.options),i.previousNode=e}visitKeyframes(e,i){let t=i.currentAnimateTimings,o=i.currentTimeline.duration,r=t.duration,s=i.createSubContext().currentTimeline;s.easing=t.easing,e.styles.forEach(l=>{let m=l.offset||0;s.forwardTime(m*r),s.setStyles(l.styles,l.easing,i.errors,i.options),s.applyStylesToKeyframe()}),i.currentTimeline.mergeTimelineCollectedStyles(s),i.transformIntoNewTimeline(o+r),i.previousNode=e}visitQuery(e,i){let t=i.currentTimeline.currentTime,o=e.options||{},r=o.delay?It(o.delay):0;r&&(i.previousNode.type===ne.Style||t==0&&i.currentTimeline.hasCurrentStyleProperties())&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Er);let a=t,s=i.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!o.optional,i.errors);i.currentQueryTotal=s.length;let l=null;s.forEach((m,g)=>{i.currentQueryIndex=g;let _=i.createSubContext(e.options,m);r&&_.delayNextStep(r),m===i.element&&(l=_.currentTimeline),Je(this,e.animation,_),_.currentTimeline.applyStylesToKeyframe();let D=_.currentTimeline.currentTime;a=Math.max(a,D)}),i.currentQueryIndex=0,i.currentQueryTotal=0,i.transformIntoNewTimeline(a),l&&(i.currentTimeline.mergeTimelineCollectedStyles(l),i.currentTimeline.snapshotCurrentStyles()),i.previousNode=e}visitStagger(e,i){let t=i.parentContext,o=i.currentTimeline,r=e.timings,a=Math.abs(r.duration),s=a*(i.currentQueryTotal-1),l=a*i.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=s-l;break;case"full":l=t.currentStaggerTime;break}let g=i.currentTimeline;l&&g.delayNextStep(l);let _=g.currentTime;Je(this,e.animation,i),i.previousNode=e,t.currentStaggerTime=o.currentTime-_+(o.startTime-t.currentTimeline.startTime)}},Er={},Cs=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Er;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,i,t,o,r,a,s,l){this._driver=e,this.element=i,this.subInstructions=t,this._enterClassName=o,this._leaveClassName=r,this.errors=a,this.timelines=s,this.currentTimeline=l||new Or(this._driver,i,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,i){if(!e)return;let t=e,o=this.options;t.duration!=null&&(o.duration=It(t.duration)),t.delay!=null&&(o.delay=It(t.delay));let r=t.params;if(r){let a=o.params;a||(a=this.options.params={}),Object.keys(r).forEach(s=>{(!i||!a.hasOwnProperty(s))&&(a[s]=yn(r[s],a,this.errors))})}}_copyOptions(){let e={};if(this.options){let i=this.options.params;if(i){let t=e.params={};Object.keys(i).forEach(o=>{t[o]=i[o]})}}return e}createSubContext(e=null,i,t){let o=i||this.element,r=new n(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,t||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Er,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,i,t){let o={duration:i??e.duration,delay:this.currentTimeline.currentTime+(t??0)+e.delay,easing:""},r=new Ss(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,o,e.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,i,t,o,r,a){let s=[];if(o&&s.push(this.element),e.length>0){e=e.replace(B0,"."+this._enterClassName),e=e.replace($0,"."+this._leaveClassName);let l=t!=1,m=this._driver.query(this.element,e,l);t!==0&&(m=t<0?m.slice(m.length+t,m.length):m.slice(0,t)),s.push(...m)}return!r&&s.length==0&&a.push(Hp(i)),s}},Or=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,i,t,o){this._driver=e,this.element=i,this.startTime=t,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(i),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(i,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let i=this._keyframes.size===1&&this._pendingStyles.size;this.duration||i?(this.forwardTime(this.currentTime+e),i&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,i){return this.applyStylesToKeyframe(),new n(this._driver,e,i||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=V0,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,i){this._localTimelineStyles.set(e,i),this._globalTimelineStyles.set(e,i),this._styleSummary.set(e,{time:this.currentTime,value:i})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[i,t]of this._globalTimelineStyles)this._backFill.set(i,t||vt),this._currentKeyframe.set(i,vt);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,i,t,o){i&&this._previousKeyframe.set("easing",i);let r=o&&o.params||{},a=q0(e,this._globalTimelineStyles);for(let[s,l]of a){let m=yn(l,r,t);this._pendingStyles.set(s,m),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??vt),this._updateStyle(s,m)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,i)=>{this._currentKeyframe.set(i,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,i)=>{this._currentKeyframe.has(i)||this._currentKeyframe.set(i,e)}))}snapshotCurrentStyles(){for(let[e,i]of this._localTimelineStyles)this._pendingStyles.set(e,i),this._updateStyle(e,i)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let i in this._currentKeyframe)e.push(i);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((i,t)=>{let o=this._styleSummary.get(t);(!o||i.time>o.time)&&this._updateStyle(t,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,i=new Set,t=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((s,l)=>{let m=new Map([...this._backFill,...s]);m.forEach((g,_)=>{g===Dn?e.add(_):g===vt&&i.add(_)}),t||m.set("offset",l/this.duration),o.push(m)});let r=[...e.values()],a=[...i.values()];if(t){let s=o[0],l=new Map(s);s.set("offset",0),l.set("offset",1),o=[s,l]}return Ds(this.element,o,r,a,this.duration,this.startTime,this.easing,!1)}},Ss=class extends Or{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,i,t,o,r,a,s=!1){super(e,i,a.delay),this.keyframes=t,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=s,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:i,duration:t,easing:o}=this.timings;if(this._stretchStartingKeyframe&&i){let r=[],a=t+i,s=i/a,l=new Map(e[0]);l.set("offset",0),r.push(l);let m=new Map(e[0]);m.set("offset",mm(s)),r.push(m);let g=e.length-1;for(let _=1;_<=g;_++){let D=new Map(e[_]),x=D.get("offset"),P=i+x*t;D.set("offset",mm(P/a)),r.push(D)}t=a,i=0,o="",e=r}return Ds(this.element,e,this.preStyleProps,this.postStyleProps,t,i,o,!0)}};function mm(n,e=3){let i=Math.pow(10,e-1);return Math.round(n*i)/i}function q0(n,e){let i=new Map,t;return n.forEach(o=>{if(o==="*"){t??=e.keys();for(let r of t)i.set(r,vt)}else for(let[r,a]of o)i.set(r,a)}),i}function fm(n,e,i,t,o,r,a,s,l,m,g,_,D){return{type:0,element:n,triggerName:e,isRemovalTransition:o,fromState:i,fromStyles:r,toState:t,toStyles:a,timelines:s,queriedElements:l,preStyleProps:m,postStyleProps:g,totalTime:_,errors:D}}var gs={},Pr=class{_triggerName;ast;_stateStyles;constructor(e,i,t){this._triggerName=e,this.ast=i,this._stateStyles=t}match(e,i,t,o){return j0(this.ast.matchers,e,i,t,o)}buildStyles(e,i,t){let o=this._stateStyles.get("*");return e!==void 0&&(o=this._stateStyles.get(e?.toString())||o),o?o.buildStyles(i,t):new Map}build(e,i,t,o,r,a,s,l,m,g){let _=[],D=this.ast.options&&this.ast.options.params||gs,x=s&&s.params||gs,P=this.buildStyles(t,x,_),z=l&&l.params||gs,B=this.buildStyles(o,z,_),me=new Set,Ce=new Map,Re=new Map,Ne=o==="void",Ft={params:Sm(z,D),delay:this.ast.options?.delay},ot=g?[]:Cm(e,i,this.ast.animation,r,a,P,B,Ft,m,_),Be=0;return ot.forEach(We=>{Be=Math.max(We.duration+We.delay,Be)}),_.length?fm(i,this._triggerName,t,o,Ne,P,B,[],[],Ce,Re,Be,_):(ot.forEach(We=>{let ht=We.element,rt=Qe(Ce,ht,new Set);We.preStyleProps.forEach(yi=>rt.add(yi));let bo=Qe(Re,ht,new Set);We.postStyleProps.forEach(yi=>bo.add(yi)),ht!==i&&me.add(ht)}),fm(i,this._triggerName,t,o,Ne,P,B,ot,[...me.values()],Ce,Re,Be))}};function j0(n,e,i,t,o){return n.some(r=>r(e,i,t,o))}function Sm(n,e){let i=O({},e);return Object.entries(n).forEach(([t,o])=>{o!=null&&(i[t]=o)}),i}var Ms=class{styles;defaultParams;normalizer;constructor(e,i,t){this.styles=e,this.defaultParams=i,this.normalizer=t}buildStyles(e,i){let t=new Map,o=Sm(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,s)=>{a&&(a=yn(a,o,i));let l=this.normalizer.normalizePropertyName(s,i);a=this.normalizer.normalizeStyleValue(s,l,a,i),t.set(s,a)})}),t}};function W0(n,e,i){return new Ts(n,e,i)}var Ts=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,i,t){this.name=e,this.ast=i,this._normalizer=t,i.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new Ms(o.style,r,t))}),hm(this.states,"true","1"),hm(this.states,"false","0"),i.transitions.forEach(o=>{this.transitionFactories.push(new Pr(e,o,this.states))}),this.fallbackTransition=H0(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,i,t,o){return this.transitionFactories.find(a=>a.match(e,i,t,o))||null}matchStyles(e,i,t){return this.fallbackTransition.buildStyles(e,i,t)}};function H0(n,e,i){let t=[(a,s)=>!0],o={type:ne.Sequence,steps:[],options:null},r={type:ne.Transition,animation:o,matchers:t,options:null,queryCount:0,depCount:0};return new Pr(n,r,e)}function hm(n,e,i){n.has(e)?n.has(i)||n.set(i,n.get(e)):n.has(i)&&n.set(e,n.get(i))}var G0=new fo,ks=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,i,t){this.bodyNode=e,this._driver=i,this._normalizer=t}register(e,i){let t=[],o=[],r=wm(this._driver,i,t,o);if(t.length)throw Zp(t);this._animations.set(e,r)}_buildPlayer(e,i,t){let o=e.element,r=ss(this._normalizer,e.keyframes,i,t);return this._driver.animate(o,r,e.duration,e.delay,e.easing,[],!0)}create(e,i,t={}){let o=[],r=this._animations.get(e),a,s=new Map;if(r?(a=Cm(this._driver,i,r,ps,yr,new Map,new Map,t,G0,o),a.forEach(g=>{let _=Qe(s,g.element,new Map);g.postStyleProps.forEach(D=>_.set(D,null))})):(o.push(Qp()),a=[]),o.length)throw Jp(o);s.forEach((g,_)=>{g.forEach((D,x)=>{g.set(x,this._driver.computeStyle(_,x,vt))})});let l=a.map(g=>{let _=s.get(g.element);return this._buildPlayer(g,new Map,_)}),m=qt(l);return this._playersById.set(e,m),m.onDestroy(()=>this.destroy(e)),this.players.push(m),m}destroy(e){let i=this._getPlayer(e);i.destroy(),this._playersById.delete(e);let t=this.players.indexOf(i);t>=0&&this.players.splice(t,1)}_getPlayer(e){let i=this._playersById.get(e);if(!i)throw Xp(e);return i}listen(e,i,t,o){let r=gr(i,"","","");return hr(this._getPlayer(e),t,r,o),()=>{}}command(e,i,t,o){if(t=="register"){this.register(e,o[0]);return}if(t=="create"){let a=o[0]||{};this.create(e,i,a);return}let r=this._getPlayer(e);switch(t){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(e);break}}},gm="ng-animate-queued",K0=".ng-animate-queued",_s="ng-animate-disabled",Y0=".ng-animate-disabled",Z0="ng-star-inserted",Q0=".ng-star-inserted",J0=[],Mm={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},X0={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Tt="__ng_removed",ho=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,i=""){this.namespaceId=i;let t=e&&e.hasOwnProperty("value"),o=t?e.value:e;if(this.value=t_(o),t){let r=e,{value:a}=r,s=xn(r,["value"]);this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let i=e.params;if(i){let t=this.options.params;Object.keys(i).forEach(o=>{t[o]==null&&(t[o]=i[o])})}}},mo="void",ys=new ho(mo),Es=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,i,t){this.id=e,this.hostElement=i,this._engine=t,this._hostClassName="ng-tns-"+e,ft(i,this._hostClassName)}listen(e,i,t,o){if(!this._triggers.has(i))throw em(t,i);if(t==null||t.length==0)throw tm(i);if(!i_(t))throw im(t,i);let r=Qe(this._elementListeners,e,[]),a={name:i,phase:t,callback:o};r.push(a);let s=Qe(this._engine.statesByElement,e,new Map);return s.has(i)||(ft(e,co),ft(e,co+"-"+i),s.set(i,ys)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(a);l>=0&&r.splice(l,1),this._triggers.has(i)||s.delete(i)})}}register(e,i){return this._triggers.has(e)?!1:(this._triggers.set(e,i),!0)}_getTrigger(e){let i=this._triggers.get(e);if(!i)throw nm(e);return i}trigger(e,i,t,o=!0){let r=this._getTrigger(i),a=new go(this.id,i,e),s=this._engine.statesByElement.get(e);s||(ft(e,co),ft(e,co+"-"+i),this._engine.statesByElement.set(e,s=new Map));let l=s.get(i),m=new ho(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&l&&m.absorbOptions(l.options),s.set(i,m),l||(l=ys),!(m.value===mo)&&l.value===m.value){if(!r_(l.params,m.params)){let z=[],B=r.matchStyles(l.value,l.params,z),me=r.matchStyles(m.value,m.params,z);z.length?this._engine.reportError(z):this._engine.afterFlush(()=>{_i(e,B),Mt(e,me)})}return}let D=Qe(this._engine.playersByElement,e,[]);D.forEach(z=>{z.namespaceId==this.id&&z.triggerName==i&&z.queued&&z.destroy()});let x=r.matchTransition(l.value,m.value,e,m.params),P=!1;if(!x){if(!o)return;x=r.fallbackTransition,P=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:i,transition:x,fromState:l,toState:m,player:a,isFallbackTransition:P}),P||(ft(e,gm),a.onStart(()=>{vn(e,gm)})),a.onDone(()=>{let z=this.players.indexOf(a);z>=0&&this.players.splice(z,1);let B=this._engine.playersByElement.get(e);if(B){let me=B.indexOf(a);me>=0&&B.splice(me,1)}}),this.players.push(a),D.push(a),a}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(i=>i.delete(e)),this._elementListeners.forEach((i,t)=>{this._elementListeners.set(t,i.filter(o=>o.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let i=this._engine.playersByElement.get(e);i&&(i.forEach(t=>t.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,i){let t=this._engine.driver.query(e,uo,!0);t.forEach(o=>{if(o[Tt])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(a=>a.triggerLeaveAnimation(o,i,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(e,i,t,o){let r=this._engine.statesByElement.get(e),a=new Map;if(r){let s=[];if(r.forEach((l,m)=>{if(a.set(m,l.value),this._triggers.has(m)){let g=this.trigger(e,m,mo,o);g&&s.push(g)}}),s.length)return this._engine.markElementAsRemoved(this.id,e,!0,i,a),t&&qt(s).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let i=this._elementListeners.get(e),t=this._engine.statesByElement.get(e);if(i&&t){let o=new Set;i.forEach(r=>{let a=r.name;if(o.has(a))return;o.add(a);let l=this._triggers.get(a).fallbackTransition,m=t.get(a)||ys,g=new ho(mo),_=new go(this.id,a,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:l,fromState:m,toState:g,player:_,isFallbackTransition:!0})})}}removeNode(e,i){let t=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,i),this.triggerLeaveAnimation(e,i,!0))return;let o=!1;if(t.totalAnimations){let r=t.players.length?t.playersByQueriedElement.get(e):[];if(r&&r.length)o=!0;else{let a=e;for(;a=a.parentNode;)if(t.statesByElement.get(a)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(e),o)t.markElementAsRemoved(this.id,e,!1,i);else{let r=e[Tt];(!r||r===Mm)&&(t.afterFlush(()=>this.clearElementCache(e)),t.destroyInnerAnimations(e),t._onRemovalComplete(e,i))}}insertNode(e,i){ft(e,this._hostClassName)}drainQueuedTransitions(e){let i=[];return this._queue.forEach(t=>{let o=t.player;if(o.destroyed)return;let r=t.element,a=this._elementListeners.get(r);a&&a.forEach(s=>{if(s.name==t.triggerName){let l=gr(r,t.triggerName,t.fromState.value,t.toState.value);l._data=e,hr(t.player,s.phase,l,s.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):i.push(t)}),this._queue=[],i.sort((t,o)=>{let r=t.transition.ast.depCount,a=o.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(t.element,o.element)?1:-1})}destroy(e){this.players.forEach(i=>i.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Os=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,i)=>{};_onRemovalComplete(e,i){this.onRemovalComplete(e,i)}constructor(e,i,t){this.bodyNode=e,this.driver=i,this._normalizer=t}get queuedPlayers(){let e=[];return this._namespaceList.forEach(i=>{i.players.forEach(t=>{t.queued&&e.push(t)})}),e}createNamespace(e,i){let t=new Es(e,i,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,i)?this._balanceNamespaceList(t,i):(this.newHostElements.set(i,t),this.collectEnterElement(i)),this._namespaceLookup[e]=t}_balanceNamespaceList(e,i){let t=this._namespaceList,o=this.namespacesByHostElement;if(t.length-1>=0){let a=!1,s=this.driver.getParentElement(i);for(;s;){let l=o.get(s);if(l){let m=t.indexOf(l);t.splice(m+1,0,e),a=!0;break}s=this.driver.getParentElement(s)}a||t.unshift(e)}else t.push(e);return o.set(i,e),e}register(e,i){let t=this._namespaceLookup[e];return t||(t=this.createNamespace(e,i)),t}registerTrigger(e,i,t){let o=this._namespaceLookup[e];o&&o.register(i,t)&&this.totalAnimations++}destroy(e,i){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(e);this.namespacesByHostElement.delete(t.hostElement);let o=this._namespaceList.indexOf(t);o>=0&&this._namespaceList.splice(o,1),t.destroy(i),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let i=new Set,t=this.statesByElement.get(e);if(t){for(let o of t.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&i.add(r)}}return i}trigger(e,i,t,o){if(Sr(i)){let r=this._fetchNamespace(e);if(r)return r.trigger(i,t,o),!0}return!1}insertNode(e,i,t,o){if(!Sr(i))return;let r=i[Tt];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(i);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){let a=this._fetchNamespace(e);a&&a.insertNode(i,t)}o&&this.collectEnterElement(i)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,i){i?this.disabledNodes.has(e)||(this.disabledNodes.add(e),ft(e,_s)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),vn(e,_s))}removeNode(e,i,t){if(Sr(i)){let o=e?this._fetchNamespace(e):null;o?o.removeNode(i,t):this.markElementAsRemoved(e,i,!1,t);let r=this.namespacesByHostElement.get(i);r&&r.id!==e&&r.removeNode(i,t)}else this._onRemovalComplete(i,t)}markElementAsRemoved(e,i,t,o,r){this.collectedLeaveElements.push(i),i[Tt]={namespaceId:e,setForRemoval:o,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,i,t,o,r){return Sr(i)?this._fetchNamespace(e).listen(i,t,o,r):()=>{}}_buildInstruction(e,i,t,o,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,t,o,e.fromState.options,e.toState.options,i,r)}destroyInnerAnimations(e){let i=this.driver.query(e,uo,!0);i.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(i=this.driver.query(e,vr,!0),i.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(e){let i=this.playersByElement.get(e);i&&i.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(e){let i=this.playersByQueriedElement.get(e);i&&i.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return qt(this.players).onDone(()=>e());e()})}processLeaveNode(e){let i=e[Tt];if(i&&i.setForRemoval){if(e[Tt]=Mm,i.namespaceId){this.destroyInnerAnimations(e);let t=this._fetchNamespace(i.namespaceId);t&&t.clearElementCache(e)}this._onRemovalComplete(e,i.setForRemoval)}e.classList?.contains(_s)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Y0,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(e=-1){let i=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,o)=>this._balanceNamespaceList(t,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;t<this.collectedEnterElements.length;t++){let o=this.collectedEnterElements[t];ft(o,Z0)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let t=[];try{i=this._flushAnimations(t,e)}finally{for(let o=0;o<t.length;o++)t[o]()}}else for(let t=0;t<this.collectedLeaveElements.length;t++){let o=this.collectedLeaveElements[t];this.processLeaveNode(o)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],i.length?qt(i).onDone(()=>{t.forEach(o=>o())}):t.forEach(o=>o())}}reportError(e){throw om(e)}_flushAnimations(e,i){let t=new fo,o=[],r=new Map,a=[],s=new Map,l=new Map,m=new Map,g=new Set;this.disabledNodes.forEach(L=>{g.add(L);let $=this.driver.query(L,K0,!0);for(let W=0;W<$.length;W++)g.add($[W])});let _=this.bodyNode,D=Array.from(this.statesByElement.keys()),x=vm(D,this.collectedEnterElements),P=new Map,z=0;x.forEach((L,$)=>{let W=ps+z++;P.set($,W),L.forEach(le=>ft(le,W))});let B=[],me=new Set,Ce=new Set;for(let L=0;L<this.collectedLeaveElements.length;L++){let $=this.collectedLeaveElements[L],W=$[Tt];W&&W.setForRemoval&&(B.push($),me.add($),W.hasAnimation?this.driver.query($,Q0,!0).forEach(le=>me.add(le)):Ce.add($))}let Re=new Map,Ne=vm(D,Array.from(me));Ne.forEach((L,$)=>{let W=yr+z++;Re.set($,W),L.forEach(le=>ft(le,W))}),e.push(()=>{x.forEach((L,$)=>{let W=P.get($);L.forEach(le=>vn(le,W))}),Ne.forEach((L,$)=>{let W=Re.get($);L.forEach(le=>vn(le,W))}),B.forEach(L=>{this.processLeaveNode(L)})});let Ft=[],ot=[];for(let L=this._namespaceList.length-1;L>=0;L--)this._namespaceList[L].drainQueuedTransitions(i).forEach(W=>{let le=W.player,Ve=W.element;if(Ft.push(le),this.collectedEnterElements.length){let He=Ve[Tt];if(He&&He.setForMove){if(He.previousTriggersValues&&He.previousTriggersValues.has(W.triggerName)){let vi=He.previousTriggersValues.get(W.triggerName),at=this.statesByElement.get(W.element);if(at&&at.has(W.triggerName)){let xo=at.get(W.triggerName);xo.value=vi,at.set(W.triggerName,xo)}}le.destroy();return}}let kt=!_||!this.driver.containsElement(_,Ve),Xe=Re.get(Ve),jt=P.get(Ve),Me=this._buildInstruction(W,t,jt,Xe,kt);if(Me.errors&&Me.errors.length){ot.push(Me);return}if(kt){le.onStart(()=>_i(Ve,Me.fromStyles)),le.onDestroy(()=>Mt(Ve,Me.toStyles)),o.push(le);return}if(W.isFallbackTransition){le.onStart(()=>_i(Ve,Me.fromStyles)),le.onDestroy(()=>Mt(Ve,Me.toStyles)),o.push(le);return}let js=[];Me.timelines.forEach(He=>{He.stretchStartingKeyframe=!0,this.disabledNodes.has(He.element)||js.push(He)}),Me.timelines=js,t.append(Ve,Me.timelines);let wf={instruction:Me,player:le,element:Ve};a.push(wf),Me.queriedElements.forEach(He=>Qe(s,He,[]).push(le)),Me.preStyleProps.forEach((He,vi)=>{if(He.size){let at=l.get(vi);at||l.set(vi,at=new Set),He.forEach((xo,qr)=>at.add(qr))}}),Me.postStyleProps.forEach((He,vi)=>{let at=m.get(vi);at||m.set(vi,at=new Set),He.forEach((xo,qr)=>at.add(qr))})});if(ot.length){let L=[];ot.forEach($=>{L.push(rm($.triggerName,$.errors))}),Ft.forEach($=>$.destroy()),this.reportError(L)}let Be=new Map,We=new Map;a.forEach(L=>{let $=L.element;t.has($)&&(We.set($,$),this._beforeAnimationBuild(L.player.namespaceId,L.instruction,Be))}),o.forEach(L=>{let $=L.element;this._getPreviousPlayers($,!1,L.namespaceId,L.triggerName,null).forEach(le=>{Qe(Be,$,[]).push(le),le.destroy()})});let ht=B.filter(L=>bm(L,l,m)),rt=new Map;ym(rt,this.driver,Ce,m,vt).forEach(L=>{bm(L,l,m)&&ht.push(L)});let yi=new Map;x.forEach((L,$)=>{ym(yi,this.driver,new Set(L),l,Dn)}),ht.forEach(L=>{let $=rt.get(L),W=yi.get(L);rt.set(L,new Map([...$?.entries()??[],...W?.entries()??[]]))});let $r=[],$s=[],qs={};a.forEach(L=>{let{element:$,player:W,instruction:le}=L;if(t.has($)){if(g.has($)){W.onDestroy(()=>Mt($,le.toStyles)),W.disabled=!0,W.overrideTotalTime(le.totalTime),o.push(W);return}let Ve=qs;if(We.size>1){let Xe=$,jt=[];for(;Xe=Xe.parentNode;){let Me=We.get(Xe);if(Me){Ve=Me;break}jt.push(Xe)}jt.forEach(Me=>We.set(Me,Ve))}let kt=this._buildAnimation(W.namespaceId,le,Be,r,yi,rt);if(W.setRealPlayer(kt),Ve===qs)$r.push(W);else{let Xe=this.playersByElement.get(Ve);Xe&&Xe.length&&(W.parentPlayer=qt(Xe)),o.push(W)}}else _i($,le.fromStyles),W.onDestroy(()=>Mt($,le.toStyles)),$s.push(W),g.has($)&&o.push(W)}),$s.forEach(L=>{let $=r.get(L.element);if($&&$.length){let W=qt($);L.setRealPlayer(W)}}),o.forEach(L=>{L.parentPlayer?L.syncPlayerEvents(L.parentPlayer):L.destroy()});for(let L=0;L<B.length;L++){let $=B[L],W=$[Tt];if(vn($,yr),W&&W.hasAnimation)continue;let le=[];if(s.size){let kt=s.get($);kt&&kt.length&&le.push(...kt);let Xe=this.driver.query($,vr,!0);for(let jt=0;jt<Xe.length;jt++){let Me=s.get(Xe[jt]);Me&&Me.length&&le.push(...Me)}}let Ve=le.filter(kt=>!kt.destroyed);Ve.length?n_(this,$,Ve):this.processLeaveNode($)}return B.length=0,$r.forEach(L=>{this.players.push(L),L.onDone(()=>{L.destroy();let $=this.players.indexOf(L);this.players.splice($,1)}),L.play()}),$r}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,i,t,o,r){let a=[];if(i){let s=this.playersByQueriedElement.get(e);s&&(a=s)}else{let s=this.playersByElement.get(e);if(s){let l=!r||r==mo;s.forEach(m=>{m.queued||!l&&m.triggerName!=o||a.push(m)})}}return(t||o)&&(a=a.filter(s=>!(t&&t!=s.namespaceId||o&&o!=s.triggerName))),a}_beforeAnimationBuild(e,i,t){let o=i.triggerName,r=i.element,a=i.isRemovalTransition?void 0:e,s=i.isRemovalTransition?void 0:o;for(let l of i.timelines){let m=l.element,g=m!==r,_=Qe(t,m,[]);this._getPreviousPlayers(m,g,a,s,i.toState).forEach(x=>{let P=x.getRealPlayer();P.beforeDestroy&&P.beforeDestroy(),x.destroy(),_.push(x)})}_i(r,i.fromStyles)}_buildAnimation(e,i,t,o,r,a){let s=i.triggerName,l=i.element,m=[],g=new Set,_=new Set,D=i.timelines.map(P=>{let z=P.element;g.add(z);let B=z[Tt];if(B&&B.removedBeforeQueried)return new ki(P.duration,P.delay);let me=z!==l,Ce=o_((t.get(z)||J0).map(Be=>Be.getRealPlayer())).filter(Be=>{let We=Be;return We.element?We.element===z:!1}),Re=r.get(z),Ne=a.get(z),Ft=ss(this._normalizer,P.keyframes,Re,Ne),ot=this._buildPlayer(P,Ft,Ce);if(P.subTimeline&&o&&_.add(z),me){let Be=new go(e,s,z);Be.setRealPlayer(ot),m.push(Be)}return ot});m.forEach(P=>{Qe(this.playersByQueriedElement,P.element,[]).push(P),P.onDone(()=>e_(this.playersByQueriedElement,P.element,P))}),g.forEach(P=>ft(P,ms));let x=qt(D);return x.onDestroy(()=>{g.forEach(P=>vn(P,ms)),Mt(l,i.toStyles)}),_.forEach(P=>{Qe(o,P,[]).push(x)}),x}_buildPlayer(e,i,t){return i.length>0?this.driver.animate(e.element,i,e.duration,e.delay,e.easing,t):new ki(e.duration,e.delay)}},go=class{namespaceId;triggerName;element;_player=new ki;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,i,t){this.namespaceId=e,this.triggerName=i,this.element=t}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((i,t)=>{i.forEach(o=>hr(e,t,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let i=this._player;i.triggerCallback&&e.onStart(()=>i.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,i){Qe(this._queuedCallbacks,e,[]).push(i)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let i=this._player;i.triggerCallback&&i.triggerCallback(e)}};function e_(n,e,i){let t=n.get(e);if(t){if(t.length){let o=t.indexOf(i);t.splice(o,1)}t.length==0&&n.delete(e)}return t}function t_(n){return n??null}function Sr(n){return n&&n.nodeType===1}function i_(n){return n=="start"||n=="done"}function _m(n,e){let i=n.style.display;return n.style.display=e??"none",i}function ym(n,e,i,t,o){let r=[];i.forEach(l=>r.push(_m(l)));let a=[];t.forEach((l,m)=>{let g=new Map;l.forEach(_=>{let D=e.computeStyle(m,_,o);g.set(_,D),(!D||D.length==0)&&(m[Tt]=X0,a.push(m))}),n.set(m,g)});let s=0;return i.forEach(l=>_m(l,r[s++])),a}function vm(n,e){let i=new Map;if(n.forEach(s=>i.set(s,[])),e.length==0)return i;let t=1,o=new Set(e),r=new Map;function a(s){if(!s)return t;let l=r.get(s);if(l)return l;let m=s.parentNode;return i.has(m)?l=m:o.has(m)?l=t:l=a(m),r.set(s,l),l}return e.forEach(s=>{let l=a(s);l!==t&&i.get(l).push(s)}),i}function ft(n,e){n.classList?.add(e)}function vn(n,e){n.classList?.remove(e)}function n_(n,e,i){qt(i).onDone(()=>n.processLeaveNode(e))}function o_(n){let e=[];return Tm(n,e),e}function Tm(n,e){for(let i=0;i<n.length;i++){let t=n[i];t instanceof Ho?Tm(t.players,e):e.push(t)}}function r_(n,e){let i=Object.keys(n),t=Object.keys(e);if(i.length!=t.length)return!1;for(let o=0;o<i.length;o++){let r=i[o];if(!e.hasOwnProperty(r)||n[r]!==e[r])return!1}return!0}function bm(n,e,i){let t=i.get(n);if(!t)return!1;let o=e.get(n);return o?t.forEach(r=>o.add(r)):e.set(n,t),i.delete(n),!0}var bn=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,i)=>{};constructor(e,i,t){this._driver=i,this._normalizer=t,this._transitionEngine=new Os(e.body,i,t),this._timelineEngine=new ks(e.body,i,t),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(e,i,t,o,r){let a=e+"-"+o,s=this._triggerCache[a];if(!s){let l=[],m=[],g=wm(this._driver,r,l,m);if(l.length)throw Yp(o,l);s=W0(o,g,this._normalizer),this._triggerCache[a]=s}this._transitionEngine.registerTrigger(i,o,s)}register(e,i){this._transitionEngine.register(e,i)}destroy(e,i){this._transitionEngine.destroy(e,i)}onInsert(e,i,t,o){this._transitionEngine.insertNode(e,i,t,o)}onRemove(e,i,t){this._transitionEngine.removeNode(e,i,t)}disableAnimations(e,i){this._transitionEngine.markElementAsDisabled(e,i)}process(e,i,t,o){if(t.charAt(0)=="@"){let[r,a]=ls(t),s=o;this._timelineEngine.command(r,i,a,s)}else this._transitionEngine.trigger(e,i,t,o)}listen(e,i,t,o,r){if(t.charAt(0)=="@"){let[a,s]=ls(t);return this._timelineEngine.listen(a,i,s,r)}return this._transitionEngine.listen(e,i,t,o,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function a_(n,e){let i=null,t=null;return Array.isArray(e)&&e.length?(i=vs(e[0]),e.length>1&&(t=vs(e[e.length-1]))):e instanceof Map&&(i=vs(e)),i||t?new s_(n,i,t):null}var s_=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(i,t,o){this._element=i,this._startStyles=t,this._endStyles=o;let r=n.initialStylesByElement.get(i);r||n.initialStylesByElement.set(i,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Mt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Mt(this._element,this._initialStyles),this._endStyles&&(Mt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(_i(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(_i(this._element,this._endStyles),this._endStyles=null),Mt(this._element,this._initialStyles),this._state=3)}}return n})();function vs(n){let e=null;return n.forEach((i,t)=>{l_(t)&&(e=e||new Map,e.set(t,i))}),e}function l_(n){return n==="display"||n==="position"}var Ar=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,i,t,o){this.element=e,this.keyframes=i,this.options=t,this._specialStyles=o,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,i=this._triggerWebAnimation(this.element,e,this.options);if(!i)return this._onFinish(),null;this.domPlayer=i,this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();return i.addEventListener("finish",t),this.onDestroy(()=>{i.removeEventListener("finish",t)}),i}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let i=[];return e.forEach(t=>{i.push(Object.fromEntries(t))}),i}_triggerWebAnimation(e,i,t){let o=this._convertKeyframesToObject(i);try{return e.animate(o,t)}catch{return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,o)=>{o!=="offset"&&e.set(o,this._finished?t:xr(this.element,o))}),this.currentSnapshot=e}triggerCallback(e){let i=e==="start"?this._onStartFns:this._onDoneFns;i.forEach(t=>t()),i.length=0}},Dr=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,i){return cs(e,i)}getParentElement(e){return _r(e)}query(e,i,t){return ds(e,i,t)}computeStyle(e,i,t){return xr(e,i)}animate(e,i,t,o,r,a=[]){let s=o==0?"both":"forwards",l={duration:t,delay:o,fill:s};r&&(l.easing=r);let m=new Map,g=a.filter(x=>x instanceof Ar);cm(t,o)&&g.forEach(x=>{x.currentSnapshot.forEach((P,z)=>m.set(z,P))});let _=sm(i).map(x=>new Map(x));_=dm(e,_,m);let D=a_(e,_);return new Ar(e,_,l,D)}};var Mr="@",km="@.disabled",Ir=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,i,t,o){this.namespaceId=e,this.delegate=i,this.engine=t,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,i){return this.delegate.createElement(e,i)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,i){this.delegate.appendChild(e,i),this.engine.onInsert(this.namespaceId,i,e,!1)}insertBefore(e,i,t,o=!0){this.delegate.insertBefore(e,i,t),this.engine.onInsert(this.namespaceId,i,e,o)}removeChild(e,i,t,o){if(o){this.delegate.removeChild(e,i,t,o);return}this.parentNode(i)&&this.engine.onRemove(this.namespaceId,i,this.delegate)}selectRootElement(e,i){return this.delegate.selectRootElement(e,i)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,i,t,o){this.delegate.setAttribute(e,i,t,o)}removeAttribute(e,i,t){this.delegate.removeAttribute(e,i,t)}addClass(e,i){this.delegate.addClass(e,i)}removeClass(e,i){this.delegate.removeClass(e,i)}setStyle(e,i,t,o){this.delegate.setStyle(e,i,t,o)}removeStyle(e,i,t){this.delegate.removeStyle(e,i,t)}setProperty(e,i,t){i.charAt(0)==Mr&&i==km?this.disableAnimations(e,!!t):this.delegate.setProperty(e,i,t)}setValue(e,i){this.delegate.setValue(e,i)}listen(e,i,t,o){return this.delegate.listen(e,i,t,o)}disableAnimations(e,i){this.engine.disableAnimations(e,i)}},Ps=class extends Ir{factory;constructor(e,i,t,o,r){super(i,t,o,r),this.factory=e,this.namespaceId=i}setProperty(e,i,t){i.charAt(0)==Mr?i.charAt(1)=="."&&i==km?(t=t===void 0?!0:!!t,this.disableAnimations(e,t)):this.engine.process(this.namespaceId,e,i.slice(1),t):this.delegate.setProperty(e,i,t)}listen(e,i,t,o){if(i.charAt(0)==Mr){let r=c_(e),a=i.slice(1),s="";return a.charAt(0)!=Mr&&([a,s]=d_(a)),this.engine.listen(this.namespaceId,r,a,s,l=>{let m=l._data||-1;this.factory.scheduleListenerCallback(m,t,l)})}return this.delegate.listen(e,i,t,o)}};function c_(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function d_(n){let e=n.indexOf("."),i=n.substring(0,e),t=n.slice(e+1);return[i,t]}var Nr=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,i,t){this.delegate=e,this.engine=i,this._zone=t,i.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}
3createRenderer(e,i){let o=this.delegate.createRenderer(e,i);if(!e||!i?.data?.animation){let m=this._rendererCache,g=m.get(o);if(!g){let _=()=>m.delete(o);g=new Ir("",o,this.engine,_),m.set(o,g)}return g}let r=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let s=m=>{Array.isArray(m)?m.forEach(s):this.engine.registerTrigger(r,a,e,m.name,m)};return i.data.animation.forEach(s),new Ps(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,t){if(e>=0&&e<this._microtaskId){this._zone.run(()=>i(t));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[a,s]=r;a(s)}),this._animationCallbacksBuffer=[]})}),o.push([i,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};Pe();Sf();var p_=(()=>{class n extends bn{constructor(i,t,o){super(i,t,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||n)(Ue(Lt),Ue(Li),Ue(Ri))};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})();function m_(){return new Tr}function f_(n,e,i){return new Nr(n,e,i)}var Em=[{provide:Ri,useFactory:m_},{provide:bn,useClass:p_},{provide:nl,useFactory:f_,deps:[vl,bn,Gr]}],sM=[{provide:Li,useClass:As},{provide:Hr,useValue:"NoopAnimations"},...Em],h_=[{provide:Li,useFactory:()=>new Dr},{provide:Hr,useFactory:()=>"BrowserAnimations"},...Em];function Om(){return il("NgEagerAnimations"),[...h_]}ve();re();zt();b();Po();ve();re();b();var Pm=(()=>{let e=class e extends Ro{constructor(){super(...arguments),this.title=u(Sl),this.transloco=u(Q)}updateTitle(t){let o=t.root,r;for(;o;){let l=o.data?.title;if(typeof l=="string"&&l&&(r=l),!o.firstChild)break;o=o.firstChild}if(!r)return;let a=r.includes("."),s;if(a){let l=this.transloco.translate(r);s=l===r?null:l}else s=this.transloco.getActiveLang()==="en"?r:null;this.title.setTitle(s?`${s} \u2014 Photomize`:"Photomize AI")}};e.\u0275fac=(()=>{let t;return function(r){return(t||(t=el(e)))(r||e)}})(),e.\u0275prov=H({token:e,factory:e.\u0275fac});let n=e;return n})();b();re();Bi();Se();b();Uo();Zi();var Am=()=>{let n=u(wd),e=u(ri);return u(ct).waitForUserProfileReady(2e3).pipe(gt(1),Qs(t=>t?wo({models:n.loadModels().pipe(Wt(()=>et([]))),wallet:Gs(e.loadWallet()).pipe(Wt(()=>et(null)))}):et(null))).subscribe(),et(null)};ve();b();Zi();Yi();Se();Bi();Ge();$o();var Dm=(n,e)=>F(null,null,function*(){let i=u(ct),t=u(lt),o=u(G),r=u(ai),a=!1;t.currentProfile||(r.setRotatingMessages(cd),r.startLoading("auth_guard_profile"),a=!0);try{try{yield ue(i.authReady$.pipe(we(g=>g),gt(1),bi(5e3)))}catch{k.warn("AuthGuard: Auth ready timeout, proceeding with auth check")}let s=jr;i.hasCurrentUser&&!t.currentProfile&&(k.debug("AuthGuard: session without profile \u2014 probing authoritative profile state"),s=t.refreshUserProfile().pipe(we(g=>g===null),xi(()=>(k.warn("AuthGuard: session has no profile (authoritative) \u2014 redirecting to sign-in"),{type:"redirect",url:`/sign-in?error=profile_required&redirectURL=${encodeURIComponent(e.url)}`})),Wt(()=>jr)));let l=Ks([i.authState$,t.userProfile$]).pipe(we(([g,_])=>!!(g===null||g&&_)),gt(1),bi(15e3),xi(([g,_])=>g?_?{type:"success"}:(k.log("Auth guard: User exists but no profile found - redirecting to sign-in"),{type:"redirect",url:`/sign-in?error=profile_required&redirectURL=${encodeURIComponent(e.url)}`}):{type:"redirect",url:`/sign-in?redirectURL=${encodeURIComponent(e.url)}`}),Wt(g=>{k.error("Auth guard error/timeout:",g);let _=encodeURIComponent(e.url);return et({type:"redirect",url:`/sign-in?error=profile_load_failed&redirectURL=${_}`})})),m=yield ue(Ys([l,s]));return m.type==="redirect"?o.parseUrl(m.url):!0}catch(s){return k.error("Auth guard processing error:",s),o.parseUrl("/sign-in?error=auth_failed")}
3finally{a&&r.finishLoading("auth_guard_profile")}});b();ve();re();oa();var Im=()=>F(null,null,function*(){let n=u(Ki),e=u(G),i=u(Q);if(yield n.isAvailable())return!0;let t=i.getActiveLang();return e.parseUrl(`/${t}/studio/home`)});b();yt();Ge();var Nt=n=>F(null,null,function*(){let e=u(Ee),i=n.paramMap.get("app")||n.parent?.data?.appName||n.data?.appName;if(i)try{return yield e.preloadTranslationsOnly(i),!0}catch(t){return k.error(`Failed to load app config for: ${i}`,t),!1}return!0});b();ve();Se();Ot();Ge();Wf();Hf();Yi();Gf();b();Ti();Ot();Yi();b();se();re();b();re();Ti();b();var g_=["chatEl"],__=(n,e)=>({current:n,total:e}),y_=(n,e)=>e.id,v_=(n,e)=>e.value;function b_(n,e){if(n&1&&(J(0,"div",13),st(1,"img",16),J(2,"div",17),f(3),oe()()),n&2){let i=h().$implicit;d(3),V(" ",i.text," ")}}function x_(n,e){if(n&1&&(J(0,"div",15)(1,"div",18),f(2),oe()()),n&2){let i=h().$implicit;d(2),V(" ",i.text," ")}}function w_(n,e){if(n&1&&S(0,b_,4,1,"div",13)(1,x_,3,1,"div",15),n&2){let i=e.$implicit;M(i.type==="phozi"?0:1)}}function C_(n,e){n&1&&(J(0,"div",13),st(1,"img",16),J(2,"div",19),st(3,"span",20)(4,"span",20)(5,"span",20),oe()())}function S_(n,e){if(n&1){let i=R();J(0,"button",22),Rt("click",function(){w(i);let o=h(2);return C(o.onCtaClick())}),f(1),oe()}if(n&2){let i=h(2);d(),V(" ",i.currentNode().cta," ")}}function M_(n,e){n&1&&(J(0,"p",23),f(1),y(2,"transloco"),oe()),n&2&&(d(),V(" ",v(2,1,"onboarding.multiHint")," "))}function T_(n,e){n&1&&(J(0,"span",28),f(1,"\u2713"),oe())}function k_(n,e){if(n&1&&(J(0,"span",31),f(1),oe()),n&2){let i=h().$implicit;d(),T(i.sub)}}function E_(n,e){if(n&1){let i=R();J(0,"button",27),Rt("click",function(){let o=w(i).$implicit,r=h(3);return C(r.onOptionClick(o))}),S(1,T_,2,0,"span",28),J(2,"span",29),f(3),oe(),J(4,"span",30),f(5),oe(),S(6,k_,2,1,"span",31),oe()}if(n&2){let i=e.$implicit,t=e.$index,o=h(3);Yr(o.optionStyle(i.value)),xe("animation-delay",t*60+"ms"),d(),M(o.pendingMulti().includes(i.value)?1:-1),d(2),T(i.emoji),d(2),T(i.label),d(),M(i.sub?6:-1)}}function O_(n,e){if(n&1){let i=R();J(0,"button",32),Rt("click",function(){w(i);let o=h(3);return C(o.submitMulti())}),f(1),y(2,"transloco"),oe()}if(n&2){let i=h(3);Yr(i.pendingMulti().length>0?"background: linear-gradient(135deg, #477CF6, #8B5CF6, #ec4899); color: #fff":"background: var(--color-surface-elevated); color: var(--color-text-muted)"),Ae(i.pendingMulti().length>0?"active:scale-[0.98]":"cursor-not-allowed opacity-40"),To("disabled",i.pendingMulti().length===0),d(),V(" ",v(2,6,"onboarding.dalej")," ")}}function P_(n,e){if(n&1&&(S(0,M_,3,3,"p",23),J(1,"div",24),_e(2,E_,7,8,"button",25,v_),oe(),S(4,O_,3,8,"button",26)),n&2){let i,t,o=h(2);M(((i=o.currentNode())==null?null:i.type)==="multi"?0:-1),d(),Ae(o.currentOptions().length<=2?"grid-cols-1":"grid-cols-2"),d(),ye(o.currentOptions()),d(2),M(((t=o.currentNode())==null?null:t.type)==="multi"?4:-1)}}function A_(n,e){if(n&1&&(J(0,"div",14),S(1,S_,2,1,"button",21)(2,P_,5,4),oe()),n&2){let i,t=h();d(),M(((i=t.currentNode())==null?null:i.type)==="end"?1:t.currentOptions()&&t.currentOptions().length>0?2:-1)}}var D_=280,I_=750,Nm=500,Fr=5,Lr=(()=>{let e=class e{constructor(){this.completed=_t(),this.transloco=u(Q),this.cdr=u(Sn),this.analytics=u(Ze),this.chatMessages=X([]),this.currentNode=X(null),this.pendingMulti=X([]),this.isTyping=X(!1),this.showOptions=X(!1),this.stepIndex=X(0),this.MAX_STEPS=Fr,this.progressPct=I(()=>Math.round(this.stepIndex()/Fr*100)),this.currentOptions=I(()=>this.currentNode()?.options??null),this.collectedAnswers=new Map,this.msgCounter=0,this.shouldScrollDown=!1}ngOnInit(){this.flow=this.buildFlow(),this.goTo("greeting")}ngAfterViewChecked(){this.shouldScrollDown&&(this.shouldScrollDown=!1,this.scrollToBottom())}onOptionClick(t){this.currentNode()?.type==="multi"?this.toggleMulti(t.value):this.selectSingle(t)}onCtaClick(){this.finish()}submitMulti(){if(this.pendingMulti().length===0)return;let t=this.currentNode();if(!t)return;let o=[...this.pendingMulti()];this.collectedAnswers.set(t.id,o),this.showOptions.set(!1),this.analytics.trackOnboardingStepCompleted(t.step??-1,t.id,{answer:o});let r=o.map(s=>t.options?.find(l=>l.value===s)?.label??s).join(", ");this.addUserMessage(r);let a=t.options?.find(s=>
3s.value===o[0])?.next;setTimeout(()=>{this.pendingMulti.set([]),a&&this.goTo(a)},Nm)}toggleMulti(t){let o=this.pendingMulti();o.includes(t)?this.pendingMulti.set(o.filter(r=>r!==t)):this.pendingMulti.set([...o,t])}selectSingle(t){let o=this.currentNode();o&&(this.collectedAnswers.set(o.id,t.value),this.showOptions.set(!1),this.addUserMessage(t.label),this.analytics.trackOnboardingStepCompleted(o.step??-1,o.id,{answer:t.value}),setTimeout(()=>this.goTo(t.next),Nm))}goTo(t){let o=this.flow[t];o&&(this.currentNode.set(o),this.showOptions.set(!1),o.step!==void 0&&this.stepIndex.set(o.step),this.showMessages(o.messages,o.question,()=>{this.showOptions.set(!0),this.cdr.markForCheck(),this.shouldScrollDown=!0}))}showMessages(t,o,r){let a=o?[...t,o]:[...t],s=0,l=()=>{if(s>=a.length){r();return}this.isTyping.set(!0),this.shouldScrollDown=!0,this.cdr.markForCheck(),setTimeout(()=>{this.isTyping.set(!1),this.addPhoziMessage(a[s]),s++,setTimeout(l,D_)},I_)};setTimeout(l,80)}addPhoziMessage(t){this.msgCounter++,this.chatMessages.update(o=>[...o,{id:`m${this.msgCounter}`,type:"phozi",text:t}]),this.shouldScrollDown=!0,this.cdr.markForCheck()}addUserMessage(t){this.msgCounter++,this.chatMessages.update(o=>[...o,{id:`m${this.msgCounter}`,type:"user",text:t}]),this.shouldScrollDown=!0,this.cdr.markForCheck()}scrollToBottom(){let t=this.chatEl?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}finish(){let t=this.collectedAnswers.get("greeting"),o=this.collectedAnswers.get(`${t}_q2`),r=this.collectedAnswers.get("freq_q"),s=this.collectedAnswers.get("phozi_q")==="yes",l={};this.collectedAnswers.forEach((m,g)=>{l[g]=m}),this.completed.emit({answers:l,segment:t,persona:o,frequency:r,marketingConsent:s})}optionStyle(t){return this.currentNode()?.type==="multi"&&this.pendingMulti().includes(t)?"background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899) border-box; border: 1.5px solid transparent;":"border: 1.5px solid var(--color-border); background: var(--color-surface);"}t(t){return this.transloco.translate(t)}buildFlow(){let t=o=>this.t(o);return{greeting:{id:"greeting",step:0,messages:[t("onboarding.flow.greeting1"),t("onboarding.flow.greeting0"),t("onboarding.flow.greeting_tokens"),t("onboarding.flow.greeting3")],question:t("onboarding.flow.q1"),type:"single",options:[{value:"seg01",label:t("onboarding.flow.q1_seg01_label"),emoji:"\u{1F4F8}",sub:t("onboarding.flow.q1_seg01_sub"),next:"seg01_q2"},{value:"seg02",label:t("onboarding.flow.q1_seg02_label"),emoji:"\u{1F3AC}",sub:t("onboarding.flow.q1_seg02_sub"),next:"seg02_q2"},{value:"seg03",label:t("onboarding.flow.q1_seg03_label"),emoji:"\u{1F3EA}",sub:t("onboarding.flow.q1_seg03_sub"),next:"seg03_q2"},{value:"seg04",label:t("onboarding.flow.q1_seg04_label"),emoji:"\u{1F6D2}",sub:t("onboarding.flow.q1_seg04_sub"),next:"seg04_q2"},{value:"seg05",label:t("onboarding.flow.q1_seg05_label"),emoji:"\u{1F3B2}",sub:t("onboarding.flow.q1_seg05_sub"),next:"seg05_q2"}]},seg01_q2:{id:"seg01_q2",step:1,messages:[t("onboarding.flow.seg01_intro")],question:t("onboarding.flow.seg01_q2"),type:"single",options:[{value:"s1_career",label:t("onboarding.flow.seg01_q2_career_label"),emoji:"\u{1F4BC}",sub:t("onboarding.flow.seg01_q2_career_sub"),next:"freq_q"},{value:"s1_dating",label:t("onboarding.flow.seg01_q2_dating_label"),emoji:"\u{1F495}",sub:t("onboarding.flow.seg01_q2_dating_sub"),next:"freq_q"},{value:"s1_brand",label:t("onboarding.flow.seg01_q2_brand_label"),emoji:"\u{1F31F}",sub:t("onboarding.flow.seg01_q2_brand_sub"),next:"freq_q"},{value:"s1_casting",label:t("onboarding.flow.seg01_q2_casting_label"),emoji:"\u{1F3AD}",sub:t("onboarding.flow.seg01_q2_casting_sub"),next:"freq_q"},{value:"s1_fun",label:t("onboarding.flow.seg01_q2_fun_label"),emoji:"\u{1F389}",sub:t("onboarding.flow.seg01_q2_fun_sub"),next:"freq_q"}]},seg02_q2:{id:"seg02_q2",step:1,messages:[t("onboarding.flow.seg02_intro")],question:t("onboarding.flow.seg02_q2"),type:"single",options:[{value:"s2_social",label:t("onboarding.flow.seg02_q2_social_label"),emoji:"\u{1F4F1}",sub:t("onboarding.flow.seg02_q2_social_sub"),next:"freq_q"},{value:"s2_talking",label:t("onboarding.flow.seg02_q2_talking_label"),emoji:"\u{1F3A4}",sub:t("onboarding.flow.seg02_q2_talking_sub"),next:"freq_q"},{value:"s2_clients",label:t("onboarding.flow.seg02_q2_clients_label"),emoji:"\u{1F91D}",sub:t("onboarding.flow.seg02_q2_clients_sub"),next:"freq_q"},{value:"s2_promo",label:t("onboarding.flow.seg02_q2_promo_label"),emoji:"\u{1F4E2}",sub:t("onboarding.flow.seg02_q2_promo_sub"),next:"freq_q"},{value:"s2_photographer",label:t("onboarding.flow.seg02_q2_photographer_label"),emoji:"\u{1F4F7}",sub:t("onboarding.flow.seg02_q2_photographer_sub"),next:"freq_q"}]},seg03_q2:{id:"seg03_q2",step:1,messages:[t("onboarding.flow.seg03_intro")],question:t("onboarding.flow.seg03_q2"),type:"single",options:[{value:"s3_time",label:t("onboarding.flow.seg03_q2_time_label"),emoji:"\u23F1\uFE0F",sub:t("onboarding.flow.seg03_q2_time_sub"),next:"freq_q"},{value:"s3_ideas",label:t("onboarding.flow.seg03_q2_ideas_label"),emoji:"\u{1F4A1}",sub:t("onboarding.flow.seg03_q2_ideas_sub"),next:"freq_q"},{value:"s3_cost",label:t("onboarding.flow.seg03_q2_cost_label"),emoji:"\u{1F4B8}",sub:t("onboarding.flow.seg03_q2_cost_sub"),next:"freq_q"},{value:"s3_howto",label:t("onboarding.flow.seg03_q2_howto_label"),emoji:"\u{1F937}",sub:t("onboarding.flow.seg03_q2_howto_sub"),next:"freq_q"}]},seg04_q2:{id:"seg04_q2",step:1,messages:[t("onboarding.flow.seg04_intro")],question:t("onboarding.flow.seg04_q2"),type:"single",options:[{value:"s4_photos",label:t("onboarding.flow.seg04_q2_photos_label"),emoji:"\u{1F4F8}",sub:t("onboarding.flow.seg04_q2_photos_sub"),next:"freq_q"},{value:"s4_video",label:t("onboarding.flow.seg04_q2_video_label"),emoji:"\u{1F3A5}",sub:t("onboarding.flow.seg04_q2_video_sub"),next:"freq_q"},{value:"s4_all",label:t("onboarding.flow.seg04_q2_all_label"),emoji:"\u{1F5C2}\uFE0F",sub:t("onboarding.flow.seg04_q2_all_sub"),next:"freq_q"}]},seg05_q2:{id:"seg05_q2",step:1,messages:[t("onboarding.flow.seg05_intro")],question:t("onboarding.flow.seg05_q2"),type:"single",options:[{value:"s5_ai",label:t("onboarding.flow.seg05_q2_ai_label"),emoji:"\u{1F916}",sub:t("onboarding.flow.seg05_q2_ai_sub"),next:"freq_q"},{value:"s5_social",label:t("onboarding.flow.seg05_q2_social_label"),emoji:"\u{1F4F1}",sub:t("onboarding.flow.seg05_q2_social_sub"),next:"freq_q"},{value:"s5_fun",label:t("onboarding.flow.seg05_q2_fun_label"),emoji:"\u{1F3A8}",sub:t("onboarding.flow.seg05_q2_fun_sub"),next:"freq_q"},{value:"s5_friend",label:t("onboarding.flow.seg05_q2_friend_label"),emoji:"\u{1F381}",sub:t("onboarding.flow.seg05_q2_friend_sub"),next:"freq_q"}]},freq_q:{id:"freq_q",step:2,messages:[t("onboarding.flow.freq_intro")],question:t("onboarding.flow.freq_q"),type:"single",options:[{value:"once",label:t("onboarding.flow.freq_once_label"),emoji:"\u{1F3AF}",sub:t("onboarding.flow.freq_once_sub"),next:"source_q"},{value:"sometimes",label:t("onboarding.flow.freq_sometimes_label"),emoji:"\u{1F504}",sub:t("onboarding.flow.freq_sometimes_sub"),next:"source_q"},{value:"often",label:t("onboarding.flow.freq_often_label"),emoji:"\u{1F525}",sub:t("onboarding.flow.freq_often_sub"),next:"source_q"}]},source_q:{id:"source_q",step:3,messages:[t("onboarding.flow.source_intro")],question:t("onboarding.flow.source_q"),type:"multi",options:[{value:"referral",label:t("onboarding.flow.source_referral_label"),emoji:"\u{1F44B}",sub:t("onboarding.flow.source_referral_sub"),next:"phozi_q"},{value:"google",label:t("onboarding.flow.source_google_label"),emoji:"\u{1F50D}",sub:t("onboarding.flow.source_google_sub"),next:"phozi_q"},{value:"social",label:t("onboarding.flow.source_social_label"),emoji:"\u{1F3B5}",sub:t("onboarding.flow.source_social_sub"),next:"phozi_q"},{value:"influencer",label:t("onboarding.flow.source_influencer_label"),emoji:"\u{1F91D}",sub:t("onboarding.flow.source_influencer_sub"),next:"phozi_q"},{value:"ads",label:t("onboarding.flow.source_ads_label"),emoji:"\u{1F3F7}\uFE0F",sub:t("onboarding.flow.source_ads_sub"),next:"phozi_q"},{value:"newsletter",label:t("onboarding.flow.source_newsletter_label"),emoji:"\u{1F4AC}",sub:t("onboarding.flow.source_newsletter_sub"),next:"phozi_q"}]}
3,phozi_q:{id:"phozi_q",step:4,messages:[t("onboarding.flow.phozi_q_intro1"),t("onboarding.flow.phozi_q_intro2")],question:t("onboarding.flow.phozi_q"),type:"single",options:[{value:"yes",label:t("onboarding.flow.phozi_q_yes_label"),emoji:"\u2705",sub:t("onboarding.flow.phozi_q_yes_sub"),next:"end_yes"},{value:"no",label:t("onboarding.flow.phozi_q_no_label"),emoji:"\u{1F4F5}",sub:t("onboarding.flow.phozi_q_no_sub"),next:"end_no"}]},end_yes:{id:"end_yes",step:Fr,messages:[t("onboarding.flow.end_yes_msg1"),t("onboarding.flow.end_yes_msg2")],type:"end",cta:t("onboarding.flow.end_yes_cta")},end_no:{id:"end_no",step:Fr,messages:[t("onboarding.flow.end_no_msg1"),t("onboarding.flow.end_no_msg2")],type:"end",cta:t("onboarding.flow.end_no_cta")}}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-onboarding-chat"]],viewQuery:function(o,r){if(o&1&&Kt(g_,5),o&2){let a;Yt(a=Zt())&&(r.chatEl=a.first)}},outputs:{completed:"completed"},decls:22,vars:14,consts:[["chatEl",""],[1,"chat-header","flex","flex-shrink-0","items-center","gap-3","border-b","border-border","bg-background","px-4","pb-3"],[1,"relative","flex-shrink-0"],["src","/images/phozi/phozi.webp","alt","Phozi",1,"h-10","w-10","rounded-xl","object-cover","shadow-lg","shadow-purple-500/30",2,"animation","bIn .4s ease both"],[1,"absolute","-bottom-0.5","-end-0.5","h-3","w-3","rounded-full","border-2","border-background","bg-green-400"],[1,"min-w-0","flex-1"],[1,"text-sm","font-bold","text-text-primary"],[1,"text-[11px]","text-green-400"],[1,"flex-shrink-0","text-end"],[1,"mb-1","text-[10px]","text-text-muted"],[1,"h-1","w-16","overflow-hidden","rounded-full","bg-surface-elevated"],[1,"h-full","rounded-full",2,"background","linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899)","transition","width .6s cubic-bezier(.4,0,.2,1)"],[1,"flex","flex-1","flex-col","gap-1.5","overflow-y-auto","px-4","py-4",2,"scroll-behavior","smooth"],[1,"msg-enter","flex","items-end","gap-2"],[1,"flex-shrink-0","overflow-y-auto","border-t","border-border","bg-background","px-4","pb-4","pt-3",2,"max-height","54vh","padding-bottom","calc(1rem + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))"],[1,"msg-enter","flex","justify-end"],["src","/images/phozi/phozi.webp","alt","Phozi",1,"mb-0.5","h-7","w-7","flex-shrink-0","rounded-lg","object-cover"],[1,"max-w-[78%]","rounded-2xl","rounded-es-sm","px-4","py-2.5","text-sm","leading-snug",2,"background","var(--color-surface-elevated)","color","var(--color-text-primary)"],[1,"max-w-[78%]","rounded-2xl","rounded-ee-sm","px-4","py-2.5","text-sm","font-medium","leading-snug","text-white",2,"background","linear-gradient(135deg, #477CF6, #8B5CF6)"],[1,"flex","items-center","gap-1.5","rounded-2xl","rounded-es-sm","px-4","py-3",2,"background","var(--color-surface-elevated)"],[1,"tdot","h-1.5","w-1.5","rounded-full","bg-text-muted"],[1,"block","w-full","rounded-2xl","py-4","text-base","font-bold","text-white","transition-all","active:scale-[0.98]",2,"background","linear-gradient(135deg, #477CF6, #8B5CF6, #ec4899)"],[1,"block","w-full","rounded-2xl","py-4","text-base","font-bold","text-white","transition-all","active:scale-[0.98]",2,"background","linear-gradient(135deg, #477CF6, #8B5CF6, #ec4899)",3,"click"],[1,"mb-2","text-center","text-[11px]","text-text-muted"],[1,"grid","gap-2"],[1,"opt-enter","relative","flex","cursor-pointer","flex-col","rounded-xl","border","p-3","text-start","transition-all","active:scale-[0.98]",3,"animation-delay","style"],[1,"mt-3","block","w-full","rounded-xl","py-3","text-sm","font-bold","transition-all",3,"class","style","disabled"],[1,"opt-enter","relative","flex","cursor-pointer","flex-col","rounded-xl","border","p-3","text-start","transition-all","active:scale-[0.98]",3,"click"],[1,"absolute","end-2","top-2","text-[11px]","font-bold",2,"color","#8B5CF6"],[1,"mb-1","text-lg","leading-none"],[1,"text-[12px]","font-semibold","leading-tight","text-text-primary"],[1,"mt-0.5","text-[10px]","leading-tight","text-text-muted"],[1,"mt-3","block","w-full","rounded-xl","py-3","text-sm","font-bold","transition-all",3,"click","disabled"]],template:function(o,r){o&1&&(J(0,"div",1)(1,"div",2),st(2,"img",3)(3,"span",4),oe(),J(4,"div",5)(5,"p",6),f(6,"Phozi"),oe(),J(7,"p",7),f(8),y(9,"transloco"),oe()(),J(10,"div",8)(11,"p",9),f(12),y(13,"transloco"),oe(),J(14,"div",10),st(15,"div",11),oe()()(),J(16,"div",12,0),_e(18,w_,2,1,null,null,y_),S(20,C_,6,0,"div",13),oe(),S(21,A_,3,1,"div",14)),o&2&&(d(8),V(" ",v(9,6,"onboarding.phoziOnline")," "),d(4),V(" ",Eo(13,8,"onboarding.stepLabel",ml(11,__,r.stepIndex()+1,r.MAX_STEPS))," "),d(3),xe("width",r.progressPct()+"%"),d(3),ye(r.chatMessages()),d(2),M(r.isTyping()?20:-1),d(),M(r.showOptions()?21:-1))},dependencies:[ee],styles:[".chat-header[_ngcontent-%COMP%]{padding-top:calc(.75rem + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))}@keyframes _ngcontent-%COMP%_bIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_oIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_tdot{0%,60%,to{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}.msg-enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_bIn .3s ease both}.opt-enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_oIn .28s ease both}.tdot[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_tdot 1.1s infinite ease-in-out}.tdot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.18s}.tdot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.36s}"],changeDetection:0});let n=e;return n})();b();se();function N_(n,e){if(n&1){let i=R();c(0,"div",4)(1,"div",5)(2,"div",6),E(3,"img",7),p(),c(4,"p",8),E(5,"span",9),f(6),y(7,"transloco"),p(),c(8,"h1",10),f(9),y(10,"transloco"),c(11,"span",11),f(12),y(13,"transloco"),p()(),c(14,"p",12),f(15),y(16,"transloco"),y(17,"transloco"),p(),c(18,"div",13)(19,"span",14)(20,"span",15),f(21,"\u2713"),p(),f(22),y(23,"transloco"),p(),c(24,"span",14)(25,"span",15),f(26,"\u2713"),p(),f(27),y(28,"transloco"),p()(),c(29,"button",16),A("click",function(){w(i);let o=h();return C(o.next.emit())}),f(30),y(31,"transloco"),c(32,"mat-icon",17),f(33,"arrow_forward"),p()()(),c(34,"div",18)(35,"video",19),A("canplay",function(o){w(i);let r=h();return C(r.onMascotReady(o))}),E(36,"source",20),p(),E(37,"div",21)(38,"div",22)(39,"div",23)(40,"div",24),p()()}if(n&2){let i=h();d(6),V(" ",v(7,12,"onboarding.welcome.eyebrow")," "),d(3),V(" ",v(10,14,"onboarding.welcome.titleLead")," "),d(3),T(v(13,16,"onboarding.welcome.titleAccent")),d(3),ko(" ",v(16,18,"onboarding.welcome.description")," ",v(17,20,"onboarding.welcome.descriptionExtra")," "),d(7),V(" ",v(23,22,"onboarding.welcome.badgeTools")," "),d(5),V(" ",v(28,24,"onboarding.welcome.badgeInstant")," "),d(3),V(" ",v(31,26,"onboarding.welcome.cta")," "),d(5),ie("opacity-0",!i.mascotCanPlay()),d(2),ie("opacity-0",i.mascotCanPlay())}}function F_(n,e){if(n&1){let i=R();c(0,"div",4)(1,"div",25)(2,"app-onboarding-chat",26),A("completed",function(o){w(i);let r=h();return C(r.chatCompleted.emit(o))}),p()(),c(3,"div",18)(4,"video",19),A("canplay",function(o){w(i);let r=h();return C(r.onMascotReady(o))}),E(5,"source",27)(6,"source",28),p(),E(7,"div",21)(8,"div",22)(9,"div",23)(10,"div",24),p()()}if(n&2){let i=h();d(4),ie("opacity-0",!i.mascotCanPlay()),d(3),ie("opacity-0",i.mascotCanPlay())}}var Fm=(()=>{let e=class e{constructor(){this.step=Jt.required(),this.next=_t(),this.chatCompleted=_t(),this.mascotCanPlay=X(!1)}onMascotReady(t){let o=t.target;this.mascotCanPlay.set(!0),o.play().catch(()=>{})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-onboarding-desktop"]],inputs:{step:[1,"step"]},outputs:{next:"next",chatCompleted:"chatCompleted"},decls:6,vars:1,consts:[[1,"relative","flex","h-full","flex-col","overflow-hidden","bg-background","text-text-primary"],[1,"pointer-events-none","absolute","
3inset-0","overflow-hidden"],[1,"absolute","-end-24","-top-24","h-96","w-96","rounded-full","bg-purple-500/10","blur-3xl"],[1,"absolute","-bottom-24","-start-24","h-96","w-96","rounded-full","bg-blue-500/10","blur-3xl"],[1,"relative","flex","flex-1","overflow-hidden"],[1,"flex","flex-1","flex-col","justify-center","px-8","py-10","pe-6"],[1,"mb-6"],["src","/images/logo/logo.webp","alt","Photomize",1,"h-8","w-auto"],[1,"mb-3","flex","items-center","gap-2","text-[10px]","font-semibold","uppercase","tracking-widest","text-text-muted"],[1,"block","h-px","w-6","bg-gradient-to-r","from-blue-500","to-purple-500"],[1,"text-[28px]","font-extrabold","leading-tight","text-text-primary"],[1,"bg-gradient-to-r","from-blue-500","via-purple-500","to-pink-500","bg-clip-text","text-transparent"],[1,"mt-4","text-sm","leading-relaxed","text-text-secondary"],[1,"mt-5","flex","flex-wrap","gap-2"],[1,"flex","items-center","gap-1.5","rounded-full","border","border-border","px-3","py-1","text-xs","text-text-secondary"],[1,"text-green-400"],[1,"mt-8","flex","w-fit","items-center","gap-2","rounded-full","bg-gradient-to-r","from-blue-500","via-purple-500","to-pink-500","px-7","py-3","text-sm","font-bold","text-white","shadow-lg","shadow-purple-500/25","transition-all","hover:-translate-y-0.5","active:translate-y-0",3,"click"],[1,"rtl-flip",2,"font-size","16px","width","16px","height","16px"],[1,"relative","w-[440px]","flex-shrink-0","overflow-hidden"],["muted","","playsinline","","loop","","preload","auto",1,"absolute","inset-0","h-full","w-full","object-cover",2,"object-position","right center",3,"canplay"],["src","/onboarding/mascot.mp4","type","video/mp4"],[1,"absolute","inset-0","bg-gradient-to-br","from-purple-500/30","via-blue-500/20","to-pink-500/20","transition-opacity"],[1,"absolute","inset-x-0","top-0","h-12","bg-gradient-to-b","from-background","to-transparent"],[1,"absolute","inset-x-0","bottom-0","h-32","bg-gradient-to-t","from-background","to-transparent"],[1,"absolute","inset-y-0","start-0","w-16","bg-gradient-to-r","from-background","to-transparent"],[1,"flex","flex-1","flex-col","overflow-hidden"],[1,"flex","flex-1","flex-col","overflow-hidden",3,"completed"],["src","/onboarding/broom.webm","type","video/webm"],["src","/onboarding/broom.mp4","type","video/mp4"]],template:function(o,r){if(o&1&&(c(0,"div",0)(1,"div",1),E(2,"div",2)(3,"div",3),p(),S(4,N_,41,28,"div",4)(5,F_,11,4,"div",4),p()),o&2){let a;d(4),M((a=r.step())==="welcome"?4:a==="chat"?5:-1)}},dependencies:[ae,pe,Lr,ee],encapsulation:2,changeDetection:0});let n=e;return n})();b();se();re();b();se();function L_(n,e){if(n&1){let i=R();E(0,"div",21),c(1,"video",22),A("canplay",function(o){w(i);let r=h(2);return C(r.onMascotReady(o))})("ended",function(){w(i);let o=h(2);return C(o.welcomePhase.set("content"))})("error",function(){w(i);let o=h(2);return C(o.welcomePhase.set("content"))}),E(2,"source",23),p(),E(3,"div",24)}if(n&2){let i=h(2);d(),ie("opacity-0",!i.mascotCanPlay())}}function R_(n,e){n&1&&E(0,"div",5)}function V_(n,e){if(n&1){let i=R();c(0,"div",4),S(1,L_,4,2),S(2,R_,1,0,"div",5),c(3,"div",6)(4,"div",7)(5,"div",8),E(6,"img",9),p(),c(7,"p",10),E(8,"span",11),f(9),y(10,"transloco"),p(),c(11,"h1",12),f(12),y(13,"transloco"),c(14,"span",13),f(15),y(16,"transloco"),p()(),c(17,"p",14),f(18),y(19,"transloco"),p(),c(20,"div",15)(21,"span",16)(22,"span",17),f(23,"\u2713"),p(),f(24),y(25,"transloco"),p(),c(26,"span",16)(27,"span",17),f(28,"\u2713"),p(),f(29),y(30,"transloco"),p()()(),c(31,"div",18)(32,"button",19),A("click",function(){w(i);let o=h();return C(o.next.emit())}),f(33),y(34,"transloco"),c(35,"mat-icon",20),f(36,"arrow_forward"),p()()()()()}if(n&2){let i=h();d(),M(i.welcomePhase()==="video"?1:-1),d(),M(i.welcomePhase()==="content"?2:-1),d(),ie("opacity-0",i.welcomePhase()==="video")("pointer-events-none",i.welcomePhase()==="video"),d(6),V(" ",v(10,13,"onboarding.welcome.eyebrow")," "),d(3),V(" ",v(13,15,"onboarding.welcome.titleLead")," "),d(3),T(v(16,17,"onboarding.welcome.titleAccent")),d(3),V(" ",v(19,19,"onboarding.welcome.description")," "),d(6),V(" ",v(25,21,"onboarding.welcome.badgeTools")," "),d(5),V(" ",v(30,23,"onboarding.welcome.badgeInstant")," "),d(4),V(" ",v(34,25,"onboarding.welcome.cta")," ")}}function z_(n,e){if(n&1){let i=R();c(0,"div",4)(1,"app-onboarding-chat",25),A("completed",function(o){w(i);let r=h();return C(r.chatCompleted.emit(o))}),p()()}}function B_(n,e){if(n&1){let i=R();c(0,"div",4)(1,"video",22),A("canplay",function(o){w(i);let r=h();return C(r.onOutroReady(o))})("ended",function(){w(i);let o=h();return C(o.outroEnded.emit())})("error",function(){w(i);let o=h();return C(o.outroEnded.emit())}
3),E(2,"source",26)(3,"source",27),p(),E(4,"div",24)(5,"div",28),p()}if(n&2){let i=h();d(),ie("opacity-0",!i.outroCanPlay()),d(4),ie("opacity-0",i.outroCanPlay())}}var Lm=(()=>{let e=class e{constructor(){this.step=Jt.required(),this.next=_t(),this.chatCompleted=_t(),this.outroEnded=_t(),this.welcomePhase=X("video"),this.mascotCanPlay=X(!1),this.outroCanPlay=X(!1),this.videoFallbackTimer=null,this.outroFallbackTimer=null,Qt(()=>{this.step()==="welcome"&&(this.welcomePhase.set("video"),this.mascotCanPlay.set(!1),this.videoFallbackTimer=setTimeout(()=>{this.mascotCanPlay()||this.welcomePhase.set("content")},3e3)),this.step()==="outro"&&(this.outroCanPlay.set(!1),this.outroFallbackTimer=setTimeout(()=>{this.outroEnded.emit()},11e3))})}ngOnDestroy(){this.videoFallbackTimer!==null&&clearTimeout(this.videoFallbackTimer),this.outroFallbackTimer!==null&&clearTimeout(this.outroFallbackTimer)}onMascotReady(t){let o=t.target;this.mascotCanPlay.set(!0),o.play().catch(()=>this.welcomePhase.set("content"))}onOutroReady(t){let o=t.target;this.outroCanPlay.set(!0),o.play().catch(()=>this.outroEnded.emit())}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-onboarding-mobile"]],inputs:{step:[1,"step"]},outputs:{next:"next",chatCompleted:"chatCompleted",outroEnded:"outroEnded"},decls:7,vars:1,consts:[[1,"relative","flex","h-full","flex-col","overflow-hidden","bg-background","text-text-primary",2,"padding-bottom","var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))"],[1,"pointer-events-none","absolute","inset-0","overflow-hidden"],[1,"bg-purple-500/12","absolute","-end-16","-top-16","h-64","w-64","rounded-full","blur-3xl"],[1,"bg-blue-500/12","absolute","-bottom-16","-start-16","h-64","w-64","rounded-full","blur-3xl"],[1,"relative","flex","flex-1","flex-col","overflow-hidden"],[1,"absolute","inset-0","bg-gradient-to-br","from-purple-500/20","via-blue-500/10","to-pink-500/20"],[1,"pt-safe","relative","flex","flex-1","flex-col","px-6","transition-opacity"],["data-testid","onboarding-safe-content",1,"flex","flex-1","flex-col","justify-center"],[1,"mb-5"],["src","/images/logo/logo.webp","alt","Photomize",1,"h-9","w-auto"],[1,"mb-3","flex","items-center","gap-2","text-[10px]","font-semibold","uppercase","tracking-widest","text-text-muted"],[1,"block","h-px","w-5","bg-gradient-to-r","from-blue-500","to-purple-500"],[1,"text-[28px]","font-extrabold","leading-tight","text-text-primary"],[1,"bg-gradient-to-r","from-blue-500","via-purple-500","to-pink-500","bg-clip-text","text-transparent"],[1,"mt-4","text-sm","leading-relaxed","text-text-secondary"],[1,"mt-5","flex","flex-wrap","gap-2"],[1,"flex","items-center","gap-1.5","rounded-full","border","border-border","px-3","py-1","text-xs","text-text-secondary"],[1,"text-green-400"],[1,"flex-shrink-0","pb-3","pt-5"],[1,"flex","w-full","items-center","justify-center","gap-2","rounded-2xl","bg-gradient-to-r","from-blue-500","via-purple-500","to-pink-500","py-4","text-base","font-bold","text-white","shadow-lg","shadow-purple-500/25","transition-all","active:scale-[0.98]",3,"click"],[1,"rtl-flip",2,"font-size","18px","width","18px","height","18px"],[1,"absolute","inset-0","bg-gradient-to-br","from-purple-500/30","via-blue-500/20","to-pink-500/20"],["autoplay","","muted","","playsinline","","preload","auto",1,"absolute","inset-0","h-full","w-full","object-cover",3,"canplay","ended","error"],["src","/onboarding/mascot.mp4","type","video/mp4"],[1,"absolute","inset-0","bg-gradient-to-t","from-black/60","via-transparent","to-black/20"],[1,"flex","flex-1","flex-col","overflow-hidden",3,"completed"],["src","/onboarding/broom.webm","type","video/webm"],["src","/onboarding/broom.mp4","type","video/mp4"],[1,"absolute","inset-0","bg-gradient-to-br","from-purple-500/30","via-blue-500/20","to-pink-500/20","transition-opacity"]],template:function(o,r){if(o&1&&(c(0,"div",0)(1,"div",1),E(2,"div",2)(3,"div",3),p(),S(4,V_,37,27,"div",4)(5,z_,2,0,"div",4)(6,B_,6,4,"div",4),p()),o&2){let a;d(4),M((a=r.step())==="welcome"?4:a==="chat"?5:a==="outro"?6:-1)}},dependencies:[ae,pe,Lr,ee],encapsulation:2,changeDetection:0});let n=e;return n})();b();function U_(n,e){if(n&1){let i=R();c(0,"div",0)(1,"div",2)(2,"app-onboarding-desktop",3),A("next",function(){w(i);let o=h(2);return C(o.nextStep())})("chatCompleted",function(o){w(i);let r=h(2);return C(r.onChatCompleted(o))}),p()()()}if(n&2){let i=h(2);d(2),Z("step",i.step())}}function $_(n,e){if(n&1){let i=R();c(0,"div",1)(1,"app-onboarding-mobile",4),A("next",function(){w(i);let o=h(2);return C(o.nextStep())})("chatCompleted",function(o){w(i);let r=h(2);return C(r.onChatCompleted(o))})("outroEnded",function(){w(i);let o=h(2);return C(o.onOutroEnded())}),p()()}if(n&2){let i=h(2);d(),Z("step",i.step())}}function q_(n,e){if(n&1&&S(0,U_,3,1,"div",0)(1,$_,2,1,"div",1),n&2){let i=h();M(i.isDesktop()?0:1)}}var Rm=(()=>{let e=class e{constructor(){this.guidedCreator=u(At),this.isOpen=Jt.required(),this.closed=_t(),this.platform=u(De),this.doc=u(Lt),this.userService=u(lt),this.analytics=u(Ze),this.isDesktop=this.platform.isDesktop,this.step=X("welcome"),this.pendingResult=null,this.preloadLinks=[],this.finalized=!1,Qt(()=>{this.isOpen()&&(this.step.set("welcome"),this.pendingResult=null,this.finalized=!1,this.preloadVideos(),this.analytics.trackOnboardingStarted())})}nextStep(){let t=["welcome","chat"],o=["welcome","chat","outro"],r=this.isDesktop()?t:o,a=r.indexOf(this.step());a<r.length-1&&this.step.set(r[a+1])}onChatCompleted(t){this.pendingResult=t,this.analytics.trackOnboardingCompleted({segment:t.segment??null,persona:t.persona??null,frequency:t.frequency??null,marketing_consent:t.marketingConsent??null}),this.isDesktop()?this.saveAndClose(t):this.nextStep()}onOutroEnded(){this.pendingResult?this.saveAndClose(this.pendingResult):this.finalize()}saveAndClose(t){this.userService.saveOnboardingDetails(t).subscribe({error:()=>{}}),this.finalize()}finalize(){this.finalized||(this.finalized=!0,localStorage.setItem("welcome_shown","true"),this.userService.markWelcomeShown().subscribe({error:()=>{}}
3),this.closed.emit(),setTimeout(()=>this.guidedCreator.open(),400))}ngOnDestroy(){this.preloadLinks.forEach(t=>t.remove())}preloadVideos(){["/onboarding/mascot.mp4","/onboarding/broom.mp4"].forEach(o=>{if(this.preloadLinks.some(a=>a.getAttribute("href")===o))return;let r=this.doc.createElement("link");r.rel="preload",r.setAttribute("as","video"),r.setAttribute("href",o),this.doc.head.appendChild(r),this.preloadLinks.push(r)})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-onboarding-dialog"]],inputs:{isOpen:[1,"isOpen"]},outputs:{closed:"closed"},decls:1,vars:1,consts:[[1,"fixed","inset-0","z-[9999]","flex","items-center","justify-center","bg-black/70","backdrop-blur-sm"],[1,"fixed","inset-0","z-[9999]","overflow-hidden","bg-background"],[1,"relative","h-[88vh]","max-h-[900px]","w-[80vw]","max-w-[1200px]","overflow-hidden","rounded-2xl","bg-background"],[3,"next","chatCompleted","step"],[3,"next","chatCompleted","outroEnded","step"]],template:function(o,r){o&1&&S(0,q_,2,1),o&2&&M(r.isOpen()?0:-1)},dependencies:[Fm,Lm],encapsulation:2,changeDetection:0});let n=e;return n})();yt();ve();Se();b();var Vm=(()=>{let e=class e{constructor(){this._unsubscribeAll=new Et}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["empty-layout"]],decls:3,vars:0,consts:[[1,"flex","w-full","flex-auto","flex-col"],[1,"flex","flex-auto","flex-col"]],template:function(o,r){o&1&&(c(0,"div",0)(1,"div",1),E(2,"router-outlet"),p()())},dependencies:[Xt],encapsulation:2});let n=e;return n})();Pe();b();se();ve();re();Se();zt();Pe();b();se();ve();re();Ot();On();Yi();Uo();b();Pe();se();ve();re();yt();b();var Bm=(n,e)=>e.id;function j_(n,e){n&1&&E(0,"span",2)}function W_(n,e){n&1&&(fe(),c(0,"svg",15),E(1,"path",18)(2,"path",19)(3,"path",20)(4,"path",21)(5,"path",22)(6,"circle",23)(7,"path",24)(8,"path",25)(9,"path",26)(10,"path",27),p())}function H_(n,e){n&1&&(fe(),E(0,"path",28))}function G_(n,e){n&1&&(fe(),E(0,"path",29))}function K_(n,e){n&1&&(fe(),E(0,"path",30))}function Y_(n,e){n&1&&(fe(),E(0,"path",31))}function Z_(n,e){n&1&&(fe(),E(0,"path",32))}function Q_(n,e){n&1&&(fe(),E(0,"path",33))}function J_(n,e){n&1&&(fe(),E(0,"path",34))}function X_(n,e){if(n&1&&(fe(),c(0,"svg",16),S(1,H_,1,0,":svg:path",28)(2,G_,1,0,":svg:path",29)(3,K_,1,0,":svg:path",30)(4,Y_,1,0,":svg:path",31)(5,Z_,1,0,":svg:path",32)(6,Q_,1,0,":svg:path",33)(7,J_,1,0,":svg:path",34),p()),n&2){let i,t=h().$implicit;d(),M((i=t.icon)==="photo_camera"?1:i==="videocam"?2:i==="psychology"?3:i==="smart_toy"?4:i==="analytics"?5:i==="mic"?6:i==="music_note"?7:-1)}}function e1(n,e){if(n&1){let i=R();c(0,"button",13),y(1,"transloco"),A("click",function(){let o=w(i).$implicit,r=h(2);return C(r.navigateToApp(o))}),c(2,"div",14),S(3,W_,11,0,":svg:svg",15)(4,X_,8,1,":svg:svg",16),p(),c(5,"span",17),f(6),y(7,"transloco"),p()()}if(n&2){let i=e.$implicit;Z("matTooltip",v(1,5,i.name)),d(2),xe("background",i.color||"#4285F4"),d(),M(i.icon==="banana"?3:4),d(3),V(" ",v(7,7,i.name)," ")}}function t1(n,e){if(n&1&&(c(0,"div",11)(1,"div"),_e(2,e1,8,9,"button",12,Bm),p()()),n&2){let i=h();d(),Ae(i.gridClasses()),d(),ye(i.availableApps())}}function i1(n,e){n&1&&(fe(),c(0,"svg",44),E(1,"path",18)(2,"path",19)(3,"path",20)(4,"path",21)(5,"path",22)(6,"circle",23)(7,"path",24)(8,"path",25)(9,"path",26)(10,"path",27),p())}function n1(n,e){n&1&&(fe(),E(0,"path",28))}function o1(n,e){n&1&&(fe(),E(0,"path",29))}function r1(n,e){n&1&&(fe(),E(0,"path",30))}function a1(n,e){n&1&&(fe(),E(0,"path",31))}function s1(n,e){n&1&&(fe(),E(0,"path",32))}function l1(n,e){n&1&&(fe(),E(0,"path",33))}function c1(n,e){if(n&1&&(fe(),c(0,"svg",16),S(1,n1,1,0,":svg:path",28)(2,o1,1,0,":svg:path",29)(3,r1,1,0,":svg:path",30)(4,a1,1,0,":svg:path",31)(5,s1,1,0,":svg:path",32)(6,l1,1,0,":svg:path",33),p()),n&2){let i,t=h().$implicit;d(),M((i=t.icon)==="photo_camera"?1:i==="videocam"?2:i==="psychology"?3:i==="smart_toy"?4:i==="analytics"?5:i==="mic"?6:-1)}}function d1(n,e){if(n&1&&(c(0,"div",43),y(1,"transloco"),c(2,"div",14),S(3,i1,11,0,":svg:svg",44)(4,c1,7,1,":svg:svg",16),p(),c(5,"span",45),f(6),y(7,"transloco"),p()()),n&2){let i=e.$implicit;Z("matTooltip",v(1,5,"multiApps.comingSoonTooltip")),d(2),xe("background",i.color||"#4285F4"),d(),M(i.icon==="banana"?3:4),d(3),V(" ",v(7,7,i.name)," ")}}function u1(n,e){if(n&1&&(c(0,"div",35),E(1,"div",36),p(),c(2,"div",37)(3,"div",38),fe(),c(4,"svg",39),E(5,"path",40),p(),Ht(),c(6,"h4",41),f(7),y(8,"transloco"),p()()(),c(9,"div",42)(10,"div"),_e(11,d1,8,9,"div",43,Bm),p()()),n&2){let i=h();d(7),V(" ",v(8,3,"multiApps.comingSoon")," "),d(3),Ae(i.gridClasses()),d(),ye(i.comingSoonApps())}}var Is=(()=>{let e=class e{constructor(){this.translocoService=u(Q),this.router=u(G),this.miniAppConfigService=u(Ee),this.isMenuOpen=!1,this.menuHintSeen=X(typeof localStorage<"u"&&localStorage.getItem("menu_hint_seen")==="true"),this.availableApps=I(()=>this.miniAppConfigService.getAvailableApps()),this.comingSoonApps=I(()=>this.miniAppConfigService.getComingSoonApps()),this.buttonClasse
3s=I(()=>{let t="relative flex items-center gap-1.5 px-2.5 py-2 rounded-lg transition-all focus:outline-none bg-gradient-to-r from-blue-500/10 via-purple-500/10 to-pink-500/10 ring-1 ring-purple-500/30 sm:bg-none sm:ring-0 sm:p-2 sm:hover:bg-hover";return this.menuHintSeen()?t:`${t} animate-pulse`})}openMenu(){this.trigger?.openMenu()}onMenuOpened(){this.isMenuOpen=!0,this.menuHintSeen()||(this.menuHintSeen.set(!0),localStorage.setItem("menu_hint_seen","true"))}menuClasses(){return"w-[360px] max-w-[calc(100vw-2rem)]"}gridClasses(){return"grid grid-cols-3 gap-1"}navigateToApp(t){this.miniAppConfigService.isAppAvailable(t.id)&&(t.id==="inspire"?this.router.navigate(["/",this.translocoService.getActiveLang(),"inspire","image-generator"]):this.router.navigate(["/",this.translocoService.getActiveLang(),"studio",t.id]))}viewAllApps(){this.router.navigate(["/",this.translocoService.getActiveLang(),"studio"])}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-multi-apps-menu"]],viewQuery:function(o,r){if(o&1&&Kt(li,5),o&2){let a;Yt(a=Zt())&&(r.trigger=a.first)}},decls:18,vars:17,consts:[["appsMenu","matMenu"],[1,"relative"],[1,"pointer-events-none","absolute","inset-0","rounded-lg","animate-pulse","bg-purple-500/20"],["data-testid","multi-apps-menu-trigger",3,"menuOpened","menuClosed","matMenuTriggerFor","matTooltip"],["fill","white","viewBox","0 0 24 24",1,"w-5","h-5","shrink-0"],["d","M6,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM16,6c0,1.1 0.9,2 2,2s2,-0.9 2,-2 -0.9,-2 -2,-2 -2,0.9 -2,2zM12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z"],[1,"sm:hidden","bg-gradient-to-r","from-blue-400","via-purple-400","to-pink-400","bg-clip-text","text-[11px]","font-semibold","text-transparent","whitespace-nowrap"],["xPosition","before","yPosition","below",1,"multi-apps-menu"],[1,"bg-background","rounded-lg","shadow-lg","border","border-border","font-sans",3,"click"],[1,"px-4","py-3","border-b","border-border"],[1,"text-xs","font-semibold","uppercase","tracking-wider","text-center","font-sans"],[1,"p-4"],[1,"group","relative","flex","flex-col","items-center","justify-start","pt-2","p-2","rounded-lg","transition-all","duration-200","hover:bg-surface","hover:scale-105","focus:bg-surface","focus:outline-none","focus:ring-2","focus:ring-primary/20","font-sans",3,"matTooltip"],[1,"group","relative","flex","flex-col","items-center","justify-start","pt-2","p-2","rounded-lg","transition-all","duration-200","hover:bg-surface","hover:scale-105","focus:bg-surface","focus:outline-none","focus:ring-2","focus:ring-primary/20","font-sans",3,"click","matTooltip"],[1,"w-9","h-9","rounded-full","flex","items-center","justify-center","mb-1.5","shrink-0"],["viewBox","0 0 36 36","xmlns","http://www.w3.org/2000/svg",1,"w-4","h-4"],["fill","currentColor","viewBox","0 0 24 24",1,"w-4","h-4","text-white"],[1,"font-medium","text-center","leading-tight","max-w-full","text-xs","font-sans"],["fill","#FFE8B6","d","M28 2c2.684-1.342 5 4 3 13-1.106 4.977-5 9-9 12s-11-1-7-5 8-7 10-13c1.304-3.912 1-6 3-7z"],["fill","#FFD983","d","M31 8c0 3-1 9-4 13s-7 5-4 1 5-7 6-11 2-7 2-3z"],["fill","#FFCC4D","d","M22 20c-.296.592 1.167-3.833-3-6-1.984-1.032-10 1-4 1 3 0 4 2 2 4-.291.292-.489.603-.622.912-.417.346-.873.709-1.378 1.088-2.263 1.697-5.84 4.227-10 7-3 2-4 3-4 4 0 3 9 3 14 1s10-7 10-7l4-4c-3-4-7-2-7-2z"],["fill","#FFE8B6","d","M22 20s1.792-4.729-3-7c-4.042-1.916-8-1-11 1s-2 4-3 5 1 2 3 0 8.316-4.895 11-4c3 1 2 2.999 3 5z"],["fill","#A6D388","d","M26 35h-4c-2 0-3 1-4 1s-2-2 0-2 4 0 5-1 5 2 3 2z"],["fill","#3E721D","cx","18","cy","35","r","1"],["fill","#FFCC4D","d","M32.208 28S28 35 26 35h-4c-2 0 0-1 1-2s5 0 5-6c0-3 4.208 1 4.208 1z"],["fill","#FFE8B6","d","M26 19c3 0 8 3 7 9s-5 7-7 7h-2c-2 0-1-1 0-2s4 0 4-6c0-3-4-7-6-7 0 0 2-1 4-1z"],["fill","#FFD983","d","M17 21c3 0 5 1 3 3-1.581 1.581-6 5-10 6s-8 1-5-1 9.764-8 
312-8z"],["fill","#C1694F","d","M2 31c1 0 1 0 1 .667C3 32.333 3 33 2 33s-1-1.333-1-1.333S1 31 2 31z"],["d","M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 13c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.65 0-3 1.35-3 3s1.35 3 3 3 3-1.35 3-3-1.35-3-3-3z"],["d","M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"],["d","M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43zM13 3C9.25 3 6.2 5.94 6.02 9.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v3h7v-4.68c1.79-1.01 3-2.93 3-5.12C19 6.13 16.35 3 13 3zm0 14h-2v-2H8v-2.79l-.2-.26-.01-.01-.99-1.29C6.93 10.46 7 10.23 7 10c0-2.76 2.24-5 5-5 2.09 0 4 1.28 4.73 3.2.23.6.27 1.21.27 1.8 0 1.67-.83 3.14-2 4.07V17z"],["d","M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3zm-2 10H6V7h12v12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13zm6 0c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13zm-3 3c-1.48 0-2.75-.81-3.45-2h6.9c-.7 1.19-1.97 2-3.45 2z"],["d","M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"],["d","M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.49 6-3.31 6-6.72h-1.7z"],["d","M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"],[1,"px-4"],[1,"border-t","border-border"],[1,"px-4","py-3"],[1,"flex","items-center","gap-2"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4",2,"color","var(--brand-primary)"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"],[1,"text-xs","font-semibold","uppercase","tracking-wider","font-sans","text-text-secondary"],[1,"px-4","pb-4"],[1,"group","relative","flex","flex-col","items-center","justify-start","pt-2","p-2","rounded-lg","transition-all","duration-200","opacity-60","cursor-not-allowed","font-sans",3,"matTooltip"],["viewBox","0 0 36 36","xmlns","http://www.w3.org/2000/svg",1,"w-5","h-5","grayscale"],[1,"font-medium","text-center","leading-tight","max-w-full","text-xs","font-sans","text-muted-foreground"]],template:function(o,r){if(o&1){let a=R();c(0,"div",1),S(1,j_,1,0,"span",2),c(2,"button",3),y(3,"transloco"),A("menuOpened",function(){return w(a),C(r.onMenuOpened())})("menuClosed",function(){return w(a),C(r.isMenuOpen=!1)}),fe(),c(4,"svg",4),E(5,"path",5),p(),Ht(),c(6,"span",6),f(7),y(8,"transloco"),p()()(),c(9,"mat-menu",7,0)(11,"div",8),A("click",function(l){return w(a),C(l.stopPropagation())}),c(12,"div",9)(13,"h3",10),f(14),y(15,"transloco"),p()(),S(16,t1,4,2,"div",11),S(17,u1,13,5),p()()}if(o&2){let a=Si(10);d(),M(r.menuHintSeen()?-1:1),d(),Ae(r.buttonClasses()),Z("matMenuTriggerFor",a)("matTooltip",v(3,11,"multiApps.tooltip")),d(5),V(" ",v(8,13,"multiApps.switchHint")," "),d(4),Ae(r.menuClasses()),d(3),V(" ",v(15,15,"multiApps.title")," "),d(2),M(r.availableApps().length>0?16:-1),d(),M(r.comingSoonApps().length>0?17:-1)}},dependencies:[ke,ae,Xi,Ji,li,Vd,Rd,ee],encapsulation:2});let n=e;return n})();yt();b();Pe();se();Mi();re();yt();b();Pe();Mi();se();ve();re();yt();b();se();var Um=(n,e)=>e.id;function p1(n,e){n&1&&(fe(),c(0,"svg",13),E(1,"path",19)(2,"path",20)(3,"path",21)(4,"path",22)(5,"path",23)(6,"circle",24)(7,"path",25)(8,"path",26)(9,"path",27)(10,"path",28),p())}function m1(n,e){if(n&1&&(c(0,"mat-icon"),f(1),p()),n&2){let i=h();xe("color",i.color),d(),T(i.icon||"auto_fix_high")}}function f1(n,e){if(n&1&&(c(0,"div",8),f(1),y(2,"transloco"),p(),c(3,"div",11)(4,"span",12),S(5,p1,11,0,":svg:svg",13)(6,m1,2,3,"mat-icon",14),p(),c(7,"div",15)(8,"div",16),f(9),y(10,"transloco"),p(),c(11,"div",17),f(12),y(13,"transloco"),p()(),E(14,"span",18),p()),n&2){let i=e,t=h();d(),T(v(2,6,"miniAppSwitcher.activeApp")),d(3),xe("background",t.hex(i.color,.18)),d(),M(i.icon==="banana"?5:6),d(4),T(v(10,8,i.name)),d(3),T(v(13,10,"miniAppSwitcher.openNow"))}}function h1(n,e){if(n&1){let i=R();c(0,"button",31),A("click",function(){let o=w(i).$implicit,r=h(2);return C(r.goToSection(o))}),c(1,"span",32)(2,"mat-icon"),f(3),p()(),c(4,"span",33),f(5),y(6,"transloco"),p()()}if(n&2){let i=e.$implicit,t=h(),o=h();d(),xe("background",o.hex(t.color,.18)),d(),xe("color",t.color),d(),T(i.icon),d(2),T(v(6,6,i.title))}}function g1(n,e){if(n&1&&(c(0,"div",8),f(1),y(2,"transloco"),y(3,"transloco"),p(),c(4,"div",29),_e(5,h1,7,8,"button",30,Um),p()),n&2){let i=h();d(),ko(" ",v(2,2,"miniAppSwitcher.sections")," \xB7 ",v(3,4,e.name)," "),d(4),ye(i.sections())}}function _1(n,e){n&1&&(fe(),c(0,"svg",36),E(1,"path",19)(2,"path",20)(3,"path",21)(4,"path",22)(5,"path",23)(6,"circle",24)(7,"path",25)(8,"path",26)(9,"path",27)(10,"path",28),p())}function y1(n,e){if(n&1&&(c(0,"mat-icon"),f(1),p()),n&2){let i=h().$implicit;xe("color",i.color),d(),T(i.icon||"auto_fix_high")}}function v1(n,e){if(n&1){let i=R();c(0,"button",34),A("click",function(){let o=w(i).$implicit,r=h();return C(r.goToApp(o))}),c(1,"span",35),S(2,_1,11,0,":svg:svg",36)(3,y1,2,3,"mat-icon",14),p(),c(4,"span",37),f(5),y(6,"transloco"),p()()}if(n&2){let i,t,o=e.$implicit,r=h();ie("msw-app--active",o.id===((i=r.currentApp())==null?null:i.id)),d(),xe("background",r.hex(o.color,.18))("box-shadow",o.id===((t=r.currentApp())==null?null:t.id)?"inset 0 0 0 2px "+o.color:"none"),d(),M(o.icon==="banana"?2:3),d(3),T(v(6,8,o.name))}}var b1=(()=>{let e=class e{constructor(){this.guidedCreator=u(At),this.dialogRef=u(ii),this.appConfigService=u(Ee),this.router=u(G),this.transloco=u(Q),this.DEFAULT_COLOR="#c084fc",this.currentApp=I(()=>{let t=this.appConfigService.getCurrentConfig()();return!t||t.id==="home"?null:t}),this.sections=I(()=>this.currentApp()?.mobileNavigation??[]),this.allApps=I(()=>this.appConfigService.getAvailableApps().filter(t=>t.id!=="home"&&t.id!=="inspire"))}openGuidedCreator(){this.dialogRef?.close(),this.guidedCreator.open()}hex(t,o){let r=t??this.DEFAULT_COLOR,a=Math.round(o*255).toString(16).padStart(2,"0");return`${r}${a}`}goToApp(t){let o=this.transloco.getActiveLang(),r=t.mobileNavigation[0]?.route,a=r?this.resolveRoute(t.id,r,o):`/${o}/studio/${t.id}`;this.router.navigateByUrl(a),this.dialogRef.close()}goToSection(t){if(!t.route)return;let o=this.transloco.getActiveLang(),r=this.currentApp(),a=this.resolveRoute(r?.id??"",t.route,o);this.router.navigateByUrl(a),this.dialogRef.close()}resolveRoute(t,o,r){return o.startsWith("./")?`/${r}/studio/${o.slice(2)}`:o.startsWith("/studio/")?`/${r}${o}`:o.startsWith("/")?`/${r}${o}`:o}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-mini-app-switcher-sheet"]],decls:23,vars:11,consts:[[1,"msw"],[1,"msw-handle"],["type","button","data-testid","switcher-guided-creator",1,"msw-guided",3,"click"],[1,"msw-guided-icon"],[1,"msw-guided-text"],[1,"msw-guided-title"],[1,"msw-guided-sub"],[1,"msw-guided-chevron","rtl-flip"],[1,"msw-eyebrow"],[1,"msw-grid","msw-grid--3"],[1,"msw-app",3,"msw-app--active"],[1,"msw-active-card"],[1,"msw-active-icon"],["width","22","height","22","viewBox","0 0 36 36","xmlns","http://www.w3.org/2000/svg"],[3,"color"],[1,"msw-active-meta"],[1,"msw-active-name"],[1,"msw-active-sub"],[1,"msw-status-dot"],["fill","#FFE8B6","d","M28 2c2.684-1.342 5 4 3 13-1.106 4.977-5 9-9 12s-11-1-7-5 8-7 10-13c1.304-3.912 1-6 3-7z"],["fill","#FFD983","d","M31 8c0 3-1 9-4 13s-7 5-4 1 5-7 6-11 2-7 2-3z"],["fill","#FFCC4D","d","M22 20c-.296.592 1.167-3.833-3-6-1.984-1.032-10 1-4 1 3 0 4 2 2 4-.291.292-.489.603-.622.912-.417.346-.873.709-1.378 1.088-2.263 1.697-5.84 4.227-10 7-3 2-4 3-4 4 0 3 9 3 14 1s10-7 10-7l4-4c-3-4-7-2-7-2z"],["fill","#FFE8B6","d","M22 20s1.792-4.729-3-7c-4.042-1.916-8-1-11 1s-2 4-3 5 1 2 3 0 8.316-4.895 11-4c3 1 2 2.999 3 5z"],["fill","#A6D388","d","M26 35h-4c-2 0-3 1-4 1s-2-2 0-2 4 0 5-1 5 2 3 2z"],["fill","#3E721D","cx","18","cy","35","r","1"],["fill","#FFCC4D","d","M32.208 28S28 35 26 35h-4c-2 0 0-1 1-2s5 0 5-6c0-3 4.208 1 4.208 1z"],["fill","#FFE8B6","d","M26 19c3 0 8 3 7 9s-5 7-7 7h-2c-2 0-1-1 0-2s4 0 4-6c0-3-4-7-6-7 0 0 2-1 4-1z"],["fill","#FFD983","d","M17 21c3 0 5 1 3 3-1.581 1.581-6 5-10 6s-8 1-5-1 9.764-8 
312-8z"],["fill","#C1694F","d","M2 31c1 0 1 0 1 .667C3 32.333 3 33 2 33s-1-1.333-1-1.333S1 31 2 31z"],[1,"msw-grid","msw-grid--2"],[1,"msw-section"],[1,"msw-section",3,"click"],[1,"msw-section-icon"],[1,"msw-section-label"],[1,"msw-app",3,"click"],[1,"msw-app-icon"],["width","20","height","20","viewBox","0 0 36 36","xmlns","http://www.w3.org/2000/svg"],[1,"msw-app-name"]],template:function(o,r){if(o&1&&(c(0,"div",0),E(1,"div",1),S(2,f1,15,12),c(3,"button",2),A("click",function(){return r.openGuidedCreator()}),c(4,"span",3)(5,"mat-icon"),f(6,"flag"),p()(),c(7,"span",4)(8,"span",5),f(9),y(10,"transloco"),p(),c(11,"span",6),f(12),y(13,"transloco"),p()(),c(14,"mat-icon",7),f(15,"chevron_right"),p()(),S(16,g1,7,6),c(17,"div",8),f(18),y(19,"transloco"),p(),c(20,"div",9),_e(21,v1,7,10,"button",10,Um),p()()),o&2){let a,s;d(2),M((a=r.currentApp())?2:-1,a),d(7),V(" ",v(10,5,"guidedCreator.entry.title")," "),d(3),V(" ",v(13,7,"guidedCreator.entry.subtitle")," "),d(4),M((s=r.sections().length>0&&r.currentApp())?16:-1,s),d(2),T(v(19,9,"miniAppSwitcher.switchApp")),d(3),ye(r.allApps())}},dependencies:[ke,Hi,ae,pe,ee],styles:["[_nghost-%COMP%]{display:block;background:var(--color-surface);border-radius:24px 24px 0 0;color:var(--color-text-primary);font-family:inherit;padding:0 18px calc(26px + env(safe-area-inset-bottom,0px));max-height:88vh;overflow-y:auto}.msw-handle[_ngcontent-%COMP%]{width:40px;height:4px;border-radius:999px;background:var(--color-border);margin:10px auto 18px}.msw-guided[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;width:100%;margin-bottom:18px;padding:12px 14px;border-radius:16px;border:1px solid var(--color-primary-surface-border);background:color-mix(in srgb,var(--brand-primary) 8%,var(--color-surface-elevated));color:var(--color-text-primary);text-align:start;cursor:pointer;font-family:inherit}.msw-guided-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:38px;height:38px;border-radius:12px;background:color-mix(in srgb,var(--brand-primary) 20%,transparent)}.msw-guided-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:var(--brand-primary)}.msw-guided-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.msw-guided-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600}.msw-guided-sub[_ngcontent-%COMP%]{font-size:12px;color:var(--color-text-secondary)}.msw-guided-chevron[_ngcontent-%COMP%]{flex-shrink:0;color:var(--color-text-muted)}.msw-eyebrow[_ngcontent-%COMP%]{font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--color-text-muted);margin:18px 0 8px}.msw-active-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px;background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:14px}.msw-active-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center}.msw-active-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:22px;width:22px;height:22px}.msw-active-meta[_ngcontent-%COMP%]{flex:1;min-width:0}.msw-active-name[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:var(--color-text-primary)}.msw-active-sub[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);margin-top:2px}.msw-status-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:999px;background:#34d399;box-shadow:0 0 0 3px #34d3992e}.msw-grid[_ngcontent-%COMP%]{display:grid;gap:10px}.msw-grid--2[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}.msw-grid--3[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}.msw-section[_ngcontent-%COMP%], .msw-app[_ngcontent-%COMP%]{background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;color:var(--color-text-primary);font-family:inherit;cursor:pointer;transition:background .12s}.msw-section[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.msw-section[_ngcontent-%COMP%]:active, .msw-app[_ngcontent-%COMP%]:active{background:var(--color-hover)}.msw-section-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.msw-section-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.msw-app-icon[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}.msw-app-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.msw-app[_ngcontent-%COMP%]{align-items:center;text-align:center;padding:10px 6px;
3gap:6px}.msw-section-label[_ngcontent-%COMP%]{font-size:12.5px;font-weight:600}.msw-app-name[_ngcontent-%COMP%]{font-size:11px;font-weight:500;color:var(--color-text-secondary)}.msw-app--active[_ngcontent-%COMP%]   .msw-app-name[_ngcontent-%COMP%]{color:var(--color-text-primary)}"],changeDetection:0});let n=e;return n})();function Rr(n){return n.open(b1,{panelClass:"mini-app-sheet-panel",backdropClass:"mini-app-sheet-backdrop",width:"100vw",maxWidth:"100vw",position:{bottom:"0"},autoFocus:!1})}b();se();function x1(n,e){n&1&&(fe(),c(0,"svg",2),E(1,"path",6)(2,"path",7)(3,"path",8)(4,"path",9)(5,"path",10)(6,"circle",11)(7,"path",12)(8,"path",13)(9,"path",14)(10,"path",15),p())}function w1(n,e){if(n&1&&(c(0,"mat-icon"),f(1),p()),n&2){let i=h();xe("color",i.color),d(),T(i.icon||"auto_fix_high")}}function C1(n,e){if(n&1&&(c(0,"span",1),S(1,x1,11,0,":svg:svg",2)(2,w1,2,3,"mat-icon",3),p(),c(3,"span",4),f(4),y(5,"transloco"),p(),c(6,"mat-icon",5),f(7,"expand_more"),p()),n&2){let i=e,t=h();xe("background",t.iconBg(i.color)),d(),M(i.icon==="banana"?1:2),d(3),T(v(5,4,i.name))}}function S1(n,e){n&1&&(c(0,"span",16),f(1,"Photomize AI Studio"),p(),c(2,"mat-icon",5),f(3,"expand_more"),p())}var $m=(()=>{let e=class e{constructor(){this.appConfigService=u(Ee),this.dialog=u(ni),this.app=I(()=>{let t=this.appConfigService.getCurrentConfig()();return!t||t.id==="home"?null:t})}iconBg(t){return`${t??"#c084fc"}22`}open(){Rr(this.dialog)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-mini-app-context-pill"]],decls:3,vars:1,consts:[[1,"ctx-pill",3,"click"],[1,"ctx-icon"],["width","16","height","16","viewBox","0 0 36 36","xmlns","http://www.w3.org/2000/svg"],[3,"color"],[1,"ctx-name"],[1,"ctx-chevron"],["fill","#FFE8B6","d","M28 2c2.684-1.342 5 4 3 13-1.106 4.977-5 9-9 12s-11-1-7-5 8-7 10-13c1.304-3.912 1-6 3-7z"],["fill","#FFD983","d","M31 8c0 3-1 9-4 13s-7 5-4 1 5-7 6-11 2-7 2-3z"],["fill","#FFCC4D","d","M22 20c-.296.592 1.167-3.833-3-6-1.984-1.032-10 1-4 1 3 0 4 2 2 4-.291.292-.489.603-.622.912-.417.346-.873.709-1.378 1.088-2.263 1.697-5.84 4.227-10 7-3 2-4 3-4 4 0 3 9 3 14 1s10-7 10-7l4-4c-3-4-7-2-7-2z"],["fill","#FFE8B6","d","M22 20s1.792-4.729-3-7c-4.042-1.916-8-1-11 1s-2 4-3 5 1 2 3 0 8.316-4.895 11-4c3 1 2 2.999 3 5z"],["fill","#A6D388","d","M26 35h-4c-2 0-3 1-4 1s-2-2 0-2 4 0 5-1 5 2 3 2z"],["fill","#3E721D","cx","18","cy","35","r","1"],["fill","#FFCC4D","d","M32.208 28S28 35 26 35h-4c-2 0 0-1 1-2s5 0 5-6c0-3 4.208 1 4.208 1z"],["fill","#FFE8B6","d","M26 19c3 0 8 3 7 9s-5 7-7 7h-2c-2 0-1-1 0-2s4 0 4-6c0-3-4-7-6-7 0 0 2-1 4-1z"],["fill","#FFD983","d","M17 21c3 0 5 1 3 3-1.581 1.581-6 5-10 6s-8 1-5-1 9.764-8 12-8z"],["fill","#C1694F","d","M2 31c1 0 1 0 1 .667C3 32.333 3 33 2 33s-1-1.333-1-1.333S1 31 2 31z"],[1,"ctx-name","ctx-name--neutral"]],template:function(o,r){if(o&1&&(c(0,"button",0),A("click",function(){return r.open()}),S(1,C1,8,6)(2,S1,4,0),p()),o&2){let a;d(),M((a=r.app())?1:2,a)}},dependencies:[ke,ae,pe,ee],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:inline-flex}.ctx-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;height:38px;padding-block:4px;padding-inline:4px 10px;background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:999px;color:var(--color-text-primary);font-family:inherit;cursor:pointer;transition:background .12s;-webkit-tap-highlight-color:transparent}.ctx-pill[_ngcontent-%COMP%]:active{background:var(--color-hover)}.ctx-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center}.ctx-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.ctx-name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:38vw}.ctx-name--neutral[_ngcontent-%COMP%]{padding-inline-start:10px}.ctx-chevron[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:var(--color-text-secondary)}'],changeDetection:0});let n=e;return n})();b();se();function M1(n,e){n&1&&E(0,"app-mini-app-context-pill")}function T1(n,e){n&1&&E(0,"app-multi-apps-menu")}function k1(n,e){if(n&1&&(c(0,"span",12),f(1),p()),n&2){let i=h(2);d(),V(" ",i.queue.activeCount()," ")}}function E1(n,e){if(n&1&&(c(0,"button",6),y(1,"transloco"),c(2,"mat-icon",11),f(3),p(),S(4,k1,2,1,"span",12),p()),n&2){let i=h(),t=Si(13);Z("title",v(1,6,"generationQueue.tooltip"))("matMenuTriggerFor",t),d(2),ie("animate-spin",i.queue.isAnyActive()),d(),V(" ",i.queue.isAnyActive()?"sync":"inbox"," "),d(),M(i.queue.activeCount()>0?4:-1)}}var qm=(()=>{let e=class e{constructor(){this.platformDetectionService=u(De),this.appConfigService=u(Ee),this.scrollService=u(en),this.router=u(G),this.location=u(yl),this.walletService=u(ri),this.userService=u(lt),this.transloco=u(Q),this.queue=u(Pt),this.tokenBalance=this.walletService.tokenBalance,this.userInitial=I(()=>{let t=this.userService.currentUser?.email??"";return((this.userService.currentUser?.displayName??"").trim()||t).charAt(0).toUpperCase()||"?"}),this.scrolled=I(()=>this.scrollService.isScrolledMoreThanHundredpx()),this.scrollY=I(()=>this.scrollService.scrollPosition()),this.isMobile=I(()=>this.platformDetectionService.isMobileByScreenSize()),this.currentAppConfig=I(()=>this.appConfigService.getCurrentConfig()()),this.scrollDirection=I(()=>this.scrollService.direction()),this.toolbarClasses=I(()=>{let t=this.scrollY(),o=this.scrollDirection(),r=this.scrollService.chromeForcedVisible(),a=this.isMobile()?"fixed top-0 left-0 right-0 z-[1000] transition-all duration-300 ease-out pt-safe":"fixed top-0 left-0 right-0 z-[1000] transition-all duration-300 ease-out";return t<=8&&!r?`${a} bg-transparent transform translate-y-0`:r||t<=100?`${a} header-glass transform translate-y-0`:o==="down"?`${a} bg-background shadow-md transform -translate-y-full`:`${a} bg-background shadow-md transform translate-y-0`})}navigateToWallet(){let t=this.transloco.getActiveLang();this.router.navigate([t,"studio","wallet"])}openUserMenu(){let{MobileUserMenuComponent:t}=(ad(),Cf(Kf));t.open(this.userService.currentUser,()=>{})}goBack(){typeof window<"u"&&window.history.length>1?this.location.back():this.appsMenuRef?.openMenu()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-header"]],viewQuery:function(o,r){if(o&1&&Kt(Is,5),o&2){let a;Yt(a=Zt())&&(r.appsMenuRef=a.first)}}
3,decls:23,vars:12,consts:[["queueMenu","matMenu"],[1,"photographer-header-height","flex","items-center","justify-between","px-4"],[1,"flex","items-center","gap-2"],[1,"rounded-lg","p-2","transition-colors","hover:bg-surface",2,"color","var(--color-text-primary)",3,"click"],[1,"mt-2","rtl-flip"],[1,"flex-1"],[1,"relative","flex","h-8","w-8","items-center","justify-center","rounded-full","transition-colors","hover:bg-black/10",2,"color","var(--color-text-secondary)",3,"title","matMenuTriggerFor"],["xPosition","before",1,"app-generation-queue-menu"],[1,"h-token-pill",3,"click"],[1,"h-token-icon"],[1,"h-avatar",3,"click"],[2,"font-size","20px","width","20px","height","20px"],[1,"absolute","-end-1","-top-1","h-4","min-w-[16px]","rounded-full","bg-brand","px-1","text-[10px]","leading-4","text-white"]],template:function(o,r){if(o&1){let a=R();c(0,"header")(1,"div",1)(2,"div",2)(3,"button",3),y(4,"transloco"),A("click",function(){return w(a),C(r.goBack())}),c(5,"mat-icon",4),f(6,"arrow_back"),p()(),S(7,M1,1,0,"app-mini-app-context-pill")(8,T1,1,0,"app-multi-apps-menu"),p(),E(9,"div",5),c(10,"div",2),S(11,E1,5,8,"button",6),c(12,"mat-menu",7,0),E(14,"app-generation-queue-dropdown"),p(),c(15,"button",8),A("click",function(){return w(a),C(r.navigateToWallet())}),c(16,"mat-icon",9),f(17,"bolt"),p(),c(18,"strong"),f(19),p()(),c(20,"button",10),y(21,"transloco"),A("click",function(){return w(a),C(r.openUserMenu())}),f(22),p()()()()}o&2&&(Ae(r.toolbarClasses()),d(3),de("aria-label",v(4,8,"common.back")),d(4),M(r.isMobile()?7:8),d(4),M(r.isMobile()||r.queue.activeCount()>0?11:-1),d(8),T(r.tokenBalance()),d(),de("aria-label",v(21,10,"common.accountMenu")),d(2),V(" ",r.userInitial()," "))},dependencies:[ke,Od,ae,pe,Xi,Ji,li,Is,$m,Go,ee],styles:[".header-glass[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-background) 88%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.h-token-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 10px;background:var(--color-muted-bg);border:1px solid var(--color-border);border-radius:999px;color:var(--color-text-secondary);font-size:12px;font-family:inherit;cursor:pointer;transition:background .12s}.h-token-pill[_ngcontent-%COMP%]:hover{background:var(--color-hover)}.h-token-pill[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:var(--color-text-primary);font-weight:700;font-size:12px}.h-token-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:#c084fc}.h-token-label[_ngcontent-%COMP%]{font-size:11px;color:#ffffff73}.h-avatar[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,#c084fc,#ec4899);border:none;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff;cursor:pointer;font-family:inherit;flex-shrink:0}"]});let n=e;return n})();b();Pe();Pe();se();Mi();ve();re();Ot();yt();Pe();b();id();Mi();se();re();Se();b();id();se();var O1=n=>({count:n}),P1=(n,e)=>e.sourceId,A1=(n,e)=>e.mediaType;function D1(n,e){if(n&1&&(c(0,"span",16),f(1),y(2,"transloco"),p()),n&2){let i=h();d(),T(v(2,1,i.descriptionKey))}}function I1(n,e){if(n&1){let i=R();c(0,"button",19),A("click",function(){w(i);let o=h(2);return C(o.openModelPicker())}),c(1,"mat-icon"),f(2,"smart_toy"),p(),c(3,"span"),f(4),p(),c(5,"mat-icon",17),f(6,"expand_more"),p()()}if(n&2){let i=h(2);d(4),T(i.selectedModelLabel())}}function N1(n,e){if(n&1){let i=R();c(0,"div",2)(1,"button",12),A("click",function(){w(i);let o=h();return C(o.openAppPicker())}),c(2,"span",13)(3,"mat-icon"),f(4),p()(),c(5,"span",14)(6,"span",15),f(7),y(8,"transloco"),p(),S(9,D1,3,3,"span",16),p(),c(10,"mat-icon",17),f(11,"expand_more"),p()(),S(12,I1,7,1,"button",18),p()}if(n&2){let i=e,t=h();d(2),xe("background",t.hex(i.accent,.15))("color",i.accent),d(2),T(i.icon),d(3),T(v(8,8,i.labelKey)),d(2),M(i.descriptionKey?9:-1),d(3),M(i.models.length>0?12:-1)}}function F1(n,e){if(n&1&&E(0,"img",21),n&2){let i=h().$implicit;Z("src",i.previewUrl,Ui)}}function L1(n,e){if(n&1&&(c(0,"mat-icon",22),f(1),p()),n&2){let i=h().$implicit;d(),V(" ",i.field==="referenceVideo"?"videocam":"music_note"," ")}}function R1(n,e){if(n&1){let i=R();
3c(0,"div",20),S(1,F1,1,1,"img",21)(2,L1,2,1,"mat-icon",22),c(3,"button",23),A("click",function(){let o=w(i).$index,r=h(2);return C(r.removeAttachment(o))}),c(4,"mat-icon"),f(5,"close"),p()()()}if(n&2){let i=e.$implicit;d(),M(i.field==="referenceImage"?1:2)}}function V1(n,e){if(n&1&&(c(0,"div",4),_e(1,R1,6,1,"div",20,P1),p()),n&2){let i=h();d(),ye(i.attachments())}}function z1(n,e){if(n&1){let i=R();c(0,"button",24),A("click",function(){w(i);let o=h();return C(o.openSettings())}),c(1,"mat-icon"),f(2,"tune"),p(),c(3,"span"),f(4),y(5,"transloco"),p()()}n&2&&(d(4),T(v(5,1,"promptSheet.settings")))}function B1(n,e){if(n&1&&(c(0,"span"),f(1),y(2,"transloco"),p()),n&2){let i=h(2);d(),T(Eo(2,1,"composer.attachedCount",$i(4,O1,i.attachments().length)))}}function U1(n,e){n&1&&(c(0,"span"),f(1),y(2,"transloco"),p()),n&2&&(d(),T(v(2,1,"libraryPicker.attach")))}function $1(n,e){if(n&1){let i=R();c(0,"button",28),A("click",function(){let o=w(i).$implicit,r=h(4);return C(r.selectAttachType(o))}),c(1,"mat-icon"),f(2),p(),c(3,"span"),f(4),y(5,"transloco"),p()()}if(n&2){let i=e.$implicit;d(2),T(i.icon),d(2),T(v(5,2,i.labelKey))}}function q1(n,e){if(n&1&&_e(0,$1,6,4,"button",27,A1),n&2){let i=h(3);ye(i.attachmentTypeOptions())}}function j1(n,e){if(n&1){let i=R();c(0,"button",31),A("click",function(){w(i);let o=h(4);return C(o.pickFromCamera())}),c(1,"mat-icon"),f(2,"photo_camera"),p(),c(3,"span"),f(4),y(5,"transloco"),p()()}n&2&&(d(4),T(v(5,1,"libraryPicker.sourceCamera")))}function W1(n,e){if(n&1){let i=R();c(0,"button",28),A("click",function(){w(i);let o=h(3);return C(o.backToAttachTypes())}),c(1,"mat-icon",29),f(2,"arrow_back"),p(),c(3,"span"),f(4),y(5,"transloco"),p()(),c(6,"button",28),A("click",function(){w(i);let o=h(3);return C(o.pickFromDevice())}),c(7,"mat-icon"),f(8,"devices"),p(),c(9,"span"),f(10),y(11,"transloco"),p()(),c(12,"button",28),A("click",function(){w(i);let o=h(3);return C(o.pickFromLibrary())}),c(13,"mat-icon"),f(14,"photo_library"),p(),c(15,"span"),f(16),y(17,"transloco"),p()(),S(18,j1,6,3,"button",30)}if(n&2){let i=h(3);d(4),T(v(5,4,"composer.attachmentType.back")),d(6),T(v(11,6,"libraryPicker.sourceDevice")),d(6),T(v(17,8,"libraryPicker.sourceLibrary")),d(2),M(i.canTakePhoto()?18:-1)}}function H1(n,e){if(n&1&&(c(0,"div",26),S(1,q1,2,0)(2,W1,19,10),p()),n&2){let i=h(2);d(),M(i.selectedAttachType()?2:1)}}function G1(n,e){if(n&1){let i=R();c(0,"div",7)(1,"button",25),A("click",function(){w(i);let o=h();return C(o.toggleAttachSource())}),c(2,"mat-icon"),f(3,"attach_file"),p(),S(4,B1,3,6,"span")(5,U1,3,3,"span"),p(),S(6,H1,3,1,"div",26),p()}if(n&2){let i=h();d(4),M(i.attachments().length>0?4:5),d(2),M(i.showAttachSource()?6:-1)}}function K1(n,e){n&1&&E(0,"pmz-prompt-tips",10),n&2&&Z("context",e)}var Y1=(()=>{let e=class e{constructor(){this.dialogRef=u(ii),this.registry=u(zd),this.submitFlow=u(Ud),this.dialog=u(ni),this.transloco=u(Q),this.attachmentsService=u(bd),this.prompt=X(""),this.selected=X("image-generator"),this.selection=X({values:{},prompt:""}),this.attachments=X([]),this.showAttachSource=X(!1),this.selectedAttachType=X(null),this._inspireMeIndex=0,this.currentApp=I(()=>{let o=this.selected();return this.registry.getApp(o)()}),this.promptTipsContext=I(()=>Md(this.currentApp()?.id)),this.canSubmit=I(()=>this.prompt().trim().length>0),this.attachmentTypeOptions=I(()=>{let o=this.currentApp();return o?this.attachmentsService.typeOptionsForApp(o,this.selection()):[]}),this.showAttach=I(()=>this.attachmentTypeOptions().length>0),this.showSettings=I(()=>{let o=this.currentApp();return o?o.settings.some(r=>!(r.hideWhenSingle&&r.options.length<=1)):!1});let t=this.registry.listEnabledUsecases();t.length>0&&!t.includes(this.selected())&&this.selected.set(t[0]),this.registry.primePhotoEditor()}openAppPicker(){return F(this,null,function*(){let t=this.registry.listEnabledUsecases();if(t.length<=1)return;let o=this.dialog.open(ua,{data:{titleKey:"composer.appRail.label",options:t.map(a=>{let s=this.registry.getApp(a)();return{id:a,label:s?.labelKey?this.transloco.translate(s.labelKey):a,description:s?.descriptionKey?this.transloco.translate(s.descriptionKey):void 0,icon:s?.icon,accent:s?.accent}}),selectedId:this.selected(),layout:"list",searchable:!1},panelClass:"pmz-composer-sheet-panel",width:"min(560px, 100vw)",maxWidth:"100vw",position:{bottom:"0"},autoFocus:!1}),r=yield ue(o.afterClosed());r?.id&&this.selectUsecase(r.id)})}openModelPicker(){return F(this,null,function*(){let t=this.currentApp();if(!t||t.models.length===0)return;let o=this.dialog.open(ua,{data:{titleKey:"composer.dialog.pickModel",options:t.models.map(a=>({id:a.id,label:a.label,description:a.description,thumbnail:a.thumbnail,icon:a.icon,badge:a.badge,emoji:a.emoji,tokenHint:a.tokensPerGeneration})),selectedId:this.selection().modelId,layout:"list",searchable:t.models.length>6},panelClass:"pmz-composer-sheet-panel",width:"min(560px, 100vw)",maxWidth:"100vw",position:{bottom:"0"},autoFocus:!1}),r=yield ue(o.afterClosed());r?.id&&(this.selection.update(a=>te(O({},a),{modelId:r.id})),this.attachments.set([]),this.showAttachSource.set(!1),this.selectedAttachType.set(null))})}selectUsecase(t){this.selected.set(t),this.showAttachSource.set(!1),this.selectedAttachType.set(null),this.attachments.set([]);let o=this.registry.getApp(t)(),r={};if(o)for(let a of o.settings)a.defaultId&&(r[a.field]=a.defaultId);this.selection.set({modelId:o?.models[0]?.id,values:r,prompt:this.prompt()})}openSettings(){return F(this,null,function*(){let t=this.currentApp();if(!t||!t.settings.some(s=>!(s.hideWhenSingle&&s.options.length<=1)))return;let r=this.dialog.open(Bd,{data:{app:t,selection:this.selection()},panelClass:"pmz-composer-sheet-panel",width:"min(560px, 100vw)",maxWidth:"100vw",position:{bottom:"0"},autoFocus:!1}),a=yield ue(r.afterClosed());a&&this.selection.set(a)})}toggleAttachSource(){this.showAttachSource.update(t=>(t&&this.selectedAttachType.set(null),!t))}selectAttachType(t){this.selectedAttachType.set(t)}backToAttachTypes(){this.selectedAttachType.set(null)}pickFromLibrary(){return F(this,null,function*(){let t=this.selectedAttachType()?.config;if(!t)return;this.showAttachSource.set(!1),this.selectedAttachType.set(null);let o=yield this.attachmentsService.pickFromLibrary(t);o.length!==0&&this.attachments.update(r=>this.attachmentsService.appendAttachments(r,o,t))})}canTakePhoto(){let t=this.selectedAttachType()?.config;return!!t&&this.attachmentsService.canTakePhoto(t)}pickFromCamera(){return F(this,null,function*(){let t=this.selectedAttachType()?.config;if(!t)return;this.showAttachSource.set(!1),this.selectedAttachType.set(null);let o=yield this.attachmentsService.pickFromCamera(t);o.length!==0&&this.attachments.update(r=>this.attachmentsService.appendAttachments(r,o,t))})}pickFromDevice(){return F(this,null,function*(){let t=this.selectedAttachType()?.config;if(!t)return;this.showAttachSource.set(!1),this.selectedAttachType.set(null);let o=yield this.attachmentsService.pickFromDevice(t);o.length!==0&&this.attachments.update(r=>this.attachmentsService.appendAttachments(r,o,t))})}removeAttachment(t){this.attachments.update(o=>o.filter((r,a)=>a!==t))}inspire(){let t=this.registry.getSuggestions(this.selected(),6)();if(!t.length)return;let o=t[this._inspireMeIndex%t.length];if(this._inspireMeIndex=(this._inspireMeIndex+1)%t.length,this.prompt.set(o.prompt),o.settings){let r=this.currentApp();
3if(r){let a=new Set(r.settings.map(l=>l.field)),s=O({},this.selection().values);for(let[l,m]of Object.entries(o.settings))a.has(l)&&typeof m=="string"&&(s[l]=m);this.selection.update(l=>te(O({},l),{values:s}))}}}hex(t,o){let r=Math.round(o*255).toString(16).padStart(2,"0");return`${t}${r}`}selectedModelLabel(){let t=this.currentApp();if(!t)return"";let o=this.selection().modelId??t.models[0]?.id;return t.models.find(r=>r.id===o)?.label??this.transloco.translate("composer.field.model")}submit(){return F(this,null,function*(){if(!this.canSubmit())return;let t=this.currentApp();if(!t)return;let o=this.selection(),r=O({},o.values);o.modelId&&(r.modelId=o.modelId);let a=t.tokenCostFn?t.tokenCostFn({modelId:o.modelId??t.models[0]?.id,values:o.values,prompt:this.prompt()}):null;yield this.submitFlow.submit({usecase:t.usecase,prompt:this.prompt().trim(),settings:r,tokenCost:a,attachments:this.attachments()}),this.dialogRef.close()})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-universal-prompt-sheet"]],decls:23,vars:16,consts:[[1,"ups"],[1,"ups-handle"],[1,"ups-lookups"],["data-testid","prompt-textarea","rows","4",1,"ups-textarea",3,"ngModelChange","ngModel","placeholder"],[1,"ups-attachments"],[1,"ups-actions"],["data-testid","prompt-cta-settings",1,"ups-pill"],[1,"ups-attach-anchor"],[1,"ups-actions","ups-actions--bottom"],["data-testid","prompt-cta-inspire",1,"ups-pill","ups-pill--accent",3,"click"],[3,"context"],["data-testid","prompt-cta-generate",1,"ups-cta",3,"click","disabled"],["data-testid","prompt-app-picker",1,"ups-app-btn",3,"click"],[1,"ups-app-icon"],[1,"ups-app-meta"],[1,"ups-app-label"],[1,"ups-app-desc"],[1,"ups-app-caret"],["data-testid","prompt-model-picker",1,"ups-model-btn"],["data-testid","prompt-model-picker",1,"ups-model-btn",3,"click"],[1,"ups-att-chip"],["alt","",1,"ups-att-thumb",3,"src"],[1,"ups-att-icon"],[1,"ups-att-remove",3,"click"],["data-testid","prompt-cta-settings",1,"ups-pill",3,"click"],["data-testid","prompt-cta-attach",1,"ups-pill",3,"click"],["role","menu",1,"ups-attach-popover"],["type","button","role","menuitem"],["type","button","role","menuitem",3,"click"],[1,"rtl-flip"],["type","button","role","menuitem","data-testid","prompt-sheet-attach-camera"],["type","button","role","menuitem","data-testid","prompt-sheet-attach-camera",3,"click"]],template:function(o,r){if(o&1&&(c(0,"div",0),E(1,"div",1),S(2,N1,13,10,"div",2),c(3,"textarea",3),y(4,"transloco"),pl("ngModelChange",function(s){return ul(r.prompt,s)||(r.prompt=s),s}),p(),S(5,V1,3,0,"div",4),c(6,"div",5),S(7,z1,6,3,"button",6),S(8,G1,7,2,"div",7),p(),c(9,"div",8)(10,"button",9),A("click",function(){return r.inspire()}),c(11,"mat-icon"),f(12,"auto_awesome"),p(),c(13,"span"),f(14),y(15,"transloco"),p()(),S(16,K1,1,1,"pmz-prompt-tips",10),c(17,"button",11),A("click",function(){return r.submit()}),c(18,"mat-icon"),f(19,"auto_awesome"),p(),c(20,"span"),f(21),y(22,"transloco"),p()()()()),o&2){let a,s;d(2),M((a=r.currentApp())?2:-1,a),d(),dl("ngModel",r.prompt),Z("placeholder",v(4,10,"promptSheet.placeholder")),d(2),M(r.attachments().length>0?5:-1),d(2),M(r.showSettings()?7:-1),d(),M(r.showAttach()?8:-1),d(6),T(v(15,12,"promptSheet.inspireMe")),d(2),M((s=r.promptTipsContext())?16:-1,s),d(),Z("disabled",!r.canSubmit()),d(4),T(v(22,14,"promptSheet.cta"))}},dependencies:[Td,ke,td,Jc,Xc,ed,Hi,ae,pe,ee],styles:['[_nghost-%COMP%]{display:block;background:var(--color-surface);border-radius:26px 26px 0 0;color:var(--color-text-primary);font-family:inherit;--ups-inspire-bg: rgba(192, 132, 252, .18);--ups-inspire-bg-hover: rgba(192, 132, 252, .26);--ups-inspire-border: rgba(192, 132, 252, .3);--ups-inspire-border-hover: rgba(192, 132, 252, .42);--ups-inspire-text: #f4f4f5;--ups-inspire-icon: #c084fc;padding:0 16px calc(26px + env(safe-area-inset-bottom,0px));max-height:88vh;overflow-y:auto}.light[_nghost-%COMP%], .light   [_nghost-%COMP%]{--ups-inspire-bg: rgba(124, 58, 237, .13);--ups-inspire-bg-hover: rgba(124, 58, 237, .2);--ups-inspire-border: rgba(124, 58, 237, .4);--ups-inspire-border-hover: rgba(124, 58, 237, .56);--ups-inspire-text: #5b21b6;--ups-inspire-icon: #5b21b6}.ups-handle[_ngcontent-%COMP%]{width:40px;height:4px;border-radius:999px;background:var(--color-border);margin:10px auto 14px}.ups-app-btn[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:14px;margin-bottom:12px;cursor:pointer;text-align:start;font-family:inherit;color:var(--color-text-primary);transition:border-color .16s,background .16s}.ups-app-btn[_ngcontent-%COMP%]:hover{background:var(--color-surface-elevated);border-color:var(--color-border)}.ups-lookups[_ngcontent-%COMP%]{display:grid;gap:8px;margin-bottom:12px}.ups-lookups[_ngcontent-%COMP%]   .ups-app-btn[_ngcontent-%COMP%]{margin-bottom:0}.ups-model-btn[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:8px;min-width:0;padding:9px 12px;background:#8b5cf61f;border:1px solid rgba(139,92,246,.26);border-radius:999px;color:var(--color-text-primary);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;text-align:start}.ups-model-btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ups-model-btn[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;width:18px;height:18px}.ups-model-btn[_ngcontent-%COMP%]:hover{background:#8b5cf62e;border-color:#8b5cf661}.ups-app-icon[_ngcontent-%COMP%]{flex:0 0 36px;width:36px;height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}.ups-app-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.ups-app-meta[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}.ups-app-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600}.ups-app-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ups-app-caret[_ngcontent-%COMP%]{flex:0 0 auto;font-size:20px;width:20px;height:20px;color:var(--color-text-muted)}.ups-textarea[_ngcontent-%COMP%]{width:100%;min-height:110px;background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:14px;padding:12px 14px;color:var(--color-text-primary);font-family:inherit;font-size:14px;line-height:1.5;resize:vertical;outline:none}.ups-textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-muted)}.ups-textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-border)}.ups-actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--color-border)}.ups-actions--bottom[_ngcontent-%COMP%]{justify-content:flex-end;margin-top:8px;padding-top:0;border-top:0}.ups-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 12px;background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:999px;color:var(--color-text-secondary);font-size:12px;font-weight:500;font-family:inherit;cursor:pointer}.ups-pill[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;
3height:14px}.ups-pill--accent[_ngcontent-%COMP%]{background:var(--ups-inspire-bg);border-color:var(--ups-inspire-border);color:var(--ups-inspire-text)}.ups-pill--accent[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:var(--ups-inspire-icon)}.ups-pill--accent[_ngcontent-%COMP%]:hover{background:var(--ups-inspire-bg-hover);border-color:var(--ups-inspire-border-hover)}.ups-cta[_ngcontent-%COMP%]{margin-inline-start:auto;display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 16px;background:linear-gradient(135deg,#c084fc,#ec4899);border:none;border-radius:999px;color:#fff;font-size:13px;font-weight:600;font-family:inherit;cursor:pointer;box-shadow:0 6px 18px #c084fc59}.ups-cta[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.ups-cta[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}.ups-attach-anchor[_ngcontent-%COMP%]{position:relative}.ups-attach-popover[_ngcontent-%COMP%]{position:absolute;inset-inline-start:0;bottom:calc(100% + 8px);z-index:20;display:grid;gap:4px;min-width:188px;padding:6px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;box-shadow:0 18px 45px #0003}.ups-attach-popover[_ngcontent-%COMP%]:after{content:"";position:absolute;inset-inline-start:20px;bottom:-5px;width:10px;height:10px;transform:rotate(45deg);background:var(--color-surface);border-inline-end:1px solid var(--color-border);border-bottom:1px solid var(--color-border)}.ups-attach-popover[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;height:36px;padding:0 10px;background:transparent;border:0;border-radius:10px;color:var(--color-text-primary);font:inherit;font-size:13px;cursor:pointer;text-align:start}.ups-attach-popover[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{background:var(--color-surface-elevated)}.ups-attach-popover[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:var(--color-text-muted);font-size:17px;width:17px;height:17px}.ups-attachments[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.ups-att-chip[_ngcontent-%COMP%]{position:relative;width:56px;height:56px;border-radius:10px;overflow:visible;background:var(--color-surface-elevated);border:1px solid var(--color-border);display:flex;align-items:center;justify-content:center}.ups-att-thumb[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;border-radius:9px;display:block}.ups-att-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px;color:var(--color-text-muted)}.ups-att-remove[_ngcontent-%COMP%]{position:absolute;top:-6px;right:-6px;width:18px;height:18px;border-radius:50%;background:var(--color-surface);border:1px solid var(--color-border);color:var(--color-text-secondary);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.ups-att-remove[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px}'],changeDetection:0});let n=e;return n})();function jm(n){return n.open(Y1,{panelClass:"universal-prompt-sheet-panel",backdropClass:"universal-prompt-sheet-backdrop",width:"100vw",maxWidth:"100vw",position:{bottom:"0"},autoFocus:!1})}zt();b();Mi();se();re();b();se();var Z1=(n,e)=>e.id;function Q1(n,e){n&1&&(c(0,"mat-icon",10),f(1,"check_circle"),p())}function J1(n,e){if(n&1){let i=R();c(0,"button",7),A("click",function(){let o=w(i).$implicit,r=h();return C(r.dialogRef.close(o.id))}),c(1,"span",8)(2,"mat-icon"),f(3),p()(),c(4,"span",9),f(5),y(6,"transloco"),p(),S(7,Q1,2,0,"mat-icon",10),p()}if(n&2){let i=e.$implicit,t=h();ie("row--active",i.id===t.data.activeTab),d(3),T(i.icon),d(2),T(v(6,5,i.labelKey)),d(2),M(i.id===t.data.activeTab?7:-1)}}var X1=(()=>{let e=class e{constructor(){this.data=u(yc),this.dialogRef=u(ii)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-gallery-type-sheet"]],decls:12,vars:3,consts:[[1,"panel"],["aria-hidden","true",1,"grip"],[1,"head"],[1,"head-icon"],[1,"head-title"],[1,"rows"],["type","button",1,"row",3,"row--active"],["type","button",1,"row",3,"click"],[1,"row-icon"],[1,"row-label"],[1,"row-check"]],template:function(o,r){o&1&&(c(0,"div",0),E(1,"span",1),c(2,"div",2)(3,"span",3)(4,"mat-icon"),f(5,"photo_library"),p()(),c(6,"span",4),f(7),y(8,"transloco"),p()(),c(9,"div",5),_e(10,J1,8,7,"button",6,Z1),p()()),o&2&&(d(7),T(v(8,1,"bottomNav.library")),d(3),ye(r.data.tabs))},dependencies:[Hi,ae,pe,ee],styles:[".panel[_ngcontent-%COMP%]{background:var(--color-surface);border:1px solid var(--color-border);border-bottom:none;border-radius:20px 20px 0 0;backdrop-filter:blur(20px) saturate(1.4);-webkit-backdrop-filter:blur(20px) saturate(1.4);box-shadow:0 -8px 40px #0003;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 8px)}.grip[_ngcontent-%COMP%]{width:36px;height:4px;border-radius:999px;background:var(--color-border);margin:10px auto 4px}.head[_ngcontent-%COMP%]{display:flex;align-items:center;padding:8px 16px 12px;gap:10px}.head-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:10px;background:#8b5cf626;
3display:flex;align-items:center;justify-content:center;color:#a78bfa;flex-shrink:0}.head-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.head-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--color-text-primary);flex:1}.rows[_ngcontent-%COMP%]{padding:0 8px 4px}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;width:100%;padding:13px 12px;border-radius:14px;border:1px solid transparent;background:transparent;cursor:pointer;transition:background .12s,border-color .12s;-webkit-tap-highlight-color:transparent}.row[_ngcontent-%COMP%]:active{background:var(--color-hover)}.row--active[_ngcontent-%COMP%]{background:#8b5cf61a;border-color:#8b5cf659}.row-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:12px;background:var(--color-muted-bg);display:flex;align-items:center;justify-content:center;color:var(--color-text-muted);flex-shrink:0;transition:background .12s,color .12s}.row--active[_ngcontent-%COMP%]   .row-icon[_ngcontent-%COMP%]{background:#8b5cf62e;color:#c4b5fd}.row-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.row-label[_ngcontent-%COMP%]{font-size:15px;font-weight:500;color:var(--color-text-secondary);flex:1;text-align:start}.row--active[_ngcontent-%COMP%]   .row-label[_ngcontent-%COMP%]{color:#e9d5ff;font-weight:600}.row-check[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#a78bfa;flex-shrink:0}.light[_nghost-%COMP%]   .row--active[_ngcontent-%COMP%]   .row-label[_ngcontent-%COMP%], .light   [_nghost-%COMP%]   .row--active[_ngcontent-%COMP%]   .row-label[_ngcontent-%COMP%]{color:var(--brand-primary)}.light[_nghost-%COMP%]   .row--active[_ngcontent-%COMP%]   .row-icon[_ngcontent-%COMP%], .light   [_nghost-%COMP%]   .row--active[_ngcontent-%COMP%]   .row-icon[_ngcontent-%COMP%]{color:var(--brand-primary);background:#477cf61f}.light[_nghost-%COMP%]   .row-check[_ngcontent-%COMP%], .light   [_nghost-%COMP%]   .row-check[_ngcontent-%COMP%]{color:var(--brand-primary)}"],changeDetection:0});let n=e;return n})();function Wm(n,e){return n.open(X1,{data:e,panelClass:"mini-app-sheet-panel",backdropClass:"mini-app-sheet-backdrop",width:"100vw",maxWidth:"100vw",position:{bottom:"0"},autoFocus:!1})}b();se();var Hm=()=>({exact:!1});function ey(n,e){n&1&&(fe(),c(0,"svg",12),E(1,"path",18)(2,"path",19)(3,"path",20)(4,"path",21)(5,"path",22)(6,"circle",23)(7,"path",24)(8,"path",25)(9,"path",26)(10,"path",27),p())}function ty(n,e){if(n&1&&(c(0,"mat-icon"),f(1),p()),n&2){let i=h(2);d(),T(i.fabIcon())}}function iy(n,e){if(n&1){let i=R();c(0,"nav",1)(1,"a",2),fe(),c(2,"svg",3),E(3,"path",4),p(),Ht(),c(4,"span"),f(5),y(6,"transloco"),p()(),c(7,"button",5),A("click",function(){w(i);let o=h();return C(o.openLibrarySheet())}),fe(),c(8,"svg",3),E(9,"rect",6)(10,"path",7)(11,"circle",8)(12,"path",9),p(),Ht(),c(13,"span"),f(14),y(15,"transloco"),p()(),c(16,"button",10),y(17,"transloco"),A("click",function(){w(i);let o=h();return C(o.openSwitcher())}),c(18,"span",11),S(19,ey,11,0,":svg:svg",12)(20,ty,2,1,"mat-icon"),p()(),c(21,"a",13),fe(),c(22,"svg",3),E(23,"path",14),p(),Ht(),c(24,"span"),f(25),y(26,"transloco"),p()(),c(27,"button",15),A("click",function(){w(i);let o=h();return C(o.openPrompt())}),fe(),c(28,"svg",3),E(29,"path",16)(30,"path",17),p(),Ht(),c(31,"span"),f(32),y(33,"transloco"),p()()()}if(n&2){let i=h();ie("desktop-bottom-nav-override",i.forceShow()),d(),Z("routerLink",i.route("home"))("routerLinkActiveOptions",Vt(32,Hm)),d(4),T(v(6,22,"bottomNav.home")),d(2),ie("sn-tab--active",i.isGalleryActive()),d(7),T(v(15,24,"bottomNav.library")),d(2),de("data-state",i.fabActive()?"active":"neutral")("data-app-id",i.currentAppId())("aria-label",v(17,26,"bottomNav.switchApp")),d(2),xe("background",i.fabBackground())("box-shadow",i.fabShadow()),ie("sn-fab--neutral",!i.fabActive()),d(),M(i.fabIcon()==="banana"?19:20),d(2),Z("routerLink",i.route("inspire"))("routerLinkActiveOptions",Vt(33,Hm)),d(4),T(v(26,28,"bottomNav.inspire")),d(7),T(v(33,30,"bottomNav.prompt"))}}var Gm=(()=>{let e=class e{constructor(){this.platformDetectionService=u(De),this.el=u(Mo),this.isBrowser=Fe(u(ze)),this.appConfigService=u(Ee),this.transloco=u(Q),this.dialog=u(ni),this.router=u(G),this.galleryTabService=u(Ko),this.forceShow=Jt(!1),this.NEUTRAL_BG="#ffffff",this.GLOBAL_APPS=new Set(["home","inspire"]),this.isMobile=I(()=>this.platformDetectionService.isMobileByScreenSize()),this.currentAppConfig=I(()=>this.appConfigService.getCurrentConfig()()),this.hideBottomNav=I(()=>this.currentAppConfig()?.hideBottomNav||!1),this.shouldShowBottomNav=I(()=>this.isMobile()&&!this.hideBottomNav()||this.forceShow()),this.currentAppId=I(()=>this.currentAppConfig()?.id??""),this.fabActive=I(()=>{let t=this.currentAppConfig();return!!t&&!this.GLOBAL_APPS.has(t.id)}),this.fabIcon=I(()=>{let t=this.currentAppConfig();return!t||this.GLOBAL_APPS.has(t.id)?"auto_awesome":t.icon}
3),this.fabBackground=I(()=>{let t=this.currentAppConfig();return!t||this.GLOBAL_APPS.has(t.id)?this.NEUTRAL_BG:t.color??"#c084fc"}),this.fabShadow=I(()=>{let t=this.currentAppConfig(),o="var(--color-background) 0px 0px 0px 6px";if(!t||this.GLOBAL_APPS.has(t.id))return`${o}, rgba(168, 85, 247, 0.4) 0px 0px 0px 7px, rgba(168, 85, 247, 0.5) 0px 12px 32px -4px`;let r=t.color??"#c084fc";return t.icon==="banana"?o:`${o}, ${r}66 0px 0px 0px 7px, ${r}80 0px 12px 32px -4px`}),this.isGalleryActive=I(()=>this.router.url.includes("/studio/gallery")),this.syncNavHeight=Qt(()=>{this.isBrowser&&document.documentElement.style.setProperty("--bottom-nav-height",this.shouldShowBottomNav()?"64px":"0px")})}route(t){return`/${this.transloco.getActiveLang()}/studio/${t}`}openLibrarySheet(){this.haptic();let t=K.apps,o=e.GALLERY_TABS.filter(s=>!!t[s.appFlag]),r=this.galleryTabService.pending()??o[0]?.id??"photos";Wm(this.dialog,{tabs:o,activeTab:r}).afterClosed().subscribe(s=>{if(s&&(this.galleryTabService.set(s),!this.router.url.includes("/studio/gallery"))){let l=this.transloco.getActiveLang();this.router.navigateByUrl(`/${l}/studio/gallery`)}})}openSwitcher(){this.haptic(),Rr(this.dialog)}openPrompt(){this.haptic(),jm(this.dialog)}ngOnInit(){this.isBrowser&&document.documentElement.style.setProperty("--bottom-nav-height",this.shouldShowBottomNav()?"64px":"0px")}haptic(){"vibrate"in navigator&&navigator.vibrate(30),window.Capacitor?.isNativePlatform?.()&&this.triggerNativeHaptic()}triggerNativeHaptic(){return F(this,null,function*(){try{let{Haptics:t,ImpactStyle:o}=yield import("./chunk-ODXSGQ3D.js");yield t.impact({style:o.Light})}catch{}})}};e.GALLERY_TABS=[{id:"photographer",labelKey:"unifiedGallery.tabs.photographer",icon:"photo_camera",appFlag:"photographer"},{id:"photos",labelKey:"unifiedGallery.tabs.photos",icon:"photo_library",appFlag:"photoEditor"},{id:"videos",labelKey:"unifiedGallery.tabs.videos",icon:"video_library",appFlag:"videoMaker"},{id:"music",labelKey:"unifiedGallery.tabs.music",icon:"library_music",appFlag:"musicCreator"},{id:"voice",labelKey:"unifiedGallery.tabs.voice",icon:"graphic_eq",appFlag:"voiceCreator"}],e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-bottom-navbar"]],inputs:{forceShow:[1,"forceShow"]}
3,decls:1,vars:1,consts:[[1,"sn-bar",3,"desktop-bottom-nav-override"],[1,"sn-bar"],["data-testid","bottom-nav-home","routerLinkActive","sn-tab--active",1,"sn-tab",3,"routerLink","routerLinkActiveOptions"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.75","stroke-linecap","round","stroke-linejoin","round"],["d","M4 11.5a2 2 0 0 1 .73-1.55l6-4.93a2 2 0 0 1 2.54 0l6 4.93A2 2 0 0 1 20 11.5V19a2 2 0 0 1-2 2h-2.5v-5a1.5 1.5 0 0 0-1.5-1.5h-4A1.5 1.5 0 0 0 8.5 16v5H6a2 2 0 0 1-2-2z"],["data-testid","bottom-nav-library",1,"sn-tab",3,"click"],["x","3.5","y","6.5","width","14","height","14","rx","3","fill","none"],["d","M7 3.5h11A2.5 2.5 0 0 1 20.5 6v11"],["cx","8.5","cy","11.5","r","1.5"],["d","m4 18 4-4 3.5 3.5L15 14l2.5 2.5"],["data-testid","bottom-nav-fab",1,"sn-tab","sn-tab--fab",3,"click"],[1,"sn-fab"],["width","22","height","22","viewBox","0 0 36 36","xmlns","http://www.w3.org/2000/svg",2,"filter","brightness(0) invert(1)"],["data-testid","bottom-nav-inspire","routerLinkActive","sn-tab--active",1,"sn-tab",3,"routerLink","routerLinkActiveOptions"],["d","M9 18h6m-5 3h4M8 14a5 5 0 1 1 8 0c-1 .8-1.5 1.7-1.5 3v.5h-5V17c0-1.3-.5-2.2-1.5-3z"],["data-testid","bottom-nav-prompt",1,"sn-tab","sn-tab--prompt",3,"click"],["d","M4 6h10M4 11h7M4 16h5"],["fill","currentColor","d","m14.5 14 4.6-4.6a1.6 1.6 0 0 1 2.3 2.3L16.8 16.3a2 2 0 0 1-.9.5l-2.6.6.6-2.6a2 2 0 0 1 .6-.8z"],["fill","#FFE8B6","d","M28 2c2.684-1.342 5 4 3 13-1.106 4.977-5 9-9 12s-11-1-7-5 8-7 10-13c1.304-3.912 1-6 3-7z"],["fill","#FFD983","d","M31 8c0 3-1 9-4 13s-7 5-4 1 5-7 6-11 2-7 2-3z"],["fill","#FFCC4D","d","M22 20c-.296.592 1.167-3.833-3-6-1.984-1.032-10 1-4 1 3 0 4 2 2 4-.291.292-.489.603-.622.912-.417.346-.873.709-1.378 1.088-2.263 1.697-5.84 4.227-10 7-3 2-4 3-4 4 0 3 9 3 14 1s10-7 10-7l4-4c-3-4-7-2-7-2z"],["fill","#FFE8B6","d","M22 20s1.792-4.729-3-7c-4.042-1.916-8-1-11 1s-2 4-3 5 1 2 3 0 8.316-4.895 11-4c3 1 2 2.999 3 5z"],["fill","#A6D388","d","M26 35h-4c-2 0-3 1-4 1s-2-2 0-2 4 0 5-1 5 2 3 2z"],["fill","#3E721D","cx","18","cy","35","r","1"],["fill","#FFCC4D","d","M32.208 28S28 35 26 35h-4c-2 0 0-1 1-2s5 0 5-6c0-3 4.208 1 4.208 1z"],["fill","#FFE8B6","d","M26 19c3 0 8 3 7 9s-5 7-7 7h-2c-2 0-1-1 0-2s4 0 4-6c0-3-4-7-6-7 0 0 2-1 4-1z"],["fill","#FFD983","d","M17 21c3 0 5 1 3 3-1.581 1.581-6 5-10 6s-8 1-5-1 9.764-8 12-8z"],["fill","#C1694F","d","M2 31c1 0 1 0 1 .667C3 32.333 3 33 2 33s-1-1.333-1-1.333S1 31 2 31z"]],template:function(o,r){o&1&&S(0,iy,34,34,"nav",0),o&2&&M(r.shouldShowBottomNav()?0:-1)},dependencies:[ke,ae,pe,ei,Wi,ee],styles:['[_nghost-%COMP%]{--bottom-nav-height: 64px}.sn-bar[_ngcontent-%COMP%]{position:fixed;left:0;right:0;bottom:0;display:flex;align-items:flex-end;background:var(--color-surface);border-top:1px solid var(--color-border);padding:0 0 env(safe-area-inset-bottom,0px);z-index:100}.desktop-bottom-nav-override[_ngcontent-%COMP%]{position:relative!important;bottom:auto!important}.sn-tab[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px 14px;color:var(--color-text-secondary);font-size:11px;font-weight:500;letter-spacing:.2px;font-family:inherit;background:none;border:none;cursor:pointer;text-decoration:none;position:relative;-webkit-tap-highlight-color:transparent}.sn-tab[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{flex-shrink:0;display:block}.sn-tab[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px;font-variation-settings:"wght" 400}.sn-tab[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:not(.sn-fab){font-size:11px;letter-spacing:.2px}.sn-tab--active[_ngcontent-%COMP%]{color:var(--color-text-primary)}.sn-tab--active[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:not(.sn-fab){position:relative}.sn-tab--active[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:not(.sn-fab):after{content:"";position:absolute;bottom:-4px;left:50%;transform:translate(-50%);width:20px;height:2px;border-radius:1px;background:linear-gradient(90deg,#c084fc,#ec4899)}.sn-tab--fab[_ngcontent-%COMP%]{flex:0 0 auto;min-width:72px}.sn-fab[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-top:-20px;margin-bottom:2px;transition:background .2s,box-shadow .2s,transform .12s}.sn-fab[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:22px;width:22px;height:22px;color:#fff}.sn-fab[_ngcontent-%COMP%]:active{transform:scale(.93)}.sn-fab--neutral[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#7c3aed}'],changeDetection:0});let n=e;return n})();Pe();b();se();ve();re();Ot();yt();b();se();var ny=()=>({exact:!1}),oy=(n,e)=>e.id;function ry(n,e){if(n&1&&(c(0,"div",0)(1,"div",1)(2,"span",2)(3,"mat-icon"),f(4),p()(),c(5,"span",3),f(6),y(7,"transloco"),p()()()),n&2){let i=h();d(4),T(i.sections()[0].icon),d(2),T(v(7,2,i.sections()[0].title))}}function ay(n,e){if(n&1&&(c(0,"a",5)(1,"mat-icon"),f(2),p(),c(3,"span"),f(4),y(5,"transloco"),p()()),n&2){let i=e.$implicit,t=h(2);Z("routerLink",t.absoluteRoute(i))("routerLinkActiveOptions",Vt(7,ny)),de("data-testid","mobile-section-tab-"+i.id),d(2),T(i.icon),d(2),T(v(5,5,i.title))}}function sy(n,e){if(n&1&&(c(0,"div",0)(1,"div",4),_e(2,ay,6,8,"a",5,oy),p()()),n&2){let i=h();d(),xe("--app-color",i.appColor()),d(),ye(i.sections())}}var Km=(()=>{let e=class e{constructor(){this.appConfigService=u(Ee),this.transloco=u(Q),this.router=u(G),this.platform=u(De),this.scrollService=u(en),this.sections=I(()=>{let t=this.appConfigService.getCurrentConfig()();return!t||t.id==="home"?[]:t.mobileNavigation??[]}),this.appColor=I(()=>this.appConfigService.getCurrentConfig()()?.color??"#8b5cf6")}get hiddenOnScroll(){return this.platform.isMobileByScreenSize()&&!this.scrollService.chromeForcedVisible()&&this.scrollService.scrollPosition()>100&&this.scrollService.direction()==="down"}absoluteRoute(t){let o=t.route??"",r=this.transloco.getActiveLang();return o.startsWith("./")?`/${r}/studio/${o.slice(2)}`:o.startsWith("/")?`/${r}${o}`:o}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-mobile-section-tabs"]],hostVars:2,hostBindings:function(o,r){o&2&&ie("mst-host--hidden",r.hiddenOnScroll)},decls:2,vars:1,consts:[[1,"mst-wrap"],[1,"mst-single"],[1,"mst-single-icon"],[1,"mst-single-label"],[1,"mst-segments"],["routerLinkActive","mst-segment--active",1,"mst-segment",3,"routerLink","routerLinkActiveOptions"]],template:function(o,r){o&1&&S(0,ry,8,4,"div",0)(1,sy,4,2,"div",0),o&2&&M(r.sections().length===1?0:r.sections().length>1?1:-1)},dependencies:[ke,ae,pe,ei,Wi,ee],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;position:fixed;inset-inline-start:0;inset-inline-end:0;
3top:calc(var(--header-height, 70px) + env(safe-area-inset-top,0px));z-index:999;pointer-events:none;transition:transform .3s ease-out,opacity .3s ease-out;transform:translateY(0);opacity:1}.mst-host--hidden[_nghost-%COMP%]{transform:translateY(calc(-1 * (var(--header-height, 70px) + env(safe-area-inset-top,0px) + 48px)));opacity:0}.mst-wrap[_ngcontent-%COMP%]{display:flex;align-items:center;padding:6px 16px;background:color-mix(in srgb,var(--color-background) 88%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);pointer-events:auto}.mst-segments[_ngcontent-%COMP%]{display:inline-flex;max-width:100%;overflow-x:auto;scrollbar-width:none;background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:10px;padding:3px;gap:2px}.mst-segments[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.mst-segment[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;white-space:nowrap;flex-shrink:0;border-radius:8px;background:transparent;color:var(--color-text-secondary);font-size:12.5px;font-weight:500;text-decoration:none;transition:all .15s;-webkit-tap-highlight-color:transparent}.mst-segment[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}.mst-segment--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--app-color, #8b5cf6) 22%,var(--color-surface-elevated));color:var(--color-text-primary);font-weight:600;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--app-color, #8b5cf6) 45%,transparent)}.mst-single[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;padding-block:6px;padding-inline:8px 14px;border-radius:999px;background:var(--color-surface-elevated);border:1px solid var(--color-border);color:var(--color-text-primary);font-size:12.5px;font-weight:600}.mst-single-icon[_ngcontent-%COMP%]{width:22px;height:22px;border-radius:999px;background:var(--color-muted-bg);display:inline-flex;align-items:center;justify-content:center}.mst-single-icon[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--color-text-primary)}'],changeDetection:0});let n=e;return n})();Ot();yt();b();se();function ly(n,e){n&1&&E(0,"app-mobile-section-tabs")}function cy(n,e){if(n&1&&(E(0,"app-header"),S(1,ly,1,0,"app-mobile-section-tabs")),n&2){let i=h();d(),M(i.isMobile()?1:-1)}}function dy(n,e){if(n&1&&(c(0,"div",4)(1,"div",5)(2,"div",6)(3,"mat-icon",7),f(4,"get_app"),p(),c(5,"p",8),f(6),y(7,"transloco"),p()(),c(8,"a",9),f(9),y(10,"transloco"),p()()()),n&2){let i=h();d(6),V(" ",v(7,3,"signin.pwa_prompt")," "),d(2),Z("href",i.isIosDevice?i.appStoreUrl:i.playStoreUrl,Ui),d(),V(" ",v(10,5,"signin.install_app")," ")}}function uy(n,e){n&1&&E(0,"app-bottom-navbar")}var Ym=(()=>{let e=class e{constructor(){this.router=u(G),this.appConfigService=u(Ee),this.platformDetectionService=u(De),this.scrollService=u(en),this.headerVisibilityService=u($d),this.isHeaderVisible=I(()=>this.headerVisibilityService.isHeaderVisible()),this.hasMobileSections=I(()=>{if(!this.isMobile())return!1;let t=this.appConfigService.getCurrentConfig()();return!!t&&t.id!=="home"&&(t.mobileNavigation?.length??0)>0}),this.destroy$=new Et,this.bannerTimers=[],this.isMobile=I(()=>this.platformDetectionService.isMobileByScreenSize()),this.showDownloadBanner=X(!1),this.isIosDevice=typeof navigator<"u"&&/iPhone|iPad|iPod/i.test(navigator.userAgent),this.appStoreUrl=K.appStoreUrl,this.playStoreUrl=K.playStoreUrl}ngOnInit(){if(this.platformDetectionService.isMobileByScreenSize()&&!this.platformDetectionService.isNative()){let t=setTimeout(()=>{this.showDownloadBanner.set(!0);let o=setTimeout(()=>{this.showDownloadBanner.set(!1)},1e4);this.bannerTimers.push(o)},6e4);this.bannerTimers.push(t)}this.router.events.pipe(we(t=>t instanceof Le),wi(this.destroy$)).subscribe(()=>{this.updateAppConfigFromRoute(),this.scrollService.revealChromeForNavigation()}),this.updateAppConfigFromRoute()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.bannerTimers.forEach(t=>clearTimeout(t))}updateAppConfigFromRoute(){let t=this.router.url.split("/"),o=t.indexOf("studio");if(o!==-1&&t[o+1]){let r=t[o+1],a=r==="gallery"?"home":r;this.appConfigService.setAppConfig(a)}}getDebugInfo(){return this.platformDetectionService.getDebugInfo()}isLargeTablet(){return this.platformDetectionService.isBetweenBreakpoints(768,1024)}isSmallMobile(){return this.platformDetectionService.screenWidth()<480}onMainContentScroll(t){let o=t.target;this.scrollService.updateScrollPosition(o.scrollTop,o.scrollHeight,o.clientHeight)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-modern-layout"]],decls:8,vars:9,consts:[["mainContent",""],[1,"pb-safe","pt-safe","flex","h-[100dvh]","w-full","flex-col","overflow-hidden","bg-background"],[1,"flex","flex-1","overflow-hidden"],[1,"studio-main","flex-1","flex-col","overflow-auto","bg-background",3,"scroll"],["data-testid","download-banner",1,"fixed","start-0","end-0","z-40","border-t","border-purple-500/30","bg-gradient-to-r","from-blue-950","via-purple-950","to-pink-950","p-4","shadow-lg","transition-all","duration-300",2,"bottom","calc(var(--bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px))"],[1,"mx-auto","flex","max-w-md","items-center","justify-between"],[1,"flex","items-center","gap-3"],[1,"text-purple-400"],[1,"text-sm","text-white"],["target","_blank","rel","noopener",1,"ms-3","shrink-0","rounded","bg-gradient-to-r","from-blue-500","via-purple-500","to-pink-500","px-4","py-2","text-sm","font-medium","text-white",3,"href"]],template:function(o,r){if(o&1){let a=R();c(0,"div",1),S(1,cy,2,1),c(2,"div",2)(3,"main",3,0),A("scroll",function(l){return w(a),C(r.onMainContentScroll(l))}),E(5,"router-outlet"),p()(),S(6,dy,11,7,"div",4),S(7,uy,1,0,"app-bottom-navbar"),p()}o&2&&(d(),M(r.isHeaderVisible()?1:-1),d(),ie("pb-16",r.isHeaderVisible()),d(),ie("studio-main--with-mobile-chrome",r.isMobile()&&r.isHeaderVisible())("studio-main--with-mobile-sections",r.hasMobileSections()),d(3),M(r.showDownloadBanner()?6:-1),d(),M(r.isMobile()&&r.isHeaderVisible()?7:-1))},dependencies:[ke,Xt,qm,Gm,Km,ae,pe,ee],styles:[".studio-main[_ngcontent-%COMP%]{min-height:0;overscroll-behavior-y:contain;scroll-behavior:smooth}@media(max-width:1024px){.studio-main--with-mobile-chrome[_ngcontent-%COMP%]{padding-top:var(--header-height, 70px)}.studio-main--with-mobile-chrome.studio-main--with-mobile-sections[_ngcontent-%COMP%]{padding-top:calc(var(--header-height, 70px) + 48px)}}"]});let n=e;return n})();Pe();b();ve();Se();yt();
3Pe();b();ia();se();ve();re();Se();zt();oa();Yi();Uo();b();se();re();var Ns=n=>({exact:n}),Qm=()=>({exact:!1}),py=()=>({exact:!0}),Vi=(n,e)=>e.id;function my(n,e){n&1&&(c(0,"mat-icon",19),f(1,"expand_more"),p())}function fy(n,e){if(n&1){let i=R();c(0,"li")(1,"a",21),A("click",function(){let o=w(i).$implicit,r=h(4);return C(r.onSubNavClick(o))}),c(2,"mat-icon",22),f(3),p(),c(4,"span"),f(5),y(6,"transloco"),p()()()}if(n&2){let i=e.$implicit,t=h(4);d(),Z("routerLink",t.subNavRoute(i.slug))("routerLinkActiveOptions",Vt(6,Qm)),d(2),T(i.icon),d(2),T(v(6,4,i.titleKey))}}function hy(n,e){if(n&1&&(c(0,"ul"),_e(1,fy,7,7,"li",null,Vi),p()),n&2){let i=h().$implicit,t=h(2);Ae(Cn("railx__sublist railx__accent--",i.id)),d(),ye(t.activeSubNav())}}function gy(n,e){if(n&1&&(c(0,"li",8)(1,"a",16),y(2,"transloco"),c(3,"span",17)(4,"mat-icon"),f(5),p()(),c(6,"span",18),f(7),y(8,"transloco"),p(),S(9,my,2,0,"mat-icon",19),p(),S(10,hy,3,3,"ul",20),p()),n&2){let i=e.$implicit,t=h(2);ie("railx__li--open",i.id===t.activeAppId()&&t.subNavFor(i.id).length>0),d(),Ae(Cn("rail__item railx__item railx__accent--",i.id)),Z("routerLink",i.route)("routerLinkActiveOptions",$i(16,Ns,i.id==="home")),de("title",v(2,12,i.descKey)),d(4),T(i.icon),d(2),T(v(8,14,i.titleKey)),d(2),M(t.subNavFor(i.id).length>0?9:-1),d(),M(i.id===t.activeAppId()&&t.activeSubNav().length>0?10:-1)}}function _y(n,e){if(n&1&&(c(0,"li",8)(1,"a",16),y(2,"transloco"),c(3,"span",17)(4,"mat-icon"),f(5),p()(),c(6,"span",18),f(7),y(8,"transloco"),p()()()),n&2){let i=e.$implicit;d(),Ae(Cn("rail__item railx__item railx__accent--",i.id)),Z("routerLink",i.route)("routerLinkActiveOptions",Vt(12,py)),de("title",v(2,8,i.descKey)),d(4),T(i.icon),d(2),T(v(8,10,i.titleKey))}}function yy(n,e){if(n&1&&(c(0,"li",8)(1,"a",23),y(2,"transloco"),c(3,"span",17)(4,"mat-icon"),f(5),p()(),c(6,"span",18),f(7),y(8,"transloco"),p()()()),n&2){let i=e.$implicit;d(),Ae(Cn("rail__item railx__item railx__accent--",i.id)),Z("routerLink",i.route),de("title",v(2,7,i.descKey)),d(4),T(i.icon),d(2),T(v(8,9,i.titleKey))}}function vy(n,e){if(n&1&&(c(0,"p",5),f(1),y(2,"transloco"),p(),c(3,"ul",6),_e(4,yy,9,11,"li",8,Vi),p()),n&2){let i=h(2);d(),V(" ",v(2,1,"rail.sections.discover")," "),d(3),ye(i.discoverItems())}}function by(n,e){if(n&1){let i=R();c(0,"button",2),y(1,"transloco"),A("click",function(){w(i);let o=h();return C(o.openGuidedCreator())}),c(2,"mat-icon",3),f(3,"auto_awesome"),p(),c(4,"span"),f(5),y(6,"transloco"),p()(),c(7,"nav",4)(8,"p",5),f(9),y(10,"transloco"),p(),c(11,"ul",6),_e(12,gy,11,18,"li",7,Vi),p(),c(14,"p",5),f(15),y(16,"transloco"),p(),c(17,"ul",6),_e(18,_y,9,13,"li",8,Vi),p(),S(20,vy,6,3),p(),c(21,"div",9)(22,"a",10),y(23,"transloco"),f(24),p(),c(25,"div",11)(26,"div",12),f(27),p(),c(28,"button",13),y(29,"transloco"),A("click",function(){w(i);let o=h();return C(o.goToWallet())}),c(30,"mat-icon"),f(31,"bolt"),p(),c(32,"span"),f(33),p()()(),c(34,"button",14),y(35,"transloco"),y(36,"transloco"),A("click",function(){w(i);let o=h();return C(o.toggle())}),c(37,"mat-icon",15),f(38,"menu_open"),p()()()}if(n&2){let i=h();de("aria-label",v(1,13,"composer.actions.generate")),d(5),T(v(6,15,"composer.actions.generate")),d(4),V(" ",v(10,17,"rail.sections.workspace")," "),d(3),ye(i.workspaceItems()),d(3),V(" ",v(16,19,"rail.sections.library")," "),d(3),ye(i.libraryItems()),d(2),M(i.discoverItems().length>0?20:-1),d(2),Z("routerLink",i.settingsRoute()),de("title",v(23,21,"navigation.settings")),d(2),T(i.userInitialFromEmail()),d(3),T(i.userName()),d(),de("title",v(29,23,"navigation.wallet")),d(5),T(i.tokenBalance()),d(),de("title",v(35,25,"rail.collapse"))("aria-label",v(36,27,"rail.collapse"))}}function xy(n,e){if(n&1){let i=R();c(0,"li",36),A("mouseenter",function(o){let r=w(i).$implicit,a=h(2);return C(a.onItemEnter(r,o))})("mouseleave",function(){w(i);let o=h(2);return C(o.onItemLeave())})("focusin",function(o){let r=w(i).$implicit,a=h(2);return C(a.onItemEnter(r,o))})("focusout",function(){w(i);let o=h(2);return C(o.onItemLeave())}),c(1,"a",37),A("click",function(o){let r=w(i).$implicit,a=h(2);return C(a.onSlimItemClick(r,o))}),c(2,"span",38)(3,"mat-icon",39),f(4),p()(),c(5,"span",27),f(6),y(7,"transloco"),p()()()}if(n&2){let i=e.$implicit;d(),Z("routerLink",i.route)("routerLinkActiveOptions",$i(6,Ns,i.id==="home")),d(3),T(i.icon),d(2),T(v(7,4,i.shortKey))}}function wy(n,e){if(n&1){let i=R();c(0,"li",36),A("mouseenter",function(o){let r=w(i).$implicit,a=h(2);return C(a.onItemEnter(r,o))})("mouseleave",function(){w(i);let o=h(2);return C(o.onItemLeave())})("focusin",function(o){let r=w(i).$implicit,a=h(2);return C(a.onItemEnter(r,o))})("focusout",function(){w(i);let o=h(2);return C(o.onItemLeave())}),c(1,"a",37),A("click",function(){w(i);let o=h(2);return C(o.closeFlyout())}),c(2,"span",38)(3,"mat-icon",39),f(4),p()(),c(5,"span",27),f(6),y(7,"transloco"),p()()()}if(n&2){let i=e.$implicit;d(),Z("routerLink",i.route)("routerLinkActiveOptions",$i(6,Ns,i.id==="gallery")),d(3),T(i.icon),d(2),T(v(7,4,i.shortKey))}}function Cy(n,e){if(n&1){let i=R();c(0,"button",24),y(1,"transloco"),A("click",function(){w(i);let o=h();return C(o.openGuidedCreator())})("mouseenter",function(){w(i);let o=h();return C(o.closeFlyout())}),c(2,"span",25)(3,"mat-icon",26),f(4,"auto_awesome"),p()(),c(5,"span",27),f(6),y(7,"transloco"),p()(),c(8,"nav",28)(9,"ul",29),_e(10,xy,8,8,"li",30,Vi),p(),E(12,"div",31),c(13,"ul",29),_e(14,wy,8,8,"li",30,Vi),p()(),c(16,"div",32)(17,"button",33),y(18,"transloco"),A("click",function(){w(i);let o=h();return C(o.goToWallet())}),c(19,"mat-icon"),f(20,"bolt"),p(),c(21,"span"),f(22),p()(),c(23,"a",34),y(24,"transloco"),f(25),p(),c(26,"button",35),y(27,"transloco"),y(28,"transloco"),A("click",function(){w(i);let o=h();return C(o.toggle())}),c(29,"mat-icon"),f(30,"menu"),p()()()}if(n&2){let i=h();de("aria-label",v(1,9,"composer.actions.generate")),d(6),T(v(7,11,"rail.short.create")),d(4),ye(i.workspaceItems()),d(4),ye(i.secondaryItems()),d(3),de("title",v(18,13,"navigation.wallet")),d(5),T(i.tokenBalance()),d(),Z("routerLink",i.settingsRoute()),de("title",i.userName()+" \u2014 "+v(24,15,"navigation.settings")),d(2),T(i.userInitialFromEmail()),d(),de("title",v(27,17,"rail.expand"))("aria-label",v(28,19,"rail.expand"))}}function Sy(n,e){if(n&1){let i=R();c(0,"li")(1,"a",48),A("click",function(){let o=w(i).$implicit,r=h(3);return C(r.onSubNavClick(o))}),c(2,"mat-icon",49),f(3),p(),c(4,"span"),f(5),y(6,"transloco"),p(),c(7,"mat-icon",50),f(8,"chevron_right"),p()()()}if(n&2){let i=e.$implicit,t=h(3);d(),ie("rail__flyout-item--hovered",t.hoveredSubId()===i.id),Z("routerLink",t.subNavRoute(i.slug))("routerLinkActiveOptions",Vt(8,Qm)),d(2),T(i.icon),d(2),T(v(6,6,i.titleKey))}}function My(n,e){if(n&1&&(E(0,"div",46),c(1,"ul",47),_e(2,Sy,9,9,"li",null,Vi),p()),n&2){let i=h(),t=h();d(2),ye(t.subNavFor(i.item.id))}}function Ty(n,e){if(n&1){let i=R();c(0,"div",40),A("mouseenter",function(){w(i);let o=h();return C(o.onFlyoutEnter())})("mouseleave",function(){w(i);let o=h();return C(o.onItemLeave())}),c(1,"a",41),A("click",function(){w(i);let o=h();return C(o.closeFlyout())}),c(2,"span",42)(3,"mat-icon"),f(4),p()(),c(5,"span",43)(6,"span",44),f(7),y(8,"transloco"),p(),c(9,"span",45),f(10),y(11,"transloco"),p()()(),S(12,My,4,0),p()}if(n&2){let i=e,t=h();
3xe("top",i.top,"px"),d(),Z("routerLink",i.item.route),d(3),T(i.item.icon),d(3),T(v(8,7,i.item.titleKey)),d(3),T(v(11,9,i.item.descKey)),d(2),M(t.subNavFor(i.item.id).length>0?12:-1)}}var Zm={photographer:[{id:"sessions",titleKey:"rail.subnav.sessions",icon:"photo_library",slug:"photographer/sessions"},{id:"design",titleKey:"rail.subnav.design",icon:"psychology",slug:"photographer/design"},{id:"gallery",titleKey:"rail.subnav.myPhotos",icon:"collections",slug:"gallery",tabId:"photographer"}],"video-maker":[{id:"use-cases",titleKey:"rail.subnav.styles",icon:"video_call",slug:"video-maker/use-cases"},{id:"design",titleKey:"rail.subnav.design",icon:"edit_note",slug:"video-maker/generate/pixverse-v5"},{id:"seedance",titleKey:"rail.subnav.seedanceStudio",icon:"auto_awesome",slug:"video-maker/seedance"},{id:"gallery",titleKey:"rail.subnav.myVideos",icon:"video_library",slug:"gallery",tabId:"videos"}],"photo-editor":[{id:"use-cases",titleKey:"rail.subnav.useCases",icon:"auto_fix_high",slug:"photo-editor/use-cases"},{id:"design",titleKey:"rail.subnav.design",icon:"psychology",slug:"photo-editor/design"},{id:"gallery",titleKey:"rail.subnav.myPhotos",icon:"photo_library",slug:"gallery",tabId:"photos"}],"voice-creator":[{id:"use-cases",titleKey:"rail.subnav.voices",icon:"mic",slug:"voice-creator/use-cases"},{id:"design",titleKey:"rail.subnav.design",icon:"edit_note",slug:"voice-creator/generate/minimax-speech-hd"},{id:"clone",titleKey:"rail.subnav.clone",icon:"record_voice_over",slug:"voice-creator/clone"}],"music-creator":[{id:"use-cases",titleKey:"rail.subnav.styles",icon:"queue_music",slug:"music-creator/use-cases"},{id:"design",titleKey:"rail.subnav.design",icon:"edit_note",slug:"music-creator/design/minimax-music"}],creator:[{id:"templates",titleKey:"rail.subnav.templates",icon:"grid_view",slug:"creator/templates"},{id:"runs",titleKey:"rail.subnav.creations",icon:"movie_filter",slug:"creator/runs"},{id:"library",titleKey:"rail.subnav.library",icon:"category",slug:"creator/library"}],"image-generator":[{id:"use-cases",titleKey:"rail.subnav.useCases",icon:"grid_view",slug:"image-generator/use-cases"},{id:"design",titleKey:"rail.subnav.design",icon:"edit_note",slug:"image-generator/generate/flux-1-1-pro"},{id:"gallery",titleKey:"rail.subnav.myImages",icon:"photo_library",slug:"gallery",tabId:"photos"}]},ky=70,Ey=180,Oy=320,Jm=(()=>{let e=class e{constructor(){this.transloco=u(Q),this.wallet=u(ri),this.router=u(G),this.userService=u(lt),this.galleryTabService=u(Ko),this.creatorAvailability=u(Ki),this.guidedCreator=u(At),this.expanded=X(this.readPersistedExpanded()),this.flyout=X(null),this.hoveredSubId=X(null),this.currentUrl=oc(this.router.events.pipe(we(t=>t instanceof Le),xi(()=>this.router.url),Zs(this.router.url)),{initialValue:this.router.url}),this.lang=I(()=>this.transloco.getActiveLang()),this.createRoute=I(()=>`/${this.lang()}/studio/inspire/image-generator`),this.walletRoute=I(()=>`/${this.lang()}/studio/wallet`),this.settingsRoute=I(()=>`/${this.lang()}/studio/profile`),this.tokenBalance=this.wallet.tokenBalance,this.userName=I(()=>{let t=this.userService.currentUser?.displayName??"";return t.trim()?t.trim():this.userService.currentUser?.email??""}),this.userInitialFromEmail=I(()=>{let t=this.userService.currentUser?.email??"";return((this.userService.currentUser?.displayName??"").trim()||t).charAt(0).toUpperCase()||"U"}),this.activeAppId=I(()=>{let o=this.currentUrl().split("?")[0].split("/"),r=o.indexOf("studio");return r!==-1?o[r+1]??"":""}),this.activeSubNav=I(()=>Zm[this.activeAppId()]??[]),this.workspaceItems=I(()=>{let t=this.lang(),o=K.apps,r=[{id:"home",titleKey:"rail.home",shortKey:"rail.short.home",descKey:"rail.desc.home",icon:"home",route:`/${t}/studio/home`}];return o.photographer&&r.push({id:"photographer",titleKey:"multiApps.photographer",shortKey:"rail.short.photographer",descKey:"multiApps.photographerDesc",icon:"photo_camera",route:`/${t}/studio/photographer`}),o.photoEditor&&r.push({id:"photo-editor",titleKey:"multiApps.photoEditor",shortKey:"rail.short.photoEditor",descKey:"multiApps.photoEditorDesc",icon:"auto_fix_high",route:`/${t}/studio/photo-editor`}),o.imageGenerator&&r.push({id:"image-generator",titleKey:"multiApps.imageGenerator",shortKey:"rail.short.imageGenerator",descKey:"multiApps.imageGeneratorDesc",icon:"image_search",route:`/${t}/studio/image-generator`}),o.videoMaker&&r.push({id:"video-maker",titleKey:"multiApps.videoMaker",shortKey:"rail.short.videoMaker",descKey:"multiApps.videoMakerDesc",icon:"videocam",route:`/${t}/studio/video-maker`}),o.voiceCreator&&r.push({id:"voice-creator",titleKey:"multiApps.voiceCreator",shortKey:"rail.short.voiceCreator",descKey:"multiApps.voiceCreatorDesc",icon:"graphic_eq",route:`/${t}/studio/voice-creator`}),o.musicCreator&&r.push({id:"music-creator",titleKey:"multiApps.musicCreator",shortKey:"rail.short.musicCreator",descKey:"multiApps.musicCreatorDesc",icon:"library_music",route:`/${t}/studio/music-creator`}),o.creator&&this.creatorAvailability.flagEnabled()&&r.push({id:"creator",titleKey:"multiApps.creator",shortKey:"rail.short.creator",descKey:"multiApps.creatorDesc",icon:"auto_fix_high",route:`/${t}/studio/creator`}),r}
3),this.libraryItems=I(()=>[{id:"gallery",titleKey:"rail.library.allMedia",shortKey:"rail.short.gallery",descKey:"rail.desc.gallery",icon:"photo_album",route:`/${this.lang()}/studio/gallery`}]),this.discoverItems=I(()=>{let t=this.lang(),o=K.apps,r=[];return o.inspire&&r.push({id:"inspire",titleKey:"multiApps.inspire",shortKey:"rail.short.inspire",descKey:"rail.desc.inspire",icon:"auto_awesome_motion",route:`/${t}/studio/inspire`}),r}),this.secondaryItems=I(()=>[...this.libraryItems(),...this.discoverItems()])}openGuidedCreator(){this.guidedCreator.open()}subNavRoute(t){return`/${this.lang()}/studio/${t}`}subNavFor(t){return Zm[t]??[]}onSubNavClick(t){t.tabId&&this.galleryTabService.set(t.tabId),this.closeFlyout()}goToWallet(){this.router.navigateByUrl(this.walletRoute())}toggle(){let t=!this.expanded();this.expanded.set(t),this.closeFlyout();try{localStorage.setItem("newDesktopRail.expanded",t?"1":"0")}catch{}}onItemEnter(t,o){clearTimeout(this.closeTimer),clearTimeout(this.openTimer);let r=o.currentTarget;this.openTimer=setTimeout(()=>{this.openFlyout(t,r)},ky)}onSlimItemClick(t,o){if(this.subNavFor(t.id).length===0){this.closeFlyout();return}o.preventDefault(),o.stopPropagation(),clearTimeout(this.openTimer),clearTimeout(this.closeTimer),this.openFlyout(t,o.currentTarget)}onItemLeave(){clearTimeout(this.openTimer),clearTimeout(this.closeTimer),this.closeTimer=setTimeout(()=>this.flyout.set(null),Ey)}onFlyoutEnter(){clearTimeout(this.closeTimer)}closeFlyout(){clearTimeout(this.openTimer),clearTimeout(this.closeTimer),this.flyout.set(null),this.hoveredSubId.set(null)}ngOnDestroy(){clearTimeout(this.openTimer),clearTimeout(this.closeTimer)}readPersistedExpanded(){try{let t=localStorage.getItem("newDesktopRail.expanded");if(t!==null)return t==="1"}catch{}return!0}openFlyout(t,o){let r=o.getBoundingClientRect(),a=Math.max(8,Math.min(r.top,window.innerHeight-Oy));this.flyout.set({item:t,top:a})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-desktop-rail"]],decls:4,vars:4,consts:[[1,"rail",3,"keydown.escape"],[1,"rail__flyout",3,"top"],["type","button",1,"railx__cta",3,"click"],[1,"railx__cta-icon"],[1,"railx__nav","desk-scroll"],[1,"railx__section"],[1,"railx__list"],[1,"railx__li",3,"railx__li--open"],[1,"railx__li"],[1,"railx__footer"],[1,"rail__avatar","railx__avatar",3,"routerLink"],[1,"railx__user"],[1,"railx__user-name"],["type","button",1,"rail__user-tokens","railx__tokens",3,"click"],["type","button",1,"railx__toggle",3,"click"],[1,"rtl-flip"],["routerLinkActive","rail__item--active",3,"routerLink","routerLinkActiveOptions"],[1,"railx__badge"],[1,"railx__label"],[1,"railx__chevron"],[3,"class"],["routerLinkActive","railx__subitem--active",1,"railx__subitem",3,"click","routerLink","routerLinkActiveOptions"],[1,"railx__subitem-icon"],["routerLinkActive","rail__item--active",3,"routerLink"],["type","button",1,"rail__cta",3,"click","mouseenter"],[1,"rail__cta-tile"],[1,"rail__cta-icon"],[1,"rail__micro-label"],[1,"rail__nav","desk-scroll"],[1,"rail__list"],[1,"rail__li"],[1,"rail__divider"],[1,"rail__footer"],["type","button",1,"rail__user-tokens",3,"click"],[1,"rail__avatar",3,"routerLink"],["type","button",1,"rail__bottom-toggle",3,"click"],[1,"rail__li",3,"mouseenter","mouseleave","focusin","focusout"],["routerLinkActive","rail__item--active",1,"rail__item",3,"click","routerLink","routerLinkActiveOptions"],[1,"rail__tile"],[1,"rail__item-icon"],[1,"rail__flyout",3,"mouseenter","mouseleave"],[1,"rail__flyout-header",3,"click","routerLink"],[1,"rail__flyout-badge"],[1,"rail__flyout-heading"],[1,"rail__flyout-title"],[1,"rail__flyout-desc"],[1,"rail__flyout-sep"],[1,"rail__flyout-list"],["routerLinkActive","rail__flyout-item--active",1,"rail__flyout-item",3,"click","routerLink","routerLinkActiveOptions"],[1,"rail__flyout-icon"],[1,"rtl-flip","rail__flyout-arrow"]],template:function(o,r){if(o&1&&(c(0,"aside",0),A("keydown.escape",function(){return r.closeFlyout()}),S(1,by,39,29)(2,Cy,31,21),S(3,Ty,13,11,"div",1),p()),o&2){let a;ie("rail--expanded",r.expanded()),d(),M(r.expanded()?1:2),d(2),M((a=!r.expanded()&&r.flyout())?3:-1,a)}},dependencies:[ke,ae,pe,ei,Wi,ti,ee],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;height:100%;overflow:hidden}.rail[_ngcontent-%COMP%]{width:var(--desk-rail-width, 96px);height:100%;display:flex;flex-direction:column;align-items:stretch;padding:14px 8px 10px;gap:10px;background:var(--bg-elev-1, var(--color-surface));border-inline-end:1px solid var(--color-border);transition:width .22s cubic-bezier(.2,0,0,1)}.rail--expanded[_ngcontent-%COMP%]{width:264px;padding:16px 12px 12px;gap:14px}.rail__cta[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:5px;text-decoration:none;flex-shrink:0;border:none;background:transparent;padding:0;font:inherit;cursor:pointer}.rail__cta[_ngcontent-%COMP%]:hover   .rail__cta-tile[_ngcontent-%COMP%]{filter:brightness(1.1);box-shadow:0 14px 36px #8b5cf673;transform:translateY(-1px)}.rail__cta-tile[_ngcontent-%COMP%]{width:46px;height:46px;border-radius:15px;
3display:flex;align-items:center;justify-content:center;background:var(--brand-gradient);color:#fff;box-shadow:var(--shadow-cta, 0 8px 28px rgba(139, 92, 246, .32));transition:all .18s cubic-bezier(.2,.8,.2,1)}.rail__cta-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.rail__cta[_ngcontent-%COMP%]   .rail__micro-label[_ngcontent-%COMP%]{color:var(--fg-1);font-weight:600}.rail__nav[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:8px;scrollbar-width:thin;scrollbar-color:var(--color-border) transparent}.rail__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:3px}.rail__li[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.rail__divider[_ngcontent-%COMP%]{height:1px;width:32px;margin:0 auto;background:var(--color-border);flex-shrink:0}.rail__item[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;padding:2px 0;text-decoration:none;color:var(--fg-2)}.rail__item[_ngcontent-%COMP%]:hover{color:var(--fg-1)}.rail__item[_ngcontent-%COMP%]:hover   .rail__tile[_ngcontent-%COMP%]{background:var(--color-hover)}.rail__tile[_ngcontent-%COMP%]{width:44px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:transparent;transition:background-color .16s cubic-bezier(.2,0,0,1),color .16s cubic-bezier(.2,0,0,1)}.rail__item-icon[_ngcontent-%COMP%]{font-size:21px;width:21px;height:21px;color:inherit}.rail__micro-label[_ngcontent-%COMP%]{font-size:10px;font-weight:500;line-height:1.2;letter-spacing:.01em;max-width:84px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}.rail__item--active[_ngcontent-%COMP%]{color:var(--color-text-primary)}.rail__item--active[_ngcontent-%COMP%]   .rail__tile[_ngcontent-%COMP%]{background:var(--desk-accent-soft, rgba(139, 92, 246, .16))}.rail__item--active[_ngcontent-%COMP%]   .rail__item-icon[_ngcontent-%COMP%]{color:var(--desk-accent, #8b5cf6)}.rail__item--active[_ngcontent-%COMP%]   .rail__micro-label[_ngcontent-%COMP%]{font-weight:600}.rail__item--active[_ngcontent-%COMP%]:before{content:"";position:absolute;inset-inline-start:-8px;top:6px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:var(--brand-gradient)}.rail__sublist[_ngcontent-%COMP%]{list-style:none;margin:4px 0 2px;padding:4px;display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:12px;background:var(--color-muted-bg)}.rail__subitem[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:28px;border-radius:8px;color:var(--fg-3);text-decoration:none;transition:background-color .12s ease,color .12s ease}.rail__subitem[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--color-text-secondary)}.rail__subitem--active[_ngcontent-%COMP%]{background:var(--color-active);color:var(--desk-accent, #8b5cf6)}.rail__subitem-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rail__footer[_ngcontent-%COMP%]{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:8px;flex-shrink:0}.rail__user-tokens[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;padding:4px 10px;border-radius:999px;border:1px solid var(--color-border);background:var(--color-muted-bg);color:var(--fg-2);font-size:11px;font-weight:600;cursor:pointer;transition:background-color .14s ease,color .14s ease}.rail__user-tokens[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px;color:var(--desk-accent, #8b5cf6)}.rail__user-tokens[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--fg-1)}.rail__avatar[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%;background:var(--brand-gradient);display:flex;align-items:center;justify-content:center;color:#fff;font-size:13px;font-weight:700;flex-shrink:0;text-transform:uppercase;text-decoration:none;cursor:pointer;transition:filter .14s ease}.rail__avatar[_ngcontent-%COMP%]:hover{filter:brightness(1.12)}.rail__flyout[_ngcontent-%COMP%]{position:fixed;inset-inline-start:calc(var(--desk-rail-width, 96px) + 6px);z-index:60;min-width:236px;max-width:300px;padding:8px;border-radius:14px;background:var(--desk-bg-elev-3, var(--color-surface-elevated));border:1px solid var(--color-border);box-shadow:0 4px 12px #0000001f,0 16px 48px #0000003d;animation:_ngcontent-%COMP%_rail-flyout-in .14s cubic-bezier(.2,.8,.2,1)}.rail__flyout[_ngcontent-%COMP%]:before{content:"";position:absolute;inset-inline-start:-10px;top:0;bottom:0;width:10px}@keyframes _ngcontent-%COMP%_rail-flyout-in{0%{opacity:0;transform:translate(-6px)}to{opacity:1;transform:translate(0)}}@keyframes _ngcontent-%COMP%_rail-flyout-in-rtl{0%{opacity:0;transform:translate(6px)}to{opacity:1;transform:translate(0)}}[dir=rtl][_nghost-%COMP%]   .rail__flyout[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .rail__flyout[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_rail-flyout-in-rtl}.rail__flyout-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px;text-decoration:none;transition:background-color .12s ease}.rail__flyout-header[_ngcontent-%COMP%]:hover{background:var(--color-hover)}.rail__flyout-badge[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:var(--desk-accent-soft, rgba(139, 92, 246, .16));color:var(--desk-accent, #8b5cf6);flex-shrink:0}.rail__flyout-badge[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:19px;width:19px;height:19px}.rail__flyout-heading[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1px;min-width:0}.rail__flyout-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--fg-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rail__flyout-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--fg-3);line-height:1.35}.rail__flyout-sep[_ngcontent-%COMP%]{height:1px;margin:6px 8px;background:var(--color-border)}.rail__flyout-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px}.rail__flyout-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:9px;color:var(--fg-2);text-decoration:none;font-size:13px;font-weight:500;transition:background-color .12s ease,color .12s ease}.rail__flyout-item[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--fg-1)}.rail__flyout-item[_ngcontent-%COMP%]:hover   .rail__flyout-arrow[_ngcontent-%COMP%]{opacity:1;transform:translate(0)}.rail__flyout-item--hovered[_ngcontent-%COMP%]{background:var(--color-hover);color:var(--fg-1)}.rail__flyout-item--hovered[_ngcontent-%COMP%]   .rail__flyout-arrow[_ngcontent-%COMP%]{opacity:1;transform:translate(0)}.rail__flyout-item--active[_ngcontent-%COMP%]{background:var(--color-active);color:var(--color-text-primary)}.rail__flyout-item--active[_ngcontent-%COMP%]   .rail__flyout-icon[_ngcontent-%COMP%]{color:var(--desk-accent, #8b5cf6)}.rail__flyout-icon[_ngcontent-%COMP%]{font-size:17px;width:17px;height:17px;color:var(--fg-3);flex-shrink:0}.rail__flyout-arrow[_ngcontent-%COMP%]{margin-inline-start:auto;font-size:16px;width:16px;height:16px;color:var(--fg-3);opacity:0;transform:translate(-3px);transition:opacity .12s ease,transform .12s ease}.rail__bottom-toggle[_ngcontent-%COMP%]{width:44px;height:34px;margin:0 auto;border-radius:11px;display:flex;align-items:center;justify-content:center;color:var(--fg-2);background:var(--color-muted-bg);border:1px solid var(--color-border);cursor:pointer;flex-shrink:0;transition:background-color .14s ease,color .14s ease}.rail__bottom-toggle[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.rail__bottom-toggle[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--fg-1)}.railx__accent--photographer[_ngcontent-%COMP%]{--app-accent: var(--photographer-brand-color)}
3.railx__accent--photo-editor[_ngcontent-%COMP%]{--app-accent: var(--photo-editor-brand-color)}.railx__accent--video-maker[_ngcontent-%COMP%]{--app-accent: var(--video-maker-brand-color)}.railx__accent--voice-creator[_ngcontent-%COMP%]{--app-accent: var(--voice-creator-brand-color)}.railx__accent--music-creator[_ngcontent-%COMP%]{--app-accent: var(--music-creator-brand-color)}.railx__accent--image-generator[_ngcontent-%COMP%]{--app-accent: var(--image-generator-brand-color)}.railx__accent--home[_ngcontent-%COMP%], .railx__accent--gallery[_ngcontent-%COMP%], .railx__accent--inspire[_ngcontent-%COMP%]{--app-accent: var(--desk-accent, #8b5cf6)}.railx__cta[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:8px;height:44px;border-radius:14px;background:var(--brand-gradient);color:#fff;font-size:14px;font-weight:700;text-decoration:none;flex-shrink:0;border:none;font-family:inherit;cursor:pointer;box-shadow:var(--shadow-cta, 0 8px 28px rgba(139, 92, 246, .32));transition:all .18s cubic-bezier(.2,.8,.2,1)}.railx__cta[_ngcontent-%COMP%]:hover{filter:brightness(1.1);box-shadow:0 14px 40px #8b5cf673;transform:translateY(-1px)}.railx__cta-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.railx__nav[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:2px;animation:_ngcontent-%COMP%_railx-in .2s cubic-bezier(.2,.8,.2,1);scrollbar-width:thin;scrollbar-color:var(--color-border) transparent}@keyframes _ngcontent-%COMP%_railx-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.railx__section[_ngcontent-%COMP%]{font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--fg-3);margin:12px 6px 6px;white-space:nowrap}.railx__section[_ngcontent-%COMP%]:first-child{margin-top:0}.railx__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.railx__li--open[_ngcontent-%COMP%]{background:var(--color-muted-bg);border:1px solid var(--color-border);border-radius:14px;padding:4px;margin:2px 0}.railx__item[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;align-items:center;gap:10px;width:auto;padding:5px 8px;border-radius:11px;color:var(--fg-2);font-size:14px;font-weight:500;text-decoration:none;transition:background-color .14s ease,color .14s ease}.railx__item[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--fg-1)}.railx__item.rail__item--active[_ngcontent-%COMP%]{background:var(--color-active);color:var(--color-text-primary);font-weight:600}.railx__item.rail__item--active[_ngcontent-%COMP%]:before{content:none}.railx__badge[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:color-mix(in srgb,var(--app-accent, #8b5cf6) 13%,transparent);color:var(--app-accent, #8b5cf6)}.railx__badge[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.railx__label[_ngcontent-%COMP%]{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.railx__chevron[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:var(--fg-3);flex-shrink:0;transition:transform .18s cubic-bezier(.2,.8,.2,1)}.railx__li--open[_ngcontent-%COMP%]   .railx__chevron[_ngcontent-%COMP%]{transform:rotate(180deg)}.railx__sublist[_ngcontent-%COMP%]{list-style:none;margin:2px 0;padding-block:2px;padding-inline:26px 2px;display:flex;flex-direction:column;gap:1px;position:relative}.railx__sublist[_ngcontent-%COMP%]:before{content:"";position:absolute;inset-inline-start:19px;top:6px;bottom:6px;width:1.5px;border-radius:2px;background:color-mix(in srgb,var(--app-accent, #8b5cf6) 35%,transparent)}.railx__subitem[_ngcontent-%COMP%]{display:flex;align-items:center;gap:9px;padding:6px 8px;border-radius:9px;color:var(--fg-3);font-size:13px;font-weight:500;text-decoration:none;transition:background-color .12s ease,color .12s ease}.railx__subitem[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--color-text-secondary)}.railx__subitem--active[_ngcontent-%COMP%]{color:var(--app-accent, #8b5cf6);background:color-mix(in srgb,var(--app-accent, #8b5cf6) 10%,transparent)}.railx__subitem--active[_ngcontent-%COMP%]   .railx__subitem-icon[_ngcontent-%COMP%]{color:var(--app-accent, #8b5cf6)}.railx__subitem-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;flex-shrink:0}.railx__footer[_ngcontent-%COMP%]{margin-top:auto;display:flex;align-items:center;gap:10px;padding:8px;border-radius:14px;background:var(--color-muted-bg);border:1px solid var(--color-border);flex-shrink:0}.railx__user[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
3.railx__user-name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--fg-1);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.railx__tokens[_ngcontent-%COMP%]{padding:1px 8px}.railx__toggle[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;color:var(--fg-2);background:var(--color-muted-bg);border:1px solid var(--color-border);cursor:pointer;flex-shrink:0;transition:background-color .14s ease,color .14s ease}.railx__toggle[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.railx__toggle[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--fg-1)}'],changeDetection:0});let n=e;return n})();b();se();ve();re();On();Uo();b();se();function Py(n,e){if(n&1&&(c(0,"button",10)(1,"mat-icon",16),f(2,"sync"),p(),c(3,"span"),f(4),p()()),n&2){let i=h(),t=Si(17);Z("matMenuTriggerFor",t),d(4),V("",i.queue.activeCount()," generating")}}function Ay(n,e){if(n&1&&(c(0,"button",11)(1,"mat-icon"),f(2,"inbox"),p()()),n&2){h();let i=Si(17);Z("matMenuTriggerFor",i)}}var Xm=(()=>{let e=class e{constructor(){this.palette=u(Yo),this.queue=u(Pt),this.themeService=u(An),this.transloco=u(Q),this.walletService=u(ri),this.router=u(G),this.lang=I(()=>this.transloco.getActiveLang()),this.logoRoute=I(()=>`/${this.lang()}/studio/home`),this.tokenBalance=this.walletService.tokenBalance,this.themeToggleIcon=I(()=>this.themeService.isDark()?"light_mode":"dark_mode"),this.themeToggleLabel=I(()=>this.themeService.isDark()?"Switch to light theme":"Switch to dark theme")}openPalette(){this.palette.open()}navigateToWallet(){this.router.navigate(["/",this.transloco.getActiveLang(),"studio","wallet"])}toggleTheme(){this.themeService.toggleMode()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-studio-topbar"]],decls:28,vars:9,consts:[["queueMenu","matMenu"],[1,"topbar"],[1,"topbar__brand",3,"routerLink"],["src","/images/logo/logo.webp","alt","Photomize",1,"topbar__logo"],[1,"topbar__brand-name"],["type","button","data-testid","topbar-search",1,"topbar__search",3,"click"],[1,"topbar__search-icon"],[1,"topbar__search-input"],[1,"topbar__search-kbd"],[1,"topbar__right"],[1,"queue-pill",3,"matMenuTriggerFor"],["title","Generation queue",1,"icon-btn",3,"matMenuTriggerFor"],[1,"app-generation-queue-menu"],["type","button","data-testid","desktop-theme-toggle",1,"icon-btn","theme-toggle",3,"click","title"],[1,"token-pill",3,"click"],[1,"token-pill__icon"],[1,"queue-pill__icon","queue-pill__icon--spin"]],template:function(o,r){if(o&1){let a=R();c(0,"header",1)(1,"a",2),E(2,"img",3),c(3,"span",4),f(4,"Photomize"),p()(),c(5,"button",5),A("click",function(){return w(a),C(r.openPalette())}),c(6,"mat-icon",6),f(7,"search"),p(),c(8,"span",7),f(9),y(10,"transloco"),p(),c(11,"kbd",8),f(12,"\u2318K"),p()(),c(13,"div",9),S(14,Py,5,2,"button",10)(15,Ay,3,1,"button",11),c(16,"mat-menu",12,0),E(18,"app-generation-queue-dropdown"),p(),c(19,"button",13),A("click",function(){return w(a),C(r.toggleTheme())}),c(20,"mat-icon"),f(21),p()(),c(22,"button",14),A("click",function(){return w(a),C(r.navigateToWallet())}),c(23,"mat-icon",15),f(24,"bolt"),p(),c(25,"strong"),f(26),p()(),E(27,"user"),p()()}o&2&&(d(),Z("routerLink",r.logoRoute()),d(8),V(" ",v(10,7,"commandPalette.placeholder")," "),d(5),M(r.queue.isAnyActive()?14:15),d(5),Z("title",r.themeToggleLabel()),de("aria-label",r.themeToggleLabel()),d(2),T(r.themeToggleIcon()),d(5),T(r.tokenBalance()))},dependencies:[ae,pe,Xi,Ji,li,ei,Go,qd,ee],styles:["[_nghost-%COMP%]{display:block}.topbar[_ngcontent-%COMP%]{height:64px;display:flex;align-items:center;gap:14px;padding:0 20px;border-bottom:1px solid var(--color-border);background:var(--color-surface-overlay);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);flex-shrink:0}.topbar__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;text-decoration:none;flex-shrink:0}.topbar__logo[_ngcontent-%COMP%]{width:28px;height:28px}.topbar__brand-name[_ngcontent-%COMP%]{font-size:13px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;background:linear-gradient(120deg,var(--color-text-primary) 30%,var(--brand-primary) 80%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;white-space:nowrap}.topbar__search[_ngcontent-%COMP%]{border:none;text-align:start;flex:1;max-width:480px;margin-inline-start:16px;display:flex;align-items:center;gap:8px;height:38px;padding:0 14px;background:var(--color-muted-bg);border:1px solid var(--color-border);border-radius:10px;cursor:pointer;transition:border-color .18s ease}.topbar__search[_ngcontent-%COMP%]:focus-within{border-color:#8b5cf68c}.topbar__search-icon[_ngcontent-%COMP%]{color:var(--fg-3);font-size:18px;width:18px;height:18px;flex-shrink:0}.topbar__search-input[_ngcontent-%COMP%]{flex:1;background:transparent;border:none;outline:none;color:var(--fg-1);font-size:13px;font-family:inherit;cursor:pointer}.topbar__search-input[_ngcontent-%COMP%]::placeholder{color:var(--fg-3)}.topbar__search-kbd[_ngcontent-%COMP%]{font-family:ui-monospace,monospace;font-size:10px;color:var(--fg-3);background:var(--color-muted-bg);border:1px solid var(--color-border);border-radius:4px;padding:2px 5px;flex-shrink:0}.topbar__right[_ngcontent-%COMP%]{margin-inline-start:auto;display:flex;align-items:center;gap:6px;flex-shrink:0}.queue-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:34px;padding-block:0;padding-inline:10px 14px;border-radius:999px;background:var(--brand-gradient, linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899));color:#fff;font-size:12px;font-weight:700;border:none;cursor:pointer;font-family:inherit;box-shadow:0 8px 28px #8b5cf652;transition:filter .14s ease,box-shadow .2s ease}.queue-pill[_ngcontent-%COMP%]:hover{filter:brightness(1.1);box-shadow:0 18px 50px #8b5cf673}.queue-pill__icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.queue-pill__icon--spin[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_topbar-spin 2s linear infinite}@keyframes _ngcontent-%COMP%_topbar-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.token-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;
3height:34px;padding:0 12px;background:var(--color-muted-bg);border:1px solid var(--color-border);border-radius:999px;color:var(--color-text-secondary);font-size:12px;font-family:inherit;cursor:pointer;transition:background .12s}.token-pill[_ngcontent-%COMP%]:hover{background:var(--color-hover)}.token-pill[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:var(--color-text-primary);font-weight:700;font-size:12px}.token-pill__icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:#c084fc}.icon-btn[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--fg-2);background:transparent;border:none;cursor:pointer;transition:background-color .14s ease,color .14s ease}.icon-btn[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--color-hover);color:var(--fg-1)}.theme-toggle[_ngcontent-%COMP%]{color:var(--fg-2)}.theme-toggle[_ngcontent-%COMP%]:hover{color:var(--fg-1)}"],changeDetection:0});let n=e;return n})();b();var ef=(()=>{let e=class e{constructor(){this.router=u(G),this.appConfigService=u(Ee),this.destroy$=new Et}ngOnInit(){this.router.events.pipe(we(t=>t instanceof Le),wi(this.destroy$)).subscribe(()=>this.updateAppConfigFromRoute()),this.updateAppConfigFromRoute()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}updateAppConfigFromRoute(){let t=this.router.url.split("?")[0].split("/"),o=t.indexOf("studio");o!==-1&&t[o+1]&&this.appConfigService.setAppConfig(t[o+1])}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["app-desktop-layout"]],decls:7,vars:0,consts:[[1,"desktop-shell"],[1,"content-col"],["role","main",1,"canvas","desk-scroll"],[1,"canvas__inner"]],template:function(o,r){o&1&&(c(0,"div",0),E(1,"app-desktop-rail"),c(2,"div",1),E(3,"app-studio-topbar"),c(4,"main",2)(5,"div",3),E(6,"router-outlet"),p()()()())},dependencies:[ke,Xt,Jm,Xm],styles:["[_nghost-%COMP%]{display:block;height:100vh;overflow:hidden}.desktop-shell[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;height:100vh;overflow:hidden;background:var(--desk-bg)}.content-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;overflow:hidden}.canvas[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overflow-x:hidden}.canvas__inner[_ngcontent-%COMP%]{max-width:var(--desk-max-width, 1440px);margin:0 auto;padding:var(--desk-content-padding-y, 1.5rem) var(--desk-content-padding-x, 2rem);min-height:100%;box-sizing:border-box}"],changeDetection:0});let n=e;return n})();b();function Dy(n,e){if(n&1){let i=R();c(0,"app-onboarding-dialog",1),A("closed",function(){w(i);let o=h();return C(o.onWelcomeDialogClosed())}),p()}if(n&2){let i=h();Z("isOpen",i.showWelcomeDialog())}}function Iy(n,e){n&1&&E(0,"empty-layout")}function Ny(n,e){n&1&&E(0,"app-modern-layout")}function Fy(n,e){n&1&&E(0,"app-modern-layout")}function Ly(n,e){n&1&&E(0,"app-desktop-layout")}var Vr=(()=>{let e=class e{_isStudioHome(t){let o=t.split(/[?#]/)[0];return/^\/[a-z]{2}(-[a-z]{2})?\/studio\/home\/?$/.test(o)}_openWelcomeIfOnHome(){this._welcomePending&&this._isStudioHome(this._router.url)&&(this._welcomePending=!1,this.showWelcomeDialog.set(!0))}constructor(){this.config={layout:"modern",mode:"dark"},this._unsubscribeAll=new Et,this._activatedRoute=u(ji),this._document=u(Lt),this._router=u(G),this._cdr=u(Sn),this._appConfigService=u(Ee),this._platformService=u(De),this._paymentCatalog=u(Wc),this._generationPricing=u(xd),this._userService=u(lt),this._satisfactionPrompt=u(od),this._pushNotifications=u(Hc),this.showWelcomeDialog=X(!1),this._welcomePending=!1,this._showWelcomeDialogDebug=()=>{this.showWelcomeDialog.set(!0)},Qt(()=>{this._platformService.isDesktop(),this._updateLayout(),this._cdr.detectChanges()})}ngOnInit(){return F(this,null,function*(){this._appConfigService.getCurrentConfig()()==null&&(yield this._appConfigService.setAppConfig("photographer")),this._generationPricing.prefetch(),this.mode=this.config.mode,this._updateMode(),typeof window<"u"&&window.addEventListener("pmz:show-welcome-dialog",this._showWelcomeDialogDebug),this._userService.userProfile$.pipe(we(t=>t!==null),gt(1),wi(this._unsubscribeAll)).subscribe(t=>
3{if(this._paymentCatalog.prefetch(),!(localStorage.getItem("welcome_shown")==="true")&&!t.extra_params?.welcomeShown){this._welcomePending=!0,this._openWelcomeIfOnHome();return}this._satisfactionPrompt.maybeShowForProfile(t),this._pushNotifications.onStudioReady(t)}),this._updateLayout(),this._router.events.pipe(we(t=>t instanceof Le),wi(this._unsubscribeAll)).subscribe(()=>{this._updateLayout(),this._openWelcomeIfOnHome()})})}onWelcomeDialogClosed(){this._welcomePending=!1,this.showWelcomeDialog.set(!1),localStorage.setItem("welcome_shown","true"),this._userService.markWelcomeShown().subscribe()}ngOnDestroy(){typeof window<"u"&&window.removeEventListener("pmz:show-welcome-dialog",this._showWelcomeDialogDebug),this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}_updateLayout(){k.debug("\u{1F504} Updating layout for URL:",this._router.url);let t=this._activatedRoute;for(;t.firstChild;)t=t.firstChild;let o=this.layout;this.layout=this.config.layout,t.pathFromRoot.forEach((a,s)=>{a.routeConfig?.data?.layout&&(this.layout=a.routeConfig.data.layout,k.debug(`\u{1F4CD} Layout from route [${s}]:`,this.layout))}),this._platformService.isDesktop()&&this.layout==="modern"&&(this.layout="desktop",k.debug("\u{1F5A5}\uFE0F Auto-switched to desktop layout")),o!==this.layout&&(k.debug("\u{1F500} Layout changed:",o,"\u2192",this.layout),this._cdr.detectChanges())}_updateMode(){this._document.body.classList.remove("light","dark"),this._document.body.classList.add(this.mode)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=U({type:e,selectors:[["layout"]],decls:5,vars:5,consts:[[3,"isOpen"],[3,"closed","isOpen"]],template:function(o,r){o&1&&(S(0,Dy,1,1,"app-onboarding-dialog",0),S(1,Iy,1,0,"empty-layout"),S(2,Ny,1,0,"app-modern-layout"),S(3,Fy,1,0,"app-modern-layout"),S(4,Ly,1,0,"app-desktop-layout")),o&2&&(M(r.showWelcomeDialog()?0:-1),d(),M(r.layout==="empty"?1:-1),d(),M(r.layout==="material"?2:-1),d(),M(r.layout==="modern"?3:-1),d(),M(r.layout==="desktop"?4:-1))},dependencies:[Vm,Ym,ef,Rm],styles:[`layout{display:flex;flex:1 1 auto;width:100%;max-width:100%;min-width:0}layout>*{position:relative;display:flex;flex:1 1 auto;width:100%}layout router-outlet+*{position:relative;flex:1 1 auto;width:100%}
4`],encapsulation:2});let n=e;return n})();var tf=[{path:"studio",data:{routeId:"studio"},canActivateChild:[Dm],component:Vr,resolve:{initialData:Am},children:[{path:"paywall",canActivate:[Nt],loadComponent:()=>import("./chunk-2J6OFARA.js").then(n=>n.PaywallDispatcherComponent),data:{layout:"empty",appName:"paywall",title:"paywall.title"}},{path:"photographer/quick-subscription",canActivate:[Nt],loadComponent:()=>import("./chunk-B2THAHMV.js").then(n=>n.QuickSubscriptionRedirectComponent),data:{layout:"empty",appName:"photographer",title:"photographer.routes.subscription"}},{path:"photographer",canActivate:[Nt],loadChildren:()=>import("./chunk-FE5MWEBN.js"),data:{layout:"modern",appName:"photographer"}},{path:"video-maker",canActivate:[Nt],loadChildren:()=>import("./chunk-NR7AMZYT.js"),data:{layout:"modern",appName:"video-maker"}},{path:"photo-editor",canActivate:[Nt],loadChildren:()=>import("./chunk-QID44IUK.js"),data:{layout:"modern",appName:"photo-editor"}},{path:"voice-creator",canActivate:[Nt],loadChildren:()=>import("./chunk-NLTQT5CK.js"),data:{layout:"modern",appName:"voice-creator"}},{path:"music-creator",canActivate:[Nt],loadChildren:()=>import("./chunk-U2CXRO7G.js"),data:{layout:"modern",appName:"music-creator"}},{path:"image-generator",canActivate:[Nt],loadChildren:()=>import("./chunk-RHKVWUFZ.js"),data:{layout:"modern",appName:"image-generator"}},{path:"creator",canActivate:[Im,Nt],loadChildren:()=>import("./chunk-WMS2LDHS.js"),data:{layout:"modern",appName:"creator"}},{path:"inspire",children:[{path:"",pathMatch:"full",loadComponent:()=>import("./chunk-IJXE4ZYS.js").then(n=>n.InspireWallComponent),data:{context:"studio",restoreStudioScroll:!0}},{path:":usecase",loadChildren:()=>import("./chunk-QC5QQGDA.js").then(n=>n.INSPIRE_STUDIO_ROUTES)}]},{path:"home",loadComponent:()=>import("./chunk-GDT5KRAL.js").then(n=>n.StudioHomeComponent),data:{layout:"modern",appName:"home"}},{path:"gallery",loadComponent:()=>import("./chunk-DF5NJXDL.js").then(n=>n.UnifiedGalleryComponent),data:{layout:"modern",appName:"gallery",restoreStudioScroll:!0}},{path:"profile",loadChildren:()=>import("./chunk-YXLACKSG.js"),data:{layout:"modern",appName:"profile"}},{path:"wallet",loadChildren:()=>import("./chunk-PJUQ5NOK.js"),data:{layout:"modern",appName:"wallet"}},{path:"help",loadChildren:()=>import("./chunk-CEWQLAZQ.js"),data:{layout:"modern",appName:"faq"}},{path:"",pathMatch:"full",redirectTo:()=>`/${u(Q).getActiveLang()}/studio/home`}]}];var Fs=n=>!0;b();ve();re();ra();Ge();var Ls=(n,e)=>F(null,null,function*(){let i=u(G),t=u(ci),o=u(Q);k.log("LanguageRouteGuard: Checking URL",e.url);let r=e.url.split("?"),a=r[0],s=r.length>1?r[1]:"",l=a.split("/").filter(P=>P);if(l.length===0)return!0;let m=l[0],g=oi.includes(m);if(k.log("LanguageRouteGuard: First segment:",m),k.log("LanguageRouteGuard: Is language code:",g),g)return!0;let _=yield t.detectAndSetLanguage();k.log("LanguageRouteGuard: Detected language:",_);let D=`/${_}${a}`,x=i.createUrlTree([D]);if(s){let P={};
4new URLSearchParams(s).forEach((B,me)=>{P[me]=B}),Object.keys(P).forEach(B=>{x.queryParams[B]=P[B]})}return k.log("LanguageRouteGuard: Redirecting to:",x.toString()),x});b();ve();Pe();ra();Ge();var of=(n,e)=>F(null,null,function*(){let i=u(G),t=u(ci),o=u(ze),r=Fe(o),a=u(Qi),s=n.paramMap.get("lang");k.log("LanguageGuard: full URL:",e.url+" route url: "+n.url,"langParam: "+s);let l=e.url.split("?"),m=l[0],g=l.length>1?l[1]:"",_=m.split("/").filter(B=>B);if(r){if(nf(_)&&a.shouldRedirectToDifferentDomain())return a.checkAndRedirectAuth("sign-in",n.queryParams),!1}else nf(_)&&k.log("LanguageGuard: SSG/SSR mode - sign-in route detected, will redirect in browser");if(s&&oi.includes(s)){let B=t.getCurrentLanguage(s);return B!==s&&(k.debug("LanguageGuard: Setting language to:",B),t.changeLanguage(B,e.url)),!0}let D=yield t.detectAndSetLanguage();k.debug("LanguageGuard: Detected language:",D);let x="",P=0;_.length>0&&(oi.some(B=>B===_[0])||Ry(_[0]))&&(P=1),_.length<=P?x="sessions":x=_.slice(P).join("/");let z=i.createUrlTree([`/${D}/${x}`]);if(g){let B=i.parseUrl(e.url);Object.keys(B.queryParams).forEach(me=>{z.queryParams[me]=B.queryParams[me]}),B.fragment&&(z.fragment=B.fragment)}return z});function Ry(n){return/^[a-z]{2}(-[a-z]{2,4})?$/i.test(n)}function nf(n){return!!(n.length===1&&n[0]==="sign-in"||n.length===2&&oi.includes(n[0])&&n[1]==="sign-in")}b();kf();re();b();ve();var Rs=(()=>{let e=class e{constructor(t){this.router=t,this.capacitorInitializer=u(nc),this.transloco=u(Q)}canActivate(){if(this.capacitorInitializer.isNativePlatform()){let t=this.transloco.getActiveLang();return this.router.createUrlTree([`/${t}/sign-in`])}return!0}};e.\u0275fac=function(o){return new(o||e)(Ue(G))},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();$o();Se();var _o=(n,e)=>{let i=u(ai);return et(!0)};b();ve();re();Pe();b();Zi();jf();var yo=n=>{let e=u(G),i=u(ct),t=u(jc),o=u(Q),r=Fe(u(ze)),a=n.queryParamMap.get("next"),s=n.queryParamMap.get("prefill");if(!a||!s)return!0;if(r)try{sessionStorage.setItem($c,a),sessionStorage.setItem(qc,s)}catch{}if(i.hasImmediateAuthEvidence()){try{t.stage(JSON.parse(s))}catch{}return e.parseUrl(a)}let l=o.getActiveLang()||n.paramMap.get("lang")||"en";return e.createUrlTree([`/${l}/sign-in`],{queryParams:{next:a,prefill:s}})};Pe();b();ve();var rf=()=>u(Pn).isSesjaDomain(),Vs=(n,e)=>{let i=u(ze);if(!Fe(i)||!u(Pn).isSesjaDomain())return!0;let t=e.url.split("?")[0].split("#")[0];return t==="/pl"||t==="/pl/"||t==="/pl/fotograf-ai"||t==="/pl/photographer-ai"?u(G).parseUrl("/"):!0};ra();Ge();b();ve();Zi();var zs=(()=>{let e=class e{constructor(t,o,r,a){this.router=t,this.route=o,this.languageService=r,this.authService=a}ngOnInit(){return F(this,null,function*(){let t=this.router.url.split("?")[0];k.log("LanguageRedirect: Current URL:",this.router.url),k.log("LanguageRedirect: Full path:",t);let o=this.route.snapshot.queryParams,r=this.route.snapshot.fragment;k.log("LanguageRedirect: Query params:",o),k.log("LanguageRedirect: Fragment:",r);let a=t.split("/").filter(g=>g),s=a[0]||"",l=oi.includes(s);if(k.log("LanguageRedirect: Path segments:",a),k.log("LanguageRedirect: First segment:",s),k.log("LanguageRedirect: Has language prefix:",l),l){k.log("LanguageRedirect: URL already has language prefix, no redirect needed");return}k.log("LanguageRedirect: Starting language detection...");let m;try{let g=this.languageService.detectAndSetLanguage(),_=new Promise((D,x)=>setTimeout(()=>x(new Error("Language detection timeout")),5e3));m=yield Promise.race([g,_]),k.log(`LanguageRedirect: Language detection completed. Detected language: ${m}, redirecting...`)}catch(g){k.warn("LanguageRedirect: Language detection failed or timed out:",g),m="en",k.log(`LanguageRedirect: Using fallback language: ${m}`)}if(t==="/"||t===""){let _=this.authService.hasImmediateAuthEvidence()?"studio":"",D=_?`/${m}/${_}`:`/${m}`;k.log(`LanguageRedirect: Empty path detected, redirecting to ${D} with query params:`,o);try{let x=_?[m,_]:[m],P=yield this.router.navigate(x,{queryParams:o,fragment:r,replaceUrl:!0});k.log("LanguageRedirect: Navigation result:",P),k.log("LanguageRedirect: Current URL after navigation:",this.router.url)}catch(x){k.error("LanguageRedirect: Navigation failed:",x)}}else{let g=this.router.createUrlTree([`/${m}${t}`],{queryParams:o,fragment:r});k.log("LanguageRedirect: Created URL tree:",g.toString());try{let _=yield this.router.navigateByUrl(g,{replaceUrl:!0});k.log("LanguageRedirect: Navigation result:",_),k.log("LanguageRedirect: Current URL after navigation:",this.router.url)}catch(_){k.error("LanguageRedirect: Navigation failed:",_)}}})}ngOnDestroy(){}};e.\u0275fac=function(o){return new(o||e)(Gt(G),Gt(ji),Gt(ci),Gt(ct))},e.\u0275cmp=U({type:e,selectors:[["app-language-redirect"]],decls:0,vars:0,template:function(o,r){},encapsulation:2});let n=e;return n})();function zy(){return jd({includeBeta:!0}).map(n=>({path:n==="pl"?`${pa.pl}/:slug`:`${n}/${pa[n]}/:slug`,data:{isPublic:!0,context:"public",sessionLandingLang:n,oneTapSurface:"session_landing"},loadComponent:()=>import("./chunk-3WF3TZAR.js").then(e=>e.SessionLandingComponent)}))}function By(){return Array.from(new Set(Object.values(Wd))).map(e=>({path:`${e}/:slug`,data:{isPublic:!0,context:"public",oneTapSurface:"editor_landing"},loadComponent:()=>import("./chunk-5WF24G4Q.js").then(i=>i.EditorUseCaseLandingComponent)}))}var Uy={path:"**",loadComponent:()=>import("./chunk-KKEP5RVY.js").then(n=>n.NotFoundComponent),data:{preserveQuery:!0}};function Bs(){return[{path:"",loadComponent:()=>import("./chunk-7WLOGTH5.js").then(n=>n.LandingShellComponent),children:[{path:"",data:{isPublic:!0,seoKey:"photographAi",oneTapSurface:"photographer_landing"},loadComponent:()=>import("./chunk-LTA5MGUN.js").then(n=>n.PhotographLandingDispatcherComponent)}]}]}function af(){return[{path:"",loadComponent:()=>import("./chunk-7WLOGTH5.js").then(n=>n.LandingShellComponent),children:[{path:"",data:{isPublic:!0,seoKey:"photoEditorAi",oneTapSurface:"editor_landing"},loadComponent:()=>import("./chunk-KVAJ64Q7.js").then(n=>n.PhotoEditorLandingComponent)}]}]}var $y=(n,e)=>te(O({path:"",component:Vr,data:{layout:"empty"}},e?.length&&{canActivate:e,canActivateChild:e}),{children:n}),qy=[...tf,{path:"inspire/:usecase",data:{isPublic:!0,context:"public",oneTapSurface:"inspire"},canActivate:[yo],loadChildren:()=>import("./chunk-QC5QQGDA.js").then(n=>n.INSPIRE_PUBLIC_ROUTES)},{path:"photographer/preview/:id",data:{isPublic:!0,context:"public"},loadComponent:()=>import("./chunk-OSPPPMKE.js").then(n=>n.PhotoShootsPreviewComponent)},{path:"faq",data:{isPublic:!0,seoKey:"faq",context:"public",oneTapSurface:"faq"},loadComponent:()=>import("./chunk-5FVBHYD7.js").then(n=>n.PublicFaqComponent)},{path:"editor/preview/:id",data:{isPublic:!0,context:"public"},loadComponent:()=>import("./chunk-OVEO5WN3.js").then(n=>n.PhotoEditorPublicPreviewComponent)},{path:"",pathMatch:"full",data:{isPublic:!0,seoKey:"homeLanding",context:"public",oneTapSurface:"home_landing"},canActivate:[Vs,yo,Fs],loadChildren:()=>import("./chunk-RLDS74YU.js").then(n=>n.HOME_LANDING_ROUTES)},{path:"photographer-ai",data:{routeId:"photographer-ai"},children:Bs()},{path:"photo-editor-ai",data:{routeId:"photo-editor-ai"},children:af()},{path:"edycja-zdjec-ai",data:{routeId:"edycja-zdjec-ai"},children:af()},...By(),{path:"undefined",redirectTo:"sign-in"},{path:"dev/impersonate",loadComponent:()=>import("./chunk-JEGUHBHW.js").then(n=>n.ImpersonationComponent)},{path:"dev/impersonate/:uid",loadComponent:()=>import("./chunk-JEGUHBHW.js").then(n=>n.ImpersonationComponent)},$y([{path:"sign-in",data:{isPublic:!0,seoKey:"signIn",robots:"noindex",oneTapSurface:"sign_in"},loadComponent:()=>import("./chunk-4AO4GHXU.js").then(n=>n.AuthSignInComponent),canActivate:[_o]},{path:"sign-out",loadChildren:()=>import("./chunk-R4KQ26AP.js"),canActivate:[_o]},{path:"wallet/payment-success",loadComponent:()=>import("./chunk-CTJXX3EE.js").then(n=>n.PaymentSuccessComponent),canActivate:[_o]},{path:"wallet/payment-cancelled",loadComponent:()=>import("./chunk-LJSSN64F.js").then(n=>n.PaymentCancelledComponent),canActivate:[_o]},{path:"video/:id",data:{isPublic:!0,seoKey:"sharedVideo"},loadComponent:()=>import("./chunk-YKZGDWF2.js").then(n=>n.SharedVideoComponent)},{path:"photo/:id",data:{isPublic:!0,seoKey:"sharedPhoto"},loadComponent:()=>import("./chunk-NIXEUJKX.js").then(n=>n.SharedPhotoComponent)},{path:"audio/:id",data:{isPublic:!0,seoKey:"sharedAudio"},loadComponent:()=>import("./chunk-LYNWVVSM.js").then(n=>n.SharedAudioComponent)}])],jy=[{path:"wallet/payment-success",component:zs,canActivate:[Ls]},{path:"wallet/payment-cancelled",component:zs,canActivate:[Ls]}],sf=[{path:"",pathMatch:"full",canMatch:[rf],canActivate:[Rs,yo],data:{routeId:"fotograf-ai"},children:Bs()},{path:"",pathMatch:"full",canActivate:[Rs,yo,Fs],loadChildren:()=>import("./chunk-RLDS74YU.js").then(n=>n.HOME_LANDING_ROUTES),data:{isPublic:!0,seoKey:"homeLanding",context:"public",oneTapSurface:"home_landing"}},{path:"en",pathMatch:"full",redirectTo:"/"},{path:"app",data:{isPublic:!0},loadComponent:()=>import("./chunk-MJVW7TRC.js").then(n=>n.AppRedirectComponent)},...zy(),{path:"pl/fotograf-ai",data:{routeId:"fotograf-ai"},canActivate:[Vs],children:Bs()},{path:"pl/photographer-ai",redirectTo:"fotograf-ai"},{path:"pl/photo-editor-ai",redirectTo:"pl/edycja-zdjec-ai"},{path:":lang",canActivate:[of],children:qy},...jy,{path:"undefined",redirectTo:"sign-in"},Uy];Bi();b();Zi();var lf=(()=>{let e=class e{constructor(t){this.authService=t}initialize(){return new Promise(t=>{this.authService.authReady$.pipe(gt(1)).subscribe(()=>{t()})})}};e.\u0275fac=function(o){return new(o||e)(Ue(ct))},e.\u0275prov=H({token:e,factory:e.\u0275fac});let n=e;return n})();Pf();Nf();ve();Se();b();ve();Ot();var cf=(()=>{let e=class e{constructor(t,o){this.router=t,this.platformService=o,this.currentPath="",this.ignoreRefreshProtection=!1,this.platformService.isBrowser()&&(this.router.events.pipe(we(r=>r instanceof Le)).subscribe(r=>{this.currentPath=r.url,this.resetProtection()}),window.addEventListener("keydown",r=>{if((r.key==="r"||r.key==="R")&&(r.ctrlKey||r.metaKey)&&!this.ignoreRefreshProtection&&!this.currentPath.search("/sign-in"))return r.preventDefault(),!1},!0),window.addEventListener("beforeunload",r=>{if(!this.ignoreRefreshProtection&&!this.currentPath.search("/sign-in"))return r.preventDefault(),r.returnValue="",!1},!0))}setIgnoreRefreshProtection(t){this.ignoreRefreshProtection=t,t&&(this.resetTimeout=setTimeout(()=>{this.ignoreRefreshProtection=!1},3e4))}resetProtection(){this.resetTimeout&&clearTimeout(this.resetTimeout),this.ignoreRefreshProtection=!1}};e.\u0275fac=function(o){return new(o||e)(Ue(G),Ue(De))},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();b();b();Pe();se();Po();b();var df=(()=>
4{let e=class e{constructor(){let t=u(Ml),o=u(nd),r=u(ze);Fe(r)&&(o.addSvgIconSet(t.bypassSecurityTrustResourceUrl("icons/material-twotone.svg")),o.addSvgIconSetInNamespace("mat_outline",t.bypassSecurityTrustResourceUrl("icons/material-outline.svg")),o.addSvgIconSetInNamespace("mat_solid",t.bypassSecurityTrustResourceUrl("icons/material-solid.svg")),o.addSvgIconSetInNamespace("feather",t.bypassSecurityTrustResourceUrl("icons/feather.svg")),o.addSvgIconSetInNamespace("heroicons_outline",t.bypassSecurityTrustResourceUrl("icons/heroicons-outline.svg")),o.addSvgIconSetInNamespace("heroicons_solid",t.bypassSecurityTrustResourceUrl("icons/heroicons-solid.svg")),o.addSvgIconSetInNamespace("heroicons_mini",t.bypassSecurityTrustResourceUrl("icons/heroicons-mini.svg")))}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var uf=()=>[{provide:Js,useValue:()=>u(df),multi:!0}];Lf();Ff();Fc();Rf();Zr();b();Se();Bi();Pe();zt();En();Ge();b();var pf=(()=>{let e=class e{constructor(t,o){this.platformId=t,this.request=o,this._httpClient=u(xl)}getTranslation(t){let o=Hy(t);return o?wo([this.loadFile(o),this.loadFile(t)]).pipe(xi(([r,a])=>mf(r,a))):this.loadFile(t)}loadFile(t){if(qi(this.platformId))try{let s=Ws("fs"),l=Ws("path"),m=l.join(l.join(process.cwd(),"public","i18n"),`${t}.json`);if(s.existsSync(m)){k.log(`SSG - Loading translations from file: ${m}`);let g=s.readFileSync(m,"utf8"),_=JSON.parse(g);return et(_)}k.log(`Static translation file not found: ${m}, falling back to HTTP`)}catch(s){k.error("Error loading static translation file:",s)}let o="";if(qi(this.platformId)&&this.request&&this.request.protocol){let s=this.request.protocol,l=this.request.headers?.host||this.request.headers?.host;o=`${s}://${l}`,k.log(`SSR - detected baseUrl: ${o} for lang: ${t}`)}else qi(this.platformId)?o=K.baseUrl:o="";let a=`${o??K.baseUrl??""}/i18n/${t}.json`;return k.log(`Loading translations from HTTP: ${a}`),this._httpClient.get(a).pipe(zi(),Wt(s=>Wy(s)?(k.warn(`Transient translation load failure for ${t}:`,s),et({})):(k.error(`Error loading translations for ${t}:`,s),et({}))))}};e.\u0275fac=function(o){return new(o||e)(Ue(ze),Ue(_l,8))},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function Wy(n){return n instanceof Oo&&n.status===0}function Hy(n){let e=n.split("/"),i=e[e.length-1];return i==="en"||Tc(i)?null:(e[e.length-1]="en",e.join("/"))}function mf(n,e){let i=O({},n??{});for(let[t,o]of Object.entries(e??{})){let r=i[t];o&&typeof o=="object"&&!Array.isArray(o)&&r&&typeof r=="object"&&!Array.isArray(r)?i[t]=mf(r,o):o!==""&&o!==null&&o!==void 0&&(i[t]=o)}return i}Ge();Of();Pe();b();ia();re();En();b();var ff=(()=>{let e=class e{constructor(){this.transloco=u(Q),this.document=u(Lt),this.platformId=u(ze),this.destroyRef=u(So),this.dateAdapter=u(Bt,{optional:!0}),this.directionality=u(_c,{optional:!0}),this.started=!1}start(){this.started||!Fe(this.platformId)||(this.started=!0,this.apply(this.transloco.getActiveLang()),this.transloco.langChanges$.pipe(zo(this.destroyRef)).subscribe(t=>this.apply(t)))}apply(t){if(!kn(t))return;let o=this.document.documentElement,r=kc(t);o.getAttribute("lang")!==r&&o.setAttribute("lang",r);let a=Ec(t);o.getAttribute("dir")!==a&&o.setAttribute("dir",a);let s=this.directionality;s&&s.value!==a&&(s.valueSignal.set(a),s.change.emit(a)),this.dateAdapter?.setLocale(r)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();En();var hf={providers:[Xl(sf,tc(Jl),ec({scrollPositionRestoration:"enabled",anchorScrolling:"enabled"})),{provide:Ro,useClass:Pm},wc(()=>{try{return Cc(u(Tn),K.firebaseConfig.functionRegion)}catch(n){return k.error("Error initializing Firebase Functions:",n,K.firebaseConfig.functionRegion),null}}),dc(()=>{try{let n=u(Tn),e=vc(),i=typeof window<"u"&&window.Capacitor?.getPlatform?.()||"web";return k.log("\u{1F527} [FIREBASE] Initializing Firebase Auth..."),k.log("\u{1F527} [FIREBASE] Platform detection:",{isNativePlatform:e,platform:i}),e?(k.log("\u{1F4F1} [FIREBASE] Using initializeAuth with indexedDBLocalPersistence for native platform"),mc(n,{persistence:lc})):(k.log("\u{1F310} [FIREBASE] Using getAuth for web platform"),pc(n))}catch(n){return k.error("\u274C [FIREBASE] Error initializing Firebase Auth:",n),null}}),Gc(()=>{try{let n=Yc(u(Tn)),e=K.emulators;return K.useEmulators&&e?.firestore&&Kc(n,e.getHost(),e.firestore),n}catch(n){return k.error("Error initializing Firestore:",n),null}}),Nd(()=>{try{return Fd(u(Tn))}catch(n){return k.error("Error initializing Firebase Storage:",n),null}}),...bc(K.buildTarget||"auto"),{provide:Ic,useFactory:Nc,deps:[wn]}
4,Dc,Ac,Bo,lf,cf,Om(),wl(Cl()),uf(),gc({config:{availableLangs:Mc.map(n=>({id:n.code,label:n.nativeLabel})),defaultLang:"en",fallbackLang:"en",reRenderOnLangChange:!0,prodMode:!0},loader:pf}),Pc,{provide:Kr,useFactory:()=>{let n=u(Pt),e=u(Mp),i=u(Ap),t=u(Pp),o=u(Tp),r=u(kp),a=u(Ep),s=u(Op),l=u(bp),m=u(Dp),g=u(Sp);return()=>{n.registerPoller("music",e),n.registerPoller("voice",i),n.registerPoller("voice-clone",i),n.registerPoller("video",t),n.registerPoller("photo-edit",o),n.registerPoller("photo-session",r),n.registerPoller("photo-shoot",a),n.registerPoller("model-training",s),n.registerPoller("image",l),n.registerPoller("workflow",m),g.initialize()}},multi:!0},{provide:Kr,useFactory:()=>{let n=u(ff);return()=>n.start()},multi:!0},...K.buildTarget!=="mobile"?[kl(Tl())]:[]]};yt();Ge();var gf="pmz_chunk_reload_at",Gy=120*1e3,Ky=["importing a module script failed","failed to fetch dynamically imported module","error loading dynamically imported module"];function Yy(n){let e=new Set,i=n;for(;i&&!e.has(i);){e.add(i);let t=(typeof i=="string"?i:i?.message??"").toLowerCase();if(Ky.some(o=>t.includes(o)))return!0;i=i?.rejection??i?.cause}return!1}var zr=class{constructor(){this.sentryHandler=Qd()}handleError(e){if(this.sentryHandler.handleError(e),!Yy(e)||typeof window>"u"||window.Capacitor?.isNativePlatform?.())return;let i=0;try{i=Number(sessionStorage.getItem(gf))||0}catch{return}if(Date.now()-i<Gy){k.warn("[CHUNK-RECOVERY] chunk load failed again right after a reload \u2014 not reloading");return}try{sessionStorage.setItem(gf,String(Date.now()))}catch{return}k.warn("[CHUNK-RECOVERY] stale chunk detected \u2014 reloading for a fresh index"),window.location.reload()}};var Zy="reuseOnQueryChange",Br=class{shouldDetach(){return!1}store(){}shouldAttach(){return!1}retrieve(){return null}shouldReuseRoute(e,i){return e.routeConfig===i.routeConfig&&_f(e)&&_f(i)&&Jy(e,i)}};function Qy(n){let e=n;for(;e.firstChild;)e=e.firstChild;return e}function _f(n){return Qy(n).data?.[Zy]===!0}function Jy(n,e){let i=n,t=e;for(;i&&t;){if(i.routeConfig!==t.routeConfig||JSON.stringify(i.params)!==JSON.stringify(t.params))return!1;let o=i.url.map(a=>a.path).join("/"),r=t.url.map(a=>a.path).join("/");if(o!==r)return!1;i=i.firstChild,t=t.firstChild}return i===null&&t===null}Ge();Fc();var Xy={providers:[rc(()=>{try{let n=ac(K.firebaseConfig);return n.automaticDataCollectionEnabled=!0,n}catch(n){throw k.error("Error getting Firebase app in app.config.ts:",n),n}}),{provide:Xs,useClass:zr},{provide:Jd,deps:[G]},{provide:Ql,useClass:Br},{provide:Bt,useClass:yp},{provide:Zo,useValue:{parse:{dateInput:"D"},display:{dateInput:"DDD",monthYearLabel:"LLL yyyy",dateA11yLabel:"DD",monthYearA11yLabel:"LLLL yyyy"}}},{provide:vp,useValue:{duration:4e3,panelClass:"snackbar-safe-area",verticalPosition:"top"}},rl(()=>F(null,null,function*(){let n=[],e=u(Q),i=u(ci),t=u(Ee),o=u(Vo);u(An);let r=u(Bo);setTimeout(()=>{o.info("Initializing payment system in background..."),r.initialize()},0);let a=yield i.detectAndSetLanguage();o.debug("Translation loading for",a),n.push(ue(e.load(a))),n.push(t.preloadAppTranslations());let l=[{scope:"photograph-landing",alias:"landing"}].map(_=>F(null,[_],function*({scope:m,alias:g}){try{let D=`${m}/${a}`,x=yield ue(e.load(D));if(g){let P=e.getTranslation(e.getActiveLang());P[g]=x,e.setTranslation(P,e.getActiveLang())}return x}catch(D){return o.error(`Failed to load legacy scoped translation: ${m}/${a}`,D),{}}}));n.push(...l),yield Promise.all(n)})),An]},yf=gl(Xy,hf);Ge();Af();En();function vf(){if(typeof window>"u"||window.location.hash||!ev(window.location.pathname))return()=>{};let n=window.scrollY;if(n<=0)return()=>{};let e=!1,i=[],t=()=>{e=!0},o={capture:!0,passive:!0},r={capture:!0,passive:!1};window.addEventListener("wheel",t,o),window.addEventListener("touchmove",t,o),window.addEventListener("pointerdown",t,o),window.addEventListener("keydown",t,r);let a=()=>{!e&&window.scrollY<n&&window.scrollTo({top:n,behavior:"auto"})};for(let l of[0,50,150,300,600,1e3,1500,2e3])i.push(setTimeout(a,l));let s=()=>{i.forEach(l=>clearTimeout(l)),window.removeEventListener("wheel",t,o),window.removeEventListener("touchmove",t,o),window.removeEventListener("pointerdown",t,o),window.removeEventListener("keydown",t,r)};return i.push(setTimeout(s,2500)),s}
4function ev(n){let e=n.split("/").filter(Boolean);return e.length===0||e.length===1&&kn(e[0])||e.length===1&&e[0]==="photographer-ai"?!0:e.length===2&&kn(e[0])&&["photographer-ai","fotograf-ai"].includes(e[1])}zt();xc();k.debug("Sentry config \u2014 enableSentry:",K.enableSentry,"dsn:",K.sentry?.dsn);K.enableSentry&&K.sentry?(k.debug("\u{1F6A8} Initializing Sentry with config:",{dsn:K.sentry.dsn,environment:K.sentry.environment,tracesSampleRate:K.sentry.tracesSampleRate}),ic({dsn:K.sentry.dsn,integrations:[Fo({console:!1}),ta(),Wl()],tracesSampleRate:K.sentry.tracesSampleRate||1,tracePropagationTargets:K.sentry.tracePropagationTargets||["localhost",/^https:\/\/photomize\.ai/,/^https:\/\/sesjazdjeciowa\.ai/],replaysSessionSampleRate:K.sentry.replaysSessionSampleRate||.1,replaysOnErrorSampleRate:K.sentry.replaysOnErrorSampleRate||1,environment:K.sentry.environment||"development",sendDefaultPii:!0,attachStacktrace:!0},Yd),k.debug("\u2705 Sentry initialized successfully")):k.debug("Sentry not initialized (enableSentry:",K.enableSentry+")");var tv="theme-mode",bf="dark";function xf(){try{let n=window.localStorage?.getItem(tv);return n==="light"||n==="dark"?n:bf}catch{return bf}}function iv(){let n=xf(),e=document.documentElement;e.classList.remove("light","dark"),e.classList.add(n),e.style.colorScheme=n,e.setAttribute("data-theme",n),document.documentElement.setAttribute("data-theme-initialized","true"),k.debug("Theme applied:",n)}function nv(){let n=document.documentElement,e=n.classList.contains("light"),i=n.classList.contains("dark");if(e&&i||!e&&!i){let r=xf();k.warn("\u26A0\uFE0F Theme root class mismatch, applying:",r),n.classList.remove("light","dark"),n.classList.add(r),n.style.colorScheme=r}let t=n.classList.contains("light")?"light":"dark";n.setAttribute("data-theme",t),n.style.colorScheme=t;let o=document.body;(o.classList.contains("light")||o.classList.contains("dark"))&&(o.classList.remove("light","dark"),o.removeAttribute("data-theme")),k.debug("Theme verified")}var vo=performance.now(),Ur,Us;window.appStartupTiming={startTime:vo,getBootstrapTime:()=>Ur,getAppReadyTime:()=>Us,setAppReadyTime:n=>{Us=n},reportStartupMetrics:()=>{let n=Ur-vo,e=Us-vo;return k.log(`\u{1F4CA} App Startup Metrics:
5        - Bootstrap: ${n.toFixed(2)}ms
6        - Total to Ready: ${e.toFixed(2)}ms`),K.enableSentry&&window.Sentry&&(window.Sentry.addBreadcrumb({category:"performance",message:"App startup timing",data:{bootstrapDuration:n,totalStartupDuration:e,startTime:vo},level:"info"}),window.Sentry.setTag("startup_performance","measured"),window.Sentry.setContext("startup_timing",{bootstrap_ms:n,total_startup_ms:e})),{bootstrapDuration:n,totalStartupDuration:e}}};function ov(){return F(this,null,function*(){iv(),nv();let n=vf();try{yield bl(lu,yf),Ur=performance.now(),k.debug(`Bootstrap completed in ${(Ur-vo).toFixed(2)}ms`),setTimeout(()=>{rv()},0),setTimeout(n,2600),k.debug("Application bootstrapped successfully")}catch(e){throw n(),k.error("\u274C Application bootstrap failed:",e),e}})}function rv(){let n=document.documentElement;n.setAttribute("data-theme-loaded","true"),n.classList.add("theme-ready"),k.debug("Theme marked as fully loaded")}ov();
7//# sourceMappingURL=main-FU2W7LZZ.js.map
8
9//# debugId=e7d83a54-f5ee-556c-9ef8-bbe4a5c00576

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.