PageSourceSearch

https://www.vakantieveilingen.be/dist/js/web.js?v=NpFiSVJZOSYFr3wfrnW-8YEI8OKIR14C5Hkmgs9fcLs

js vakantieveilingen.be collected 2026-09-26 07:41:05 UTC 376,549 bytes, 3 lines download raw bytes

vendor: 6,435 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/chunks/featureKeys-BUIYEJTJ.js","js/chunks/navigation-CDnm76m5.js","js/chunks/vue.esm-bundler-Cha-S9cx.js","js/chunks/datetime-BUwKs0hN.js","js/chunks/_commonjsHelpers-Cpj98o6Y.js","js/chunks/imageCdn-Bjm-aimG.js"])))=>i.map(i=>d[i]);
2import{s as Ke,d as q,r as w,a3 as gn,c as E,o as u,b as h,f as N,e as o,h as _,g as a,t as f,n as ee,i as k,R as ie,A as de,v as j,u as ft,w as te,l as oe,F as z,x as Q,y as _t,z as qa,p as V,a4 as Ks,m as Ct,L as at,j as wt,N as Wa,a5 as za,P as Ka,Q as Ga,X as ja,a6 as Xa,a2 as Pe,J as $t,a7 as et,E as Ue,a as ae,M as Re,C as Te,D as Gs,a8 as Zt,I as Oe,B as yo,a9 as js,W as lt,aa as Xs,ab as Ys,ac as Ya,ad as Ja,K as Js,G as Zs,ae as Qs,af as ei,ag as os,ah as Za,ai as Qa,U as er,q as tr}from"./chunks/vue.esm-bundler-Cha-S9cx.js";import{d as bo,s as vt,S as ti,_ as An,T as nr,c as or}from"./chunks/TextAreaField-BMhMjlPd.js";import{L as Ln,t as sr,c as ir,_ as ar}from"./chunks/stepConfig-CGXhF2EF.js";import{_ as ss}from"./chunks/ChangePasswordField.vue_vue_type_script_setup_true_lang-Jei7pUw7.js";import{u as wo,A as zt,e as Kt,r as rr,_ as le,n as lr,F as he,o as kt,x as ni,k as oi,y as si,z as ii,B as cr,b as ai,D as Dn,E as ur,i as dr,m as hr,G as fr,w as is,H as bn,I as _r,J as pr,K as mr,M as ri,O as vr,C as li,Q as ci,R as ui,c as di,N as hi,P as fi,V as gr,S as as}from"./chunks/PhoneField-XQYo71zV.js";import{S as yr,u as ko}from"./chunks/SuccessCard-Dv9wBIDy.js";import{_ as Tt}from"./chunks/SubmitButton.vue_vue_type_script_setup_true_lang-C8qRqaUs.js";import{d as tt,g as pt,h as rs,j as br,k as ls,l as cs,b as us,n as _i,o as wr,p as kr,a as fo}from"./chunks/datetime-BUwKs0hN.js";import{c as Ir,g as Sr}from"./chunks/_commonjsHelpers-Cpj98o6Y.js";import{t as st,o as me,r as Gt,w as Cr,a as $r,c as Tr,q as xr,s as pi,u as Er,v as Ar,x as ds,y as hs,z as Lr,g as jt,A as Dr,p as Br}from"./chunks/imageCdn-Bjm-aimG.js";import{j as mi,k as vi,e as gi,f as yi,b as bi,l as Pr,s as Ur,h as Mr,d as wi,i as Nr,m as Rr,O as Or,u as Fr,E as Vr,a as Hr,o as fs,_ as qr,g as Wr,n as ki}from"./chunks/useExternalItemsSync-DeA_rOLx.js";import{d as De,f as pe,a as Ii}from"./chunks/pricing-BViBlZ3t.js";import{a as zr,n as _s,b as Nt,N as Gn,S as Kr}from"./chunks/navigation-CDnm76m5.js";import{P as jn,f as Gr,u as Si,F as Ci,c as jr,k as Io,n as Xr,p as Yr,j as hn,e as Jr,g as Zr,d as Qr,q as xe,t as el,v as tl,x as nl}from"./chunks/featureKeys-BUIYEJTJ.js";import{w as ol,_ as $i,r as Ti}from"./chunks/OrderNumber.vue_vue_type_script_setup_true_lang-COuzjwrM.js";import{u as sl}from"./chunks/useDebouncedAsyncSearch-B9HxRBTE.js";import{c as il,C as al}from"./chunks/stepConfig-PmwKNpXj.js";import{u as rl,U as ll}from"./chunks/stepConfig-zmE0v3o4.js";function cl(n){let{swiper:e,extendParams:t,on:s,emit:i}=n;const r=zr();t({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),e.mousewheel={enabled:!1};let l,d=Nt(),c;const p=[];function m(b){let S=0,x=0,R=0,F=0;return"detail"in b&&(x=b.detail),"wheelDelta"in b&&(x=-b.wheelDelta/120),"wheelDeltaY"in b&&(x=-b.wheelDeltaY/120),"wheelDeltaX"in b&&(S=-b.wheelDeltaX/120),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(S=x,x=0),R=S*10,F=x*10,"deltaY"in b&&(F=b.deltaY),"deltaX"in b&&(R=b.deltaX),b.shiftKey&&!R&&(R=F,F=0),(R||F)&&b.deltaMode&&(b.deltaMode===1?(R*=40,F*=40):(R*=800,F*=800)),R&&!S&&(S=R<1?-1:1),F&&!x&&(x=F<1?-1:1),{spinX:S,spinY:x,pixelX:R,pixelY:F}}function g(){e.enabled&&(e.mouseEntered=!0)}function v(){e.enabled&&(e.mouseEntered=!1)}function y(b){return e.params.mousewheel.thresholdDelta&&b.delta<e.params.mousewheel.thresholdDelta||e.params.mousewheel.thresholdTime&&Nt()-d<e.params.mousewheel.thresholdTime?!1:b.delta>=6&&Nt()-d<60?!0:(b.direction<0?(!e.isEnd||e.params.loop)&&!e.animating&&(e.slideNext(),i("scroll",b.raw)):(!e.isBeginning||e.params.loop)&&!e.animating&&(e.slidePrev(),i("scroll",b.raw)),d=new r.Date().getTime(),!1)}function T(b){const $=e.params.mousewheel;if(b.direction<0){if(e.isEnd&&!e.params.loop&&$.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&$.releaseOnEdges)return!0;return!1}function I(b){let $=b,D=!0;if(!e.enabled||b.target.closest(`.${e.params.mousewheel.noMousewheelClass}`))return;const L=e.params.mousewheel;e.params.cssMode&&$.preventDefault();let S=e.el;e.params.mousewheel.eventsTarget!=="container"&&(S=document.querySelector(e.params.mousewheel.eventsTarget));const x=S&&S.contains($.target);if(!e.mouseEntered&&!x&&!L.releaseOnEdges)return!0;$.originalEvent&&($=$.originalEvent);let R=0;const F=e.rtlTranslate?-1:1,Y=m($);if(L.forceToAxis)if(e.isHorizontal())if(Math.abs(Y.pixelX)>Math.abs(Y.pixelY))R=-Y.pixelX*F;else return!0;else if(Math.abs(Y.pixelY)>Math.abs(Y.pixelX))R=-Y.pixelY;else return!0;else R=Math.abs(Y.pixelX)>Math.abs(Y.pixelY)?-Y.pixelX*F:-Y.pixelY;if(R===0)return!0;L.invert&&(R=-R);let G=e.getTranslate()+R*L.sensitivity;if(G>=e.minTranslate()&&(G=e.minTranslate()),G<=e.maxTranslate()&&(G=e.maxTranslate()),D=e.params.loop?!0:!(G===e.minTranslate()||G===e.maxTranslate()),D&&e.params.nested&&$.stopPropagation(),!e.params.freeMode||!e.params.freeMode.enabled){const P={time:Nt(),delta:Math.abs(R),direction:Math.sign(R),raw:b};p.length>=2&&p.shift();const H=p.length?p[p.length-1]:void 0;if(p.push(P),H?(P.direction!==H.direction||P.delta>H.delta||P.time>H.time+150)&&y(P):y(P),T(P))return!0}else{const P={time:Nt(),delta:Math.abs(R),direction:Math.sign(R)},H=c&&P.time<c.time+500&&P.delta<=c.delta&&P.direction===c.direction;if(!H){c=void 0;let U=e.getTranslate()+R*L.sensitivity;const W=e.isBeginning,J=e.isEnd;if(U>=e.minTranslate()&&(U=e.minTranslate()),U<=e.maxTranslate()&&(U=e.maxTranslate()),e.setTransition(0),e.setTranslate(U),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!W&&e.isBeginning||!J&&e.isEnd)&&e.updateSlidesClasses(),e.params.loop&&e.loopFix({direction:P.direction<0?"next":"prev",byMousewheel:!0}),e.params.freeMode.sticky){clearTimeout(l),l=void 0,p.length>=15&&p.shift();const ue=p.length?p[p.length-1]:void 0,Ie=p[0];if(p.push(P),ue&&(P.delta>ue.delta||P.direction!==ue.direction))p.splice(0);else if(p.length>=15&&P.time-Ie.time<500&&Ie.delta-P.delta>=1&&P.delta<=6){const be=R>0?.8:.2;c=P,p.splice(0),l=_s(()=>{e.destroyed||!e.params||e.slideToClosest(e.params.speed,!0,void 0,be)}
2,0)}l||(l=_s(()=>{if(e.destroyed||!e.params)return;const be=.5;c=P,p.splice(0),e.slideToClosest(e.params.speed,!0,void 0,be)},500))}if(H||i("scroll",$),e.params.autoplay&&e.params.autoplay.disableOnInteraction&&e.autoplay.stop(),L.releaseOnEdges&&(U===e.minTranslate()||U===e.maxTranslate()))return!0}}return $.preventDefault?$.preventDefault():$.returnValue=!1,!1}function C(b){let $=e.el;e.params.mousewheel.eventsTarget!=="container"&&($=document.querySelector(e.params.mousewheel.eventsTarget)),$[b]("mouseenter",g),$[b]("mouseleave",v),$[b]("wheel",I)}function A(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",I),!0):e.mousewheel.enabled?!1:(C("addEventListener"),e.mousewheel.enabled=!0,!0)}function B(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,I),!0):e.mousewheel.enabled?(C("removeEventListener"),e.mousewheel.enabled=!1,!0):!1}s("init",()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&B(),e.params.mousewheel.enabled&&A()}),s("destroy",()=>{e.params.cssMode&&A(),e.mousewheel.enabled&&B()}),Object.assign(e.mousewheel,{enable:A,disable:B})}const Xn={Default:"default",Cart:"cart",Upgrade:"upgrade"};async function ul(n){await Ke.post("/account/reset-password",n)}const dl={key:0,class:"login"},hl={class:"login__inner"},fl={class:"title"},_l={key:1,class:"d-flex justify-content-center"},pl=q({__name:"PasswordReset",props:{token:{},email:{},returnUrl:{default:void 0}},setup(n){const e=n,t=w(""),s=w(""),i=w(null),r=w(!1),l=gn("passwordField"),d=gn("confirmField"),c=gn("submitButton"),{validateAll:p}=wo(()=>[l.value,d.value]),m=E(()=>e.returnUrl?`/login?returnUrl=${encodeURIComponent(e.returnUrl)}`:"/login");async function g(){if(i.value=null,!!p())try{await ul({email:e.email,token:e.token,password:t.value,confirmPassword:s.value}),r.value=!0}catch(v){i.value=Kt(v)??f("Error_SomethingWentWrong")}}return(v,y)=>r.value?(u(),h("div",_l,[N(yr,{title:a(f)("PasswordReset_SuccessTitle"),text:a(f)("PasswordReset_SuccessText"),"button-label":a(f)("PasswordReset_SuccessButton"),"button-href":m.value},null,8,["title","text","button-label","button-href"])])):(u(),h("div",dl,[N(Ln,{"back-href":"/"}),o("div",hl,[o("h1",fl,_(a(f)("PasswordReset_Title")),1),i.value?(u(),ee(zt,{key:0,state:"error",message:i.value,class:"mt-3"},null,8,["message"])):k("",!0),o("form",{method:"post",novalidate:"",class:"login-form field-stack mt-3",onSubmit:y[2]||(y[2]=ie(T=>c.value?.trigger(),["prevent"]))},[N(ss,{id:"password",ref_key:"passwordField",ref:l,modelValue:t.value,"onUpdate:modelValue":y[0]||(y[0]=T=>t.value=T),class:"w-100",label:a(f)("Input_NewPassword"),"auto-complete":"new-password",autofocus:""},null,8,["modelValue","label"]),N(ss,{id:"confirm-password",ref_key:"confirmField",ref:d,modelValue:s.value,"onUpdate:modelValue":y[1]||(y[1]=T=>s.value=T),class:"w-100",label:a(f)("Input_ConfirmPassword"),"match-value":t.value,"auto-complete":"new-password"},null,8,["modelValue","label","match-value"]),N(Tt,{ref_key:"submitButton",ref:c,action:g,class:"btn-n w-100"},{default:de(()=>[j(_(a(f)("PasswordReset_Button")),1)]),_:1},512)],32)])]))}}),ml={class:"verification-code"},vl={class:"verification-code__cells"},gl=["id","onUpdate:modelValue","maxlength","disabled","aria-invalid","aria-describedby","onInput","onPaste","onKeydown"],yl=["id"],bl=q({__name:"VerificationCodeInput",props:Ct({id:{default:"verificationCode"},length:{default:6},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:e}){const t=n,s=ft(n,"modelValue");function i(S){return S.length<t.length?f("PhoneVerify_CodeNotCorrect"):null}const{state:r,errorMessage:l,validate:d,reset:c,getErrors:p}=rr(s,i,()=>t.id),m=E(()=>r.value==="error"&&(l.value?.length??0)>0),g=E(()=>`${t.id}-error`);e({validate:d,getErrors:p});const v=w(Array.from({length:t.length},()=>"")),y=w([]);function T(S){return S.replace(/\D/g,"")}function I(S,x){S instanceof HTMLInputElement&&(y.value[x]=S)}function C(S){y.value[S]?.focus()}function A(){s.value=v.value.join(""),r.value==="error"&&c()}function B(){const S=v.value.findIndex(x=>x==="");return S===-1?0:S}function b(S){const x=T(S),R=B();if(x.length!==t.length-R){d();return}for(let F=0;F<x.length;F++)v.value[R+F]=x.charAt(F);A(),C(t.length-1)}
2function $(S,x){if(/^\d$/.test(x.key)){x.preventDefault(),v.value[S]=x.key,A(),S<t.length-1&&C(S+1);return}if(x.key==="Backspace"){if(x.preventDefault(),v.value[S]!==""){v.value[S]="",A();return}S>0&&(v.value[S-1]="",C(S-1),A())}}function D(S,x){const R=x.target;if(R===null)return;const F=T(R.value);if(F===""){v.value[S]="",A();return}if(F.length===1){v.value[S]=F,A(),S<t.length-1&&C(S+1);return}v.value[S]="",b(F)}function L(S,x){const R=x.clipboardData?.getData("text")??"";T(R)!==""&&(x.preventDefault(),b(R))}return te(s,S=>{const x=v.value.join("");if((S??"")===x)return;const R=T(S??"").slice(0,t.length);v.value=Array.from({length:t.length},(F,Y)=>R.charAt(Y))}),oe(()=>{t.autofocus&&C(0)}),(S,x)=>(u(),h("div",ml,[o("div",vl,[(u(!0),h(z,null,Q(v.value,(R,F)=>_t((u(),h("input",{id:F===0?n.id:void 0,key:F,ref_for:!0,ref:Y=>I(Y,F),"onUpdate:modelValue":Y=>v.value[F]=Y,class:V(["verification-code__cell",{"verification-code__cell--error":m.value}]),type:"text",inputmode:"numeric",pattern:"[0-9]*",maxlength:n.length,disabled:n.disabled,autocomplete:"one-time-code","aria-invalid":m.value,"aria-describedby":m.value?g.value:void 0,onInput:Y=>D(F,Y),onPaste:Y=>L(F,Y),onKeydown:Y=>$(F,Y)},null,42,gl)),[[qa,v.value[F]]])),128))]),N(Ks,{name:"verification-code-text"},{default:de(()=>[m.value?(u(),h("p",{key:0,id:g.value,class:"verification-code__error"},_(a(l)),9,yl)):k("",!0)]),_:1})]))}}),xi=le(bl,[["__scopeId","data-v-1af1eae7"]]),wl={class:"login login__small"},kl={class:"login__inner"},Il={class:"text-center"},Sl={class:"title mb-4"},Cl=["alt","title"],$l={class:"mb-0 mt-4"},Tl=["href"],xl={class:"mt-0"},El=6,Ei=q({__name:"VerifyPhoneStep",props:{phone:{},returnUrl:{default:void 0}},setup(n){const e=n,t=w(""),s=w(null),i=w(null),r=w(null),l=async()=>{if(i.value?.validate()===!0){s.value=null;
2try{await Ke.post("/phone/verify",{Code:t.value,Recaptcha:""}),at("just_verified","email",tt(1)),window.location.href=e.returnUrl?e.returnUrl:"/?verified=true"}catch(c){s.value=Kt(c)}}},d=E(()=>e.returnUrl??window.urls.fullRegistration??"/");return(c,p)=>(u(),h("div",wl,[N(Ln,{"back-href":d.value,"close-href":d.value},null,8,["back-href","close-href"]),o("div",kl,[o("div",Il,[o("h1",Sl,_(a(f)("PhoneVerify_Title")),1),o("img",{alt:a(f)("PhoneVerify_ImageAlt"),title:a(f)("PhoneVerify_PinTitle"),loading:"eager",width:"90",height:"70",decoding:"async",src:"/dist/images/phoneVerificationPin.png"},null,8,Cl)]),o("p",$l,[j(_(a(f)("PhoneVerify_SendTo",{0:n.phone}))+" ",1),o("a",{class:"btn-n-link p-0",href:d.value},[o("small",null,"("+_(a(f)("Button_Change"))+")",1)],8,Tl),p[2]||(p[2]=j(" . ",-1))]),o("p",xl,_(a(f)("PhoneVerify_Text")),1),s.value?(u(),ee(zt,{key:0,state:"error",message:s.value,class:"mt-3"},null,8,["message"])):k("",!0),o("form",{method:"post",novalidate:"",class:"login-form field-stack mt-3",onSubmit:p[1]||(p[1]=ie(m=>r.value?.trigger(),["prevent"]))},[N(xi,{ref_key:"codeInput",ref:i,modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=m=>t.value=m),length:El,autofocus:""},null,8,["modelValue"]),N(Tt,{ref_key:"submitButton",ref:r,action:l,class:"btn-n"},{default:de(()=>[j(_(a(f)("Button_Check")),1)]),_:1},512)],32)])]))}}),Al={class:"login login__small"},Ll={class:"login__inner"},Dl={class:"text-center"},Bl={class:"title mb-4"},Pl={class:"mb-0 mt-3"},Ul=["action"],Ml=["value"],Nl=["value"],Rl=["value"],Ol=6,Fl=q({__name:"Verify2FaStep",props:{postUrl:{},exitUrl:{},returnUrl:{default:void 0},provider:{default:"Authenticator"}},setup(n){const e=n,t=w(""),s=w(!1),i=w(null);function r(l){if(s.value||i.value?.validate()!==!0){l.preventDefault();return}s.value=!0}return(l,d)=>(u(),h("div",Al,[N(Ln,{"back-href":e.exitUrl,"close-href":e.exitUrl},null,8,["back-href","close-href"]),o("div",Ll,[o("div",Dl,[o("h1",Bl,_(a(f)("TwoSteps_Title")),1)]),o("p",Pl,_(a(f)("TwoSteps_Text")),1),o("form",{method:"post",action:e.postUrl,novalidate:"",class:"login-form field-stack mt-3",onSubmit:r},[o("input",{type:"hidden",name:"ReturnUrl",value:e.returnUrl},null,8,Ml),o("input",{type:"hidden",name:"Provider",value:e.provider},null,8,Nl),o("input",{type:"hidden",name:"Token",value:t.value},null,8,Rl),N(xi,{ref_key:"codeInput",ref:i,modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=c=>t.value=c),length:Ol,autofocus:""},null,8,["modelValue"]),o("button",{class:V([{"is-loading":s.value},"btn-n"])},_(a(f)("Button_Check")),3)],40,Ul)])]))}}),wn=8e3;class Vl{constructor(e,t,s){this.workFunc=e,this.errorFunc=s,this.interval=t}workFunc;errorFunc;interval;expected=0;initial=0;timeout=null;start(){this.initial=Date.now(),this.expected=Date.now()+this.interval,this.timeout=setTimeout(this.step,this.interval)}stop(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}step=()=>{const e=Date.now()-this.expected;e>this.interval&&(this.expected=Date.now(),this.errorFunc?.(this.expected-this.initial)),this.workFunc(),this.expected+=this.interval,this.timeout=setTimeout(this.step,Math.max(0,this.interval-e))}}const xt="ADDBID",Ai="SERVERTIME",Li="TIME",Et="LOTMESSAGE",At="LOTCLOSED",Di="ONRECONNECTING",Bi="ACTIVELOTADDED",Pi="DECLINED",Ui="JOINDECLINED",Mi="LAUGHINGSECOND",So="CONCURRENT_LOT_OPENED",Bn="LOTEXTENDED",_o="CURRENT_LOT_UPDATED",Ni="userAchievementReceived",Ri="pointsReceived",Oi="NOADMINFEEENDED";var Ht={exports:{}},Hl=Ht.exports,ps;function ql(){return ps||(ps=1,(function(n,e){(function(t,s){var i={};t.PubSub?(i=t.PubSub,console.warn("PubSub already loaded, using existing version")):(t.PubSub=i,s(i)),n!==void 0&&n.exports&&(e=n.exports=i),e.PubSub=i,n.exports=e=i})(typeof window=="object"&&window||Hl||Ir,function(t){var s={},i=-1,r="*";function l(I){var C;for(C in I)if(Object.prototype.hasOwnProperty.call(I,C))return!0;return!1}function d(I){return function(){throw I}}function c(I,C,A){try{I(C,A)}catch(B){setTimeout(d(B),0)}}function p(I,C,A){I(C,A)}function m(I,C,A,B){var b=s[C],$=B?p:c,D;if(Object.prototype.hasOwnProperty.call(s,C))for(D in b)Object.prototype.hasOwnProperty.call(b,D)&&$(b[D],I,A)}function g(I,C,A){return function(){var b=String(I),$=b.lastIndexOf(".");for(m(I,I,C,A);$!==-1;)b=b.substr(0,$),$=b.lastIndexOf("."),m(I,b,C,A);m(I,r,C,A)}}
2function v(I){var C=String(I),A=!!(Object.prototype.hasOwnProperty.call(s,C)&&l(s[C]));return A}function y(I){for(var C=String(I),A=v(C)||v(r),B=C.lastIndexOf(".");!A&&B!==-1;)C=C.substr(0,B),B=C.lastIndexOf("."),A=v(C);return A}function T(I,C,A,B){I=typeof I=="symbol"?I.toString():I;var b=g(I,C,B),$=y(I);return $?(A===!0?b():setTimeout(b,0),!0):!1}t.publish=function(I,C){return T(I,C,!1,t.immediateExceptions)},t.publishSync=function(I,C){return T(I,C,!0,t.immediateExceptions)},t.subscribe=function(I,C){if(typeof C!="function")return!1;I=typeof I=="symbol"?I.toString():I,Object.prototype.hasOwnProperty.call(s,I)||(s[I]={});var A="uid_"+String(++i);return s[I][A]=C,A},t.subscribeAll=function(I){return t.subscribe(r,I)},t.subscribeOnce=function(I,C){var A=t.subscribe(I,function(){t.unsubscribe(A),C.apply(this,arguments)});return t},t.clearAllSubscriptions=function(){s={}},t.clearSubscriptions=function(C){var A;for(A in s)Object.prototype.hasOwnProperty.call(s,A)&&A.indexOf(C)===0&&delete s[A]},t.countSubscriptions=function(C){var A,B,b=0;for(A in s)if(Object.prototype.hasOwnProperty.call(s,A)&&A.indexOf(C)===0){for(B in s[A])b++;break}return b},t.getSubscriptions=function(C){var A,B=[];for(A in s)Object.prototype.hasOwnProperty.call(s,A)&&A.indexOf(C)===0&&B.push(A);return B},t.unsubscribe=function(I){var C=function(x){var R;for(R in s)if(Object.prototype.hasOwnProperty.call(s,R)&&R.indexOf(x)===0)return!0;return!1},A=typeof I=="string"&&(Object.prototype.hasOwnProperty.call(s,I)||C(I)),B=!A&&typeof I=="string",b=typeof I=="function",$=!1,D,L,S;if(A){t.clearSubscriptions(I);return}for(D in s)if(Object.prototype.hasOwnProperty.call(s,D)){if(L=s[D],B&&L[I]){delete L[I],$=I;break}if(b)for(S in L)Object.prototype.hasOwnProperty.call(L,S)&&L[S]===I&&(delete L[S],$=!0)}return $}})})(Ht,Ht.exports)),Ht.exports}var Wl=ql();const Xt=Sr(Wl);function Ae(n,...e){Xt.publish(n,e[0])}function Qe(n,e){return Xt.subscribe(n,(t,s)=>e(s))}function zl(n,e){const t=Xt.subscribe(n,(s,i)=>{Xt.unsubscribe(t),e(i)});return t}function kn(n){Xt.unsubscribe(n)}class dt extends Error{constructor(e,t){const s=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=s}}class Co extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Ve extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Kl extends Error{constructor(e,t){const s=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=s}}class Gl extends Error{constructor(e,t){const s=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=s}}class jl extends Error{constructor(e,t){const s=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=s}}class ms extends Error{constructor(e){const t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class Xl extends Error{constructor(e,t){const s=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=s}}class Fi{constructor(e,t,s){this.statusCode=e,this.statusText=t,this.content=s}}class Pn{get(e,t){return this.send({...t,method:"GET",url:e})}post(e,t){return this.send({...t,method:"POST",url:e})}delete(e,t){return this.send({...t,method:"DELETE",url:e})}getCookieString(e){return""}}var M;(function(n){n[n.Trace=0]="Trace",n[n.Debug=1]="Debug",n[n.Information=2]="Information",n[n.Warning=3]="Warning",n[n.Error=4]="Error",n[n.Critical=5]="Critical",n[n.None=6]="None"})(M||(M={}));class It{constructor(){}log(e,t){}}It.instance=new It;const Yl="10.0.0";class $e{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,s){if(!(e in t))throw new Error(`Unknown ${s} value: ${e}.`)}}class ye{static get isBrowser(){return!ye.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!ye.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!ye.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function Yt(n,e){let t="";return mt(n)?(t=`Binary data of length ${n.byteLength}`,e&&(t+=`. Content: '${Jl(n)}'`)):typeof n=="string"&&(t=`String data of length ${n.length}`,e&&(t+=`. Content: '${n}'`)),t}function Jl(n){const e=new Uint8Array(n);let t="";return e.forEach(s=>{const i=s<16?"0":"";t+=`0x${i}${s.toString(16)} `}),t.substring(0,t.length-1)}function mt(n){return n&&typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}async function Vi(n,e,t,s,i,r){const l={},[d,c]=St();l[d]=c,n.log(M.Trace,`(${e} transport) sending data. ${Yt(i,r.logMessageContent)}.`);const p=mt(i)?"arraybuffer":"text",m=await t.post(s,{content:i,headers:{...l,...r.headers},responseType:p,timeout:r.timeout,withCredentials:r.withCredentials});n.log(M.Trace,`(${e} transport) request complete. Response status: ${m.statusCode}.`)}function Zl(n){return n===void 0?new In(M.Information):n===null?It.
2instance:n.log!==void 0?n:new In(n)}class Ql{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}}class In{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const s=`[${new Date().toISOString()}] ${M[e]}: ${t}`;switch(e){case M.Critical:case M.Error:this.out.error(s);break;case M.Warning:this.out.warn(s);break;case M.Information:this.out.info(s);break;default:this.out.log(s);break}}}}function St(){let n="X-SignalR-User-Agent";return ye.isNode&&(n="User-Agent"),[n,ec(Yl,tc(),oc(),nc())]}function ec(n,e,t,s){let i="Microsoft SignalR/";const r=n.split(".");return i+=`${r[0]}.${r[1]}`,i+=` (${n}; `,e&&e!==""?i+=`${e}; `:i+="Unknown OS; ",i+=`${t}`,s?i+=`; ${s}`:i+="; Unknown Runtime Version",i+=")",i}function tc(){if(ye.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function nc(){if(ye.isNode)return process.versions.node}function oc(){return ye.isNode?"NodeJS":"Browser"}function Yn(n){return n.stack?n.stack:n.message?n.message:`${n}`}function sc(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class ic extends Pn{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||ye.isNode){const t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(sc());if(typeof AbortController>"u"){const t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new Ve;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let s;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),s=new Ve});let i=null;if(e.timeout){const c=e.timeout;i=setTimeout(()=>{t.abort(),this._logger.log(M.Warning,"Timeout from HTTP request."),s=new Co},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},mt(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let r;try{r=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(c){throw s||(this._logger.log(M.Warning,`Error from HTTP request. ${c}.`),c)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){const c=await vs(r,"text");throw new dt(c||r.statusText,r.status)}const d=await vs(r,e.responseType);return new Fi(r.status,r.statusText,d)}getCookieString(e){let t="";return ye.isNode&&this._jar&&this._jar.getCookies(e,(s,i)=>t=i.join("; ")),t}}function vs(n,e){let t;switch(e){case"arraybuffer":t=n.arrayBuffer();break;case"text":t=n.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=n.text();break}return t}class ac extends Pn{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ve):e.method?e.url?new Promise((t,s)=>{const i=new XMLHttpRequest;i.open(e.method,e.url,!0),i.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,i.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(mt(e.content)?i.setRequestHeader("Content-Type","application/octet-stream"):i.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const r=e.headers;r&&Object.keys(r).forEach(l=>{i.setRequestHeader(l,r[l])}),e.responseType&&(i.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{i.abort(),s(new Ve)}),e.timeout&&(i.timeout=e.timeout),i.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),i.status>=200&&i.status<300?t(new Fi(i.status,i.statusText,i.response||i.responseText)):s(new dt(i.response||i.responseText||i.statusText,i.status))},i.onerror=()=>{this._logger.log(M.Warning,`Error from HTTP request. ${i.status}: ${i.statusText}.`),s(new dt(i.statusText,i.status))},i.ontimeout=()=>{this._logger.log(M.Warning,"Timeout from HTTP request."),s(new Co)},i.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class rc extends Pn{constructor(e){if(super(),typeof fetch<"u"||ye.isNode)this._httpClient=new ic(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new ac(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ve):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class Me{static write(e){return`${e}${Me.RecordSeparator}`}static parse(e){if(e[e.length-1]!==Me.RecordSeparator)throw new Error("Message is incomplete.");const t=e.split(Me.RecordSeparator);return t.pop(),t}}Me.RecordSeparatorCode=30;Me.RecordSeparator=String.fromCharCode(Me.RecordSeparatorCode);
2class lc{writeHandshakeRequest(e){return Me.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,s;if(mt(e)){const d=new Uint8Array(e),c=d.indexOf(Me.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const p=c+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(d.slice(0,p))),s=d.byteLength>p?d.slice(p).buffer:null}else{const d=e,c=d.indexOf(Me.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const p=c+1;t=d.substring(0,p),s=d.length>p?d.substring(p):null}const i=Me.parse(t),r=JSON.parse(i[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[s,r]}}var K;(function(n){n[n.Invocation=1]="Invocation",n[n.StreamItem=2]="StreamItem",n[n.Completion=3]="Completion",n[n.StreamInvocation=4]="StreamInvocation",n[n.CancelInvocation=5]="CancelInvocation",n[n.Ping=6]="Ping",n[n.Close=7]="Close",n[n.Ack=8]="Ack",n[n.Sequence=9]="Sequence"})(K||(K={}));class cc{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Ql(this,e)}}class uc{constructor(e,t,s){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=s}async _send(e){const t=this._protocol.writeMessage(e);let s=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let i=()=>{},r=()=>{};mt(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(s=new Promise((l,d)=>{i=l,r=d})),this._messages.push(new dc(t,this._totalMessageCount,i,r))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await s}_ack(e){let t=-1;for(let s=0;s<this._messages.length;s++){const i=this._messages[s];if(i._id<=e.sequenceId)t=s,mt(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==K.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:K.Sequence,sequenceId:e}));const t=this._messages;for(const s of t)await this._connection.send(s._message);this._reconnectInProgress=!1}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case K.Invocation:case K.StreamItem:case K.Completion:case K.StreamInvocation:case K.CancelInvocation:return!0;case K.Close:case K.Sequence:case K.Ping:case K.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:K.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class dc{constructor(e,t,s,i){this._message=e,this._id=t,this._resolver=s,this._rejector=i}}const hc=30*1e3,fc=15*1e3,_c=1e5;var ce;(function(n){n.Disconnected="Disconnected",n.Connecting="Connecting",n.Connected="Connected",n.Disconnecting="Disconnecting",n.Reconnecting="Reconnecting"})(ce||(ce={}));class $o{static create(e,t,s,i,r,l,d){return new $o(e,t,s,i,r,l,d)}constructor(e,t,s,i,r,l,d){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(M.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},$e.isRequired(e,"connection"),$e.isRequired(t,"logger"),$e.isRequired(s,"protocol"),this.serverTimeoutInMilliseconds=r??hc,this.keepAliveIntervalInMilliseconds=l??fc,this._statefulReconnectBufferSize=d??_c,this._logger=t,this._protocol=s,this.connection=e,this._reconnectPolicy=i,this._handshakeProtocol=new lc,this.connection.onreceive=c=>
vendor: 7,901 bytes, line 2
2this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=ce.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:K.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==ce.Disconnected&&this._connectionState!==ce.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==ce.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=ce.Connecting,this._logger.log(M.Debug,"Starting HubConnection.");try{await this._startInternal(),ye.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=ce.Connected,this._connectionStarted=!0,this._logger.log(M.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=ce.Disconnected,this._logger.log(M.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((t,s)=>{this._handshakeResolver=t,this._handshakeRejecter=s});await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const s={protocol:this._protocol.name,version:t};if(this._logger.log(M.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(s)),this._logger.log(M.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.reconnect&&(this._messageBuffer=new uc(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(t){throw this._logger.log(M.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(t),t}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===ce.Disconnected)return this._logger.log(M.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===ce.Disconnecting)return this._logger.log(M.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=ce.Disconnecting,this._logger.log(M.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(M.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===ce.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new Ve("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[s,i]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,i);let l;const d=new cc;return d.cancelCallback=()=>{const c=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],l.then(()=>this._sendWithProtocol(c))},this._callbacks[r.invocationId]=(c,p)=>{if(p){d.error(p);return}else c&&(c.type===K.Completion?c.error?d.error(new Error(c.error)):d.complete():d.next(c.item))},l=this._sendWithProtocol(r).catch(c=>{d.error(c),delete this._callbacks[r.invocationId]}),this._launchStreams(s,l),d}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[s,i]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,i));return this._launchStreams(s,r),r}invoke(e,...t){const[s,i]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,i);return new Promise((d,c)=>{this._callbacks[r.invocationId]=(m,g)=>{if(g){c(g);return}else m&&(m.type===K.Completion?m.error?c(new Error(m.error)):d(m.result):c(new Error(`Unexpected message type: ${m.type}`)))};const p=this._sendWithProtocol(r).catch(m=>{c(m),delete this._callbacks[r.invocationId]});this._launchStreams(s,p)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const s=this._methods[e];if(s)if(t){const i=s.indexOf(t);i!==-1&&(s.splice(i,1),s.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const s of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(s)))switch(s.type){case K.Invocation:this._invokeClientMethod(s).catch(i=>{this._logger.log(M.Error,`Invoke client method threw error: ${Yn(i)}`)});break;case K.StreamItem:case K.Completion:{const i=this._callbacks[s.invocationId];if(i){s.type===K.Completion&&delete this._callbacks[s.invocationId];try{i(s)}catch(r){this._logger.log(M.Error,`Stream callback threw error: ${Yn(r)}`)}}break}case K.Ping:break;case K.Close:{this._logger.log(M.Information,"Close message received from server.");const i=s.error?new Error("Server returned an error on close: "+s.error):void 0;s.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case K.Ack:this._messageBuffer&&this._messageBuffer._ack(s);break;case K.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(s);break;default:this._logger.log(M.Warning,`Invalid message type: ${s.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,s;try{[s,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(i){const r="Error parsing handshake response: "+i;this._logger.log(M.Error,r);const l=new Error(r);throw this._handshakeRejecter(l),l}if(t.error){const i="Server returned handshake error: "+t.error;this._logger.log(M.Error,i);const r=new Error(i);throw this._handshakeRejecter(r),r}else this._logger.log(M.Debug,"Server handshake complete.");return this._handshakeResolver(),s}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}
2_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let e=this._nextKeepAlive-new Date().getTime();if(e<0){this._connectionState===ce.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===ce.Connected&&await this._trySendPingMessage()},e))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),s=this._methods[t];if(!s){this._logger.log(M.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(M.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}const i=s.slice(),r=!!e.invocationId;let l,d,c;for(const p of i)try{const m=l;l=await p.apply(this,e.arguments),r&&l&&m&&(this._logger.log(M.Error,`Multiple results provided for '${t}'. Sending error to server.`),c=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),d=void 0}catch(m){d=m,this._logger.log(M.Error,`A callback for the method '${t}' threw error '${m}'.`)}c?await this._sendWithProtocol(c):r?(d?c=this._createCompletionMessage(e.invocationId,`${d}`,null):l!==void 0?c=this._createCompletionMessage(e.invocationId,null,l):(this._logger.log(M.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),c=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):l&&this._logger.log(M.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(M.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new Ve("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===ce.Disconnecting?this._completeClose(e):this._connectionState===ce.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===ce.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=ce.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),ye.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(M.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let s=0,i=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(s,0,i);if(r===null){this._logger.log(M.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=ce.Reconnecting,e?this._logger.log(M.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(M.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(l=>l.apply(this,[e]))}catch(l){this._logger.log(M.Error,`An onreconnecting callback called with error '${e}' threw error '${l}'.`)}if(this._connectionState!==ce.Reconnecting){this._logger.log(M.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;r!==null;){if(this._logger.log(M.Information,`Reconnect attempt number ${s+1} will start in ${r} ms.`),await new Promise(l=>{this._reconnectDelayHandle=setTimeout(l,r)}),this._reconnectDelayHandle=void 0,this._connectionState!==ce.Reconnecting){this._logger.log(M.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=ce.Connected,this._logger.log(M.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(l=>l.apply(this,[this.connection.connectionId]))}catch(l){this._logger.log(M.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${l}'.`)}return}catch(l){if(this._logger.log(M.Information,`Reconnect attempt failed because of error '${l}'.`),this._connectionState!==ce.Reconnecting){this._logger.log(M.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===ce.Disconnecting&&this._completeClose();return}s++,i=l instanceof Error?l:new Error(l.toString()),r=this._getNextRetryDelay(s,Date.now()-t,i)}}this._logger.log(M.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${s} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,s){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:s})}catch(i){return this._logger.log(M.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${i}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach(s=>{const i=t[s];try{i(null,e)}catch(r){this._logger.log(M.Error,`Stream 'error' callback called with '${e}' threw error: ${Yn(r)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,s,i){if(s)return i.length!==0?{target:e,arguments:t,streamIds:i,type:K.Invocation}:{target:e,arguments:t,type:K.Invocation};{const r=this._invocationId;return this._invocationId++,i.length!==0?{target:e,arguments:t,invocationId:r.toString(),streamIds:i,type:K.Invocation}:{target:e,arguments:t,invocationId:r.toString(),type:K.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(const s in e)e[s].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(s)))},error:i=>{let r;i instanceof Error?r=i.message:i&&i.toString?r=i.toString():r="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(s,r)))},next:i=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(s,i)))}})}}_replaceStreamingParams(e){const t=[],s=[];for(let i=0;i<e.length;i++){const r=e[i];if(this._isObservable(r)){const l=this._invocationId;this._invocationId++,t[l]=r,s.push(l.toString()),e.splice(i,1)}}return[t,s]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,s){const i=this._invocationId;return this._invocationId++,s.length!==0?{target:e,arguments:t,invocationId:i.toString(),streamIds:s,type:K.StreamInvocation}:{target:e,arguments:t,invocationId:i.toString(),type:K.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:K.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:K.StreamItem}}
vendor: 5,440 bytes, line 2
2_createCompletionMessage(e,t,s){return t?{error:t,invocationId:e,type:K.Completion}:{invocationId:e,result:s,type:K.Completion}}_createCloseMessage(){return{type:K.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const pc=[0,2e3,1e4,3e4,null];class gs{constructor(e){this._retryDelays=e!==void 0?[...e,null]:pc}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class ht{}ht.Authorization="Authorization";ht.Cookie="Cookie";class mc extends Pn{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}async send(e){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const s=await this._innerClient.send(e);return t&&s.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):s}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[ht.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[ht.Authorization]&&delete e.headers[ht.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var Ce;(function(n){n[n.None=0]="None",n[n.WebSockets=1]="WebSockets",n[n.ServerSentEvents=2]="ServerSentEvents",n[n.LongPolling=4]="LongPolling"})(Ce||(Ce={}));var Ee;(function(n){n[n.Text=1]="Text",n[n.Binary=2]="Binary"})(Ee||(Ee={}));let vc=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class ys{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,s){this._httpClient=e,this._logger=t,this._pollAbort=new vc,this._options=s,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if($e.isRequired(e,"url"),$e.isRequired(t,"transferFormat"),$e.isIn(t,Ee,"transferFormat"),this._url=e,this._logger.log(M.Trace,"(LongPolling transport) Connecting."),t===Ee.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[s,i]=St(),r={[s]:i,...this._options.headers},l={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===Ee.Binary&&(l.responseType="arraybuffer");const d=`${e}&_=${Date.now()}`;this._logger.log(M.Trace,`(LongPolling transport) polling: ${d}.`);const c=await this._httpClient.get(d,l);c.statusCode!==200?(this._logger.log(M.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new dt(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,l)}async _poll(e,t){try{for(;this._running;)try{const s=`${e}&_=${Date.now()}`;this._logger.log(M.Trace,`(LongPolling transport) polling: ${s}.`);const i=await this._httpClient.get(s,t);i.statusCode===204?(this._logger.log(M.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):i.statusCode!==200?(this._logger.log(M.Error,`(LongPolling transport) Unexpected response code: ${i.statusCode}.`),this._closeError=new dt(i.statusText||"",i.statusCode),this._running=!1):i.content?(this._logger.log(M.Trace,`(LongPolling transport) data received. ${Yt(i.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(i.content)):this._logger.log(M.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(s){this._running?s instanceof Co?this._logger.log(M.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=s,this._running=!1):this._logger.log(M.Trace,`(LongPolling transport) Poll errored after shutdown: ${s.message}`)}}finally{this._logger.log(M.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?Vi(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(M.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(M.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,s]=St();e[t]=s;const i={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let r;try{await this._httpClient.delete(this._url,i)}catch(l){r=l}r?r instanceof dt&&(r.statusCode===404?this._logger.log(M.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(M.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(M.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(M.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(M.Trace,e),this.onclose(this._closeError)}}}class gc{constructor(e,t,s,i){this._httpClient=e,this._accessToken=t,this._logger=s,this._options=i,this.onreceive=null,this.onclose
2=null}async connect(e,t){return $e.isRequired(e,"url"),$e.isRequired(t,"transferFormat"),$e.isIn(t,Ee,"transferFormat"),this._logger.log(M.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((s,i)=>{let r=!1;if(t!==Ee.Text){i(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let l;if(ye.isBrowser||ye.isWebWorker)l=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const d=this._httpClient.getCookieString(e),c={};c.Cookie=d;const[p,m]=St();c[p]=m,l=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{l.onmessage=d=>{if(this.onreceive)try{this._logger.log(M.Trace,`(SSE transport) data received. ${Yt(d.data,this._options.logMessageContent)}.`),this.onreceive(d.data)}catch(c){this._close(c);return}},l.onerror=d=>{r?this._close():i(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},l.onopen=()=>{this._logger.log(M.Information,`SSE connected to ${this._url}`),this._eventSource=l,r=!0,s()}}catch(d){i(d);return}})}async send(e){return this._eventSource?Vi(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class yc{constructor(e,t,s,i,r,l){this._logger=s,this._accessTokenFactory=t,this._logMessageContent=i,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=l}async connect(e,t){$e.isRequired(e,"url"),$e.isRequired(t,"transferFormat"),$e.isIn(t,Ee,"transferFormat"),this._logger.log(M.Trace,"(WebSockets transport) Connecting.");let s;return this._accessTokenFactory&&(s=await this._accessTokenFactory()),new Promise((i,r)=>{e=e.replace(/^http/,"ws");let l;const d=this._httpClient.getCookieString(e);let c=!1;if(ye.isNode||ye.isReactNative){const p={},[m,g]=St();p[m]=g,s&&(p[ht.Authorization]=`Bearer ${s}`),d&&(p[ht.Cookie]=d),l=new this._webSocketConstructor(e,void 0,{headers:{...p,...this._headers}})}else s&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(s)}`);l||(l=new this._webSocketConstructor(e)),t===Ee.Binary&&(l.binaryType="arraybuffer"),l.onopen=p=>{this._logger.log(M.Information,`WebSocket connected to ${e}.`),this._webSocket=l,c=!0,i()},l.onerror=p=>{let m=null;typeof ErrorEvent<"u"&&p instanceof ErrorEvent?m=p.error:m="There was an error with the transport",this._logger.log(M.Information,`(WebSockets transport) ${m}.`)},l.onmessage=p=>{if(this._logger.log(M.Trace,`(WebSockets transport) data received. ${Yt(p.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(p.data)}catch(m){this._close(m);return}},l.onclose=p=>{if(c)this._close(p);else{let m=null;typeof ErrorEvent<"u"&&p instanceof ErrorEvent?m=p.error:m="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(m))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(M.Trace,`(WebSockets transport) sending data. ${Yt(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(M.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const bs=100;class bc{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,$e.isRequired(e,"url"),this._logger=Zl(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let s=null,i=null;if(ye.isNode&&typeof require<"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;s=r("ws"),i=r("eventsource")}!ye.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:ye.isNode&&!t.WebSocket&&s&&(t.WebSocket=s),!ye.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:ye.isNode&&!t.EventSource&&typeof i<"u"&&(t.EventSource=i),this._httpClient=new mc(t.httpClient||new rc(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose
2=null}async start(e){if(e=e||Ee.Binary,$e.isIn(e,Ee,"transferFormat"),this._logger.log(M.Debug,`Starting connection with transfer format '${Ee[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(M.Error,t),await this._stopPromise,Promise.reject(new Ve(t))}else if(this._connectionState!=="Connected"){const t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(M.Error,t),Promise.reject(new Ve(t))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new To(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(M.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(M.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(t){this._logger.log(M.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(M.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Ce.WebSockets)this.transport=this._constructTransport(Ce.WebSockets),await this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let s=null,i=0;do{if(s=await this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Ve("The connection was stopped during negotiation.");if(s.error)throw new Error(s.error);if(s.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(s.url&&(t=s.url),s.accessToken){const r=s.accessToken;this._accessTokenFactory=()=>r,this._httpClient._accessToken=r,this._httpClient._accessTokenFactory=void 0}i++}while(s.url&&i<bs);if(i===bs&&s.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,s,e)}this.transport instanceof ys&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(M.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(s){return this._logger.log(M.Error,"Failed to start the connection: "+s),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(s)}}async _getNegotiationResponse(e){const t={},[s,i]=St();t[s]=i;const r=this._resolveNegotiateUrl(e);this._logger.log(M.Debug,`Sending negotiation request: ${r}.`);try{const l=await this._httpClient.post(r,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(l.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${l.statusCode}'`));const d=JSON.parse(l.content);return(!d.negotiateVersion||d.negotiateVersion<1)&&(d.connectionToken=d.connectionId),d.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new ms("Client didn't negotiate Stateful Reconnect but the server did.")):d}catch(l){let d="Failed to complete negotiation with the server: "+l;return l instanceof dt&&l.statusCode===404&&(d=d+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(M.Error,d),Promise.reject(new ms(d))}}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}async _createTransport(e,t,s,i){let r=this._createConnectUrl(e,s.connectionToken);if(this._isITransport(t)){this._logger.log(M.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(r,i),this.connectionId=s.connectionId;return}const l=[],d=s.availableTransports||[];let c=s;for(const p of d){const m=this._resolveTransportOrError(p,t,i,c?.useStatefulReconnect===!0);if(m instanceof Error)l.push(`${p.transport} failed:`),l.push(m);else if(this._isITransport(m)){if(this.transport=m,!c){try{c=await this._getNegotiationResponse(e)}catch(g){return Promise.reject(g)}r=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(r,i),this.connectionId=c.connectionId;return}catch(g){if(this._logger.log(M.Error,`Failed to start the transport '${p.transport}': ${g}`),c=void 0,l.push(new jl(`${p.transport} failed: ${g}`,Ce[p.transport])),this._connectionState!=="Connecting"){const v="Failed to select transport before stop() was called.";return this._logger.log(M.Debug,v),Promise.reject(new Ve(v))}}}}return l.length>0?Promise.reject(new Xl(`Unable to connect to the server with any of the available transports. ${l.join(" ")}`,l)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}
2_constructTransport(e){switch(e){case Ce.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new yc(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Ce.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new gc(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Ce.LongPolling:return new ys(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async s=>{let i=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{i=!0}else{this._stopConnection(s);return}i&&this._stopConnection(s)}:this.transport.onclose=s=>this._stopConnection(s),this.transport.connect(e,t)}_resolveTransportOrError(e,t,s,i){const r=Ce[e.transport];if(r==null)return this._logger.log(M.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(wc(t,r))if(e.transferFormats.map(d=>Ee[d]).indexOf(s)>=0){if(r===Ce.WebSockets&&!this._options.WebSocket||r===Ce.ServerSentEvents&&!this._options.EventSource)return this._logger.log(M.Debug,`Skipping transport '${Ce[r]}' because it is not supported in your environment.'`),new Kl(`'${Ce[r]}' is not supported in your environment.`,r);this._logger.log(M.Debug,`Selecting transport '${Ce[r]}'.`);try{return this.features.reconnect=r===Ce.WebSockets?i:void 0,this._constructTransport(r)}catch(d){return d}}else return this._logger.log(M.Debug,`Skipping transport '${Ce[r]}' because it does not support the requested transfer format '${Ee[s]}'.`),new Error(`'${Ce[r]}' does not support ${Ee[s]}.`);else return this._logger.log(M.Debug,`Skipping transport '${Ce[r]}' because it was disabled by the client.`),new Gl(`'${Ce[r]}' is disabled by the client.`,r)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(M.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(M.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(M.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(M.Error,`Connection disconnected with error '${e}'.`):this._logger.log(M.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(M.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(M.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!ye.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(M.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const s=new URLSearchParams(t.searchParams);return s.has("negotiateVersion")||s.append("negotiateVersion",this._negotiateVersion.toString()),s.has("useStatefulReconnect")?s.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&s.append("useStatefulReconnect","true"),t.search=s.toString(),t.toString()}}function wc(n,e){return!n||(e&n)!==0}class To{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new fn,this._transportResult=new fn,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new fn),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new fn;const e=this._transportResult;this._transportResult=void 0;const t=typeof this._buffer[0]=="string"?this._buffer.join(""):To._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(s){e.reject(s)}}}static _concatBuffers(e){const t=e.map(r=>r.byteLength).reduce((r,l)=>r+l),s=new Uint8Array(t);let i=0;for(const r of e)s.set(new Uint8Array(r),i),i+=r.byteLength;return s.buffer}}class fn{constructor(){this.promise=new Promise((e,t)=>
2[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const kc="json";class Ic{constructor(){this.name=kc,this.version=2,this.transferFormat=Ee.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=It.instance);const s=Me.parse(e),i=[];for(const r of s){const l=JSON.parse(r);if(typeof l.type!="number")throw new Error("Invalid payload.");switch(l.type){case K.Invocation:this._isInvocationMessage(l);break;case K.StreamItem:this._isStreamItemMessage(l);break;case K.Completion:this._isCompletionMessage(l);break;case K.Ping:break;case K.Close:break;case K.Ack:this._isAckMessage(l);break;case K.Sequence:this._isSequenceMessage(l);break;default:t.log(M.Information,"Unknown message type '"+l.type+"' ignored.");continue}i.push(l)}return i}writeMessage(e){return Me.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}}const Sc={trace:M.Trace,debug:M.Debug,info:M.Information,information:M.Information,warn:M.Warning,warning:M.Warning,error:M.Error,critical:M.Critical,none:M.None};function Cc(n){const e=Sc[n.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${n}`)}class $c{configureLogging(e){if($e.isRequired(e,"logging"),Tc(e))this.logger=e;else if(typeof e=="string"){const t=Cc(e);this.logger=new In(t)}else this.logger=new In(e);return this}withUrl(e,t){return $e.isRequired(e,"url"),$e.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...t}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return $e.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new gs(e):this.reconnectPolicy=e:this.reconnectPolicy=new gs,this}withServerTimeout(e){return $e.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return $e.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new bc(this.url,e);return $o.create(t,this.logger||It.instance,this.protocol||new Ic,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function Tc(n){return n.log!==void 0}var ut=4294967295;function xc(n,e,t){var s=t/4294967296,i=t;n.setUint32(e,s),n.setUint32(e+4,i)}function Hi(n,e,t){var s=Math.floor(t/4294967296),i=t;n.setUint32(e,s),n.setUint32(e+4,i)}function qi(n,e){var t=n.getInt32(e),s=n.getUint32(e+4);return t*4294967296+s}function Ec(n,e){var t=n.getUint32(e),s=n.getUint32(e+4);return t*4294967296+s}var xo={},Jn,Zn,Qn,Un=(typeof process>"u"||((Jn=process==null?void 0:xo)===null||Jn===void 0?void 0:Jn.TEXT_ENCODING)!=="never")&&typeof TextEncoder<"u"&&typeof TextDecoder<"u";function ws(n){for(var e=n.length,t=0,s=0;s<e;){var i=n.charCodeAt(s++);if((i&4294967168)===0){t++;continue}else if((i&4294965248)===0)t+=2;else{if(i>=55296&&i<=56319&&s<e){var r=n.charCodeAt(s);(r&64512)===56320&&(++s,i=((i&1023)<<10)+(r&1023)+65536)}(i&4294901760)===0?t+=3:t+=4}}return t}function Ac(n,e,t){for(var s=n.length,i=t,r=0;r<s;){var l=n.charCodeAt(r++);if((l&4294967168)===0){e[i++]=l;continue}else if((l&4294965248)===0)e[i++]=l>>6&31|192;else{if(l>=55296&&l<=56319&&r<s){var d=n.charCodeAt(r);(d&64512)===56320&&(++r,l=((l&1023)<<10)+(d&1023)+65536)}(l&4294901760)===0?(e[i++]=l>>12&15|224,e[i++]=l>>6&63|128):(e[i++]=l>>18&7|240,e[i++]=l>>12&63|128,e[i++]=l>>6&63|128)}e[i++]=l&63|128}}var Wt=Un?new TextEncoder:void 0,Lc=Un?typeof process<"u"&&((Zn=process==null?void 0:xo)===null||Zn===void 0?void 0:Zn.TEXT_ENCODING)!=="force"?200:0:ut;function Dc(n,e,t){e.set(Wt.encode(n),t)}function Bc(n,e,t){Wt.encodeInto(n,e.subarray(t))}var Pc=Wt?.encodeInto?Bc:Dc,Uc=4096;function Wi(n,e,t){for(var s=e,i=s+t,r=[],l="";s<i;){var d=n[s++];if((d&128)===0)r.push(d);else if((d&224)===192){var c=n[s++]&63;r.push((d&31)<<6|c)}else if((d&240)===224){var c=n[s++]&63,p=n[s++]&63;r.push((d&31)<<12|c<<6|p)}else if((d&248)===240){var c=n[s++]&63,p=n[s++]&63,m=n[s++]&63,g=(d&7)<<18|c<<12|p<<6|m;g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|g&1023),r.push(g)}else r.push(d);r.length>=Uc&&(l+=String.fromCharCode.apply(String,r),r.length=0)}return r.length>0&&(l+=String.fromCharCode.apply(String,r)),l}
vendor: 18,889 bytes, line 2
2var Mc=Un?new TextDecoder:null,Nc=Un?typeof process<"u"&&((Qn=process==null?void 0:xo)===null||Qn===void 0?void 0:Qn.TEXT_DECODER)!=="force"?200:0:ut;function Rc(n,e,t){var s=n.subarray(e,e+t);return Mc.decode(s)}var _n=(function(){function n(e,t){this.type=e,this.data=t}return n})(),Oc=(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(s[r]=i[r])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function s(){this.constructor=e}e.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}})(),ze=(function(n){Oc(e,n);function e(t){var s=n.call(this,t)||this,i=Object.create(e.prototype);return Object.setPrototypeOf(s,i),Object.defineProperty(s,"name",{configurable:!0,enumerable:!1,value:e.name}),s}return e})(Error),Fc=-1,Vc=4294967296-1,Hc=17179869184-1;function qc(n){var e=n.sec,t=n.nsec;if(e>=0&&t>=0&&e<=Hc)if(t===0&&e<=Vc){var s=new Uint8Array(4),i=new DataView(s.buffer);return i.setUint32(0,e),s}else{var r=e/4294967296,l=e&4294967295,s=new Uint8Array(8),i=new DataView(s.buffer);return i.setUint32(0,t<<2|r&3),i.setUint32(4,l),s}else{var s=new Uint8Array(12),i=new DataView(s.buffer);return i.setUint32(0,t),Hi(i,4,e),s}}function Wc(n){var e=n.getTime(),t=Math.floor(e/1e3),s=(e-t*1e3)*1e6,i=Math.floor(s/1e9);return{sec:t+i,nsec:s-i*1e9}}function zc(n){if(n instanceof Date){var e=Wc(n);return qc(e)}else return null}function Kc(n){var e=new DataView(n.buffer,n.byteOffset,n.byteLength);switch(n.byteLength){case 4:{var t=e.getUint32(0),s=0;return{sec:t,nsec:s}}case 8:{var i=e.getUint32(0),r=e.getUint32(4),t=(i&3)*4294967296+r,s=i>>>2;return{sec:t,nsec:s}}case 12:{var t=qi(e,4),s=e.getUint32(0);return{sec:t,nsec:s}}default:throw new ze("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(n.length))}}function Gc(n){var e=Kc(n);return new Date(e.sec*1e3+e.nsec/1e6)}var jc={type:Fc,encode:zc,decode:Gc},zi=(function(){function n(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(jc)}return n.prototype.register=function(e){var t=e.type,s=e.encode,i=e.decode;if(t>=0)this.encoders[t]=s,this.decoders[t]=i;else{var r=1+t;this.builtInEncoders[r]=s,this.builtInDecoders[r]=i}},n.prototype.tryToEncode=function(e,t){for(var s=0;s<this.builtInEncoders.length;s++){var i=this.builtInEncoders[s];if(i!=null){var r=i(e,t);if(r!=null){var l=-1-s;return new _n(l,r)}}}for(var s=0;s<this.encoders.length;s++){var i=this.encoders[s];if(i!=null){var r=i(e,t);if(r!=null){var l=s;return new _n(l,r)}}}return e instanceof _n?e:null},n.prototype.decode=function(e,t,s){var i=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return i?i(e,t,s):new _n(t,e)},n.defaultCodec=new n,n})();function Sn(n){return n instanceof Uint8Array?n:ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n instanceof ArrayBuffer?new Uint8Array(n):Uint8Array.from(n)}function Xc(n){if(n instanceof ArrayBuffer)return new DataView(n);var e=Sn(n);return new DataView(e.buffer,e.byteOffset,e.byteLength)}var Yc=100,Jc=2048,Zc=(function(){function n(e,t,s,i,r,l,d,c){e===void 0&&(e=zi.defaultCodec),t===void 0&&(t=void 0),s===void 0&&(s=Yc),i===void 0&&(i=Jc),r===void 0&&(r=!1),l===void 0&&(l=!1),d===void 0&&(d=!1),c===void 0&&(c=!1),this.extensionCodec=e,this.context=t,this.maxDepth=s,this.initialBufferSize=i,this.sortKeys=r,this.forceFloat32=l,this.ignoreUndefined=d,this.forceIntegerToFloat=c,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return n.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},n.prototype.reinitializeState=function(){this.pos=0},n.prototype.encode=function(e){return this.reinitializeState(),this.doEncode(e,1),this.getUint8Array()},n.prototype.doEncode=function(e,t){if(t>this.maxDepth)throw new Error("Too deep objects in depth ".concat(t));e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.encodeObject(e,t)},n.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(t*2)},n.prototype.resizeBuffer=function(e){var t=new ArrayBuffer(e),s=new Uint8Array(t),i=new DataView(t);s.set(this.bytes),this.view=i,this.bytes=s},n.prototype.encodeNil=function(){this.writeU8(192)},n.prototype.encodeBoolean=function(e){e===!1?this.writeU8(194):this.writeU8(195)},n.prototype.encodeNumber=function(e){Number.isSafeInteger(e)&&!this.forceIntegerToFloat?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},n.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error("Too long string: ".concat(e," bytes in UTF-8"))},n.prototype.encodeString=function(e){var t=5,s=e.length;if(s>Lc){var i=ws(e);this.ensureBufferSizeToWrite(t+i),this.writeStringHeader(i),Pc(e,this.bytes,this.pos),this.pos+=i}else{var i=ws(e);this.ensureBufferSizeToWrite(t+i),this.writeStringHeader(i),Ac(e,this.bytes,this.pos),this.pos+=i}},n.prototype.encodeObject=function(e,t){var s=this.extensionCodec.tryToEncode(e,this.context);if(s!=null)this.encodeExtension(s);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,t);else throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)))},n.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<4294967296)this.writeU8(198),this.writeU32(t);else throw new Error("Too large binary: ".concat(t));var s=Sn(e);this.writeU8a(s)},n.prototype.encodeArray=function(e,t){var s=e.length;if(s<16)this.writeU8(144+s);else if(s<65536)this.writeU8(220),this.writeU16(s);else if(s<4294967296)this.writeU8(221),this.writeU32(s);else throw new Error("Too large array: ".concat(s));for(var i=0,r=e;i<r.length;i++){var l=r[i];this.doEncode(l,t+1)}},n.prototype.countWithoutUndefined=function(e,t){for(var s=0,i=0,r=t;i<r.length;i++){var l=r[i];e[l]!==void 0&&s++}return s},n.prototype.encodeMap=function(e,t){var s=Object.keys(e);this.sortKeys&&s.sort();var i=this.ignoreUndefined?this.countWithoutUndefined(e,s):s.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error("Too large map object: ".concat(i));for(var r=0,l=s;r<l.length;r++){var d=l[r],c=e[d];this.ignoreUndefined&&c===void 0||(this.encodeString(d),this.doEncode(c,t+1))}},n.prototype.encodeExtension=function(e){var t=e.data.length;if(t===1)this.writeU8(212);else if(t===2)this.writeU8(213);else if(t===4)this.writeU8(214);else if(t===8)this.writeU8(215);else if(t===16)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<4294967296)this.writeU8(201),this.writeU32(t);else throw new Error("Too large extension object: ".concat(t));this.writeI8(e.type),this.writeU8a(e.data)},n.prototype.writeU8=function(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++},n.prototype.writeU8a=function(e){var t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t},n.prototype.writeI8=function(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++},n.prototype.writeU16=function(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2},n.prototype.writeI16=function(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2},n.prototype.writeU32=function(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4},n.prototype.writeI32=function(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4},n.prototype.writeF32=function(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4},n.prototype.writeF64=function(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8},n.prototype.writeU64=function(e){this.ensureBufferSizeToWrite(8),xc(this.view,this.pos,e),this.pos+=8},n.prototype.writeI64=function(e){this.ensureBufferSizeToWrite(8),Hi(this.view,this.pos,e),this.pos+=8},n})();function eo(n){return"".concat(n<0?"-":"","0x").concat(Math.abs(n).toString(16).padStart(2,"0"))}var Qc=16,eu=16,tu=(function(){function n(e,t){e===void 0&&(e=Qc),t===void 0&&(t=eu),this.maxKeyLength=e,this.maxLengthPerKey=t,this.hit=0,this.miss=0,this.caches=[];for(var s=0;s<this.maxKeyLength;s++)this.caches.push([])}return n.prototype.canBeCached=function(e){return e>0&&e<=this.maxKeyLength},n.prototype.find=function(e,t,s){var i=this.caches[s-1];e:for(var r=0,l=i;r<l.length;r++){for(var d=l[r],c=d.bytes,p=0;p<s;p++)if(c[p]!==e[t+p])continue e;return d.str}return null},n.prototype.store=function(e,t){var s=this.caches[e.length-1],i={bytes:e,str:t};s.length>=this.maxLengthPerKey?s[Math.random()*s.length|0]=i:s.push(i)},n.prototype.decode=function(e,t,s){var i=this.find(e,t,s);if(i!=null)return this.hit++,i;this.miss++;var r=Wi(e,t,s),l=Uint8Array.prototype.slice.call(e,t,t+s);return this.store(l,r),r},n})(),nu=function(n,e,t,s){function i(r){return r instanceof t?r:new t(function(l){l(r)})}return new(t||(t=Promise))(function(r,l){function d(m){try{p(s.next(m))}catch(g){l(g)}}function c(m){try{p(s.throw(m))}catch(g){l(g)}}function p(m){m.done?r(m.value):i(m.value).then(d,c)}p((s=s.apply(n,e||[])).next())})},to=function(n,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,i,r,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(p){return function(m){return c([p,m])}}function c(p){if(s)throw new TypeError("Generator is already executing.");for(;t;)try{if(s=1,i&&(r=p[0]&2?i.return:p[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,p[1])).done)return r;switch(i=0,r&&(p=[p[0]&2,r.value]),p[0]){case 0:case 1:r=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,i=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!r||p[1]>r[0]&&p[1]<r[3])){t.label=p[1];break}if(p[0]===6&&t.label<r[1]){t.label=r[1],r=p;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(p);break}r[2]&&t.ops.pop(),t.trys.pop();continue}p=e.call(n,t)}catch(m){p=[6,m],i=0}finally{s=r=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},ks=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(l){return new Promise(function(d,c){l=n[r](l),i(d,c,l.done,l.value)})}}function i(r,l,d,c){Promise.resolve(c).then(function(p){r({value:p,done:d})},l)}},bt=function(n){return this instanceof bt?(this.v=n,this):new bt(n)},ou=function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),i,r=[];return i={},l("next"),l("throw"),l("return"),i[Symbol.asyncIterator]=function(){return this},i;function l(v){s[v]&&(i[v]=function(y){return new Promise(function(T,I){r.push([v,y,T,I])>1||d(v,y)})})}function d(v,y){try{c(s[v](y))}catch(T){g(r[0][3],T)}}function c(v){v.value instanceof bt?Promise.resolve(v.value.v).then(p,m):g(r[0][2],v)}function p(v){d("next",v)}function m(v){d("throw",v)}function g(v,y){v(y),r.shift(),r.length&&d(r[0][0],r[0][1])}},su=function(n){var e=typeof n;return e==="string"||e==="number"},Rt=-1,Eo=new DataView(new ArrayBuffer(0)),iu=new Uint8Array(Eo.buffer),po=(function(){try{Eo.getInt8(0)}catch(n){return n.constructor}throw new Error("never reached")})(),Is=new po("Insufficient data"),au=new tu,ru=(function(){function n(e,t,s,i,r,l,d,c){e===void 0&&(e=zi.defaultCodec),t===void 0&&(t=void 0),s===void 0&&(s=ut),i===void 0&&(i=ut),r===void 0&&(r=ut),l===void 0&&(l=ut),d===void 0&&(d=ut),c===void 0&&(c=au),this.extensionCodec=e,this.context=t,this.maxStrLength=s,this.maxBinLength=i,this.maxArrayLength=r,this.maxMapLength=l,this.maxExtLength=d,this.keyDecoder=c,this.totalPos=0,this.pos=0,this.view=Eo,this.bytes=iu,this.headByte=Rt,this.stack=[]}return n.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=Rt,this.stack.length=0},n.prototype.setBuffer=function(e){this.bytes=Sn(e),this.view=Xc(this.bytes),this.pos=0},n.prototype.appendBuffer=function(e){if(this.headByte===Rt&&!this.hasRemaining(1))this.setBuffer(e);else{var t=this.bytes.subarray(this.pos),s=Sn(e),i=new Uint8Array(t.length+s.length);i.set(t),i.set(s,t.length),this.setBuffer(i)}},n.prototype.hasRemaining=function(e){return this.view.byteLength-this.pos>=e},n.prototype.createExtraByteError=function(e){var t=this,s=t.view,i=t.pos;return new RangeError("Extra ".concat(s.byteLength-i," of ").concat(s.byteLength," byte(s) found at buffer[").concat(e,"]"))},n.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},n.prototype.decodeMulti=function(e){return to(this,function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}})},n.prototype.decodeAsync=function(e){var t,s,i,r;return nu(this,void 0,void 0,function(){var l,d,c,p,m,g,v,y;return to(this,function(T){switch(T.label){case 0:l=!1,T.label=1;case 1:T.trys.push([1,6,7,12]),t=ks(e),T.label=2;case 2:return[4,t.next()];case 3:if(s=T.sent(),!!s.done)return[3,5];if(c=s.value,l)throw this.createExtraByteError(this.totalPos);this.appendBuffer(c);try{d=this.doDecodeSync(),l=!0}catch(I){if(!(I instanceof po))throw I}this.totalPos+=this.pos,T.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return p=T.sent(),i={error:p},[3,12];case 7:return T.trys.push([7,,10,11]),s&&!s.done&&(r=t.return)?[4,r.call(t)]:[3,9];case 8:T.sent(),T.label=9;case 9:return[3,11];case 10:if(i)throw i.error;return[7];case 11:return[7];case 12:if(l){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,d]}throw m=this,g=m.headByte,v=m.pos,y=m.totalPos,new RangeError("Insufficient data in parsing ".concat(eo(g)," at ").concat(y," (").concat(v," in the current buffer)"))}})})},n.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},n.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},n.prototype.decodeMultiAsync=function(e,t){return ou(this,arguments,function(){var i,r,l,d,c,p,m,g,v;return to(this,function(y){switch(y.label){case 0:i=t,r=-1,y.label=1;case 1:y.trys.push([1,13,14,19]),l=ks(e),y.label=2;case 2:return[4,bt(l.next())];case 3:if(d=y.sent(),!!d.done)return[3,12];if(c=d.value,t&&r===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(c),i&&(r=this.readArraySize(),i=!1,this.complete()),y.label=4;case 4:y.trys.push([4,9,,10]),y.label=5;case 5:return[4,bt(this.doDecodeSync())];case 6:return[4,y.sent()];case 7:return y.sent(),--r===0?[3,8]:[3,5];case 8:return[3,10];case 9:if(p=y.sent(),!(p instanceof po))throw p;return[3,10];case 10:this.totalPos+=this.pos,y.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return m=y.sent(),g={error:m},[3,19];case 14:return y.trys.push([14,,17,18]),d&&!d.done&&(v=l.return)?[4,bt(v.call(l))]:[3,16];case 15:y.sent(),y.label=16;case 16:return[3,18];case 17:if(g)throw g.error;return[7];case 18:return[7];case 19:return[2]}})})},n.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){var s=e-128;if(s!==0){this.pushMapState(s),this.complete();continue e}else t={}}else if(e<160){var s=e-144;if(s!==0){this.pushArrayState(s),this.complete();continue e}else t=[]}else{var i=e-160;t=this.decodeUtf8String(i,0)}else if(e===192)t=null;else if(e===194)t=!1;else if(e===195)t=!0;else if(e===202)t=this.readF32();else if(e===203)t=this.readF64();else if(e===204)t=this.readU8();else if(e===205)t=this.readU16();else if(e===206)t=this.readU32();else if(e===207)t=this.readU64();else if(e===208)t=this.readI8();else if(e===209)t=this.readI16();else if(e===210)t=this.readI32();else if(e===211)t=this.readI64();else if(e===217){var i=this.lookU8();t=this.decodeUtf8String(i,1)}else if(e===218){var i=this.lookU16();t=this.decodeUtf8String(i,2)}else if(e===219){var i=this.lookU32();t=this.decodeUtf8String(i,4)}else if(e===220){var s=this.readU16();if(s!==0){this.pushArrayState(s),this.complete();continue e}else t=[]}else if(e===221){var s=this.readU32();if(s!==0){this.pushArrayState(s),this.complete();continue e}else t=[]}else if(e===222){var s=this.readU16();if(s!==0){this.pushMapState(s),this.complete();continue e}else t={}}else if(e===223){var s=this.readU32();if(s!==0){this.pushMapState(s),this.complete();continue e}else t={}}else if(e===196){var s=this.lookU8();t=this.decodeBinary(s,1)}else if(e===197){var s=this.lookU16();t=this.decodeBinary(s,2)}else if(e===198){var s=this.lookU32();t=this.decodeBinary(s,4)}else if(e===212)t=this.decodeExtension(1,0);else if(e===213)t=this.decodeExtension(2,0);else if(e===214)t=this.decodeExtension(4,0);else if(e===215)t=this.decodeExtension(8,0);else if(e===216)t=this.decodeExtension(16,0);else if(e===199){var s=this.lookU8();t=this.decodeExtension(s,1)}else if(e===200){var s=this.lookU16();t=this.decodeExtension(s,2)}else if(e===201){var s=this.lookU32();t=this.decodeExtension(s,4)}else throw new ze("Unrecognized type byte: ".concat(eo(e)));this.complete();for(var r=this.stack;r.length>0;){var l=r[r.length-1];if(l.type===0)if(l.array[l.position]=t,l.position++,l.position===l.size)r.pop(),t=l.array;else continue e;else if(l.type===1){if(!su(t))throw new ze("The type of key must be string or number but "+typeof t);
2if(t==="__proto__")throw new ze("The key __proto__ is not allowed");l.key=t,l.type=2;continue e}else if(l.map[l.key]=t,l.readCount++,l.readCount===l.size)r.pop(),t=l.map;else{l.key=null,l.type=1;continue e}}return t}},n.prototype.readHeadByte=function(){return this.headByte===Rt&&(this.headByte=this.readU8()),this.headByte},n.prototype.complete=function(){this.headByte=Rt},n.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new ze("Unrecognized array type byte: ".concat(eo(e)))}}},n.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new ze("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},n.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new ze("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},n.prototype.decodeUtf8String=function(e,t){var s;if(e>this.maxStrLength)throw new ze("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLength<this.pos+t+e)throw Is;var i=this.pos+t,r;return this.stateIsMapKey()&&(!((s=this.keyDecoder)===null||s===void 0)&&s.canBeCached(e))?r=this.keyDecoder.decode(this.bytes,i,e):e>Nc?r=Rc(this.bytes,i,e):r=Wi(this.bytes,i,e),this.pos+=t+e,r},n.prototype.stateIsMapKey=function(){if(this.stack.length>0){var e=this.stack[this.stack.length-1];return e.type===1}return!1},n.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new ze("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw Is;var s=this.pos+t,i=this.bytes.subarray(s,s+e);return this.pos+=t+e,i},n.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new ze("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var s=this.view.getInt8(this.pos+t),i=this.decodeBinary(e,t+1);return this.extensionCodec.decode(i,s,this.context)},n.prototype.lookU8=function(){return this.view.getUint8(this.pos)},n.prototype.lookU16=function(){return this.view.getUint16(this.pos)},n.prototype.lookU32=function(){return this.view.getUint32(this.pos)},n.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},n.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},n.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},n.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},n.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},n.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},n.prototype.readU64=function(){var e=Ec(this.view,this.pos);return this.pos+=8,e},n.prototype.readI64=function(){var e=qi(this.view,this.pos);return this.pos+=8,e},n.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},n.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},n})();class We{static write(e){let t=e.byteLength||e.length;const s=[];do{let r=t&127;t=t>>7,t>0&&(r|=128),s.push(r)}while(t>0);t=e.byteLength||e.length;const i=new Uint8Array(s.length+t);return i.set(s,0),i.set(e,s.length),i.buffer}static parse(e){const t=[],s=new Uint8Array(e),i=5,r=[0,7,14,21,28];for(let l=0;l<e.byteLength;){let d=0,c=0,p;do p=s[l+d],c=c|(p&127)<<r[d],d++;while(d<Math.min(i,e.byteLength-l)&&(p&128)!==0);if((p&128)!==0&&d<i)throw new Error("Cannot read message size.");if(d===i&&p>7)throw new Error("Messages bigger than 2GB are not supported.");if(s.byteLength>=l+d+c)t.push(s.slice?s.slice(l+d,l+d+c):s.subarray(l+d,l+d+c));else throw new Error("Incomplete message.");l=l+d+c}return t}}function lu(n){return n&&typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}const cu=new Uint8Array([145,K.Ping]);class uu{constructor(e){this.name="messagepack",this.version=2,this.transferFormat=Ee.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new Zc(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new ru(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!lu(e))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");t===null&&(t=It.instance);const s=We.parse(e),i=[];for(const r of s){const l=this._parseMessage(r,t);l&&i.push(l)}return i}writeMessage(e){switch(e.type){case K.Invocation:return this._writeInvocation(e);case K.StreamInvocation:return this._writeStreamInvocation(e);case K.StreamItem:return this._writeStreamItem(e);case K.Completion:return this._writeCompletion(e);case K.Ping:return We.write(cu);case K.CancelInvocation:return this._writeCancelInvocation(e);case K.Close:return this._writeClose();case K.Ack:return this._writeAck(e);case K.Sequence:return this._writeSequence(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(e.length===0)throw new Error("Invalid payload.");const s=this._decoder.decode(e);if(s.length===0||!(s instanceof Array))throw new Error("Invalid payload.");const i=s[0];switch(i){case K.Invocation:return this._createInvocationMessage(this._readHeaders(s),s);case K.StreamItem:return this._createStreamItemMessage(this._readHeaders(s),s);case K.Completion:return this._createCompletionMessage(this._readHeaders(s),s);case K.Ping:return this._createPingMessage(s);case K.Close:return this._createCloseMessage(s);case K.Ack:return this._createAckMessage(s);case K.Sequence:return this._createSequenceMessage(s);default:return t.log(M.Information,"Unknown message type '"+i+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:K.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:K.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const s=t[2];return s?{arguments:t[4],headers:e,invocationId:s,streamIds:[],target:t[3],type:K.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:K.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:K.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const s=t[3];if(s!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let i,r;switch(s){case this._errorResult:i=t[4];break;case this._nonVoidResult:r=t[4];break}
2return{error:i,headers:e,invocationId:t[2],result:r,type:K.Completion}}_createAckMessage(e){if(e.length<1)throw new Error("Invalid payload for Ack message.");return{sequenceId:e[1],type:K.Ack}}_createSequenceMessage(e){if(e.length<1)throw new Error("Invalid payload for Sequence message.");return{sequenceId:e[1],type:K.Sequence}}_writeInvocation(e){let t;return e.streamIds?t=this._encoder.encode([K.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):t=this._encoder.encode([K.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),We.write(t.slice())}_writeStreamInvocation(e){let t;return e.streamIds?t=this._encoder.encode([K.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):t=this._encoder.encode([K.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),We.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([K.StreamItem,e.headers||{},e.invocationId,e.item]);return We.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:e.result!==void 0?this._nonVoidResult:this._voidResult;let s;switch(t){case this._errorResult:s=this._encoder.encode([K.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:s=this._encoder.encode([K.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:s=this._encoder.encode([K.Completion,e.headers||{},e.invocationId,t,e.result]);break}return We.write(s.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([K.CancelInvocation,e.headers||{},e.invocationId]);return We.write(t.slice())}_writeClose(){const e=this._encoder.encode([K.Close,null]);return We.write(e.slice())}_writeAck(e){const t=this._encoder.encode([K.Ack,e.sequenceId]);return We.write(t.slice())}_writeSequence(e){const t=this._encoder.encode([K.Sequence,e.sequenceId]);return We.write(t.slice())}_readHeaders(e){const t=e[1];if(typeof t!="object")throw new Error("Invalid headers.");return t}}const du={"www.vakantieveilingen.nl":"https://socket.vakantieveilingen.nl/","www.vavabid.be":"https://socket.vakantieveilingen.nl/","www.vakantieveilingen.be":"https://socket.vakantieveilingen.nl/","www-new.vakantieveilingen.nl":"https://socket.vakantieveilingen.nl/","www.vakantieveilingen.dev":"https://socket.vakantieveilingen.dev/","vakantieveilingen.dev":"https://socket.vakantieveilingen.dev/","be.vakantieveilingen.dev":"https://socket.vakantieveilingen.dev/","fr.vakantieveilingen.dev":"https://socket.vakantieveilingen.dev/","vavabid.vakantieveilingen.dev":"https://socket.vakantieveilingen.dev/",localhost:"https://localhost:7281/"};function hu(){const n=du[location.hostname];if(n===void 0)throw new Error(`No socket host configured for '${location.hostname}'.`);return n}const yn=new URL(document.URL);let ct=yn.hostname;if(ct==="localhost"){const n=yn.searchParams.get("domain"),e=wt("domain");n?ct=n:e?ct=e:Number(yn.port)!==443&&(ct=ct+":"+yn.port)}else{const n=wt("domain");n&&(ct=n)}const fu="JoinLot",_u="JoinLotList",pu="JoinAuction",mu="PlaceBid",vu="LeaveLot",gu="LeaveLotList",yu="LeaveLotDetail";function Ki(n){return{code:n.code,description:n.description,requiresPayment:n.requiresPayment}}function bu(n){return{succeeded:n.Succeeded,errors:(n.errors??[]).map(Ki)}}const Gi=[];for(let n=0;n<600;n++)Gi.push(1e3);const ge=new $c().withUrl(hu()+"hubs?source=web&domain="+ct,{skipNegotiation:!0,transport:Ce.WebSockets,accessTokenFactory:async()=>{const n=wt("jwt"),e=(n===null?null:Wa(n))??za();if(e===null)return"";const t=new Date,s=new Date(e.accessTokenExpiration);if(t<s)return e.accessToken;try{const i=await Ka.post("/api/token/refresh",{AccessToken:e.accessToken,RefreshToken:e.refreshToken});return Ga(i.data.data),i.data.data.accessToken}catch(i){return console.error("Error refreshing token:",i),""}}}).withAutomaticReconnect(Gi).withHubProtocol(new uu).build();ge.serverTimeoutInMilliseconds=15e3;const Be=ja(null);function Lt(n,...e){return Be.value?Be.value.send(n,...e):null}function wu(n,...e){return Be.value?Be.value.invoke(n,...e):null}function Ao(n){return Lt(fu,n)}function Lo(n){return Lt(_u,n)}function ku(n){return Lt(pu,n)}function Iu(n){return Lt(vu,n)}function Su(n){return Lt(gu,n)}function Cu(n){return Lt(yu,n)}async function $u(n,e){const t=await wu(mu,n,{a:e});return t===null?null:bu(t)}function ji(n){return n?{windowSeconds:n.w,extensionSeconds:n.e??[],extensionsUsed:n.u??0}:null}function Do(n){return{lotId:n.l,userId:n.u,displayName:n.d,amount:n.a,createdOn:n.c,autoBid:n.ab,serverDateTime:n.ct}}function Xi(n){return{lotId:n.id,auctionId:n.a,bidList:n.bl.map(Do),startDateTime:n.sdt,endDateTime:st(n.edt)??0,minimumIncrement:n.mini,maximumIncrement:n.maxi,next:n.next,auctionRunning:n.ar,adminFeeWaived:n.afw,antiSniper:ji(n.as)}}function Tu(n){return{lotId:n.id,auctionId:n.a,endDateTime:n.edt,serverDateTime:n.ct,antiSniper:ji(n.as)}}function xu(n){return{achievementId:n.id,title:n.t,image:n.img,level:n.l,pointsReceived:n.p}}function Eu(n){return{lotId:n.lotId,auctionId:n.auctionId,title:n.title,image:n.image,url:n.url,defaultCategory:n.defaultCategory,endTime:n.endTime,maxEndTime:n.maxEndTime,lotAmount:n.lotAmou
2nt,highestBidUser:n.highestBidUser,isInactive:n.isInactive,isFavorite:n.isFavorite,overlay:n.overlay}}function Au(n){return{lotId:n.id,auctionId:n.a,startDateTime:n.sdt,endDateTime:n.edt}}function Lu(n){return{errors:(n.errors??[]).map(Ki),lotId:n.lotId}}function Du(n){return{points:n.p,descriptionTranslationKey:n.k}}const Yi="disconnected";function Bo(){return document.getElementById("oops")}function Bu(){const n=Bo();n&&(n.style.display="flex")}function Po(){const n=Bo();n&&(n.style.display="flex",n.classList.add(Yi))}function Mn(){const n=Bo();n&&(n.style.display="none",n.classList.remove(Yi))}const Pu="LotMessage",Uu="addBid",Mu="lotClosed",Nu="ServerTime",Ru="currentTime",Ou="activeLotAdded",Fu="concurrentLotOpened",Vu="lotExtended",Hu="laughingSecond",qu="declined",Wu="userAchievementReceived",zu="pointsReceived",Cn=new Set;let Ji,Zi,Uo=!1;window.addEventListener("beforeunload",()=>{Uo=!0});function Jt(){clearTimeout(Ji),clearTimeout(Zi)}ge.on(Pu,n=>{const e=Xi(n);Cn.add(e.lotId),e.bidList.length>1&&e.bidList.sort((t,s)=>s.amount-t.amount),Ae(Et,e)});ge.on(Uu,n=>{const e=Do(n);Ae(xt,e)});ge.on(Mu,n=>{const e=Xi(n);Cn.has(e.lotId)&&Cn.delete(e.lotId),Ae(At,e)});ge.on(Nu,n=>{Ae(Ai,n)});ge.on(Ou,n=>{Ae(Bi,Eu(n))});ge.on(Fu,n=>{Ae(So,Au(n))});ge.on(Vu,n=>{Ae(Bn,Tu(n))});ge.on(Hu,n=>{const e=Do(n);Ae(Mi,e)});ge.on(qu,n=>{if(typeof n=="string"){Ae(Ui,n);return}Ae(Pi,Lu(n))});ge.on(Ru,n=>{Ae(Li,n)});ge.on(Wu,n=>{Ae(Ni,xu(n))});ge.on(zu,n=>{Ae(Ri,Du(n))});ge.onreconnected(()=>{console.assert(ge.state===ce.Connected),Jt(),Mn(),Be.value=ge;const n=[...Cn];n.length>0&&Lo(n)?.catch(e=>{console.error("Failed to rejoin active lots after reconnect",e)})});const Ku=()=>{ge.start().then(()=>{Jt(),Mn(),Be.value=ge}).catch(()=>{Jt(),Po(),Be.value=null})},$n=()=>{ge.state===ce.Disconnected&&Ku()};ge.onreconnecting(()=>{if(console.assert(ge.state===ce.Reconnecting||ge.state===ce.Connected),Jt(),Uo){Mn();return}Ji=setTimeout(()=>Bu(),5e3),Zi=setTimeout(()=>Po(),1e4),Be.value=null,Ae(Di,ge)});ge.onclose(()=>{if(console.assert(ge.state===ce.Disconnected),Jt(),Uo){Mn();return}Po(),Be.value=null});const Gu=2,Ss=.25,mo=1e3,it=w(null);let Cs=!1,$s=[],qt=null,Tn=0;function Nn(n){n!=null&&(!Number.isFinite(n)||n<=0||it.value!==null&&n<=it.value||Qi(n))}function ju(){qt!==null&&(qt.stop(),qt.interval=mo,qt.start())}function Qi(n){const e=it.value===null?null:n-it.value;if(e!==null&&Math.abs(e)<=Gu){Tn=e;return}Tn=0,it.value=n,ju()}function Xu(){if(Cs)return;Cs=!0;const n=t=>Qi(t);$s.push(Qe(Ai,n)),$s.push(Qe(Li,n));const e=new Vl(()=>{if(it.value===null)return;it.value+=1;const t=Math.max(-Ss,Math.min(Ss,Tn));Tn-=t,e.interval=(1-t)*mo},mo);qt=e,e.start(),$n()}function Le(n){return Nn(n),Xu(),{now:it}}function pn(n){try{Promise.resolve(n()).catch(e=>{console.error("WebSocket connection callback failed",e)})}catch(e){console.error("WebSocket connection callback failed",e)}}function ot(){const n=Xa();return Pe(()=>{n.stop()}),{socketConnection:Be,onConnected:s=>{$n(),s&&(Be.value&&pn(s),n.run(()=>{te(Be,i=>{i&&pn(s)})}))},onceConnected:s=>{if($n(),Be.value){pn(s);return}n.run(()=>{const i=te(Be,r=>{r&&(i(),pn(s))})})},joinLot:Ao,joinLotList:Lo,leaveLot:Iu,leaveLotList:Su,joinAuction:ku,placeBid:$u,leaveLotDetail:Cu}}function Dt(){let n=[];const e=(r,l)=>{const d=Qe(r,l);return n.push(d),d},t=(r,l)=>{const d=zl(r,l);return n.push(d),d},s=r=>{kn(r),n=n.filter(l=>l!==r)},i=()=>{n.forEach(r=>{kn(r)}),n=[]};return Pe(()=>{i()}),{subscribe:e,subscribeOnce:t,unsubscribe:s,unsubscribeAll:i}}function Mo(n,e){const t=st(e);return t===null?null:No(n,t)}function No(n,e){return e<=0?null:e>(n??0)?e:null}function Yu(n,e){return e===null?null:n==null||e.extensionsUsed>n.extensionsUsed?e:null}function Ju(){return document.body?.dataset.userid}function Qt(n,e){const{now:t}=Le(),s=E(()=>{const i=n.value;return i!==null&&Number.isFinite(i)&&i>0?i:null});return te(()=>e?.value??null,i=>Nn(i),{immediate:!0}),{remainingSeconds:E(()=>s.value===null||t.value===null?0:Math.max(0,s.value-t.value))}}function Zu(n){let e=!0;const t=(d,c)=>(e=e&&c===0,{key:d,value:c,padded:String(c).padStart(2,"0"),dim:e}),s=t("days",Math.floor(n/86400)),i=t("hours",Math.floor(n%86400/3600)),r=t("minutes",Math.floor(n%3600/60)),l=t("seconds",n%60);return{days:s,hours:i,minutes:r,seconds:l}}function en(n,e={}){const t=e.separateDays===!0,s=E(()=>Zu(n())),i=w(!1);return te(s,r=>{i.value=i.value||r.days.value>0},{immediate:!0}),{units:E(()=>{const{days:r,hours:l,minutes:d,seconds:c}=s.value,p=[l,d,c];return t||!i.value?p:[r,...p]}),days:E(()=>{const{days:r}=s.value;return t&&r.value>0?r:null}),text:E(()=>{const{days:r,hours:l,minutes:d,seconds:c}=s.value;return`${r.value>0?`${r.value}:`:""}${l.padded}:${d.padded}:${c.padded}`})}}const Qu={key:0},ed={key:1,class:"countdown"},td={key:2,class:"countdown"},nd={key:0},od={key:3,class:"countdown fw-semibold"},Ro=q({__name:"LotCountdown",props:{endTime:{},holdAtZero:{type:Boolean,default:!1}},setup(n){const e=n,{now:t}=Le(),{remainingSeconds:s}=Qt(E(()=>e.endTime)),{units:i,days:r}=en(()=>s.value,{separateDays:!0}),l=E(()=>Number.isFinite(e.endTime)&&e.endTime>0),d=E(()=>t.value!==null&&s.value<=0&&!e.holdAtZero);return(c,p)=>l.value?a(t)===null?(u(),h("ul",ed,[...p[0]||(p[0]=[o("li",{class:"zero"},"00:00:00",-1)])])):d.value?(u(),h("div",od,_(a(f)("Common_Closed")),1
2)):(u(),h("ul",td,[a(r)?(u(),h("li",nd,_(a(r).value)+_(a(f)("Common_DayShort"))+" ",1)):k("",!0),(u(!0),h(z,null,Q(a(i),(m,g)=>(u(),h("li",{key:m.key,class:V({zero:m.dim})},_(m.padded)+_(g<a(i).length-1?":":""),3))),128))])):(u(),h("div",Qu))}}),sd=["data-id"],id=["href","aria-label"],ad={class:"card-img-top position-relative"},rd={key:0,class:"card-label blue"},ld={key:0},cd={key:1,class:"image w-100"},ud=["height","width","src","alt"],dd=["height","width","src","alt"],hd={key:2,class:"image w-100"},fd=["height","width","alt"],_d={key:3,class:"badge-holder d-flex"},pd={key:0,class:"badge badge--bid bg-success small"},md={key:1,class:"badge badge--bid bg-danger small"},vd={key:4,class:"badge-holder d-flex"},gd={key:0,class:"badge badge--popular bg-primary me-2 d-none"},yd={key:1,class:"badge badge--new bg-info me-2"},bd={class:"card-body d-flex flex-column"},wd=["innerHTML"],kd={class:"auction__amount"},Id={class:"fw-bold"},Sd={key:0,class:"ms-2 d-none d-md-block"},Cd={xmlns:"http://www.w3.org/2000/svg",width:"87.625",height:"22",viewBox:"0 0 87.625 22"},$d={x:"18.4",y:"16","text-anchor":"left","font-size":"13","font-family":"var(--font-nunito)","font-weight":"bold"},Td={class:"auction__countdown"},He=q({__name:"AuctionCard",props:{lot:{},userIsAuthenticated:{type:Boolean},smallCard:{type:Boolean},viewType:{default:"gallery"},hideTitle:{type:Boolean,default:!1},hideImage:{type:Boolean,default:!1},hidePlaceBid:{type:Boolean,default:!1},imgHeight:{default:200},imgWidth:{default:300},imgSize:{default:()=>({desktopWidth:300,desktopHeight:200,mobileWidth:300,mobileHeight:200})},labelText:{default:()=>({text:"",subText:"",color:""})},auctionOfTheDay:{type:Boolean,default:!1},useAlternateImageOnDesktop:{type:Boolean,default:!1}},emits:["closingLot"],setup(n,{emit:e}){const t=n,s=window.urls;let i=Ju();const r=w(null),l=w(!1),{subscribe:d}=Dt(),c=t.lot,p=e,m=()=>{if(t.lot?.bidList?.some(y=>y.userId===i)){const y=t.lot.bidList.reduce((T,I)=>T.amount>I.amount?T:I);r.value={highestBid:y.userId===i,highestUser:y.userId}}else r.value=null},g=()=>{l.value=!0,setTimeout(()=>{l.value=!1},300)};return d(Et,({lotId:v,bidList:y,endDateTime:T})=>{if(c.lotId===v){c.bidList=[...y],c.lotAmount=y[0]?y[0].amount:0;const I=No(c.endTime,T);I!==null&&(c.endTime=I),m()}}),d(xt,v=>{const y=v;c.lotId===y.lotId&&(c.bidList||(c.bidList=[]),g(),c.lotAmount=y.amount,c.bidList.some(I=>I.userId===y.userId&&I.amount===y.amount)||c.bidList.unshift(y),m())}),d(Bn,v=>{if(c.lotId!==v.lotId)return;const y=Mo(c.endTime,v.endDateTime);y!==null&&(c.endTime=y)}),d(At,v=>{const y=v;c.lotId===y.lotId&&(p("closingLot",v),m())}),Pe(()=>{}),(v,y)=>(u(),h("div",{"data-id":a(c).auctionId},[o("a",{class:V(["card",{"small-auction-card":t.smallCard,"pink-border-auction-card":!0,"is-horizontal":t.viewType==="list"}]),href:n.auctionOfTheDay?a(s).aotd:`${a(s).auctionsPrefix+a(c).url}`,"aria-label":a(c).title},[o("div",ad,[n.labelText.text?(u(),h("div",rd,[j(_(n.labelText.text)+" ",1),n.labelText.subText?(u(),h("div",ld,_(n.labelText.subText),1)):k("",!0)])):k("",!0),a(c).image?(u(),h("figure",cd,[o("img",{class:"w-100 d-md-none",loading:"lazy",height:t.imgHeight,width:t.imgWidth,sizes:"(max-width: 768px) 100vw, 25vw",src:a(c).image+`?auto=format&auto=enhance&fit=crop&q=75&w=${n.imgSize.mobileWidth}&h=${n.imgSize.mobileHeight}&dpr=2`,alt:a(c).title,onError:y[0]||(y[0]=(...T)=>a(me)&&a(me)(...T))},null,40,ud),o("img",{class:"w-100 d-none d-md-block",loading:"lazy",height:t.imgHeight,width:t.imgWidth,sizes:"(max-width: 768px) 100vw, 25vw",src:(t.useAlternateImageOnDesktop?a(c).alternateImage:a(c).image)+`?auto=format&auto=enhance&fit=crop&q=75&w=${n.imgSize.desktopWidth}&h=${n.imgSize.desktopHeight}&dpr=2`,alt:a(c).title,onError:y[1]||(y[1]=(...T)=>a(me)&&a(me)(...T))},null,40,dd)])):n.hideImage?k("",!0):(u(),h("figure",hd,[o("img",{class:"w-100",loading:"lazy",height:t.imgHeight,width:t.imgWidth,src:"/dist/images/logo-placeholder.png",alt:a(c).title},null,8,fd)])),r.value?(u(),h("div",_d,[r.value.highestBid?(u(),h("span",pd,_(a(f)("Auction_HighestBider")),1)):(u(),h("span",md,_(a(f)("Auction_OverBid")),1))])):a(c).isPopular||a(c).isNew||a(c).label&&!n.labelText.text?(u(),h("div",vd,[a(c).isPopular&&!
2a(c).label?(u(),h("span",gd,_(a(f)("Auction_Popular")),1)):a(c).isNew?(u(),h("span",yd,_(a(f)("Auction_New")),1)):k("",!0),a(c).label&&!n.labelText.text?(u(),h("span",{key:2,class:"badge badge--campaign",style:$t({backgroundColor:a(c).labelBackgroundColor,color:a(c).labelTextColor})},_(a(c).label),5)):k("",!0)])):k("",!0)]),o("div",bd,[n.hideTitle===!1?(u(),h("h3",{key:0,class:V(["card-h3",{small:t.smallCard,"flex-fill":n.viewType==="gallery"}])},_(a(c).title),3)):k("",!0),n.viewType==="list"&&a(c).infoText?.trim()?(u(),h("div",{key:1,class:"card-text",innerHTML:a(c).infoText.replace(/(<([^>]+)>)/gi,"").slice(0,100)+" ..."},null,8,wd)):k("",!0),o("div",{class:V([[n.hideTitle===!0&&n.viewType!=="list"?"mt-0":"mt-3"],"d-flex align-items-center"])},[o("div",kd,[o("div",{class:V(["amount_wrapper",{trigger:l.value}])},[o("span",Id,_(a(De)(a(c).lotAmount)),1)],2)]),a(c).lotAmount===0&&n.hidePlaceBid===!1?(u(),h("div",Sd,[(u(),h("svg",Cd,[y[2]||(y[2]=o("path",{d:"m11.1,0c-.7,0-1.3.2-1.8.6-.2.2-.4.3-.6.5L.9,8.9c-1.2,1.1-1.2,3,0,4.2l7.8,7.8c.2.2.4.4.6.5.5.4,1.1.6,1.8.6h3.3V0h-3.3Z",fill:"#FEE878"},null,-1)),y[3]||(y[3]=o("path",{d:"m78.525,0h-5.1v22h5.1c2.2,0,4-1.8,4-4V4c0-2.2-1.8-4-4-4",x:"78.525",fill:"#FEE878"},null,-1)),y[4]||(y[4]=o("rect",{x:"14.4",width:"64.125",height:"22",fill:"#FEE878"},null,-1)),o("text",$d,_(a(f)("Auction_PlaceYourBid")),1)]))])):k("",!0),o("span",Td,[N(Ro,{"end-time":a(c).endTime},null,8,["end-time"])])],2)])],10,id)],8,sd))}}),xd={},Ed={class:"card is-loading"};function Ad(n,e){return u(),h("a",Ed,[...e[0]||(e[0]=[et('<div class="card-img-top position-relative"><figure class="image w-100"><img class="w-100" src="/dist/images/logo-placeholder.png" alt="" width="300" height="200"></figure></div><div class="card-body"><h3> </h3></div><div class="auction__information card-information"><span></span><span></span></div>',3)])])}const Ld=le(xd,[["render",Ad]]),ea=n=>{const e=crypto.randomUUID(),t=w(n.currentPage),s=w(0),i=w(0),r=w(crypto.randomUUID()),l=w(!0),d=w(!1),c=w([]);return{currentPage:t,totalItems:s,totalPages:i,uniqueId:r,initLoading:l,scrollLoading:d,lotList:c,apiURL:()=>{const m=new URLSearchParams;return m.append("pagesession",e),t.value&&m.append("page",String(t.value)),n.itemsPerPage&&m.append("items",String(n.itemsPerPage)),n.category!==""&&m.append("category",n.category),n.search&&m.append("q",n.search),`${n.apiUrl}${n.apiUrl.includes("?")?"&":"?"}${m}`}}},ta=()=>({modules:[Gn,jn],initializeSwiper:async t=>{await Ue();const{uniqueId:s,slidesPerView:i="auto",spaceBetween:r=16,breakpoints:l,freeMode:d=!1,noSwipingClass:c}=t,p=s?.value??"";return new Kr(`.swiper-lots-${p}`,{modules:d?[Gn,jn,cl,Gr]:[Gn,jn],slidesPerView:i,spaceBetween:r,watchOverflow:!0,observer:!0,observeParents:!0,...c?{noSwipingClass:c}:{},...d?{freeMode:{enabled:!0,sticky:!0},mousewheel:{enabled:!0,forceToAxis:!0,releaseOnEdges:!0}}:{},...l?{breakpoints:l}:{},navigation:{nextEl:`#swiper-next-${p}`,prevEl:`#swiper-prev-${p}`}})}}),Dd=["data-list-name"],Bd=["href","aria-label"],Pd={class:"view-more-content"},Ud={class:"view-more-text"},Md=["id"],Nd=["id"],Rd={key:2,class:"content text-center auction-overview__loader"},Od={key:3},Fd=q({__name:"LotAuctionsOverview",props:{serverDateTime:{type:Number,default:null,required:!1},currentPage:{type:Number,default:1,required:!1},itemsPerPage:{type:Number,default:24,required:!1},category:{type:String,default:"",required:!1},categoryUrl:{type:String,default:"",required:!1},userIsAuthenticated:{type:Boolean,default:!1,required:!1},apiUrl:{type:String,default:"lots/all",required:!1},slider:{type:Boolean,default:!1,required:!1},sliderClass:{type:String,default:"",required:!1},sliderItems:{type:Number,default:4,required:!1},recentlyViewed:{type:Boolean,default:!1,required:!1},auctionId:{type:String,required:!1},column:{type:Number,default:3,required:!1},search:{type:String,required:!1},smallAuctionCard:{type:Boolean,default:!1,required:!1},totalitems:String,showTitle:{type:Boolean,default:!1},hideNotFound:{type:Boolean,default:!1},listName:{type:String,default:""}},setup(n){const e=n;let t=!1,s=[],i=null;const{onConnected:r,onceConnected:l,joinLotList:d,leaveLot:c,leaveLotList:p}=ot(),{totalItems:m,totalPages:g,uniqueId:v,initLoading:y,scrollLoading:T,lotList:I,apiURL:C}=ea(e);Le(e.serverDateTime);const{initializeSwiper:A}=ta(),B=E(()=>
2{if(!e.slider||!e.categoryUrl)return!1;const x=mi()?3:4;return I.value.length>=x});ko();const b=()=>{const x=C(),R=x.startsWith("/")?x:`/${x}`;ae.get(R).then(F=>{D(F.data.data)}).catch(F=>{console.error(F)})},$=()=>{const x=Re.readJson("recentlyViewed",[]),R=x.findIndex(F=>F===e.auctionId);R>-1&&x.splice(R,1),ae.post("/lots/all-by-auctions",{AuctionIds:x}).then(F=>{D(F.data.data)}).catch(F=>{console.error(F)})},D=async x=>{I.value=x.lots,g.value=x.totalPages,m.value=x.totalItems,l(()=>d(I.value.map(R=>R.lotId))??Promise.resolve()),y.value=!1},L=x=>{const R=c(x.lotId);R&&R.catch(Y=>{console.error("Failed to leave lot room",Y)});const F=x.auctionId??I.value.find(Y=>Y.lotId===x.lotId)?.auctionId;F&&s.push(F),t||(t=!0,setTimeout(function(){S()},wn))},S=()=>{ae.post("/lots/all-by-auctions",{AuctionIds:s}).then(x=>{const R=x.data.data.lots;for(const F of R){let Y=I.value.find(G=>G.auctionId===F.auctionId);if(Y){const{preLoaded:G}=Y;Y.bidList=[],Y.lotId=F.lotId,Y.endTime=F.endTime,Y.lotAmount=F.lotAmount,Y.lotDuration=F.lotDuration,Y.preLoaded=G}}l(()=>d(R.map(F=>F.lotId))??Promise.resolve())}).catch(x=>{console.error(x)}),t=!1};return te(I,x=>{Gt(x)},{immediate:!0}),te(m,()=>{const x=document.getElementById("lot-counter");x&&(x.innerHTML=`<b class="text-primary">${m.value}</b> ${m.value===1?f("Auctions_Auction"):f("Auctions_Auctions")}`)}),te(y,async x=>{!x&&e.slider&&(await Ue(),i=await A({uniqueId:v,slidesPerView:1.2,spaceBetween:16,freeMode:!0,noSwipingClass:"no-swiping",breakpoints:{480:{slidesPerView:2,spaceBetween:16},768:{slidesPerView:4,spaceBetween:16}}}))}),oe(async()=>{e.recentlyViewed?await $():await b(),r()}),Pe(()=>{i?.destroy(!0,!0);const x=p(I.value.map(R=>R.lotId));x&&x.catch(R=>{console.error("Failed to leave lot list during unmount",R)})}),(x,R)=>(u(),h("div",{class:V(["auctions-wrapper",{"auctions-wrapper--loading":a(y)}])},[o("div",{class:V([n.slider?"swiper swiper-lots swiper-lots-"+a(v):""])},[o("div",{class:V(["auction-list",[n.slider?"swiper-wrapper":"row"]]),"data-list-name":e.listName},[a(y)?(u(!0),h(z,{key:1},Q(e.column,F=>(u(),h("div",{key:F,class:V(["auction",[n.slider?"swiper-slide":"col-12 col-md-6"+(" col-lg-"+12/e.column)]])},[N(Ld)],2))),128)):(u(),h(z,{key:0},[(u(!0),h(z,null,Q(a(I),F=>(u(),ee(He,{key:F.auctionId,class:V(["auction",[n.slider?"swiper-slide":"col-12 col-md-6"+(" col-lg-"+12/e.column)]]),lot:F,"user-is-authenticated":e.userIsAuthenticated,"small-auction-card":n.smallAuctionCard,onClosingLot:L},null,8,["class","lot","user-is-authenticated","small-auction-card"]))),128)),B.value?(u(),h("a",{key:0,href:e.categoryUrl,"aria-label":a(f)("Auctions_ViewAll"),class:"auction swiper-slide view-more-card no-swiping"},[o("div",Pd,[R[0]||(R[0]=o("div",{class:"view-more-icon"},[o("i",{class:"fa-solid fa-arrow-right"})],-1)),o("span",Ud,_(a(f)("Auctions_ViewAll")),1)])],8,Bd)):k("",!0)],64))],10,Dd)],2),n.slider?(u(),h("div",{key:0,class:"swiper-button-next swiper-button-disabled",id:"swiper-next-"+a(v)},[...R[1]||(R[1]=[o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},[o("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"})],-1)])],8,Md)):k("",!0),n.slider?(u(),h("div",{key:1,class:"swiper-button-prev swiper-button-disabled",id:"swiper-prev-"+a(v)},[...R[2]||(R[2]=[o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},[o("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"})],-1)])],8,Nd)):k("",!0),a(T)?(u(),h("div",Rd,[...R[3]||(R[3]=[o("p",{class:"is-loading"},null,-1)])])):k("",!0),!n.hideNotFound&&a(I).length<1&&!a(y)?(u(),h("div",Od,[o("p",null,[o("i",null,_(a(f)("Auctions_NoAuctionsFound")),1)])])):k("",!0)],2))}}),Vd=le(Fd,[["__scopeId","data-v-484162e9"]]),Hd={key:0,class:"auction-overview--header mb-3"},qd={class:"title h3",style:{"font-size":"1.5rem"}},Wd={class:"auctions-wrapper"},zd=["id"],Kd=["id"],Gd={key:1,class:"content text-center auction-overview__loader"},jd={key:2},Xd={key:3},Yd={href:"/direct",class:"btn btn-outline-primary"},Jd=q({__name:"DirectAuctionsOverview",props:{currentPage:{type:Number,default:1,required:!1},itemsPerPage:{type:Number,default:24,required:!1},category:{type:String,default:"",required:!1},userIsAuthenticated:{type:Boolean,default:!1,required:!1},apiUrl:{type:String,default:"lots/all",required:!1},slider:{type:Boolean,default:!1,required:!1},sliderClass:{type:String,default:"",required:!1},sliderItems:{type:Number,default:4,required:!1},auctionId:{type:String,required:!1},column:{type:Number,default:3,required:!1},search:{type:String,required:!1},smallAuctionCard:{type:Boolean,default:!1,required:!1},serverDateTime:{type:Number,default:null,required:!1},totalitems:String,showTitle:{type:Boolean,default:!1},hideNotFound:{type:Boolean,default:!1}},setup(n){const e=n;let t=!1;const{currentPage:s,totalItems:i,totalPages:r,uniqueId:l,initLoading:d,scrollLoading:c,lotList:p,apiURL:m}=ea(e);Le(e.serverDateTime);const{initializeSwiper:g}=ta();oe(async()=>{v()});const v=()=>{ae.get(m()).then(A=>{y(A.data.data)}).catch(A=>{console.error(A)})},y=async A=>{p.value=A.lots,r.value=A.totalPages,i.value=A.totalItems,d.value=!1,e.slider&&(await Ue(),await g({uniqueId:l,slidesPerView:4,breakpoints:{0:{slidesPerView:1.2,spaceBetween:10},480:{slidesPerView:2,spaceBetween:20},800:{slidesPerView:2,spaceBetween:20},1120:{slidesPerView:4,spaceBetween:20}}})),!t&&r.value>1&&(t=!0,I())};let T=null;const I=()=>{T=()=>{document.documentElement.scrollTop+window.innerHeight+400>
2document.documentElement.offsetHeight&&!c.value&&C()},window.addEventListener("scroll",T),window.dispatchEvent(new CustomEvent("scroll"))};Te(()=>{T&&(window.removeEventListener("scroll",T),T=null)});const C=A=>{c.value=!0,s.value<r.value?(s.value+=1,ae.get(m()).then(B=>{for(const b of B.data.data.lots)p.value.push(b);c.value=!1}).catch(B=>{console.error(B)})):c.value=!1};return(A,B)=>(u(),h("div",null,[n.showTitle&&a(p).length>0&&!a(d)?(u(),h("div",Hd,[o("h3",qd,_(a(f)("Common.ProfitOfDeals")),1)])):k("",!0),o("div",Wd,[o("div",{class:V([n.slider?"swiper swiper-lots swiper-lots-"+a(l):""])},[o("div",{class:V(["auction-list",[n.slider?"swiper-wrapper":"row"]])},[!a(d)||n.slider?(u(!0),h(z,{key:0},Q(a(p),b=>(u(),ee(He,{key:b.auctionId,class:V(["auction",[n.slider?"swiper-slide":"col-12 col-md-6"+(" col-lg-"+12/e.column)]]),lot:b,"user-is-authenticated":e.userIsAuthenticated,"small-auction-card":n.smallAuctionCard},null,8,["class","lot","user-is-authenticated","small-auction-card"]))),128)):(u(!0),h(z,{key:1},Q(e.column,b=>(u(),h("div",{key:b,class:V(["col-12 col-md-6 auction",["col-lg-"+12/e.column]])},[...B[0]||(B[0]=[o("a",{class:"card is-loading"},[o("img",{class:"card-img-top",src:"/dist/images/logo-placeholder.png",alt:""}),o("div",{class:"card-body"},[o("h3",null," ")]),o("div",{class:"auction__information card-information"},[o("span"),o("span")])],-1)])],2))),128))],2)],2),n.slider?(u(),h("div",{key:0,id:"swiper-next-"+a(l),class:"swipe-auctions swiper-button-next round swiper-button-disabled"},null,8,zd)):k("",!0),n.slider?(u(),h("div",{key:1,id:"swiper-prev-"+a(l),class:"swipe-auctions swiper-button-prev round swiper-button-disabled"},null,8,Kd)):k("",!0)]),a(c)?(u(),h("div",Gd,[...B[1]||(B[1]=[o("p",{class:"is-loading"},null,-1)])])):k("",!0),!n.hideNotFound&&a(p).length<1&&!a(d)?(u(),h("div",jd,[o("p",null,[o("i",null,_(a(f)("Error_NoDealsFound")),1)])])):k("",!0),a(p).length>0&&!a(d)?(u(),h("div",Xd,[o("a",Yd,[j(_(a(f)("Common.ViewAllDeals"))+" ",1),B[2]||(B[2]=o("small",{class:"fa-solid fa-chevron-right ms-2"},null,-1))])])):k("",!0)]))}}),Zd=le(Jd,[["__scopeId","data-v-1a407b7f"]]),Qd={key:0,class:"section auction__section recently-viewed__section overflow-hidden"},eh={class:"container"},th={class:"auction-list-wrapper"},nh={class:"auction-list-wrapper__title"},oh=q({__name:"RecentlyViewed",props:{serverDateTime:{type:Number,default:null,required:!1},userIsAuthenticated:{type:Boolean,default:!1,required:!0},auctionId:{type:String,required:!1}},setup(n){const e=n,t=w(!1),s=Re.readJson("recentlyViewed",[]),i=s.findIndex(r=>r===e.auctionId);return i>-1&&s.splice(i,1),t.value=s.length>0,(r,l)=>{const d=Gs("lot-Auction-Overview");return t.value?(u(),h("section",Qd,[o("div",eh,[o("div",th,[o("h3",nh,_(a(f)("RecentAuctions_Title")),1),N(d,{"server-date-time":e.serverDateTime,"auction-id":e.auctionId,slider:!0,column:4,"recently-viewed":!0,"user-is-authenticated":e.userIsAuthenticated},null,8,["server-date-time","auction-id","user-is-authenticated"])])])])):k("",!0)}}}),sh=7,ih=18,Ts={day:"/dist/images/icons/emptystate_desert_lightmode.svg",night:"/dist/images/icons/emptystate_night_lightmode.svg"};function Oo(n={}){const e=n.dayStartHour??sh,t=n.dayEndHour??ih;return{emptyStateImage:E(()=>{const i=new Date().getHours();return i>=e&&i<t?Ts.day:Ts.night})}}const ah={class:"recent-tabs d-flex justify-content-center py-3"},rh=["aria-label"],lh=["onClick","aria-selected"],ch={class:"recent-content pb-3"},uh={key:0,class:"row auction-list"},dh={class:"card is-loading"},hh={class:"card-body"},fh={class:"visually-hidden"},_h={key:1,class:"text-center py-4"},ph={class:"recent-empty__title h4 fw-bold"},mh={class:"text-muted mb-4"},vh=["src"],gh=["href"],yh={key:2,class:"row auction-list"},bh={key:0,class:"row auction-list"},wh={class:"card is-loading"},kh={class:"card-body"},Ih={class:"visually-hidden"},Sh={key:1,class:"text-center py-4"},Ch={class:"recent-empty__title h4 fw-bold"},$h={class:"text-muted mb-4"},Th=["src"],xh=["href"],Eh={key:2,class:"row auction-list"},Ah={key:0,class:"row auction-list"},Lh={class:"card is-loading"},Dh={class:"card-body"},Bh={class:"visually-hidden"},Ph={key:1,class:"text-center py-4"},Uh={class:"recent-empty__title h4 fw-bold"},Mh={class:"text-muted mb-4"},Nh=["src"],Rh={key:2,class:"row auction-list"},no=3,Oh=q({__name:"RecentTabs",props:{serverDateTime:{type:Number,default:null},userIsAuthenticated:{type:Boolean,default:!1},userId:{type:String,default:""},allAuctionsUrl:{type:String,default:"/"},tabs:{type:Array,default:()=>["viewed","favorites","bids"]},defaultTab:{type:String,default:"viewed"}},setup(n){const e=n,t=w(e.defaultTab),s=w(!0),i=w(!0),r=w(!0),l=w([]),d=w([]),c=w([]);Le(e.serverDateTime);const{onConnected:p,onceConnected:m,joinLotList:g,leaveLot:v}=ot(),y=L=>{t.value=L},T=()=>{const L=Re.readJson("recentlyViewed",[]);if(L.length===0){s.value=!1;return}ae.post("lots/all-by-auctions",{AuctionIds:L}).then(S=>{l.value=S.data.data.lots||[],s.value=!1,l.value.length>0&&m(()=>g(l.value.map(x=>x.lotId))??Promise.resolve())}).catch(()=>{s.value=!1})},I=()=>
2{if(!e.userIsAuthenticated){i.value=!1;return}ae.get("lots/favorites").then(L=>{d.value=L.data.data.lots||[],i.value=!1,d.value.length>0&&m(()=>g(d.value.map(S=>S.lotId))??Promise.resolve())}).catch(()=>{i.value=!1})},C=()=>{if(!e.userIsAuthenticated){r.value=!1;return}ae.get("lots/user").then(L=>{c.value=L.data.data.lots||[],r.value=!1,c.value.length>0&&m(()=>g(c.value.map(S=>S.lotId))??Promise.resolve())}).catch(()=>{r.value=!1})},A=L=>{const S=v(L.lotId);S&&S.catch(x=>{console.error("Failed to leave lot room",x)})};oe(()=>{e.tabs.includes("viewed")&&T(),e.tabs.includes("favorites")&&I(),e.tabs.includes("bids")&&C(),p()});const B=E(()=>!s.value&&l.value.length===0),b=E(()=>!i.value&&d.value.length===0),$=E(()=>!r.value&&c.value.length===0),{emptyStateImage:D}=Oo();return(L,S)=>(u(),h("div",null,[o("div",ah,[o("div",{class:"recent-tabs__container w-100",role:"tablist","aria-label":a(f)("RecentTabs_AriaLabel")},[(u(!0),h(z,null,Q(n.tabs,x=>(u(),h("button",{key:x,type:"button",class:V(["recent-tabs__tab",{"is-active":t.value===x}]),onClick:R=>y(x),role:"tab","aria-selected":t.value===x},_(a(f)(`RecentTabs_${x.charAt(0).toUpperCase()+x.slice(1)}`)),11,lh))),128))],8,rh)]),o("div",ch,[n.tabs.includes("viewed")?(u(),h("div",{key:0,class:V(["recent-content__panel",{"is-active":t.value==="viewed"}]),role:"tabpanel"},[s.value?(u(),h("div",uh,[(u(),h(z,null,Q(no,x=>o("div",{key:x,class:"col-12 col-md-4 auction"},[o("a",dh,[S[0]||(S[0]=o("img",{class:"card-img-top",src:"/dist/images/logo-placeholder.png",alt:""},null,-1)),o("div",hh,[o("h3",null,[o("span",fh,_(a(f)("Common_Loading")),1)])]),S[1]||(S[1]=o("div",{class:"auction__information card-information"},[o("span"),o("span")],-1))])])),64))])):B.value?(u(),h("div",_h,[o("h2",ph,_(a(f)("RecentTabs_EmptyViewedTitle")),1),o("p",mh,_(a(f)("RecentTabs_EmptyViewed")),1),o("img",{src:a(D),alt:"",class:"mb-4",style:{"max-width":"280px"}},null,8,vh),o("div",null,[o("a",{href:n.allAuctionsUrl,class:"btn-n w-100",style:{"max-width":"320px"}},[j(_(a(f)("RecentTabs_ToAuctions"))+" ",1),S[2]||(S[2]=o("i",{class:"fa-light fa-arrow-right ms-2","aria-hidden":"true"},null,-1))],8,gh)])])):(u(),h("div",yh,[(u(!0),h(z,null,Q(l.value,x=>(u(),ee(He,{key:x.auctionId,class:"auction col-12 col-md-4",lot:x,"user-is-authenticated":n.userIsAuthenticated,onClosingLot:A},null,8,["lot","user-is-authenticated"]))),128))]))],2)):k("",!0),n.tabs.includes("favorites")?(u(),h("div",{key:1,class:V(["recent-content__panel",{"is-active":t.value==="favorites"}]),role:"tabpanel"},[i.value?(u(),h("div",bh,[(u(),h(z,null,Q(no,x=>o("div",{key:x,class:"col-12 col-md-4 auction"},[o("a",wh,[S[3]||(S[3]=o("img",{class:"card-img-top",src:"/dist/images/logo-placeholder.png",alt:""},null,-1)),o("div",kh,[o("h3",null,[o("span",Ih,_(a(f)("Common_Loading")),1)])]),S[4]||(S[4]=o("div",{class:"auction__information card-information"},[o("span"),o("span")],-1))])])),64))])):b.value?(u(),h("div",Sh,[o("h2",Ch,_(a(f)("RecentTabs_EmptyFavoritesTitle")),1),o("p",$h,_(a(f)("RecentTabs_EmptyFavorites")),1),o("img",{src:a(D),alt:"",class:"mb-4",style:{"max-width":"280px"}},null,8,Th),o("div",null,[o("a",{href:n.allAuctionsUrl,class:"btn-n w-100",style:{"max-width":"320px"}},[j(_(a(f)("RecentTabs_ToAuctions"))+" ",1),S[5]||(S[5]=o("i",{class:"fa-light fa-arrow-right ms-2","aria-hidden":"true"},null,-1))],8,xh)])])):(u(),h("div",Eh,[(u(!0),h(z,null,Q(d.value,x=>(u(),ee(He,{key:x.auctionId,class:"auction col-12 col-md-4",lot:x,"user-is-authenticated":n.userIsAuthenticated,onClosingLot:A},null,8,["lot","user-is-authenticated"]))),128))]))],2)):k("",!0),n.tabs.includes("bids")?(u(),h("div",{key:2,class:V(["recent-content__panel",{"is-active":t.value==="bids"}]),role:"tabpanel"},[r.value?(u(),h("div",Ah,[(u(),h(z,null,Q(no,x=>o("div",{key:x,class:"col-12 col-md-4 auction"},[o("a",Lh,[S[6]||(S[6]=o("img",{class:"card-img-top",src:"/dist/images/logo-placeholder.png",alt:""},null,-1)),o("div",Dh,[o("h3",null,[o("span",Bh,_(a(f)("Common_Loading")),1)])]),S[7]||(S[7]=o("div",{class:"auction__information card-information"},[o("span"),o("span")],-1))])])),64))])):$.value?(u(),h("div",Ph,[o("h2",Uh,_(a(f)("RecentTabs_EmptyBidsTitle")),1),o("p",Mh,_(a(f)("RecentTabs_EmptyBids")),1),o("img",{src:a(D),alt:"",class:"mb-4",style:{"max-width":"280px"}},null,8,Nh)])):(u(),h("div",Rh,[(u(!0),h(z,null,Q(c.value,x=>(u(),ee(He,{key:x.auctionId,class:"auction col-12 col-md-4",lot:x,"user-is-authenticated":n.userIsAuthenticated,onClosingLot:A},null,8,["lot","user-is-authenticated"]))),128))]))],2)):k("",!0)])]))}}
2),na=({endpoint:n,containerId:e,initialServerDateTime:t,initialAuctionId:s=null})=>{const{onConnected:i,joinLot:r,leaveLot:l}=ot(),d=w(null);Le(t);const c=w(!0);let p=!1,m=s;const g=()=>{document.getElementById(e)?.remove(),c.value=!1},v=()=>{if(!m){p=!1;return}ae.post("lots/all-by-auctions",{AuctionIds:[m]}).then(T=>{const I=T.data?.data?.lots;if(!Array.isArray(I)||I.length===0)return;const C=I[0];if(!d.value)return;const{preLoaded:A}=d.value;d.value.bidList=[],d.value.lotId=C.lotId,d.value.endTime=C.endTime,d.value.lotAmount=C.lotAmount,d.value.lotDuration=C.lotDuration,d.value.preLoaded=A,r(d.value.lotId)}).catch(T=>{console.error(T)}),p=!1},y=T=>{l(T),p||(p=!0,setTimeout(()=>{v()},8e3))};return oe(()=>{i(()=>{ae.get(n).then(T=>{const I=T.data?.data;if(!I){g();return}d.value=I,m=I.auctionId,r(I.lotId),c.value=!1}).catch(T=>{g()})})}),{lot:d,initLoading:c,closingLot:y}},Fh={key:0,"data-list-name":"veiling van de dag"},Vh={key:1},Hh={class:"auction h-100"},qh={class:"card is-loading"},Wh={class:"card-img-top position-relative"},zh={class:"card-label blue"},Kh=q({__name:"AuctionOfTheDay",props:{serverDateTime:{type:Number,default:null,required:!1},userIsAuthenticated:{type:Boolean,default:!1,required:!1},apiUrl:{type:String,default:"lots/all",required:!1}},setup(n){const e=n,{lot:t,initLoading:s,closingLot:i}=na({endpoint:"special-auctions/aotd",containerId:"aotd-homepage",initialServerDateTime:e.serverDateTime});return te(t,r=>{r&&Gt([r])}),ko(),(r,l)=>a(s)===!1?(u(),h("div",Fh,[a(t)?(u(),ee(He,{key:a(t).auctionId,class:"auction h-100",lot:a(t),"user-is-authenticated":n.userIsAuthenticated,"img-size":{desktopWidth:800,desktopHeight:350,mobileWidth:300,mobileHeight:200},"label-text":{text:a(f)("Common_AuctionOfTheDay"),subText:a(f)("Common_TodayExtraFast"),color:"blue"},"auction-of-the-day":"","use-alternate-image-on-desktop":"",onClosingLot:l[0]||(l[0]=d=>a(i)(d.lotId))},null,8,["lot","user-is-authenticated","label-text"])):k("",!0)])):(u(),h("div",Vh,[o("div",Hh,[o("a",qh,[o("div",Wh,[o("div",zh,[j(_(a(f)("Common_AuctionOfTheDay"))+" ",1),o("div",null,_(a(f)("Common_TodayExtraFast")),1)]),l[1]||(l[1]=o("figure",{class:"image w-100"},[o("img",{class:"d-md-none w-100",src:"/dist/images/logo-placeholder.png",alt:""}),o("img",{class:"d-none d-md-block w-100",src:"/dist/images/logo-placeholder-aotd.png",alt:""})],-1))]),l[2]||(l[2]=et('<div class="card-body d-flex flex-column"><h3 class="card-h3 flex-fill"> </h3><div class="d-flex align-items-center mt-3"><div class="auction__amount"><span></span></div><span class="auction__countdown"><span></span></span></div></div>',1))])])]))}}),Gh={key:0,"data-list-name":"aanrader"},jh={key:1},Xh={class:"auction h-100"},Yh={class:"card is-loading"},Jh={class:"card-img-top position-relative"},Zh={class:"card-label blue"},Qh=q({__name:"AuctionRecommended",props:{serverDateTime:{type:Number,default:null,required:!1},userIsAuthenticated:{type:Boolean,default:!1,required:!1},auctionId:{type:String,required:!1},apiUrl:{type:String,default:"lots/all",required:!1}},setup(n){const e=n,{lot:t,initLoading:s,closingLot:i}=na({endpoint:"special-auctions/recommended",containerId:"recommended-homepage",initialServerDateTime:e.serverDateTime,initialAuctionId:e.auctionId});return te(t,r=>{r&&Gt([r])}),ko(),(r,l)=>a(s)===!1?(u(),h("div",Gh,[a(t)?(u(),ee(He,{key:a(t).auctionId,class:"auction h-100",lot:a(t),"user-is-authenticated":n.userIsAuthenticated,"img-size":{desktopWidth:400,desktopHeight:350,mobileWidth:300,mobileHeight:200},"label-text":{text:a(f)("Common_Recommended"),subText:"",color:"blue"},"use-alternate-image-on-desktop":"",onClosingLot:l[0]||(l[0]=d=>a(i)(d.lotId))},null,8,["lot","user-is-authenticated","label-text"])):k("",!0)])):(u(),h("div",jh,[o("div",Xh,[o("a",Yh,[o("div",Jh,[o("div",Zh,_(a(f)("Common_Recommended")),1),l[1]||(l[1]=o("figure",{class:"image w-100"},[o("img",{class:"d-md-none w-100",src:"/dist/images/logo-placeholder.png",alt:""}),o("img",{class:"d-none d-md-block w-100",src:"/dist/images/logo-placeholder-recommended.png",alt:""})],-1))]),l[2]||(l[2]=et('<div class="card-body d-flex flex-column"><h3 class="card-h3 flex-fill"> </h3><div class="d-flex align-items-center mt-3"><div class="auction__amount"><span></span></div><span class="auction__countdown"><span></span></span></div></div>',1))])])]))}}),ef={class:"d-none","aria-hidden":"true"},tf=q({__name:"HomepageAaTest",setup(n){const{isReady:e,getFeatureValue:t}=Si();return te(e,s=>{s&&t(Ci.homepageAa,"control")},{immediate:!0}),(s,i)=>(u(),h("span",ef))}}),nf=["href","aria-label"],of={class:"dynamic-banner-lot-card__media"},sf=["src","alt"],af={key:1,class:"dynamic-banner-lot-card__image"},rf={class:"dynamic-banner-lot-card__label"},lf={class:"dynamic-banner-lot-card__content d-flex flex-column flex-grow-1 justify-content-between"},cf={class:"dynamic-banner-lot-card__title"},uf={class:"dynamic-banner-lot-card__footer d-flex flex-column"},df={class:"dynamic-banner-lot-card__stats"},hf={class:"dynamic-banner-lot-card__stat"},ff={class:"dynamic-banner-lot-card__stat-label"},_f={class:"dynamic-banner-lot-card__stat dynamic-banner-lot-card__stat--end"},pf={class:"dynamic-banner-lot-card__stat-label"},mf={class:"dynamic-banner-lot-card__stat-value"},vf={class:"btn btn-primary dynamic-banner-lot-card__cta"},gf=q({__name:"DynamicBannerLotCard",props:{lot:{default:()=>({auctionId:"",lotId:"",title:"",url:"",image:"",advertiserId:"",advertiserName:"",categoryId:"",categoryName:"",subCategoryId:"",subCategoryName:"",lotStartDate:"",endTime:0,bannerEndTime:0,lotAmou
2nt:0,directOrderPrice:0,directBuyOnly:!1})},label:{default:""},auctionUrl:{default:void 0}},emits:["closingLot"],setup(n,{emit:e}){const t=n,s=e,{subscribe:i}=Dt(),r=w(t.lot.lotAmount);te(()=>t.lot.lotAmount,d=>{r.value=d});const l=w(t.lot.endTime);return te(()=>t.lot.endTime,d=>{l.value=d}),i(Et,({lotId:d,bidList:c,endDateTime:p})=>{if(!t.lot.lotId||t.lot.lotId!==d)return;r.value=c[0]?c[0].amount:0;const m=No(l.value,p);m!==null&&(l.value=m)}),i(xt,d=>{!t.lot.lotId||t.lot.lotId!==d.lotId||(r.value=d.amount)}),i(Bn,d=>{if(!t.lot.lotId||t.lot.lotId!==d.lotId)return;const c=Mo(l.value,d.endDateTime);c!==null&&(l.value=c)}),i(At,d=>{t.lot.lotId&&t.lot.lotId===d.lotId&&s("closingLot",d)}),(d,c)=>(u(),h("a",{class:"dynamic-banner-lot-card d-flex flex-column h-100 text-decoration-none",href:n.auctionUrl,"aria-label":n.lot.title},[o("div",of,[n.lot.image?(u(),h("img",{key:0,src:n.lot.image,alt:n.lot.title,class:"dynamic-banner-lot-card__image"},null,8,sf)):(u(),h("div",af)),o("span",rf,_(n.label),1)]),o("div",lf,[o("h3",cf,_(n.lot.title),1),o("div",uf,[o("div",df,[o("div",hf,[o("span",ff,_(a(f)("Common_CurrentBid")),1),(u(),h("span",{key:r.value,class:"dynamic-banner-lot-card__stat-value trigger"},_(a(De)(r.value)),1))]),o("div",_f,[o("span",pf,_(a(f)("Auction_TimeLeft")),1),o("span",mf,[N(Ro,{"end-time":l.value},null,8,["end-time"])])])]),o("span",vf,_(a(f)("Auction_BidNow")),1)])])],8,nf))}}),yf={ToTop:"to top",ToBottom:"to bottom",ToLeft:"to left",ToRight:"to right",ToTopLeft:"to top left",ToTopRight:"to top right",ToBottomLeft:"to bottom left",ToBottomRight:"to bottom right"},bf={ToBottom:"first",ToBottomLeft:"first",ToBottomRight:"first",ToTop:"last",ToTopLeft:"last",ToTopRight:"last",ToLeft:"first",ToRight:"first"};function wf(n){if(n.gradient!==null){const e=n.gradient.stops.map(t=>t.color);return`linear-gradient(${yf[n.gradient.direction]}, ${e.join(", ")})`}else if(n.color!==null)return n.color;return""}function kf(n){if(n.gradient!==null){const e=n.gradient.stops;return(bf[n.gradient.direction]==="last"?e[e.length-1]:e[0])?.color??""}else if(n.color!==null)return n.color;return""}function If(n){let e=null;const t=()=>{e??=setTimeout(()=>{e=null,n()},wn)};return Pe(()=>{e!==null&&(clearTimeout(e),e=null)}),{scheduleRefresh:t}}async function Sf(n,e){const t=e?`/dynamic-banners/${encodeURIComponent(n)}/preview?domain=${encodeURIComponent(e)}`:`/dynamic-banners/${encodeURIComponent(n)}`;return(await ae.get(t)).data.data}async function Cf(n){return(await ae.get(`/dynamic-banners/${encodeURIComponent(n)}/lot`)).data.data}const oa=["auction","auction_image_desktop","category"],$f=["auction_image_desktop"],Tf=n=>n!==void 0&&oa.includes(n),xf=n=>!$f.includes(n)||window.matchMedia("(min-width: 992px)").matches;function Ef(n,e){const t=(d,c)=>{switch(c){case"auction":case"auction_image_desktop":{const p=xr(d.lot);return d.label&&(p.item_promo_label=d.label),[p]}case"category":return[]}},s=(d,c,p)=>({promotion_id:p.promotionId,promotion_name:p.promotionName,creative_name:e,creative_slot:c,items:t(d,c)}),i=async d=>{const c=n.value;if(c?.promotion){await Cr();for(const p of d.filter(xf))$r(s(c,p,c.promotion))}},r=te(()=>n.value?.lot.auctionId,d=>{d&&(i(oa),r())},{immediate:!0});return te(()=>n.value?.lot.auctionId,(d,c)=>{!d||!c||d===c||i(["auction","auction_image_desktop"])}),{onBannerClick:d=>{const c=n.value;if(!c?.promotion)return;const p=d.target,m=p.closest("a[href]"),g=m?.getAttribute("href");if(!m||!g||g==="#")return;const v=p.closest("[data-creative-slot]")?.dataset.creativeSlot;Tf(v)&&Tr(s(c,v,c.promotion))}}}const Af={class:"dynamic-banner__inner d-flex flex-column flex-lg-row align-items-stretch"},Lf={class:"dynamic-banner__lot","data-creative-slot":"auction"},Df=["src"],Bf=["href","aria-label"],Pf=["src","alt"],Uf={key:1,class:"dynamic-banner__image-img"},Mf=["href"],Nf={class:"dynamic-banner__text-inner d-flex flex-column justify-content-between align-items-center align-items-lg-end gap-4"},Rf={class:"dynamic-banner__tiles d-flex flex-column align-items-center align-items-lg-end"},Of={key:0,class:"dynamic-banner__title-subtitle"},Ff=["srcset"],Vf=["src"],Hf={key:1,class:"dynamic-banner__title-subtitle"},qf={class:"dynamic-banner__footer d-flex flex-column align-items-center align-items-lg-end"},Wf={class:"dynamic-banner__category-title mb-3"},zf={class:"dynamic-banner__cta"},Kf={class:"dynamic-banner__cta-text"},Gf=q({__name:"DynamicBanner",props:{bannerId:{},creativeName:{},previewDomain:{}},setup(n){const e=n,t={lot:{auctionId:"",lotId:"",title:"",url:"",image:"",advertiserId:"",advertiserName:"",categoryId:"",categoryName:"",subCategoryId:"",subCategoryName:"",lotStartDate:"",endTime:0,bannerEndTime:0,lotAmou
2nt:0,directOrderPrice:0,directBuyOnly:!1},label:"",titleImageSet:{desktop:"",mobile:""},stickerSvg:null,categoryTitle:"",ctaLabel:"",categoryId:"",categoryUrl:"",styles:{background:{color:"",gradient:null},textColor:"",label:{backgroundColor:"",textColor:""}},serverDateTime:0,bannerEndTime:0,promotion:null},s=w(null),i=w(!0),{now:r}=Le(),l=E(()=>r.value??0),d=E(()=>s.value??t),c=E(()=>d.value.lot.url?`${window.urls.auctionsPrefix}${d.value.lot.url}`:void 0),p=E(()=>{if(!s.value)return{};const A=s.value.styles;return{"--dynamic-banner-bg":wf(A.background),"--dynamic-banner-mobile-top-bg":kf(A.background),"--dynamic-banner-text":A.textColor,"--dynamic-banner-label-bg":A.label.backgroundColor,"--dynamic-banner-label-text":A.label.textColor}}),{onConnected:m,joinLot:g,leaveLot:v}=ot(),y=async()=>{if(!s.value||l.value>=s.value.bannerEndTime)return;const A=s.value.lot.lotId;let B;try{B=await Cf(e.bannerId)}catch(b){console.error("Failed to refresh dynamic banner lot",b);return}B&&(s.value={...s.value,lot:B},B.lotId!==A&&(A&&v(A),g(B.lotId)))},{scheduleRefresh:T}=If(y),{onBannerClick:I}=Ef(s,e.creativeName),C=A=>{s.value?.lot.lotId===A.lotId&&(v(A.lotId),T())};return oe(async()=>{try{s.value=await Sf(e.bannerId,e.previewDomain),Nn(s.value?.serverDateTime)}catch(A){console.error("Failed to load dynamic banner",A),s.value=null}finally{i.value=!1}e.previewDomain||!s.value?.lot.lotId||m(()=>{s.value&&g(s.value.lot.lotId)})}),Pe(()=>{s.value?.lot.lotId&&v(s.value.lot.lotId)}),(A,B)=>i.value||s.value?(u(),h("div",{key:0,class:V(["dynamic-banner my-3",{"is-loading":!s.value}]),style:$t(p.value),onClick:B[0]||(B[0]=(...b)=>a(I)&&a(I)(...b))},[o("div",Af,[o("div",Lf,[(u(),ee(gf,{key:d.value.lot.lotId||"skeleton",lot:d.value.lot,"auction-url":c.value,label:d.value.label,onClosingLot:C},null,8,["lot","auction-url","label"])),d.value.stickerSvg?(u(),h("img",{key:0,src:d.value.stickerSvg,draggable:"false",class:"dynamic-banner__sticker",alt:""},null,8,Df)):k("",!0)]),o("a",{class:"dynamic-banner__image d-none d-lg-block",href:c.value,"aria-label":d.value.lot.title||void 0,"data-creative-slot":"auction_image_desktop"},[d.value.lot.image?(u(),h("img",{key:0,src:d.value.lot.image,alt:d.value.lot.title,draggable:"false",class:"dynamic-banner__image-img"},null,8,Pf)):(u(),h("div",Uf))],8,Bf),o("a",{class:"dynamic-banner__text",href:d.value.categoryUrl||void 0,"data-creative-slot":"category"},[o("div",Nf,[o("div",Rf,[d.value.titleImageSet.desktop?(u(),h("picture",Of,[o("source",{srcset:d.value.titleImageSet.mobile,media:"(max-width: 991px)"},null,8,Ff),o("img",{src:d.value.titleImageSet.desktop,class:"dynamic-banner__title-subtitle-img",alt:"",draggable:"false"},null,8,Vf)])):(u(),h("div",Hf))]),o("div",qf,[o("p",Wf,_(d.value.categoryTitle),1),o("span",zf,[o("span",Kf,_(d.value.ctaLabel),1),N(a(he),{icon:a(lr)},null,8,["icon"])])])])],8,Mf)])],6)):k("",!0)}}),Fo=25;function sa(n){const e=w(null),t=w(!0),s=E(()=>e.value===null?null:st(e.value.activeUntil)),i=E(()=>e.value===null?null:st(e.value.serverDateTime)),{remainingSeconds:r}=Qt(s,i),{now:l}=Le(),d=c=>{const p=st(c.activeUntil),m=l.value??st(c.serverDateTime);return p!==null&&m!==null&&p<=m};return oe(async()=>{try{const c=await n();e.value=c!==null&&!d(c)?c:null}catch(c){console.error("Failed to load no-admin-fee banner",c)}finally{t.value=!1}}),{banner:e,loading:t,remainingSeconds:r}}const oo=w(!1);function Rn(){return{isOpen:oo,open:()=>{oo.value=!0},close:()=>{oo.value=!1}}}class jf{async getBannerAsync(){return(await ae.get("/no-admin-fee")).data.data}async getCategoryBannerAsync(e){return(await ae.get(`/no-admin-fee/category/${encodeURIComponent(e)}`)).data.data}}const ia=new jf,Xf={class:"naf-countdown"},Yf={class:"naf-countdown__label"},Jf={class:"naf-countdown__unit"},aa=q({__name:"NoAdminFeeCountdown",props:{seconds:{}},setup(n){const e=n,{units:t}=en(()=>e.seconds),s=(i,r)=>{switch(i){case"days":return r===1?f("NoAdminFeeWindow_BannerCountdownDays_Singular"):f("NoAdminFeeWindow_BannerCountdownDays_Plural");case"hours":return f("NoAdminFeeWindow_BannerCountdownHours");case"minutes":return f("NoAdminFeeWindow_BannerCountdownMinutes");default:return f("NoAdminFeeWindow_BannerCountdownSeconds")}};return(i,r)=>(u(),h("div",Xf,[o("span",Yf,_(a(f)("NoAdminFeeWindow_BannerCountdownPrefix")),1),(u(!0),h(z,null,Q(a(t),l=>(u(),h("div",{key:l.key,class:"naf-countdown__block"},[o("span",{class:V(["naf-countdown__value",{"naf-countdown__value--dim":l.dim}])},_(l.padded),3),o("span",Jf,_(s(l.key,l.value)),1)]))),128))]))}}),Zf={class:"naf-compact-countdown"},Qf={key:0,class:"naf-compact-countdown__separator","aria-hidden":"true"},xn=q({__name:"NoAdminFeeCompactCountdown",props:{seconds:{}},setup(n){const e=n,{units:t}
2=en(()=>e.seconds);return(s,i)=>(u(),h("span",Zf,[(u(!0),h(z,null,Q(a(t),(r,l)=>(u(),h(z,{key:r.key},[l>0?(u(),h("span",Qf,":")):k("",!0),o("span",{class:V(["naf-compact-countdown__value",{"naf-compact-countdown__value--dim":r.dim}])},_(r.padded),3)],64))),128))]))}}),e_=q({__name:"StickyStackItem",props:{visible:{type:Boolean},order:{default:0}},setup(n){const e=n,t=jr(e.order);return te(()=>e.visible,s=>{s?t.show():t.hide()},{immediate:!0}),Pe(()=>{t.destroy()}),(s,i)=>(u(),ee(Zt,{to:a(t).inner},[Oe(s.$slots,"default")],8,["to"]))}}),t_={class:"naf-sticky"},n_={class:"container naf-sticky__inner"},o_={class:"naf-sticky__lead"},s_={class:"naf-sticky__title"},i_={class:"naf-sticky__compact"},a_={class:"naf-sticky__text"},r_=["aria-label"],l_={class:"naf-sticky__center"},c_={class:"naf-sticky__text"},u_={class:"naf-sticky__text"},d_={class:"naf-sticky__countdown"},h_={class:"naf-sticky__text"},f_={class:"naf-sticky__more-icon"},Vo=q({__name:"NoAdminFeeStickyBanner",props:{visible:{type:Boolean},banner:{},seconds:{}},setup(n){const e=n,{open:t}=Rn(),s=E(()=>f("NoAdminFeeWindow_StickySavings",{amount:pe(e.banner.savings)})),i=E(()=>f("NoAdminFeeWindow_BannerSchedule",{end:pt(e.banner.activeUntil)}));return(r,l)=>(u(),ee(e_,{visible:n.visible,order:0},{default:de(()=>[o("div",t_,[o("div",n_,[o("div",o_,[l[2]||(l[2]=o("span",{class:"naf-sticky__flash"},[o("span",{class:"naf-sticky__flash-inner"},[o("span",{class:"naf-sticky__flash-icon","aria-hidden":"true"})])],-1)),o("span",s_,_(a(f)("NoAdminFeeWindow_BannerTitle")),1)]),o("div",i_,[l[3]||(l[3]=o("span",{class:"naf-sticky__divider","aria-hidden":"true"},null,-1)),o("span",a_,_(a(f)("NoAdminFeeWindow_BannerCountdownPrefix")),1),N(xn,{seconds:n.seconds},null,8,["seconds"]),o("button",{type:"button",class:"naf-sticky__info-icon naf-info-trigger","aria-label":a(f)("NoAdminFeeWindow_StickyMoreInfo"),onClick:l[0]||(l[0]=(...d)=>a(t)&&a(t)(...d))},[N(a(he),{icon:a(kt)},null,8,["icon"])],8,r_)]),o("div",l_,[o("span",c_,_(s.value),1),l[4]||(l[4]=o("span",{class:"naf-sticky__divider","aria-hidden":"true"},null,-1)),o("span",u_,_(i.value),1),l[5]||(l[5]=o("span",{class:"naf-sticky__divider","aria-hidden":"true"},null,-1)),o("span",d_,[o("span",h_,_(a(f)("NoAdminFeeWindow_StickyCountdownPrefix")),1),N(xn,{seconds:n.seconds},null,8,["seconds"])])]),o("button",{type:"button",class:"naf-sticky__more",onClick:l[1]||(l[1]=(...d)=>a(t)&&a(t)(...d))},[o("span",null,_(a(f)("NoAdminFeeWindow_StickyMoreInfo")),1),o("span",f_,[N(a(he),{icon:a(ni)},null,8,["icon"])])])])])]),_:1},8,["visible"]))}}),__={key:0,class:"bottomsheet-modal-bg"},p_=["aria-label"],m_={key:0,class:"bottomsheet-modal-header"},v_={class:"bottomsheet-modal-body d-flex flex-column overflow-auto"},g_={key:1,class:"bottomsheet-modal-footer p-3 border-top"},Ho=q({__name:"ModalShell",props:Ct({compact:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:e}){const t=ft(n,"modelValue"),s=l=>{l.key==="Escape"&&t.value&&r()};te(t,l=>{l?document.body.classList.add("modal-open"):document.body.classList.remove("modal-open")},{immediate:!0}),oe(()=>{document.addEventListener("keydown",s)}),Te(()=>{document.removeEventListener("keydown",s),document.body.classList.remove("modal-open")});const i=()=>{t.value=!0},r=()=>{t.value=!1};return e({open:i,close:r}),(l,d)=>(u(),ee(Zt,{to:"body"},[t.value?(u(),h("div",__,[o("div",{class:"bottomsheet-modal-outer","aria-hidden":"true",onClick:ie(r,["prevent"])}),o("div",{class:V(["bottomsheet-modal-container",{"is-compact":n.compact}]),role:"dialog","aria-modal":"true","aria-labelledby":"modal-title"},[o("button",{class:"bottomsheet-modal-close",type:"button","aria-label":a(f)("Common_Close"),onClick:ie(r,["prevent"])},[N(a(he),{icon:a(oi),"aria-hidden":"true"},null,8,["icon"])],8,p_),l.$slots.header?(u(),h("div",m_,[Oe(l.$slots,"header")])):k("",!0),o("div",v_,[Oe(l.$slots,"default")]),l.$slots.footer?(u(),h("div",g_,[Oe(l.$slots,"footer")])):k("",!0)],2)])):k("",!0)]))}}),y_={class:"naf-info-modal"},b_={class:"naf-info-modal__header"},w_={id:"modal-title",class:"naf-info-modal__title"},k_=["innerHTML"],I_={class:"naf-info-modal__how"},S_={class:"naf-info-modal__facts"},C_={class:"naf-info-modal__fact"},$_={class:"naf-info-modal__fact-icon"},T_={class:"naf-info-modal__fact-text"},x_={class:"naf-info-modal__fact"},E_={class:"naf-info-modal__fact-icon"},A_={class:"naf-info-modal__fact-text"},L_=["innerHTML"],qo=q({__name:"NoAdminFeeInfoModal",props:{banner:{}},setup(n){const e=n,{isOpen:t,close:s}=Rn(),i=E(()=>pe(e.banner.savings)),r=E(()=>pt(e.banner.activeUntil)),l=E(()=>f("NoAdminFeeWindow_ModalDescription",{amount:i.value})),d=E(()=>f("NoAdminFeeWindow_ModalFactWithin",{end:r.value})),c=E(()=>f("NoAdminFeeWindow_ModalFactAfter",{amount:i.value}));return(p,m)=>(u(),ee(Ho,{modelValue:a(t),"onUpdate:modelValue":m[1]||(m[1]=g=>yo(t)?t.value=g:null),compact:""},{default:de(()=>[o("div",y_,[o("div",b_,[m[2]||(m[2]=o("span",{class:"naf-info-modal__title-icon"},[o("span",{class:"naf-info-modal__title-glyph","aria-hidden":"true"})],-1)),o("h4",w_,_(a(f)("NoAdminFeeWindow_BannerTitle")),1)]),o("p",{class:"naf-info-modal__description",innerHTML:l.value},null,8,k_),o("p",I_,_(a(f)("NoAdminFeeWindow_ModalHowItWorks")),1),o("div",S_,[o("div",C_,[o("span",$_,[N(a(he),{icon:a(si)},null,8,["icon"])]),o("span",T_,_(d.value),1)]),o("div",x_,[o("span",E_,[N(a(he),{icon:a(ii)},null,8,["icon"])]),o("span",A_,_(c.value),1)])]),o("div",{class:"naf-info-modal__notice",innerHTML:a(f)("NoAdminFeeWindow_ModalNotice")},null,8,L_),o("button",{type:"button",class:"naf-info-modal__confirm",onClick:m[0]||(m[0]=(...g)=>a(s)&&a(s)(...g))},_(a(f)("NoAdminFeeWindow_ModalConfirm")),1)])]),_:1},8,["modelValue"]))}}),D_={class:"naf-promo__lead"},B_={class:"naf-promo__primary"},P_={class:"naf-promo__title"},U_={class:"naf-promo__savings"},M_={class:"naf-promo__savings-text"},N_=["aria-label"],R_={class:"naf-promo__description"},O_=["innerHTML"],F_=["aria-label"],V_={class:"naf-promo__facts"},H_={class:"naf-promo__fact"},q_={class:"naf-promo__fact-icon"},W_={class:"naf-promo__fact-text"},z_={class:"naf-promo__fact"},K_={class:"naf-promo__fact-icon"},G_={class:"naf-promo__fact-text"},j_=q({__name:"NoAdminFeeGlobalBanner",setup(n){const{banner:e,loading:t,remainingSeconds:s}=sa(()=>ia.getBannerAsync()),{open:i}=Rn(),r=w(null),{isPast:l}=Io(r,Fo),d=E(()=>f("NoAdminFeeWindow_BannerSavings",{amount:pe(e.value?.savings??0)})),c=E(()=>e.value===null?"":f("NoAdminFeeWindow_BannerSchedule",{end:pt(e.value.activeUntil)})),p=E(()=>e.value===null?"":f("NoAdminFeeWindow_BannerDescription",{amount:pe(e.value.savings),end:pt(e.value.activeUntil)}));return(m,g)=>(u(),h(z,null,[a(t)||a(e)!==null?(u(),h("div",{key:0,ref_key:"bannerRef",ref:r,class:V(["naf-promo naf-promo--home",{"naf-promo--loading":a(t)}])},[o("div",D_,[g[2]||(g[2]=o("div",{class:"naf-promo__flash"},[o("span",{class:"naf-promo__flash-inner"},[o("span",{class:"naf-promo__flash-icon","aria-hidden":"true"})])],-1)),o("div",B_,[o("span",P_,_(a(f)("NoAdminFeeWindow_BannerTitle")),1),o("span",U_,[o("span",M_,_(d.value),1),o("button",{type:"button",class:"naf-promo__savings-icon naf-info-trigger","aria-label":a(f)("NoAdminFeeWindow_StickyMoreInfo"),onClick:g[0]||(g[0]=(...v)=>a(i)&&a(i)(...v))},[N(a(he),{icon:a(kt)},null,8,["icon"])],8,N_)])])]),o("p",R_,[o("span",{innerHTML:p.value},null,8,O_),o("button",{type:"button",class:"naf-promo__info-icon naf-info-trigger","aria-label":a(f)("NoAdminFeeWindow_StickyMoreInfo"),onClick:g[1]||(g[1]=(...v)=>a(i)&&a(i)(...v))},[N(a(he),{icon:a(kt)},null,8,["icon"])],8,F_)]),o("div",V_,[o("span",H_,[o("span",q_,[N(a(he),{icon:a(ii)},null,8,["icon"])]),o("span",W_,_(c.value),1)]),o("span",z_,[o("span",K_,[N(a(he),{icon:a(si)},null,8,["icon"])]),o("span",G_,_(a(f)("NoAdminFeeWindow_BannerScope")),1)])]),N(xn,{seconds:a(s)},null,8,["seconds"]),N(aa,{seconds:a(s)},null,8,["seconds"])],2)):k("",!0),a(e)!==null?(u(),ee(Vo,{key:1,visible:a(l),banner:a(e),seconds:a(s)},null,8,["visible","banner","seconds"])):k("",!0),a(e)!==null?(u(),ee(qo,{key:2,banner:a(e)},null,8,["banner"])):k("",!0)],64))}}),X_={class:"naf-promo__lead"},Y_={class:"naf-promo__primary"},J_={class:"naf-promo__title-row"},Z_={class:"naf-promo__title"},Q_=["aria-label"],ep={class:"naf-promo__facts"},tp={class:"naf-promo__savings"},np={class:"naf-promo__schedule"},op={class:"naf-promo__description"},sp=["innerHTML"],ip=["aria-label"],ap=q({__name:"NoAdminFeeCategoryBanner",props:{categoryId:{}},setup(n){const e=n,{banner:t,loading:s,remainingSeconds:i}=sa(()=>ia.getCategoryBannerAsync(e.categoryId)),{open:r}=Rn(),l=w(null),{isPast:d}=Io(l,Fo),c=E(()=>f("NoAdminFeeWindow_BannerSavings",{amount:pe(t.value?.savings??0)})),p=E(()=>t.value===null?"":f("NoAdminFeeWindow_BannerSchedule",{end:pt(t.value.activeUntil)})),m=E(()=>t.value===null?"":f("NoAdminFeeWindow_BannerDescription",{amount:pe(t.value.savings),end:pt(t.value.activeUntil)}));return(g,v)=>(u(),h(z,null,[a(s)||a(t)!==null?(u(),h("div",{key:0,ref_key:"bannerRef",ref:l,class:V(["naf-promo naf-promo--category",{"naf-promo--loading":a(s)}])},[o("div",X_,[v[3]||(v[3]=o("div",{class:"naf-promo__flash"},[o("span",{class:"naf-promo__flash-inner"},[o("span",{class:"naf-promo__flash-icon","aria-hidden":"true"})])],-1)),o("div",Y_,[o("div",J_,[o("span",Z_,_(a(f)("NoAdminFeeWindow_BannerTitle")),1),o("button",{type:"button",class:"naf-promo__info naf-info-trigger","aria-label":a(f)("NoAdminFeeWindow_StickyMoreInfo"),onClick:v[0]||(v[0]=(...y)=>a(r)&&a(r)(...y))}
2,[N(a(he),{icon:a(kt)},null,8,["icon"])],8,Q_)]),o("div",ep,[o("span",tp,_(c.value),1),v[2]||(v[2]=o("span",{class:"naf-promo__divider","aria-hidden":"true"},null,-1)),o("span",np,_(p.value),1)])])]),o("p",op,[o("span",{innerHTML:m.value},null,8,sp),o("button",{type:"button",class:"naf-promo__info-icon naf-info-trigger","aria-label":a(f)("NoAdminFeeWindow_StickyMoreInfo"),onClick:v[1]||(v[1]=(...y)=>a(r)&&a(r)(...y))},[N(a(he),{icon:a(kt)},null,8,["icon"])],8,ip)]),N(aa,{seconds:a(i)},null,8,["seconds"]),N(xn,{seconds:a(i)},null,8,["seconds"])],2)):k("",!0),a(t)!==null?(u(),ee(Vo,{key:1,visible:a(d),banner:a(t),seconds:a(i)},null,8,["visible","banner","seconds"])):k("",!0),a(t)!==null?(u(),ee(qo,{key:2,banner:a(t)},null,8,["banner"])):k("",!0)],64))}});function rp(n,e){const{remainingSeconds:t}=Qt(n),{text:s}=en(()=>t.value),i=document.title,r=()=>{if(document.visibilityState!=="hidden"){document.title=i;return}document.title=`${t.value>0?s.value:f("Common_Closed")} | ${e()} - ${i}`};te([t,e],r),oe(()=>document.addEventListener("visibilitychange",r)),Te(()=>{document.removeEventListener("visibilitychange",r),document.title=i})}const xs=()=>{const n=new Error("Veiling niet gevonden.");return n.name="NotFound",n},lp=async n=>{const{data:e}=await ae.post("/lots/all-by-auctions",{AuctionIds:[n]}),t=e.data.lots;if(t===null||t.length===0)throw xs();const s=t[0];if(!s)throw xs();return s},cp=async n=>{const{data:e}=await ae.get("/lots/current",{params:{auctionId:n}});return e.data.lotId??null},ra=3,up=bo("auctionStore",{state:()=>({auctionId:null,currentLot:null,closedLotId:null}),actions:{setAuctionId(n){this.auctionId=n},closeLot(n){this.closedLotId=n},updateLot(n){this.currentLot=n,Ae(_o,n)},extendLot(n,e){if(this.currentLot===null||this.currentLot.lotId!==n)return;const t=Mo(this.currentLot.endDateTime,e);t!==null&&(this.currentLot.endDateTime=t,Ae(_o,this.currentLot))}},getters:{currentLotClosed:n=>n.currentLot!==null&&n.closedLotId===n.currentLot.lotId,currentLotEnding(n){const{now:e}=Le(),t=n.currentLot?.endDateTime??null;return this.currentLotClosed||e.value===null||t===null||t<=0?!1:e.value>=t&&e.value<t+ra},currentBid:n=>n.currentLot===null?0:n.currentLot.bidList.length>0?n.currentLot.bidList[0]?.amount??0:0,minBid:n=>n.currentLot===null?0:n.currentLot.bidList.length>0?(n.currentLot.bidList[0]?.amount??0)+1:n.currentLot.minimumIncrement,maxBid:n=>n.currentLot===null?0:n.currentLot.bidList.length>0?(n.currentLot.bidList[0]?.amount??0)+n.currentLot.maximumIncrement:n.currentLot.maximumIncrement}}),Bt=up;function la(){return window.urls.allAuctions}const dp={key:0,class:"auction__bid justify-content-center p-0"},hp={class:"m-0 text-15"},fp={class:"auction__bid--displayname"},_p={class:"auction__bid--time"},pp={key:0,class:"auction__bid--icon auction__bid-extrainfo","data-bs-toggle":"modal","data-bs-target":"#info-modal"},mp={class:"auction__bid--displayname"},vp={class:"auction__bid--time"},gp={key:3,class:"auction__bid--more"},so=1,Es=50,yp=q({__name:"BidHistory",props:{lot:{default:null},userId:{default:""}},setup(n){const e=w(0),t=n,s=E(()=>t.lot!==null&&t.lot.bidList.length>0),i=E(()=>t.lot!==null&&t.lot.bidList.length===0),r=E(()=>s.value?t.lot.bidList.slice(0,p()):[]),l=E(()=>t.lot!==null&&t.lot.bidList.length>so),d=E(()=>e.value>0),c=E(()=>e.value<m()),p=()=>t.lot!==null?Math.min(t.lot.bidList.length,so+Es*e.value):0,m=()=>Math.ceil(((t.lot?.bidList.length??0)-so)/Es),g=()=>{e.value=vi(e.value+1,0,m())},v=()=>{e.value=0};return(y,T)=>(u(),h(z,null,[i.value?(u(),h("div",dp,[o("p",hp,_(a(f)("BidHistory_NoBidsText")),1)])):k("",!0),s.value?(u(!0),h(z,{key:1},Q(r.value.slice(0,1),I=>(u(),h("div",{key:`${I.userId}-${I.amount}`,class:"auction__bid auction__bid--current"},[(u(),h("svg",{class:V(["auction__bid--icon",{"auction__bid--user":I.userId===n.userId}]),focusable:"false","aria-hidden":"true",viewBox:"0 0 10 16"},[...T[0]||(T[0]=[o("path",{fill:"currentColor",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"1.44",d:"m6.1 1-.01 5.83H9L3.9 14.6V8.77H1L6.1 1Z"},null,-1)])],2)),o("span",{class:V(["auction__bid--amount",{"auction__bid--ab":I.autoBid}])},_(a(De)(I.amount)),3),o("span",fp,_(I.displayName),1),o("span",_p,_(a(rs)(I.createdOn)),1)]))),128)):k("",!0),s.value?(u(!0),h(z,{key:2},Q(r.value.slice(1),I=>(u(),h("div",{key:`${I.userId}-${I.amount}`,class:"auction__bid"},[r.value.filter(C=>C.amount===I.amount).length>1?(u(),h("span",pp,[...T[1]||(T[1]=[o("span",{class:"icon"},[o("i",{class:"fa-solid fa-circle-info"})],-1)])])):(u(),h("svg",{key:1,class:V(["auction__bid--icon",{"auction__bid--user":I.userId===n.userId}]),focusable:"false","aria-hidden":"true",viewBox:"0 0 10 16"},[...T[2]||(T[2]=[o("path",{fill:"currentColor",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"1.44",d:"m6.1 1-.01 5.83H9L3.9 14.6V8.77H1L6.1 1Z"},null,-1)])],2)),o("span",{class:V(["auction__bid--amount",{"auction__bid--user":I.userId===n.userId&&r.value.filter(C=>C.amount===I.amount).length<2}])},_(a(De)(I.amount)),3),o("span",mp,_(I.displayName),1),o("span",vp,_(a(rs)(I.createdOn)),1)]))),128)):k("",!0),l.value?(u(),h("div",gp,[d.value?(u(),h("div",{key:0,class:"cursor-pointer",onClick:v},[...T[3]||(T[3]=[o("span",{class:"icon"},[o("i",{class:"fa-solid fa-chevron-up"})],-1)])])):k("",!0),c.value?(u(),h("div",{key:1,class:"cursor-pointer",onClick:g},[...T[4]||(T[4]=[o("span",{class:"icon"},[o("i",{class:"fa-solid fa-chevron-down"})],-1)])])):k("",!0)])):k("",!0)],64))}}),bp=["value","required","maxLength","aria-label"],wp={key:2,class:"bid-amount__icon"},kp={key:3,class:"bid-amount__icon bid-amount__icon--success"},Ip={key:0,class:"bid-amount__error"},Sp=q({__name:"BidAmountField",props:{label:String,modelValue:String,required:{type:Boolean,default:!1},showError:{type:Boolean,default:!1},hideErrorText:{type:Boolean,default:!1},errorText:String,maxLength:Number,prefix:String,hideSuccess:{type:Boolean,default:!1}},emits:["update:modelValue","valueChange","keydownEnter"],setup(n,{emit:e}){const t=n,s=e,i=w(null),r=w(null),l=w(!1),d=w(!1),c=w(!1),p=E(()=>t.showError||c.value),m=E(()=>t.errorText??f("Input_RequiredField")),g=w(t.modelValue??"");te(()=>t.modelValue,$=>g.value=$??"");function v($){if(!$)return"";const L=($.split(/[.,]/,1)[0]??"").replace(/[^\d]/g,"");return L===""?"":String(Number(L))}const y=E(()=>g.value),T=$=>{const D=$.target,L=v(D.value);g.value=L;const S=L===""?void 0:L;s("update:modelValue",S),s("valueChange",S)},I=$=>{if($.key==="."||$.key===","){$.preventDefault();return}$.key==="Enter"&&s("keydownEnter")},C=()=>{l.value=!1;const $=g.value!=="";d.value=$,c.value=t.required&&!$};function A(){i.value?.focus()}const B=w(0);let b=null;return te(r,$=>{b?.disconnect(),b=null,B.value=0,$&&(b=new ResizeObserver(()=>{B.value=$.offsetWidth}),b.observe($))}),Te(()=>b?.disconnect()),($,D)=>(u(),h("div",{class:V(["bid-amount",[p.value?"is-invalid":"",l.value?"is-focused":""]])},[o("div",{class:"bid-amount__control",style:$t({"--bid-amount-prefix":`${B.value}px`}),onClick:A},[n.prefix?(u(),h("span",{key:0,ref_key:"prefixEl",ref:r,class:"bid-amount__prefix"},_(n.prefix),513)):k("",!0),o("input",{ref_key:"inputEl",ref:i,class:"bid-amount__input",value:y.value,required:n.required,maxLength:n.maxLength,"aria-label":n.label,inputmode:"numeric",pattern:"[0-9]*",onInput:T,onFocus:D[0]||(D[0]=L=>l.value=!0),onBlur:C,onKeydown:I},null,40,bp),n.label?(u(),h("span",{key:1,class:V(["bid-amount__label",{"bid-amount__label--floating":l.value||y.value}]),"aria-hidden":"true"},_(n.label),3)):k("",!0),n.showError?(u(),h("span",wp,[...D[1]||(D[1]=[o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},[o("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"})],-1)])])):d.value&&!n.hideSuccess?(u(),h("span",kp,[...D[2]||(D[2]=[o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},[o("path",{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5\r
3               1.41-1.41L10 14.17l7.59-7.59L19 8z`})],-1)])])):k("",!0)],4),p.value&&!n.hideErrorText?(u(),h("p",Ip,_(m.value),1)):k("",!0)],2))}}),Cp=le(Sp,[["__scopeId","data-v-4088f86e"]]),$p=q({__name:"Confetti",setup(n){const e=w(null);let t,s,i=[{width:13,height:15,x:96,y:45},{width:21,height:12,x:55,y:10},{width:21,height:16,x:10,y:44},{width:16,height:9,x:75,y:80},{width:15,height:15,x:55,y:42},{width:14,height:15,x:96,y:10},{width:13,height:14,x:10,y:80},{width:12,height:13,x:43,y:80},{width:12,height:9,x:10,y:114},{width:10,height:10,x:130,y:44},{width:10,height:14,x:130,y:10},{width:7,height:7,x:130,y:74},{width:25,height:14,x:10,y:10}];function r(p){return p*Math.PI/180}function l(p,m){return p+(m-p)*Math.random()}class d{confetti;velocity;spin;spinVelocity;acceleration;position;lastMoveTime=null;image;init(m,g,v,y){return this.confetti=i[Math.floor(Math.random()*i.length)],this.velocity={x:g*Math.cos(r(m)),y:g*Math.sin(r(m))},this.spin=l(0,359),this.spinVelocity=l(-20,20),this.acceleration=v,this.position=y,this}move(m){this.lastMoveTime||(this.lastMoveTime=m);let g=Math.min((m-this.lastMoveTime)/(1e3/60),4);return this.lastMoveTime=m,this.velocity.x+=this.acceleration.x*g,this.velocity.y+=this.acceleration.y*g,this.position.x+=this.velocity.x*g,this.position.y+=this.velocity.y*g,this.spin+=this.spinVelocity*g,this}draw(m){m.save(),m.translate(this.position.x,this.position.y),m.rotate(r(this.spin));let{width:g,height:v,x:y,y:T}=this.confetti;return m.drawImage(this.image,y,T,g,v,-(g/2),-(v/2),g,v),m.restore(
3),this}constructor(){this.image=new Image,this.image.src="/dist/images/confetti-particles.png"}}class c{canvasEl;isMobile;runLoop;updateDimensions;particles=null;particleCount=0;frameHandle=0;particleInitHandle=0;constructor(m,g){this.canvasEl=m,this.isMobile=g,this.runLoop=v=>this.runLoopInner(v),this.updateDimensions=()=>this.updateDimensionsInner()}start(){this.updateDimensions().initParticles(),window.addEventListener("resize",this.updateDimensions),this.runLoop(performance.now())}stop(){cancelAnimationFrame(this.frameHandle),clearInterval(this.particleInitHandle),this.particles=null,window.removeEventListener("resize",this.updateDimensions),this.clear()}runLoopInner(m){this.drawFrame(m),this.frameHandle=requestAnimationFrame(this.runLoop),this.particles.length<this.particleCount&&this.particles.push(this.initCeilingParticle(new d))}drawFrame(m){this.clear();let g=this.getCanvasContext();this.particles.forEach((v,y,T)=>{v.move(m).draw(g),(v.position.y>this.canvasEl.height+100||v.position.x<-100||v.position.x>this.canvasEl.width+100)&&T.splice(y,1)})}updateDimensionsInner(){return this.canvasEl.width=window.innerWidth,this.canvasEl.height=window.innerHeight,this}clear(){this.getCanvasContext().clearRect(0,0,this.canvasEl.width,this.canvasEl.height)}getCanvasContext(){return this.canvasEl.getContext("2d")}initParticles(){return this.particles=[],this.particleCount=this.isMobile?100:300,this}initCeilingParticle(m){let g=.25,v={x:l(0,window.innerWidth),y:-30},y={x:0,y:.075};return m.init(0,g,y,v)}}return oe(()=>{t=e.value,s=new c(t,/Mobi|Android/i.test(navigator.userAgent)),s.start()}),Pe(()=>{s.stop()}),(p,m)=>(u(),h("canvas",{ref_key:"confettiCanvas",ref:e,class:"confetti-canvas"},null,512))}}),Wo=le($p,[["__scopeId","data-v-21e51251"]]),Tp=0;function zo(n,e){return{label:f("NoAdminFeeWindow_PromotionLabel"),title:f("NoAdminFeeWindow_PromotionTitle"),originalPrice:n,newPrice:e,savings:n-e}}function ca(n){return zo(n,Tp)}const xp={key:0},Ep={class:"text-green fw-bold text-32 my-3"},Ap={class:"text-green fw-bold text-17 m-0"},Lp={class:"auction-button-holder mt-4"},Dp={key:1},Bp={class:"text-pink fw-bold text-32 my-3"},Pp={class:"text-pink fw-bold text-17 m-0"},Up={class:"px-3 my-4"},Mp=["innerHTML"],Np={class:"text-muted"},Rp={class:"auction-button-holder"},Op={class:"mb-3"},Fp={class:"px-3"},Vp={class:"ms-auto text-center px-3 smaller"},Hp={href:"/service/article/direct-buy/laughing-second",target:"_blank"},qp={class:"popup__bg d-flex d-md-block"},Wp={class:"popup__container mx-auto p-4 bg-white text-start",style:{"max-width":"600px"}},zp={class:"text-23 fw-bold mb-3"},Kp={class:"text-gray"},Gp=["innerHTML"],jp={class:"auction__tab-content-text auction__tab-required mb-0"},Xp={class:"required-row"},Yp={class:"required-price"},Jp={key:0,class:"required-row"},Zp={class:"required-price"},Qp={key:2,class:"required-row"},em={class:"required-price"},tm={class:"required-row fw-bolder"},nm={class:"required-price text-17"},om={key:0,class:"auction__tab-content-text auction__tab-required mt-3 mb-0"},sm={class:"m-0"},im={class:"text-muted lh-1"},am={class:"pe-1"},rm={key:0,class:"d-block d-md-inline-block text-muted"},lm={class:"required-price"},cm={key:0},um={key:1},dm={class:"text-center"},hm={class:"mt-3"},fm={key:0,class:"text-red"},_m={class:"pt-4 pb-2 text-center fw-bold"},pm="00000000-0000-0000-0000-000000000000",mm=q({__name:"LaughingSecond",props:{lotId:{type:String,required:!0},amount:{type:Number,required:!0},adminCost:{type:Number,required:!0},shippingCost:{type:Number,required:!1,default:0},bidName:{type:String,required:!0},requiredExternalCosts:{type:Array,required:!1,default:()=>[]},feeWaived:{type:Boolean,default:!1},reducedFee:{type:Object,required:!1,default:null}},setup(n){const e=n,t=Bt(),{currentLot:s}=vt(t),{now:i}=Le(),r=w(3600),l=w(!1),d=w(""),c=w(!1),p=w(!1);let m;oe(()=>{m=setInterval(()=>{r.value>0?r.value--:(clearInterval(m),window.location.reload())},1e3)}),Te(()=>{clearInterval(m)});const g=()=>{clearInterval(m),d.value="",p.value===!1?d.value=f("LaughingSecond_Error"):ae.post(`/lot/${e.lotId}/claim`,{AcceptClaim:!0}).then(B=>{c.value=!1,l.value=!0;const b=i.value??Math.floor(Date.now()/1e3);s.value.bidList.unshift({lotId:e.lotId,userId:pm,displayName:e.bidName,amount:e.amount,createdOn:pi(b),autoBid:null,serverDateTime:b})}).catch(B=>{const b=B.response?.data?.errors;B.response?.status===400&&b?.some($=>$.key==="laughingSecond"&&$.value==="Expired")?d.value=f("LaughingSecond_Expired"):d.value=f("Error_SomethingWentWrong")})},v=E(()=>e.feeWaived?ca(e.adminCost):e.reducedFee?zo(e.reducedFee.originalPrice,e.reducedFee.reducedPrice):null),{adminCosts:y,shippingCosts:T,total:I}=gi({itemsTotal:()=>e.amount,adminCosts:()=>v.value?.newPrice??e.adminCost,shippingCosts:()=>e.shippingCost??0,credit:0}),C=()=>{l.value&&(window.location.href=`/checkout/${e.lotId}`)},A=()=>{window.location.reload()};return(B,b)=>(u(),h(z,null,[l.value?(u(),h("div",xp,[o("p",Ep,_(a(f)("BidBlock_GotIt")),1),o("p",Ap,_(a(f)("BidBlock_TheWinner"))+" "+_(n.bidName)+"!",1),o("div",Lp,[o("button",{class:"btn-n btn-n-pink w-75",onClick:C},[j(_(a(f)("BidBlock_PayAuction"))+" ",1),b[3]||(b[3]=o("i",{class:"fa-regular fa-chevron-right ms-3"}
3,null,-1))]),N(Wo)])])):(u(),h("div",Dp,[o("p",Bp,_(a(f)("LaughingSecond_Title")),1),o("p",Pp,_(a(f)("LaughingSecond_SubTitle")),1),o("p",Up,[o("span",{innerHTML:a(f)("LaughingSecond_TextFormat")},null,8,Mp),b[4]||(b[4]=o("br",null,null,-1)),b[5]||(b[5]=o("br",null,null,-1)),o("small",Np,_(a(f)("LaughingSecond_MailInformation")),1)]),o("div",Rp,[o("div",Op,[o("div",Fp,[o("button",{class:"btn-n btn-n-pink w-100",onClick:b[0]||(b[0]=$=>c.value=!0)},[j(_(a(f)("Common_ViewOffer"))+" ",1),b[6]||(b[6]=o("i",{class:"fa-solid fa-arrow-right","aria-hidden":"true"},null,-1))]),o("button",{class:"btn-n btn-n-border btn-n-gray w-100 mt-3",onClick:A},_(a(f)("LaughingSecond_GoBack")),1)])]),o("div",Vp,[o("a",Hp,[j(_(a(f)("Common_WhatIsLaughingSecond"))+" ",1),b[7]||(b[7]=o("i",{class:"fa-light fa-circle-info"},null,-1))])])])])),c.value?(u(),h("div",{key:2,class:V(["popup",{show:c.value}]),style:{"white-space":"normal"}},[o("div",qp,[o("div",Wp,[o("h2",zp,_(a(f)("LaughingSecond_PopupTitle")),1),o("div",Kp,[o("p",null,_(a(f)("LaughingSecond_PopupText")),1),o("p",{innerHTML:a(f)("LaughingSecond_PopupTerms")},null,8,Gp)]),o("div",jp,[o("div",Xp,[o("p",null,_(a(f)("Common_WinningBid"))+":",1),o("p",Yp,_(a(pe)(e.amount)),1)]),!v.value&&a(y)>0?(u(),h("div",Jp,[o("p",null,_(a(f)("Common_AdminCost"))+":",1),o("p",Zp,_(a(pe)(a(y))),1)])):k("",!0),v.value?(u(),ee(yi,{key:1,promotion:v.value,tag:"div"},null,8,["promotion"])):k("",!0),a(T)>0?(u(),h("div",Qp,[o("p",null,_(a(f)("Checkout_ShippingCost"))+":",1),o("p",em,_(a(pe)(a(T))),1)])):k("",!0),o("div",tm,[o("p",null,_(a(f)("Common_TotalToPay"))+":",1),o("p",nm,_(a(pe)(a(I))),1)])]),e.requiredExternalCosts&&e.requiredExternalCosts.length>0?(u(),h("div",om,[o("p",sm,[o("b",null,_(a(f)("Checkout_RequiredExternalTitle")),1),b[8]||(b[8]=o("br",null,null,-1)),o("small",im,_(a(f)("Checkout_RequiredExternalText")),1)]),(u(!0),h(z,null,Q(e.requiredExternalCosts,$=>(u(),h("div",{key:$.title,class:"required-row"},[o("div",am,[o("p",null,[j(_($.title)+" ",1),$.note?(u(),h("small",rm," ("+_($.note.toLowerCase())+") ",1)):k("",!0)])]),o("p",lm,[$.maxPrice&&$.maxPrice>$.price?(u(),h("span",cm,[o("small",null,_(a(f)("Checkout_RequiredExternalMin")),1),j(" "+_(a(pe)($.price))+" ~ ",1),o("small",null,_(a(f)("Checkout_RequiredExternalMax")),1),j(" "+_(a(pe)($.maxPrice)),1)])):(u(),h("span",um,_(a(pe)($.price)),1))])]))),128))])):k("",!0),o("div",dm,[o("label",hm,[_t(o("input",{"onUpdate:modelValue":b[1]||(b[1]=$=>p.value=$),type:"checkbox",class:"form-check-input cursor-pointer me-2"},null,512),[[js,p.value]]),j(" "+_(a(f)("LaughingSecond_PopupCheck")),1)]),d.value?(u(),h("p",fm,[o("small",null,_(d.value),1)])):k("",!0)]),o("button",{class:"btn-n btn-n-pink w-100 mt-3",onClick:g},_(a(f)("LaughingSecond_PopupClaimFormat").replace("{0}",a(pe)(a(I)))),1),o("div",_m,[o("span",{class:"cursor-pointer",onClick:b[2]||(b[2]=$=>c.value=!1)},_(a(f)("Button_Cancel")),1)])])])],2)):k("",!0)],64))}});function vm(){return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}function gm(n,e){const t=w(0);let s=null,i=!1;const r=()=>{s!==null&&(cancelAnimationFrame(s),s=null)},l=()=>{const d=t.value,c=performance.now(),p=m=>{const g=Math.min((m-c)/e,1);if(t.value=d+(n.value-d)*g,g<1){s=requestAnimationFrame(p);return}s=null,t.value=n.value};s=requestAnimationFrame(p)};return te(n,d=>{if(s!==null)return;const c=i&&d>t.value;if(i=i||d>0,c&&!vm()){l();return}t.value=d},{immediate:!0}),Te(r),E(()=>t.value)}const ym=q({__name:"CountdownExtensionBadge",props:{seconds:{}},emits:["finished"],setup(n,{emit:e}){const t=e;return(s,i)=>(u(),h("span",{class:"countdown-extension-badge","aria-live":"polite",onAnimationend:i[0]||(i[0]=r=>t("finished"))},"+"+_(n.seconds)+"s",33))}}),bm=le(ym,[["__scopeId","data-v-0f5919f8"]]),wm={key:0},km=250,Im=10,Sm=5,Cm=q({__name:"BiddingCountdown",props:{endTime:{},lastExtensionSeconds:{default:null}},setup(n){const e=n,{remainingSeconds:t}=Qt(E(()=>e.endTime)),s=gm(t,km),i=w(null),r=E(()=>Math.floor(s.value)),{units:l,days:d}=en(()=>r.value,{separateDays:!0}),c=E(()=>r.value>Im?"none":r.value>Sm?"warning":"danger");return te(()=>e.endTime,(p,m)=>{p<=m||(i.value=e.lastExtensionSeconds??p-m)}),(p,m)=>(u(),h("div",null,[o("p",{class:V(["auction__countdown-text m-0",{"auction__countdown-text--warning":c.value==="warning","auction__countdown-text--danger":c.value==="danger"}])},[a(d)?(u(),h("span",wm,_(a(d).value)+_(a(f)("Common_DayShort"))+" ",1)):k("",!0),(u(!0),h(z,null,Q(a(l),(g,v)=>(u(),h(z,{key:g.key},[v>0?(u(),h("span",{key:0,class:V({zero:a(l)[v-1].dim}),"aria-hidden":"true"},":",2)):k("",!0),o("span",{class:V([{zero:g.dim},g.key==="seconds"?"auction__countdown-seconds":""])},_(g.padded),3)],64))),128))],2),i.value!==null?(u(),ee(bm,{key:n.endTime,seconds:i.value,onFinished:m[0]||(m[0]=g=>i.value=null)},null,8,["seconds"])):k("",!0)]))}}),$m=le(Cm,[["__scopeId","data-v-adc01e89"]]);function ua(n){const e=E(()=>lt(n)),t=E(()=>e.value?.extensionSeconds??[]),s=E(()=>e.value?.extensionsUsed??0),i=E(()=>t.value.length),r=E(()=>Math.max(0,i.value-s.value)),l=E(()=>r.value>0?t.value[s.value]??null:null),d=E(()=>s.value>0?t.value[s.value-1]??null:null),c=E(()=>l.value??t.value.at(-1)??0);return{extensionsTotal:i,extensionsRemaining:r,nextExtensionSeconds:l,lastExtensionSeconds:d,quotedExtensionSeconds:c}}const Tm={class:"anti-sniper"},xm={class:"anti-sniper__stopwatches"},Em=["innerHTML"],Am=q({__name:"AntiSniperExtensions",props:{antiSniper:{}},setup(n){const e=n,{extensionsTotal:t,extensionsRemaining:s,quotedExtensionSeconds:i}=ua(()=>e.antiSniper),r=E(()=>f("BidBlock_AntiSniperInfo",{windowSeconds:e.antiSniper.windowSeconds,extensionSeconds:i.value,remaining:s.value})),l=E(()=>s.value===0);return(d,c)=>(u(),h("div",Tm,[o("div",xm,[(u(!0),h(z,null,Q(a(t),p=>(u(),h("span",{key:p,class:V(["anti-sniper__stopwatch",{"anti-sniper__stopwatch--spent":p<=n.antiSniper.extensionsUsed}])},[N(a(he),{icon:a(cr),"aria-hidden":"true"},null,8,["icon"])],2))),128))]),o("p",{class:V(["anti-sniper__info",{"anti-sniper__info--hidden":l.value}]),innerHTML:r.value},null,10,Em)]))}}),Lm=le(Am,[["__scopeId","data-v-22311f84"]]);function Dm(n,e){window.lytics?.track("bid",{LotId:n,BidAmount:e.toString()})}const Bm={key:2,class:"newsletter__fields"},Pm={type:"submit",class:"btn-n newsletter__submit"},da=q({__name:"Newsletter",props:{id:{default:"newsletter-email"},placeholder:{default:void 0},submitLabel:{default:void 0}},setup(n){const e=n,t=w(""),s=w(!1),i=w(null),r=gn("emailField");async function l(){if(i.value=null,!!r.value?.validate())try{await ae.post("newsletter/subscribe",{Email:t.value,Popup:!1}),at("newsletter","true",tt(365)),s.value=!0,Er()}catch(d){i.value=d.response?.status===400?f("Newsletter_InvalidEmail"):f("Error_SomethingWentWrong")}}return(d,c)=>(u(),h("form",{class:"newsletter__signup w-100",novalidate:"",onSubmit:ie(l,["prevent"])},[i.value?(u(),ee(zt,{key:0,state:"error",message:i.value,class:"mb-3 newsletter__response"},null,8,["message"])):s.value?(u(),ee(zt,{key:1,state:"success",message:a(f)("Newsletter_SignUpSuccess"),class:"mb-3 newsletter__response"},null,8,["message"])):k("",!0),s.value?k("",!0):(u(),h("div",Bm,[N(ai,{id:e.id,ref_key:"emailField",ref:r,modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=p=>t.value=p),placeholder:e.placeholder??a(f)("Input_Email")},null,8,["id","modelValue","placeholder"]),o("button",Pm,_(e.submitLabel??a(f)("Button_StayInformed")),1)]))],32))}}),Um=q({__name:"ClosingLotTime",props:{endDateTime:{}},setup(n){const e=n,{now:t}=Le(),s=E(()=>{const{endDateTime:i}=e;return i!==null&&t.value!==null?br(i,t.value):""});return(i,r)=>(u(),h("span",null,_(s.value),1))}}),Mm={class:"auction__block-stats lot-facts"},Nm={key:0,class:"lot-fact"},Rm={class:"lot-fact__title"},Om={class:"lot-fact__value"},Fm={key:1,class:"lot-fact"},Vm={class:"lot-fact__title"},Hm={key:2,class:"lot-fact"},qm={class:"lot-fact__title"},Wm={class:"lot-fact__value lot-fact__value--bid-count"},zm=q({__name:"BidBlockStats",props:{currentLot:{default:null},currentBid:{default:0}
3,storeValue:{default:0},bidChange:{type:Boolean,default:!1},advertiser:{default:""}},setup(n){const e=n,t=E(()=>e.currentLot?.bidList.length??0);return(s,i)=>(u(),h("dl",Mm,[n.storeValue>0?(u(),h("div",Nm,[o("dt",Rm,_(a(f)("Bidblock_AdvertiserPrice")),1),o("dd",Om,_(a(De)(n.storeValue)),1)])):k("",!0),n.currentLot?(u(),h("div",Fm,[o("dt",Vm,_(a(f)("BidBlock_CurrentBid")),1),o("dd",{class:V(["lot-fact__value lot-fact__value--current-bid",{trigger:n.bidChange}])},_(a(De)(n.currentBid)),3)])):k("",!0),n.currentLot?(u(),h("div",Hm,[o("dt",qm,_(a(f)("BidBlock_Bids")),1),o("dd",Wm,_(t.value),1)])):k("",!0)]))}}),Km=le(zm,[["__scopeId","data-v-29b52bf8"]]),Gm=5,jm=5,Xm=2,mn="lotReminders",vo="open-alarm-sheet",Ot=w(!1);function ha(n){const e=Bt(),{currentLot:t}=vt(e),s=encodeURIComponent(window.location.pathname),i=w(!1),{now:r}=Le(),l=E(()=>r.value===null?null:ls(r.value)),d=E(()=>t.value?.endDateTime??null),c=E(()=>ls(t.value?.endDateTime??0)),p=E(()=>cs(c.value,jm)),m=E(()=>{const S=l.value;return S===null||d.value===null?null:us(p.value,S)}),g=E(()=>pt(cs(c.value,Xm)));function v(S){const x=l.value;return x===null||us(S.closingTime,x)}function y(){return Re.readJson(mn,[]).filter(v)}function T(){const S=Re.readJson(mn,[]),x=S.filter(v);x.length!==S.length&&Re.writeJson(mn,x)}function I(){T();const S=t.value;if(S){const x=y();Ot.value=x.some(R=>R.lotId===S.lotId)}}const C=E(()=>lt(n.authenticated)?lt(n.available)?!t.value?.endDateTime||m.value===!1?"Alarm_Disabled_TooLate":y().length>=Gm?"Alarm_Disabled_MaxReminders":null:"Alarm_Disabled_NoPhone":"Alarm_Disabled_NotLoggedIn"),A=E(()=>lt(n.authenticated)?lt(n.available)?null:"Alarm_Disabled_NoPhone":"Alarm_Disabled_NotLoggedIn"),B=E(()=>C.value===null),b=E(()=>lt(n.authenticated)&&lt(n.available)&&!!t.value&&(B.value||Ot.value)),$=E(()=>Ot.value?!1:m.value===!0);function D(){document.dispatchEvent(new CustomEvent(vo,{detail:{handled:!1}}))}async function L(){const S=t.value;if(S?.lotId){i.value=!1;try{await ae.post(`lot/${S.lotId}/reminder`);const x=y();if(!x.some(R=>R.lotId===S.lotId)){const R={lotId:S.lotId,closingTime:c.value.toISOString()};x.push(R),Re.writeJson(mn,x)}Ot.value=!0}catch{i.value=!0}}}return oe(()=>{I()}),te(d,S=>{S!==null&&I()}),{currentLot:t,lotEndDate:c,reminderIsActivated:Ot,reminderTimeFormatted:g,returnUrl:s,error:i,disabledReason:C,actionableDisabledReason:A,canSetAlarm:B,isAlarmAvailable:b,showBanner:$,openAlarmSheet:D,setAlarm:L}}const Ym={key:0,class:"alarm-inline"},Jm=["href"],Zm=["href"],Qm={key:1,class:"alarm-inline alarm-inline--ok"},ev={class:"alarm-inline__text"},fa=q({__name:"AlarmBanner",props:{enabled:{type:Boolean},authenticated:{type:Boolean}},setup(n){const e=n,{reminderIsActivated:t,returnUrl:s,showBanner:i,canSetAlarm:r,actionableDisabledReason:l,openAlarmSheet:d}=ha({authenticated:()=>e.authenticated,available:()=>e.enabled}),c=window.urls.fullRegistration;return(p,m)=>a(i)&&(a(r)||a(l))?(u(),h("span",Ym,[m[4]||(m[4]=o("span",{class:"alarm-inline__sep"},"·",-1)),a(r)?(u(),h("button",{key:0,type:"button",class:"alarm-inline__action",onClick:m[0]||(m[0]=ie((...g)=>a(d)&&a(d)(...g),["stop"]))},[m[1]||(m[1]=o("svg",{class:"alarm-inline__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),o("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})],-1)),j(" "+_(a(f)("AlarmBanner_SetAlarm")),1)])):e.authenticated?e.enabled?k("",!0):(u(),h("a",{key:2,href:`${a(c)}?returnUrl=${a(s)}`,class:"alarm-inline__action"},[m[3]||(m[3]=o("svg",{class:"alarm-inline__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),o("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})],-1)),j(" "+_(a(f)("AlarmBanner_SetAlarm")),1)],8,Zm)):(u(),h("a",{key:1,href:"/login?returnUrl="+a(s),class:"alarm-inline__action"},[m[2]||(m[2]=o("svg",{class:"alarm-inline__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),o("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})],-1)),j(" "+_(a(f)("AlarmBanner_SetAlarm")),1)],8,Jm))])):a(t)?(u(),h("span",Qm,[m[5]||(m[5]=o("span",{class:"alarm-inline__sep"},"·",-1)),m[6]||(m[6]=o("svg",{class:"alarm-inline__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[o("polyline",{points:"20 6 9 17 4 12"})],-1)),o("span",ev,_(a(f)("AlarmBanner_Activated")),1)])):k("",!0)}}),tv={class:"naf-bid-header"},nv={class:"naf-bid-header__title"},ov={class:"naf-bid-header__savings"},As=q({__name:"NoAdminFeeBidHeader",props:{savings:{}},setup(n){const e=n,t=E(()=>f("NoAdminFeeWindow_BannerSavingsShort",{amount:pe(e.savings)}));return(s,i)=>(u(),h("div",tv,[i[0]||(i[0]=o("span",{class:"naf-bid-header__flash","aria-hidden":"true"},[o("span",{class:"naf-bid-header__flash-icon"})],-1)),o("span",nv,_(a(f)("NoAdminFeeWindow_BannerTitle")),1),i[1]||(i[1]=o("span",{class:"naf-bid-header__divider","aria-hidden":"true"},null,-1)),o("span",ov,_(t.value),1)]))}});function sv(n){const e=E(()=>n.value===null?null:st(n.value.activeUntil)),t=E(()=>n.value===null?null:st(n.value.serverDateTime)),{remainingSeconds:s}=Qt(e,t),i=E(()=>n.value!==null&&s.value>0);return te(i,(r,l)=>{l&&!r&&Ae(Oi)}),{isActive:i,remainingSeconds:s}}class iv{async checkAsync(e){return await ae.get(`/lot/${e}/bid-eligibility`)}}const av=new iv,rv={class:"auction__block"},lv={class:"auction__body"},cv={class:"px-3"},uv={class:"text-pink fw-bold text-21 my-0"},dv={class:"mb-0 mt-3"},hv={key:2,class:"auction__block-loading"},fv={key:3,class:"auction__block-loading"},_v={class:"auction-connection-lost"},pv={class:"mt-4 title"},mv={key:4},vv={class:"auction__block bidblock-stack"},gv={key:0,class:"auction__block-header bidblock-timing"},yv={class:"auction__countdown"},bv={key:1,class:"my-4"},wv={class:"text-21 mt-2 mb-2"},kv={key:2,class:"auction__body"},Iv={key:0,class:"alert-n info mb-3"},Sv={class:"m-0"},Cv={key:1},$v={key:0},Tv={class:"alert-n warning mb-3"},xv={class:"m-0"},Ev=["href"],Av={key:1,href:"/myauctions/wonauctions",class:"btn-n"},Lv={key:1,class:"d-flex flex-column bidblock-bid-stack"},Dv={class:"auction__bid-input control is-expanded"},Bv=["innerHTML"],Pv={key:1,class:"auction__bid-error-holder"},Uv={key:2,class:"auction__bid-error-holder"},Mv=["innerHTML"],Nv={key:4,class:"field is-grouped auction__quick-bid justify-content-between auction__quick-bid--visible"},Rv={key:5,class:"sepa-verified"},Ov={class:"sepa-verified__text"},Fv={class:"sepa-verified__title m-0"},Vv={class:"sepa-verified__subtitle m-0"},Hv={key:2},qv=["href"],Wv={key:3},zv={class:"text-error text-14"},Kv=["href"],Gv={key:4,class:"auction__block__buttons"},jv=["href"],Xv=["href"],Yv={key:3,class:"auction__body"},Jv={key:0,class:"bidblock-win"},Zv={class:"bidblock-win__text"},Qv={class:"bidblock-win__title"},eg={class:"bidblock-win__subtitle"},tg={class:"bidblock-claim bidblock-claim--winner"},ng={class:"bidblock-claim__card"}
3,og={class:"bidblock-claim__row bidblock-claim__row--winning-bid"},sg={key:0,class:"bidblock-claim__row"},ig={key:2,class:"bidblock-claim__row"},ag={class:"bidblock-claim__row bidblock-claim__row--total"},rg={key:0,class:"bidblock-claim__card"},lg={class:"bidblock-claim__header"},cg={class:"bidblock-claim__subtext"},ug={class:"bidblock-claim__cost-name"},dg={key:0,class:"bidblock-claim__cost-detail"},hg={key:0},fg={key:1},_g={key:0,class:"text-muted my-2 px-2",style:{"font-size":"0.75rem"}},pg={key:1,class:"alert alert-danger py-2 px-3 mx-2 mb-2",style:{"font-size":"0.85rem"}},mg={class:"auction-button-holder mt-2 mb-2"},vg=["disabled"],gg={key:0,class:"spinner-border spinner-border-sm me-2"},yg={key:1},bg={key:2,class:"bidblock-loss"},wg={class:"bidblock-loss__title"},kg={key:0,class:"bidblock-loss__winner"},Ig={key:1},Sg={key:0,class:"bidblock-loss__winner"},Cg={key:1,class:"bidblock-loss__winner"},$g={class:"bidblock-loss__receipt"},Tg={key:0,class:"bidblock-loss__receipt-row"},xg={class:"bidblock-loss__price-old"},Eg={class:"bidblock-loss__receipt-row"},Ag={class:"bidblock-loss__price-won"},Lg={class:"bidblock-loss__actions"},Dg={class:"bidblock-loss__timer"},Bg={key:2,class:"bidblock-loss__last"},Pg=["href"],Ug={key:4,class:"auction__body"},Mg={class:"fw-bold text-21 text-blue my-3"},Ng={key:0,class:"mt-3"},Rg={class:"alert-n info mb-3"},Og={class:"m-0"},Fg=["href"],Vg={class:"auction__bids"},Hg={key:2,class:"d-flex align-items-center w-100 mt-4 ps-3"},qg={class:"fw-bold m-0"},Wg={class:"form-check form-switch ms-auto"},zg=15e3,Kg=2500,Ls=4,Ds=1e3,Gg=5e3,jg=1e4,Xg=6e4,Yg=500,Jg=5e3,Zg=4,Qg=12,e1=13,t1=8e3,n1=q({__name:"BidBlock",props:{auctionId:{type:String,required:!0},lotId:{type:String,required:!1},storeValue:Number,shippingCost:{type:Number,required:!1},initialTime:Number,buyPrice:Number,enableDirectBuy:Boolean,isAuthenticated:{type:Boolean,default:!1},hasPhoneConfirmed:{type:Boolean,default:!1},requiresSepa:{type:Boolean,default:!1},hasSepaMandate:{type:Boolean,default:!1},userId:{type:String,required:!1},bidName:{type:String,required:!1},advertiser:{type:String,required:!1},requiredExternalCosts:{type:Array,required:!1,default:()=>[]},adminCost:{type:Number,required:!0},isAdminFeeWaived:{type:Boolean,default:!1},waivedFee:{type:Object,required:!1,default:null},reducedFee:{type:Object,required:!1,default:null},antiSniper:{type:Object,required:!1,default:null}},setup(n){const e=n,t=Bt(),{minBid:s,maxBid:i,currentBid:r,currentLot:l,currentLotClosed:d,currentLotEnding:c}=vt(t),p=w(null),m=E(()=>p.value?.$el??null),{isPast:g}=Io(m,Fo),v=E(()=>e.isAdminFeeWaived?e.waivedFee:null),{isActive:y,remainingSeconds:T}=sv(v),{now:I}=Le(e.initialTime);rp(E(()=>l.value?.endDateTime??null),()=>De(r.value));let C=null,A=0,B=null,b=null,$=null,D=!1;const{subscribe:L}=Dt(),{onConnected:S,socketConnection:x,placeBid:R,leaveLotDetail:F}=ot(),Y=window.location.pathname,G=window.urls.fullRegistration,P=w(e.lotId),H=w(void 0),U=w(e.userId),W=w(!1),J=w(!1),ue=w(!1),Ie=w(!1),be=w(""),we=w(!1),Ge=w(!0),Fe=w(!1),qe=w(!1),je=w(!1),fe=w(!1),Z=w(!1),ne=w(0),re=w(!1),ke=w(),ve=w(!1),_e=w(0),Xe=w(!1),Fn=w(!1),tn=w(!1),rt=w(!1),gt=w(e.antiSniper),{lastExtensionSeconds:Aa}=ua(gt),Pt=w(!1),Go=E(()=>!(!e.isAuthenticated||!e.hasPhoneConfirmed||e.requiresSepa&&!e.hasSepaMandate));oe(()=>{t.setAuctionId(e.auctionId),L(Di,()=>{Xe.value=!0}),L(Et,X=>{X.lotId===Ut&&(Ut=null,Da(X))}),L(Ui,X=>{X===Ut&&(Ut=null,Vn(),Hn())}),La()}),Pe(()=>{C&&(clearInterval(C),C=null),Ye&&(clearTimeout(Ye),Ye=null),D=!0,B&&(clearTimeout(B),B=null),b&&(clearInterval(b),b=null),$&&(clearTimeout($),$=null)});const La=()=>{S(()=>{Xe.value=!1,P.value&&P.value.length!==0?jo(P.value):Hn()})};let Ut=null,Ye=null;const Vn=()=>{Ye&&(clearTimeout(Ye),Ye=null)},jo=X=>{Ut=X,Vn(),Ye=setTimeout(()=>{Ye=null,Hn()},t1),Ao(X)?.catch(O=>{console.error("Failed to join lot",O)})},Xo=()=>{if(!x.value){S();return}if(!Ye){if(A>=Ls){Yo();return}A++,lp(e.auctionId).then(X=>jo(X.lotId)).catch(()=>Yo())}},Hn=()=>{C||(C=setInterval(Xo,Kg),Xo())},Da=X=>{if(C&&(clearInterval(C),C=null),Vn(),A=0,Fe.value=!1,window.auction&&X.lotId&&X.lotId!==window.auction.lot_id){const O=X.startDateTime.getTime(),se=X.endDateTime;window.auction.lot_id=X.lotId,window.auction.lot_start_date=O?new Date(O).toISOString():"",window.auction.lot_start_time=O?Date.now()-O:0,window.auction.lot_tx_expires=se?pi(se).toISOString():"",Ar()}P.value=X.lotId,gt.value=X.antiSniper,t.updateLot(X),tn.value=l.value?.bidList?.some(O=>O.userId===U.value)??!1,Ge.value=!1,setTimeout(()=>{Jo()},500),e.isAuthenticated&&Ba(X.lotId)},Ba=async X=>{try{const O=await av.checkAsync(X),{eligible:se,errors:Je}=O.data.data;if(!se&&Je.length>0){const Ze=Je[0];ue.value=!0,Ie.value=Ze.code===e1,be.value=Ze.description,J.value=!!Ze.requiresPayment}}catch{}},Yo=()=>{A>=Ls&&(C&&(clearInterval(C),C=null),Fe.value=!0)},Jo=()=>{Fn.value=!0,setTimeout(()=>{Fn.value=!1},300)},qn=async()=>
3{if(Pa()===!1)W.value=!0;else{const X=await Ua(H.value);if(X.success===!1)re.value=!0,ke.value=X.message;else{const O=Number(H.value),se={...window.auction,price:ds(O),quantity:1,lot_type:"default"},Je=`${P.value}_${U.value}_${O}`;hs(),window.dataLayer.push({event:"bid_place",store:"regular",lot_id:P.value,bid_id:Je,bid_value:O,ecommerce:{items:[se]}}),sr(P.value??"",se?.item_name??e.auctionId),Dm(P.value??"",O),H.value=void 0}}},Pa=()=>Number(H.value)>=s.value&&Number(H.value)<=i.value,Ua=async X=>{if(!P.value||!X)return{success:!1,message:f("Error_SomethingWentWrong")};const O=Number(X);if(!Number.isFinite(O))return{success:!1,message:f("Error_SomethingWentWrong")};const se=await R(P.value,O);return se===null?{success:!1,message:f("Error_SomethingWentWrong")}:{success:se.succeeded,message:se.errors[0]?.description||f("Error_SomethingWentWrong")}},Zo=()=>{window.location.reload()},nn=w(!1),Ma=async()=>{if(!Pt.value){Pt.value=!0,nn.value=!1;try{if(e.requiresSepa){window.location.href=`/checkout/${P.value}`;return}const X=await bi.confirmOrderAsync(P.value??"");if(X.status===200){const O=X.data?.data;O&&ol(O,"detail"),window.location.href=`/checkout/${P.value}`}else nn.value=!0}catch(X){console.error("Failed to confirm order:",X),nn.value=!0}finally{Pt.value=!1}}},Mt=E(()=>l.value?.bidList&&l.value.bidList.length>0?l.value.bidList[0].amount:r.value),on=E(()=>fe.value?ca(e.adminCost):e.reducedFee?zo(e.reducedFee.originalPrice,e.reducedFee.reducedPrice):null),{adminCosts:Qo,shippingCosts:es,total:Na}=gi({itemsTotal:Mt,adminCosts:()=>on.value?.newPrice??e.adminCost,shippingCosts:()=>e.shippingCost??0,credit:0}),Wn=E(()=>{if(!e.storeValue||e.storeValue<=0||!r.value)return 0;const X=Math.round((e.storeValue-r.value)/e.storeValue*100);return Math.max(0,Math.min(X,100))}),sn=X=>{H.value=X.toString(),we.value&&qn()},Se=E(()=>{if(!l.value)return"INITIALIZING";const X=l.value.endDateTime;if(I.value!=null&&X!=null){if(!d.value&&I.value<X)return"BIDDING";if(c.value)return"ENDING";if(I.value>=X+ra&&je.value)return"SHOWWINRAR"}return"CLOSED"}),an=E(()=>(Se.value==="SHOWWINRAR"||Se.value==="CLOSED")&&je.value&&l.value.bidList.length>0?l.value.bidList[0].displayName:"onbekend"),rn=E(()=>an.value!==""&&l.value.bidList.length>0&&l.value.bidList[0].userId===U.value);function zn(X,O){return E(()=>{const se=r.value,Je=s.value,Ze=Math.ceil(se*(1+X)),dn=se+O;let Kn=Math.max(Ze,dn);return Kn=Math.max(Kn,Je,se+1),Kn})}const ts=E(()=>Math.max(s.value,r.value+1)),ln=zn(.1,2),cn=zn(.2,3),un=zn(.3,5),Ra=E(()=>H.value?Number(H.value)<s.value?f("Bidblock_Error_BidTooLow",{0:s.value}):Number(H.value)>i.value?f("Bidblock_Error_BidTooHigh",{0:i.value}):f("Bidblock_Error_NoValidBid"):f("Bidblock_Error_NoValidBid")),Oa=E(()=>Go.value&&!Fe.value&&!ue.value&&!!l.value&&(Se.value==="BIDDING"||Se.value==="ENDING"));te(H,()=>{W.value=!1,Z.value=!1,re.value=!1}),L(xt,X=>{P.value===X.lotId&&(l.value.bidList.unshift(X),Jo(),!tn.value&&X.userId===U.value&&(tn.value=!0))}),L(Bn,X=>{if(X.lotId===P.value){const O=Yu(gt.value,X.antiSniper);O!==null&&(gt.value=O)}t.extendLot(X.lotId,X.endDateTime)}),L(At,X=>{if(P.value===X.lotId){if(qe.value=X.next!==null,l.value.bidList=[...X.bidList].sort((O,se)=>O.amount!==se.amount?se.amount-O.amount:O.autoBid===null?1:se.autoBid===null?-1:se.autoBid-O.autoBid),je.value=!0,t.closeLot(X.lotId),fe.value=X.adminFeeWaived===!0,P.value&&F(P.value),rn.value){const O={...window.auction,price:ds(Mt.value),quantity:1,lot_type:"default"};hs(),window.dataLayer.push({event:"bid_won",store:"regular",lot_id:P.value,bid_id:`${P.value}_${U.value}_${Mt.value}`,bid_value:Mt.value,ecommerce:{items:[O]}})}if(!rn.value&&!ve.value){const O=Date.now();qe.value?ns(O):X.auctionRunning===!0&&Ha(O)}}});const ns=X=>{if($)return;const O=Math.max(zg-(Date.now()-X),Jg);$=setTimeout(()=>{Zo()},O),Fa(O)},Fa=X=>{_e.value=Math.ceil(X/1e3),b=setInterval(()=>{_e.value-=1,_e.value<=0&&(clearInterval(b),b=null)},1e3)},Va=async()=>{try{const X=await cp(e.auctionId);return X&&X!==P.value?X:null}catch{return null}},Ha=X=>{if(rt.value)return;rt.value=!0;const O=()=>rn.value||ve.value,se=Ze=>Ze+Math.random()*Yg,Je=async()=>
3{if(B=null,O()){rt.value=!1;return}const Ze=await Va();if(D)return;if(O()){rt.value=!1;return}if(Ze){rt.value=!1,qe.value=!0,ns(X);return}const dn=Date.now()-X;if(dn>=Xg){rt.value=!1;return}B=setTimeout(Je,se(dn<jg?Ds:Gg))};B=setTimeout(Je,se(Ds))};return L(Pi,X=>{const O=X.errors[0];(O?.code===Zg||O?.code===Qg)&&(ue.value=!0,be.value=O.description,J.value=O.requiresPayment)}),L(Mi,X=>{P.value===X.lotId&&(ve.value=!0,Lr())}),(X,O)=>(u(),h(z,null,[Fe.value?(u(),h("div",{key:0,class:V(["auction__block-wrapper pb-1",{"auction__block-wrapper--naf":a(y)}])},[a(y)?(u(),ee(As,{key:0,ref_key:"bidHeader",ref:p,savings:n.waivedFee?.savings??0},null,8,["savings"])):k("",!0),o("div",{class:V(["closing-text fw-bold text-black",{"closing-text--naf":a(y)}])},_(a(f)("BidBlock_AuctionClosed")),3),o("div",rv,[o("div",lv,[o("div",cv,[o("p",uv,_(a(f)("BidBlock_DontMissIt")),1),o("p",dv,_(a(f)("BidBlock_Subscribe")),1)]),O[8]||(O[8]=o("hr",null,null,-1)),N(da)])])],2)):(u(),h("div",{key:1,class:V(["auction__block-wrapper mb-1",{"auction__block-wrapper--naf":a(y)}])},[a(y)?(u(),ee(As,{key:0,ref_key:"bidHeader",ref:p,savings:n.waivedFee?.savings??0},null,8,["savings"])):k("",!0),a(l)&&(Se.value==="INITIALIZING"||Se.value==="BIDDING"||Se.value==="ENDING")?(u(),h("div",{key:1,class:V(["closing-text",{"closing-text--naf":a(y)}])},[N(Um,{"end-date-time":a(l)?.endDateTime??null},null,8,["end-date-time"]),N(fa,{authenticated:n.isAuthenticated,enabled:n.isAuthenticated&&n.hasPhoneConfirmed,class:"d-inline"},null,8,["authenticated","enabled"])],2)):k("",!0),Ge.value===!0?(u(),h("div",hv,[...O[9]||(O[9]=[o("p",{class:"is-loading"},null,-1)])])):Xe.value===!0?(u(),h("div",fv,[o("div",_v,[O[10]||(O[10]=o("i",{class:"fa-solid fa-triangle-exclamation text-danger"},null,-1)),o("h6",pv,_(a(f)("Error_NoInternet")),1)])])):(u(),h("div",mv,[o("div",vv,[Se.value!=="SHOWWINRAR"?(u(),h("div",gv,[_t(o("div",yv,[a(l)?(u(),ee($m,{key:0,"end-time":a(l).endDateTime,"last-extension-seconds":a(Aa)},null,8,["end-time","last-extension-seconds"])):k("",!0)],512),[[Xs,Se.value!=="CLOSED"]]),gt.value&&Se.value!=="CLOSED"?(u(),ee(Lm,{key:0,"anti-sniper":gt.value},null,8,["anti-sniper"])):k("",!0),Se.value==="CLOSED"?(u(),h("div",bv,[O[11]||(O[11]=o("div",{class:"dots-loader"},[o("div"),o("div"),o("div"),o("div"),o("div")],-1)),o("p",wv,_(a(f)("BidBlock_AndTheWinnerIs")),1)])):k("",!0)])):k("",!0),Se.value==="INITIALIZING"||Se.value==="BIDDING"||Se.value==="ENDING"||Se.value==="CLOSED"?(u(),ee(Km,{key:1,"current-bid":a(r),"store-value":n.storeValue,"current-lot":a(l),"bid-change":Fn.value,advertiser:n.advertiser},null,8,["current-bid","store-value","current-lot","bid-change","advertiser"])):k("",!0),Se.value==="BIDDING"||Se.value==="INITIALIZING"||Se.value==="ENDING"?(u(),h("div",kv,[e.isAuthenticated&&e.hasPhoneConfirmed&&e.requiresSepa&&!e.hasSepaMandate?(u(),h("div",Iv,[o("p",Sv,_(a(f)("BidBlock_SepaInfo")),1)])):k("",!0),Go.value?(u(),h("div",Cv,[ue.value?(u(),h("div",$v,[o("div",Tv,[O[12]||(O[12]=o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24",class:"icon-error me-3"},[o("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})],-1)),o("p",xv,_(be.value),1)]),Ie.value?(u(),h("a",{key:0,href:"/sepa/mandate?returnUrl="+a(Y),class:"btn-n btn-n-pink ms-4 me-4"},[j(_(a(f)("BidBlock_ActivateSepa"))+" ",1),O[13]||(O[13]=o("i",{class:"far fa-chevron-right ms-3"},null,-1))],8,Ev)):J.value?(u(),h("a",Av,[j(_(a(f)("Button_GoPayment"))+" ",1),O[14]||(O[14]=o("i",{class:"fa-regular fa-chevron-right ms-3"},null,-1))])):k("",!0)])):(u(),h("div",Lv,[o("div",Dv,[N(Cp,{modelValue:H.value,"onUpdate:modelValue":O[0]||(O[0]=se=>H.value=se),label:a(f)("BidBlock_Input"),"show-error":W.value,prefix:"€","hide-success":"","hide-error-text":"",onKeydownEnter:qn},null,8,["modelValue","label","show-error"]),o("button",{id:"bid-submit",class:V(["btn-n",[we.value?"btn-n-border btn-n-pink":"btn-n-pink"]]),onClick:ie(qn,["prevent"])},_(a(f)("BidBlock_BidButton")),3)]),W.value?(u(),h("div",{key:0,class:"text-error text-14",innerHTML:Ra.value},null,8,Bv)):k("",!0),Z.value?(u(),h("div",Pv,[o("button",{class:"delete btn btn-text btn-sm",onClick:O[1]||(O[1]=se=>Z.value=!1)},[...O[15]||(O[15]=[o("i",{class:"fa-solid fa-circle-xmark"},null,-1)])]),O[16]||(O[16]=j(" Je autobod van ",-1)),o("strong",null,_(a(De)(ne.value)),1),O[17]||(O[17]=j(" is geplaatst ",-1))])):k("",!0),re.value?(u(),h("div",Uv,[o("button",{class:"delete btn btn-text btn-sm",onClick:O[2]||(O[2]=se=>re.value=!1)},[...O[18]||(O[18]=[o("i",{class:"fa-solid fa-circle-xmark"},null,-1)])]),o("span",{innerHTML:ke.value},null,8,Mv)])):k("",!0),a(l)!==null?(u(),h("div",{key:3,class:V(["d-flex flex-row align-self-center auction__quick-bid",{"auction__quick-bid--visible":!0}])},[o("button",{id:"bid-suggested-1",class:V(["suggested-btn",{fill:we.value}]),onClick:O[3]||(O[3]=se=>sn(ts.value))},_(a(De)(ts.value)),3),a(ln)<a(i)&&a(ln)<(n.storeValue??0)?(u(),h("button",{key:0,id:"bid-suggested-2",class:V(["suggested-btn",{fill:we.value}]),onClick:O[4]||(O[4]=se=>sn(a(ln)))},_(a(De)(a(ln))),3)):k("",!0),a(cn)<a(i)&&a(cn)<(n.storeValue??0)?(u(),h("button",{key:1,id:"bid-suggested-3",class:V(["suggested-btn",{fill:we.value}
3]),onClick:O[5]||(O[5]=se=>sn(a(cn)))},_(a(De)(a(cn))),3)):k("",!0),a(un)<a(i)&&a(un)<(n.storeValue??0)?(u(),h("button",{key:2,id:"bid-suggested-4",class:V(["suggested-btn",{fill:we.value}]),onClick:O[6]||(O[6]=se=>sn(a(un)))},_(a(De)(a(un))),3)):k("",!0)])):(u(),h("div",Nv,[...O[19]||(O[19]=[et('<p class="control" data-v-155cbb96><button class="btn auction__fill-bid btn-outline-primary" data-v-155cbb96>€  </button></p><p class="control" data-v-155cbb96><button class="btn auction__fill-bid btn-outline-primary" data-v-155cbb96>€  </button></p><p class="control" data-v-155cbb96><button class="btn auction__fill-bid btn-outline-primary" data-v-155cbb96>€  </button></p>',3)])])),e.requiresSepa&&e.hasSepaMandate?(u(),h("div",Rv,[O[20]||(O[20]=o("svg",{class:"sepa-verified__icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("circle",{cx:"12",cy:"12",r:"11",stroke:"#2e9e73","stroke-width":"2",fill:"none"}),o("path",{d:"M7 12.5l3 3 7-7",stroke:"#2e9e73","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"})],-1)),o("div",Ov,[o("p",Fv,_(a(f)("BidBlock_SepaVerified")),1),o("p",Vv,_(a(f)("BidBlock_SepaVerifiedSubtext")),1)])])):k("",!0)]))])):e.isAuthenticated===!0&&e.hasPhoneConfirmed&&e.requiresSepa&&!e.hasSepaMandate?(u(),h("div",Hv,[o("a",{href:"/sepa/mandate?returnUrl="+a(Y),class:"btn-n btn-n-pink ms-4 me-4"},[j(_(a(f)("BidBlock_ActivateSepa"))+" ",1),O[21]||(O[21]=o("i",{class:"far fa-chevron-right ms-3"},null,-1))],8,qv)])):e.isAuthenticated===!0?(u(),h("div",Wv,[o("p",zv,_(a(f)("BidBlock_MoreInformation")),1),o("a",{href:`${a(G)}?returnUrl=${a(Y)}`,class:"btn-n btn-n-pink ms-4 me-4"},[j(_(a(f)("Button_FillInformation"))+" ",1),O[22]||(O[22]=o("i",{class:"fa-regular fa-chevron-right ms-3"},null,-1))],8,Kv)])):(u(),h("div",Gv,[o("a",{href:"/login?returnUrl="+a(Y),class:"auction__block__login"},[j(_(a(f)("Button_LoginAndBid"))+" ",1),O[23]||(O[23]=o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"ArrowForwardIcon"},[o("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"})],-1))],8,jv),o("a",{href:"/login?returnUrl="+a(Y),class:"auction__block__register"},[j(_(a(f)("Button_NoAccount"))+" ",1),O[24]||(O[24]=o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"ArrowForwardIcon"},[o("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"})],-1))],8,Xv)]))])):Se.value==="SHOWWINRAR"&&je.value?(u(),h("div",Yv,[rn.value?(u(),h("div",Jv,[O[26]||(O[26]=et('<div class="bidblock-win__trophy" data-v-155cbb96><svg viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-155cbb96><path d="M48 8H52C54.2091 8 56 9.79086 56 12V16C56 22.6274 50.6274 28 44 28H43.28C41.7963 32.6832 38.1435 36.3926 33.5 37.9V44H40C41.1046 44 42 44.8954 42 46V52H22V46C22 44.8954 22.8954 44 24 44H30.5V37.9C25.8565 36.3926 22.2037 32.6832 20.72 28H20C13.3726 28 8 22.6274 8 16V12C8 9.79086 9.79086 8 12 8H16V6C16 4.89543 16.8954 4 18 4H46C47.1046 4 48 4.89543 48 6V8Z" fill="url(#trophy-gradient)" data-v-155cbb96></path><path d="M16 12H12V16C12 20.4183 15.5817 24 20 24H20.416C20.1466 22.7196 20 21.3781 20 20V12H16Z" fill="url(#trophy-side)" data-v-155cbb96></path><path d="M48 12V20C48 21.3781 47.8534 22.7196 47.584 24H48C52.4183 24 56 20.4183 56 16V12H48Z" fill="url(#trophy-side)" data-v-155cbb96></path><path d="M26 56C26 54.8954 26.8954 54 28 54H36C37.1046 54 38 54.8954 38 56V60H26V56Z" fill="url(#trophy-base)" data-v-155cbb96></path><defs data-v-155cbb96><linearGradient id="trophy-gradient" x1="32" y1="4" x2="32" y2="52" gradientUnits="userSpaceOnUse" data-v-155cbb96><stop stop-color="#FFD93D" data-v-155cbb96></stop><stop offset="0.5" stop-color="#F5B800" data-v-155cbb96></stop><stop offset="1" stop-color="#E5A000" data-v-155cbb96></stop></linearGradient><linearGradient id="trophy-side" x1="16" y1="12" x2="16" y2="24" gradientUnits="userSpaceOnUse" data-v-155cbb96><stop stop-color="#FFEC80" data-v-155cbb96></stop><stop offset="1" stop-color="#D4A000" data-v-155cbb96></stop></linearGradient><linearGradient id="trophy-base" x1="32" y1="54" x2="32" y2="60" gradientUnits="userSpaceOnUse" data-v-155cbb96><stop stop-color="#8B7355" data-v-155cbb96></stop><stop offset="1" stop-color="#6B5344" data-v-155cbb96></stop></linearGradient></defs></svg><div class="bidblock-win__sparkle bidblock-win__sparkle--1" data-v-155cbb96></div><div class="bidblock-win__sparkle bidblock-win__sparkle--2" data-v-155cbb96></div><div class="bidblock-win__sparkle bidblock-win__sparkle--3" data-v-155cbb96></div><div class="bidblock-win__sparkle bidblock-win__sparkle--4" data-v-155cbb96></div><div class="bidblock-win__sparkle bidblock-win__sparkle--5" data-v-155cbb96></div><div class="bidblock-win__sparkle bidblock-win__sparkle--6" data-v-155cbb96></div></div>',1)),o("div",Zv,[o("h2",Qv,_(a(f)("BidBlock_GotIt")),1),o("p",eg,_(a(f)("BidBlock_TheWinner"))+" "+_(an.value)+"!",1)]),o("div",tg,[o("div",ng,[o("div",og,[o("span",null,_(a(f)("Common_WinningBid"))+":",1),o("span",null,_(a(pe)(Mt.value)),1)]),!on.value&&a(Qo)>0?(u(),h("div",sg,[o("span",null,_(a(f)("Common_AdminCost"))+":",1),o("span",null,_(a(pe)(a(Qo))),1)])):k("",!0),on.value?(u(),ee(yi,{key:1,promotion:on.value,tag:"div"},null,8,["promotion"])):k("",!0),a(es)>0?(u(),h("div",ig,[o("span",null,_(a(f)("Checkout_ShippingCost"))+":",1),o("span",null,_(a(pe)(a(es))),1)])):k("",!0),o("div",ag,[o("span",null,_(a(f)("Common_TotalToPay"))+":",1),o("span",null,_(a(pe)(a(Na))),1)])]),n.requiredExternalCosts.length>0?(u(),h("div",rg,[o("div",lg,_(a(f)("Checkout_RequiredExternalTitle")),1),o("div",cg,_(a(f)("Checkout_RequiredExternalText")),1),(u(!0),h(z,null,Q(n.requiredExternalCosts,se=>(u(),h("div",{key:se.title,class:"bidblock-claim__row"}
3,[o("div",ug,[o("span",null,_(se.title),1),se.note?(u(),h("span",dg,_(se.note),1)):k("",!0)]),se.maxPrice?(u(),h("span",hg,[o("small",null,_(a(f)("Checkout_RequiredExternalMin")),1),j(" "+_(a(pe)(se.price))+" ~ ",1),o("small",null,_(a(f)("Checkout_RequiredExternalMax")),1),j(" "+_(a(pe)(se.maxPrice)),1)])):(u(),h("span",fg,_(a(pe)(se.price)),1))]))),128))])):k("",!0)]),e.requiresSepa?k("",!0):(u(),h("p",_g,_(a(f)("BidBlock_ClaimDisclaimer")),1)),nn.value?(u(),h("div",pg,_(a(f)("BidBlock_ConfirmError")),1)):k("",!0),o("div",mg,[o("button",{class:"btn-n btn-n-pink w-75",onClick:Ma,disabled:Pt.value},[Pt.value?(u(),h("span",gg)):k("",!0),j(" "+_(e.requiresSepa?a(f)("Checkout_Pay"):a(f)("Checkout_ClaimButton"))+" ",1),O[25]||(O[25]=o("i",{class:"fa-regular fa-chevron-right ms-3"},null,-1))],8,vg),N(Wo)])])):ve.value?(u(),h("div",yg,[N(mm,{"bid-name":n.bidName??"",amount:a(l).bidList[0].amount,"admin-cost":n.adminCost,"shipping-cost":n.shippingCost,lotId:P.value??"","required-external-costs":n.requiredExternalCosts,"fee-waived":fe.value,"reduced-fee":n.reducedFee},null,8,["bid-name","amount","admin-cost","shipping-cost","lotId","required-external-costs","fee-waived","reduced-fee"])])):(u(),h("div",bg,[o("h2",wg,_(tn.value?a(f)("BidBlock_Loss_DealGotAway"):a(f)("BidBlock_NoWin")),1),a(l)?.bidList?.length?k("",!0):(u(),h("p",kg,_(a(f)("BidBlock_Loss_NoBidders")),1)),a(l)&&a(l).bidList&&a(l).bidList.length>0?(u(),h("div",Ig,[Wn.value>0?(u(),h("p",Sg,_(a(f)("BidBlock_Loss_WinnerGotDeal",{0:an.value,1:Wn.value})),1)):(u(),h("p",Cg,_(a(f)("BidBlock_Loss_WinnerWon",{0:an.value})),1)),o("div",$g,[(n.storeValue??0)>0&&Wn.value>0?(u(),h("div",Tg,[o("span",null,_(a(f)("BidBlock_Loss_StoreValue")),1),o("span",xg,_(a(pe)(n.storeValue)),1)])):k("",!0),o("div",Eg,[o("span",null,_(a(f)("BidBlock_Loss_WonFor")),1),o("span",Ag,_(a(pe)(a(r))),1)])])])):k("",!0),o("div",Lg,[qe.value?(u(),h("button",{key:0,class:"btn-n btn-n-pink bidblock-loss__cta",onClick:Zo},[j(_(a(f)("BidBlock_Loss_NextChance"))+" ",1),o("span",Dg,_(_e.value)+"s",1)])):rt.value?(u(),ee(Dn,{key:1,class:"bidblock-loss__searching justify-content-center",message:a(f)("BidBlock_Loss_SearchingNextLot")},null,8,["message"])):(u(),h("div",Bg,[o("p",null,_(a(f)("Bidblock_LastAuction")),1),o("a",{href:a(la)(),class:"btn-n btn-n-small"},[j(_(a(f)("Button_ViewAllAuctions"))+" ",1),O[27]||(O[27]=o("i",{class:"fa-regular fa-chevron-right ms-3"},null,-1))],8,Pg)]))])]))])):Se.value==="CLOSED"?(u(),h("div",Ug,[o("h6",Mg,_(a(f)("BidBlock_AuctionClosing")),1),e.isAuthenticated&&e.hasPhoneConfirmed&&e.requiresSepa&&!e.hasSepaMandate?(u(),h("div",Ng,[o("div",Rg,[o("p",Og,_(a(f)("BidBlock_SepaInfo")),1)]),o("a",{href:"/sepa/mandate?returnUrl="+a(Y),class:"btn-n btn-n-pink ms-4 me-4"},[j(_(a(f)("BidBlock_ActivateSepa"))+" ",1),O[28]||(O[28]=o("i",{class:"far fa-chevron-right ms-3"},null,-1))],8,Fg)])):k("",!0)])):k("",!0)]),o("div",Vg,[N(yp,{lot:a(l),"user-id":U.value},null,8,["lot","user-id"])])]))],2)),Oa.value?(u(),h("div",Hg,[o("p",qg,_(a(f)("BidBlock_PlaceOneBid")),1),o("div",Wg,[_t(o("input",{"onUpdate:modelValue":O[7]||(O[7]=se=>we.value=se),type:"checkbox",class:"form-check-input cursor-pointer"},null,512),[[js,we.value]])])])):k("",!0),v.value?(u(),h(z,{key:3},[N(Vo,{visible:a(g)&&a(y),banner:v.value,seconds:a(T)},null,8,["visible","banner","seconds"]),N(qo,{banner:v.value},null,8,["banner"])],64)):k("",!0)],64))}}),o1=le(n1,[["__scopeId","data-v-155cbb96"]]),s1={class:"mb-1"},i1={key:0,class:"mb-2"},a1=["innerHTML"],r1={key:1,class:"mb-2"},l1=["innerHTML"],c1={class:"direct-buy-benefits mb-3"},u1=["href"],d1={class:"mb-0 text-center"},h1={class:"text-muted"},f1=1,_a=q({__name:"DirectBuyPopup",props:{auctionId:{type:String,required:!0},directBuyTotalPrice:{type:Number,required:!0},directBuyUrl:{type:String,required:!0},shippingPrice:{type:Number,required:!1,default:0},userId:{type:String,required:!1}},setup(n){const e=n,t=w(!1),s=w(!1),i=w(!1),r=E(()=>t.value&&!s.value&&!i.value),l=`directBuyPopup_${e.auctionId}`;let d=null;function c(){d&&(window.removeEventListener("scroll",d),d=null)}oe(()=>{if(i.value=Re.readWithExpiry(l)!==null,i.value===!1){m()&&setTimeout(()=>{p()},15e3);const v=document.querySelector("#how-it-works-container");if(!v)return;d=()=>{let y=v.getBoundingClientRect().bottom,T=window.innerHeight;y<T+50&&p()},window.addEventListener("scroll",d,{passive:!0})}}),Te(()=>{c()});const p=()=>{i.value||t.value||(t.value=!0,c())};function m(){return document.referrer&&document.referrer.includes(window.location.hostname)===!1}function g(){Re.writeWithExpiry(l,"1",tt(f1)),s.value=!0,c()}return(v,y)=>(u(),h("div",{class:V(["auction-direct-buy__container floating rounded box-shadow p-4 slide-up",{"is-visible":r.value}])},[o("button",{class:"btn-n btn-n-icon close-direct-buy",onClick:g},[...y[0]||(y[0]=[o("i",{class:"fa-solid fa-xmark"},null,-1)])]),o("h4",s1,_(a(f)("DirectBuyPopup_Title")),1),n.shippingPrice>0?(u(),h("p",i1,[o("small",{innerHTML:a(f)("DirectBuyPopup_DescriptionFormatHtml").replace("{0}",a(De)(e.directBuyTotalPrice))},null,8,a1)])):(u(),h("p",r1,[o("small",{innerHTML:a(f)("DirectBuyPopup_DescriptionWithoutShippingFormatHtml").replace("{0}",a(De)(e.directBuyTotalPrice))},null,8,l1)])),o("ul",c1,[o("li",null,_(a(f)("DirectBuyPopup_Benefit1")),1),o("li",null,_(a(f)("DirectBuyPopup_Benefit2")),1),o("li",null,_(a(f)("DirectBuyPopup_Benefit3")),1)]),o("a",{href:e.directBuyUrl,class:"btn-n btn-n-pink mb-3 w-100"},[y[1]||(y[1]=o("svg",{class:"me-2",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},[o("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2zM6.16 6h12.15l-2.76 5H8.53zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2m10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2"})],-1)),j(" "+_(a(f)("Common_ViewOffer")),1)],8,u1),o("p",d1,[o("small",h1,[j(_(a(f)("DirectBuyPopup_Footer"))+" ",1),o("button",{class:"text-decoration-underline btn btn-link btn-sm p-0 align-baseline",type:"button",onClick:g}
3,[o("small",null,_(a(f)("DirectBuyPopup_FooterButton")),1)])])])],2))}}),_1={key:0,class:"direct-buy-popup-wrapper d-lg-none"},p1={class:"bid-bar"},m1={class:"MuiBox-root css-14apm3r"},v1={class:"MuiStack-root css-1x4jos1"},g1={class:"MuiTypography-root MuiTypography-body1 css-skicrm"},y1={class:"MuiBox-root css-onlz1i"},io="has-bid-sticky",b1=q({__name:"BidSticky",props:{directBuyUrl:String,directBuyTotalPrice:Number,enableDirectBuy:Boolean,shippingPrice:Number},setup(n){const e=Bt(),{auctionId:t,currentBid:s,currentLot:i,currentLotEnding:r}=vt(e),l=w(!1);te(l,p=>{p?document.body.classList.add(io):document.body.classList.remove(io)}),oe(()=>{window.addEventListener("scroll",d)}),Te(()=>{window.removeEventListener("scroll",d),document.body.classList.remove(io)});const d=()=>{if(!mi())return!1;const p=document.getElementById("bid-block");l.value=!!p&&!Pr(p)},c=()=>{Ur("#bid-block",25)};return(p,m)=>a(i)?(u(),h("div",{key:0,class:V(["MuiBox-root css-a1cktc slide-up",{"is-visible":l.value}])},[n.enableDirectBuy?(u(),h("div",_1,[N(_a,{"direct-buy-total-price":n.directBuyTotalPrice,"direct-buy-url":n.directBuyUrl,"shipping-price":n.shippingPrice,"auction-id":a(t)},null,8,["direct-buy-total-price","direct-buy-url","shipping-price","auction-id"])])):k("",!0),o("div",p1,[m[0]||(m[0]=o("div",{class:"MuiBox-root css-1jdjoop"},[o("div",{class:"MuiBox-root css-15ryu37"},[o("div",{class:"MuiBox-root css-0",style:{opacity:"0",transform:"scale(0.75, 0.5625)",visibility:"hidden"}})])],-1)),o("div",m1,[o("div",v1,[o("p",g1,_(a(De)(a(s))),1),o("div",y1,[N(Ro,{"end-time":a(i).endDateTime,"hold-at-zero":a(r)},null,8,["end-time","hold-at-zero"])]),o("button",{id:"bid-sticky-cta",class:"btn-n btn-n-small btn-n-pink",tabindex:"0",type:"button",onClick:ie(c,["prevent"])},_(a(f)("Auction_PlaceYourBid")),1)])])])],2)):k("",!0)}}),w1=le(b1,[["__scopeId","data-v-d333cf93"]]),k1={key:0,class:"extra-lot-popup"},I1={class:"h6 fw-bold"},S1=["href"],C1=q({__name:"LotSwitcher",props:{auctionId:{type:String,required:!0},additionalLotsViewModel:{type:String,required:!1},serverDateTime:{type:Number,default:null,required:!1}},setup(n){const e=n,t=Bt(),{currentLot:s}=vt(t),i=w(s.value?.lotId),r=w([]),l=w(!1),d=w(!0),c=new Set;let p=null;const{subscribe:m,subscribeOnce:g}=Dt(),{onConnected:v,joinLotList:y}=ot(),{now:T}=Le(e.serverDateTime);te(T,B=>{B!==null&&(r.value=r.value.filter(b=>b.endTime-B>0))});function I(){r.value.forEach(B=>{c.add(B.id)}),C()}function C(){if(c.size===0||p)return;const B=[...c],b=y(B);b&&(p=b,b.then(()=>{B.forEach($=>{c.delete($)})}).catch($=>{console.error("Failed to subscribe pending lots",$)}).finally(()=>{p===b&&(p=null),c.size>0&&C()}))}function A(){const B=JSON.parse(e.additionalLotsViewModel);r.value=B.filter(b=>b.id!=i.value).map(b=>({...b,endTime:b.endDateTime,lotId:b.id,lotAmount:0,infoText:"",title:`${f("Auctions_Auction")} #${b.friendlyId}`,url:b.url.split(window.urls.auctionsPrefix)[1]})),I(),l.value=!0}return oe(()=>{v(()=>{C()}),m(So,async B=>{const{auctionId:b,lotId:$}=B;if($===i.value||r.value.some(x=>x.id===$)||b!==e.auctionId)return;const S=(await ae.post("/lots/all-by-auctions",{AuctionIds:[b]})).data.data.lots.find(x=>x.lotId===$);S&&!r.value.some(x=>x.id===S.lotId)&&(r.value.push({...S,id:S.lotId,endDateTime:S.endTime,url:S.url}),c.add($),C())}),g(_o,B=>{i.value=B.lotId,A()})}),(B,b)=>d.value&&l.value&&r.value.length>0?(u(),h("div",k1,[o("button",{onClick:b[0]||(b[0]=ie($=>d.value=!1,["prevent"])),class:"close-button me-auto"},[...b[1]||(b[1]=[o("i",{class:"fa-solid fa-xmark color-text"},null,-1)])]),o("h4",I1,"🚀 "+_(a(f)("Auction_MoreLots")),1),(u(!0),h(z,null,Q(r.value,$=>(u(),h("div",{key:$.id,class:"extra-lot-wrapper"},[o("a",{href:$.url,class:V([[r.value.lastIndexOf($)?"mb-0":""],"extra-lot-link d-block text-dark text-decoration-none position-relative mt-3"])},[N(He,{class:"user-select-none auction mb-0 col-12",lot:$,"hide-image":"","hide-title":"","hide-place-bid":""},null,8,["lot"])],10,S1)]))),128))])):k("",!0)}}),$1=le(C1,[["__scopeId","data-v-389ff8b3"]]);function pa(n){return _i("number:whole",{maximumFractionDigits:0}).format(n)}function ma(n,e=2){return _i(`number:decimal:${e}`,{minimumFractionDigits:e,maximumFractionDigits:e}).format(n)}const T1={id:"reviews",class:"mb-3 mt-5"},x1={class:"d-flex align-items-center"},E1={class:"auction__tab-content-title mb-0 me-1"},A1={class:"review-info-popup"},L1=["innerHTML"],D1={class:"mb-5 mt-3"},B1={class:"mb-4"},P1={class:"mb-4 d-flex align-items-center"},U1={class:"lh-1 me-3 rating-number"},M1={class:"star-rating"},N1={key:0,class:"fa-solid fa-star-half-stroke"},R1={class:"flex-fill"},O1={class:"d-flex align-items-center"},F1={class:"me-2 letter text-center"},V1={class:"position-relative rounded-3 w-100 rating-bar ms-2"},H1={class:"text-right"},q1={class:"color-light-gray ms-3"},W1={id:"review-holder"},z1={class:"d-flex"},K1={class:"flex-fill"},G1={class:"fw-bolder display-name"},j1={class:"fw-normal"},X1={class:"star-rating"},Y1={key:0,class:"review-item-tag fw-semibold"},J1={key:1,class:"text mt-3"},Z1=q({__name:"Reviews",props:{auctionId:{},average:{},totalOneStar:{},totalTwoStar:{},totalThreeStar:{},totalFourStar:{},totalFiveStar:{},totalReviews:{}},setup(n){const e=n,t=w(0),s=w([]),i=w(0),r=w(0),l=w(0),d={5:e.totalFiveStar,4:e.totalFourStar,3:e.totalThreeStar,2:e.totalTwoStar,1:e.totalOneStar},c=()=>{ae.get(`auctions/${e.auctionId}/reviews`).then(g=>{const v=g.data.data;t.value=v.currentPage,s.value=v.items,i.value=v.itemsPerPage,r.value=v.totalItems,l.value=v.totalPages}).catch(g=>{console.error(g)})},p=()=>{t.value<l.value&&(t.value+=1,ae.get(`auctions/${e.auctionId}/reviews/?page=${t.value}`).then(g=>{const v=g.data.data.items;for(const y of v)s.value.push(y)}).catch(g=>{console.error(g)}))};function m(g){return e.totalReviews<=0?0:g/e.totalReviews*100}return oe(()=>{c()}),(g,v)=>(u(),h("div",T1,[o("div",x1,[o("h3",E1,_(a(f)("Reviews_Title")),1),N(a(Mr),null,{content:de(()=>[o("div",A1,[o("div",{class:"review-info-popup",innerHTML:a(f)("Reviews_Information")},null,8,L1)])]),default:de(()=>[v[1]||(v[1]=o("i",{class:"fa-light fa-circle-info"},null,-1))]),_:1})]),o("div",D1,[o("div",B1,[o("div",P1,[o("span",U1,_(a(ma)(n.average,1)),1),o("div",null,[o("div",M1,[(u(),h(z,null,Q(5,y=>(u(),h(z,{key:y},[n.average>y-1&&n.average<y?(u(),h("i",N1)):(u(),h("i",{key:1,class:V(y>n.average?"fa-regular fa-star":"fa-solid fa-star")},null,2))],64))),64))]),j(" "+_(a(f)(n.totalReviews<2?"Reviews_BasedOnSingle":"Reviews_BasedOnMultiple",{0:n.totalReviews})),1)])]),(u(!0),h(z,null,Q(Object.keys(d).reverse(),y=>(u(),h("div",{key:y,class:"d-flex"},[o("div",R1,[o("div",O1,[o("span",F1,_(y),1),o("i",{class:V(["fa-solid fa-star","color-"+y])},null,2),o("div",V1,[o("div",{class:V(["position-absolute rounded-3 top-0 bottom-0 start-0","background-"+y]),style:$t(`width: ${m(d[y]??0)}%`)},null,6)])])]),o("div",H1,[o("div",q1,_(d[y]),1)])]))),128))]),o("div",W1,[(u(!0),h(z,null,Q(s.value,(y,T)=>(u(),h("div",{key:T,class:"position-relative overflow-hidden rounded-2 p-3 mb-3 review-background"},[o("div",z1,[o("div",K1,[o("div",G1,_(y.userDisplayName),1),o("small",j1,_(a(wr)(y.dateCreated)),1)]),o("div",X1,[(u(),h(z,null,Q(5,I=>o("i",{key:I,class:V(I>y.rating?"fa-regular fa-star":"fa-solid fa-star")},null,2)),64))])]),y.auctionItemTitle?(u(),h("div",Y1,_(y.auctionItemTitle),1)):k("",!0),y.text?(u(),h("div",J1,[o("p",null,_(y.text),1)])):k("",!0)]))),128)),t.value!==l.value?(u(),h("button",{key:0,class:"btn-n btn-n-border btn-n-gray w-100",onClick:v[0]||(v[0]=y=>p())},_(a(f)("Reviews_LoadMore")),1)):k("",!0)])])]))}}),Q1=le(Z1,[["__scopeId","data-v-b33893ac"]]),ey={class:"auction-calendar p-3 rounded bg-white"},ty=q({__name:"Calendar",props:{auctionId:{},auctionItemId:{default:""}},setup(n){const e=n,t=w(null);return(s,i)=>
3(u(),h("div",ey,[N(wi,{readonly:"","auction-id":e.auctionId,"auction-item-id":e.auctionItemId,"selected-date":t.value?.date??null,"selected-option-id":t.value?.id??null,onOptionSelected:i[0]||(i[0]=r=>t.value=r),onOptionCleared:i[1]||(i[1]=r=>t.value=null)},null,8,["auction-id","auction-item-id","selected-date","selected-option-id"])]))}}),va=le(ty,[["__scopeId","data-v-8747c191"]]),ny={id:"modal-title",class:"bottomsheet-modal-title h5 mb-0 fw-bold ps-3 pe-5"},oy={class:"p-3 pb-0 d-flex flex-column flex-grow-1"},nt=q({__name:"BottomSheetModal",props:Ct({title:{default:""},compact:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:e}){const t=ft(n,"modelValue");return e({open:()=>{t.value=!0},close:()=>{t.value=!1}}),(r,l)=>(u(),ee(Ho,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=d=>t.value=d),compact:n.compact},Ys({header:de(()=>[o("h4",ny,_(n.title),1)]),default:de(()=>[o("div",oy,[Oe(r.$slots,"default")])]),_:2},[r.$slots.footer?{name:"footer",fn:de(()=>[Oe(r.$slots,"footer")]),key:"0"}:void 0]),1032,["modelValue","compact"]))}}),sy={key:0},iy={key:0,class:"menu-link__badge light-blue"},ay={key:1},ry=["alt"],ly={key:0,class:"position-absolute top-0 start-0 translate-middle badge rounded-pill bg-danger small"},cy={key:0,class:"active-bids-list"},uy={key:1,class:"text-center py-4"},dy=["innerHTML"],hy=["href"],Bs="active-bids",fy=q({__name:"ActiveBids",props:{serverDateTime:{default:null},smallAuctionCard:{type:Boolean,default:!1},userId:{},badge:{type:Boolean}},setup(n){const e=n,t=Bt(),{currentLot:s}=vt(t),{subscribe:i}=Dt(),{onConnected:r,onceConnected:l,joinLotList:d,leaveLot:c}=ot(),p=w(!0),m=w([]);Le(e.serverDateTime);const g=w(!1);let v=null;const y=D=>{D.detail?.panel!==Bs&&g.value&&(g.value=!1)};oe(()=>{window.addEventListener("panel-open",y),C(),r()}),Te(()=>{window.removeEventListener("panel-open",y),document.body.removeAttribute("data-active-bids")}),te(()=>m.value.length,D=>{D>0?document.body.setAttribute("data-active-bids",D.toString()):document.body.removeAttribute("data-active-bids")}),Pe(()=>{v&&(clearTimeout(v),v=null)});const T=E(()=>e.userId?s.value?.bidList?.some(D=>D.userId===e.userId):!1),I=E(()=>!e.userId||!m.value.length?0:m.value.filter(D=>!D.bidList||!D.bidList.length||!D.bidList.some(x=>x.userId===e.userId)?!1:D.bidList.reduce((x,R)=>R.amount>x.amount?R:x).userId!==e.userId).length),C=()=>{ae.get("lots/user").then(D=>{B(D.data.data)}).catch(D=>{console.error(D)})},A=()=>{window.dispatchEvent(new CustomEvent("panel-open",{detail:{panel:Bs}})),C(),g.value=!0},B=D=>{m.value=D.lots,l(()=>d(m.value.map(L=>L.lotId))??Promise.resolve()),p.value=!1},b=D=>{c(D.lotId),$(wn)},$=(D=150)=>{v&&clearTimeout(v),v=setTimeout(()=>{C(),v=null},D)};return i(Et,({lotId:D,bidList:L})=>{const S=m.value.find(x=>x.lotId===D);
3S&&(S.bidList=[...L],S.lotAmount=L[0]?.amount??0)}),i(xt,D=>{const L=m.value.find(S=>S.lotId===D.lotId);L&&(L.bidList||(L.bidList=[]),L.bidList.some(x=>x.userId===D.userId&&x.amount===D.amount)||L.bidList.unshift(D),L.lotAmount=D.amount)}),i(At,D=>{const L=m.value.find(S=>S.lotId===D.lotId);if(L){const S=[...D.bidList].sort((x,R)=>R.amount-x.amount);L.bidList=S,L.lotAmount=S[0]?.amount??L.lotAmount,D.endDateTime>0&&(L.endTime=D.endDateTime),$(wn)}}),i(So,D=>{m.value.some(S=>S.auctionId===D.auctionId||S.lotId===D.lotId)&&$()}),(D,L)=>!p.value&&(m.value.length||T.value)?(u(),h("div",sy,[n.badge?(u(),h("div",iy,_(m.value.length),1)):(u(),h("div",ay,[o("button",{onClick:L[0]||(L[0]=ie(S=>A(),["prevent"])),class:"btn-n active-bid-button"},[j(_(a(f)("ActiveBids_MyBids"))+" ",1),o("img",{src:"/dist/images/icon_hammer_detail_white.svg",alt:a(f)("ActiveBids_MyBids")},null,8,ry),I.value>0?(u(),h("span",ly,_(I.value),1)):k("",!0)]),N(nt,{modelValue:g.value,"onUpdate:modelValue":L[1]||(L[1]=S=>g.value=S),title:a(f)("ActiveBids_MyBids")},{default:de(()=>[!p.value&&m.value.length?(u(),h("div",cy,[(u(!0),h(z,null,Q(m.value,S=>(u(),ee(He,{key:S.lotId??S.auctionId,class:"auction mb-3",lot:S,"user-is-authenticated":e.userId!=null,"small-card":n.smallAuctionCard,onClosingLot:b},null,8,["lot","user-is-authenticated","small-card"]))),128))])):(u(),h("div",uy,[o("p",null,_(a(f)("ActiveBids_Text")),1),o("p",{innerHTML:a(f)("ActiveBids_NoAuctionsHtml")},null,8,dy),o("a",{href:a(la)(),class:"btn-n"},_(a(f)("ActiveBids_StartBidding")),9,hy)]))]),_:1},8,["modelValue","title"])]))])):k("",!0)}}),_y=le(fy,[["__scopeId","data-v-35c63832"]]),py={key:1},my=q({__name:"UserPoints",setup(n){const e=w(!0),t=w(0);oe(()=>{s(),setInterval(()=>s(),120*1e3)});const s=()=>{ae.get("user/score").then(i=>{t.value=i.data.data.score}).finally(()=>{e.value=!1})};return(i,r)=>e.value?(u(),ee(Dn,{key:0})):(u(),h("div",py,[o("small",null,_(a(f)("UserPoints_Label")),1),o("b",null,_(a(pa)(t.value)),1)]))}});function vy(n){const e=crypto.randomUUID(),t=w(0),s=w(0),i=w(!0),r=w(!1),l=(c,p,m)=>{const g=new URLSearchParams;return g.append("pagesession",e),c.value&&g.append("page",c.value.toString()),n.itemsPerPage&&g.append("items",n.itemsPerPage.toString()),n.categoryId&&g.append("category",n.categoryId),n.search&&g.append("q",n.search),p.value&&g.append("type",p.value),m.value&&g.append("sort",m.value),`${n.apiUrl}${n.apiUrl.includes("?")?"&":"?"}${g}`};return{totalPages:t,totalItems:s,initLoading:i,scrollLoading:r,fetchLots:(c,p,m,g)=>{ae.get(l(c,p,m)).then(v=>{const y=v.data.data;t.value=y.totalPages,s.value=y.totalItems,i.value=!1,g&&g(y.lots)}).catch(v=>{console.error(v),i.value=!1})}}}const gy={class:"position-relative"},yy={class:"auctions-wrapper"},by=["data-list-name"],wy={key:0,class:"text-center auction-overview__loader"},ky={key:1,class:"text-center py-4 px-3 bg-white",style:{"border-radius":"16px"}},Iy={class:"h4 fw-bold"},Sy={class:"text-muted mb-4"},Cy=["src"],vn="auctionListState",$y=5,Ko=q({__name:"AuctionList",props:{serverDateTime:{default:null},currentPage:{default:1},itemsPerPage:{default:9},categoryId:{default:""},userIsAuthenticated:{type:Boolean,default:!1},apiUrl:{default:"lots/all"},recentlyViewed:{type:Boolean,default:!1},auctionId:{},column:{default:3},search:{},smallAuctionCard:{type:Boolean,default:!1},showTitle:{type:Boolean,default:!1},hideNotFound:{type:Boolean,default:!1},gallery:{type:Boolean,default:!0},lots:{default:null},title:{default:""},viewModeResolved:{type:Boolean,default:!0}},setup(n){const e=n;Le(e.serverDateTime);const t=w("all"),{sortKey:s,setSortKey:i}=Xr(),r=w(e.currentPage),l=w(!1),d=w([]),c=w([]),p=w([]),m=w(!0),g=()=>{const U={page:r.value,scrollY:window.scrollY,url:window.location.pathname,sortKey:s.value};hn.writeJsonWithExpiry(vn,U,kr($y))},{onConnected:v,joinLotList:y,leaveLot:T}=ot(),{totalPages:I,totalItems:C,initLoading:A,fetchLots:B}=vy(e),b=U=>{U.target.closest(".auction-list a.card")&&g()},$=U=>{U.persisted&&window.location.reload()};oe(()=>{history.scrollRestoration="manual";const U=G();U&&Yr(U.sortKey)&&i(U.sortKey),te(s,W=>{d.value.forEach(J=>T(J.lotId)),r.value=1,d.value=[],A.value=!0,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"filter",filter_category:"sort",filter_facet:"sort",filter_interaction:"select_option",filter_value:W}),B(r,t,s,J=>{d.value=J,y(J.map(ue=>ue.lotId).filter(ue=>!!ue))})}),e.lots?(d.value=e.lots,A.value=!1,v(()=>{y(e.lots.filter(W=>W.lotId).map(W=>W.lotId))})):v(()=>{if(m.value)m.value=!1,e.recentlyViewed?D():B(r,t,s,async W=>{d.value=W,y(W.map(J=>J.lotId).filter(J=>!!J)),x(),await Y()});else{const W=r.value,J=window.scrollY;r.value=1,B(r,t,s,async ue=>{d.value=ue,y(ue.map(Ie=>Ie.lotId).filter(Ie=>!!Ie)),await Y(W,J)})}}),document.addEventListener("click",b),window.addEventListener("pageshow",$)}),Te(()=>{document.removeEventListener("click",b),window.removeEventListener("pageshow",$)});const D=()=>{const U=Re.readJson("recentlyViewed",[]),W=U.findIndex(J=>J===e.auctionId);W>-1&&U.splice(W,1),ae.post("lots/all-by-auctions",{AuctionIds:U}).then(J=>{const ue=J.data.data;d.value=ue.lots,y(d.value.map(Ie=>Ie.lotId))}).catch(J=>console.error(J))},L=U=>{T(U.lotId),U.auctionId&&(c.value.push(U.auctionId),p.value.push(U.lotId)),S()},S=()=>{setTimeout(()=>{const U=c.value,W=p.value;c.value=[],p.value=[],!(U.length<1)&&ae.post("lots/all-by-auctions",{AuctionIds:U}).then(J=>{const ue=J.data.data.lots,Ie=d.value.filter(be=>W.includes(be.lotId));ue.forEach(be=>{const we=d.value.find(Fe=>Fe.lotId===be.lotId);if(we){Object.assign(we,be);return}const Ge=Ie.shift();Ge&&Object.assign(Ge,be)}),y(ue.map(be=>be.lotId))}).catch(J=>console.error(J))},8e3)},x=()=>{const U=document.getElementById("auction-list-load-more");U&&new IntersectionObserver(J=>{J.forEach(ue=>{ue.isIntersecting&&R()})},{root:null,threshold:0}).observe(U)},R=()=>new Promise(U=>{l.value=!0,r.value<I.value?(r.value+=1,B(r,t,s,W=>{d.value.push(...W),y(W.map(J=>J.lotId).filter(J=>!!J)),Gt(W),l.value=!1,U()})):(l.value=!1,U())}),F=async(U,W)=>{for(;r.value<U&&r.value<I.value;)await R();setTimeout(()=>window.scrollTo(0,W),100)},Y=async(U,W)=>{const J=G();return J?(hn.remove(vn),J.sortKey&&window.dispatchEvent(new CustomEvent("sort-change",{detail:{sortKey:J.sortKey}})),U??=J.page,W??=J.scrollY,await F(U,W),!0):!1},G=()=>{const U=hn.readJsonWithExpiry(vn,null);return U===null?null:U.url!==window.location.pathname?(hn.remove(vn),null):U};te(d,U=>{Gt(U)},{deep:!1}),te(C,()=>{const U=document.getElementById("lot-counter");U&&(U.innerHTML=`${C.value}`);const W=document.getElementById("mobile-auction-count");W&&(W.textContent=C.value>0?String(C.value):"")});const P=E(()=>e.lots?.map(U=>
3U.lotId).filter(Boolean).join(",")??""),{emptyStateImage:H}=Oo();return te(P,(U,W)=>{if(e.lots){if(W){const J=new Set(W.split(",").filter(Boolean)),ue=new Set(U.split(",").filter(Boolean));J.forEach(Ie=>{ue.has(Ie)||T(Ie)})}d.value=e.lots,y(e.lots.filter(J=>J.lotId).map(J=>J.lotId)),A.value=!1}}),(U,W)=>(u(),h("div",gy,[o("div",yy,[o("div",{class:"auction-list row","data-list-name":e.title},[a(A)?n.viewModeResolved?(u(),h(z,{key:1},Q(6,J=>o("div",{key:J,class:V(["auction",n.gallery?["col-12 col-md-6","col-lg-"+12/e.column]:"col-12"])},[o("a",{class:V(["card is-loading",{"is-horizontal":!n.gallery}])},[...W[0]||(W[0]=[et('<div class="card-img-top position-relative"><figure class="image w-100"><img class="w-100" src="/dist/images/logo-placeholder.png" alt="" width="300" height="200"></figure></div><div class="card-body"><h3></h3></div><div class="auction__information card-information"><span></span><span></span></div>',3)])],2)],2)),64)):k("",!0):(u(!0),h(z,{key:0},Q(d.value,J=>(u(),ee(He,{key:J.lotId??J.auctionId,class:V(["auction",[n.gallery?"col-12 col-md-6 col-lg-6 col-xl-4":"col-12"]]),lot:J,"user-is-authenticated":n.userIsAuthenticated,"small-auction-card":n.smallAuctionCard,"view-type":n.gallery?"gallery":"list",onClosingLot:L},null,8,["class","lot","user-is-authenticated","small-auction-card","view-type"]))),128))],8,by)]),W[2]||(W[2]=o("div",{id:"auction-list-load-more"},null,-1)),l.value?(u(),h("div",wy,[...W[1]||(W[1]=[o("p",{class:"is-loading"},null,-1)])])):k("",!0),d.value.length<1&&!a(A)&&!n.hideNotFound?(u(),h("div",ky,[o("h2",Iy,_(a(f)("RecentTabs_EmptyTitle")),1),o("p",Sy,_(a(f)("Auctions_NoAuctionsFound")),1),o("img",{src:a(H),alt:"",class:"mb-4",style:{"max-width":"280px"}},null,8,Cy)])):k("",!0)]))}}),Ty={class:"map-wrapper"},xy={key:0,class:"position-absolute auction-list rounded deal-map text-start"},Ey=q({__name:"AuctionsMap",props:{latitude:{type:[String,Number],required:!0},longitude:{type:[String,Number],required:!0},categoryId:{type:String,required:!1}},emits:["closeMap"],setup(n,{emit:e}){let t=null,s=null,i=null,r=null;const l=n,d=w(null);Le();let c=null,p={},m=null,g={};const{onConnected:v,joinAuction:y}=ot(),T=async()=>(r??=(async()=>{const L=await Ya(()=>import("./chunks/featureKeys-BUIYEJTJ.js").then(S=>S.l),__vite__mapDeps([0,1,2,3,4,5]));t=L?.default??L,s=t.icon({iconUrl:"/dist/images/mapmarker.svg",iconSize:[35,45],iconAnchor:[15,35],popupAnchor:[0,-30]}),i=t.icon({iconUrl:"/dist/images/mapmarker-pink.svg",iconSize:[35,45],iconAnchor:[15,35],popupAnchor:[0,-30]})})(),r),I=e;oe(async()=>{v(),await C()});const C=async()=>{await Ue(),await T(),Ue(()=>{let L={zoom:5,zoomControl:!1,attributionControl:!1};c=t.map("nearby-map",L).setView([l.latitude,l.longitude],10),t.tileLayer("https://api.maptiler.com/maps/streets-v2/256/{z}/{x}/{y}@2x.png?key=HxfkaPBFnNysZhgOAlSX",{maxzoom:19}).addTo(c),t.control.zoom({position:"topright"}).addTo(c),A(c.getBounds()),c.on("moveend",function(){A(c.getBounds())}),c.on("click",()=>{$()})})},A=L=>{const S=L._southWest,x=L._northEast;let R=`lots/locations?MinLatitude=${S.lat}&MaxLatitude=${x.lat}&MinLongitude=${S.lng}&MaxLongitude=${x.lng}`;l.categoryId&&(R+=`&categoryid=${l.categoryId}`),ae.get(R).then(F=>{Nn(F.data.data.serverDateTime),F.data.data.lots.forEach(Y=>{B(Y)})})},B=L=>{const S=`${L.location.longitude}-${L.location.latitude}-${L.auctionId}`;if(p[S]===void 0)g[S]=L,p[S]=new t.marker([L.location.latitude,L.location.longitude],{icon:s}).addTo(c).on("click",()=>{const x=g[S];x&&(x.lotAmount=0,d.value=x,b(S),y(x.auctionId)?.catch(()=>{}))});else{const x=g[S];if(!x)return;x.lotId=L.lotId,x.endTime=L.endTime}},b=L=>{m!==null&&p[m].setIcon(s),p[L]&&(m=L,p[L].setIcon(i))},$=()=>{m!==null&&p[m]&&(p[m].setIcon(s),m=null,d.value=null)},D=()=>{I("closeMap")};return(L,S)=>(u(),h("div",Ty,[S[4]||(S[4]=o("div",{id:"nearby-map",class:"rounded border h-100"},null,-1)),o("button",{onClick:S[0]||(S[0]=ie(x=>D(),["prevent"])),class:"btn btn-light position-absolute shadow border rounded close-map"},[...S[2]||(S[2]=[o("i",{class:"fa-solid fa-xmark"},null,-1)])]),d.value?(u(),h("div",xy,[o("button",{onClick:S[1]||(S[1]=ie(x=>$(),["prevent"])),class:"btn btn-light position-absolute shadow border rounded close-auction"},[...S[3]||(S[3]=[o("i",{class:"fa-solid fa-xmark"},null,-1)])]),(u(),ee(He,{key:d.value.auctionId,class:"user-select-none auction mb-0 col-12",lot:d.value,"user-is-authenticated":""},null,8,["lot"]))])):k("",!0)]))}}),Ay=le(Ey,[["__scopeId","data-v-28ffaaa9"]]),Ly={class:"position-relative"},Dy=200,By=q({__name:"AuctionOverview",props:{serverDateTime:{default:null},currentPage:{default:1},itemsPerPage:{default:9},title:{default:"Alle veilingen"},apiUrl:{default:"lots/all"},categoryId:{default:""},userIsAuthenticated:{type:Boolean,default:!1},recentlyViewed:{type:Boolean,default:!1},auctionId:{},column:{default:3},search:{},smallAuctionCard:{type:Boolean,default:!1},showTitle:{type:Boolean,default:!1},hideNotFound:{type:Boolean,default:!1},gallery:{type:Boolean,default:!0},latitude:{},longitude:{},showMapButton:{type:Boolean,default:!0}},setup(n){const e=Ci.categoryDefaultListView,t=n,{isOn:s}=Si(),i=w(t.gallery);let r=!1,l=!1;const d=y=>{l=!0,window.dispatchEvent(new CustomEvent("view-mode-change",{detail:{mode:y}})),l=!1},c=w(!1),p=w(!1),m=()=>{p.value=!1,window.dispatchEvent(new CustomEvent("view-mode-change",{detail:{mode:"gallery"}}))},g=y=>{i.value=y==="gallery"},v=y=>{const T=y.detail?.mode;l||(r=!0),T==="gallery"||T==="list"?g(T):T==="map"&&(p.value=!0)};return oe(async()=>{window.addEventListener("view-mode-change",v),te(()=>s(e),y=>{r||i.value===!y||d(y?"list":"gallery")},{immediate:!0}),await Jr(Dy),c.value=!0}),Te(()=>{window.removeEventListener("view-mode-change",v)}),(y,T)=>(u(),h("div",Ly,[(u(),ee(Zt,{to:"body"},[p.value?(u(),ee(Ay,{key:0,onCloseMap:m,latitude:n.latitude,longitude:n.longitude,"category-id":n.categoryId},null,8,["latitude","longitude","category-id"])):k("",!0)])),N(Ko,Ja(t,{gallery:i.value,"view-mode-resolved":c.value}),null,16,["gallery","view-mode-resolved"])]))}}),Py={class:"location-selector_city"},Uy={class:"location-selector_arrow ms-auto px-3 h-100 d-flex align-items-center"},My={key:0,class:"fa-solid fa-chevron-up"},Ny={key:1,class:"fa-solid fa-chevron-down"}
3,Ry={key:0,class:"location-selector_results w-100 bg-white position-absolute p-3"},Oy=["placeholder"],Fy={key:0,class:"location-selector_locations mt-3 border-top"},Vy={class:"list-unstyled pt-3 mb-0"},Hy=["onClick"],qy=q({__name:"LocationSelector",props:{city:{type:String,required:!1}},emits:["locationChanged"],setup(n,{emit:e}){const t=e,s=n,i=new google.maps.places.AutocompleteService,r=new google.maps.Geocoder,l=w(!1),d=w([]),c=w({description:null,latitude:null,longitude:null,city:null,state:null,country:null});oe(()=>{s.city&&(c.value.description=s.city)});let p;const m=C=>{clearTimeout(p),p=setTimeout(function(){if(C.keyCode===40||C.keyCode===38||C.keyCode===13)return!1;if(C.target.value=="")return d.value=[],!1;var A={input:C.target.value,types:["geocode"],componentRestrictions:{country:ur().map(B=>B.iso)}};i.getPlacePredictions(A,function(B,b){b==google.maps.places.PlacesServiceStatus.OK&&(d.value=B)})},500)},g=()=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(y,function(C){console.error(C)},{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0}):console.error("Nope")},v=async C=>{const A=C.geometry.location.lat(),B=C.geometry.location.lng();let b,$,D,L;C.address_components.forEach(x=>{x.types.includes("locality")?b=x.long_name:x.types.includes("administrative_area_level_2")?$=x.long_name:x.types.includes("administrative_area_level_1")?D=x.long_name:x.types.includes("country")&&(L=x.long_name)});let S=b;S||(S=$),S||(S=D),S||(S=L),C.address_components.length===0&&(S=C.formatted_address),c.value.geo=`${A},${B}`,c.value.latitude=A,c.value.longitude=B,c.value.description=S??null,c.value.city=b||($??null),c.value.state=D??null,c.value.country=L??null,t("locationChanged",c.value),await T()},y=async C=>{var A=C.coords.latitude,B=C.coords.longitude;const b={lat:A,lng:B};r.geocode({location:b},async($,D)=>{if(D=="OK"){const L=$[0];await v(L)}})},T=async C=>{l.value=!l.value,l.value||(d.value=[])},I=async C=>{r.geocode({placeId:C.place_id},async(A,B)=>{if(B=="OK"){const b=A[0];await v(b)}})};return(C,A)=>(u(),h("div",{class:V(["location-selector position-relative",{show:l.value}]),style:{"z-index":"3"}},[o("div",{class:"location-selector_input rounded w-100 d-flex align-items-center cursor-pointer bg-white",onClick:ie(T,["prevent"])},[A[0]||(A[0]=o("i",{class:"fa-solid fa-location-dot ps-3 pe-3"},null,-1)),o("div",Py,_(c.value.description),1),o("div",Uy,[l.value?(u(),h("i",My)):(u(),h("i",Ny))])]),l.value?(u(),h("div",Ry,[o("input",{class:"form-control",placeholder:a(f)("LocationSelector_Placeholder"),onKeyup:m},null,40,Oy),o("button",{class:"btn btn-outline-primary mt-3",onClick:ie(g,["prevent"])},[A[1]||(A[1]=o("i",{class:"fa-solid fa-location-crosshairs me-2"},null,-1)),j(" "+_(a(f)("LocationSelector_UseCurrent")),1)]),d.value.length>0?(u(),h("div",Fy,[o("ul",Vy,[(u(!0),h(z,null,Q(d.value,B=>(u(),h("li",null,[o("button",{class:"text-start w-100",onClick:ie(b=>I(B),["prevent"])},_(B.description),9,Hy)]))),256))])])):k("",!0)])):k("",!0)],2))}}),Wy=q({__name:"NearbyFilter",props:{city:{type:String,required:!1}},setup(n){const e=n,t=s=>{let i=window.location.href.split("?")[0];i+=`?lat=${s.value.latitude}`,i+=`&lng=${s.value.longitude}`,i+=`&desc=${s.value.description}`,window.location.href=i};return(s,i)=>(u(),ee(qy,{city:e.city,onLocationChanged:t},null,8,["city"]))}}),zy={key:0,class:"simple-card mb-4"},Ky={class:"fw-bold"},Gy={class:"mb-0"},jy={key:0},Xy={key:1},Yy={key:0,class:"text-muted small mt-0 mb-0"},Jy={key:1},Zy={class:"d-flex w-100 align-items-center"},Qy={class:"col"},e0={class:"p-3 p-md-4 mb-4"},t0={key:0,class:"text-17 fw-bold"},n0={key:1},o0={class:"col d-flex justify-content-end"},s0=q({__name:"Additional",props:{defaultItem:{},additionalItem:{},selectedList:{},isClusterAuction:{type:Boolean},validForPersons:{}},emits:["update:selectedList"],setup(n,{emit:e}){const t=n,s=e,i=E(()=>(t.defaultItem?.optionList??[]).filter(m=>(m.maxAdditional??0)>0)),r=Nr(()=>t.validForPersons),l=E(()=>(t.selectedList??[]).reduce((m,g)=>m+g.quantity,0));function d(m){return(t.selectedList??[]).find(g=>g.optionId===m.id)?.quantity??0}function c(m){const g=t.additionalItem?.quantity??0,v=l.value-d(m);return Math.min(m.maxAdditional??0,g-v)}function p(m,g){const v=(t.selectedList??[]).filter(y=>y.optionId!==m.id);if(g<=0){s("update:selectedList",v);return}s("update:selectedList",[...v,{auctionItemId:t.additionalItem.itemId,optionId:m.id,displayTitle:m.dis
3playTitle,quantity:g}])}return(m,g)=>t.additionalItem&&t.additionalItem.quantity>0&&t.defaultItem?(u(),h("div",zy,[o("h6",Ky,_(a(f)("Choose_AdditionallyBoughtText")),1),o("p",Gy,[t.additionalItem.quantity===1?(u(),h("span",jy,_(a(f)("Choose_AdditionallyBoughtQuantityText_Singular")),1)):(u(),h("span",Xy,_(a(f)("Choose_AdditionallyBoughtQuantityText_Plural",{0:t.additionalItem.quantity})),1))]),a(r)?(u(),h("p",Yy,_(a(r)),1)):k("",!0),i.value.length>0?(u(),h("hr",Jy)):k("",!0),n.isClusterAuction?k("",!0):(u(!0),h(z,{key:2},Q(i.value,v=>(u(),h("div",{key:v.id,class:"mt-2"},[o("div",Zy,[o("div",Qy,[o("p",e0,[n.defaultItem.optionType==="NotSet"?(u(),h("span",t0,_(a(f)("Checkout_AdditionalItems")),1)):(u(),h("span",n0,_(v.displayTitle),1))])]),o("div",o0,[N(ti,{"model-value":d(v),min:0,max:c(v),class:"bijkoop-stepper","onUpdate:modelValue":y=>p(v,y)},null,8,["model-value","max","onUpdate:modelValue"])])])]))),128))])):k("",!0)}}),i0={key:0,style:{"margin-top":"3rem"},class:"upsell-options"},a0={class:"title h5"},r0={class:"simple-card__top"},l0={class:"simple-card__image me-4 d-none d-md-block"},c0={class:"image is-16by9"},u0=["src","alt"],d0={class:"simple-card__description d-flex flex-column"},h0={class:"fw-bold h5 mb-2"},f0={class:"simple-card__price mb-0"},_0={key:0},p0={key:1},m0={class:"simple-card__top"},v0={class:"simple-card__image me-4 d-none d-md-block"},g0={class:"image is-16by9"},y0=["src","alt"],b0={class:"simple-card__description d-flex flex-column"},w0={class:"fw-bold h5 mb-2"},k0={class:"simple-card__price mb-0"},I0={key:0},S0={key:1},C0={key:0,class:"mt-auto w-100"},$0={class:"d-flex w-100 align-items-center"},T0={class:"col"},x0={class:"mb-0"},E0={class:"col d-flex justify-content-end"},A0=q({__name:"Upsell",props:{defaultItem:{},upsellList:{},selectedList:{}},emits:["update-selected"],setup(n,{emit:e}){const t=n,s=e,i=m=>(t.selectedList??[]).filter(g=>g.auctionItemId===m.itemId).reduce((g,v)=>g+v.quantity,0),r=(m,g)=>(t.selectedList??[]).find(v=>v.optionId===g.id&&v.auctionItemId===m.itemId)?.quantity??0;function l(m,g){const v=i(m)-r(m,g);return vi(m.quantity-v,0,g.maxAdditional??0)}function d(m,g,v){s("update-selected",{optionId:g.id,auctionItemId:m.itemId,displayTitle:g.displayTitle,quantity:v})}const c=E(()=>(t.upsellList??[]).filter(m=>m.requiresUserSelection)),p=E(()=>(t.upsellList??[]).filter(m=>!m.requiresUserSelection));return(m,g)=>c.value.length>0||p.value.length>0?(u(),h("div",i0,[o("h2",a0,_(a(f)("Choose_UpsellBoughtText")),1),(u(!0),h(z,null,Q(p.value,v=>(u(),h("div",{key:"auto-"+v.itemId,class:"simple-card"},[g[2]||(g[2]=o("div",{class:"simple-card__border d-none d-md-block is-secondary"},null,-1)),o("div",r0,[o("div",l0,[o("figure",c0,[o("img",{src:a(jt)(v.image),alt:v.title,onError:g[0]||(g[0]=(...y)=>a(me)&&a(me)(...y))},null,40,u0)])]),o("div",d0,[o("h5",h0,_(v.title),1),o("p",f0,[v.quantity===1?(u(),h("span",_0,_(a(f)("Choose_UpsellBoughtQuantityText_Singular")),1)):(u(),h("span",p0,_(a(f)("Choose_UpsellBoughtQuantityText_Plural",{0:v.quantity})),1))])])])]))),128)),(u(!0),h(z,null,Q(c.value,v=>(u(),h("div",{key:v.itemId,class:"simple-card"},[g[4]||(g[4]=o("div",{class:"simple-card__border d-none d-md-block is-secondary"},null,-1)),o("div",m0,[o("div",v0,[o("figure",g0,[o("img",{src:a(jt)(v.image),alt:v.title,onError:g[1]||(g[1]=(...y)=>a(me)&&a(me)(...y))},null,40,y0)])]),o("div",b0,[o("h5",w0,_(v.title),1),o("p",k0,[v.quantity===1?(u(),h("span",I0,_(a(f)("Choose_UpsellBoughtQuantityText_Singular")),1)):(u(),h("span",S0,_(a(f)("Choose_UpsellBoughtQuantityText_Plural",{0:v.quantity})),1))]),g[3]||(g[3]=o("hr",null,null,-1)),v.optionType==="String"||v.optionType==="Location"?(u(),h("div",C0,[(u(!0),h(z,null,Q((v.optionList??[]).filter(y=>(y.maxAdditional??0)>0),y=>(u(),h("div",{key:y.id,class:"pt-2 pb-2"},[o("div",$0,[o("div",T0,[o("p",x0,[o("span",null,_(y.displayTitle),1)])]),o("div",E0,[N(ti,{"model-value":r(v,y),min:0,max:l(v,y),"onUpdate:modelValue":T=>d(v,y,T)},null,8,["model-value","max","onUpdate:modelValue"])])])]))),128))])):k("",!0)])])]))),128))])):k("",!0)}}),L0=["aria-label"],D0={class:"cluster-stepper__list"},B0={class:"cluster-stepper__icon"},P0={key:0,class:"fa-solid fa-check"},U0={class:"cluster-stepper__label"},M0=q({__name:"ClusterStepper",props:{steps:{}},setup(n){return(e,t)=>(u(),h("nav",{class:"cluster-stepper mb-4","aria-label":a(f)("ClusterCheckout_StepperAriaLabel")},[o("ol",D0,[(u(!0),h(z,null,Q(n.steps,(s,i)=>(u(),h("li",{key:i,class:V(["cluster-stepper__step",{"cluster-stepper__step--active":s.active,"cluster-stepper__step--completed":s.completed,"cluster-stepper__step--upcoming":!s.active&&!s.completed}])},[o("span",B0,[s.completed?(u(),h("i",P0)):(u(),h("i",{key:1,class:V(["fa-solid",s.icon])},null,2))]),o("span",U0,_(s.label),1)],2))),128))])],8,L0))}}),ga=le(M0,[["__scopeId","data-v-bfb8ab67"]]);function On(n,e){const t=E(()=>n().map(r=>({...r,clickable:!1}))),s=E(()=>{const r=n(),l=r.findIndex(d=>d.path!==void 0&&N0(d.path,window.location.pathname));return l>=0?l:r.length-1}),i=E(()=>e?.getPaymentState?.());return{steps:t,activeStepIndex:s,outcome:i}}function N0(n,e){return new RegExp(`^${n.replace(/:[^/]+/g,"[^/]+")}$`).test(e)}const R0=[{name:"Compile",resourceKey:"Checkout_Compile",icon:dr,path:"/choose/:orderid"},{name:"Receive",resourceKey:"ClusterCheckout_StepReceiveVoucher",icon:hr}],O0=q({__name:"ChooseOptionStepperIsland",props:{orderId:{},logoUrl:{},backUrl:{}},setup(n){const e=n,{steps:t,activeStepIndex:s,outcome:i}=On(()=>R0);function r(){window.location.href=e.backUrl}return(l,d)=>(u(),ee(An,{steps:a(t),"active-step-index":a(s),outcome:a(i),"logo-url":e.logoUrl,onBack:r},null,8,["steps","active-step-index","outcome","logo-url"]))}}),F0={key:0,class:"simple-card p-3 mb-4"},V0=q({__name:"OccupancyCard",props:Ct({settings:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=n,t=ft(n,"modelValue"),s=E(()=>e.settings!=null),i=E({get:()=>
3t.value??Rr(e.settings),set:r=>{t.value=r}});return te(s,r=>{r&&t.value===null&&(t.value=i.value)},{immediate:!0}),(r,l)=>s.value?(u(),h("div",F0,[N(Or,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=d=>i.value=d),settings:n.settings},null,8,["modelValue","settings"])])):k("",!0)}}),H0=q({__name:"ExternalItemsCard",props:Ct({supported:{type:Boolean},auctionId:{},auctionItemId:{},auctionItemOptionId:{},occupancy:{}},{items:{required:!0},itemsModifiers:{},loading:{type:Boolean,required:!0},loadingModifiers:{}}),emits:["update:items","update:loading"],setup(n){const e=n,t=ft(n,"items"),s=ft(n,"loading");Fr({isSupported:()=>e.supported,watchSources:()=>[e.occupancy,e.auctionItemId,e.auctionItemOptionId],isReady:([d,c,p])=>!!d&&!!c&&!!p,fetch:async d=>(await bi.fetchExternalItemsAsync({auctionId:e.auctionId,auctionItemId:e.auctionItemId??"",auctionItemOptionId:e.auctionItemOptionId??"",occupancy:e.occupancy},d)).data.data,currentItems:()=>t.value,setLoading:d=>{s.value=d},onItemsFetched:d=>{t.value=d}});const i=E(()=>t.value.filter(d=>!d.required)),r=E(()=>!e.occupancy||!e.auctionItemId||!e.auctionItemOptionId);function l(d){Hr(t.value,d)}return(d,c)=>n.supported?(u(),ee(Vr,{key:0,items:i.value,"is-loading":s.value,"is-pending":r.value,"onUpdate:element":l},null,8,["items","is-loading","is-pending"])):k("",!0)}});function ya(n){switch(n){case"Date":return f("ClusterCheckout_StepChooseDate")||"Kies datum";case"DateTime":return f("ClusterCheckout_StepChooseTimeslot")||"Kies tijdslot";case"String":return f("ClusterCheckout_StepChooseOption")||"Kies optie";default:return f("ClusterCheckout_StepChooseOption")||"Kies optie"}}const q0={key:0,class:"container my-3 my-md-5"},W0={class:"thanks-container simple-card p-4 p-md-5 text-center m-auto"},z0={class:"image mb-4"},K0=["alt"],G0={class:"content"},j0={class:"fw-bold"},X0={class:"mb-4"},Y0=["href"],J0={key:1},Z0={key:0,class:"container mt-3 mt-md-4"},Q0={class:"container checkout__row mt-3 mt-md-4"},eb={class:"checkout__content"},tb={class:"cart"},nb={key:0,class:"alert alert-danger error-container"},ob={class:"simple-card p-3 p-md-4 mb-4"},sb={class:"d-flex align-items-center gap-3"},ib={key:0,class:"flex-shrink-0",style:{width:"80px"}},ab={class:"image mb-0"},rb=["src","alt"],lb={class:"fw-bold h5 mb-0"},cb={key:2,class:"simple-card mb-4"},ub={class:"row align-items-center"},db={class:"col-12 col-md-6"},hb={class:"fw-bold mb-3 mb-md-0"},fb={class:"col-12 col-md-6"},_b={value:"null",disabled:""},pb=["value"],mb={key:3,class:"mb-4"},vb={class:"simple-card p-3 p-md-4"},gb={class:"simple-card__title mb-0 mt-0"},yb={class:"checkout__receipt"},bb={class:"simple-card receipt__holder"},wb={class:"receipt__title"},kb={class:"receipt"},Ib={class:"receipt__items"},Sb={class:"receipt__item receipt__item--main"},Cb={class:"receipt__quantity"},$b={class:"receipt__description"},Tb={key:0,class:"receipt__option-holder"},xb={class:"mb-0 mt-0"},Eb={class:"mb-0 receipt__option-text"},Ab={key:0},Lb={key:1,class:"text-muted"},Db={class:"receipt__quantity"},Bb={class:"receipt__description"},Pb={class:"badge xs-small me-2 bg-primary"},Ub={class:"receipt__quantity"},Mb={class:"receipt__description"},Nb={class:"badge xs-small me-2 bg-success"},Rb={class:"receipt__quantity"},Ob={class:"receipt__description"},Fb={class:"badge xs-small me-2 bg-success"},Vb={class:"receipt-buttons"},Hb=q({__name:"ChooseOption",props:{orderId:{},orderFriendlyId:{},auctionId:{},logoUrl:{},backUrl:{},isBundled:{type:Boolean}},setup(n){const e=n,t=w({initial:!0}),s=w({itemId:null,title:null,image:null,optionType:null,numberOfVouchers:0,optionList:[]}),i=w(null),r=w(void 0),l=w([]),d=w(null),c=w([]),p=w([]),m=w(!1),g=w(!1),v=w(!1),y=w([]),T=w(!1),I=w(null),C=w(null),A=E(()=>l.value.filter(P=>!P.requiresUserSelection&&P.quantity>0)),B=E(()=>l.value.filter(P=>P.requiresUserSelection&&P.quantity>0)),b=E(()=>B.value.every(P=>p.value.filter(U=>U.auctionItemId===P.itemId).reduce((U,W)=>U+W.quantity,0)>=P.quantity));function $(P){const H=P.elements.find(U=>U.type==="amount");return H?H.selectedAmount??H.minimum??0:0}const D=E(()=>y.value.filter(P=>P.required).map(P=>({name:P.title,title:P.title,price:P.pricing.price*$(P)}))),L=E(()=>!T.value&&(d.value!=null||s.value.optionType==="NotSet")&&b.value),S=E(()=>
3{const P=[{label:f("ClusterCheckout_StepChooseItem")||"Kies item",icon:"fa-location-dot",active:!1,completed:!0}];return s.value.optionType&&s.value.optionType!=="NotSet"&&P.push({label:ya(s.value.optionType),icon:"fa-calendar-days",active:!0}),P.push({label:f("ClusterCheckout_StepReceiveVoucher")||"Ontvang voucher",icon:"fa-ticket",active:!1}),P});function x(P){return!!P&&!Dr(P)}oe(async()=>{await ae.get(`/choose-option/initial?orderid=${e.orderId}`).then(async P=>{const H=P.data.data;g.value=H.isClusterAuction,v.value=H.externalItemsSupported===!0,I.value=H.occupancySettings??null;const U=H.orderItems.find(W=>W.isDefault);s.value.itemId=U.itemId,s.value.title=U.title,s.value.image=U.image,s.value.optionType=H.optionType,s.value.numberOfVouchers=U.quantity,s.value.validForPersons=U.validForPersons,s.value.optionType!=="Date"&&s.value.optionType!=="DateTime"&&await fs.fetchOptionsAsync(e.auctionId,s.value.itemId).then(W=>{s.value.optionList=W.data.data,s.value.optionType==="NotSet"&&(d.value=s.value.optionList[0]??null)}),r.value=H.orderItems.find(W=>!W.isDefault&&(W.itemType==="Auction"||W.itemType==="Upgrade")),l.value=H.orderItems.filter(W=>!W.isDefault&&W.itemType==="Upsell"),await Promise.all(l.value.filter(W=>W.requiresUserSelection).map(async W=>{const J=await fs.fetchOptionsAsync(e.auctionId,W.itemId);W.optionList=J.data.data})),t.value.initial=!1})});function R(){d.value=null,c.value=[],p.value=[]}function F(P){d.value&&d.value.id!==P.id&&(s.value.optionType==="Date"||s.value.optionType==="DateTime")&&R(),d.value=P,r.value&&r.value.quantity>0&&(s.value.optionType==="Date"||s.value.optionType==="DateTime")&&(c.value=[],c.value.push({auctionItemId:r.value.itemId,optionId:P.id,displayTitle:P.displayTitle,quantity:r.value.quantity}))}function Y(P){const H=p.value.findIndex(U=>U.optionId===P.optionId&&U.auctionItemId===P.auctionItemId);if(P.quantity<=0)H!==-1&&p.value.splice(H,1);else if(H!==-1){const U=p.value[H];U&&(U.quantity=P.quantity)}else p.value.push({optionId:P.optionId,auctionItemId:P.auctionItemId,displayTitle:P.displayTitle,quantity:P.quantity})}async function G(){if(i.value=null,d.value==null&&s.value.optionType!=="NotSet"){i.value=f("Error_ChooseOption");return}if(g.value){const U={auctionItemOptionId:d.value.id,...C.value!=null?{occupancy:C.value}:{},...v.value?{externalItems:y.value}:{}};await ae.post(`/choose-option/${e.orderId}/choose/clustered`,U).then(W=>{W.data.succeeded?m.value=!0:i.value=f("Error_Common")}).catch(W=>{i.value=W.response.data.errors[0]?.value??f("Error_Common")});return}const P=[];d.value!=null&&s.value.optionType!=="NotSet"&&P.push({auctionItemId:s.value.itemId,optionId:d.value.id,isDefault:!0,quantity:s.value.numberOfVouchers}),c.value.forEach(U=>{P.push({auctionItemId:r.value.itemId,optionId:U.optionId,isDefault:!1,quantity:U.quantity})}),p.value.forEach(U=>{P.push({auctionItemId:U.auctionItemId,optionId:U.optionId,isDefault:!1,quantity:U.quantity})});const H={items:P};C.value!=null&&(H.occupancy=C.value),v.value&&(H.externalItems=y.value),await ae.post(`/choose-option/${e.orderId}/choose`,H).then(U=>{U.data.succeeded?m.value=!0:i.value=f("Error_Common")}).catch(U=>{i.value=U.response.data.errors[0]?.value??f("Error_Common")})}return(P,H)=>(u(),h("div",null,[m.value?(u(),h("div",q0,[o("div",W0,[o("figure",z0,[o("img",{src:"/dist/images/icon_check_pink.svg",width:"50",alt:a(f)("Checkout_Success"),style:{"border-radius":"5px"}},null,8,K0)]),o("div",G0,[o("h1",j0,_(a(f)("Choose_FinishedHeader")),1),o("p",X0,_(a(f)("Choose_FinishedText")),1),o("a",{href:"/myauctions/wonauctions#order-"+e.orderId,class:"btn-n w-100"},[o("span",null,_(a(f)("Button_GoToYourAuction")),1),H[6]||(H[6]=o("span",{class:"icon"},[o("i",{class:"fa-solid fa-chevron-right"})],-1))],8,Y0)])])])):t.value.initial?k("",!0):(u(),h("div",J0,[g.value?(u(),h("div",Z0,[N(ga,{steps:S.value},null,8,["steps"])])):(u(),ee(O0,{key:1,"order-id":e.orderId,"logo-url":e.logoUrl,"back-url":e.backUrl},null,8,["order-id","logo-url","back-url"])),o("div",Q0,[o("div",eb,[o("div",tb,[i.value?(u(),h("div",nb,_(i.value),1)):k("",!0),o("div",ob,[o("div",sb,[x(s.value.image)?(u(),h("div",ib,[o("figure",ab,[o("img",{src:a(jt)(s.value.image),alt:s.value.title??void 0,class:"rounded",onError:H[0]||(H[0]=(...U)=>a(me)&&a(me)(...U))},null,40,rb)])])):k("",!0),o("div",null,[o("h2",lb,_(s.value.numberOfVouchers)+" x "+_(s.value.title),
31)])])]),e.isBundled?(u(),ee(qr,{key:1,text:a(f)("Checkout_BundleAfterChooseText"),class:"mb-4"},null,8,["text"])):k("",!0),s.value.optionType==="String"||s.value.optionType==="Location"?(u(),h("div",cb,[o("div",ub,[o("div",db,[o("h3",hb,_(a(f)("Checkout_ChooseOption")),1)]),o("div",fb,[_t(o("select",{"onUpdate:modelValue":H[1]||(H[1]=U=>d.value=U),class:"form-select w-100"},[o("option",_b,"-- "+_(a(f)("Checkout_SelectOption"))+" --",1),(u(!0),h(z,null,Q(s.value.optionList,U=>(u(),h("option",{key:U.id,value:U},_(U.displayTitle),9,pb))),128))],512),[[Js,d.value]])])])])):k("",!0),N(s0,{"selected-list":c.value,"onUpdate:selectedList":H[2]||(H[2]=U=>c.value=U),"is-cluster-auction":g.value,"default-item":s.value,"additional-item":r.value,"valid-for-persons":s.value.validForPersons},null,8,["selected-list","is-cluster-auction","default-item","additional-item","valid-for-persons"]),s.value.optionType==="Date"||s.value.optionType==="DateTime"?(u(),h("div",mb,[o("div",vb,[o("h2",gb,_(a(f)("Checkout_SelectDate")),1),H[7]||(H[7]=o("hr",{class:"mt-0"},null,-1)),N(wi,{"option-type":s.value.optionType==="DateTime"?"DateTime":"Date","auction-id":e.auctionId,"auction-item-id":s.value.itemId,"selected-date":d.value?.date??void 0,"selected-option-id":d.value?.id,"max-additional":r.value?.quantity??0,onOptionCleared:R,onOptionSelected:F},null,8,["option-type","auction-id","auction-item-id","selected-date","selected-option-id","max-additional"])])])):k("",!0),l.value.length>0&&l.value.find(U=>U.quantity>0)?(u(),ee(A0,{key:4,"default-item":s.value,"upsell-list":l.value,"selected-list":p.value,onUpdateSelected:Y},null,8,["default-item","upsell-list","selected-list"])):k("",!0),N(V0,{modelValue:C.value,"onUpdate:modelValue":H[3]||(H[3]=U=>C.value=U),settings:I.value},null,8,["modelValue","settings"]),N(H0,{items:y.value,"onUpdate:items":H[4]||(H[4]=U=>y.value=U),loading:T.value,"onUpdate:loading":H[5]||(H[5]=U=>T.value=U),supported:v.value,"auction-id":e.auctionId,"auction-item-id":s.value.itemId,"auction-item-option-id":d.value?.id??null,occupancy:C.value},null,8,["items","loading","supported","auction-id","auction-item-id","auction-item-option-id","occupancy"])])]),o("div",yb,[o("div",bb,[o("h2",wb,_(a(f)("Checkout_Summary")),1),o("article",kb,[o("ul",Ib,[o("li",Sb,[o("span",Cb,_(s.value.numberOfVouchers)+"x",1),o("span",$b,[Oe(P.$slots,"default",{},void 0,!0),j(" "+_(s.value.title),1)]),s.value.optionType!=="NotSet"?(u(),h("div",Tb,[o("p",xb,_(a(f)("Checkout_ChosenOption"))+":",1),o("p",Eb,[d.value?(u(),h("span",Ab,_(d.value.displayTitle),1)):(u(),h("span",Lb,[H[8]||(H[8]=o("i",{class:"fa-regular fa-circle-exclamation me-1"},null,-1)),j(" "+_(a(f)("Checkout_NoOptionSelected")),1)]))])])):k("",!0)]),(u(!0),h(z,null,Q(c.value,U=>(u(),h("li",{key:U.auctionItemId,class:"receipt__item"},[o("span",Db,_(U.quantity)+"x",1),o("span",Bb,[o("span",Pb,_(a(f)("Choose_AdditionallyBoughtText")),1),o("span",null,_(U.displayTitle),1)])]))),128)),(u(!0),h(z,null,Q(p.value,U=>(u(),h("li",{key:U.auctionItemId,class:"receipt__item"},[o("span",Ub,_(U.quantity)+"x",1),o("span",Mb,[o("span",Nb,_(a(f)("Checkout_Upsell")),1),o("span",null,_(U.displayTitle),1)])]))),128)),(u(!0),h(z,null,Q(A.value,U=>(u(),h("li",{key:"auto-"+U.itemId,class:"receipt__item"},[o("span",Rb,_(U.quantity)+"x",1),o("span",Ob,[o("span",Fb,_(a(f)("Checkout_Upsell")),1),o("span",null,_(U.title),1)])]))),128))]),N(Wr,{"external-costs":D.value},null,8,["external-costs"]),o("div",Vb,[N(Tt,{class:"btn-n btn-n-pink w-100",disabled:!L.value,action:G},{default:de(()=>[j(_(a(f)("Common_Confirm")),1)]),_:1},8,["disabled"])])])]),N($i,{"order-id":n.orderFriendlyId},null,8,["order-id"])])])]))]))}}),qb=le(Hb,[["__scopeId","data-v-cb6ef9d9"]]),Wb=["data-id"],zb={class:"simple-card__image me-4"},Kb={class:"image is-16by9"},Gb=["src","alt"],jb={class:"simple-card__description ps-0 pt-0 auction-page"},Xb={class:"mb-2 pb-0"},Yb={class:"simple-card__title pb-0"},Jb={key:0,class:"text-muted small d-inline-block mb-1"},Zb={class:"d-flex"},Qb={key:0,class:"ms-auto"},ew={key:0,class:"selectable-radio__dot"},tw=["data-bs-target","aria-controls"],nw={key:0,class:"collapse-header__title"},ow={key:1,class:"collapse-header__title"},sw=["id"],iw=["innerHTML"],aw=["data-bs-target","aria-controls"],rw={class:"collapse-header__title"},lw=["id"],cw=["innerHTML"],uw=q({__name:"SelectableAuctionItem",props:{auctionItem:{},numberOfVouchers:{},multipleAuctionItemsExist:{type:Boolean},isSelected:{type:Boolean}},emits:["selected"],setup(n,{emit:e}){const t=n,s=e,i=()=>{s("selected",t.auctionItem.id)};return(r,l)=>(u(),h("div",{class:"simple-card p-0 mb-4","data-id":t.auctionItem.id},[o("div",{class:"simple-card__top p-3 p-md-4 pb-3 cursor-pointer",onClick:ie(i,["prevent"])},[o("div",zb,[o("figure",Kb,[o("img",{src:a(jt)(t.auctionItem.image),alt:t.auctionItem.title,onError:l[0]||(l[0]=(...d)=>a(me)&&a(me)(...d))},null,40,Gb)])]),o("div",jb,[o("div",Xb,[o("h2",Yb,_(t.numberOfVouchers)+" x "+_(t.auctionItem.title),
31),t.auctionItem.city?(u(),h("span",Jb,[l[3]||(l[3]=o("i",{class:"fa-solid fa-location-dot me-1"},null,-1)),j(" "+_(t.auctionItem.city)+" ",1),t.auctionItem.zipCode?(u(),h(z,{key:0},[j(", "+_(t.auctionItem.zipCode),1)],64)):k("",!0)])):k("",!0),o("div",Zb,[t.multipleAuctionItemsExist?(u(),h("div",Qb,[o("span",{class:V(["selectable-radio",{"selectable-radio--selected":t.isSelected}]),onClick:ie(i,["prevent"])},[t.isSelected?(u(),h("span",ew)):k("",!0)],2)])):k("",!0)])]),t.auctionItem.expectationText?(u(),h("div",{key:0,class:"collapse-wrapper no-border",onClick:l[1]||(l[1]=ie(()=>{},["stop"]))},[o("button",{class:"collapse-header collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#toggle-expectation"+t.auctionItem.id,"aria-expanded":"false","aria-controls":"toggle-expectation"+t.auctionItem.id},[t.auctionItem.IsPhysical?(u(),h("h3",nw,_(a(f)("Auction_ProductSpecificationTitle")),1)):(u(),h("h3",ow,_(a(f)("Auction_WhatToExpectTitle")),1)),l[4]||(l[4]=o("div",{class:"collapse-header__icon"},[o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 12.1 7.5"},[o("path",{d:"M6,7.5L0.7,2.2c-0.4-0.4-0.4-1,0-1.4l0,0c0.4-0.4,1-0.4,1.4,0L6,4.7l4-4c0.4-0.4,1-0.4,1.4,0l0,0c0.4,0.4,0.4,1,0,1.4L6,7.5z"})])],-1))],8,tw),o("div",{id:"toggle-expectation"+t.auctionItem.id,class:"collapse pb-3"},[o("div",{class:"text-muted pb-3 small",innerHTML:t.auctionItem.expectationText},null,8,iw)],8,sw)])):k("",!0),t.auctionItem.goodToKnowText?(u(),h("div",{key:1,class:"collapse-wrapper no-border",onClick:l[2]||(l[2]=ie(()=>{},["stop"]))},[o("button",{class:"collapse-header collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#toggle-goodToKnow"+t.auctionItem.id,"aria-expanded":"false","aria-controls":"toggle-goodToKnow"+t.auctionItem.id},[o("h3",rw,_(a(f)("Auction_GoodToKnowTitle")),1),l[5]||(l[5]=o("div",{class:"collapse-header__icon"},[o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 12.1 7.5"},[o("path",{d:"M6,7.5L0.7,2.2c-0.4-0.4-0.4-1,0-1.4l0,0c0.4-0.4,1-0.4,1.4,0L6,4.7l4-4c0.4-0.4,1-0.4,1.4,0l0,0c0.4,0.4,0.4,1,0,1.4L6,7.5z"})])],-1))],8,aw),o("div",{id:"toggle-goodToKnow"+t.auctionItem.id,class:"collapse pb-3"},[o("div",{class:"text-muted pb-3 small",innerHTML:t.auctionItem.goodToKnowText},null,8,cw)],8,lw)])):k("",!0)])])],8,Wb))}}),dw=le(uw,[["__scopeId","data-v-3065f964"]]),hw=1e4,fw=6e4;function _w(){const n=w(!1),e=w(""),t=()=>new Promise(l=>{navigator.geolocation.getCurrentPosition(d=>l({ok:!0,coords:d.coords}),d=>l({ok:!1,error:d}),{enableHighAccuracy:!1,timeout:hw,maximumAge:fw})}),s=l=>{switch(l.code){case l.PERMISSION_DENIED:return f("ClusterAuction_LocationErrorPermissionDenied");case l.TIMEOUT:return f("ClusterAuction_LocationErrorTimeout");case l.POSITION_UNAVAILABLE:default:return f("ClusterAuction_LocationErrorUnavailable")}};return{isLocating:n,errorMessage:e,getCurrentLocationAsync:async()=>{if(n.value)return null;if(e.value="",!("geolocation"in navigator))return e.value=f("ClusterAuction_LocationErrorUnavailable"),null;n.value=!0;const l=await t();return n.value=!1,l.ok?l.coords:(e.value=s(l.error),null)},resetError:()=>{e.value=""}}}const pw={class:"cluster-search__input-wrapper"},mw={class:"cluster-search__icon"},vw=["placeholder","value"],gw=["aria-label"],yw={key:1,class:"cluster-search__dropdown list-group"},bw={key:0,class:"list-group-item cluster-search__status text-muted"},ww={key:1,class:"list-group-item cluster-search__status text-muted"},kw=["onClick"],Iw={class:"cluster-search__suggestion-icon"},Sw=["disabled"],Cw={class:"cluster-search__use-location-icon"},$w={key:0,class:"cluster-search__location-error mt-1 mb-0",role:"alert"},ba=q({__name:"ClusterAddressSearch",emits:["select","clear"],setup(n,{emit:e}){const t=e,s=w(null),i=w(""),r=w(!1),l=w(!1),{isLocating:d,errorMessage:c,getCurrentLocationAsync:p,resetError:m}=_w(),{result:g,isLoading:v,hasSearched:y,search:T,reset:I}=sl({fetcher:(F,Y)=>pr(F,Y),emptyResult:()=>[],debounceMs:300,minQueryLength:3}),C=E(()=>r.value&&(v.value||y.value||g.value.length>0)),A=E(()=>d.value||l.value),B=()=>{r.value=!0},b=F=>{const Y=F.target;i.value=Y.value,r.value=!0,m(),T(Y.value)},$=F=>{i.value=F.label,r.value=!1,I(),t("select",F)},D=()=>{i.value="",I(),t("clear")},L=F=>{const Y=F.relatedTarget;(!Y||s.value?.contains(Y)!==!0)&&(r.value=!1)},S=()=>{r.value=!1},x=async()=>
3{if(A.value)return;const F=await p();if(F){l.value=!0;try{const Y=await _r(F.latitude,F.longitude);if(!Y){c.value=f("ClusterAuction_LocationErrorUnavailable");return}$(Y)}catch{c.value=f("ClusterAuction_LocationErrorUnavailable")}finally{l.value=!1}}},R=()=>{m()};return(F,Y)=>(u(),h(z,null,[(u(),ee(Zt,{to:"body"},[r.value?(u(),h("div",{key:0,class:"cluster-search__overlay",onMousedown:S},null,32)):k("",!0)])),o("div",{ref_key:"rootEl",ref:s,class:V(["cluster-search",{"cluster-search--open":r.value}]),onFocusout:L},[o("div",pw,[o("span",mw,[N(a(he),{icon:a(fr)},null,8,["icon"])]),o("input",{type:"text",class:"form-control cluster-search__input",placeholder:a(f)("ClusterAuction_AddressSearchPlaceholder"),value:i.value,autocomplete:"off",onInput:b,onFocus:B,onClick:B},null,40,vw),i.value?(u(),h("button",{key:0,type:"button",class:"cluster-search__clear","aria-label":a(f)("General_Clear"),onClick:D},[N(a(he),{icon:a(oi)},null,8,["icon"])],8,gw)):k("",!0),C.value?(u(),h("div",yw,[a(v)?(u(),h("div",bw,[N(a(he),{icon:a(is),spin:""},null,8,["icon"]),j(" "+_(a(f)("ClusterAuction_AddressSearchLoading")),1)])):a(y)&&a(g).length===0?(u(),h("div",ww,_(a(f)("ClusterAuction_AddressSearchNoResults")),1)):k("",!0),(u(!0),h(z,null,Q(a(g),G=>(u(),h("button",{key:`${G.latitude}-${G.longitude}-${G.label}`,type:"button",class:"list-group-item list-group-item-action cluster-search__suggestion",onMousedown:Y[0]||(Y[0]=ie(()=>{},["prevent"])),onClick:P=>$(G)},[o("span",Iw,[N(a(he),{icon:a(bn)},null,8,["icon"])]),j(" "+_(G.label),1)],40,kw))),128))])):k("",!0)]),o("button",{type:"button",class:"cluster-search__use-location mt-2",disabled:A.value,onClick:x,onFocus:R},[o("span",Cw,[N(a(he),{icon:A.value?a(is):a(bn),spin:A.value},null,8,["icon","spin"])]),j(" "+_(a(f)("ClusterAuction_UseMyLocation")),1)],40,Sw),a(c)?(u(),h("p",$w,_(a(c)),1)):k("",!0)],34)],64))}}),Tw={class:"h-scroller"},xw={key:0,class:"h-scroller__fade h-scroller__fade--left"},Ew=["aria-label"],Aw={key:1,class:"h-scroller__fade h-scroller__fade--right"},Lw=["aria-label"],Dw=q({__name:"HorizontalScroller",setup(n){const e=w(null),t=w(null),s=w(!1),i=w(!1);let r=null;const l=()=>{const c=e.value;if(!c){s.value=!1,i.value=!1;return}const p=Zr(c);s.value=p.canScrollLeft,i.value=p.canScrollRight},d=c=>{const p=e.value;p&&Qr(p,c)};return oe(()=>{l(),r=new ResizeObserver(()=>l()),e.value&&r.observe(e.value),t.value&&r.observe(t.value)}),Pe(()=>{r?.disconnect(),r=null}),(c,p)=>(u(),h("div",Tw,[s.value?(u(),h("div",xw,[p[2]||(p[2]=o("span",{class:"h-scroller__rect"},null,-1)),p[3]||(p[3]=o("span",{class:"h-scroller__gradient"},null,-1)),o("button",{type:"button",class:"h-scroller__chevron h-scroller__chevron--left","aria-label":a(f)("HorizontalScroller_ScrollLeft"),onClick:p[0]||(p[0]=m=>d(-1))},[N(a(he),{icon:a(mr),"aria-hidden":"true"},null,8,["icon"])],8,Ew)])):k("",!0),o("div",{ref_key:"viewportRef",ref:e,class:"h-scroller__viewport",onScroll:l},[o("div",{ref_key:"trackRef",ref:t,class:"h-scroller__track"},[Oe(c.$slots,"default")],512)],544),i.value?(u(),h("div",Aw,[p[4]||(p[4]=o("span",{class:"h-scroller__gradient"},null,-1)),p[5]||(p[5]=o("span",{class:"h-scroller__rect"},null,-1)),o("button",{type:"button",class:"h-scroller__chevron h-scroller__chevron--right","aria-label":a(f)("HorizontalScroller_ScrollRight"),onClick:p[1]||(p[1]=m=>d(1))},[N(a(he),{icon:a(ni),"aria-hidden":"true"},null,8,["icon"])],8,Lw)])):k("",!0)]))}}),Bw={class:"cluster-filters",role:"group","aria-labelledby":"cluster-filters-title"},Pw={id:"cluster-filters-title",class:"cluster-filters__title"},Uw=["aria-pressed","onClick"],Mw={class:"cluster-filters__pill-label"},wa=q({__name:"ClusterFilterPills",props:{filters:{},isSelected:{type:Function}},emits:["toggle"],setup(n,{emit:e}){const t=e,s=i=>{t("toggle",i)};return(i,r)=>(u(),h("div",Bw,[o("span",Pw,_(a(f)("ClusterAuction_FilterTitle")),1),N(Dw,null,{default:de(()=>[(u(!0),h(z,null,Q(n.filters,l=>(u(),h("button",{key:l.name,type:"button",class:V(["cluster-filters__pill",{"cluster-filters__pill--selected":n.isSelected(l.name)}]),"aria-pressed":n.isSelected(l.name),onClick:d=>s(l.name)},[o("span",Mw,_(l.name),1),o("span",{class:V(["cluster-filters__pill-remove",{"cluster-filters__pill-remove--visible":n.isSelected(l.name)}])},[...r[0]||(r[0]=[o("i",{class:"fa-solid fa-xmark","aria-hidden":"true"},null,-1)])],2)],10,Uw))),128))]),_:1})]))}}),Nw=["aria-expanded"],Rw={class:"cluster-sort__label"},Ow={class:"cluster-sort__value"},Fw=["aria-label"],Vw=["aria-checked","onClick"],Hw={class:"cluster-sort__option-check","aria-hidden":"true"},qw={class:"cluster-sort__option-label"},ka=q({__name:"ClusterSortDropdown",props:{modelValue:{},distanceAvailable:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,s=e,i=w(!1),r=w(null),l=w(null),d=w(null),c=E(()=>{const b=[{value:"name-asc",label:f("ClusterAuction_SortNameAsc")},{value:"name-desc",label:f("ClusterAuction_SortNameDesc")}];
3return t.distanceAvailable&&b.push({value:"distance",label:f("ClusterAuction_SortShortestDistance")}),b}),p=E(()=>{const b=c.value.find($=>$.value===t.modelValue);return b?b.label:""}),m=()=>d.value?Array.from(d.value.querySelectorAll('[role="menuitemradio"]')):[],g=b=>{const $=m();if($.length===0)return;const D=(b+$.length)%$.length;$[D]?.focus()},v=()=>{i.value=!0,Ue(()=>{const b=c.value.findIndex($=>$.value===t.modelValue);g(b<0?0:b)})},y=(b=!0)=>{i.value&&(i.value=!1,b&&Ue(()=>l.value?.focus()))},T=()=>{i.value?y():v()},I=b=>{s("update:modelValue",b),y()},C=b=>{(b.key==="ArrowDown"||b.key==="ArrowUp"||b.key==="Enter"||b.key===" ")&&(b.preventDefault(),v())},A=b=>{const $=m();if($.length===0)return;const D=$.indexOf(document.activeElement);switch(b.key){case"ArrowDown":b.preventDefault(),g(D+1);break;case"ArrowUp":b.preventDefault(),g(D-1);break;case"Home":b.preventDefault(),g(0);break;case"End":b.preventDefault(),g($.length-1);break;case"Escape":b.preventDefault(),y();break;case"Tab":y(!1);break}},B=b=>{!i.value||!r.value||r.value.contains(b.target)||(i.value=!1)};return oe(()=>{document.addEventListener("mousedown",B)}),Pe(()=>{document.removeEventListener("mousedown",B)}),(b,$)=>(u(),h("div",{ref_key:"rootRef",ref:r,class:V(["cluster-sort",{"cluster-sort--open":i.value}])},[o("button",{ref_key:"triggerRef",ref:l,type:"button",class:"cluster-sort__trigger","aria-haspopup":"menu","aria-expanded":i.value,onClick:T,onKeydown:C},[o("span",Rw,_(a(f)("ClusterAuction_SortLabel")),1),o("span",Ow,_(p.value),1),o("span",{class:V(["cluster-sort__chevron",{"cluster-sort__chevron--open":i.value}])},[N(a(he),{icon:a(ri)},null,8,["icon"])],2)],40,Nw),i.value?(u(),h("ul",{key:0,ref_key:"menuRef",ref:d,class:"cluster-sort__menu",role:"menu","aria-label":a(f)("ClusterAuction_SortLabel"),onKeydown:A},[(u(!0),h(z,null,Q(c.value,D=>(u(),h("li",{key:D.value,class:"cluster-sort__menu-item",role:"none"},[o("button",{type:"button",role:"menuitemradio","aria-checked":D.value===n.modelValue,class:V(["cluster-sort__option",{"cluster-sort__option--selected":D.value===n.modelValue}]),onClick:L=>I(D.value)},[o("span",Hw,[D.value===n.modelValue?(u(),ee(a(he),{key:0,icon:a(vr)},null,8,["icon"])):k("",!0)]),o("span",qw,_(D.label),1)],10,Vw)]))),128))],40,Fw)):k("",!0)],2))}}),Ps={default:"/dist/images/mapmarker.svg",active:"/dist/images/mapmarker-pink.svg"},yt={normal:{iconSize:[35,45],iconAnchor:[17,45],popupAnchor:[0,-40]}},Ww=15,zw=100,Kw=5,Gw=3,jw=14,Xw=11,Us=11,Ft=.6,Ia=q({__name:"ClusterLocationMap",props:{locations:{default:()=>[]},selectedLocationId:{default:null},hoveredLocationId:{default:null},userPosition:{default:null}},emits:["select"],setup(n,{expose:e,emit:t}){const s=n,i=[16,48],r=[48,16],l=t,d=w(null);let c=null;const p={};let m=null;const g=xe.icon({iconUrl:Ps.default,iconSize:yt.normal.iconSize,iconAnchor:yt.normal.iconAnchor,popupAnchor:yt.normal.popupAnchor}),v=xe.icon({iconUrl:Ps.active,iconSize:yt.normal.iconSize,iconAnchor:yt.normal.iconAnchor,popupAnchor:yt.normal.popupAnchor});let y=null;const T=G=>G===s.selectedLocationId||G===s.hoveredLocationId||G===y?v:g,I=G=>{const P=p[G];P&&P.setIcon(T(G))},C=G=>{const P=G.id,H=xe.marker([G.address.latitude,G.address.longitude],{icon:T(P)});H.on("click",()=>{l("select",G)}),H.on("mouseover",()=>{y=P,I(P)}),H.on("mouseout",()=>{y===P&&(y=null),I(P)}),p[P]=H,H.addTo(c)},A=()=>{if(!d.value||s.locations.length===0)return;const G={zoomControl:!1,attributionControl:!1};c=xe.map(d.value,G),c.scrollWheelZoom.disable(),xe.control.zoom({position:"topright"}).addTo(c),xe.tileLayer("https://api.maptiler.com/maps/streets-v2/256/{z}/{x}/{y}@2x.png?key=HxfkaPBFnNysZhgOAlSX",{maxZoom:19}).addTo(c),s.locations.forEach(P=>C(P)),L(!1),s.userPosition&&b(s.userPosition)},B=G=>{c&&G&&c.setView([G.address.latitude,G.address.longitude],15,{animate:!0})},b=G=>{if(!c)return;if(m&&(c.removeLayer(m),m=null),!G){L(!0);return}const P=xe.divIcon({className:"cluster-user-location",html:'<span class="cluster-user-location__pulse"></span><span class="cluster-user-location__dot"></span>',iconSize:[40,40],iconAnchor:[20,20]});m=xe.marker([G.latitude,G.longitude],{icon:P,interactive:!1,keyboard:!1}),m.addTo(c),S(G)},$=G=>{const P=xe.latLng(G.latitude,G.longitude);return s.locations.map(H=>({location:H,distanceKm:P.distanceTo(xe.latLng(H.address.latitude,H.address.longitude))/1e3})).sort((H,U)=>H.distanceKm-U.distanceKm)},D=(G,P,H)=>{const U=[G,...P.map(W=>[W.address.latitude,W.address.longitude])];c.flyToBounds(xe.latLngBounds(U),{paddingTopLeft:i,paddingBottomRight:r,maxZoom:H,duration:Ft})},L=G=>{if(!c||s.locations.length===0)return;if(s.locations.length===1){const H=[s.locations[0].address.latitude,s.locations[0].address.longitude];G?c.flyTo(H,14,{duration:Ft}):c.setView(H,14);return}const P=xe.latLngBounds(s.locations.map(H=>[H.address.latitude,H.address.longitude]));G?c.flyToBounds(P,{padding:[50,50],duration:Ft}):c.fitBounds(P,{padding:[50,50]})},S=G=>{const P=[G.latitude,G.longitude];if(s.locations.length===0){c.flyTo(P,Us,{duration:Ft});return}const H=$(G),U=H.filter(J=>J.distanceKm<=Ww).slice(0,Kw);if(U.length>0){D(P,U.map(J=>J.location),jw);return}const W=H.filter(J=>J.distanceKm<=zw).slice(0,Gw);if(W.length>0){D(P,W.map(J=>J.location),Xw);return}c.flyTo(P,Us,{duration:Ft})},x=()=>{L(!1)},R=()=>{c&&setTimeout(()=>{c?.invalidateSize()},350)};te(()=>s.selectedLocationId,(G,P)=>{P&&I(P),G&&I(G)}),te(()=>s.hoveredLocationId,(G,P)=>{P&&I(P),G&&I(G)}),te(()=>s.userPosition,G=>{b(G)}),te(()=>s.locations,G=>
3{c&&(Object.values(p).forEach(P=>c.removeLayer(P)),Object.keys(p).forEach(P=>delete p[P]),G.forEach(P=>C(P)),s.userPosition?S(s.userPosition):L(!1))},{deep:!0});const F=G=>{(G.key==="Control"||G.key==="Meta")&&c&&!c.scrollWheelZoom.enabled()&&c.scrollWheelZoom.enable()},Y=G=>{(G.key==="Control"||G.key==="Meta")&&c&&c.scrollWheelZoom.enabled()&&c.scrollWheelZoom.disable()};return oe(()=>{Ue(()=>A()),window.addEventListener("keydown",F),window.addEventListener("keyup",Y)}),Te(()=>{window.removeEventListener("keydown",F),window.removeEventListener("keyup",Y),c&&(c.remove(),c=null)}),e({zoomToLocation:B,fitAllMarkers:x,invalidateSize:R}),(G,P)=>(u(),h("div",{ref_key:"mapContainer",ref:d,class:"cluster-map"},null,512))}}),Yw={class:"scrollable-list__content"},Ms=1,Jw=q({__name:"ScrollableList",setup(n,{expose:e}){const t=w(null),s=w(!1),i=w(!1);let r=null;const l=()=>{const c=t.value;if(!c){s.value=!1,i.value=!1;return}s.value=c.scrollTop>Ms,i.value=c.scrollHeight-c.scrollTop-c.clientHeight>Ms};return oe(()=>{Ue(l),t.value&&(r=new ResizeObserver(l),r.observe(t.value)),window.addEventListener("resize",l)}),Te(()=>{r?.disconnect(),window.removeEventListener("resize",l)}),e({refresh:l,scrollToTop:()=>{t.value&&(t.value.scrollTop=0),l()}}),(c,p)=>(u(),h("div",{ref_key:"scrollEl",ref:t,class:"scrollable-list",onScrollPassive:l},[o("div",{class:V(["scrollable-list__fade scrollable-list__fade--top",{"scrollable-list__fade--visible":s.value}]),"aria-hidden":"true"},null,2),o("div",Yw,[Oe(c.$slots,"default",{},void 0,!0)]),o("div",{class:V(["scrollable-list__fade scrollable-list__fade--bottom",{"scrollable-list__fade--visible":i.value}]),"aria-hidden":"true"},null,2)],544))}}),Zw=le(Jw,[["__scopeId","data-v-6991af8c"]]),Qw="/dist/images/logo-placeholder.png",Ns=n=>n.filter(e=>!!(e&&e.trim())).join(" ");function Sa(){return{buildAddressLine:s=>{const i=Ns([s.address.street,s.address.houseNumber,s.address.houseNumberAddition]),r=Ns([s.address.zipCode,s.address.city]);return[i,r].filter(l=>l!=="").join(", ")},resolveImage:s=>s.image&&s.image.trim()?s.image:Qw,formatItemsAvailable:(s,i)=>{const r=i.trim();return s.items.length<2||r===""?null:f("ClusterAuction_ItemsAvailable",{itemCount:s.items.length,unit:r.toLocaleLowerCase(Zs().culture)})}}}function Ca(n){return{formatDistanceKm:t=>{const s=n.value;if(!s)return null;const i=ki(s,{latitude:t.address.latitude,longitude:t.address.longitude}),r=ma(i,1);return f("ClusterAuction_DistanceKm",{distance:r})}}}const ek={class:"cluster-list"},tk={key:0,class:"cluster-list__empty"},nk=["onClick"],ok={key:0,class:"cluster-location-card__image"},sk=["src","alt"],ik={class:"cluster-location-card__content"},ak={class:"cluster-location-card__text"},rk={class:"cluster-location-card__title"},lk={class:"cluster-location-card__address"},ck={class:"cluster-location-card__address-text"},uk={key:0,class:"cluster-location-card__meta"},dk={key:0,class:"cluster-availability cluster-location-card__availability"},hk={key:1,class:"cluster-location-card__distance"},fk={class:"cluster-location-card__distance-icon","aria-hidden":"true"},$a=q({__name:"ClusterLocationList",props:{locations:{default:()=>[]},sellingUnit:{},userPosition:{default:null}},emits:["select"],setup(n,{expose:e,emit:t}){const s=n,{buildAddressLine:i,resolveImage:r,formatItemsAvailable:l}=Sa(),{formatDistanceKm:d}=Ca(Qs(s,"userPosition")),c=t,p=E(()=>s.locations.some(T=>!!T.image?.trim())),m=E(()=>s.locations.map(T=>({location:T,image:p.value?r(T):null,addressLine:i(T),availability:l(T,s.sellingUnit),distance:d(T)}))),g=w(null),v=T=>{c("select",T)};return e({scrollToTop:()=>{g.value?.scrollToTop()}}),(T,I)=>(u(),h("div",ek,[n.locations.length===0?(u(),h("div",tk,[I[1]||(I[1]=o("i",{class:"fa-solid fa-location-dot fa-2x mb-2 d-block"},null,-1)),j(" "+_(a(f)("ClusterAuction_NoLocationsInView")),1)])):(u(),ee(Zw,{key:1,ref_key:"scrollableRef",ref:g,class:"cluster-list__scroll"},{default:de(()=>[(u(!0),h(z,null,Q(m.value,C=>(u(),h("button",{key:C.location.id,type:"button",class:"cluster-location-card",onClick:A=>v(C.location)},[C.image?(u(),h("span",ok,[o("img",{src:C.image,alt:C.location.title,loading:"lazy",onError:I[0]||(I[0]=(...A)=>a(me)&&a(me)(...A))},null,40,sk)])):k("",!0),o("span",ik,[o("span",ak,[o("span",rk,_(C.location.title),1),o("span",lk,[o("span",ck,_(C.addressLine),1),N(li,{country:C.location.address.country},null,8,["country"])])]),C.availability||C.distance?(u(),h("span",uk,[C.availability?(u(),h("span",dk,_(C.availability),1)):k("",!0),C.distance?(u(),h("span",hk,[o("span",fk,[N(a(he),{icon:a(bn)},null,8,["icon"])]),j(" "+_(C.distance),1)])):k("",!0)])):k("",!0)]),I[2]||(I[2]=o("span",{class:"cluster-location-card__chevron","aria-hidden":"true"},[o("i",{class:"fa-solid fa-chevron-right"})],-1))],8,nk))),128))]),_:1},512))]))}}),_k={street:"",houseNumber:"",houseNumberAddition:"",city:"",zipCode:"",country:"",latitude:0,longitude:0};function pk(n){const e=n.address??null;return{auctionItemId:n.id,title:n.title,advertiserImage:n.image&&n.image.trim()?n.image:null,type:n.type,optionType:n.optionType,maxAdditional:n.maxAdditional,numberOfVouchers:n.numberOfVouchers,filterCategories:n.filterCategories??[],hasLocation:e!==null,whatToExpect:n.whatToExpect??"",goodToKnow:n.goodToKnow??"",calendarExplanationText:null,location:e??_
3k}}async function mk(n){return(await Ke.get(`/cluster/initial?orderid=${n}`)).data.data}async function vk(n){const t=(await Ke.get(`/cluster/available-items?orderid=${n}`)).data.data;return{items:t.items.map(pk),availableFilters:t.availableFilters}}async function gk(n,e){return(await Ke.post(`/cluster/check-availability?orderid=${n}`,{auctionItemId:e})).data.data.available}async function yk(n,e){return await Ke.post(`/cluster/choose-item?orderid=${n}`,{auctionItemId:e})}function Ta(n){const e=w([]),t=E(()=>e.value.length===0?n.value:n.value.filter(r=>r.filterCategories.some(l=>e.value.includes(l)))),s=r=>e.value.includes(r);return{selectedFilters:e,filteredLocations:t,isSelected:s,toggleFilter:r=>{s(r)?e.value=e.value.filter(l=>l!==r):e.value=[...e.value,r]}}}function xa(n,e){const t=w("name-asc"),s=E(()=>{const i=[...n.value];switch(t.value){case"name-desc":return i.sort((r,l)=>l.title.localeCompare(r.title));case"distance":{const r=e.value;if(!r)return i.sort((d,c)=>d.title.localeCompare(c.title));const l=i.map(d=>({location:d,distance:ki(r,{latitude:d.address.latitude,longitude:d.address.longitude})}));return l.sort((d,c)=>d.distance-c.distance),l.map(d=>d.location)}default:return i.sort((r,l)=>r.title.localeCompare(l.title))}});return te(e,(i,r)=>{if(!r&&i){t.value="distance";return}!i&&t.value==="distance"&&(t.value="name-asc")},{flush:"sync"}),{sortBy:t,sortedLocations:s}}function ao(n){return{id:n.auctionItemId,advertiserId:null,title:n.title,image:n.advertiserImage,address:n.location,filterCategories:n.filterCategories,items:[{auctionItemId:n.auctionItemId,title:n.title,optionType:n.optionType,upgradePrice:null,whatToExpect:n.whatToExpect,goodToKnow:n.goodToKnow,calendarExplanationText:n.calendarExplanationText}]}}function bk(n,e){const t=w([]),s=w([]),i=w(!0);async function r(){i.value=!0;const B=await vk(n);t.value=B.items,s.value=B.availableFilters,i.value=!1}const l=E(()=>new Map(t.value.map(B=>[B.auctionItemId,B]))),d=E(()=>t.value.map(ao)),{isSelected:c,filteredLocations:p,toggleFilter:m}=Ta(d),g=E(()=>p.value.map(B=>l.value.get(B.id)).filter(B=>B!==void 0)),v=E(()=>g.value.filter(B=>B.hasLocation)),y=E(()=>g.value.filter(B=>!B.hasLocation)),T=E(()=>t.value.some(B=>B.hasLocation)),I=E(()=>v.value.map(ao)),{sortBy:C,sortedLocations:A}=xa(I,e);return{availableItems:t,availableFilters:s,itemsLoading:i,loadAsync:r,toClusterLocation:ao,isSelected:c,toggleFilter:m,filteredItems:g,locatedItems:v,nonLocatedItems:y,hasAnyLocations:T,sortBy:C,sortedLocations:A}}function wk(n,e){const t=w(!0),s=w(null),i=w(""),r=w({title:null,optionType:null,numberOfVouchers:0}),l=w(null),d=w([]),c=E(()=>e.value?.title??r.value.title),p=E(()=>r.value.numberOfVouchers+(l.value?.quantity??0)),m=E(()=>{const y=l.value?.quantity??0;return y<=0?[]:[{displayTitle:c.value,quantity:y}]}),g=E(()=>{const y=[{label:f("ClusterCheckout_StepChooseItem")||"Kies item",icon:"fa-location-dot",active:!0}],T=e.value?.optionType;return(!T||T!=="NotSet")&&y.push({label:ya(T),icon:"fa-calendar-days",active:!1}),y.push({label:f("ClusterCheckout_StepReceiveVoucher")||"Ontvang voucher",icon:"fa-ticket",active:!1}),y});async function v(){const y=await mk(n),T=y.orderItems.find(I=>I.isDefault);r.value={title:T?.title??null,optionType:y.optionType,numberOfVouchers:T?.quantity??0},l.value=y.orderItems.find(I=>!I.isDefault&&I.itemType==="Auction")??null,y.optionTypeText&&(s.value=y.optionTypeText),i.value=y.sellingUnit??"",t.value=!1}return{initialLoading:t,clusterOptionExplanation:s,sellingUnit:i,defaultPlaceholderItem:r,totalNumberOfVouchers:p,summaryItemTitle:c,selectedAdditionalList:m,selectedUpsellList:d,stepperSteps:g,loadAsync:v}}const kk=300,Ik=3e4,Sk=400;function Ck(n,e){const t=w(new Map),s=w(null);let i=null,r=null;function l(){r&&(clearTimeout(r),r=null)}const d=E(()=>
3{if(!e.value)return null;const g=t.value.get(e.value);return g?g.available:null});async function c(g){l(),r=setTimeout(()=>{s.value=g},Sk);try{const v=await gk(n,g);return t.value.set(g,{available:v,checkedAt:Date.now()}),v}catch{return t.value.set(g,{available:!1,checkedAt:Date.now()}),!1}finally{l(),s.value===g&&(s.value=null)}}function p(g){i&&clearTimeout(i),i=setTimeout(()=>{c(g)},kk)}async function m(g){const v=t.value.get(g);return!v||Date.now()-v.checkedAt>Ik?await c(g):v.available}return ei(()=>{i&&(clearTimeout(i),i=null),l()}),{stockCheckLoading:s,selectedItemAvailable:d,requestStockCheck:p,ensureFreshStock:m}}const $k={class:"mt-3 mt-md-5"},Tk={key:1,class:"checkout__row"},xk={class:"checkout__content"},Ek={class:"cart"},Ak={key:0,class:"alert alert-danger error-container"},Lk={key:1},Dk={key:2},Bk=["aria-label"],Pk={class:"cluster-list-header"},Uk={class:"cluster-list-header__count"},Mk={key:7},Nk={key:0,class:"h5 mt-4 mb-3"},Rk={key:8,class:"text-muted text-center py-4"},Ok={key:10,class:"alert alert-warning mt-2"},Fk={class:"h6 fw-semibold mb-2"},Vk={class:"cluster-detail cluster-detail--active"},Hk={class:"cluster-detail__header"},qk={class:"cluster-detail__title"},Wk={class:"cluster-detail__body"},zk={key:0,class:"cluster-detail__section"},Kk={class:"cluster-detail__section-title mb-2"},Gk=["innerHTML"],jk={key:1,class:"cluster-detail__section mt-3"},Xk={class:"cluster-detail__section-title mb-2"},Yk=["innerHTML"],Jk={class:"checkout__receipt"},Zk={class:"simple-card receipt__holder"},Qk={class:"receipt__title"},e2={class:"receipt"},t2={class:"receipt__items"},n2={class:"receipt__item receipt__item--main"},o2={class:"receipt__quantity"},s2={class:"receipt__description"},i2={key:0,class:"receipt__option-holder"},a2={class:"mb-0 mt-0"},r2={class:"mb-0 receipt__option-text"},l2={class:"text-muted"},c2={class:"receipt__quantity"},u2={class:"receipt__description"},d2={class:"badge xs-small me-2 bg-primary"},h2={class:"receipt__quantity"},f2={class:"receipt__description"},_2={class:"receipt-buttons"},p2=["disabled"],m2="Dit item is helaas niet meer beschikbaar. Kies een ander item.",v2=q({__name:"ChooseItem",props:{orderId:{},orderFriendlyId:{},auctionId:{}},setup(n){const e=n,t=w(null),s=w(null),i=w(null),r=w(null),l=w(null),d=w(null),c=w(!1),{availableItems:p,availableFilters:m,itemsLoading:g,loadAsync:v,toClusterLocation:y,isSelected:T,toggleFilter:I,filteredItems:C,locatedItems:A,nonLocatedItems:B,hasAnyLocations:b,sortBy:$,sortedLocations:D}=bk(e.orderId,i),L=E(()=>p.value.find(ke=>ke.auctionItemId===s.value)),{initialLoading:S,clusterOptionExplanation:x,sellingUnit:R,defaultPlaceholderItem:F,totalNumberOfVouchers:Y,summaryItemTitle:G,selectedAdditionalList:P,selectedUpsellList:H,stepperSteps:U,loadAsync:W}=wk(e.orderId,L),{stockCheckLoading:J,selectedItemAvailable:ue,requestStockCheck:Ie,ensureFreshStock:be}=Ck(e.orderId,s),we=E(()=>({initial:S.value,items:g.value})),Ge=E(()=>s.value!=null&&ue.value===!0&&!J.value),Fe=()=>{Ue(()=>l.value?.scrollToTop())};te($,Fe),te(C,ke=>{s.value&&!ke.some(ve=>ve.auctionItemId===s.value)&&(s.value=null),Fe()}),oe(async()=>{await W(),await v(),p.value.length===1&&qe(p.value[0].auctionItemId)});function qe(ke){if(s.value===ke)return;s.value=ke,t.value=null;const ve=p.value.find(_e=>_e.auctionItemId===ke);ve?.hasLocation&&r.value&&r.value.zoomToLocation(y(ve)),Ue(()=>{d.value&&d.value.scrollIntoView({behavior:"smooth",block:"nearest"})}),Ie(ke)}function je(ke){qe(ke.id)}function fe(ke){i.value=ke}function Z(){i.value=null}function ne(){c.value=!c.value,r.value&&r.value.invalidateSize()}async function re(){if(t.value=null,s.value==null){t.value=f("Error_ChooseItem");return}if(!await be(s.value)){t.value=f("Error_ItemUnavailable")||m2;return}try{(await yk(e.orderId,s.value)).data.succeeded?window.location.href=`/choose/${e.orderId}`:t.value=f("Error_Common")}catch(ve){const _e=ve;t.value=_e.response?.data?.errors?.[0]?.value??f("Error_Common")}}return(ke,ve)=>(u(),h("div",$k,[we.value.initial?k("",!0):(u(),ee(ga,{key:0,steps:a(U)},null,8,["steps"])),we.value.initial?k("",!0):(u(),h("div",Tk,[o("div",xk,[o("div",Ek,[t.value?(u(),h("div",Ak,_(t.value),1)):k("",!0),a(x)?(u(),h("p",Lk,_(a(x)),1)):(u(),h("p",Dk,_(a(f)("Cluster_ChooseItemExplanation")),1)),a(b)&&!we.value.items?(u(),h("div",{key:3,class:V(["cluster-overview__map-container mb-3",{"cluster-overview__map-container--expanded":c.value}])},[N(Ia,{ref_key:"mapRef",ref:r,locations:a(D),"selected-location-id":s.value,"user-position":i.value,onSelect:je},null,8,["locations","selected-location-id","user-position"]),o("button",{type:"button",class:V(["cluster-overview__map-toggle",{"cluster-overview__map-toggle--expanded":c.value}]),"aria-label":c.value?a(f)("ClusterAuction_ShrinkMap"):a(f)("ClusterAuction_ExpandMap"),onClick:ne}
3,[N(a(he),{icon:c.value?a(ci):a(ui)},null,8,["icon"])],10,Bk)],2)):k("",!0),a(p).length>1?(u(),ee(ba,{key:4,onSelect:fe,onClear:Z})):k("",!0),a(m).length>1?(u(),ee(wa,{key:5,filters:a(m),"is-selected":a(T),onToggle:a(I)},null,8,["filters","is-selected","onToggle"])):k("",!0),a(A).length>0&&!we.value.items?(u(),h(z,{key:6},[o("div",Pk,[o("span",Uk,_(a(f)("ClusterAuction_ShowingLocations",{count:a(D).length})),1),N(ka,{modelValue:a($),"onUpdate:modelValue":ve[0]||(ve[0]=_e=>yo($)?$.value=_e:null),"distance-available":i.value!==null},null,8,["modelValue","distance-available"])]),N($a,{ref_key:"listRef",ref:l,locations:a(D),"user-position":i.value,"selling-unit":a(R),onSelect:je},null,8,["locations","user-position","selling-unit"])],64)):k("",!0),a(B).length>0&&!we.value.items?(u(),h("div",Mk,[a(A).length>0?(u(),h("h3",Nk,_(a(f)("ClusterCheckout_OtherItems")||"Overige items"),1)):k("",!0),(u(!0),h(z,null,Q(a(B),_e=>(u(),h("div",{key:_e.auctionItemId},[N(dw,{"auction-item":{id:_e.auctionItemId,title:_e.title,image:_e.advertiserImage??"",expectationText:_e.whatToExpect,goodToKnowText:_e.goodToKnow,city:_e.location.city,zipCode:_e.location.zipCode},"is-selected":_e.auctionItemId===s.value,"number-of-vouchers":a(Y),"multiple-auction-items-exist":a(p).length>1,onSelected:ve[1]||(ve[1]=Xe=>qe(Xe))},null,8,["auction-item","is-selected","number-of-vouchers","multiple-auction-items-exist"])]))),128))])):k("",!0),a(C).length===0&&!we.value.items?(u(),h("div",Rk,[ve[2]||(ve[2]=o("i",{class:"fa-solid fa-search fa-2x mb-2 d-block"},null,-1)),j(" "+_(a(f)("ClusterAuction_NoLocationsInView")||"Geen resultaten gevonden"),1)])):k("",!0),a(J)?(u(),ee(Dn,{key:9,class:"text-muted small mt-2",message:a(f)("ClusterCheckout_CheckingAvailability")||"Beschikbaarheid controleren..."},null,8,["message"])):k("",!0),a(ue)===!1&&!a(J)?(u(),h("div",Ok,[ve[3]||(ve[3]=o("i",{class:"fa-solid fa-triangle-exclamation me-1"},null,-1)),j(" "+_(a(f)("Error_ItemUnavailable")||"Dit item is helaas niet meer beschikbaar. Kies een ander item."),1)])):k("",!0),L.value?(u(),h("div",{key:11,ref_key:"detailRef",ref:d,class:"mt-3"},[o("h3",Fk,_(a(f)("ClusterCheckout_SelectedItem")),1),o("div",Vk,[o("div",Hk,[o("h3",qk,_(L.value.title),1)]),o("div",Wk,[L.value.whatToExpect?(u(),h("div",zk,[o("h4",Kk,_(a(f)("Auction_WhatToExpectTitle")),1),o("div",{class:"text-muted small",innerHTML:L.value.whatToExpect},null,8,Gk)])):k("",!0),L.value.goodToKnow?(u(),h("div",jk,[o("h4",Xk,_(a(f)("Auction_GoodToKnowTitle")),1),o("div",{class:"text-muted small",innerHTML:L.value.goodToKnow},null,8,Yk)])):k("",!0)])])],512)):k("",!0)])]),o("div",Jk,[o("div",Zk,[o("h2",Qk,_(a(f)("Checkout_Summary")),1),o("article",e2,[o("ul",t2,[o("li",n2,[o("span",o2,_(a(F).numberOfVouchers)+"x",1),o("span",s2,[Oe(ke.$slots,"default",{},void 0,!0),j(" "+_(a(G)),1)]),a(F).optionType!=="NotSet"?(u(),h("div",i2,[o("p",a2,_(a(f)("Checkout_ChosenOption"))+":",1),o("p",r2,[o("span",l2,[ve[4]||(ve[4]=o("i",{class:"fa-regular fa-circle-exclamation me-1"},null,-1)),j(" "+_(a(f)("Checkout_NoOptionSelected")),1)])])])):k("",!0)]),(u(!0),h(z,null,Q(a(P),(_e,Xe)=>(u(),h("li",{key:`additional-${Xe}`,class:"receipt__item"},[o("span",c2,_(_e.quantity)+"x",1),o("span",u2,[o("span",d2,_(a(f)("Choose_AdditionallyBoughtText")),1),o("span",null,_(_e.displayTitle),1)])]))),128)),(u(!0),h(z,null,Q(a(H),(_e,Xe)=>(u(),h("li",{key:`upsell-${Xe}`,class:"receipt__item"},[o("span",h2,_(_e.quantity)+"x",1),o("span",f2,[ve[5]||(ve[5]=o("span",{class:"badge xs-small me-2 bg-success"},"upsell",-1)),o("span",null,_(_e.displayTitle),1)])]))),128))]),o("div",_2,[o("button",{class:"btn-n btn-n-pink w-100",disabled:!Ge.value,onClick:ie(re,["prevent"])},_(a(f)("Button_Next")),9,p2)])])]),N($i,{"order-id":n.orderFriendlyId},null,8,["order-id"])])]))]))}}),g2=le(v2,[["__scopeId","data-v-c682e228"]]),y2=bo("activeBid",()=>{const n=w([]),e=w(null),t=w(!1);let s=[],i=null,r=0;const l=E(()=>n.value.length),d=E(()=>!e.value||n.value.length===0?!1:n.value.every(b=>b.userId===e.value)),c=E(()=>l.value>0);function p(b){e.value=b}function m(){n.value=[],e.value=null,t.value=!1}
3function g(){s.push(Qe(Et,b=>{y(b)})),s.push(Qe(xt,b=>{T(b)})),s.push(Qe(At,b=>{I(b)})),s.push(Qe(Bi,b=>{C(b)}))}async function v(){if(e.value)try{const{data:b}=await ae.get("user/active-bids");if(!b.succeeded)return;n.value=b.data.map($=>({id:$.lotId,userId:$.highestBidUser})),n.value.length>0&&Lo(n.value.map($=>$.id))?.catch($=>{console.error("Failed to join active bid lots",$)})}catch(b){console.error("Failed to fetch active bids:",b)}}function y(b){if(n.value.length===0)return;const $=n.value.find(L=>L.id===b.lotId);if(!$)return;const D=b.bidList[0];D?$.userId=D.userId:$.userId=void 0}function T(b){if(n.value.length===0)return;const $=n.value.find(D=>D.id===b.lotId);$&&($.userId=b.userId)}function I(b){n.value=n.value.filter($=>$.id!==b.lotId)}function C(b){n.value.push({id:b.lotId}),Ao(b.lotId)?.catch($=>{console.error("Failed to join active lot",$)})}function A(){if(r+=1,t.value)return;const b=document.querySelector("[data-userid]");if(b){const $=b.getAttribute("data-userid");$&&$!==""&&p($)}g(),i=te(Be,$=>{$&&v()},{immediate:!0}),$n(),t.value=!0}function B(){r!==0&&(r-=1,!(r>0)&&(i?.(),i=null,s.forEach(b=>{kn(b)}),s=[],m()))}return{activeLots:n,userId:e,activeBidCount:l,isHighestBidder:d,hasActiveBids:c,initialize:A,cleanup:B,fetchActiveBids:v,setUserId:p}}),b2=q({__name:"ActiveBidIndicator",setup(n){const e=y2();oe(()=>{e.initialize()}),Pe(()=>{e.cleanup()});const t=E(()=>e.hasActiveBids?e.isHighestBidder?"bg-success":"bg-danger":""),s=E(()=>e.hasActiveBids);return(i,r)=>s.value?(u(),h("span",{key:0,class:V(["badge rounded-pill notification__tag active-bid__indicator",t.value])},_(a(e).activeBidCount),3)):k("",!0)}}),w2=le(b2,[["__scopeId","data-v-b9931f17"]]);class k2{async getAsync(){const e=await ae.get("/user/favorites");return ro(e.data.data)}async addAsync(e){const t=await ae.post("/user/favorites",{auctionId:e});return ro(t.data.data)}async removeAsync(e){const t=await ae.delete(`/user/favorites/${encodeURIComponent(e)}`);return ro(t.data.data)}}function ro(n){return(n??[]).map(e=>e.auctionId)}const go=new k2,Ne=w([]),En=w(!1);let Vt=null;function Ea(n){Ne.value=n,En.value=!0,nl(n)}async function Rs(){if(En.value)return;if(Vt!==null)return Vt;const n=el();if(n!==null){Ne.value=n,En.value=!0;return}return Vt=(async()=>{try{Ea(await go.getAsync())}catch(e){console.error("Failed to load favorites:",e)}finally{Vt=null}})(),Vt}async function Os(n,e){const t=Ne.value;Ne.value=n;try{return Ea(await e),!0}catch(s){return Ne.value=t,tl(Kt(s)??f("Error_SomethingWentWrong"),"error"),!1}}function I2(){function n(i){return E(()=>Ne.value.includes(i))}async function e(i){const r=Ne.value.includes(i)?Ne.value:[...Ne.value,i];return Os(r,go.addAsync(i))}async function t(i){const r=Ne.value.filter(l=>l!==i);return Os(r,go.removeAsync(i))}async function s(i){return await Rs(),Ne.value.includes(i)?t(i):e(i)}return{favorites:os(Ne),loaded:os(En),isFavorite:n,loadAsync:Rs,addAsync:e,removeAsync:t,toggleAsync:s}}const S2=["disabled","aria-label","aria-pressed"],C2={key:0,focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},$2={key:1,focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},T2=q({__name:"Favorite",props:{auctionId:{}},setup(n){const e=n,{isFavorite:t,loaded:s,loadAsync:i,toggleAsync:r}=I2(),l=t(e.auctionId);oe(()=>{i()});async function d(){const c=l.value;await r(e.auctionId)&&!c&&Br("add_to_wishlist",{items:[window.auction]},"regular")}return(c,p)=>(u(),h("button",{class:V(["icon-breadcrumb",[a(s)?"opacity-100":"opacity-0"]]),type:"button",disabled:!a(s),"aria-label":a(l)?a(f)("Auction_RemoveFavorite"):a(f)("Auction_AddFavorite"),"aria-pressed":a(l),onClick:d},[a(l)?(u(),h("svg",C2,[...p[0]||(p[0]=[o("g",{fill:"none",transform:"matrix(-.70710678 -.70710678 .70710678 -.70710678 12 24.349242)"},[o("path",{d:"m13.0602142 3.0753788c2.6865378 0 4.864407 2.17786919 4.864407 4.86440699 0 2.62813481-2.0842085 4.76947661-4.6899363 4.86133641l-.1744707.0030706-.2570455-.0005121.0010241.2565335c0 2.5815467-2.0109712 4.6934059-4.55186388 4.854528l-.17404646.0079453-.13849667.0019337c-2.6281348 0-4.76947664-2.0842085-4.86133643-4.6899363l-.00307056-.1744707v-9.24237328c0-.38076119.28662022-.69457863.65587535-.73746704l.08658677-.00499508z",fill:"#FEC4E4"}),o("path",{d:"m13.0602142 3.0753788c2.6865378 0 4.864407 2.17786919 4.864407 4.86440699 0 2.62813481-2.0842085 4.76947661-4.6899363 4.86133641l-.1744707.0030706-.2570455-.0005121.0010241.2565335c0 2.5815467-2.0109712 4.6934059-4.55186388 4.854528l-.17404646.0079453-.13849667.0019337c-2.6281348 0-4.76947664-2.0842085-4.86133643-4.6899363l-.00307056-.1744707v-9.24237328c0-.38076119.28662022-.69457863.65587535-.73746704l.08658677-.00499508zm-8.20292631 9.9848354c0 1.6508282 1.29770732 2.9985606 2.90596762 3.0788838l.1516541.0037878.11357584-.0014114c1.61364914-.0451125 2.91290195-1.3301709 2.99017575-2.9238625l.0036367-.1502843-.0081801-2.0491233 2.0460964.0040794c1.7024166 0 3.0824979-1.38008132 3.0824979-3.08249791 0-1.6508282-1.2977073-2.99856062-2.9286502-3.07872546l-.1538477-.00377244h-8.20292631z",fill:"#F478C4"})],-1)])])):(u(),h("svg",$2,[...p[1]||(p[1]=[o("g",{fill:"none",transform:"matrix(-.70710678 -.70710678 .70710678 -.70710678 12 24.349242)"},[o("path",{d:"m13.0602142 3.0753788c2.6865378 0 4.864407 2.17786919 4.864407 4.86440699 0 2.62813481-2.0842085 4.76947661-4.6899363 4.86133641l-.1744707.0030706-.2570455-.0005121.0010241.2565335c0 2.5815467-2.0109712 4.6934059-4.55186388 4.854528l-.17404646.0079453-.13849667.0019337c-2.6281348 0-4.76947664-2.0842085-4.86133643-4.6899363l-.00307056-.1744707v-9.24237328c0-.38076119.28662022-.69457863.65587535-.73746704l.08658677-.00499508z"}),o("path",{d:"m13.0602142 3.0753788c2.6865378 0 4.864407 2.17786919 4.864407 4.86440699 0 2.62813481-2.0842085 4.76947661-4.6899363 4.86133641l-.1744707.0030706-.2570455-.0005121.0010241.2565335c0 2.5815467-2.0109712 4.6934059-4.55186388 4.854528l-.17404646.0079453-.13849667.0019337c-2.6281348 0-4.76947664-2.0842085-4.86133643-4.6899363l-.00307056-.1744707v-9.24237328c0-.38076119.28662022-.69457863.65587535-.73746704l.08658677-.00499508zm-8.20292631 9.9848354c0 1.6508282 1.29770732 2.9985606 2.90596762 3.0788838l.1516541.0037878.11357584-.0014114c1.61364914-.0451125 2.91290195-1.3301709 2.99017575-2.9238625l.0036367-.1502843-.0081801-2.0491233 2.0460964.0040794c1.7024166 0 3.0824979-1.38008132 3.0824979-3.08249791 0-1.6508282-1.2977073-2.99856062-2.9286502-3.07872546l-.1538477-.00377244h-8.20292631z",fill:"
3currentColor"})],-1)])]))],10,S2))}}),x2=["aria-disabled","aria-label"],E2={key:0,focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},A2={key:1,focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},L2={key:0,class:"alert-n"},D2={class:"d-flex align-items-center gap-3 mt-4 pb-4"},B2={class:"d-flex align-items-center gap-3 mt-4 pb-4"},P2=["href"],U2=["href"],M2=q({__name:"Alarm",props:{enabled:{type:Boolean},authenticated:{type:Boolean}},setup(n){const e=n,{reminderIsActivated:t,reminderTimeFormatted:s,returnUrl:i,error:r,disabledReason:l,isAlarmAvailable:d,setAlarm:c}=ha({authenticated:()=>e.authenticated,available:()=>e.enabled}),p=window.urls.fullRegistration,m=w(!1),g=w(!1);function v(I){const C=I.detail;C?.handled||(C.handled=!0,y())}oe(()=>{document.addEventListener(vo,v)}),Te(()=>{document.removeEventListener(vo,v)});function y(){if(!d.value){l.value&&(g.value=!0);return}t.value?m.value=!1:m.value=!m.value}async function T(){await c(),r.value||(m.value=!1)}return(I,C)=>(u(),h(z,null,[o("button",{onClick:y,class:V([{"is-disabled":!a(d),"is-activated":a(t)},"icon-breadcrumb icon-breadcrumb--alarm"]),"aria-disabled":!a(d),tabindex:"0",type:"button","aria-label":a(d)?a(f)("Alarm_AriaLabel_Set"):a(f)("Alarm_AriaLabel_Unavailable")},[a(t)?(u(),h("svg",E2,[...C[4]||(C[4]=[o("g",{transform:"translate(3 4.6)"},[o("path",{fill:"#b8e6cc",stroke:"#53ca83","stroke-linejoin":"round","stroke-width":"1.6",d:"M9-.8a5.28 5.28 0 0 1 5.3 5.3V9a2.19 2.19 0 0 0 2.25 2.2v2.35H1.45V11.2A2.2 2.2 0 0 0 3.7 9.15V4.5A5.28 5.28 0 0 1 9-.8z"}),o("circle",{cx:"9",cy:"15.3",r:"1.5",fill:"#53ca83",stroke:"#53ca83","stroke-width":"1.6"})],-1)])])):(u(),h("svg",A2,[...C[5]||(C[5]=[o("g",{fill:"none","fill-rule":"evenodd",stroke:"currentColor",transform:"translate(3 4.6)"},[o("path",{fill:"none","fill-rule":"nonzero","stroke-linejoin":"round","stroke-width":"1.6",d:"M9-.8a5.28 5.28 0 0 1 5.3 5.3V9a2.19 2.19 0 0 0 2.25 2.2v2.35H1.45V11.2A2.2 2.2 0 0 0 3.7 9.15V4.5A5.28 5.28 0 0 1 9-.8z"}),o("circle",{cx:"9",cy:"15.3",r:"1.5",fill:"none","stroke-width":"1.6"})],-1)])]))],10,x2),N(nt,{modelValue:m.value,"onUpdate:modelValue":C[1]||(C[1]=A=>m.value=A),title:a(f)("Alarm_Title"),compact:""},{default:de(()=>[o("p",null,_(a(f)("Alarm_Text")),1),a(r)?(u(),h("p",L2,_(a(f)("Alarm_Error")),1)):k("",!0),o("div",D2,[o("button",{onClick:C[0]||(C[0]=A=>m.value=!1),class:"btn btn-link ms-auto ps-0 pe-0"},_(a(f)("Button_Cancel")),1),N(Tt,{action:T,class:"btn-n btn-n-small"},{default:de(()=>[o("span",null,_(a(f)("Alarm_SetText"))+" "+_(a(s)),1)]),_:1})])]),_:1},8,["modelValue","title"]),N(nt,{modelValue:g.value,"onUpdate:modelValue":C[3]||(C[3]=A=>g.value=A),title:a(f)("Alarm_Disabled_Title"),compact:""},{default:de(()=>[o("p",null,_(a(f)(a(l))),1),o("div",B2,[o("button",{onClick:C[2]||(C[2]=A=>g.value=!1),class:"btn btn-link ms-auto ps-0 pe-0"},_(a(f)("Button_Close")),1),e.authenticated?k("",!0):(u(),h("a",{key:0,href:"/login?returnUrl="+a(i),class:"btn-n btn-n-small d-inline-flex align-items-center gap-1"},[j(_(a(f)("Button_LoginAndBid"))+" ",1),C[6]||(C[6]=o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24",width:"18",height:"18","data-testid":"ArrowForwardIcon"},[o("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",fill:"currentColor"})],-1))],8,P2)),e.authenticated&&!e.enabled?(u(),h("a",{key:1,href:`${a(p)}?returnUrl=${a(i)}`,class:"btn-n btn-n-small d-inline-flex align-items-center gap-1"},[j(_(a(f)("Button_AddPhone"))+" ",1),C[7]||(C[7]=o("svg",{focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24",width:"18",height:"18","data-testid":"ArrowForwardIcon"},[o("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",fill:"currentColor"})],-1))],8,U2)):k("",!0)])]),_:1},8,["modelValue","title"])],64))}}),N2=["aria-label"],R2={key:0,class:"css-1a522ha",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},O2={key:1,class:"css-1a522ha",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},F2=q({__name:"Share",props:{shareTitle:String,shareText:String,shareUrl:String},setup(n){const e=n,t=w(!1),s=navigator.userAgent.match(/iPhone/i);oe(()=>{"canShare"in navigator&&(t.value=!0)});const i=async()=>{const r={title:e.shareTitle,text:e.shareText,url:e.shareUrl};navigator.canShare?navigator.canShare(r)?await navigator.share(r).then(()=>{}).catch(l=>console.error("Error sharing:",l)):console.error("Specified data cannot be shared."):console.error("navigator.canShare() not supported.")};return(r,l)=>t.value?(u(),h("button",{key:0,class:"icon-breadcrumb",tabindex:"0",type:"button","aria-label":a(f)("Common_Share"),onClick:i},[a(s)?(u(),h("svg",R2,[...l[0]||(l[0]=[et('<g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(5.974651 1.886919)"><path d="m10.6015637 6.51050044c.8003349 0 1.4491346.64879966 1.4491346 1.4491346v9.15242906c0 .8003349-.6487997 1.4491346-1.4491346 1.4491346h-9.1524291c-.80033494 0-1.4491346-.6487997-1.4491346-1.4491346v-9.15242906c0-.80033494.64879966-1.4491346 1.4491346-1.4491346l2.1828654-.00065087v1.241l-2.391461.00018987v9.56962026h9.5696203v-9.56962026l-2.3931593-.00018987v-1.241z" fill="currentColor" fill-rule="nonzero" stroke-width=".5"></path><g stroke-linecap="round" stroke-width="1.65" transform="matrix(0 -1 1 0 2.8645 12.86764)"><path d="m11.9356602.93198052v4.5h-4.50000003" stroke-linejoin="round" transform="matrix(.70710678 -.70710678 .70710678 .70710678 .586864 7.780777)"></path><path d="m12 3.181981h-12"></path></g></g>',1)])])):(u(),h("svg",O2,[...l[1]||(l[1]=[et('<g fill="none" fill-rule="evenodd" stroke="currentColor" stroke-width="1.6" transform="translate(3.1875 3)"><path d="m6.045788 2.622434 3.32678 5.90636" fill-rule="nonzero" stroke-linejoin="round" transform="matrix(0 -1 1 0 2.423354 13.668222)"></path><circle cx="12.739502" cy="3" r="2.2"></circle><path d="m6.045788 9.377566 3.742551 5.90636" fill-rule="nonzero" stroke-linejoin="round" transform="matrix(0 1 1 0 -4.331778 4.331778)"></path><circle cx="12.739502" cy="15" r="2.2" transform="matrix(1 0 0 -1 0 30)"></circle><circle cx="3" cy="9" r="2.2" transform="matrix(1 0 0 -1 0 18)"></circle></g>',1)])]))],8,N2)):k("",!0)}}),V2=q({__name:"AuctionMap",props:{locations:{type:Array,required:!0},icon:{type:String,required:!1},height:{type:String,required:!1,default:"200px"}},setup(n){const e=n,t=w(null),s=w(null);oe(async()=>{r.observe(s.value)});const i=()=>{const l={zoomControl:!1,attributionControl:!1};e.locations.length===1&&(l.center=[e.locations[0].Latitude,e.locations[0].Longitude],l.zoom=16),t.value=xe.map("map",l),t.value.scrollWheelZoom.disable(),xe.control.zoom({position:"topright"}).addTo(t.value),xe.tileLayer("https://api.maptiler.com/maps/streets-v2/256/{z}/{x}/{y}@2x.png?key=HxfkaPBFnNysZhgOAlSX",{maxzoom:19}).addTo(t.value);const d=xe.icon({iconUrl:"/dist/images/mapmarker.svg",iconSize:[35,45],iconAnchor:[15,35],popupAnchor:[0,-30]});if(e.locations.forEach((c,p)=>{xe.marker([c.Latitude,c.Longitude],{icon:d}).bindPopup(c.Description).addTo(t.value)}),e.locations.length>1){const c=e.locations.map(m=>[m.Latitude,m.Longitude]),p=new xe.LatLngBounds(c);t.value.fitBounds(p)}},r=new IntersectionObserver(([l])=>{l.isIntersecting&&!t.value&&i()},{threshold:.5});return(l,d)=>(u(),h("div",{ref_key:"target",ref:s,class:"position-relative"},[o("div",{id:"map",style:$t("height:"+e.height),class:"rounded"},null,4)],512))}}),H2={class:"map__location-list row gx-3"},q2={class:"d-flex h-100 border rounded p-3"},W2={class:"map__location-image"},z2={class:"icon is-medium"},K2=["alt"],G2={class:"ms-4 small justify-content-center d-flex flex-column"},j2={class:"mb-0"},X2={key:0},Y2={key:1},J2=["href"],Fs=6,Z2=q({__name:"AuctionLocationList",props:{locations:{type:Array,required:!0},showmorelocationstext:{type:String,required:!1}},setup(n){const e=n,t=w(!1),s=E(()=>e.showmorelocationstext??f("Auction_ShowMoreLocations")),i=E(()=>t.value?e.locations:e.locations.slice(0,Fs)),r=()=>{t.value=!0};return(l,d)=>(u(),h(z,null,[o("div",H2,[(u(!0),h(z,null,Q(i.value,(c,p)=>(u(),h("div",{key:p,class:"col-12 col-lg-6 mb-3"},[o("div",q2,[o("div",W2,[o("span",z2,[o("img",{src:"/dist/images/mapmarker.svg",alt:a(f)("Common_Location")},null,8,K2)])]),o("div",G2,[o("p",j2,[c.Description?(u(),h("strong",X2,_(c.Description),1)):k("",!0),c.Description?(u(),h("br",Y2)):k("",!0),j(" "+_(c.Street)+" "+_(c.HouseNumber)+" "+_(c.HouseNumberAddition)+" ",1),d[0]||(d[0]=o("br",null,null,-1)),j(" "+_(c.ZipCode)+" "+_(c.City)+" ",1),d[1]||(d[1]=o("br",null,null,-1))]),c.Position?(u(),h("a",{key:0,href:`//google.com/maps/dir//${c.Position.Latitude},${c.Position.Longitude}`,target:"_blank"},_(a(f)("Common_RouteDescription")),9,J2)):k("",!0)])])]))),128))]),n.locations.length>Fs&&!t.value?(u(),h("button",{key:0,id:"map__location-open-more",class:"btn btn-primary mt-3",onClick:r},_(s.value),1)):k("",!0)],64))}}),Q2={class:"login login__small"},eI={class:"login__inner"},tI={class:"title"},nI=["innerHTML"],oI=q({__name:"CompleteAccountStep",props:{email:{default:void 0},returnUrl:{default:void 0}},emits:["phoneSubmitted"],setup(n,{emit:e}){const t=e,s=n,i=w(null),r=w(null),l=w({firstName:"",middleName:"",lastName:""}),d=w({countryCode:"",localNumber:""}),c=w(null),p=w(null),{validateAll:m}=wo(()=>[c.value,p.value]),g=E(()=>({email:s.email,firstname:l.value.firstName,middlename:l.value.middleName,lastname:l.value.lastName,phone:di(d.value)})),v=E(()=>s.returnUrl??"/");oe(()=>{Ke.get("account/complete-account").then(T=>{const I=T.data.data;l.value.firstName=I.firstname??"",l.value.middleName=I.middlename??"",l.value.lastName=I.lastname??"",I.phone&&(d.value={countryCode:I.phone.countryCode||"",localNumber:I.phone.localNumber??""})}).catch(T=>{r.value=Kt(T)??f("Error_SomethingWentWrong")})});const y=async()=>{r.value=null,m()&&await Ke.post("account/complete-account",g.value).then(()=>{t("phoneSubmitted",g.value.phone)}).catch(T=>{r.value=Kt(T)})};return(T,I)=>(u(),h("div",Q2,[N(Ln,{"back-href":v.value,"close-href":v.value},null,8,["back-href","close-href"]),o("div",eI,[o("h1",tI,_(a(f)("CompleteUser_Title")),1),o("p",null,_(a(f)("CompleteUser_Text")),1),r.value?(u(),ee(zt,{key:0,state:"error",message:r.value,class:"mt-3"},null,8,["message"])):k("",!0),o("form",{method:"post",novalidate:"",class:"login-form field-stack mt-3",onSubmit:I[4]||(I[4]=ie(C=>i.value?.trigger(),["prevent"]))},[N(hi,{ref_key:"nameFields",ref:c,compact:"","first-name":l.value.firstName,"onUpdate:firstName":I[0]||(I[0]=C=>l.value.firstName=C),"middle-name":l.value.middleName,"onUpdate:middleName":I[1]||(I[
31]=C=>l.value.middleName=C),"last-name":l.value.lastName,"onUpdate:lastName":I[2]||(I[2]=C=>l.value.lastName=C)},null,8,["first-name","middle-name","last-name"]),N(fi,{id:"phone",ref_key:"phoneField",ref:p,modelValue:d.value,"onUpdate:modelValue":I[3]||(I[3]=C=>d.value=C),label:a(f)("Input_Phone"),"extra-text":a(f)("CompleteUser_FreePhone")},null,8,["modelValue","label","extra-text"]),N(Tt,{ref_key:"submitButton",ref:i,action:y,class:"btn-n w-100"},{default:de(()=>[j(_(a(f)("Button_Continue")),1)]),_:1},512)],32),o("p",{class:"text-small mt-3",innerHTML:a(f)("CompleteUser_Terms")},null,8,nI)])]))}}),sI=q({__name:"CompleteUserInformation",props:{email:{default:void 0},returnUrl:{default:void 0}},setup(n){const e=n,t=w(!1),s=w(""),i=r=>{s.value=r,t.value=!0};return(r,l)=>t.value?(u(),ee(Ei,{key:1,phone:s.value,"return-url":e.returnUrl},null,8,["phone","return-url"])):(u(),ee(oI,{key:0,email:e.email,"return-url":e.returnUrl,onPhoneSubmitted:i},null,8,["email","return-url"]))}}),iI=["action"],aI={class:"mb-3"},rI={value:"",selected:"",disabled:""},lI=["value"],cI={key:0,class:"mb-3"},uI=["placeholder"],dI={key:1,class:"field"},hI={class:"control"},fI={key:0,href:"/service",class:"btn-n w-100 is-rounded"},_I={key:1,class:"btn-n w-100 is-rounded retour__submit is-active",type:"submit"},pI=q({__name:"RefundProduct",props:{orderId:{},reasons:{}},setup(n){const e=n,t=w(""),s=E(()=>e.reasons.find(r=>r.id===parseInt(t.value))),i=E(()=>s.value?.requiresRemark??!1);return(r,l)=>(u(),h("form",{action:`/myauctions/${e.orderId}/return`,method:"POST",class:"retour__form"},[o("div",aI,[_t(o("select",{class:"form-select","onUpdate:modelValue":l[0]||(l[0]=d=>t.value=d),name:"ReasonId"},[o("option",rI,_(a(f)("RefundProduct_Reason")),1),(u(!0),h(z,null,Q(e.reasons,d=>(u(),h("option",{key:d.id,value:d.id},_(a(f)(`RefundProduct_Reason${d.name}`)),9,lI))),128))],512),[[Js,t.value]])]),i.value?(u(),h("div",cI,[o("textarea",{required:"",class:"form-control",placeholder:a(f)("Input_Remark"),name:"Remark"},null,8,uI)])):k("",!0),s.value?(u(),h("div",dI,[o("div",hI,[i.value?(u(),h("button",_I,[j(_(a(f)("Button_Refund"))+" ",1),l[2]||(l[2]=o("i",{class:"ms-2 fa-solid fa-arrow-right"},null,-1))])):(u(),h("a",fI,[j(_(a(f)("Button_Service"))+" ",1),l[1]||(l[1]=o("i",{class:"ms-2 fa-solid fa-arrow-right"},null,-1))]))])])):k("",!0)],8,iI))}}),mI={key:0,class:"vk-widget"},vI=["src"],gI={key:0,class:"deal-balloon"},yI=q({__name:"MarketingWidget",setup(n){const e=w(!1),t=w(!1);oe(()=>{Zs().domain!==Za.VaVaBidBe&&(e.value=wt("vkWidget")==null),setTimeout(()=>{t.value=!0},5e3)});const s=()=>{e.value=!1,at("vkWidget","closed",tt(1))},i=()=>{at("vkWidget","closed",tt(1)),window.open("https://www.qisum.nl/concertweken-1/","_blank")};return(r,l)=>e.value?(u(),h("div",mI,[o("a",{href:"https://www.qisum.nl/concertweken-1/",target:"_blank",onClick:i},[o("img",{src:a(jt)("widget/qisum.jpg","?w=150&h=150&auto=format&fit=crop"),width:"150",height:"150",alt:"Qisum",onError:l[0]||(l[0]=(...d)=>a(me)&&a(me)(...d))},null,40,vI)]),t.value?(u(),h("div",gI,[o("i",{class:"fa-solid fa-xmark close",onClick:ie(s,["prevent"])}),o("span",{onClick:i},_(a(f)("MarketingWidget_ConcertText")),1)])):k("",!0)])):k("",!0)}}),bI=le(yI,[["__scopeId","data-v-1a8e5099"]]),wI={class:"section auction__section overflow-hidden"},kI={class:"container"},II={class:"auction-list-wrapper"},SI={class:"auction-list-wrapper__title"},CI=q({__name:"NearbyAuctions",props:{serverDateTime:{type:Number,default:null,required:!1},userIsAuthenticated:{type:Boolean,default:!1,required:!0},auctionId:{type:String,required:!1}},setup(n){const e=n;return(t,s)=>{const i=Gs("lot-Auction-Overview");return u(),h("section",wI,[o("div",kI,[o("div",II,[o("h3",SI,_(a(f)("NearbyAuctions_Title")),1),N(i,{"api-url":`lots/nearby/auction?auctionId=${e.auctionId}`,"server-date-time":e.serverDateTime,"auction-id":e.auctionId,slider:!0,column:
35,"user-is-authenticated":e.userIsAuthenticated},null,8,["api-url","server-date-time","auction-id","user-is-authenticated"])])])])}}}),$I={class:"cluster-detail__body"},TI={key:0,class:"cluster-detail__section"},xI={class:"cluster-detail__section-title"},EI=["innerHTML"],AI={key:1,class:"cluster-detail__section"},LI={class:"cluster-detail__section-title"},DI=["innerHTML"],BI={key:2,class:"cluster-detail__calendar"},PI={key:0,class:"cluster-detail__calendar-hint"},UI={key:1,class:"cluster-detail__toast"},MI={class:"cluster-detail__toast-icon"},Vs=q({__name:"ClusterLocationItemDetail",props:{item:{},auctionId:{}},setup(n){const e=n,t=E(()=>e.item.optionType==="Date"||e.item.optionType==="DateTime"),s=E(()=>e.item.optionType==="DateTime"),i=E(()=>{switch(e.item.optionType){case"Date":return f("ClusterAuction_DefinitiveAfterPurchaseDate");case"DateTime":return f("ClusterAuction_DefinitiveAfterPurchase");default:return null}});return(r,l)=>(u(),h("div",$I,[n.item.whatToExpect?(u(),h("div",TI,[o("h4",xI,_(a(f)("Auction_WhatToExpectTitle")),1),o("div",{class:"cluster-detail__section-content",innerHTML:n.item.whatToExpect},null,8,EI)])):k("",!0),n.item.goodToKnow?(u(),h("div",AI,[o("h4",LI,_(a(f)("Auction_GoodToKnowTitle")),1),o("div",{class:"cluster-detail__section-content",innerHTML:n.item.goodToKnow},null,8,DI)])):k("",!0),t.value?(u(),h("div",BI,[s.value?(u(),h("p",PI,_(a(f)("ClusterAuction_SelectDateHint")),1)):k("",!0),N(va,{"auction-id":n.auctionId,"auction-item-id":n.item.auctionItemId},null,8,["auction-id","auction-item-id"]),i.value?(u(),h("p",UI,[o("span",MI,[N(a(he),{icon:a(kt),"aria-hidden":"true"},null,8,["icon"])]),o("span",null,_(i.value),1)])):k("",!0)])):k("",!0)]))}}),NI={key:0,class:"cluster-detail-header"},RI={key:0,class:"cluster-detail-header__image"},OI=["src","alt"],FI={class:"cluster-detail-header__content"},VI={id:"modal-title",class:"cluster-detail-header__title"},HI={class:"cluster-detail-header__address"},qI={class:"cluster-detail-header__address-text"},WI={key:0,class:"cluster-detail-header__distance"},zI={class:"cluster-detail-header__distance-icon","aria-hidden":"true"},KI={key:0,class:"cluster-detail"},GI={key:0,class:"cluster-detail__image"},jI=["src","alt"],XI={key:0,class:"cluster-availability"},YI=["aria-expanded","onClick"],JI={class:"cluster-detail__item-title"},ZI={key:0,class:"cluster-detail__item-price"},QI={class:"cluster-detail__item-content"},eS={key:0,class:"cluster-detail__single-item"},tS={class:"cluster-detail__item-title"},nS={class:"cluster-detail__item-price"},oS=q({__name:"ClusterLocationDetailModal",props:Ct({location:{},auctionId:{},sellingUnit:{},userPosition:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=n,t=ft(n,"modelValue"),{buildAddressLine:s,formatItemsAvailable:i}=Sa(),{formatDistanceKm:r}=Ca(Qs(e,"userPosition")),l=E(()=>e.location?.image!=null&&e.location.image.trim()!==""),d=w(new Set);te(()=>e.location,()=>{d.value=new Set});const c=v=>d.value.has(v),p=v=>{d.value.has(v)?d.value.delete(v):d.value.add(v)},m=E(()=>e.location?.items.length===1?e.location.items[0]:null),g=v=>v.upgradePrice===null?null:Ii(v.upgradePrice);return(v,y)=>(u(),ee(Ho,{modelValue:t.value,"onUpdate:modelValue":y[2]||(y[2]=T=>t.value=T)},{header:de(()=>[n.location?(u(),h("div",NI,[l.value?(u(),h("span",RI,[o("img",{src:n.location.image,alt:n.location.title,onError:y[0]||(y[0]=(...T)=>a(me)&&a(me)(...T))},null,40,OI)])):k("",!0),o("span",FI,[o("span",VI,_(n.location.title),1),o("span",HI,[o("span",qI,_(a(s)(n.location)),1),N(li,{country:n.location.address.country},null,8,["country"]),a(r)(n.location)?(u(),h("span",WI,[y[3]||(y[3]=o("span",{class:"cluster-detail-header__distance-dot","aria-hidden":"true"},null,-1)),o("span",zI,[N(a(he),{icon:a(bn)},null,8,["icon"])]),j(" "+_(a(r)(n.location)),1)])):k("",!0)])])])):k("",!0)]),default:de(()=>[n.location?(u(),h("div",KI,[l.value?(u(),h("span",GI,[o("img",{src:n.location.image,alt:n.location.title,onError:y[1]||(y[1]=(...T)=>a(me)&&a(me)(...T))},null,40,jI)])):k("",!0),n.location.items.length>1?(u(),h(z,{key:1},[a(i)(n.location,n.sellingUnit)?(u(),h("span",XI,_(a(i)(n.location,n.sellingUnit)),1)):k("",!0),(u(!0),h(z,null,Q(n.location.items,T=>(u(),h("div",{key:T.auctionItemId,class:V(["cluster-detail__item",{"cluster-detail__item--open":c(T.auctionItemId)}])},[o("button",{type:"button",class:"cluster-detail__item-header","aria-expanded":c(T.auctionItemId),onClick:I=>p(T.auctionItemId)},[o("h3",JI,[j(_(T.title)+" ",1),T.upgradePrice!==null?(u(),h("span",ZI,_(g(T)),1)):k("",!0)]),o("span",{class:V(["cluster-detail__item-icon",{"cluster-detail__item-icon--expanded":c(T.auctionItemId)}])},[N(a(he),{icon:a(ri)},null,8,["icon"])],2)],8,YI),_t(o("div",QI,[N(Vs,{item:T,"auction-id":n.auctionId},null,8,["item","auction-id"])],512),[[Xs,c(T.auctionItemId)]])],2))),128))],64)):m.value?(u(),h(z,{key:2},[m.value.upgradePrice!==null?(u(),h("p",eS,[o("span",tS,_(m.value.title),
31),o("span",nS,_(g(m.value)),1)])):k("",!0),N(Vs,{item:m.value,"auction-id":n.auctionId},null,8,["item","auction-id"])],64)):k("",!0)])):k("",!0)]),_:1},8,["modelValue"]))}}),sS={class:"cluster-overview"},iS=["aria-label"],aS={class:"cluster-overview__content"},rS={class:"cluster-list-header"},lS={class:"cluster-list-header__count"},cS=q({__name:"ClusterAuctionItemOverview",props:{overview:{}},setup(n){const e=n,t=E(()=>e.overview.auctionId),s=E(()=>e.overview.sellingUnit),i=E(()=>e.overview.availableFilters),r=E(()=>e.overview.locations),l=w(null),d=w(null),c=w(!1),p=w(null),{isSelected:m,filteredLocations:g,toggleFilter:v}=Ta(r),{sortBy:y,sortedLocations:T}=xa(g,d),I=w(null),C=()=>{Ue(()=>I.value?.scrollToTop())};te(y,C);const A=E(()=>l.value&&r.value.find(S=>S.id===l.value)||null),B=E({get:()=>l.value!==null,set:S=>{S||(l.value=null)}});te(g,S=>{l.value&&!S.some(x=>x.id===l.value)&&(l.value=null),C()});const b=()=>{c.value=!c.value,p.value&&p.value.invalidateSize()},$=S=>{d.value=S},D=()=>{d.value=null},L=S=>{l.value=S.id};return(S,x)=>(u(),h("div",sS,[o("div",{class:V(["cluster-overview__map-container",{"cluster-overview__map-container--expanded":c.value}])},[N(Ia,{ref_key:"mapRef",ref:p,locations:a(g),"selected-location-id":l.value,"user-position":d.value,onSelect:L},null,8,["locations","selected-location-id","user-position"]),o("button",{type:"button",class:V(["cluster-overview__map-toggle",{"cluster-overview__map-toggle--expanded":c.value}]),"aria-label":c.value?a(f)("ClusterAuction_ShrinkMap"):a(f)("ClusterAuction_ExpandMap"),onClick:b},[N(a(he),{icon:c.value?a(ci):a(ui)},null,8,["icon"])],10,iS)],2),o("div",aS,[N(ba,{onSelect:$,onClear:D}),i.value.length>1?(u(),ee(wa,{key:0,filters:i.value,"is-selected":a(m),onToggle:a(v)},null,8,["filters","is-selected","onToggle"])):k("",!0),o("div",rS,[o("span",lS,_(a(f)("ClusterAuction_ShowingLocations",{count:a(g).length})),1),N(ka,{modelValue:a(y),"onUpdate:modelValue":x[0]||(x[0]=R=>yo(y)?y.value=R:null),"distance-available":d.value!==null},null,8,["modelValue","distance-available"])]),N($a,{ref_key:"listRef",ref:I,locations:a(T),"selling-unit":s.value,"user-position":d.value,onSelect:L},null,8,["locations","selling-unit","user-position"])]),N(oS,{modelValue:B.value,"onUpdate:modelValue":x[1]||(x[1]=R=>B.value=R),location:A.value,"auction-id":t.value,"selling-unit":s.value,"user-position":d.value},null,8,["modelValue","location","auction-id","selling-unit","user-position"])]))}}),uS={class:"search-component"},dS=["aria-label"],hS={class:"search-placeholder"},fS={for:"search-input",class:"visually-hidden"},_S=["value","placeholder","aria-describedby"],pS=["aria-label"],mS={key:0,id:"search-status",class:"search-loading text-center text-muted py-3","aria-live":"polite"},vS={key:1,class:"search-results"},gS={key:0,class:"mb-3"},yS={class:"text-muted small fw-bold mb-2"},bS={class:"d-flex flex-wrap gap-2"},wS=["href"],kS={key:1},IS={class:"text-muted small fw-bold mb-2"},SS={key:2},CS={class:"text-center py-4"},$S={class:"text-muted"},TS={key:3},xS={key:0,class:"mb-4"},ES={class:"text-muted small fw-bold mb-2"},AS=["aria-label"],LS=["aria-label","onClick"],DS=["aria-label","onClick"],BS=5,lo=4,PS=350,Hs=30,US=q({__name:"Search",props:{placeholder:{},searchUrl:{},serverDateTime:{}},setup(n){const e=n,t=w(!1),s=w(""),i=w([]),r=w(null),l=w(null),d=w(null),c=w(!1);let p,m=null;const g=L=>{L.preventDefault(),C()},v=()=>{m=document.querySelectorAll("[data-search-trigger]"),m.forEach(L=>{L.addEventListener("click",g)})},y=()=>{m&&m.forEach(L=>{L.removeEventListener("click",g)})};oe(()=>{T(),v()}),Te(()=>{clearTimeout(p),y()});const T=()=>{const L=wt("search_keys");if(L)try{const S=JSON.parse(L);Array.isArray(S)&&S.every(x=>typeof x=="string")&&(i.value=S)}catch(S){console.warn("Failed to parse search history cookie, resetting:",S),at("search_keys","[]",tt(Hs))}},I=()=>{at("search_keys",JSON.stringify(i.value),tt(Hs))},C=async()=>{window.dispatchEvent(new CustomEvent("panel-open",{detail:{panel:"search"}})),t.value=!0,await Ue(),d.value?.focus()},A=()=>{s.value="",r.value=null,l.value=null,c.value=!1};let B=null;te(t,L=>{L||A();const S=document.querySelector(".mobile-bottom-nav");if(S){const x=S.querySelectorAll(".mobile-bottom-nav__item"),R=S.querySelector("[data-search-trigger]");L?(B=S.querySelector(".mobile-bottom-nav__item.is-active"),x.forEach(F=>F.classList.remove("is-active")),R?.classList.add("is-active")):(R?.classList.remove("is-active"),B?.classList.add("is-active"),B=null)}}),te(s,L=>
3{if(clearTimeout(p),L.length<lo){r.value=null,l.value=null,c.value=!1;return}c.value=!0,p=setTimeout(()=>b(),PS)});const b=async()=>{try{const L=await ae.get(`/autocomplete?q=${encodeURIComponent(s.value)}`);l.value=L.data.data?.categoryList??[],r.value=L.data.data?.auctionList??[]}catch{r.value=[],l.value=[]}finally{c.value=!1}},$=L=>{const S=L??s.value;if(!S)return;const x=i.value.indexOf(S);x>-1&&i.value.splice(x,1),i.value.unshift(S),i.value=i.value.slice(0,BS),I(),location.href=`${e.searchUrl??"/veilingen"}?q=${encodeURIComponent(S)}`},D=L=>{i.value.splice(L,1),I()};return(L,S)=>(u(),h("div",uS,[o("button",{class:"search-bar d-flex align-items-center cursor-pointer",type:"button","aria-label":e.placeholder||a(f)("Search_Placeholder"),onClick:ie(C,["prevent"])},[S[4]||(S[4]=o("i",{class:"fa-regular fa-search d-flex align-items-center","aria-hidden":"true"},null,-1)),o("span",hS,_(e.placeholder||a(f)("Search_Placeholder")),1)],8,dS),N(nt,{modelValue:t.value,"onUpdate:modelValue":S[3]||(S[3]=x=>t.value=x),title:a(f)("Search_Title")},Ys({default:de(()=>[o("form",{class:"position-relative mb-3",role:"search",onSubmit:S[1]||(S[1]=ie(x=>$(),["prevent"]))},[o("label",fS,_(a(f)("Search_Placeholder")),1),o("input",{id:"search-input",ref_key:"searchInput",ref:d,value:s.value,autofocus:"",type:"search",inputmode:"search",enterkeyhint:"search",class:"form-control form-control-lg pe-5",placeholder:e.placeholder||a(f)("Search_Placeholder"),"aria-describedby":c.value?"search-status":void 0,onInput:S[0]||(S[0]=x=>s.value=x.target.value)},null,40,_S),s.value?(u(),h("button",{key:0,type:"button",class:"btn btn-link position-absolute top-50 end-0 me-2 translate-middle-y p-0 text-muted","aria-label":a(f)("Search_ClearSearch"),onClick:ie(A,["prevent"])},[...S[5]||(S[5]=[o("i",{class:"fa-regular fa-circle-xmark","aria-hidden":"true"},null,-1)])],8,pS)):k("",!0)],32),c.value?(u(),h("output",mS,_(a(f)("Search_Loading")),1)):r.value?.length||l.value?.length?(u(),h("div",vS,[l.value?.length?(u(),h("div",gS,[o("h6",yS,_(a(f)("Search_Categories")),1),o("div",bS,[(u(!0),h(z,null,Q(l.value,x=>(u(),h("a",{key:x.id,href:x.url,class:"btn btn-outline-secondary btn-sm"},_(x.title),9,wS))),128))])])):k("",!0),r.value?.length?(u(),h("div",kS,[o("h6",IS,_(a(f)("Search_Auctions")),1),N(Ko,{lots:r.value,"server-date-time":e.serverDateTime,gallery:!1,"hide-not-found":!0,title:"Search"},null,8,["lots","server-date-time"])])):k("",!0)])):!c.value&&r.value?.length===0&&s.value.length>=lo?(u(),h("div",SS,[o("div",CS,[o("h5",null,_(a(f)("Search_NoResults").replace("{0}",s.value)),1),o("p",$S,_(a(f)("Search_TryAgain")),1)])])):c.value?k("",!0):(u(),h("div",TS,[i.value.length>0?(u(),h("div",xS,[o("h6",ES,_(a(f)("Search_RecentSearches")),1),o("ul",{class:"search-history-list list-unstyled",role:"list","aria-label":a(f)("Search_RecentSearches")},[(u(!0),h(z,null,Q(i.value,(x,R)=>(u(),h("li",{key:R,class:"search-history-item d-flex align-items-center justify-content-between p-2 rounded mb-1"},[o("button",{type:"button",class:"btn btn-link text-start text-dark p-0 text-decoration-none flex-grow-1","aria-label":a(f)("Search_SearchFor").replace("{0}",x),onClick:ie(F=>$(x),["prevent"])},[S[6]||(S[6]=o("i",{class:"fa-regular fa-clock-rotate-left me-2 text-muted","aria-hidden":"true"},null,-1)),j(" "+_(x),1)],8,LS),o("button",{type:"button",class:"btn btn-link text-muted p-0","aria-label":a(f)("Search_RemoveFromHistory").replace("{0}",x),onClick:ie(F=>D(R),["prevent"])},[...S[7]||(S[7]=[o("i",{class:"fa-regular fa-xmark","aria-hidden":"true"},null,-1)])],8,DS)]))),128))],8,AS)])):k("",!0)]))]),_:2},[s.value.length>=lo?{name:"footer",fn:de(()=>[o("button",{type:"button",class:"btn-n w-100",onClick:S[2]||(S[2]=ie(x=>$(),["prevent"]))}
3,_(a(f)("Search_Button")),1)]),key:"0"}:void 0]),1032,["modelValue","title"])]))}}),MS=le(US,[["__scopeId","data-v-15cd26a8"]]),NS={class:"affiliatedeal-search-component"},RS=["aria-label"],OS={class:"affiliatedeal-search-placeholder flex-grow-1 text-start"},FS={for:"affiliatedeal-search-input",class:"visually-hidden"},VS=["value","placeholder","aria-describedby"],HS=["aria-label"],qS={key:0,id:"affiliatedeal-search-status",class:"search-loading text-center text-muted py-3","aria-live":"polite"},WS={key:1,class:"affiliatedeal-search-results"},zS={class:"affiliatedeal-result-list"},KS=["href","onClick"],GS={class:"card-img-top"},jS=["src","alt"],XS=["alt"],YS={class:"card-body d-flex flex-column"},JS={class:"card-h3 flex-fill"},ZS={key:0,class:"card-text text-muted"},QS={class:"mt-2 d-flex align-items-center"},eC={class:"affiliatedeal-result-points"},tC={key:0,class:"affiliatedeal-result-price ms-2"},nC={key:2},oC={class:"text-center py-4"},sC={class:"text-muted"},iC={key:3},aC={key:0,class:"mb-4"},rC={class:"text-muted small fw-bold mb-2"},lC=["aria-label"],cC=["onClick","aria-label"],uC=["onClick","aria-label"],dC=5,co=3,hC=350,qs=30,uo="affiliatedeal_search_keys",fC=q({__name:"AffiliateDealSearch",props:{placeholder:{},baseUrl:{default:"/ledenvoordeelshop"},searchUrl:{default:"/api/affiliatedeals/search"}},setup(n){const e=n,t=w(!1),s=w(""),i=w([]),r=w(null),l=w(null),d=w(!1);let c;const p=[];oe(()=>{m(),document.querySelectorAll("[data-affiliatedeal-search-trigger]").forEach(b=>{b.addEventListener("click",v),p.push(b)})}),Te(()=>{clearTimeout(c),p.forEach(b=>{b.removeEventListener("click",v)})});const m=()=>{const b=wt(uo);if(b)try{const $=JSON.parse(b);Array.isArray($)&&$.every(D=>
3typeof D=="string")&&(i.value=$)}catch($){console.warn("Failed to parse affiliate deal search history cookie, resetting:",$),at(uo,"[]",tt(qs))}},g=()=>{at(uo,JSON.stringify(i.value),tt(qs))},v=async()=>{t.value=!0,await Ue(),l.value?.focus()},y=()=>{s.value="",r.value=null,d.value=!1};te(t,b=>{b||y()});const T=()=>{const b=r.value?.[0];s.value.length>=co&&b&&C(b)};te(s,b=>{if(clearTimeout(c),b.length<co){r.value=null,d.value=!1;return}d.value=!0,c=setTimeout(()=>I(),hC)});const I=async()=>{try{const b=await fetch(`${e.searchUrl}?q=${encodeURIComponent(s.value)}`);b.ok?r.value=await b.json():r.value=[]}catch{r.value=[]}finally{d.value=!1}},C=b=>{const $=i.value.indexOf(s.value);$>-1&&i.value.splice($,1),s.value&&(i.value.unshift(s.value),i.value=i.value.slice(0,dC),g()),location.href=`${e.baseUrl}/${b.url}`},A=b=>{s.value=b},B=b=>{i.value.splice(b,1),g()};return(b,$)=>(u(),h("div",NS,[o("button",{class:"affiliatedeal-search-bar form-control form-control-lg d-flex align-items-center",type:"button",onClick:ie(v,["prevent"]),"aria-label":e.placeholder||a(f)("AffiliateDeal_SearchPlaceholder")},[$[3]||($[3]=o("i",{class:"fa-regular fa-search","aria-hidden":"true"},null,-1)),o("span",OS,_(e.placeholder||a(f)("AffiliateDeal_SearchPlaceholder")),1)],8,RS),N(nt,{modelValue:t.value,"onUpdate:modelValue":$[2]||($[2]=D=>t.value=D),title:a(f)("Search_Title")},{default:de(()=>[o("form",{class:"position-relative mb-3",role:"search",onSubmit:ie(T,["prevent"])},[o("label",FS,_(a(f)("AffiliateDeal_SearchPlaceholder")),1),o("input",{id:"affiliatedeal-search-input",ref_key:"searchInput",ref:l,value:s.value,autofocus:"",type:"search",inputmode:"search",enterkeyhint:"search",class:"form-control form-control-lg pe-5",placeholder:e.placeholder||a(f)("AffiliateDeal_SearchPlaceholder"),"aria-describedby":d.value?"affiliatedeal-search-status":void 0,onInput:$[0]||($[0]=D=>s.value=D.target.value)},null,40,VS),s.value?(u(),h("button",{key:0,onClick:ie(y,["prevent"]),type:"button",class:"btn btn-link position-absolute top-50 end-0 me-2 translate-middle-y p-0 text-muted","aria-label":a(f)("Search_ClearSearch")},[...$[4]||($[4]=[o("i",{class:"fa-regular fa-circle-xmark","aria-hidden":"true"},null,-1)])],8,HS)):k("",!0)],32),d.value?(u(),h("output",qS,_(a(f)("Search_Loading")),1)):r.value?.length?(u(),h("div",WS,[o("div",zS,[(u(!0),h(z,null,Q(r.value,D=>(u(),h("div",{key:D.id,class:"affiliatedeal-result-item"},[o("a",{href:`${e.baseUrl}/${D.url}`,onClick:ie(L=>C(D),["prevent"]),class:"card is-horizontal text-decoration-none"},[o("div",GS,[D.image?(u(),h("img",{key:0,src:`${D.image}?auto=format&fit=crop&w=240&h=160&q=75&dpr=2`,alt:D.content.overviewTitle,loading:"lazy",onError:$[1]||($[1]=(...L)=>a(me)&&a(me)(...L))},null,40,jS)):(u(),h("img",{key:1,src:"/dist/images/logo-placeholder.png",alt:D.content.overviewTitle},null,8,XS))]),o("div",YS,[o("h3",JS,_(D.content.overviewTitle),1),D.content.overviewDescription?(u(),h("div",ZS,_(D.content.overviewDescription.slice(0,80))+_(D.content.overviewDescription.length>80?"...":""),1)):k("",!0),o("div",QS,[o("div",eC,_(a(pa)(D.pricingModel.pointsCost))+" "+_(a(f)("AffiliateDeal_PointsTitle")?.toLowerCase()||"punten"),1),D.pricingModel.priceCost!=null&&D.pricingModel.priceCost>0?(u(),h("span",tC,_(a(Ii)(D.pricingModel.priceCost)),1)):k("",!0)])])],8,KS)]))),128))])])):!d.value&&r.value?.length===0&&s.value.length>=co?(u(),h("div",nC,[o("div",oC,[o("h5",null,_(a(f)("Search_NoResults").replace("{0}",s.value)),1),o("p",sC,_(a(f)("Search_TryAgain")),1)])])):d.value?k("",!0):(u(),h("div",iC,[i.value.length>0?(u(),h("div",aC,[o("h6",rC,_(a(f)("Search_RecentSearches")),1),o("ul",{class:"search-history-list list-unstyled","aria-label":a(f)("Search_RecentSearches")},[(u(!0),h(z,null,Q(i.value,(D,L)=>(u(),h("li",{key:L,class:"search-history-item d-flex align-items-center justify-content-between p-2 rounded mb-1"},[o("button",{onClick:ie(S=>A(D),["prevent"]),type:"button",class:"btn btn-link text-start text-dark p-0 text-decoration-none flex-grow-1","aria-label":a(f)("Search_SearchFor").replace("{0}",D)},[$[5]||($[5]=o("i",{class:"fa-regular fa-clock-rotate-left me-2 text-muted","aria-hidden":"true"},null,-1)),j(" "+_(D),1)],8,cC),o("button",{onClick:ie(S=>B(L),["prevent"]),type:"button",class:"btn btn-link text-muted p-0","aria-label":a(f)("Search_RemoveFromHistory").replace("{0}",D)},[...$[6]||($[6]=[o("i",{class:"fa-regular fa-xmark","aria-hidden":"true"},null,-1)])],8,uC)]))),128))],8,lC)])):k("",!0)]))]),_:1},8,["modelValue","title"])]))}}),_C=le(fC,[["__scopeId","data-v-2b5cec67"]]),pC={class:"text-muted mb-3"},mC={class:"loyalty-actions-list list-unstyled mb-0 pb-3"},vC={class:"loyalty-action-icon"},gC={class:"loyalty-action-label flex-grow-1"},yC={class:"loyalty-action-points"},bC=q({__name:"LoyaltyPointsInfo",setup(n){const e=w(!1),t=[],s=()=>{e.value=!0};oe(()=>{document.querySelectorAll("[data-loyalty-points-info-trigger]").forEach(r=>
3{r.addEventListener("click",s),t.push(r)})}),Te(()=>{t.forEach(r=>{r.removeEventListener("click",s)})});const i=[{descriptionKey:"BidPlaced",icon:"fa-regular fa-gavel",points:1},{descriptionKey:"OrderConfirmed",icon:"fa-regular fa-circle-check",points:10},{descriptionKey:"OrderPaid",icon:"fa-regular fa-credit-card",points:90},{descriptionKey:"ReviewPlaced",icon:"fa-regular fa-star",points:20}];return(r,l)=>(u(),ee(nt,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),title:a(f)("LoyaltyPointsInfo_Title"),compact:""},{default:de(()=>[o("p",pC,_(a(f)("LoyaltyPointsInfo_Description")),1),o("ul",mC,[(u(),h(z,null,Q(i,d=>o("li",{key:d.descriptionKey,class:"loyalty-action-item d-flex align-items-center py-2"},[o("div",vC,[o("i",{class:V(d.icon),"aria-hidden":"true"},null,2)]),o("span",gC,_(a(f)("PointsReceivedNotification_"+d.descriptionKey)),1),o("span",yC," +"+_(d.points)+" "+_(d.points===1?a(f)("AffiliateDeal_PointTitle")?.toLowerCase()||"punt":a(f)("AffiliateDeal_PointsTitle")?.toLowerCase()||"punten"),1)])),64))])]),_:1},8,["modelValue","title"]))}}),wC=le(bC,[["__scopeId","data-v-e2b30318"]]),kC={Silvering:"Silvering"},IC={ToReservation:"ToReservation",ToWebsite:"ToWebsite"};function SC(n,e){if(!e||!n)return null;const{helpType:t,requiresPayment:s}=n;return s&&e.paymentPending&&e.paymentUrl?{title:f("ContactHelp_PaymentRequired_Title"),message:f("ContactHelp_PaymentRequired_Message"),actionUrl:e.paymentUrl,actionLabel:f("ContactHelp_GoToPayment")}:t?CC(t,e):null}function CC(n,e){switch(n){case"Voucher":return $C(e);case"VoucherValidity":return TC(e);case"Reservation":return xC(e);case"Payment":return e.paymentPending&&e.paymentUrl?{title:f("ContactHelp_Payment_Title"),message:f("ContactHelp_Payment_Message"),actionUrl:e.paymentUrl,actionLabel:f("ContactHelp_GoToPayment")}:null;case"Cancel":return e.canSelfCancel&&e.selfCancelUrl?{title:f("ContactHelp_Cancel_Title"),message:f("ContactHelp_Cancel_Message"),actionUrl:e.selfCancelUrl,actionLabel:f("ContactHelp_GoToCancel")}:null;case"AccountSettings":return e.accountSettingsUrl?{title:f("ContactHelp_AccountSettings_Title"),message:f("ContactHelp_AccountSettings_Message"),actionUrl:e.accountSettingsUrl,actionLabel:f("ContactHelp_GoToAccountSettings")}:null;case"MyAuctions":return e.myAuctionsUrl?{title:f("ContactHelp_MyAuctions_Title"),message:f("ContactHelp_MyAuctions_Message"),actionUrl:e.myAuctionsUrl,actionLabel:f("ContactHelp_GoToMyAuctions")}:null;case"Tracking":return EC(e);case"Invoice":return e.invoiceUrl?{title:f("ContactHelp_Invoice_Title"),message:f("ContactHelp_Invoice_Message"),actionUrl:e.invoiceUrl,actionLabel:f("ContactHelp_GoToInvoice")}:null;case"ProductReturnNotAllowed":return{title:f("ContactHelp_ProductReturnNotAllowed_Title"),message:f("ContactHelp_ProductReturnNotAllowed_Message")};default:return null}}function $C(n){return n.mobileVoucherUrl?{title:f("ContactHelp_Voucher_Title"),message:f("ContactHelp_Voucher_Message"),actionUrl:n.mobileVoucherUrl,actionLabel:f("ContactHelp_GoToVoucher")}:n.voucherDownloadUrl?{title:f("ContactHelp_VoucherDownload_Title"),message:f("ContactHelp_VoucherDownload_Message"),actionUrl:n.voucherDownloadUrl,actionLabel:f("ContactHelp_GoToVoucherDownload")}:null}function TC(n){return n.isValidOnDate&&n.voucherValidOnDate?{title:f("ContactHelp_VoucherValidity_Title"),message:f("ContactHelp_VoucherValidOn_Message",{date:fo(n.voucherValidOnDate)})}:!n.isValidOnDate&&n.voucherExpirationDate?{title:f("ContactHelp_VoucherValidity_Title"),message:f("ContactHelp_VoucherValidity_Message",{date:fo(n.voucherExpirationDate)})}:null}function xC(n){return n.chooseOptionUrl?{title:f("ContactHelp_ChooseOption_Title"),message:f("ContactHelp_ChooseOption_Message"),actionUrl:n.chooseOptionUrl,actionLabel:f("ContactHelp_GoToChooseOption")}:n.reservationPageUrl?{title:f("ContactHelp_Reservation_Title"),message:f("ContactHelp_Reservation_Message"),actionUrl:n.reservationPageUrl,actionLabel:f("ContactHelp_GoToReservation")}:null}function EC(n){return n.hasTrackingInfo?n.trackingUrl?{title:f("ContactHelp_Tracking_Title"),message:f("ContactHelp_TrackingLink_Message"),actionUrl:n.trackingUrl,actionLabel:f("ContactHelp_GoToTracking")}:{title:f("ContactHelp_Tracking_Title"),message:f("ContactHelp_Tracking_Message")}:null}const AC={key:1,class:"alert alert-danger",role:"alert"},LC={key:2,class:"simple-card p-3 p-md-4 mb-4"},DC={class:"text-center py-4"},BC={class:"fw-bold"},PC=["href"],UC={class:"simple-card p-3 p-md-4 mb-4"},MC={class:"simple-card__top"}
3,NC={key:0,class:"simple-card__image big_image rounded d-none d-lg-flex"},RC={class:"image"},OC=["src","alt"],FC={class:"simple-card__description"},VC={class:"title h6 mb-3 mb-lg-2 mt-2"},HC={class:"m-0 fs-7"},qC={class:"m-0 fs-7"},WC={key:0,class:"m-0 fs-7"},zC={class:"text-black",style:{"text-decoration":"underline !important"}},KC={class:"m-0 fs-7"},GC={class:"d-flex flex-column flex-md-row"},jC={type:"button",class:"btn-n btn-n-primary btn-n-border me-md-3 mb-3 mb-md-0","data-bs-toggle":"collapse","data-bs-target":"#contact-form","aria-expanded":"false","aria-controls":"contact-form"},XC=["href"],YC={key:0,class:"simple-card p-3 p-md-4 mb-4"},JC={class:"fw-bold"},ZC={key:0,class:"m-0 fs-7"},QC={key:1,class:"m-0 fs-7"},e$=["href"],t$={key:1,class:"simple-card p-3 p-md-4 mb-4"},n$={class:"d-flex align-items-start mb-2"},o$={class:"fw-bold text-16 mb-0"},s$=["aria-expanded","aria-controls","onClick"],i$={class:"flex-grow-1 text-start fw-medium"},a$=["id","innerHTML"],r$={class:"simple-card p-3 p-md-4 mb-4"},l$={key:0,class:"alert alert-danger mb-4",role:"alert"},c$={class:"mb-4"},u$={class:"fw-bold text-21"},d$={class:"form-group mb-4"},h$={class:"m-0"},f$={key:0},_$={class:"text-muted"},p$={class:"form-group mb-4"},m$={class:"form-group mb-4"},v$={key:1,class:"p-3 mb-4 rounded",style:{"background-color":"#f8f9fa",border:"1px solid #ebeae6"}},g$={class:"d-flex align-items-start mb-2"},y$={class:"fw-bold text-16 mb-0"},b$=["aria-expanded","aria-controls","onClick"],w$={class:"flex-grow-1 text-start fw-medium"},k$=["id","innerHTML"],I$={key:2,class:"simple-card p-3 mb-4",style:{"background-color":"#f8f9fa",border:"1px solid #ebeae6"}},S$={class:"d-flex align-items-start"},C$={class:"flex-grow-1"},$$={class:"fw-bold text-16 mb-2"},T$={class:"mb-0"},x$=["href"],E$={key:3,class:"simple-card p-3 mb-4",style:{"background-color":"#f8f9fa"}},A$={class:"fw-bold text-16 mb-2"},L$=["innerHTML"],D$={key:0,class:"reservation-container bg-gray mt-3"},B$={class:"reservation-code-sep ps-2 pe-2"},P$=["aria-label","onClick"],U$={class:"ms-auto"},M$=["href"],N$={key:1,class:"button-holder bg-white d-flex mt-3"},R$=["href"],O$={class:"form-group mb-4"},F$={class:"form-group mb-4"},V$={class:"form-group mb-4"},H$={class:"form-group mb-4"},q$={class:"d-flex"},W$={key:2,class:"simple-card p-3 p-md-4 mb-4"},z$={class:"fw-bold"},K$={class:"m-0 fs-7"},G$={key:0,class:"m-0 fs-7"},j$={key:1,class:"m-0 fs-7"},X$={key:2,class:"m-0 fs-7"},Y$={key:3,class:"m-0 fs-7"},J$=2e3,Z$=q({__name:"ContactOrder",props:{orderId:{},cancelUrl:{},backUrl:{}},setup(n){const e=n,t=E(()=>e.backUrl??"/service"),s=E(()=>e.cancelUrl??""),i=w(!0),r=w(null),l=w(!1),d=w(""),c=w(null),p=w(null),m=w(null),g=w(null),v=w(null),y=w(null),T=w(null),I=w(null),{validateAll:C,errors:A}=wo(()=>[m.value,g.value,v.value,y.value,T.value,I.value]),B=w(new Set),b=w(new Set),$=w(""),D=w(""),L=w(""),S=w(""),x=w(""),R=w(""),F=w(""),Y=w({countryCode:"",localNumber:""}),G=E(()=>{if(!(!$.value||!c.value))return c.value.categories.find(fe=>fe.key===$.value)}),P=E(()=>G.value?.subcategories||[]),H=E(()=>{if(D.value)return P.value.find(fe=>fe.key===D.value)}),U=E(()=>!!c.value?.reservationInfo&&!!H.value?.showReservationInfo),W=E(()=>!H.value||!c.value?null:SC(H.value,c.value.contextualHelp)),J=E(()=>c.value?.reservationInfo?c.value.reservationInfo.type===kC.Silvering?f("Button_Redeem"):f("Order_Reservation"):""),ue=E(()=>c.value?fo(c.value.dateCreated):""),Ie=E(()=>c.value?.allowedToCancel===!0&&!c.value?.isSellerPortal),be=E(()=>c.value?.subcategoryFaqs?.[D.value]??[]),we=(fe,Z)=>{const ne=fe==="always"?B:b,re=new Set(ne.value);re.has(Z)?re.delete(Z):re.add(Z),ne.value=re},Ge=E(()=>c.value?.forwardContactToAdvertiser?c.value.partnerInfo?.name||f("Order_Domain_Name"):f("Order_Domain_Name")),Fe=async()=>{i.value=!0,d.value="";try{const fe=await Ke.get(`contact/order/${e.orderId}`);c.value=fe.data.data,S.value=c.value.firstName||"",x.value=c.value.middleName||"",R.value=c.value.lastName||"",F.value=c.value.email||"",Y.value={countryCode:c.value.phone.countryCode||"",localNumber:c.value.phone.localNumber}}catch(fe){console.error("Failed to load order data:",fe);const Z=fe;if(Z.response?.status===404)d.value=f("Order_Error_NotFound");else if(Z.response?.data?.errors){const ne=Z.response.data.errors[0];d.value=ne?.value||f("Error_Common")}else d.value=f("Order_Error_Loading")}finally{i.value=!1}};te($,()=>{D.value=""}),te(D,()=>{b.value=new Set});const qe=async()=>
3{if(C()){d.value="";try{const fe={category:$.value,subcategory:D.value,remark:L.value,firstName:S.value,middleName:x.value||void 0,lastName:R.value,email:F.value,phone:di(Y.value)||void 0};await Ke.post(`contact/order/${e.orderId}`,fe),l.value=!0}catch(fe){console.error("Failed to submit form:",fe);const Z=fe;if(Z.response?.data?.errors){const ne=Z.response.data.errors;d.value=ne.map(re=>re.value).join(", ")}else d.value=f("Order_Error_Submit")}}},je=async fe=>{await navigator.clipboard.writeText(fe),p.value=fe,setTimeout(()=>{p.value=null},J$)};return oe(()=>{Fe()}),(fe,Z)=>(u(),h("div",null,[i.value?Oe(fe.$slots,"default",{key:0},void 0,!0):d.value&&!c.value?(u(),h("div",AC,_(d.value),1)):l.value?(u(),h("div",LC,[o("div",DC,[Z[10]||(Z[10]=o("i",{class:"fa-solid fa-circle-check text-success fa-3x mb-3","aria-hidden":"true"},null,-1)),o("h4",BC,_(a(f)("Contact_Success_Title")),1),o("p",null,_(a(f)("Contact_Success_Text")),1),o("a",{href:t.value,class:"btn-n btn-n-primary mt-3"},[j(_(a(f)("Common_Back"))+" ",1),Z[9]||(Z[9]=o("i",{class:"fa-solid fa-chevron-right ms-3","aria-hidden":"true"},null,-1))],8,PC)])])):c.value?(u(),h(z,{key:3},[o("div",UC,[o("div",MC,[c.value.image?(u(),h("div",NC,[o("figure",RC,[o("img",{src:`${c.value.image}?auto=format&fit=crop&w=300&h=200&q=30&dpr=3`,alt:a(f)("Order_WonAuction"),class:"rounded"},null,8,OC)])])):k("",!0),o("div",FC,[o("h4",VC,_(c.value.title),1),o("p",HC,[o("span",null,_(a(f)("Order_OrderNumber"))+":",1),j(" "+_(c.value.orderFriendlyId),1)]),o("p",qC,[o("span",null,_(a(f)("Order_WonOn")),1),j(" "+_(ue.value)+" "+_(a(f)("Common_For"))+" "+_(a(pe)(c.value.wonPrice)),1)]),c.value.isSellerPortal?(u(),h("p",WC,[j(_(a(f)("Order_SoldAndDeliverBy"))+" ",1),o("span",zC,_(c.value.partnerInfo?.name),1)])):k("",!0),o("p",KC,[o("span",null,_(a(f)("Order_Total"))+":",1),j(" "+_(a(pe)(c.value.orderValue)),1)])])]),c.value.allowedToCancel?(u(),h(z,{key:0},[Z[13]||(Z[13]=o("hr",null,null,-1)),o("div",GC,[o("button",jC,[j(_(a(f)("Order_Contact"))+" ",1),Z[11]||(Z[11]=o("i",{class:"fa-solid fa-envelope ms-3","aria-hidden":"true"},null,-1))]),s.value?(u(),h("a",{key:0,href:s.value,class:"btn-n btn-n-gray btn-n-border"},[j(_(a(f)("Order_Cancel"))+" ",1),Z[12]||(Z[12]=o("i",{class:"fa-solid fa-chevron-right ms-3","aria-hidden":"true"},null,-1))],8,XC)):k("",!0)])],64)):k("",!0)]),c.value.isSellerPortal&&c.value.trackingInfo?.shipmentStatus?(u(),h("div",YC,[o("h6",JC,_(a(f)("Order_Tracking")),1),c.value.trackingInfo.trackingCode?(u(),h("p",ZC,_(a(f)("Order_TrackingCode"))+": "+_(c.value.trackingInfo.trackingCode),1)):k("",!0),c.value.trackingInfo.carrier?(u(),h("p",QC,_(a(f)("Order_Carrier"))+": "+_(c.value.trackingInfo.carrier),1)):k("",!0),c.value.trackingInfo.trackingLink?(u(),h("a",{key:2,href:c.value.trackingInfo.trackingLink,target:"_blank",class:"btn-n btn-n-primary btn-n-border mt-3"},[j(_(a(f)("Order_TrackPackage"))+" ",1),Z[14]||(Z[14]=o("i",{class:"fa-solid fa-arrow-up-right-from-square ms-3","aria-hidden":"true"},null,-1))],8,e$)):k("",!0)])):k("",!0),c.value.alwaysVisibleFaqs?.length?(u(),h("div",t$,[o("div",n$,[Z[15]||(Z[15]=o("i",{class:"fa-solid fa-circle-question text-primary me-2 mt-1"},null,-1)),o("h6",o$,_(a(f)("Contact_Faq_Related_Title")),1)]),(u(!0),h(z,null,Q(c.value.alwaysVisibleFaqs,(ne,re)=>(u(),h("div",{key:"af-"+re,class:V({"faq-divider":re<c.value.alwaysVisibleFaqs.length-1})},[o("button",{type:"button",class:"btn-unstyled d-flex align-items-center w-100 py-3","aria-expanded":B.value.has(re),"aria-controls":"af-panel-"+re,onClick:ke=>we("always",re)},[o("span",i$,_(ne.title),1),o("i",{class:V(["fa-solid fa-chevron-down ms-3 transition-transform",{"rotate-180":B.value.has(re)}]),"aria-hidden":"true"},null,2)],8,s$),B.value.has(re)?(u(),h("div",{key:0,id:"af-panel-"+re,role:"region",class:"pb-3",innerHTML:ne.description},null,8,a$)):k("",!0)],2))),128))])):k("",!0),o("form",{id:"contact-form",class:V(["collapse",{show:!Ie.value}]),novalidate:"",onSubmit:Z[8]||(Z[8]=ie(ne=>r.value?.trigger(),["prevent"]))},[o("div",r$,[d.value?(u(),h("div",l$,[Z[16]||(Z[16]=o("strong",null,"Let op:",-1)),j(" "+_(d.value),1)])):k("",!0),N(gr,{errors:a(A),class:"mb-4"},null,8,["errors"]),o("div",c$,[o("h2",u$,_(a(f)("Order_Contact_Email_Text")),1),o("b",null,_(a(f)("Order_Contact_User_Email")),1)]),o("div",d$,[o("label",null,_(a(f)("Order_Contact_To_Advert
3iser")),1),o("p",h$,_(Ge.value),1),c.value.forwardContactToAdvertiser?(u(),h("p",f$,[o("small",_$,[o("i",null,_(a(f)("Order_Contact_Forward")),1)])])):k("",!0)]),o("div",p$,[N(as,{id:"contact-category",ref_key:"categoryField",ref:m,modelValue:$.value,"onUpdate:modelValue":Z[0]||(Z[0]=ne=>$.value=ne),label:a(f)("Order_Contact_Category"),options:c.value.categories.map(ne=>({value:ne.key,label:ne.displayName})),placeholder:a(f)("Order_Contact_Category_Placeholder"),"required-message":a(f)("Order_Contact_Category_Error"),class:"w-100"},null,8,["modelValue","label","options","placeholder","required-message"])]),o("div",m$,[N(as,{id:"contact-subcategory",ref_key:"subcategoryField",ref:g,modelValue:D.value,"onUpdate:modelValue":Z[1]||(Z[1]=ne=>D.value=ne),label:a(f)("Order_Contact_Subject"),options:P.value.map(ne=>({value:ne.key,label:ne.displayName})),placeholder:$.value?a(f)("Order_Contact_Subject_Placeholder"):a(f)("Order_Contact_Subject_Placeholder_Disabled"),"required-message":a(f)("Order_Contact_Subject_Error"),disabled:!$.value,class:"w-100"},null,8,["modelValue","label","options","placeholder","required-message","disabled"])]),be.value.length?(u(),h("div",v$,[o("div",g$,[Z[17]||(Z[17]=o("i",{class:"fa-solid fa-circle-question text-primary me-2 mt-1"},null,-1)),o("h6",y$,_(a(f)("Contact_Faq_Title")),1)]),(u(!0),h(z,null,Q(be.value,(ne,re)=>(u(),h("div",{key:"sf-"+re,class:V({"faq-divider":re<be.value.length-1})},[o("button",{type:"button",class:"btn-unstyled d-flex align-items-center w-100 py-3","aria-expanded":b.value.has(re),"aria-controls":"sf-panel-"+re,onClick:ke=>we("subcategory",re)},[o("span",w$,_(ne.title),1),o("i",{class:V(["fa-solid fa-chevron-down ms-3 transition-transform",{"rotate-180":b.value.has(re)}]),"aria-hidden":"true"},null,2)],8,b$),b.value.has(re)?(u(),h("div",{key:0,id:"sf-panel-"+re,role:"region",class:"pb-3",innerHTML:ne.description},null,8,k$)):k("",!0)],2))),128))])):k("",!0),W.value?(u(),h("div",I$,[o("div",S$,[Z[19]||(Z[19]=o("i",{class:"fa-solid fa-circle-info text-primary me-3 mt-1","aria-hidden":"true"},null,-1)),o("div",C$,[o("h6",$$,_(W.value.title),1),o("p",T$,_(W.value.message),1),W.value.actionUrl?(u(),h("a",{key:0,href:W.value.actionUrl,class:"btn-n btn-n-primary btn-n-border mt-3"},[j(_(W.value.actionLabel)+" ",1),Z[18]||(Z[18]=o("i",{class:"fa-solid fa-chevron-right ms-3","aria-hidden":"true"},null,-1))],8,x$)):k("",!0)])])])):k("",!0),U.value?(u(),h("div",E$,[o("h6",A$,_(J.value),1),o("div",{innerHTML:c.value.reservationInfo?.html??""},null,8,L$),c.value.reservationInfo?.showBarcodes&&c.value.reservationInfo?.codes?.length?(u(),h("div",D$,[(u(!0),h(z,null,Q(c.value.reservationInfo.codes,(ne,re)=>(u(),h("div",{key:ne,class:V(["reservation-code d-flex align-items-center bg-white",{"p-1 pe-0":c.value.reservationInfo.showButtonOnBarcode}])},[o("div",B$,_(re+1)+".",1),o("button",{type:"button",class:"ms-2 me-2 copy d-flex w-100 btn-unstyled",style:{cursor:"pointer"},"aria-label":a(f)("Order_CopyCode"),onClick:ke=>je(ne)},[o("div",null,_(ne),1),o("div",U$,[o("i",{class:V([p.value===ne?"fa-check":"fa-copy","fa-light"]),"aria-hidden":"true"},null,2)])],8,P$),c.value.reservationInfo.showButtonOnBarcode?(u(),h("a",{key:0,class:"btn-n rounded ms-auto me-1 h-100",href:`${c.value.reservationInfo.buttonLink}${ne}`,target:"_blank"},[...Z[20]||(Z[20]=[o("span",{class:"icon"},[o("i",{class:"fa-regular fa-chevron-right","aria-hidden":"true"})],-1)])],8,M$)):k("",!0)],2))),128))])):k("",!0),c.value.reservationInfo?.showLink?(u(),h("div",N$,[o("a",{class:"btn-n w-100 btn-block",href:c.value.reservationInfo.buttonLink,target:"_blank"},[o("span",null,_(c.value.reservationInfo.buttonType===a(IC).ToReservation?a(f)("Order_ToReservation"):a(f)("Order_ToWebsite")),1),Z[21]||(Z[21]=o("span",{class:"icon"},[o("i",{class:"fa-regular fa-chevron-right","aria-hidden":"true"})],-1))],8,R$)])):k("",!0)])):k("",!0),o("div",O$,[N(nr,{id:"contact-remark",ref_key:"remarkField",ref:v,modelValue:L.value,"onUpdate:modelValue":Z[2]||(Z[2]=ne=>L.value=ne),label:a(f)("Order_Contact_Question_Label"),"required-message":a(f)("Order_Contact_Question_Error"),rows:5,maxlength:250,class:"w-100"},null,8,["modelValue","label","required-message"])]),o("div",F$,[N(hi,{ref_key:"nameFields",ref:y,"first-name":S.value,"onUpdate:firstName":Z[3]||(Z[3]=ne=>S.value=ne),"middle-name":x.value,"onUpdate:middleName":Z[4]||(Z[4]=ne=>x.value=ne),"last-name":R.value,"onUpdate:lastName":Z[5]||(Z[5]=ne=>R.value=ne)},null,8,["first-name","middle-name","last-name"])]),o("div",V$,[N(fi,{id:"contact-phone",ref_key:"phoneField",ref:T,modelValue:Y.value,"onUpdate:modelValue":Z[6]||(Z[6]=ne=>Y.value=ne),label:a(f)("Order_Contact_Phone_Label"),required:!1,"extra-text":a(f)("Order_Contact_Phone_Information")},null,8,["modelValue","label","extra-text"])]),o("div",H$,[N(ai,{id:"contact-email",ref_key:"emailField",ref:I,modelValue:F.value,"onUpdate:modelValue":Z[7]||(Z[7]=ne=>F.value=ne),label:a(f)("Order_Contact_Label"),class:"w-100"},null,8,["modelValue","label"])]),o("div",q$,[N(Tt,{ref_key:"submitButton",ref:r,action:qe,class:"btn-n btn-n-primary"},{default:de(()=>[j(_(a(f)("Order_Contact_Send"))+" ",1),Z[22]||(Z[22]=o("i",{class:"fa-solid fa-chevron-right ms-3","aria-hidden":"true"},null,-1))]),_:1},512)])])],34),c.value.isSellerPortal&&c.value.partnerInfo?(u(),h("div",W$,[o("h6",z$,_(a(f)("Order_PartnerInfo")),1),o("p",K$,_(c.value.partnerInfo.name),1),c.value.partnerInfo.address?(u(),h("p",G$,[j(_(c.value.partnerInfo.address.street)+" "+_(c.value.partnerInfo.address.houseNumber)+_(c.value.partnerInfo.address.houseNumberAddition)+" ",1),Z[23]||(Z[23]=o("br",null,null,-1)),j(" "+_(c.value.partnerInfo.address.postalCode)+" "+_(c.value.partnerInfo.address.city),1)])):k("",!0),c.value.partnerInfo.phoneNumber?(u(),h("p",j$,_(a(f)("Order_Phone"))+": "+_(c.value.partnerInfo.phoneNumber),1)):k("",!0),c.value.partnerInfo.emailAddress?(u(),h("p",X$,_(a(f)("Order_Email"))+": "+_(c.value.partnerInfo.emailAddress),1)):k("",!0),c.value.partnerInfo.cocNumber?(u(),h("p",Y$,_(a(f)("Order_CocNumber"))+": "+_(c.value.partnerInfo.cocNumber),1)):k("",!0)])):k("",!0)],64)):k("",!0)]))}}),Q$=le(Z$,[["__scopeId","data-v-d9a760ef"]]),eT=["aria-label"],tT={class:"category-filter-sheet"},nT=["aria-label"],oT={class:"category-filter-sheet__title"},sT=["aria-label"],iT=["href"],aT={class:"category-filter-sheet__name"},rT={key:0,class:"category-filter-sheet__count"},lT=q({__name:"CategoryFilterSheet",props:{categories:{},parentName:{},auctionsPrefix:{}},setup(n,{expose:e}){const t=w(!1),s=()=>{t.value=!0},i=()=>{t.value=!1},r=()=>{s()};return oe(()=>{window.addEventListener("open-category-filter",r)}),Te(()=>{window.removeEventListener("open-category-filter",r)}),e({open:s,close:i}),(l,d)=>(u(),ee(Zt,{to:"body"},[t.value?(u(),h("div",{key:0,class:"category-filter-bg",role:"dialog","aria-modal":"true","aria-label":n.parentName},[o("div",{class:"category-filter-backdrop",onClick:ie(i,["prevent"]),"aria-hidden":"true"}),o("div",tT,[d[2]||(d[2]=o("div",{class:"category-filter-sheet__handle","aria-hidden":"true"},null,-1)),o("button",{type:"button",class:"category-filter-sheet__close",onClick:ie(i,["prevent"]),"aria-label":a(f)("Common_Close")},[...d[0]||(d[0]=[o("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[o("path",{d:"M1 1L13 13M1 13L13 1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,nT),o("h2",oT,_(n.parentName),1),o("nav",{class:"category-filter-sheet__list",role:"navigation","aria-label":a(f)("Common_Categories")},[(u(!0),h(z,null,Q(n.categories,c=>(u(),h("a",{key:c.id,href:n.auctionsPrefix+c.url,class:"category-filter-sheet__item"},[o("span",aT,_(c.name),1),c.auctionCount!==void 0?(u(),h("span",rT,_(c.auctionCount),1)):k("",!0),d[1]||(d[1]=o("svg",{class:"category-filter-sheet__chevron",width:"8",he
3ight:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[o("path",{d:"M1 1L7 7L1 13",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],8,iT))),128))],8,sT)])],8,eT)):k("",!0)]))}}),cT=le(lT,[["__scopeId","data-v-7a04d43b"]]),uT={},dT={class:"notification-container"};function hT(n,e){return u(),h("div",dT,[Oe(n.$slots,"default",{},void 0,!0)])}const fT=le(uT,[["render",hT],["__scopeId","data-v-015cacea"]]),_T={class:"achievement-card__badge"},pT=["src","alt"],mT={key:1,class:"fa-solid fa-trophy achievement-card__icon"},vT={class:"achievement-card__content"},gT={class:"achievement-card__label"},yT={class:"achievement-card__title"},bT={class:"achievement-card__meta"},wT={key:0,class:"achievement-card__points"},kT={key:1,class:"achievement-card__level"},IT=q({__name:"AchievementNotification",setup(n){const e=w([]),t=w(!1),s=w(1);let i=0;const{subscribe:r}=Dt(),l=d=>{const c=d.achievementId||`achievement-${++i}`;e.value.push({id:c,title:d.title,image:d.image,level:d.level,points:d.pointsReceived}),t.value=!0,s.value=1,setTimeout(()=>{s.value=0},3e3),setTimeout(()=>{t.value=!1,s.value=1},4500),setTimeout(()=>{e.value=e.value.filter(p=>p.id!==c)},6e3)};return oe(()=>{r(Ni,l)}),Pe(()=>{}),(d,c)=>(u(),h(z,null,[t.value?(u(),h("div",{key:0,class:"confetti-wrapper",style:$t({opacity:s.value})},[N(Wo)],4)):k("",!0),N(Qa,{name:"achievement"},{default:de(()=>[(u(!0),h(z,null,Q(e.value,p=>(u(),h("div",{key:p.id,class:"achievement-card"},[o("div",_T,[p.image?(u(),h("img",{key:0,src:p.image,alt:p.title,class:"achievement-card__image",onError:c[0]||(c[0]=(...m)=>a(me)&&a(me)(...m))},null,40,pT)):(u(),h("i",mT))]),o("div",vT,[o("div",gT,_(a(f)("Achievement_Unlocked")),1),o("div",yT,_(p.title),1),o("div",bT,[p.points?(u(),h("span",wT,[c[1]||(c[1]=o("i",{class:"fa-solid fa-star"},null,-1)),j(" +"+_(p.points)+" "+_(a(f)("Achievement_Points")),1)])):k("",!0),p.level?(u(),h("span",kT,_(a(f)("Achievement_Level"))+" "+_(p.level),1)):k("",!0)])])]))),128))]),_:1})],64))}}),ST=le(IT,[["__scopeId","data-v-a2cbb2d9"]]),CT=bo("affiliatePoints",()=>{const n=w(0);let e=!1;function t(l){if(e)return;e=!0;const d=Number.isFinite(l)?Math.trunc(l):0;n.value=Math.max(0,d)}function s(l){l<=0||(n.value+=l)}function i(){n.value=0}const r=Qe(Ri,l=>{s(l.points)});return ei(()=>{kn(r)}),{pendingPoints:n,hydrate:t,addPoints:s,clear:i}}),$T=["href","title","aria-label"],TT={key:0,class:"affiliate-deal-points-indicator__badge"},xT=q({__name:"AffiliateDealPointsIndicator",props:{href:{default:"/ledenvoordeelshop"},initialUnseenPoints:{}},setup(n){const e=n,t=CT();t.hydrate(e.initialUnseenPoints);const{pendingPoints:s}=vt(t),i=w(!1);let r;return te(s,(l,d)=>{l<=d||(i.value=!0,clearTimeout(r),r=setTimeout(()=>{i.value=!1},1200))}),Pe(()=>{clearTimeout(r)}),(l,d)=>(u(),h("a",{href:n.href,class:V(["affiliate-deal-points-indicator",{"is-animating":i.value}]),title:a(s)>0?`+${a(s)} ${a(f)("AffiliateDeal_PointsTitle")}`:a(f)("AffiliateDeal_ShopTitle"),"aria-label":a(s)>0?`+${a(s)} ${a(f)("AffiliateDeal_PointsTitle")}`:a(f)("AffiliateDeal_ShopTitle")},[d[0]||(d[0]=et('<svg class="affiliate-deal-points-indicator__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-b7adedc5><polyline points="20 12 20 22 4 22 4 12" data-v-b7adedc5></polyline><rect x="2" y="7" width="20" height="5" data-v-b7adedc5></rect><line x1="12" y1="22" x2="12" y2="7" data-v-b7adedc5></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z" data-v-b7adedc5></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z" data-v-b7adedc5></path></svg>',1)),N(Ks,{name:"badge"},{default:de(()=>[a(s)>0?(u(),h("span",TT," +"+_(a(s)),1)):k("",!0)]),_:1})],10,$T))}}),ET=le(xT,[["__scopeId","data-v-b7adedc5"]]),AT={class:"notifications-trigger"},LT=["aria-label"],DT={key:0,class:"notifications-trigger__badge"},BT={class:"notifications-content"},PT={key:1,class:"notifications-list"},UT=["href"],MT={class:"notifications-item__image"},NT=["src"],RT={class:"notifications-item__content"},OT=["innerHTML"],FT=["innerHTML"],VT=["onClick","aria-label"],HT={key:2,class:"notifications-empty"},qT={class:"notifications-empty__title"},WT={class:"notifications-empty__subtitle"},zT=["src"],Ws="notifications",KT=q({__name:"Notifications",props:{userId:{type:String,required:!1,default:null}},setup(n){const e=n,t=w(!0),s=w(!1),i=w([]),r=w(!1),l=T=>{T.detail?.panel!==Ws&&s.value&&(s.value=!1)};oe(()=>{c(),window.addEventListener("panel-open",l)}),Te(()=>{window.removeEventListener("panel-open",l)});const d=E(()=>i.value.filter(T=>!T.isRead).length),c=async()=>{try{const{data:T}=await ae.get("inbox"),I=Re.readJson("inboxReadList",[]);i.value=T.data.map(C=>({...C,isRead:C.isRead||I.includes(C.id)}))}catch(T){console.error("Failed to fetch notifications:",T)}finally{t.value=!1}},p=async()=>{window.dispatchEvent(new CustomEvent("panel-open",{detail:{panel:Ws}})),await c(),s.value=!0,r.value=!1,await m()},m=async()=>
3{if(r.value)return;const T=i.value.filter(I=>!I.isRead&&I.id!=="0").map(I=>I.id);if(T.length!==0)if(e.userId)try{await ae.post("inbox/read",{MessageIdList:T}),r.value=!0,i.value=i.value.map(I=>({...I,isRead:!0}))}catch(I){console.error("Failed to mark notifications as read:",I)}else{const I=i.value.map(C=>C.id);Re.writeJson("inboxReadList",[...new Set(I)]),r.value=!0,i.value=i.value.map(C=>({...C,isRead:!0}))}},g=async T=>{if(!(!T||!e.userId))try{await ae.delete(`inbox/${T}`),i.value=i.value.filter(I=>I.id!==T)}catch(I){console.error("Failed to dismiss notification:",I)}},v=T=>`${T||"/dist/images/logos/android-chrome-192x192.png"}?q=70&ar=1:1&fit=crop&auto=compress,format,enhance&w=80`,{emptyStateImage:y}=Oo({dayStartHour:6,dayEndHour:22});return(T,I)=>(u(),h("div",AT,[o("button",{onClick:I[0]||(I[0]=ie(C=>p(),["prevent"])),class:"notifications-trigger__button","aria-label":a(f)("Menu_Notifications")},[I[3]||(I[3]=o("svg",{class:"notifications-trigger__icon",focusable:"false","aria-hidden":"true",viewBox:"0 0 40 40"},[o("g",{fill:"none","fill-rule":"evenodd",stroke:"currentColor","stroke-width":"2.2",transform:"translate(11 9)"},[o("path",{"stroke-linejoin":"round",d:"M9.00034754,-1.1 C10.9609584,-1.1 12.7359584,-0.305305431 14.0208057,0.979541854 C15.305653,2.26438914 16.1003475,4.03938914 16.1003475,6 L16.1003475,6 L16.1003475,12 C16.1003475,12.6679493 16.3259742,13.2832731 16.7056121,13.7734987 C17.2549812,14.4828981 18.1254124,14.9319171 19.1005064,14.8979852 L19.1005064,14.8979852 L19.1002644,18.1 L-1.09931297,18.1 L-1.10030135,14.897944 C-0.152273764,14.93115 0.696844868,14.5077106 1.24824739,13.832393 C1.6214697,13.3752976 1.85797866,12.8021472 1.89516795,12.1753357 L1.89516795,12.1753357 L1.90034754,6 C1.90034754,4.03938914 2.69504211,2.26438914 3.9798894,0.979541854 C5.26473668,-0.305305431 7.03973668,-1.1 9.00034754,-1.1 Z"}),o("circle",{cx:"9",cy:"20.4",r:"2"})])],-1)),d.value>0?(u(),h("span",DT,_(d.value),1)):k("",!0)],8,LT),N(nt,{modelValue:s.value,"onUpdate:modelValue":I[2]||(I[2]=C=>s.value=C),title:a(f)("Menu_Notifications")},{default:de(()=>[o("div",BT,[t.value?(u(),ee(Dn,{key:0,block:"",class:"notifications-loading"})):i.value.length>0?(u(),h("div",PT,[(u(!0),h(z,null,Q(i.value,C=>(u(),h("div",{key:C.id,class:V(["notifications-item",{"is-read":C.isRead}])},[o("a",{href:C.url,class:"notifications-item__link"},[o("div",MT,[o("img",{src:v(C.image),alt:"",onError:I[1]||(I[1]=(...A)=>a(me)&&a(me)(...A))},null,40,NT)]),o("div",RT,[C.title?(u(),h("p",{key:0,class:"notifications-item__title",innerHTML:C.title},null,8,OT)):k("",!0),C.description?(u(),h("p",{key:1,class:"notifications-item__description",innerHTML:C.description},null,8,FT)):k("",!0)])],8,UT),C.isDismissable?(u(),h("button",{key:0,onClick:ie(A=>
3g(C.id),["prevent"]),class:"notifications-item__dismiss","aria-label":a(f)("Common_Close")}," × ",8,VT)):k("",!0)],2))),128))])):(u(),h("div",HT,[o("p",qT,_(a(f)("Inbox_EmptyTitle")),1),o("p",WT,_(a(f)("Inbox_EmptySubtitle")),1),o("img",{src:a(y),alt:"",class:"notifications-empty__image"},null,8,zT)]))])]),_:1},8,["modelValue","title"])]))}}),GT=le(KT,[["__scopeId","data-v-349aa3ed"]]),zs=q({__name:"CheckoutStepperIsland",props:{orderId:{},logoUrl:{},paymentState:{default:"completed"}},setup(n){const e=n,t=E(()=>{const l=Ti(e.orderId);return il.filter(d=>d.name!==al.Claim||l)}),{steps:s,activeStepIndex:i,outcome:r}=On(()=>t.value,{getPaymentState:()=>e.paymentState});return(l,d)=>(u(),ee(An,{steps:a(s),"active-step-index":a(i),outcome:a(r),"logo-url":e.logoUrl,"hide-back":""},null,8,["steps","active-step-index","outcome","logo-url"]))}}),jT=q({__name:"CartStepperIsland",props:{orderId:{},logoUrl:{},paymentState:{default:"completed"}},setup(n){const e=n,{steps:t,activeStepIndex:s,outcome:i}=On(()=>ir,{getPaymentState:()=>e.paymentState});return(r,l)=>(u(),ee(An,{steps:a(t),"active-step-index":a(s),outcome:a(i),"logo-url":e.logoUrl,"hide-back":""},null,8,["steps","active-step-index","outcome","logo-url"]))}}),XT=q({__name:"UpgradeStepperIsland",props:{orderId:{},logoUrl:{},paymentState:{default:"completed"}},setup(n){const e=n,t=E(()=>{const l=Ti(e.orderId);return rl.filter(d=>d.name!==ll.Claim||l)}),{steps:s,activeStepIndex:i,outcome:r}=On(()=>t.value,{getPaymentState:()=>e.paymentState});return(l,d)=>(u(),ee(An,{steps:a(s),"active-step-index":a(i),outcome:a(r),"logo-url":e.logoUrl,"hide-back":""},null,8,["steps","active-step-index","outcome","logo-url"]))}}),YT=q({__name:"StepperIsland",props:{flow:{},orderId:{},logoUrl:{},paymentState:{default:"completed"}},setup(n){const e=n,t={[Xn.Default]:zs,[Xn.Cart]:jT,[Xn.Upgrade]:XT},s=E(()=>t[e.flow]??zs);return(i,r)=>(u(),ee(er(s.value),{"order-id":e.orderId,"logo-url":e.logoUrl,"payment-state":e.paymentState},null,8,["order-id","logo-url","payment-state"]))}}),JT=["title","aria-expanded"],ZT=["src","alt"],QT={class:"language-switcher__code"},ex=["aria-label"],tx={class:"language-switcher__title"},nx={class:"language-switcher__description"},ox={class:"language-switcher__options"},sx=["aria-selected"],ix=["value","checked","onChange"],ax=["src","alt"],rx={class:"language-switcher__option-label"},lx={class:"menu-link__icon"},cx=["src","alt"],ux={class:"menu-link__text"},dx={class:"language-switcher__description"},hx={class:"language-switcher__modal-options"},fx=["value","checked","onChange"],_x=["src","alt"],px={class:"language-switcher__modal-label"},mx=q({__name:"LanguageSwitcher",props:{currentDomain:{},options:{},variant:{default:"dropdown"}},setup(n){const e=n,t=w(!1),s=w(null),i=E(()=>e.options.find(c=>c.value===e.currentDomain)??e.options[0]),r=c=>c.value===e.currentDomain,l=c=>{window.location.href=c},d=c=>{s.value&&!s.value.contains(c.target)&&(t.value=!1)};return te(t,c=>{e.variant==="dropdown"&&(c?document.addEventListener("click",d):document.removeEventListener("click",d))}),Te(()=>{e.variant==="dropdown"&&document.removeEventListener("click",d)}),(c,p)=>n.variant==="dropdown"?(u(),h("div",{key:0,ref_key:"dropdownRef",ref:s,class:"language-switcher"},[o("button",{type:"button",class:V(["language-switcher__button",{"is-open":t.value}]),title:a(f)("LanguageSwitcher_Title"),"aria-expanded":t.value,"aria-haspopup":"listbox",onClick:p[0]||(p[0]=m=>t.value=!t.value)},[o("img",{src:`/dist/images/flags/1x1/${i.value.flagCode}.svg`,alt:i.value.label,class:"language-switcher__flag"},null,8,ZT),o("span",QT,_(i.value.languageCode),1),p[3]||(p[3]=o("svg",{class:"language-switcher__arrow",width:"8",height:"5",viewBox:"0 0 8 5","aria-hidden":"true"},[o("path",{d:"M4 5L0 0h8L4 5z",fill:"currentColor"})],-1))],10,JT),t.value?(u(),h("div",{key:0,class:"language-switcher__dropdown",role:"listbox","aria-label":a(f)("LanguageSwitcher_Title")},[o("h4",tx,_(a(f)("LanguageSwitcher_Title")),1),o("p",nx,_(a(f)("LanguageSwitcher_Description")),1),o("div",ox,[(u(!0),h(z,null,Q(n.options,m=>(u(),h("label",{key:m.value,class:"language-switcher__option",role:"option","aria-selected":r(m)},[o("input",{type:"radio",name:"domain",value:m.value,checked:r(m),class:"language-switcher__radio",onChange:g=>l(m.url)},null,40,ix),o("img",{src:`/dist/images/flags/1x1/${m.flagCode}.svg`,alt:m.label,class:"language-switcher__option-flag"},null,8,ax),o("span",rx,_(m.label),1),o("span",{class:V(["language-switcher__option-code",{"is-active":r(m)}])},_(m.languageCode),3)],8,sx))),128))])],8,ex)):k("",!0)],512)):(u(),h(z,{key:1},[o("button",{type:"button",class:"menu-link",onClick:p[1]||(p[1]=m=>t.value=!0)},[o("div",lx,[o("img",{src:`/dist/images/flags/1x1/${i.value.flagCode}.svg`,alt:i.value.label,class:"language-switcher__menu-flag"}
3,null,8,cx)]),o("div",ux,_(i.value.label)+" ("+_(i.value.languageCode)+") ",1),p[4]||(p[4]=o("svg",{class:"menu-link__arrow",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24"},[o("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})],-1))]),N(nt,{modelValue:t.value,"onUpdate:modelValue":p[2]||(p[2]=m=>t.value=m),title:a(f)("LanguageSwitcher_Title"),compact:""},{default:de(()=>[o("p",dx,_(a(f)("LanguageSwitcher_Description")),1),o("div",hx,[(u(!0),h(z,null,Q(n.options,m=>(u(),h("label",{key:m.value,class:V(["language-switcher__modal-option",{"is-selected":r(m)}])},[o("input",{type:"radio",name:"domain-mobile",value:m.value,checked:r(m),class:"language-switcher__modal-radio",onChange:g=>l(m.url)},null,40,fx),o("img",{src:`/dist/images/flags/1x1/${m.flagCode}.svg`,alt:m.label,class:"language-switcher__modal-flag"},null,8,_x),o("span",px,_(m.label),1),o("span",{class:V(["language-switcher__modal-code",{"is-active":r(m)}])},_(m.languageCode),3)],2))),128))])]),_:1},8,["modelValue","title"])],64))}}),ho=document.querySelector("#fee-block .auction__fee--waived");document.querySelector("[data-fee-waiver]")!==null&&Qe(Oi,()=>{if(document.querySelectorAll("[data-fee-waiver]").forEach(e=>e.remove()),ho===null)return;const n=ho.querySelectorAll("[data-fee-reduction]");n.forEach(e=>e.classList.remove("naf-fee-waiver--standby")),n.length===0&&ho.classList.remove("auction__fee--waived")});const vx=document.getElementsByClassName("vue-element"),gx=or();for(let n of vx)try{const e=tr({});e.use(gx),e.component("RecentlyViewed",oh).component("CompleteUserInformation",sI).component("PhoneVerify",Ei).component("Verify2faStep",Fl).component("LoginOrRegister",ar).component("PasswordReset",pl).component("ChooseOption",qb).component("ChooseItem",g2).component("LotAuctionOverview",Vd).component("AuctionOverview",By).component("AuctionList",Ko).component("DirectAuctionOverview",Zd).component("AuctionBidBlock",o1).component("AuctionOfTheDay",Kh).component("DirectBuyPopup",_a).component("AuctionRecommended",Qh).component("HomepageAaTest",tf).component("DynamicBanner",Gf).component("NoAdminFeeGlobalBanner",j_).component("NoAdminFeeCategoryBanner",ap).component("auctionBidSticky",w1).component("auctionLotSwitcher",$1).component("NearbyFilter",Wy).component("Reviews",Q1).component("AuctionCalendar",va).component("ActiveBids",_y).component("ActiveBidIndicator",w2).component("UserPoints",my).component("Alarm",M2).component("AlarmBanner",fa).component("Share",F2).component("RefundProduct",pI).component("Newsletter",da).component("Favorite",T2).component("AuctionMap",V2).component("AuctionLocationList",Z2).component("MarketingWidget",bI).component("ClusterAuctionItemOverview",cS).component("NearbyAuctions",CI).component("Search",MS).component("AffiliateDealSearch",_C).component("LoyaltyPointsInfo",wC).component("ContactOrder",Q$).component("BottomSheetModal",nt).component("CategoryFilterSheet",cT).component("RecentTabs",Oh).component("NotificationContainer",fT).component("AchievementNotification",ST).component("AffiliateDealPointsIndicator",ET).component("Notifications",GT).component("StepperIsland",YT).component("LanguageSwitcher",mx),e.config.globalProperties.window=window,e.mount(n)}catch(e){console.error("Error mounting Vue component:",e)}document.documentElement.classList.add("vue-ready");

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.