71 lines
208 KiB
JavaScript
71 lines
208 KiB
JavaScript
|
|
(()=>{var am=Object.defineProperty,cm=Object.defineProperties;var lm=Object.getOwnPropertyDescriptors;var Na=Object.getOwnPropertySymbols;var um=Object.prototype.hasOwnProperty,dm=Object.prototype.propertyIsEnumerable;var Ra=(Ge,Oe,re)=>Oe in Ge?am(Ge,Oe,{enumerable:!0,configurable:!0,writable:!0,value:re}):Ge[Oe]=re,Me=(Ge,Oe)=>{for(var re in Oe||(Oe={}))um.call(Oe,re)&&Ra(Ge,re,Oe[re]);if(Na)for(var re of Na(Oe))dm.call(Oe,re)&&Ra(Ge,re,Oe[re]);return Ge},Mr=(Ge,Oe)=>cm(Ge,lm(Oe));(()=>{var Ge={7:Z=>{"use strict";var te=typeof Reflect=="object"?Reflect:null,he=te&&typeof te.apply=="function"?te.apply:function(p,A,R){return Function.prototype.apply.call(p,A,R)},xe;te&&typeof te.ownKeys=="function"?xe=te.ownKeys:Object.getOwnPropertySymbols?xe=function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:xe=function(p){return Object.getOwnPropertyNames(p)};function me(_){console&&console.warn&&console.warn(_)}var le=Number.isNaN||function(p){return p!==p};function W(){W.init.call(this)}Z.exports=W,Z.exports.once=T,W.EventEmitter=W,W.prototype._events=void 0,W.prototype._eventsCount=0,W.prototype._maxListeners=void 0;var st=10;function He(_){if(typeof _!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}Object.defineProperty(W,"defaultMaxListeners",{enumerable:!0,get:function(){return st},set:function(_){if(typeof _!="number"||_<0||le(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");st=_}}),W.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},W.prototype.setMaxListeners=function(p){if(typeof p!="number"||p<0||le(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this};function ot(_){return _._maxListeners===void 0?W.defaultMaxListeners:_._maxListeners}W.prototype.getMaxListeners=function(){return ot(this)},W.prototype.emit=function(p){for(var A=[],R=1;R<arguments.length;R++)A.push(arguments[R]);var V=p==="error",z=this._events;if(z!==void 0)V=V&&z.error===void 0;else if(!V)return!1;if(V){var H;if(A.length>0&&(H=A[0]),H instanceof Error)throw H;var D=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw D.context=H,D}var it=z[p];if(it===void 0)return!1;if(typeof it=="function")he(it,this,A);else for(var Pe=it.length,ge=ne(it,Pe),R=0;R<Pe;++R)he(ge[R],this,A);return!0};function pe(_,p,A,R){var V,z,H;if(He(A),z=_._events,z===void 0?(z=_._events=Object.create(null),_._eventsCount=0):(z.newListener!==void 0&&(_.emit("newListener",p,A.listener?A.listener:A),z=_._events),H=z[p]),H===void 0)H=z[p]=A,++_._eventsCount;else if(typeof H=="function"?H=z[p]=R?[A,H]:[H,A]:R?H.unshift(A):H.push(A),V=ot(_),V>0&&H.length>V&&!H.warned){H.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=_,D.type=p,D.count=H.length,me(D)}return _}W.prototype.addListener=function(p,A){return pe(this,p,A,!1)},W.prototype.on=W.prototype.addListener,W.prototype.prependListener=function(p,A){return pe(this,p,A,!0)};function be(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function se(_,p,A){var R={fired:!1,wrapFn:void 0,target:_,type:p,listener:A},V=be.bind(R);return V.listener=A,R.wrapFn=V,V}W.prototype.once=function(p,A){return He(A),this.on(p,se(this,p,A)),this},W.prototype.prependOnceListener=function(p,A){return He(A),this.prependListener(p,se(this,p,A)),this},W.prototype.removeListener=function(p,A){var R,V,z,H,D;if(He(A),V=this._events,V===void 0)return this;if(R=V[p],R===void 0)return this;if(R===A||R.listener===A)--this._eventsCount===0?this._events=Object.crea
|
||
|
|
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
||
|
|
* Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||
|
|
*/const At=new Map,zr={set(n,e,t){At.has(n)||At.set(n,new Map);const r=At.get(n);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,t)},get(n,e){return At.has(n)&&At.get(n).get(e)||null},remove(n,e){if(!At.has(n))return;const t=At.get(n);t.delete(e),t.size===0&&At.delete(n)}},al=1e6,cl=1e3,Gr="transitionend",To=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),n),ll=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),ul=n=>{do n+=Math.floor(Math.random()*al);while(document.getElementById(n));return n},dl=n=>{if(!n)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(n);const r=Number.parseFloat(e),s=Number.parseFloat(t);return!r&&!s?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*cl)},Co=n=>{n.dispatchEvent(new Event(Gr))},ht=n=>!n||typeof n!="object"?!1:(typeof n.jquery!="undefined"&&(n=n[0]),typeof n.nodeType!="undefined"),Tt=n=>ht(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(To(n)):null,Jt=n=>{if(!ht(n)||n.getClientRects().length===0)return!1;const e=getComputedStyle(n).getPropertyValue("visibility")==="visible",t=n.closest("details:not([open])");if(!t)return e;if(t!==n){const r=n.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},Ct=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled!="undefined"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",Lo=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const e=n.getRootNode();return e instanceof ShadowRoot?e:null}return n instanceof ShadowRoot?n:n.parentNode?Lo(n.parentNode):null},zn=()=>{},yn=n=>{n.offsetHeight},Mo=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Qr=[],fl=n=>{document.readyState==="loading"?(Qr.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Qr)e()}),Qr.push(n)):n()},We=()=>document.documentElement.dir==="rtl",Ke=n=>{fl(()=>{const e=Mo();if(e){const t=n.NAME,r=e.fn[t];e.fn[t]=n.jQueryInterface,e.fn[t].Constructor=n,e.fn[t].noConflict=()=>(e.fn[t]=r,n.jQueryInterface)}})},Ie=(n,e=[],t=n)=>typeof n=="function"?n(...e):t,Oo=(n,e,t=!0)=>{if(!t){Ie(n);return}const r=5,s=dl(e)+r;let o=!1;const i=({target:a})=>{a===e&&(o=!0,e.removeEventListener(Gr,i),Ie(n))};e.addEventListener(Gr,i),setTimeout(()=>{o||Co(e)},s)},Xr=(n,e,t,r)=>{const s=n.length;let o=n.indexOf(e);return o===-1?!t&&r?n[s-1]:n[0]:(o+=t?1:-1,r&&(o=(o+s)%s),n[Math.max(0,Math.min(o,s-1))])},pl=/[^.]*(?=\..*)\.|.*/,hl=/\..*/,ml=/::\d+$/,Jr={};let Po=1;const ko={mouseenter:"mouseover",mouseleave:"mouseout"},gl=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Do(n,e){return e&&`${e}::${Po++}`||n.uidEvent||Po++}function No(n){const e=Do(n);return n.uidEvent=e,Jr[e]=Jr[e]||{},Jr[e]}function vl(n,e){return function t(r){return es(r,{delegateTarget:n}),t.oneOff&&b.off(n,r.type,e),e.apply(n,[r])}}function _l(n,e,t){return function r(s){const o=n.querySelectorAll(e);for(let{target:i}=s;i&&i!==this;i=i.parentNode)for(const a of o)if(a===i)return es(s,{delegateTarget:i}),r.oneOff&&b.off(n,s.type,e,t),t.apply(i,[s])}}function Ro(n,e,t=null){return Object.values(n).find(r=>r.callable===e&&r.delegationSelector===t)}function Io(n,e,t){const r=typeof e=="string",s=r?t:e||t;let o=$o(n);return gl.has(o)||(o=n),[r,s,o]}function xo(n,e,t,r,s){if(
|
||
|
|
<div class="alert alert-dismissible fade d-flex align-items-center" role="alert">
|
||
|
|
<h4 class="alert-heading w-100 d-none"></h4>
|
||
|
|
<i class="material-icons flex-shrink-0 me-2"></i>
|
||
|
|
<div class="alert-body flex-fill"></div>
|
||
|
|
<button type="button" class="btn-close ms-2" data-bs-dismiss="alert"></button>
|
||
|
|
</div>
|
||
|
|
`,dp={type:"info",dismissible:!0};var fp=Object.defineProperty,Mi=Object.getOwnPropertySymbols,pp=Object.prototype.hasOwnProperty,hp=Object.prototype.propertyIsEnumerable,Oi=(n,e,t)=>e in n?fp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pi=(n,e)=>{for(var t in e||(e={}))pp.call(e,t)&&Oi(n,t,e[t]);if(Mi)for(var t of Mi(e))hp.call(e,t)&&Oi(n,t,e[t]);return n};const mp=(n,e)=>{let t={instance:null,element:null,show:()=>!1,hide:()=>!1,dispose:()=>!1,title:()=>!1,message:()=>!1,remove:()=>!1};const r=gp(e);if(r){const s=vp(r,e==null?void 0:e.title),o=_p(r,n),i=new Sn(r);t={instance:i,element:r,show:()=>r.isConnected?(r.classList.add("show"),!0):!1,hide:()=>r.isConnected?(r.classList.remove("show"),!0):!1,dispose:()=>r.isConnected?(i.dispose(),!0):!1,title:a=>s!=null&&s.isConnected?(a&&(s.innerHTML=a),s.innerHTML):!1,message:a=>o!=null&&o.isConnected?(a&&(o.innerHTML=a),o.innerHTML):!1,remove:()=>r.isConnected?(r.remove(),!0):!1}}return t},gp=n=>{var e;const t=Pi(Pi({},dp),n),r=(e=t.selector)!=null?e:p.alert.selector,s=document.querySelector(r);if(s){const o=document.createElement("div");o.innerHTML=up;const i=o.querySelector(p.alert.alert);if(i){i.classList.add(cp[t.type]);const a=i.querySelector(p.alert.icon);if(a)if(t.title===void 0){const c=t.icon?t.icon:lp[t.type];a.setAttribute("aria-hidden","true"),a.innerHTML=`&#x${c};`}else i.classList.add("flex-wrap"),a.classList.add("d-none");if(t.dismissible===!1){const c=i.querySelector(p.alert.close);c==null||c.classList.add("d-none")}t.classlist&&t.classlist.split(" ").forEach(c=>{c&&i.classList.add(c)}),s.appendChild(i)}return i}return console.error("The selector for alert is not valid: %c%o","color: white",r),null},vp=(n,e)=>{if(e){const t=n.querySelector(p.alert.heading);if(t)return t.innerHTML=e,t.classList.remove("d-none"),t}return null},_p=(n,e)=>{const t=n.querySelector(p.alert.body);return t&&(t.innerHTML=e),t},cr=mp,Ep={light:"bg-light-subtle border-light-subtle",dark:"bg-dark-subtle border-dark-subtle",primary:"bg-primary-subtle border-primary-subtle",secondary:"bg-secondary-subtle border-secondary-subtle",info:"bg-info-subtle border-info-subtle",success:"bg-success-subtle border-success-subtle",warning:"bg-warning-subtle border-warning-subtle",danger:"bg-danger-subtle border-danger-subtle"},bp=`
|
||
|
|
<div class="toast-container toast-container--fallback position-fixed top-0 end-0 p-3" id="js-toast-container">
|
||
|
|
<template class="js-toast-template">
|
||
|
|
<div class="toast toast--fallback" role="alert" aria-live="assertive" aria-atomic="true">
|
||
|
|
<div class="d-flex">
|
||
|
|
<div class="toast-body"></div>
|
||
|
|
<button type="button" class="btn-close me-2 m-auto d-none" data-bs-dismiss="toast"></button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
</div>
|
||
|
|
`,yp={type:"info",autohide:!0,delay:3e3};var wp=Object.defineProperty,ki=Object.getOwnPropertySymbols,Sp=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,Di=(n,e,t)=>e in n?wp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e)=>{for(var t in e||(e={}))Sp.call(e,t)&&Di(n,t,e[t]);if(ki)for(var t of ki(e))Ap.call(e,t)&&Di(n,t,e[t]);return n};const Tp=(n,e)=>{let t={instance:null,element:null,content:null,show:()=>!1,hide:()=>!1,dispose:()=>!1,message:()=>!1,remove:()=>!1};const r=Cp(e==null?void 0:e.template);if(r){Mp(r,n);const s=Ni(Ni({},yp),e);Op(r,s),s.autohide===!1&&Pp(r);const o=r.querySelector(p.toast.body);if(o){const i=new Ln(r,{autohide:s.autohide,delay:s.delay});t={instance:i,element:r,content:o,show:()=>r.isConnected?(i.show(),!0):!1,hide:()=>r.isConnected?(i.hide(),!0):!1,dispose:()=>r.isConnected?(i.dispose(),!0):!1,message:a=>r.isConnected?(a&&(o.innerHTML=a),o.innerHTML):!1,remove:()=>r.isConnected?(r.remove(),!0):!1}}}return t},Cp=n=>{const e=document.querySelector(p.toast.container);return e?n===void 0?_s(e):Ri(e,n):Lp(n)},_s=(n,e=!0)=>{const t=n.querySelector(p.toast.template),r=t==null?void 0:t.content.cloneNode(!0),s=r==null?void 0:r.querySelector(p.toast.toast),o=s==null?void 0:s.querySelector(p.toast.body);if(s&&o)return n.appendChild(s),s;if(e){const i=Ii();if(i)return n.innerHTML=i.innerHTML,_s(n,!1)}return xi("Failed to clone toast template.","Check the toast markup in theme or JS fallback."),null},Ri=(n,e)=>{const t=document.createElement("div");t.innerHTML=e;const r=t==null?void 0:t.querySelector(p.toast.toast),s=r==null?void 0:r.querySelector(p.toast.body);return r&&s?(n.appendChild(r),r):(xi("The override toast template is not valid.","Reference: https://getbootstrap.com/docs/5.0/components/toasts/"),null)},Lp=n=>{const e=document.querySelector("body"),t=Ii();if(e&&t){const r=n===void 0?_s(t,!1):Ri(t,n);if(r)return t.appendChild(r),e.appendChild(t),r}return null},Ii=()=>{const n=document.createElement("div");return n.innerHTML=bp,n.querySelector(p.toast.container)},Mp=(n,e)=>{const t=n.querySelector(p.toast.body);t&&(t.innerHTML=e)},Op=(n,e)=>{let t=Ep[e.type];const r=e.classlist;r&&(t=t.concat(" ",r.trim())),t.split(" ").forEach(s=>{s&&n.classList.add(s)})},Pp=n=>{var e;const t=n.querySelector(p.toast.close);if(t){const r=(e=n.classList.toString().match(/(?:text-bg-)\w+/))==null?void 0:e[0],s=r==null?void 0:r.split("-").pop();s&&["dark","primary","secondary","success"].includes(s)?t.classList.add("btn-close-white"):t.classList.add("btn-close-black"),t.classList.remove("d-none")}},xi=(n,e)=>{e?(console.group("useToast"),console.error(n),console.info(e),console.groupEnd()):console.error(n)},lr=Tp;var kp=Object.defineProperty,$i=Object.getOwnPropertySymbols,Dp=Object.prototype.hasOwnProperty,Np=Object.prototype.propertyIsEnumerable,qi=(n,e,t)=>e in n?kp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vi=(n,e)=>{for(var t in e||(e={}))Dp.call(e,t)&&qi(n,t,e[t]);if($i)for(var t of $i(e))Np.call(e,t)&&qi(n,t,e[t]);return n};const _t={DELETE_FROM_CART:"delete-from-cart",UPDATE_PRODUCT_QUANTITY:"update-product-quantity",SUBMIT_VOUCHER:"submit-voucher",REMOVE_VOUCHER:"remove-voucher"};class Rp{constructor(){this.state={lastUpdateAction:null,storedFocusElement:null,storedFocusElementId:null}}get(e){return this.state[e]}set(e,t){this.state[e]=t}merge(e){this.state=Vi(Vi({},this.state),e)}}const Mm=null,ve=new Rp;class Ip{getStoredFocus(){return ve.get("storedFocusElement")}getStoredFocusId(){return ve.get("storedFocusElementId")}setFocus(e){e.focus(),ve.set("storedFocusElement",e),ve.set("storedFocusElementId",e.id)}storeFocus(){const e=document.activeElement;ve.set("storedFocusElement",e),ve.set("storedFocusElementId",e.id)}clearStoredFocus(){ve.set("storedFocusElement",null),ve.set("storedFocusElementId",null)}restoreFocus(e=null){let t=!1;try{const r=ve.get("storedFocusElementId"),s=ve.get("storedFocusElement");if(r){const o=document.getElementById(r);o&&(o.focus(),t=!0)}!t&&s&&document.contains(s)&&(s.focus(),t=!0),!t&&e&&document.contain
|
||
|
|
* Copyright since 2007 PrestaShop SA and Contributors
|
||
|
|
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||
|
|
*
|
||
|
|
* NOTICE OF LICENSE
|
||
|
|
*
|
||
|
|
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||
|
|
* that is bundled with this package in the file LICENSE.md.
|
||
|
|
* It is also available through the world-wide-web at this URL:
|
||
|
|
* https://opensource.org/licenses/AFL-3.0
|
||
|
|
* If you did not receive a copy of the license and are unable to
|
||
|
|
* obtain it through the world-wide-web, please send an email
|
||
|
|
* to license@prestashop.com so we can send you a copy immediately.
|
||
|
|
*
|
||
|
|
* @author PrestaShop SA <contact@prestashop.com>
|
||
|
|
* @copyright Since 2007 PrestaShop SA and Contributors
|
||
|
|
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||
|
|
*/const Wp=n=>n.split("&").map(e=>{const[t,r]=e.split("=");return{name:t,value:decodeURIComponent(r).replace(/\+/g," ")}});function Gi(n,e){const{prestashop:t,Theme:{events:r}}=window;let s=[];const i=e.target.dataset.sliderEncodedUrl.split("?");i!==void 0&&i.length>1&&(s=Wp(i[1]));let a=!1;s.forEach(l=>{l.name==="q"&&(a=!0)}),a||s.push({name:"q",value:""}),s.forEach(l=>{l.name==="q"&&(l.value+=[l.value.length>0?"/":"",e.target.dataset.sliderLabel,"-",e.target.dataset.sliderUnit,"-",n[0],"-",n[1]].join(""))});const c=[i[0],"?",$.param(s)].join("");t.emit(r.updateFacets,c)}const mr=()=>{const{Theme:n}=window;document.querySelectorAll(n.selectors.facetedsearch.filterSlider).forEach(e=>{const t=e.querySelector(n.selectors.facetedsearch.rangeContainer),r=t.dataset.sliderCurrency;let s="suffix",o=t.dataset.sliderUnit,i=2,a=".",c="";const l=JSON.parse(t.dataset.sliderSpecifications);l!==null&&(l.positivePattern!==void 0&&l.positivePattern.indexOf("\xA4")===0&&(s="prefix"),l.currencySymbol!==void 0&&(o=l.currencySymbol),l.numberSymbols!==void 0&&(a=l.numberSymbols[0],c=l.numberSymbols[1]),l.minFractionDigits!==void 0&&(i=l.minFractionDigits));const d=parseInt(t.dataset.sliderMin,10),v=parseInt(t.dataset.sliderMax,10),g=t.dataset.sliderDirection==="1"?"rtl":"ltr";let m;const k=Ec()({mark:a,thousand:c,decimals:i,[s]:s==="prefix"?o:` ${o}`}),E=JSON.parse(t.dataset.sliderValues);if(t.noUiSlider)t.noUiSlider.updateOptions({start:E!=null?E:[d,v],tooltips:[k,k],range:{min:d,max:v}},!0),t.noUiSlider.removeTooltips(),t.noUiSlider.on("set",(S,M,x,I,P,j)=>{Gi(S,j)}),t.noUiSlider.on("update",S=>{const M=S.map(P=>s==="suffix"?`${P}${o}`:`${o}${P}`),I=m.target.closest(n.selectors.facetedsearch.filterSlider).querySelector(n.selectors.facetedsearch.rangeValues);I.innerHTML=M.join(" - ")});else{const S=t.querySelector(".noUi-base");S&&S.remove(),m=vc.create(t,{start:E!=null?E:[d,v],tooltips:[k,k],direction:g,connect:[!1,!0,!1],range:{min:d,max:v}}),m.removeTooltips(),m.on("set",(M,x,I,P,j,U)=>{Gi(M,U)}),m.on("update",M=>{const x=M.map(j=>s==="suffix"?`${j}${o}`:`${o}${j}`),P=m.target.closest(n.selectors.facetedsearch.filterSlider).querySelector(n.selectors.facetedsearch.rangeValues);P.innerHTML=x.join(" - ")}),m.target.querySelectorAll(".noUi-handle").forEach(M=>{M.setAttribute("tabindex","0");const x=r?`Adjust filter range in ${r}`:`Adjust filter range' in ${o}`;M.setAttribute("aria-label",x)})}})},Qi=n=>{const{Theme:e}=window,t=document.querySelector(e.selectors.pageLoader);t&&t.classList.toggle("d-none",n)};document.addEventListener("DOMContentLoaded",()=>{const{prestashop:n,Theme:{events:e}}=window;Bp(),n.on(e.updateProductList,()=>{Qi(!0),mr()}),mr(),n.on(e.updateFacets,()=>{Qi(!1)})});var Kp=(n,e,t)=>new Promise((r,s)=>{var o=c=>{try{a(t.next(c))}catch(l){s(l)}},i=c=>{try{a(t.throw(c))}catch(l){s(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,i);a((t=t.apply(n,e)).next())});const{prestashop:Et}=window;Et&&(Et.responsive=Et.responsive||{},Et.responsive.current_width=window.innerWidth,Et.responsive.min_width=768,Et.responsive.mobile=Et.responsive.current_width<Et.responsive.min_width);function Xi(){var n;const{prestashop:e,Theme:{events:t}}=window;if(e.responsive.mobile)Array.prototype.forEach.call(document.querySelectorAll("*[id^='_desktop_']"),r=>{const s=document.querySelector(`#${r.id}`),o=document.querySelector(`#${r.id.replace("_desktop_","_mobile_")}`);o&&s&&z(s,o)}),mr();else{Array.prototype.forEach.call(document.querySelectorAll("*[id^='_mobile_']"),s=>Kp(this,null,function*(){const o=document.querySelector(`#${s.id}`),i=document.querySelector(`#${s.id.replace("_mobile_","_desktop_")}`);i&&o&&z(o,i)}));const r=document.querySelector(he.offCanvasFaceted);r!=null&&((n=vt.getInstance(r))==null||n.hide()),mr()}e.emit(t.responsiveUpdate,{mobile:e.responsive.mobile})}function Ji(){const{prestashop:n}=window;n.responsive=n.responsive||{},n.responsive.current_width=window.innerWidth,n.responsive.min_width=768,n.responsive.mobile=n.responsive.current_width<n.responsive.min_width,window.addEventListener("resize",()=>{const e=n
|
||
|
|
* Copyright since 2007 PrestaShop SA and Contributors
|
||
|
|
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||
|
|
*
|
||
|
|
* NOTICE OF LICENSE
|
||
|
|
*
|
||
|
|
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||
|
|
* that is bundled with this package in the file LICENSE.md.
|
||
|
|
* It is also available through the world-wide-web at this URL:
|
||
|
|
* https://opensource.org/licenses/AFL-3.0
|
||
|
|
* If you did not receive a copy of the license and are unable to
|
||
|
|
* obtain it through the world-wide-web, please send an email
|
||
|
|
* to license@prestashop.com so we can send you a copy immediately.
|
||
|
|
*
|
||
|
|
* DISCLAIMER
|
||
|
|
*
|
||
|
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||
|
|
* versions in the future. If you wish to customize PrestaShop for your
|
||
|
|
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||
|
|
*
|
||
|
|
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||
|
|
* @copyright Since 2007 PrestaShop SA and Contributors
|
||
|
|
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||
|
|
*/const{passwordPolicy:ae}=p,Oh=n=>{try{return JSON.parse(n)}catch(e){return{}}},Ph=(n,e,t)=>{const r=n.querySelector(ae.requirementLengthIcon),s=n.querySelector(ae.requirementScoreIcon),o=!e.validity.tooShort&&!e.validity.tooLong;r&&(r.classList.toggle("text-success",o),r.classList.toggle("text-danger",!o)),s&&(s.classList.toggle("text-success",t),s.classList.toggle("text-danger",!t))},kh=(n,e)=>{const t=Nh(e),r=n.querySelector(ae.progressBar);r&&(r.style.width=`${t.percentage}%`,r.classList.remove("bg-success","bg-danger"),r.classList.add(t.color))},Dh=(n,e,t,r,s)=>{var o,i;let a="";if(r){if(!s){const c=n.querySelector(ae.invalidMessage);a=`${(i=c==null?void 0:c.dataset)==null?void 0:i.psData}
|
||
|
|
`||`Your password is too weak
|
||
|
|
`}}else{const c=n.querySelector(ae.lengthMessage);a=`${(o=c==null?void 0:c.dataset)==null?void 0:o.psData}
|
||
|
|
`||`Your password length is invalid
|
||
|
|
`}return e.feedback.warning&&e.feedback.warning in t&&(a+=`
|
||
|
|
${t[e.feedback.warning]}
|
||
|
|
`),e.feedback.suggestions&&e.feedback.suggestions.forEach(c=>{c&&c in t&&(a+=a?`
|
||
|
|
${t[c]}`:t[c])}),a},Nh=n=>{const e={0:{color:"bg-danger",percentage:20},1:{color:"bg-danger",percentage:40},2:{color:"bg-danger",percentage:60},3:{color:"bg-success",percentage:80},4:{color:"bg-success",percentage:100}},r=Object.keys(e).map(Number).includes(n)?n:0;return e[r]},Cs=(n,e,t)=>Ts(void 0,null,function*(){const r=n.value;if(r===""){e.classList.add("d-none");return}try{const{prestashop:s}=window,o=yield s.checkPasswordScore(r),i=parseInt(n.dataset.minscore||"3",10);e.classList.remove("d-none");const a=!n.validity.tooShort&&!n.validity.tooLong,c=i<=o.score;Ph(e,n,c),kh(e,o.score);const l=e.querySelector(ae.announceValidity),d=e.querySelector(ae.validMessage);if(c&&a){if(n.setCustomValidity(""),n.reportValidity(),l&&d){const v=d.dataset.psData;v&&v!==""&&(l.textContent=v)}}else{const v=Dh(e,o,t,a,c);n.setCustomValidity(v),l&&(l.textContent=v)}}catch(s){console.error("Password validation error:",s)}}),Rh=Bt((...n)=>Ts(void 0,null,function*(){const e=n[0];e&&e.setAttribute("aria-live","polite")}),250),Ih=(n,e,t)=>{const r=n.querySelector(ae.requirementLength),s=n.querySelector(ae.requirementScore),o=n.querySelector(ae.requirementLengthMessage),i=n.querySelector(ae.requirementScoreMessage);if(o&&(r!=null&&r.dataset.translation)){const a=e.getAttribute("minlength")||"8",c=e.getAttribute("maxlength")||"72";o.innerText=(0,ba.sprintf)(r.dataset.translation,a,c)}if(i&&(s!=null&&s.dataset.translation)){const a=e.dataset.minscore||"3",c=t[a]||"Strong";i.innerText=(0,ba.sprintf)(s.dataset.translation,c)}},ln=(n,e,t=null)=>{var r;const s=(r=t==null?void 0:t.querySelector(n))!=null?r:document.querySelector(n);if(!s)throw new Error(e);return s},xh=(n,e,t)=>{const r=()=>Cs(n,e,t);n.addEventListener("input",r);const s=n.closest("form");let o=null;s&&(o=()=>Ts(void 0,null,function*(){yield Cs(n,e,t)}),s.addEventListener("submit",o));const i=e.querySelector(ae.announceValidity);return i&&Rh(i),{inputHandler:r,formSubmitHandler:o,form:s}},$h=()=>{let n;try{n=ln(ae.field,`The element "${ae.field}" for password policy is not found.`)}catch(v){return}const e=ln(ae.input,`The input element "${ae.input}" for password policy is not found.`,n),t=ln(ae.feedbackTarget,`The target element "${ae.feedbackTarget}" for password policy is not found.`,n),r=ln(ae.template,`The feedback template "${ae.template}" for password policy is not found.`);t.innerHTML=r.innerHTML;const s=ln(ae.feedbackContainer,`The feedback container element "${ae.feedbackContainer}" for password policy is not found.`,t),o=ln(ae.hint,`The hint element "${ae.hint}" for password policy is not found.`,n),i=Oh(o.innerHTML);Ih(s,e,i);const{inputHandler:a,formSubmitHandler:c,form:l}=xh(e,s,i);return e.value!==""&&Cs(e,s,i),{element:n,cleanup:()=>{e.removeEventListener("input",a),l&&c&&l.removeEventListener("submit",c)}}};function ya(){const{prestashop:n}=window;let e=null,t=null,r=null;function s(o){const i=Zi();i.innerHTML=o;const a=i.querySelector(p.blockcartModal);if(!a)throw new Error("Blockcart modal element not found in provided HTML.");let c="unknown";const l=v=>{(v.key==="Escape"||v.key==="Esc")&&(c="keyboard");const g=document.activeElement;g&&g.closest('[data-bs-dismiss="modal"]')&&(v.key==="Enter"||v.key===" "||v.code==="Space")&&(c="keyboard")},d=()=>{c="pointer"};a.addEventListener("shown.bs.modal",()=>{var v;document.addEventListener("keydown",l,{capture:!0}),document.addEventListener("pointerdown",d,{capture:!0});const g=a.querySelector(p.blockcartModalStatus);g&&(g.textContent=(v=g.getAttribute("data-ps-data"))!=null?v:"")}),a.addEventListener("hidden.bs.modal",v=>{const g=v.currentTarget;g&&n.emit(kn.updateProduct,{reason:g.dataset,event:v}),document.removeEventListener("keydown",l,{capture:!0}),document.removeEventListener("pointerdown",d,{capture:!0}),c==="keyboard"&&e&&document.contains(e)?(e.focus(),t=null):e||console.error("Last blockcart opener not found."),a.remove()}),ye.getOrCreateInstance(a,{focus:!0,keyboard:!0}).show()}n.on(kn.clickQuickview,o=>{r=o}),document.addEventListener("click",o=>{var i,a,c,l;const d=o.target;if(!d)return;const{quickview:v,qui
|