PageSourceSearch

https://hou.la/chunk-DVDFK3D4.js

js hou.la collected 2026-10-02 16:01:25 UTC 90,636 bytes, 2 lines download raw bytes

1import{A as _t,B as ce,C as mt,D as de,E as Y,F as gt,G as ut,d as $e,e as Qe,g as Xe,i as Ze,j as se,k as Je,l as et,m as tt,n as it,o as nt,p as ie,q as ot,r as at,s as rt,t as lt,u as pt,v as Q,w as st,x as ct,y as ne,z as dt}from"./chunk-COBNBFGF.js";import"./chunk-P52SAZ7N.js";import{a as qe,c as je,d as Ye}from"./chunk-G3PWCLSY.js";import{a as te}from"./chunk-372BPJQ3.js";import"./chunk-AFVSMPBC.js";import{a as Ge}from"./chunk-PCQZQ3U4.js";import{a as We}from"./chunk-L5UCCCD4.js";import{a as ft,b as Ct,c as ht}from"./chunk-2PXMVGFY.js";import"./chunk-JUAHV2TC.js";import{a as Me}from"./chunk-RMFEZUNF.js";import"./chunk-BXOGPMZZ.js";import"./chunk-NRC4EHFH.js";import{a as De}from"./chunk-S2LG7ZZI.js";import{a as pe}from"./chunk-FRZHUY6N.js";import{h as Ae}from"./chunk-32B64V2R.js";import"./chunk-3XLVKQRY.js";import"./chunk-DJ5AJG3T.js";import"./chunk-SLPC3Y4V.js";import"./chunk-XIRWNEM2.js";import"./chunk-AAORKXGN.js";import{a as Ie}from"./chunk-KDGXQRVY.js";import{D as Fe,c as Re,g as Ue,h as Le,j as Be,l as He,m as ze,t as Ve,u as Ke,v as Ne}from"./chunk-Q2KKZV5J.js";import"./chunk-JICM7NVH.js";import"./chunk-AB6CKZTE.js";import{c as D,d as G,e as W}from"./chunk-DIGPPQJE.js";import{o as we,r as Oe,x as Te}from"./chunk-EU6HCBUP.js";import"./chunk-KAJMKXZ6.js";import{D as F,j as ke,m as Ee}from"./chunk-ZAQTNZYS.js";import{c as N}from"./chunk-SRTXE2HR.js";import{Ba as k,Dc as H,Ec as z,Fa as j,Fc as V,Ib as P,Jb as v,Lb as O,Lc as R,Na as xe,Rb as u,Tb as $,Ub as I,Uc as c,Vb as A,Vc as d,Wb as r,Wc as M,Xb as l,Yb as g,_a as ye,ac as S,cb as be,da as b,db as o,dd as Se,gc as y,hc as s,la as h,ld as E,ma as x,nc as Z,oc as J,p as L,pc as ee,sa as he,sb as K,uc as p,va as B,vc as m,wa as q,wc as f,xc as Pe,yb as C,yc as ve}from"./chunk-NTTV6FWH.js";import{a as U,b as X,c as Ce,g as w}from"./chunk-W7GRJBO5.js";var St=["mapEl"],kt=i=>({count:i}),Et=(i,t)=>t.id;function wt(i,t){i&1&&(r(0,"p",14),g(1,"i",22),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.RELAY_LOADING")," "))}function Ot(i,t){i&1&&(r(0,"p",15),g(1,"i",23),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.RELAY_NONE")," "))}function Tt(i,t){i&1&&(r(0,"span",28),g(1,"i",33),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.RELAY_CHEAPEST")," "))}function Mt(i,t){if(i&1&&(r(0,"span",30),p(1),l()),i&2){let e=s().$implicit,n=s(2);o(),m(n.distance(e))}}function It(i,t){if(i&1&&p(0),i&2){let e=s(3);f(" ",e.price(t.priceCents)," ")}}function At(i,t){i&1&&(p(0),c(1,"translate")),i&2&&f(" ",d(1,1,"APP.PRODUCT.UNAVAILABLE")," ")}function Rt(i,t){if(i&1){let e=S();r(0,"li")(1,"button",24),y("click",function(){let a=h(e).$implicit,_=s(2);return x(_.choose(a))}),r(2,"span",25)(3,"span",26)(4,"strong"),p(5),l(),r(6,"span",27),p(7),c(8,"translate"),l(),C(9,Tt,4,3,"span",28),l(),r(10,"span",29),p(11),l(),r(12,"span",30),p(13),l(),C(14,Mt,2,1,"span",30),l(),r(15,"span",31),C(16,It,1,1)(17,At,2,3),g(18,"i",32),l()()()}if(i&2){let e,n=t.$implicit,a=s(2);o(),O("is-cheapest",a.isCheapest(n)),v("disabled",!a.rateFor(n)),o(4),m(a.carrierLabel(n)),o(2),m(d(8,10,a.typeKey(n))),o(2),u(a.isCheapest(n)?9:-1),o(2),m(n.name),o(2),m(a.addressLine(n)),o(),u(a.distance(n)?14:-1),o(2),u((e=a.rateFor(n))?16:17,e)}}function Ut(i,t){if(i&1&&(r(0,"ul",16),I(1,Rt,19,12,"li",null,Et),l()),i&2){let e=s();o(),A(e.points())}}function Lt(i,t){i&1&&(r(0,"p",18),g(1,"i",34),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.MAP_ERROR")," "))}function Bt(i,t){if(i&1&&(r(0,"small"),p(1),l()),i&2){let e=s(),n=s();o(),m(n.distance(e))}}function Ht(i,t){if(i&1&&(r(0,"b",37),p(1),l()),i&2){let e=s(2);o(),m(e.price(t.priceCents))}}function zt(i,t){if(i&1){let e=S();r(0,"div",21)(1,"div",35),g(2,"i",36),r(3,"span")(4,"strong"),p(5),l(),r(6,"small"),p(7),l(),C(8,Bt,2,1,"small"),l(),C(9,Ht,2,1,"b",37),l(),r(10,"button",38),y("click",function(){h(e);let a=s();return x(a.confirm())}),g(11,"i",39),p(12),c(13,"translate"),l()()}if(i&2){let e,n=t,a=s();o(5),m(n.name),o(2),m(a.addressLine(n)),o(),u(a.distance(n)?8:-1),o(),u((e=a.rateFor(n))?9:-1,e),o(),v("disabled",!a.rateFor(n)),o(2),f(" ",d(13,6,"APP.CHECKOUT.CONFIRM_RELAY")," ")}}var ae=class i{buyer=b(te);translate=b(D);platformId=b(j);zone=b(q);workspaceId;country;postalCode;options;currency="EUR";picked=new B;closed=new B;mapEl;loading=k(!0);points=k([]);view=k("list");selected=k(null);mapError=k(!1);rates=new Map;cheapest=null;map=null;markersLayer=null;L=null;destroyed=!1;count=E(()=>this.points().length);ngOnInit(){this.rates=at(this.options),this.cheapest=dt(this.rates)}ngAfterViewInit(){return w(this,null,function*(){if(N(this.platformId)){try{let t=yield L(this.buyer.servicePoints(this.workspaceId,this.country,this.postalCode,1e4));this.destroyed||this.points.set(t)}catch{this.destroyed||this.points.set([])}finally{this.destroyed||this.loading.set(!1)}!this.destroyed&&this.view()==="map"&&(yield new Promise(t=>setTimeout(t)),yield this.ensureMap())}})}ngOnDestroy(){this.destroyed=!0,this.map?.remove(),this.map=null}
1onEscape(){this.closed.emit()}rateFor(t){return this.rates.get(t.carrier)??null}isCheapest(t){let e=this.rateFor(t);return!!e&&this.cheapest!==null&&e.priceCents===this.cheapest}carrierLabel(t){return this.rateFor(t)?.carrierLabel||t.carrier_name||_t(t.carrier)}isLocker=de;addressLine=ne;typeKey(t){return de(t)?"APP.CHECKOUT.RELAY_LOCKER":"APP.CHECKOUT.RELAY_SHOP"}distance(t){return t.distance==null?null:new Intl.NumberFormat(this.translate.currentLang||"fr",{maximumFractionDigits:1,minimumFractionDigits:1}).format(t.distance/1e3)+" km"}price(t){return Y(t,this.currency,this.translate.currentLang)}choose(t){let e=this.rateFor(t);e&&this.picked.emit(rt(t,e))}confirm(){let t=this.selected();t&&this.choose(t)}showView(t){return w(this,null,function*(){this.view()!==t&&(this.view.set(t),t==="map"&&(yield new Promise(e=>setTimeout(e)),yield this.ensureMap()))})}ensureMap(){return w(this,null,function*(){if(!N(this.platformId))return;let t=this.mapEl?.nativeElement;if(!t||this.loading()||!this.count())return;if(this.map){this.map.invalidateSize();return}try{let _=yield import("./chunk-2PGHGIBR.js");this.L=_.default??_}catch{this.mapError.set(!0);return}if(this.destroyed)return;let e=this.L,n=this.points().map(ce).find(Boolean),a=n??[46.6,2.3];this.zone.runOutsideAngular(()=>{this.map=e.map(t,{center:a,zoom:n?13:6,minZoom:5,maxZoom:18,zoomControl:!0}),e.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:`<a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">\xA9 ${this.translate.instant("APP.CHECKOUT.MAP_CONTRIBUTORS")}</a>`}).addTo(this.map),this.markersLayer=e.layerGroup().addTo(this.map)}),this.renderMarkers()})}renderMarkers(){let t=this.L;if(!t||!this.map||!this.markersLayer)return;let e=this.selected()?.id??null;this.zone.runOutsideAngular(()=>{this.markersLayer.clearLayers();for(let n of mt(this.points(),a=>this.rateFor(a),e)){let a=ce(n),_=t.marker(a,{icon:t.divIcon({className:"rps-pin-host",html:this.markerHtml(n,n.id===e),iconSize:null,iconAnchor:[0,0]}),title:n.name,alt:n.name,keyboard:!0,riseOnHover:!0});_.on("click",()=>this.zone.run(()=>{this.selected.set(n),this.renderMarkers()})),_.addTo(this.markersLayer)}})}markerHtml(t,e){let n=this.rateFor(t),a=this.isCheapest(t),_=n?this.price(n.priceCents):this.carrierLabel(t),T=this.distance(t);return`<div class="${["rps-pin",a?"is-cheapest":"",e?"is-selected":""].filter(Boolean).join(" ")}"><div class="rps-pin__l1">${a?'<span class="rps-pin__star" aria-hidden="true">\u2605</span>':""}<strong>${oe(_)}</strong>`+(T?`<span class="rps-pin__dot">\xB7</span><span>${oe(T)}</span>`:"")+`</div><div class="rps-pin__l2"><span>${oe(this.carrierLabel(t))}</span><span class="rps-pin__type">${oe(this.translate.instant(this.typeKey(t)))}</span></div></div>`}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-relay-point-sheet"]],viewQuery:function(e,n){if(e&1&&Z(St,5),e&2){let a;J(a=ee())&&(n.mapEl=a.first)}},hostBindings:function(e,n){e&1&&y("keydown.escape",function(){return n.onEscape()},!1,be)},inputs:{workspaceId:"workspaceId",country:"country",postalCode:"postalCode",options:"options",currency:"currency"},outputs:{picked:"picked",closed:"closed"},decls:35,vars:37,consts:[["mapEl",""],[1,"rps",3,"click"],["role","dialog","aria-modal","true","data-testid","relay-list",1,"rps__panel",3,"click"],["aria-hidden","true",1,"rps__grip"],[1,"rps__head"],["aria-hidden","true",1,"pi","pi-map-marker"],["type","button",1,"rps__close",3,"click"],["aria-hidden","true",1,"pi","pi-times"],["role","tablist",1,"rps__toggle"],["type","button","role","tab","data-testid","relay-view-list",1,"rps__seg",3,"click"],["aria-hidden","true",1,"pi","pi-list"],["type","button","role","tab","data-testid","relay-view-map",1,"rps__seg",3,"click"],["aria-hidden","true",1,"pi","pi-map"],[1,"rps__body"],["role","status",1,"rps__status"],[1,"rps__status"],[1,"rps__list"],[1,"rps__mapwrap",3,"hidden"],["role","alert",1,"rps__status"],["data-testid","relay-map",1,"rps__map"],[1,"rps__count"],["data-testid","relay-selection-bar",1,"rps__bar"],["aria-hidden","true",1,"pi","pi-spin","pi-spinner"],["aria-hidden","true",1,"pi","pi-info-circle"],["type","button","data-testid","relay-point",1,"rps-row",3,"click","disabled"],[1,"rps-row__main"],[1,"rps-row__tags"],[1,"rps-row__type"],[1,"rps-row__best"],[1,"rps-row__name"],[1,"rps-row__muted"],[1,"rps-row__price"],["aria-hidden","true",1,"pi","pi-angle-right"],["aria-hidden","true",1,"pi","pi-star-fill"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],[1,"rps__bar-info"],["aria-hidden","true",1,"pi","pi-shop"],[1,"rps__bar-price"],["type","button","data-testid","relay-confirm",1,"rps__confirm",3,"click","disabled"],["aria-hidden","true",1,"pi","pi-check"]],template:function(e,n){if(e&1){let a=S();
1r(0,"div",1),y("click",function(){return h(a),x(n.closed.emit())}),r(1,"section",2),c(2,"translate"),y("click",function(T){return h(a),x(T.stopPropagation())}),g(3,"span",3),r(4,"header",4),g(5,"i",5),r(6,"h2"),p(7),c(8,"translate"),l(),r(9,"button",6),c(10,"translate"),y("click",function(){return h(a),x(n.closed.emit())}),g(11,"i",7),l()(),r(12,"div",8),c(13,"translate"),r(14,"button",9),y("click",function(){return h(a),x(n.showView("list"))}),g(15,"i",10),p(16),c(17,"translate"),l(),r(18,"button",11),y("click",function(){return h(a),x(n.showView("map"))}),g(19,"i",12),p(20),c(21,"translate"),l()(),r(22,"div",13),C(23,wt,4,3,"p",14)(24,Ot,4,3,"p",15)(25,Ut,3,0,"ul",16),r(26,"div",17),C(27,Lt,4,3,"p",18),g(28,"div",19,0),c(30,"translate"),r(31,"span",20),p(32),c(33,"translate"),l()()(),C(34,zt,14,8,"div",21),l()()}if(e&2){let a;o(),P("aria-label",d(2,18,"APP.CHECKOUT.SELECT_RELAY")),o(6),m(d(8,20,"APP.CHECKOUT.SELECT_RELAY")),o(2),P("aria-label",d(10,22,"APP.CART.CLOSE")),o(3),P("aria-label",d(13,24,"APP.CHECKOUT.SELECT_RELAY")),o(2),O("is-active",n.view()==="list"),P("aria-selected",n.view()==="list"),o(2),f(" ",d(17,26,"APP.CHECKOUT.RELAY_VIEW_LIST")," "),o(2),O("is-active",n.view()==="map"),P("aria-selected",n.view()==="map"),o(2),f(" ",d(21,28,"APP.CHECKOUT.RELAY_VIEW_MAP")," "),o(3),u(n.loading()?23:n.count()?n.view()==="list"?25:-1:24),o(3),v("hidden",n.view()!=="map"||n.loading()||!n.count()),o(),u(n.mapError()?27:-1),o(),P("aria-label",d(30,30,"APP.CHECKOUT.RELAY_VIEW_MAP")),o(4),m(M(33,32,"APP.CHECKOUT.RELAY_POINTS",R(35,kt,n.count()))),o(2),u((a=n.view()==="map"&&n.selected())?34:-1,a)}},dependencies:[F,W,G],styles:[`.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;
1display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url("./media/layers-55W3Q4RM.png");width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url("./media/layers-2x-TBM42ERR.png");background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url("./media/marker-icon-2V3QKKVC.png")}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}app-relay-point-sheet{--paper: #0a0a14;--surface: #12121e;--surface-2: #1a1a2e;--ink: #ffffff;--ink-soft: rgba(255, 255, 255, .66);--ink-muted: rgba(255, 255, 255, .45);--accent: #2f8eef;--accent-bright: #54a6f6;--live: #ff3b30;--error: #ef4444;--border: rgba(255, 255, 255, .1);--border-soft: rgba(255, 255, 255, .06);--topbar: 64px;--story-ring-a: #ffc83a;--story-ring-b: #ff7a1a;--story-ring-seen: rgba(255, 255, 255, .22);display:contents}.rps{position:fixed;inset:0;z-index:987;display:flex;align-items:flex-end;justify-content:center;background:#05050cb8;backdrop-filter:blur(6px);font-family:Inter,system-ui,sans-serif;color:var(--ink)}.rps__panel{width:100%;height:88vh;display:flex;flex-direction:column;background:var(--surface);border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom);overflow:hidden}.rps__grip{display:block;width:40px;height:4px;border-radius:2px;background:#ffffff38;margin:10px auto 0}.rps__head{display:flex;align-items:center;gap:10px;padding:10px 16px}.rps__head>.pi{color:var(--accent-bright)}.rps__head h2{margin:0;font-size:17px;font-weight:800}.rps__close{margin-left:auto;width:36px;height:36px;border-radius:50%;border:0;background:var(--surface-2);color:var(--ink-soft);display:grid;place-items:center;cursor:pointer}.rps__toggle{display:flex;gap:4px;margin:0 16px 10px;padding:3px;border-radius:10px;background:var(--surface-2)}.rps__seg{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;border:0;border-radius:8px;background:transparent;color:var(--ink-soft);font:inherit;font-size:14px;font-weight:600;cursor:pointer}.rps__seg.is-active{background:var(--accent);color:#fff;font-weight:800}.rps__body{position:relative;flex:1;min-height:0;overflow-y:auto;border-top:1px solid var(--border-soft)}.rps__status{margin:24px 16px;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-soft);font-size:14px;text-align:center}.rps__list{list-style:none;margin:0;padding:8px 12px 16px;display:flex;flex-direction:column;gap:8px}.rps-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);color:var(--ink);font:inherit;text-align:left;cursor:pointer}.rps-row:hover:not(:disabled){border-color:var(--accent)}.rps-row:disabled{opacity:.55;cursor:not-allowed}.rps-row.is-cheapest{border-width:2px;border-color:var(--story-ring-a)}.rps-row__main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rps-row__tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px}.rps-row__type{padding:1px 6px;border-radius:4px;border:1px solid var(--border);font-size:11px;font-weight:700}.rps-row__best{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:700}.rps-row__best .pi{color:var(--story-ring-a)}.rps-row__name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rps-row__muted{color:var(--ink-muted);font-size:12.5px}.rps-row__price{flex:none;display:flex;align-items:center;gap:4px;font-weight:800}.rps__mapwrap{position:absolute;inset:0}.rps__map{width:100%;height:100%;background:#dfe6ee}.rps__count{position:absolute;top:12px;left:56px;z-index:500;padding:6px 10px;border-radius:20px;background:var(--surface);color:var(--ink);font-size:12px;font-weight:700;box-shadow:0 2px 8px #0000004d}.rps .rps-pin-host{background:none;border:0}.rps .rps-pin{position:absolute;
1left:0;bottom:8px;transform:translate(-50%);min-width:96px;padding:4px 8px;border-radius:10px;border:1px solid rgba(0,0,0,.14);background:#fff;color:#111;font:600 11px/1.25 Inter,system-ui,sans-serif;white-space:nowrap;text-align:center;box-shadow:0 2px 6px #00000040;cursor:pointer}.rps .rps-pin:after{content:"";position:absolute;left:50%;bottom:-6px;transform:translate(-50%);border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff}.rps .rps-pin.is-cheapest{border:2px solid #b8860b}.rps .rps-pin.is-selected{border:3px solid var(--accent);transform:translate(-50%) scale(1.12);z-index:2}.rps .rps-pin__l1{display:flex;align-items:center;justify-content:center;gap:4px}.rps .rps-pin__l1 strong{font-size:12px;font-weight:800}.rps .rps-pin__star{color:#b8860b;font-size:12px}.rps .rps-pin__dot{color:#555}.rps .rps-pin__l2{display:flex;align-items:center;justify-content:center;gap:4px;color:#444;font-size:10px}.rps .rps-pin__type{padding:0 4px;border-radius:4px;border:1px solid rgba(0,0,0,.2);font-weight:700;font-size:9px}.rps__bar{flex:none;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--surface);display:flex;flex-direction:column;gap:10px}.rps__bar-info{display:flex;align-items:center;gap:10px}.rps__bar-info>.pi{color:var(--accent-bright)}.rps__bar-info>span{display:flex;flex-direction:column;min-width:0;flex:1}.rps__bar-info strong,.rps__bar-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rps__bar-info small{color:var(--ink-muted);font-size:12.5px}.rps__bar-price{flex:none;font-size:15px}.rps__confirm{min-height:48px;border:0;border-radius:999px;background:var(--accent);color:#fff;font:inherit;font-size:15px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}.rps__confirm:disabled{opacity:.55;cursor:not-allowed}@media (min-width: 820px){.rps{align-items:center;padding:20px}.rps__panel{max-width:640px;height:82vh;border-radius:22px}.rps__grip{display:none}.rps__head{padding-top:16px}}
2`],encapsulation:2})};function oe(i){return String(i??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var Kt=i=>({name:i}),Nt=i=>({date:i}),Ft=i=>({amount:i});function Dt(i,t){if(i&1&&(r(0,"p",1),g(1,"i",3),p(2),c(3,"translate"),l()),i&2){let e=s();o(2),f(" ",M(3,1,"APP.CHECKOUT.SHIPPING_FROM",R(4,Kt,e.sellerName))," ")}}function Gt(i,t){if(i&1&&(p(0),c(1,"translate")),i&2){let e=s(),n=s();f(" ",M(1,1,"APP.CHECKOUT.OPEN_CART_TEXT_DATE",R(4,Nt,n.date(e.openUntil)))," ")}}function Wt(i,t){i&1&&(p(0),c(1,"translate")),i&2&&f(" ",d(1,1,"APP.CHECKOUT.OPEN_CART_TEXT")," ")}function qt(i,t){i&1&&(r(0,"p",10),g(1,"i",18),r(2,"span"),p(3),c(4,"translate"),l()()),i&2&&(o(3),m(d(4,1,"APP.CHECKOUT.OPEN_CART_CLOSE_ERROR")))}function jt(i,t){if(i&1&&(r(0,"small"),p(1),l()),i&2){let e=s();o(),m(e.carrierLabel)}}function Yt(i,t){if(i&1&&(r(0,"small"),p(1),l()),i&2){let e=s(2);o(),m(e.lockedAddressLine())}}function $t(i,t){i&1&&(p(0),c(1,"translate")),i&2&&f(" ",d(1,1,"APP.CHECKOUT.FREE")," ")}function Qt(i,t){if(i&1&&(p(0),r(1,"small"),p(2),c(3,"translate"),l()),i&2){let e=s(2);f(" +",e.price(e.selection.shippingCents)," "),o(2),m(d(3,2,"APP.CHECKOUT.DELTA"))}}function Xt(i,t){i&1&&(p(0),c(1,"translate")),i&2&&f(" ",d(1,1,"APP.CHECKOUT.LOCKED_FREE")," ")}function Zt(i,t){if(i&1&&(p(0),c(1,"translate")),i&2){let e=s(),n=s();f(" ",M(1,1,"APP.CHECKOUT.LOCKED_REDUCED",R(4,Ft,n.price(e.alreadyPaidShippingCents)))," ")}}function Jt(i,t){if(i&1){let e=S();r(0,"div",4)(1,"p",5),g(2,"i",6),p(3),c(4,"translate"),l(),r(5,"p",7),C(6,Gt,2,6)(7,Wt,2,3),l(),r(8,"button",8),y("click",function(){let a=h(e),_=s();return x(_.closeOpenCart.emit(a.orderId))}),g(9,"i",9),p(10),c(11,"translate"),l(),C(12,qt,5,3,"p",10),l(),r(13,"div",11)(14,"p",7),g(15,"i",12),p(16),c(17,"translate"),l(),r(18,"div",13),g(19,"i",12),r(20,"span",14)(21,"strong"),p(22),c(23,"translate"),l(),C(24,jt,2,1,"small")(25,Yt,2,1,"small"),l(),r(26,"span",15),C(27,$t,2,3)(28,Qt,4,4),l()(),r(29,"p",16),g(30,"i",17),r(31,"span"),C(32,Xt,2,3)(33,Zt,2,6),l()()()}if(i&2){let e,n,a=t,_=s();o(3),f(" ",d(4,17,"APP.CHECKOUT.OPEN_CART_TITLE")," "),o(3),u(a.openUntil?6:7),o(2),v("disabled",_.closingCart),o(),O("pi-spin",_.closingCart)("pi-spinner",_.closingCart)("pi-se
2nd",!_.closingCart),o(),f(" ",d(11,19,"APP.CHECKOUT.OPEN_CART_CLOSE")," "),o(2),u(_.closeCartError?12:-1),o(4),f(" ",d(17,21,"APP.CHECKOUT.LOCKED")," "),o(6),m(d(23,23,_.titleKey(a.deliveryType))),o(2),u(a.carrierLabel?24:-1),o(),u(_.lockedAddressLine()?25:-1),o(2),u(((e=_.selection==null?null:_.selection.shippingCents)!==null&&e!==void 0?e:0)===0?27:28),o(5),u(((n=_.selection==null?null:_.selection.shippingCents)!==null&&n!==void 0?n:0)===0?32:33)}}function ei(i,t){i&1&&(r(0,"p",16),g(1,"i",25),r(2,"span"),p(3),c(4,"translate"),l()()),i&2&&(o(3),m(d(4,1,"APP.CHECKOUT.FREE_SHIPPING")))}function ti(i,t){if(i&1&&(r(0,"small"),p(1),l()),i&2){let e=s();o(),m(e.carrierLabel)}}function ii(i,t){i&1&&(r(0,"small",30),p(1),c(2,"translate"),l()),i&2&&(o(),m(d(2,1,"APP.CHECKOUT.CHOOSE_RELAY")))}function ni(i,t){i&1&&(r(0,"small",31),g(1,"i",18),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,t),""))}function oi(i,t){i&1&&(r(0,"small"),p(1),c(2,"translate"),l()),i&2&&(o(),m(d(2,1,"APP.CHECKOUT.FROM")))}function ai(i,t){if(i&1&&(r(0,"span",15),C(1,oi,3,3,"small"),p(2),c(3,"translate"),l()),i&2){let e=s(),n=s().$implicit,a=s(2);o(),u(n==="relay"&&e.cheapestPriceCents>0?1:-1),o(),f(" ",e.cheapestPriceCents===0?d(3,2,"APP.CHECKOUT.FREE"):a.price(e.cheapestPriceCents)," ")}}function ri(i,t){if(i&1){let e=S();r(0,"button",27),y("click",function(){h(e);let a=s().$implicit,_=s(2);return x(_.select(a))}),g(1,"i",28)(2,"i",29),r(3,"span",14)(4,"strong"),p(5),c(6,"translate"),l(),C(7,ti,2,1,"small")(8,ii,3,3,"small",30)(9,ni,4,3,"small",31),l(),C(10,ai,4,4,"span",15),l()}if(i&2){let e,n=t,a=s().$implicit,_=s(2);O("ship--selected",_.isSelected(a)),P("aria-checked",_.isSelected(a))("data-testid","ship-"+a),o(),O("pi-check-circle",_.isSelected(a))("pi-circle",!_.isSelected(a)),o(),v("ngClass",_.iconFor(a)),o(3),m(d(6,14,_.titleKey(a))),o(2),u(n.carrierLabel?7:-1),o(),u(a==="relay"&&!_.isSelected(a)?8:-1),o(),u((e=_.rateHintKey(a))?9:-1,e),o(),u(!n.ratesUnavailable&&n.cheapestPriceCents!=null?10:-1)}}function li(i,t){if(i&1&&C(0,ri,11,16,"button",26),i&2){let e,n=t.$implicit,a=s(2);u((e=a.group(n))?0:-1,e)}}function pi(i,t){if(i&1&&(r(0,"small"),p(1),l()),i&2){let e=s(3);o(),m(e.pickupAddress())}}function si(i,t){if(i&1&&(r(0,"p",35),g(1,"i",3),r(2,"span")(3,"strong"),p(4),c(5,"translate"),l(),g(6,"br"),p(7),l()()),i&2){let e=s(4);o(4),m(d(5,2,"APP.CHECKOUT.PICKUP_INSTRUCTIONS")),o(3),f(" ",e.options.localPickup.instructions," ")}}function ci(i,t){if(i&1){let e=S();r(0,"button",34),y("click",function(){h(e);let a=s(3);return x(a.showPickupInstructions.set(!a.showPickupInstructions()))}),g(1,"i",17),p(2),c(3,"translate"),l(),C(4,si,8,4,"p",35)}if(i&2){let e=s(3);P("aria-expanded",e.showPickupInstructions()),o(2),f(" ",d(3,3,"APP.CHECKOUT.SHOW_INSTRUCTIONS")," "),o(2),u(e.showPickupInstructions()?4:-1)}}function di(i,t){if(i&1){let e=S();r(0,"button",32),y("click",function(){h(e);let a=s(2);return x(a.select("local_pickup"))}),g(1,"i",28)(2,"i",33),r(3,"span",14)(4,"strong"),p(5),c(6,"translate"),l(),C(7,pi,2,1,"small"),l(),r(8,"span",15),p(9),c(10,"translate"),l()(),C(11,ci,5,5)}if(i&2){let e=s(2);O("ship--selected",e.isSelected("local_pickup")),P("aria-checked",e.isSelected("local_pickup")),o(),O("pi-check-circle",e.isSelected("local_pickup"))("pi-circle",!e.isSelected("local_pickup")),o(4),m(d(6,11,"APP.CHECKOUT.PICKUP")),o(2),u(e.pickupAddress()?7:-1),o(2),m(d(10,13,"APP.CHECKOUT.FREE")),o(2),u(e.options.localPickup.instructions?11:-1)}}function _i(i,t){i&1&&(r(0,"p",22),g(1,"i",18),r(2,"span"),p(3),c(4,"translate"),l()()),i&2&&(o(3),m(d(4,1,"APP.CHECKOUT.NO_OPTIONS")))}function mi(i,t){if(i&1&&(r(0,"p",23),g(1,"i",18),r(2,"span"),p(3),c(4,"translate"),l()()),i&2){let e=s(2);o(3),m(d(4,1,e.categoryHint()))}}function gi(i,t){if(i&1){let e=S();r(0,"div",24)(1,"p"),g(2,"i",25),r(3,"strong"),p(4),l(),r(5,"span",36),p(6),l()(),r(7,"p",7),p(8),l(),r(9,"button",37),y("click",function(){h(e);let a=s(2);return x(a.relayOpen.set(!0))}),p(10),c(11,"translate"),l()()}if(i&2){let e=t,n=s(2);o(4),m(e.name),o(2),m(n.price(n.selection.shippingCents)),o(2),m(n.addressLine(e)),o(2),f(" ",d(11,4,"APP.CHECKOUT.CHANGE_RELAY")," ")}}function ui(i,t){if(i&1&&(r(0,"h2",19),g(1,"i",20),p(2),c(3,"translate"),l(),C(4,ei,5,3,"p",16),r(5,"div",21),c(6,"translate"),I(7,li,1,1,null,null,$),C(9,di,12,15),l(),C(10,_i,5,3,"p",22)(11,mi,5,3,"p",23)(12,gi,12,6,"div",24)),i&2){let e,n=s();o(2),f(" ",d(3,7,"APP.CHECKOUT.SHIPPING_METHOD")," "),o(2),u(n.options.freeShipping?4:-1),o(),P("aria-label",d(6,9,"APP.CHECKOUT.SHIPPING_METHOD")),o(2),A(n.types),o(2),u(n.options.localPickup?9:-1),o(),u(n.unavailable?10:-1),o(),u(n.categoryHint(
2)?11:-1),o(),u((e=(n.selection==null?null:n.selection.type)==="relay"&&(n.selection==null?null:n.selection.servicePointAddress))?12:-1,e)}}function fi(i,t){if(i&1){let e=S();r(0,"app-relay-point-sheet",38),y("picked",function(a){h(e);let _=s();return x(_.onRelayPicked(a))})("closed",function(){h(e);let a=s();return x(a.relayOpen.set(!1))}),l()}if(i&2){let e=s();v("workspaceId",e.workspaceId)("country",e.country)("postalCode",e.postalCode)("options",e.options)("currency",e.currency)}}var re=class i{translate=b(D);workspaceId;sellerName=null;options;selection=null;country;postalCode;currency="EUR";closingCart=!1;closeCartError=!1;selectionChange=new B;closeOpenCart=new B;categoryHint=k(null);showPickupInstructions=k(!1);relayOpen=k(!1);types=["home","express","relay"];addressLine=ne;get openCart(){return this.options?.openCart??null}get unavailable(){return!!this.options&&!this.openCart&&!ie(this.options)}group(t){return nt(this.options,t)}titleKey(t){switch(t){case"relay":return"APP.CHECKOUT.RELAY";case"express":return"APP.CHECKOUT.EXPRESS";case"local_pickup":return"APP.CHECKOUT.PICKUP";default:return"APP.CHECKOUT.HOME"}}iconFor(t){switch(t){case"relay":return"pi-map-marker";case"express":return"pi-bolt";case"local_pickup":return"pi-shop";default:return"pi-home"}}rateHintKey(t){let e=this.group(t);return e?.ratesUnavailable?e.ratesUnavailableReason==="postal_code_required"?"APP.CHECKOUT.RATE_NEEDS_POSTAL":"APP.CHECKOUT.RATE_CARRIER_DOWN":null}isSelected(t){return this.selection?.type===t}select(t){if(this.categoryHint.set(null),t!=="local_pickup"){let n=this.rateHintKey(t);if(n){this.categoryHint.set(n);return}}if(t==="relay"){this.relayOpen.set(!0);return}let e=ot(this.options,t);e&&this.selectionChange.emit(e)}onRelayPicked(t){this.relayOpen.set(!1),this.selectionChange.emit(t)}pickupAddress(){let t=this.options?.localPickup?.address;if(!t)return"";let e=[t.postalCode,t.city].filter(Boolean).join(" ");return[t.line1,t.line2,e].filter(Boolean).join(", ")}lockedAddressLine(){let t=this.openCart;if(!t)return"";if(t.deliveryType==="relay"&&t.servicePoint?.address){let n=t.servicePoint.address;return[n.name,n.street,[n.postal_code??n.postalCode,n.city].filter(Boolean).join(" ")].filter(Boolean).join(", ")}let e=t.shippingAddress;return e?[e.line1,e.line2,[e.postalCode,e.city].filter(Boolean).join(" ")].filter(Boolean).join(", "):""}price(t){return Y(t,this.currency,this.translate.currentLang)}date(t){return gt(t,this.translate.currentLang)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-shipping-selector"]],inputs:{workspaceId:"workspaceId",sellerName:"sellerName",options:"options",selection:"selection",country:"country",postalCode:"postalCode",currency:"currency",closingCart:"closingCart",closeCartError:"closeCartError"},outputs:{selectionChange:"selectionChange",closeOpenCart:"closeOpenCart"},decls:5,vars:4,consts:[["data-shipping-selector","",1,"ssel"],[1,"ssel__seller"],[3,"workspaceId","country","postalCode","options","currency"],["aria-hidden","true",1,"pi","pi-shop"],["data-testid","checkout-open-cart",1,"ssel__opencart"],[1,"ssel__opencart-title"],["aria-hidden","true",1,"pi","pi-shopping-bag"],[1,"ssel__muted"],["type","button","data-testid","checkout-close-open-cart",1,"cbtn","cbtn--secondary","cbtn--block",3,"click","disabled"],["aria-hidden","true",1,"pi"],["role","alert",1,"notice","notice--error"],["data-testid","checkout-locked-shipping",1,"ssel__locked"],["aria-hidden","true",1,"pi","pi-lock"],[1,"ship","ship--selected"],[1,"ship__txt"],[1,"ship__price"],[1,"notice","notice--ok"],["aria-hidden","true",1,"pi","pi-info-circle"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],[1,"ssel__h2"],["aria-hidden","true",1,"pi","pi-truck"],["role","radiogroup",1,"ships"],["data-testid","checkout-no-shipping",1,"notice","notice--warn"],["role","alert",1,"notice","notice--warn"],["data-testid","checkout-relay-picked",1,"ssel__relay-picked"],["aria-hidden","true",1,"pi","pi-check-circle"],["type","button","role","radio",1,"ship",3,"ship--selected"],["type","button","role","radio",1,"ship",3,"click"],["aria-hidden","true",1,"pi","ship__radio"],["aria-hidden","true",1,"pi","ship__ic",3,"ngClass"],[1,"ship__cta"],[1,"ship__warn"],["type","button","role","radio","data-testid","ship-local_pickup",1,"ship",3,"click"],["aria-hidden","true",1,"pi","pi-shop","ship__ic"],["type","button",1,"cbtn","cbtn--ghost","ssel__instr-btn",3,"click"],[1,"n
2otice"],[1,"ssel__right"],["type","button",1,"cbtn","cbtn--ghost",3,"click"],[3,"picked","closed","workspaceId","country","postalCode","options","currency"]],template:function(e,n){if(e&1&&(r(0,"section",0),C(1,Dt,4,6,"p",1)(2,Jt,34,25)(3,ui,13,11),l(),C(4,fi,1,5,"app-relay-point-sheet",2)),e&2){let a;P("data-testid","shipping-"+n.workspaceId),o(),u(n.sellerName?1:-1),o(),u((a=n.openCart)?2:3,a),o(2),u(n.relayOpen()?4:-1)}},dependencies:[F,ke,W,G,ae],styles:["[_nghost-%COMP%]{--paper: #0a0a14;--surface: #12121e;--surface-2: #1a1a2e;--ink: #ffffff;--ink-soft: rgba(255, 255, 255, .66);--ink-muted: rgba(255, 255, 255, .45);--accent: #2f8eef;--accent-bright: #54a6f6;--live: #ff3b30;--error: #ef4444;--border: rgba(255, 255, 255, .1);--border-soft: rgba(255, 255, 255, .06);--topbar: 64px;--story-ring-a: #ffc83a;--story-ring-b: #ff7a1a;--story-ring-seen: rgba(255, 255, 255, .22);display:block}.cbtn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border:1px solid transparent;border-radius:999px;font:inherit;font-size:15px;font-weight:700;cursor:pointer;text-decoration:none;transition:background .15s ease,opacity .15s ease}.cbtn--primary[_ngcontent-%COMP%]{background:var(--accent);color:#fff}.cbtn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--accent-bright)}.cbtn--secondary[_ngcontent-%COMP%]{background:var(--surface-2);border-color:var(--border);color:var(--ink)}.cbtn--secondary[_ngcontent-%COMP%]:hover:not(:disabled){background:#ffffff14}.cbtn--ghost[_ngcontent-%COMP%]{background:transparent;color:var(--accent-bright);text-decoration:underline;text-underline-offset:3px}.cbtn--block[_ngcontent-%COMP%]{width:100%}.cbtn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.qty[_ngcontent-%COMP%]{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:10px;background:var(--surface-2)}.qty[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:36px;height:36px;border:0;background:none;color:var(--ink);cursor:pointer;display:grid;place-items:center}.qty[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{color:var(--ink-muted);cursor:not-allowed}.qty__n[_ngcontent-%COMP%]{min-width:26px;text-align:center;font-weight:700}.notice[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin:0;padding:12px 14px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);color:var(--ink-soft);font-size:13.5px;line-height:1.45}.notice[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{margin-top:2px;font-size:16px}.notice[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:var(--ink)}.notice--error[_ngcontent-%COMP%]{border-style:dashed;border-color:#ef44448c}.notice--error[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--error)}.notice--warn[_ngcontent-%COMP%]{border-color:#ffc83a73}.notice--warn[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--story-ring-a)}.notice--ok[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--accent-bright)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ssel[_ngcontent-%COMP%]{border:1px solid var(--border-soft);border-radius:16px;background:var(--surface);padding:16px;display:flex;flex-direction:column;gap:12px}.ssel__seller[_ngcontent-%COMP%]{margin:0;display:flex;align-items:center;gap:8px;font-weight:800;font-size:15px}.ssel__h2[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:700;display:flex;align-items:center;gap:8px}.ssel__muted[_ngcontent-%COMP%]{margin:0;color:var(--ink-muted);font-size:13px;line-height:1.5}.ssel__right[_ngcontent-%COMP%]{margin-left:auto}.ssel__locked[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.ssel__opencart[_ngcontent-%COMP%]{border-color:#54a6f666}.ssel__opencart[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;line-height:1.5}.ssel__opencart-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--accent-bright)}.ships[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.ship[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;width:100%;padding:14px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);color:var(--ink);font:inherit;text-align:left;cursor:pointer}.ship--selected[_ngcontent-%COMP%]{border:2px solid var(--accent);background:#2f8eef1a}.ship__radio[_ngcontent-%COMP%]{font-size:18px;color:var(--ink-soft)}.ship--selected[_ngcontent-%COMP%]   .ship__radio[_ngcontent-%COMP%]{color:var(--accent-bright)}.ship__ic[_ngcontent-%COMP%]{width:36px;height:36px;flex:none;border-radius:8px;background:var(--paper);display:grid;place-items:center;color:var(--ink-soft)}.ship__txt[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.ship__txt[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{color:var(--ink-muted);font-size:12px}
2.ship__cta[_ngcontent-%COMP%]{color:var(--accent-bright)!important;font-weight:600}.ship__warn[_ngcontent-%COMP%]{color:var(--ink-soft)!important}.ship__warn[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--story-ring-a)}.ship__price[_ngcontent-%COMP%]{flex:none;display:flex;flex-direction:column;align-items:flex-end;font-weight:800}.ship__price[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{color:var(--ink-muted);font-size:10.5px;font-weight:500}.ssel__instr-btn[_ngcontent-%COMP%]{align-self:flex-start;min-height:32px;padding:0;font-size:13px}.ssel__relay-picked[_ngcontent-%COMP%]{border:1px solid rgba(84,166,246,.35);border-radius:12px;padding:12px}.ssel__relay-picked[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 4px;display:flex;align-items:center;gap:8px}.ssel__relay-picked[_ngcontent-%COMP%]   .pi-check-circle[_ngcontent-%COMP%]{color:var(--accent-bright)}.ssel__relay-picked[_ngcontent-%COMP%]   .cbtn[_ngcontent-%COMP%]{min-height:32px;padding:0;font-size:13px}"]})};var Ci=["mount"];function hi(i,t){if(i&1&&(r(0,"div",10)(1,"span"),p(2),c(3,"translate"),l(),r(4,"strong",11),p(5),l()()),i&2){let e=s();o(2),m(d(3,2,"SHOP.CHECKOUT.TOTAL")),o(3),m(e.amountLabel)}}function xi(i,t){if(i&1&&(r(0,"p",12),g(1,"i",13),r(2,"span"),p(3),l()()),i&2){let e=s();o(3),m(e.error)}}function yi(i,t){i&1&&g(0,"i",14)}function bi(i,t){i&1&&g(0,"i",9)}var le=class i{platformId=b(j);cdr=b(Se);zone=b(q);translate=b(D);loadStripe=b(ft);clientSecret;amountLabel="";returnUrl="";payLabel="SHOP.CHECKOUT.PAY";payLabelParams={};billingEmail="";paid=new B;failed=new B;mountRef;ready=!1;busy=!1;error="";stripe=null;elements=null;destroyed=!1;ngAfterViewInit(){return w(this,null,function*(){if(N(this.platformId)){if(!this.clientSecret){this.fail("APP.CHECKOUT.PAY_INIT");return}try{let t=yield this.loadStripe();if(!t||this.destroyed){t||this.fail("APP.CHECKOUT.PAY_INIT");return}this.stripe=t,this.elements=t.elements({clientSecret:this.clientSecret,locale:Ct(this.translate.currentLang),appearance:{theme:"night",variables:{colorPrimary:"#2f8eef",colorBackground:"#1a1a2e",colorText:"#ffffff",colorDanger:"#ef4444",borderRadius:"10px",fontFamily:"Inter, system-ui, sans-serif"}}});let e=this.mountRef?.nativeElement;if(!e)return;let n=this.elements.create("payment",U({layout:"tabs"},this.billingEmail?{fields:{billingDetails:{email:"never"}}}:{}));n.mount(e),n.on("ready",()=>this.zone.run(()=>{this.ready=!0,this.cdr.markForCheck()})),n.on("loaderror",()=>this.zone.run(()=>this.fail("APP.CHECKOUT.PAY_INIT")))}catch{this.fail("APP.CHECKOUT.PAY_INIT")}}})}confirm(){return w(this,null,function*(){if(!(!this.stripe||!this.elements||this.busy)){this.busy=!0,this.error="",this.cdr.markForCheck();try{let t=yield this.stripe.confirmPayment({elements:this.elements,confirmParams:U(U({},this.returnUrl?{return_url:this.returnUrl}:{}),this.billingEmail?{payment_method_data:{billing_details:{email:this.billingEmail}}}:{}),redirect:"if_required"});if(this.busy=!1,t?.error){this.fail(ht(t.error));return}let e=t?.paymentIntent?.status;if(e==="succeeded"||e==="processing"){this.cdr.markForCheck(),this.paid.emit(e);return}this.fail("APP.CHECKOUT.PAY_FAILED_GENERIC")}catch{this.busy=!1,this.fail("APP.CHECKOUT.PAY_FAILED_GENERIC")}}})}fail(t){this.error=this.translate.instant(t),this.cdr.markForCheck(),this.failed.emit(this.error)}ngOnDestroy(){this.destroyed=!0}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-stripe-payment"]],viewQuery:function(e,n){if(e&1&&Z(Ci,5),e&2){let a;J(a=ee())&&(n.mountRef=a.first)}},inputs:{clientSecret:"clientSecret",amountLabel:"amountLabel",returnUrl:"returnUrl",payLabel:"payLabel",payLabelParams:"payLabelParams",billingEmail:"billingEmail"},outputs:{paid:"paid",failed:"failed"},decls:15,vars:12,consts:[["mount",""],[1,"pay"],["class","pay__amount",4,"ngIf"],["data-testid","stripe-element",1,"pay__element"],["class","pay__err","role","alert","data-testid","stripe-error",4,"ngIf"],["type","button","data-testid","stripe-pay",1,"pay__btn",3,"click","disabled"],["class","pi pi-spin pi-spinner","aria-hidden","true",4,"ngIf"],["class","pi pi-lock","aria-hidden","true",4,"ngIf"],[1,"pay__legal"],["aria-hidden","true",1,"pi","pi-lock"],[1,"pay__amount"],["data-testid","stripe-amount"],["role","alert","data-testid","stripe-error",1,"pay__err"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["aria-hidden","true",1,"pi","pi-spin","pi-spinner"]],template:function(e,n){if(e&1){let a=S();r(0,"div",1),C(1,hi,6,4,"div",2),g(2,"div",3,0),C(4,xi,4,1,"p",4),r(5,"button",5),y("click",function(){return h(a),x(n.confirm())}),C(6,yi,1,0,"i",6)(7,bi,1,0,"i",7),r(8,"span"),p(9),c(10,"translate"),l()(),r(11,"p",8),g(12,"i",9),p(13),c(14,"translate"),l()()}e&2&&(o(),v("ngIf",n.amountLabel),o(3),v("ngIf",n.error),o(),v("disabled",!n.ready||n.busy),o(),v("ngIf",n.busy||!n.ready),o(),v("ngIf",!n.busy&&n.ready),o(2),m(M(10,7,n.busy?"APP.CHECKOUT.PROCESSING":n.payLabel,n.payLabelParams)),o(4),f(" ",d(14,10,"SHOP.CHECKOUT.SECURE")," "))},dependencies:[F,Ee,W,G],styles:["[_nghost-%COMP%]{display:block}.pay[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}
2.pay__amount[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;font-size:13px;color:var(--ink-soft, rgba(255, 255, 255, .66))}.pay__amount[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-size:20px;font-weight:800;color:var(--ink, #fff)}.pay__element[_ngcontent-%COMP%]{min-height:64px}.pay__err[_ngcontent-%COMP%]{margin:0;display:flex;gap:8px;align-items:flex-start;padding:10px 12px;border-radius:10px;border:1px dashed rgba(239,68,68,.6);font-size:13px;line-height:1.4;color:var(--ink, #fff)}.pay__err[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{margin-top:2px;color:var(--error, #ef4444)}.pay__btn[_ngcontent-%COMP%]{min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:999px;background:var(--accent, #2f8eef);color:#fff;font:inherit;font-size:15px;font-weight:700;cursor:pointer}.pay__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--accent-bright, #54a6f6)}.pay__btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.pay__legal[_ngcontent-%COMP%]{margin:0;display:flex;align-items:center;justify-content:center;gap:6px;font-size:11.5px;color:var(--ink-muted, rgba(255, 255, 255, .45))}"],changeDetection:0})};var bt=i=>({count:i}),Pi=i=>({name:i}),Pt=i=>({amount:i}),ue=(i,t)=>t.key;function vi(i,t){let e;return t.productId+((e=t.variantId)!==null&&e!==void 0?e:"")}var Si=(i,t)=>t.id;function ki(i,t){if(i&1&&(r(0,"p",4),p(1),c(2,"translate"),l()),i&2){let e=s();o(),f(" ",M(2,1,"APP.CHECKOUT.ORDER_MULTI",R(4,bt,e.payGroups().length))," ")}}function Ei(i,t){if(i&1&&(r(0,"p",4),p(1),c(2,"translate"),l()),i&2){let e=s();o(),f(" ",M(2,1,"APP.CHECKOUT.ORDER_AT",R(4,Pi,e.headSellerName()))," ")}}function wi(i,t){i&1&&(r(0,"div",5),g(1,"i",10),l())}function Oi(i,t){if(i&1){let e=S();r(0,"section",6)(1,"span",11),g(2,"i",12),l(),r(3,"h2"),p(4),c(5,"translate"),l(),r(6,"p"),p(7),c(8,"translate"),l(),r(9,"button",13),y("click",function(){h(e);let a=s();return x(a.continueShopping())}),p(10),c(11,"translate"),l()()}i&2&&(o(4),m(d(5,3,"APP.CART.EMPTY")),o(3),m(d(8,5,"APP.CART.EMPTY_DESC")),o(3),f(" ",d(11,7,"APP.CHECKOUT.CONTINUE")," "))}function Ti(i,t){if(i&1){let e=S();r(0,"section",7)(1,"span",14),g(2,"i",15),l(),r(3,"h2"),p(4),c(5,"translate"),l(),r(6,"p"),p(7),c(8,"translate"),l(),r(9,"div",16)(10,"button",17),y("click",function(){h(e);let a=s();return x(a.loginNow())}),p(11),c(12,"translate"),l(),r(13,"button",18),y("click",function(){h(e);let a=s();return x(a.signup())}),p(14),c(15,"translate"),l()()()}i&2&&(o(4),m(d(5,4,"APP.CHECKOUT.LOGIN_TITLE")),o(3),m(d(8,6,"APP.CHECKOUT.LOGIN_TEXT")),o(4),f(" ",d(12,8,"APP.CHECKOUT.LOGIN_BTN")," "),o(3),f(" ",d(15,10,"APP.CHECKOUT.SIGNUP_BTN")," "))}function Mi(i,t){if(i&1&&(r(0,"span",23),p(1),c(2,"translate"),l()),i&2){let e=s(2);o(),m(M(2,1,"APP.CHECKOUT.SELLERS_COUNT",R(4,bt,e.payGroups().length)))}}function Ii(i,t){if(i&1&&(r(0,"p",37),g(1,"i",39),r(2,"span"),p(3),l(),r(4,"strong"),p(5),l()()),i&2){let e=s().$implicit,n=s(3);o(3),m(e.seller==null?null:e.seller.displayName),o(2),m(n.price(e.subtotalCents))}}function Ai(i,t){if(i&1&&g(0,"img",41),i&2){let e=s().$implicit;v("src",e.imageUrl,ye)("alt",e.title)}}function Ri(i,t){i&1&&g(0,"i",42)}function Ui(i,t){if(i&1&&(r(0,"li")(1,"span",40),C(2,Ai,1,2,"img",41)(3,Ri,1,0,"i",42),l(),r(4,"span",43)(5,"span",44),p(6),l(),r(7,"span",22),p(8),l()(),r(9,"strong"),p(10),l()()),i&2){let e=t.$implicit,n=s(4);o(2),u(e.imageUrl?2:3),o(4),m(e.title),o(2),Pe("",e.variantLabel?e.variantLabel+" \xB7 ":"","\xD7",e.quantity,""),o(2),m(n.price(e.priceCents*e.quantity))}}function Li(i,t){if(i&1&&(C(0,Ii,6,2,"p",37),r(1,"ul",38),I(2,Ui,11,5,"li",null,vi),l()),i&2){let e=t.$implicit,n=s(3);u(n.isMulti()?0:-1),o(2),A(e.items)}}function Bi(i,t){if(i&1){let e=S();I(0,Li,4,1,null,null,ue),r(2,"button",36),y("click",function(){h(e);let a=s(2);return x(a.cartUi.open())}),p(3),c(4,"translate"),l()}if(i&2){let e=s(2);A(e.payGroups()),o(3),f(" ",d(4,1,"APP.CHECKOUT.EDIT_CART")," ")}}function Hi(i,t){if(i&1&&(r(0,"option",53),p(1),l()),i&2){let e=t.$implicit;v("value",e.id),o(),ve(" ",e.label||e.line1,", ",e.postalCode," ",e.city," ")}}function zi(i,t){if(i&1){let e=S();r(0,"label",47)(1,"span"),p(2),c(3,"translate"),l(),r(4,"select",63),y("ngModelChange",function(a){h(e);let _=s(3);return x(_.onSavedAddressChange(a))}),I(5,Hi,2,4,"option",53,Si),l()()}if(i&2){let e=s(3);o(2),m(d(3,2,"APP.CHECKOUT.SAVED_ADDRESSES")),o(2),v("ngModel",e.selectedAddressId),o(),A(e.addresses())}}function Vi(i,t){i&1&&(r(0,"small",49),g(1,"i",64),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.REQUIRED")," "))}function Ki(i,t){if(i&1&&(r(0,"option",53),p(1),l()),i&2){let e=t.$implicit;v("value",e),o(),f(" ",e," ")}}function Ni(i,t){i&1&&(r(0,"small",49),g(1,"i",64),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.REQUIRED")," "))}function Fi(i,t){i&1&&(r(0,"small",49),g(1,"i",64),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.REQUIRED")," "))}function Di(i,t){i&1&&(r(0,"small",49),g(1,"i",64),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.REQUIRED")," "))}function Gi(i,t){i&1&&(r(0,"small",49),g(1,"i",64),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.REQUIRED")," "))}function Wi(i,t){if(i&1&&(r(0,"option",53),p(1),c(2,"translate"),l()),i&2){let e=t.$implicit;v("value",e),o(),f(" ",d(2,2,"APP.CHECKOUT.COUNTRY_"+e)," ")}}function qi(i,t){if(i&1&&(r(0,"button",61),g(1,"i",65),p(2),c(3,"translate"),l()),i&2){let e=s(3);v("disabled",e.loadingOptions()),o(2),f(" ",d(3,2,"APP.CHECKOUT.VALIDATE_ADDRESS")," ")}}function ji(i,t){i&1&&(r(0,"p",62),g(1,"i",66),r(2,"span"),p(3),c(4,"translate"),l()()),i&2&&(o(3),m(d(4,1,"APP.CHECKOUT.ERR_SHIPPING_LOAD")))}function Yi(i,t){if(i&1){let e=S();r(0,"section",25)(1,"h2",45),p(2),c(3,"translate"),l(),r(4,"form",46),y("ngSubmit",function(){h(e);let a=s(2);return x(a.validateAddress())}),C(5,zi,7,4,"label",47),r(6,"label",47)(7,"span"),p(8),c(9,"translate"),l(),r(10,"input",48),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.fullName,a)||(_.form.fullName=a),x(a)}),y("ngModelChange",function(){h(e);let a=s(2);return x(a.onAddressChange())}
2),l(),C(11,Vi,4,3,"small",49),l(),r(12,"div",47)(13,"label",50),p(14),c(15,"translate"),l(),r(16,"div",51)(17,"select",52),c(18,"translate"),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.dialCode,a)||(_.form.dialCode=a),x(a)}),I(19,Ki,2,2,"option",53,$),l(),r(21,"input",54),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.phone,a)||(_.form.phone=a),x(a)}),y("ngModelChange",function(){h(e);let a=s(2);return x(a.onAddressChange())}),l()(),C(22,Ni,4,3,"small",49),l(),r(23,"label",47)(24,"span"),p(25),c(26,"translate"),l(),r(27,"input",55),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.line1,a)||(_.form.line1=a),x(a)}),y("ngModelChange",function(){h(e);let a=s(2);return x(a.onAddressChange())}),l(),C(28,Fi,4,3,"small",49),l(),r(29,"label",47)(30,"span"),p(31),c(32,"translate"),l(),r(33,"input",56),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.line2,a)||(_.form.line2=a),x(a)}),y("ngModelChange",function(){h(e);let a=s(2);return x(a.onAddressChange())}),l()(),r(34,"label",57)(35,"span"),p(36),c(37,"translate"),l(),r(38,"input",58),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.city,a)||(_.form.city=a),x(a)}),y("ngModelChange",function(){h(e);let a=s(2);return x(a.onAddressChange())}),l(),C(39,Di,4,3,"small",49),l(),r(40,"label",57)(41,"span"),p(42),c(43,"translate"),l(),r(44,"input",59),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.postalCode,a)||(_.form.postalCode=a),x(a)}),y("ngModelChange",function(){h(e);let a=s(2);return x(a.onAddressChange())}),l(),C(45,Gi,4,3,"small",49),l(),r(46,"label",47)(47,"span"),p(48),c(49,"translate"),l(),r(50,"select",60),V("ngModelChange",function(a){h(e);let _=s(2);return z(_.form.country,a)||(_.form.country=a),x(a)}),y("ngModelChange",function(){h(e);let a=s(2);return x(a.onCountryChange())}),I(51,Wi,3,4,"option",53,$),l()(),C(53,qi,4,4,"button",61),l(),C(54,ji,5,3,"p",62),l()}if(i&2){let e=s(2);o(2),f(" ",d(3,40,"APP.CHECKOUT.ADDRESS_TITLE")," "),o(3),u(e.addresses().length>1?5:-1),o(),O("is-missing",e.isMissing("fullName")),o(2),m(d(9,42,"APP.CHECKOUT.FULL_NAME")),o(2),H("ngModel",e.form.fullName),P("aria-invalid",e.isMissing("fullName")),o(),u(e.isMissing("fullName")?11:-1),o(),O("is-missing",e.isMissing("phone")),o(2),m(d(15,44,"APP.CHECKOUT.PHONE")),o(3),H("ngModel",e.form.dialCode),P("aria-label",d(18,46,"APP.CHECKOUT.DIAL_CODE")),o(2),A(e.dialOptions),o(2),H("ngModel",e.form.phone),P("aria-invalid",e.isMissing("phone")),o(),u(e.isMissing("phone")?22:-1),o(),O("is-missing",e.isMissing("line1")),o(2),m(d(26,48,"APP.CHECKOUT.LINE1")),o(2),H("ngModel",e.form.line1),P("aria-invalid",e.isMissing("line1")),o(),u(e.isMissing("line1")?28:-1),o(3),m(d(32,50,"APP.CHECKOUT.LINE2")),o(2),H("ngModel",e.form.line2),o(),O("is-missing",e.isMissing("city")),o(2),m(d(37,52,"APP.CHECKOUT.CITY")),o(2),H("ngModel",e.form.city),P("aria-invalid",e.isMissing("city")),o(),u(e.isMissing("city")?39:-1),o(),O("is-missing",e.isMissing("postalCode")),o(2),m(d(43,54,"APP.CHECKOUT.POSTAL")),o(2),H("ngModel",e.form.postalCode),P("aria-invalid",e.isMissing("postalCode")),o(),u(e.isMissing("postalCode")?45:-1),o(3),m(d(49,56,"APP.CHECKOUT.COUNTRY")),o(2),H("ngModel",e.form.country),o(),A(e.countries),o(2),u(e.addressValidated()?-1:53),o(),u(e.optionsError()?54:-1)}}function $i(i,t){i&1&&(r(0,"p",67),g(1,"i",10),p(2),c(3,"translate"),l()),i&2&&(o(2),f(" ",d(3,1,"APP.CHECKOUT.SEARCHING")," "))}function Qi(i,t){if(i&1){let e=S();r(0,"app-shipping-selector",69),y("selectionChange",function(a){h(e);let _=s(2).$implicit,T=s(3);return x(T.onSelection(_.key,a))})("closeOpenCart",function(a){h(e);let _=s(2).$implicit,T=s(3);return x(T.closeOpenCart(_,a))}),l()}if(i&2){let e=s(),n=s().$implicit,a=s(3);v("workspaceId",n.workspaceId)("sellerName",a.isMulti()&&(n.seller==null?null:n.seller.displayName)||null)("options",t)("selection",e.selection)("country",a.form.country)("postalCode",a.form.postalCode.trim())("currency",n.currency)("closingCart",e.closingCart)("closeCartError",e.closeCartError)}}function Xi(i,t){if(i&1&&C(0,Qi,1,9,"app-shipping-selector",68),i&2){let e;u((e=t.options)?0:-1,e)}}function Zi(i,t){if(i&1&&C(0,Xi,1,1),i&2){let e,n=t.$implicit,a=s(3);u((e=a.shipOf(n.key))?0:-1,e)}}function Ji(i,t){if(i&1&&(C(0,$i,4,3,"p",67),I(1,Zi,1,1,null,null,ue)),i&2){let e=s(2);u(e.loadingOptions()?0:-1),o(),A(e.shippingGroups())}}function en(i,t){if(i&1&&(p(0),c(1,"translate")),i&2){let e=s(2).$implicit,n=s(3);f(" ",n.shippingOf(e.key)===0?d(1,1,"APP.CHECKOUT.FREE"):n.price(n.shippingOf(e.key))," ")}}function tn(i,t){i&1&&(r(0,"span",22),p(1),c(2,"translate"),l()),i&2&&(o(),m(d(2,1,"APP.CART.SHIPPING_AT_CHECKOUT")))}function nn(i,t){if(i&1&&(r(0,"div")(1,"dt"),p(2),c(3,"translate"),l(),r(4,"dd"),C(5,en,2,3)(6,tn,3,3,"span",22),l()()),i&2){let e,n=s().$implicit,a=s(3);o(2),f(" ",d(3,2,"APP.CART.SHIPPING")," "),o(3),u((e=a.shipOf(n.key))!=null&&e.selection?5:6)}}function on(i,t){if(i&1&&p(0),i&2){let e=s(2).$implicit;f(" (",e.promo.code,") ")}}function an(i,t){if(i&1&&(r(0,"div")(1,"dt"),p(2),c(3,"translate"),C(4,on,1,1),l(),r(5,"dd"),p(6),l()()),i&2){let e=s().$implicit,n=s(3);o(2),f(" ",d(3,3,"APP.CART.DISCOUNT")," "),o(2),u(e.promo?4:-1),o(2),f(" -",n.price(e.discountCents)," ")}}function rn(i,t){if(i&1&&(r(0,"div",70)(1,"p",71),g(2,"i",39),p(3),l(),r(4,"dl",72)(5,"div")(6,"dt"),p(7),c(8,"translate"),l(),r(9,"dd"),p(10),l()(),C(11,nn,7,4,"div")(12,an,7,5,"div"),r(13,"div",73)(14,"dt"),p(15),c(16,"translate"),l(),r(17,"dd"),p(18),l()()()()),i&2){let e=t.$implicit,n=s(3);P("data-testid","checkout-seller-"+e.workspaceId),o(3),f(" ",e.seller==null?null:e.seller.displayName," "),o(4),f(" ",d(8,8,"APP.CART.SUBTOTAL")," "),o(3),f(" ",n.price(e.subtotalCents)," "),o(),u(e.requiresShipping?11:-1),o(),u(e.discountCents>0?12:-1),o(3),f(" ",d(16,10,"APP.CART.TOTAL")," "),o(3),m(n.price(n.groupTotal(e)))}}function ln(i,t){if(i&1&&I(0,rn,19,12,"div",70,ue),i&2){let e=s(2);A(e.payGroups())}}function pn(i,t){if(i&1&&(p(0),c(1,"translate")),i&2){let e=s(3);f(" ",e.shippingCents()===0?d(1,1,"APP.CHECKOUT.FREE"):e.price(e.shippingCents())," ")}}function sn(i,t){i&1&&(r(0,"span",22),p(1),c(2,"translate"),l()),i&2&&(o(),m(d(2,1,"APP.CART.SHIPPING_AT_CHECKOUT")))}function cn(i,t){if(i&1&&(r(0,"div")(1,"dt"),p(2),c(3,"translate"),l(),r(4,"dd"),C(5,pn,2,3)(6,sn,3,3,"span",22),l()()),i&2){let e=s(2);o(2),f(" ",d(3,2,"APP.CART.SHIPPING")," "),o(3),u(e.allSelected()?5:6)}}function dn(i,t){if(i&1&&(r(0,"div")(1,"dt"),p(2),c(3,"translate"),l(),r(4,"dd"),p(5),l()()),i&2){let e=s(2);o(2),f(" ",d(3,2,"APP.CART.DISCOUNT")," "),o(3),f("-",e.price(e.discountCents()),"")}}function _n(i,t){if(i&1&&(r(0,"p",34),g(1,"i",66),r(2,"span"),p(3),c(4,"translate"),l()()),i&2){let e=s(2);o(3),m(d(4,1,e.apiErrorKey()))}}function mn(i,t){if(i&1){let e=S();r(0,"div",8)(1,"div",19)(2,"section",20)(3,"button",21),y("click",function(){h(e);let a=s();return x(a.itemsExpanded.set(!a.itemsExpanded()))}),r(4,"strong"),p(5),c(6,"translate"),l(),r(7,"span",22),p(8),l(),C(9,Mi,3,6,"span",23),g(10,"i",24),l(),C(11,Bi,5,3),l(),C(12,Yi,55,58,"section",25)(13,Ji,3,1),l(),r(14,"aside",26)(15,"section",27),C(16,ln,2,0),r(17,"dl",28)(18,"div")(19,"dt"),p(20),c(21,"translate"),l(),r(22,"dd"),p(23),l()(),C(24,cn,7,4,"div")(25,dn,6,4,"div"),r(26,"div",29)(27,"dt"),p(28),c(29,"translate"),l(),r(30,"dd",30),p(31),l()()()(),r(32,"p",31),g(33,"i",32),r(34,"strong"),p(35),c(36,"translate"),l(),r(37,"span",33),p(38),c(39,"translate"),l()(),C(40,_n,5,3,"p",34),r(41,"button",35),y("click",function(){h(e);let a=s();return x(a.pay())}),g(42,"i",24),p(43),c(44,"translate"),l(),g(45,"app-legal-links"),l(
2)()}if(i&2){let e=s();o(3),P("aria-expanded",e.itemsExpanded()),o(2),m(d(6,32,"APP.CHECKOUT.ITEMS_SUMMARY")),o(3),m(e.countLabel(e.itemCount())),o(),u(e.isMulti()?9:-1),o(),O("pi-chevron-up",e.itemsExpanded())("pi-chevron-down",!e.itemsExpanded()),o(),u(e.itemsExpanded()?11:-1),o(),u(e.requiresShipping()&&!e.allLockedByOpenCart()?12:-1),o(),u(e.requiresShipping()?13:-1),o(3),u(e.isMulti()?16:-1),o(4),m(d(21,34,"APP.CART.SUBTOTAL")),o(3),m(e.price(e.subtotalCents())),o(),u(e.requiresShipping()?24:-1),o(),u(e.discountCents()>0?25:-1),o(3),m(d(29,36,"APP.CART.TOTAL")),o(3),f(" ",e.price(e.totalCents())," "),o(4),m(d(36,38,"APP.CHECKOUT.SECURE")),o(3),m(d(39,40,"APP.CHECKOUT.CARD_BRANDS")),o(2),u(e.apiErrorKey()?40:-1),o(),v("disabled",e.payState().disabled),P("data-state",e.payState().key),o(),O("pi-spin",e.submitting())("pi-spinner",e.submitting())("pi-lock",!e.submitting()&&!e.payState().disabled)("pi-truck",!e.submitting()&&e.payState().disabled),o(),f(" ",M(44,42,e.payState().key,R(45,Pt,e.price(e.totalCents())))," ")}}function gn(i,t){if(i&1){let e=S();r(0,"div",9)(1,"section",74),c(2,"translate"),y("click",function(a){return h(e),x(a.stopPropagation())}),g(3,"span",75),r(4,"header",76),g(5,"i",77),r(6,"h2"),p(7),c(8,"translate"),l(),r(9,"button",78),c(10,"translate"),y("click",function(){h(e);let a=s();return x(a.closePayment())}),g(11,"i",79),l()(),r(12,"div",80)(13,"app-stripe-payment",81),y("paid",function(){h(e);let a=s();return x(a.onPaid())}),l()()()()}if(i&2){let e=t,n=s();o(),P("aria-label",d(2,8,"APP.CHECKOUT.PAYMENT_TITLE")),o(6),m(d(8,10,"APP.CHECKOUT.PAYMENT_TITLE")),o(2),P("aria-label",d(10,12,"APP.CHECKOUT.CANCEL")),o(4),v("clientSecret",e.clientSecret)("amountLabel",n.price(e.totalCents))("returnUrl",n.returnUrl())("billingEmail",n.buyerEmail)("payLabelParams",R(14,Pt,n.price(e.totalCents)))}}var xt=()=>({options:null,loading:!1,error:!1,selection:null,closingCart:!1,closeCartError:!1}),yt=class i{route=b(we);router=b(Oe);platformId=b(j);destroyRef=b(he);zone=b(q);translate=b(D);login=b(Ae);authPrompt=b(De);users=b(Ie);addressesApi=b(We);buyer=b(te);shop=b(Ge);tracking=b(qe);seo=b(Me);cart=b(Ye);cartUi=b($e);countries=se;dialOptions=Je;routeKey=k("");phase=k("boot");payGroups=E(()=>{let t=this.cart.groups().filter(n=>!!n.workspaceId);if(t.length>1)return t;let e=this.routeKey();return e===Ze?t:t.filter(n=>n.key===e)});isMulti=E(()=>this.payGroups().length>1);hasGroups=E(()=>this.payGroups().length>0);requiresShipping=E(()=>this.payGroups().some(t=>t.requiresShipping));itemCount=E(()=>this.payGroups().reduce((t,e)=>t+e.itemCount,0));currency=E(()=>this.payGroups()[0]?.currency||"EUR");buyerEmail="";addresses=k([]);selectedAddressId=null;form={fullName:"",dialCode:"+33",phone:"",line1:"",line2:"",city:"",postalCode:"",country:"FR"};missing=k([]);itemsExpanded=k(!1);addressValidated=k(!1);shipping=k({});submitting=k(!1);apiErrorKey=k(null);payment=k(null);paid=!1;starting=null;startedFor=null;shippingGroups=E(()=>this.payGroups().filter(t=>t.requiresShipping));loadingOptions=E(()=>Object.values(this.shipping()).some(t=>t.loading));optionsError=E(()=>Object.values(this.shipping()).some(t=>t.error));allLockedByOpenCart=E(()=>{let t=this.shippingGroups();return t.length>0&&t.every(e=>!!this.shipping()[e.key]?.options?.openCart)});shippingUnavailable=E(()=>this.shippingGroups().some(t=>{let e=this.shipping()[t.key]?.options;return!!e&&!e.openCart&&!ie(e)}));allSelected=E(()=>this.shippingGroups().every(t=>!!this.shipping()[t.key]?.selection));shipOf(t){return this.shipping()[t]??null}shippingOf(t){return this.shipOf(t)?.selection?.shippingCents??0}headSellerName=E(()=>this.payGroups().at(0)?.seller?.displayName||null);subtotalCents=E(()=>this.payGroups().reduce((t,e)=>t+e.subtotalCents,0));discountCents=E(()=>this.payGroups().reduce((t,e)=>t+e.discountCents,0));shippingCents=E(()=>this.payGroups().reduce((t,e)=>t+this.shippingOf(e.key),0));totalCents=E(()=>Math.max(0,this.subtotalCents()+this.shippingCents()-this.discountCents()));groupTotal(t){return Math.max(0,t.subtotalCents+this.shippingOf(t.key)-t.discountCents)}payState=E(()=>pt({requiresShipping:this.requiresShipping(),submitting:this.submitting(),shippingUnavailable:this.shippingUnavailable(),loadingOptions:this.loadingOptions(),hasSelection:this.allSelected()}));constructor(){this.route.paramMap.pipe(pe(this.destroyRef)).subscribe(t=>this.routeKey.set(t.get("workspaceId")||"")),this.seo.disableFollow(),xe(()=>this.zone.run(()=>void this.boot())),this.login.onLoginEvent.pipe(pe(this.destroyRef)).subscribe(t=>{t.type==="login"&&this.phase()==="login"&&this.start()})}boot(){return w(this,null,function*(){if(!N(this.platformId))return;if(this.login.isLoggedIn){yield this.start();return}if(this.phase.set("login"),!this.hasGroups())return;(yield this.authPrompt.requestLogin())&&this.login.isLoggedIn&&(yield this.start())})}loginNow(){return w(this,null,function*(){(yield this.authPrompt.requestLogin())&&this.login.isLoggedIn&&(yield this.start())})}signup(){this.router.navigate(["/signup"],{queryParams:{returnUrl:this.router.url}})}start(){let t=this.routeKey();return this.startedFor===t&&this.starting?this.starting:(this.startedFor=t,this.starting=this.run(),this.starting)}run(){return w(this,null,function*(){this.phase.set("ready");let t=this.payGroups();if(!t.length)return;let e=this.cart.cartSessionId();
2for(let n of t)this.tracking.trackForWorkspace(n.workspaceId,e,"checkout_start",{totalCents:n.totalCents});yield this.cart.reReserveGroups(t.map(n=>n.key)),this.cart.pauseHolds(),yield Promise.all([this.loadBuyer(),this.loadAddresses()]),this.requiresShipping()&&(Q(this.form).length||(yield this.validateAddress()))})}loadBuyer(){return w(this,null,function*(){try{let t=yield L(yield this.users.getMe());this.buyerEmail=t?.email||"",this.form.fullName||(this.form.fullName=[t?.firstName,t?.lastName].filter(Boolean).join(" "))}catch{this.buyerEmail=""}})}loadAddresses(){return w(this,null,function*(){try{let t=yield L(this.addressesApi.getAll());this.addresses.set(t||[]);let e=t.find(n=>n.isDefault&&n.isShipping)||t.find(n=>n.isShipping)||t[0];e&&this.applyAddress(e,!1)}catch{this.addresses.set([])}})}onSavedAddressChange(t){let e=this.addresses().find(n=>n.id===t);e&&this.applyAddress(e,!0)}applyAddress(t,e){let[n,a]=it(t.phone||"",t.country);this.selectedAddressId=t.id,this.form={fullName:t.fullName||"",dialCode:n,phone:a,line1:t.line1||"",line2:t.line2||"",city:t.city||"",postalCode:t.postalCode||"",country:se.includes(t.country)?t.country:"FR"},this.resetShipping(),e&&!Q(this.form).length&&this.validateAddress()}onCountryChange(){this.form.dialCode=et(this.form.country),this.onAddressChange()}onAddressChange(){this.missing.set([]),this.addressValidated()&&this.resetShipping()}isMissing(t){return this.missing().includes(t)}resetShipping(){this.addressValidated.set(!1),this.shipping.set({})}patchShipping(t,e){this.shipping.update(n=>X(U({},n),{[t]:U(U({},n[t]??xt()),e)}))}validateAddress(){return w(this,null,function*(){let t=Q(this.form);if(this.missing.set(t),t.length)return;let e=this.shippingGroups();e.length&&(this.resetShipping(),this.addressValidated.set(!0),yield Promise.all(e.map(n=>this.loadOptions(n))),this.optionsError()&&this.addressValidated.set(!1))})}loadOptions(t){return w(this,null,function*(){this.patchShipping(t.key,X(U({},xt()),{loading:!0}));try{let e=yield L(this.buyer.shippingOptions(t.workspaceId,U({items:t.items.map(n=>X(U({productId:n.productId},n.variantId?{variantId:n.variantId}:{}),{quantity:n.quantity})),buyerCountry:this.form.country,buyerPostalCode:this.form.postalCode.trim()},this.buyerEmail?{buyerEmail:this.buyerEmail}:{})));this.patchShipping(t.key,{options:e,loading:!1,selection:e.openCart?lt(e,e.openCart):null})}catch{this.patchShipping(t.key,{loading:!1,error:!0})}})}onSelection(t,e){this.patchShipping(t,{selection:e})}closeOpenCart(t,e){return w(this,null,function*(){if(!this.shipping()[t.key]?.closingCart){this.patchShipping(t.key,{closingCart:!0,closeCartError:!1});try{yield this.shop.closePurchaseCart(e),yield this.loadOptions(t)}catch{this.patchShipping(t.key,{closingCart:!1,closeCartError:!0})}}})}pay(){return w(this,null,function*(){let t=this.payGroups();if(!(!t.length||this.payState().disabled)){if(this.apiErrorKey.set(null),this.requiresShipping()){let e=Q(this.form);if(this.missing.set(e),e.length){this.apiErrorKey.set("APP.CHECKOUT.ERR_ADDRESS");return}}if(!this.buyerEmail){this.apiErrorKey.set("APP.CHECKOUT.ERR_EMAIL");return}this.submitting.set(!0);try{this.requiresShipping()&&(yield this.persistAddress());let e=this.cart.cartSessionId();if(t.length>1){let n={};for(let _ of t)n[_.key]=this.shipping()[_.key]?.selection??null;let a=yield L(this.buyer.createMarketplacePaymentIntent(ct({groups:t,selections:n,buyerEmail:this.buyerEmail,form:this.form,cartSessionId:e})));this.payment.set({clientSecret:a.clientSecret,totalCents:a.totalCents,orderIds:a.orderIds||[],marketplaceOrderId:a.marketplaceOrderId})}else{let n=t[0],a=yield L(this.buyer.createPaymentIntent(n.workspaceId,st({group:n,buyerEmail:this.buyerEmail,form:this.form,selection:this.shipping()[n.key]?.selection??null,cartSessionId:e})));this.payment.set({clientSecret:a.clientSecret,totalCents:a.totalCents,orderIds:[a.orderId],marketplaceOrderId:null})}}catch(e){let n=je(e);this.apiErrorKey.set(Xe(n)),n==="SHOP_SHIPPING_METHOD_UNAVAILABLE"&&(this.submitting.set(!1),yield this.validateAddress())}finally{this.submitting.set(!1)}}})}persistAddress(){return w(this,null,function*(){try{let e=this.form,n=tt(e.dialCode,e.phone.trim()),a={fullName:e.fullName.trim(),phone:n,line1:e.line1.trim(),line2:e.line2.trim(),city:e.city.trim(),postalCode:e.postalCode.trim(),country:e.country.toUpperCase(),isShipping:!0,isDefault:this.addresses().length===0},_=this.addresses().find(T=>T.id===this.selectedAddressId);if(_){if(_.fullName!==a.fullName||(_.phone||"")!==a.phone||_.line1!==a.line1||(_.line2||"")!==a.line2||_.city!==a.city||_.postalCode!==a.postalCode||_.country!==a.country){let t=a,{isDefault:fe}=t,vt=Ce(t,["isDefault"]);yield L(this.addressesApi.update(_.id,vt))}}else{let T=yield L(this.addressesApi.create(a));T?.id&&(this.addresses.set([...this.addresses(),T]),this.selectedAddressId=T.id)}}catch{}})}returnUrl(){let t=this.payment();return!t||!N(this.platformId)?"":`${window.location.origin}${this.confirmationPath(t)}`}confirmationPath(t){let e=new URLSearchParams;if(t.marketplaceOrderId)e.set("orders",t.orderIds.join(",")),e.set("mkt",t.marketplaceOrderId);else{e.set("order",t.orderIds[0]||""),e.set("ws",this.payGroups()[0]?.key||this.routeKey());let n=this.shipping()[this.payGroups()[0]?.key||""]?.options?.openCart;n&&(e.set("openCart",n.orderId),n.openUntil&&e.set("openUntil",n.openUntil))}return`/a/order-confirmation?${e.toString()}`}closePayment(){this.payment.set(null)}onPaid(){let t=this.payment();if(!t)return;this.paid=!0;let e=this.confirmationPath(t);t.marketplaceOrderId?this.cart.completeAll():this.cart.completeGroup(this.payGroups()[0]?.key||this.routeKey()),this.router.navigateByUrl(`${e}&payment_intent_client_secret=${encodeURIComponent(t.clientSecret)}`,{replaceUrl:!0})}price(t){return Y(t,this.currency(),this.translate.currentLang)}countLabel(t){return t===1?this.translate.instant("APP.CART.ITEM_ONE"):this.translate.instant("APP.CART.ITEM_OTHER",{count:t})}continueShopping(){this.router.navigateByUrl("/a/marketplace")}ngOnDestroy(){if(this.phase()!=="ready"||(this.cart.resumeHolds(),this.paid))return;let t=this.cart.cartSessionId();
2for(let e of this.payGroups())this.tracking.trackForWorkspace(e.workspaceId,t,"checkout_abandon")}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=K({type:i,selectors:[["app-checkout-page"]],decls:18,vars:13,consts:[["data-testid","checkout-page",1,"co"],[1,"co__head"],["type","button",1,"co__back",3,"click"],["aria-hidden","true",1,"pi","pi-angle-left"],[1,"co__seller"],["aria-busy","true",1,"co__loading"],["data-testid","checkout-empty",1,"co__empty"],["data-testid","checkout-login",1,"co__card","co__login"],[1,"co__grid"],["data-testid","payment-modal",1,"cmodal"],["aria-hidden","true",1,"pi","pi-spin","pi-spinner"],["aria-hidden","true",1,"co__empty-ic"],[1,"pi","pi-shopping-cart"],["type","button",1,"cbtn","cbtn--primary",3,"click"],["aria-hidden","true",1,"co__login-ic"],[1,"pi","pi-user"],[1,"co__login-actions"],["type","button","data-testid","checkout-login-btn",1,"cbtn","cbtn--primary",3,"click"],["type","button","data-testid","checkout-signup-btn",1,"cbtn","cbtn--secondary",3,"click"],[1,"co__main"],[1,"co__card","co__items"],["type","button",1,"co__items-toggle",3,"click"],[1,"co__muted"],[1,"co__pill"],["aria-hidden","true",1,"pi"],[1,"co__card"],[1,"co__side"],[1,"co__card","co__summary"],[1,"csum"],[1,"csum__total"],["data-testid","checkout-total"],[1,"co__secure"],["aria-hidden","true",1,"pi","pi-lock"],[1,"co__brands"],["role","alert","data-testid","checkout-error",1,"notice","notice--error"],["type","button","data-testid","checkout-pay",1,"cbtn","cbtn--primary","cbtn--block","co__pay",3,"click","disabled"],["type","button",1,"cbtn","cbtn--ghost","co__edit",3,"click"],[1,"co__grouphead"],[1,"co__lines"],["aria-hidden","true",1,"pi","pi-shop"],[1,"co__thumb"],["loading","lazy",3,"src","alt"],["aria-hidden","true",1,"pi","pi-shopping-bag"],[1,"co__line-info"],[1,"co__line-title"],[1,"co__h2"],["novalidate","",1,"co__form",3,"ngSubmit"],[1,"co__field","co__field--full"],["name","fullName","autocomplete","name","data-testid","co-fullname",3,"ngModelChange","ngModel"],[1,"co__req"],["for","co-phone"],[1,"co__phone"],["name","dial",3,"ngModelChange","ngModel"],[3,"value"],["id","co-phone","name","phone","type","tel","autocomplete","tel-national","data-testid","co-phone",3,"ngModelChange","ngModel"],["name","line1","autocomplete","address-line1","data-testid","co-line1",3,"ngModelChange","ngModel"],["name","line2","autocomplete","address-line2",3,"ngModelChange","ngModel"],[1,"co__field"],["name","city","autocomplete","address-level2","data-testid","co-city",3,"ngModelChange","ngModel"],["name","postalCode","autocomplete","postal-code","inputmode","text","data-testid","co-postal",3,"ngModelChange","ngModel"],["name","country","data-testid","co-country",3,"ngModelChange","ngModel"],["type","submit","data-testid","checkout-validate-address",1,"cbtn","cbtn--primary","cbtn--block","co__field--full",3,"disabled"],["role","alert",1,"notice","notice--error"],["name","saved",3,"ngModelChange","ngModel"],["aria-hidden","true",1,"pi","pi-exclamation-circle"],["aria-hidden","true",1,"pi","pi-truck"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["role","status",1,"co__searching"],[3,"workspaceId","sellerName","options","selection","country","postalCode","currency","closingCart","closeCartError"],[3,"selectionChange","closeOpenCart","workspaceId","sellerName","options","selection","country","postalCode","currency","closingCart","closeCartError"],[1,"co__sellersum"],[1,"co__sellersum-name"],[1,"csum","csum--compact"],[1,"csum__sub"],["role","dialog","aria-modal","true",1,"cmodal__panel",3,"click"],["aria-hidden","true",1,"cmodal__grip"],[1,"cmodal__head"],["aria-hidden","true",1,"pi","pi-credit-card"],["type","button","data-testid","payment-cancel",1,"cmodal__close",3,"click"],["aria-hidden","true",1,"pi","pi-times"],[1,"cmodal__body"],["payLabel","APP.CHECKOUT.PAY",3,"paid","clientSecret","amountLabel","returnUrl","billingEmail","payLabelParams"]],template:function(e,n){if(e&1&&(r(0,"app-shell")(1,"div",0)(2,"header",1)(3,"button",2),c(4,"translate"),y("click",function(){return n.cartUi.open()}),g(5,"i",3),p(6),c(7,"translate"),l(),r(8,"h1"),p(9),c(10,"translate"),l(),C(11,ki,3,6,"p",4)(12,Ei,3,6,"p",4),l(),C(13,wi,2,0,"div",5)(14,Oi,12,9,"section",6)(15,Ti,16,12,"section",7)(16,mn,46,47,"div",8),l(),C(17,gn,14,16,"div",9),l(
2)),e&2){let a;o(),P("data-mode",n.isMulti()?"marketplace":"shop"),o(2),P("aria-label",d(4,7,"APP.CHECKOUT.EDIT_CART")),o(3),f(" ",d(7,9,"APP.CART.TITLE")," "),o(3),m(d(10,11,"APP.CHECKOUT.TITLE")),o(2),u(n.isMulti()?11:n.headSellerName()?12:-1),o(2),u(n.phase()==="boot"?13:n.hasGroups()?n.phase()==="login"?15:16:14),o(4),u((a=n.payment())?17:-1,a)}},dependencies:[F,Fe,ze,Ke,Ne,Re,Ve,Ue,Le,He,Be,Te,W,G,ut,Qe,re,le],styles:["[_nghost-%COMP%]{--paper: #0a0a14;--surface: #12121e;--surface-2: #1a1a2e;--ink: #ffffff;--ink-soft: rgba(255, 255, 255, .66);--ink-muted: rgba(255, 255, 255, .45);--accent: #2f8eef;--accent-bright: #54a6f6;--live: #ff3b30;--error: #ef4444;--border: rgba(255, 255, 255, .1);--border-soft: rgba(255, 255, 255, .06);--topbar: 64px;--story-ring-a: #ffc83a;--story-ring-b: #ff7a1a;--story-ring-seen: rgba(255, 255, 255, .22);display:block;background:var(--paper);color:var(--ink);font-family:Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased}.cbtn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border:1px solid transparent;border-radius:999px;font:inherit;font-size:15px;font-weight:700;cursor:pointer;text-decoration:none;transition:background .15s ease,opacity .15s ease}.cbtn--primary[_ngcontent-%COMP%]{background:var(--accent);color:#fff}.cbtn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--accent-bright)}.cbtn--secondary[_ngcontent-%COMP%]{background:var(--surface-2);border-color:var(--border);color:var(--ink)}.cbtn--secondary[_ngcontent-%COMP%]:hover:not(:disabled){background:#ffffff14}.cbtn--ghost[_ngcontent-%COMP%]{background:transparent;color:var(--accent-bright);text-decoration:underline;text-underline-offset:3px}.cbtn--block[_ngcontent-%COMP%]{width:100%}.cbtn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.qty[_ngcontent-%COMP%]{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:10px;background:var(--surface-2)}.qty[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:36px;height:36px;border:0;background:none;color:var(--ink);cursor:pointer;display:grid;place-items:center}.qty[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{color:var(--ink-muted);cursor:not-allowed}.qty__n[_ngcontent-%COMP%]{min-width:26px;text-align:center;font-weight:700}.notice[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin:0;padding:12px 14px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);color:var(--ink-soft);font-size:13.5px;line-height:1.45}.notice[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{margin-top:2px;font-size:16px}.notice[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:var(--ink)}.notice--error[_ngcontent-%COMP%]{border-style:dashed;border-color:#ef44448c}.notice--error[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--error)}.notice--warn[_ngcontent-%COMP%]{border-color:#ffc83a73}.notice--warn[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--story-ring-a)}.notice--ok[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--accent-bright)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.co[_ngcontent-%COMP%]{max-width:1080px;margin:0 auto;padding:16px 16px 40px}.co__head[_ngcontent-%COMP%]{margin-bottom:16px}.co__head[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:6px 0 0;font-size:24px;font-weight:800}.co__back[_ngcontent-%COMP%]{border:0;background:none;padding:0;color:var(--accent-bright);font:inherit;font-size:14px;cursor:pointer;display:inline-flex;align-items:center;gap:2px}.co__seller[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--ink-soft);font-size:14px}.co__loading[_ngcontent-%COMP%]{display:grid;place-items:center;min-height:40vh;font-size:26px;color:var(--ink-muted)}.co__muted[_ngcontent-%COMP%]{color:var(--ink-muted);font-size:13px}.co__right[_ngcontent-%COMP%]{margin-left:auto}.co__card[_ngcontent-%COMP%]{border:1px solid var(--border-soft);border-radius:16px;background:var(--surface);padding:16px;display:flex;flex-direction:column;gap:12px}.co__h2[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:700;display:flex;align-items:center;gap:8px}
2.co__grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.co__main[_ngcontent-%COMP%], .co__side[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;min-width:0}.co__empty[_ngcontent-%COMP%], .co__login[_ngcontent-%COMP%]{text-align:center;align-items:center;max-width:520px;margin:6vh auto 0}.co__empty[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .co__login[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:4px 0 0;font-size:19px}.co__empty[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], .co__login[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;color:var(--ink-soft);line-height:1.5}.co__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.co__empty-ic[_ngcontent-%COMP%], .co__login-ic[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);color:var(--accent-bright);font-size:26px}.co__login-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:6px}.co__items-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;border:0;background:none;padding:0;color:var(--ink);font:inherit;cursor:pointer;text-align:left}.co__items-toggle[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{margin-left:auto;color:var(--ink-soft)}.co__lines[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.co__lines[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:14px}.co__thumb[_ngcontent-%COMP%]{width:44px;height:44px;flex:none;border-radius:8px;overflow:hidden;background:var(--surface-2);display:grid;place-items:center;color:var(--ink-muted)}.co__thumb[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.co__line-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;flex:1}.co__line-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co__edit[_ngcontent-%COMP%]{align-self:flex-start;min-height:32px;padding:0;font-size:14px}.co__pill[_ngcontent-%COMP%]{padding:2px 8px;border-radius:6px;border:1px solid rgba(84,166,246,.45);color:var(--accent-bright);font-size:12px;font-weight:700}.co__grouphead[_ngcontent-%COMP%]{margin:4px 0 0;padding:8px 10px;display:flex;align-items:center;gap:8px;border-radius:10px;background:var(--surface-2);font-size:13px;font-weight:700}.co__grouphead[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co__sellersum[_ngcontent-%COMP%]{padding-bottom:12px;border-bottom:1px dashed var(--border)}.co__sellersum-name[_ngcontent-%COMP%]{margin:0 0 6px;display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px}.co__form[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.co__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--ink-soft);min-width:0}.co__field--full[_ngcontent-%COMP%]{grid-column:1/-1}.co__field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .co__field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{height:46px;width:100%;padding:0 12px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);color:var(--ink);font:inherit;font-size:15px}.co__field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus, .co__field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]:focus{outline:2px solid var(--accent);outline-offset:1px}.co__field.is-missing[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border:2px dashed var(--error)}.co__req[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;color:var(--ink);font-weight:600}.co__req[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{color:var(--error)}.co__phone[_ngcontent-%COMP%]{display:flex;gap:8px}.co__phone[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{width:96px;flex:none}.co__searching[_ngcontent-%COMP%]{margin:0;display:flex;align-items:center;justify-content:center;gap:10px;padding:16px;color:var(--ink-soft);font-size:14px}.csum[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:6px;font-size:14px}.csum[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px}.csum[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{color:var(--ink-soft)}.csum[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:0;font-weight:600;text-align:right}.csum__total[_ngcontent-%COMP%]{margin-top:4px;padding-top:10px;border-top:1px solid var(--border-soft);font-size:17px}.csum__total[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%], .csum__total[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{color:var(--ink);font-weight:800}.csum--compact[_ngcontent-%COMP%]{gap:4px;font-size:13px}.csum__sub[_ngcontent-%COMP%]{margin-top:2px;padding-top:6px;border-top:1px dashed var(--border-soft)}.csum__sub[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%], .csum__sub[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{color:var(--ink);font-weight:700}.co__secure[_ngcontent-%COMP%]{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;font-size:13px;color:var(--ink-soft)}.co__secure[_ngcontent-%COMP%]   .pi-lock[_ngcontent-%COMP%]{color:var(--accent-bright)}.co__brands[_ngcontent-%COMP%]{width:100%;color:var(--ink-muted);font-size:12px}.co__pay[_ngcontent-%COMP%]{min-height:54px;font-size:16px}.cmodal[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:986;display:flex;align-items:flex-end;justify-content:center;background:#05050cb8;backdrop-filter:blur(6px)}.cmodal__panel[_ngcontent-%COMP%]{width:100%;max-height:90vh;display:flex;flex-direction:column;background:var(--surface);border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom)}.cmodal__grip[_ngcontent-%COMP%]{display:block;width:40px;height:4px;border-radius:2px;background:#ffffff38;margin:10px auto 0}.cmodal__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:10px 16px 12px;border-bottom:1px solid var(--border-soft)}.cmodal__head[_ngcontent-%COMP%] > .pi[_ngcontent-%COMP%]{color:var(--accent-bright)}.cmodal__head[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:800}.cmodal__close[_ngcontent-%COMP%]{margin-left:auto;width:36px;height:36px;border-radius:50%;border:0;background:var(--surface-2);color:var(--ink-soft);display:grid;place-items:center;cursor:pointer}.cmodal__body[_ngcontent-%COMP%]{overflow-y:auto;padding:14px 16px 20px;display:flex;flex-direction:column;gap:10px}@media (min-width: 820px){.cmodal[_ngcontent-%COMP%]{align-items:center;padding:20px}.cmodal__panel[_ngcontent-%COMP%]{max-width:520px;border-radius:22px}.cmodal__grip[_ngcontent-%COMP%]{display:none}.cmodal__head[_ngcontent-%COMP%]{padding-top:16px}}@media (min-width: 960px){.co[_ngcontent-%COMP%]{padding:24px 24px 48px}.co__grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);align-items:start}.co__side[_ngcontent-%COMP%]{position:sticky;top:0}}"]})};export{yt as CheckoutPageComponent};

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.