Files
Falcon-PrestaShop-9/falcon/assets/js/e2384bda504aac86515a.js

2 lines
6.6 KiB
JavaScript

"use strict";(()=>{var ct=Object.defineProperty;var $=Object.getOwnPropertySymbols;var _t=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable;var H=(h,l,o)=>l in h?ct(h,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):h[l]=o,f=(h,l)=>{for(var o in l||(l={}))_t.call(l,o)&&H(h,o,l[o]);if($)for(var o of $(l))ht.call(l,o)&&H(h,o,l[o]);return h};(self.webpackChunkFalcon_theme=self.webpackChunkFalcon_theme||[]).push([[869],{6869:(h,l,o)=>{o.r(l),o.d(l,{default:()=>lt});var F=o(5311),e=o.n(F),S=o(8981),T=o(980);const u="dropdown",U="4.6.2",E="bs.dropdown",_=`.${E}`,A=".data-api",V=e().fn[u],d=27,M=32,w=9,P=38,N=40,W=3,B=new RegExp(`${P}|${N}|${d}`),g="disabled",c="show",v="dropup",Y="dropright",j="dropleft",L="dropdown-menu-right",k="position-static",I=`hide${_}`,b=`hidden${_}`,x=`show${_}`,G=`shown${_}`,Q=`click${_}`,y=`click${_}${A}`,R=`keydown${_}${A}`,Z=`keyup${_}${A}`,m='[data-toggle="dropdown"]',q=".dropdown form",O=".dropdown-menu",X=".navbar-nav",J=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",z="top-start",tt="top-end",et="bottom-start",st="bottom-end",nt="right-start",ot="left-start",it={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},rt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"};class r{constructor(t,s){this._element=t,this._popper=null,this._config=this._getConfig(s),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}static get VERSION(){return U}static get Default(){return it}static get DefaultType(){return rt}toggle(){if(this._element.disabled||e()(this._element).hasClass(g))return;const t=e()(this._menu).hasClass(c);r._clearMenus(),!t&&this.show(!0)}show(t=!1){if(this._element.disabled||e()(this._element).hasClass(g)||e()(this._menu).hasClass(c))return;const s={relatedTarget:this._element},n=e().Event(x,s),a=r._getParentFromElement(this._element);if(e()(a).trigger(n),!n.isDefaultPrevented()){if(!this._inNavbar&&t){if(typeof S.Z=="undefined")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let i=this._element;this._config.reference==="parent"?i=a:T.Z.isElement(this._config.reference)&&(i=this._config.reference,typeof this._config.reference.jquery!="undefined"&&(i=this._config.reference[0])),this._config.boundary!=="scrollParent"&&e()(a).addClass(k),this._popper=new S.Z(i,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&e()(a).closest(X).length===0&&e()(document.body).children().on("mouseover",null,e().noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e()(this._menu).toggleClass(c),e()(a).toggleClass(c).trigger(e().Event(G,s))}}hide(){if(this._element.disabled||e()(this._element).hasClass(g)||!e()(this._menu).hasClass(c))return;const t={relatedTarget:this._element},s=e().Event(I,t),n=r._getParentFromElement(this._element);e()(n).trigger(s),!s.isDefaultPrevented()&&(this._popper&&this._popper.destroy(),e()(this._menu).toggleClass(c),e()(n).toggleClass(c).trigger(e().Event(b,t)))}dispose(){e().removeData(this._element,E),e()(this._element).off(_),this._element=null,this._menu=null,this._popper!==null&&(this._popper.destroy(),this._popper=null)}update(){this._inNavbar=this._detectNavbar(),this._popper!==null&&this._popper.scheduleUpdate()}_addEventListeners(){e()(this._element).on(Q,t=>{t.preventDefault(),t.stopPropagation(),this.toggle()})}_getConfig(t){return t=f(f(f({},this.constructor.Default),e()(this._element).data()),t),T.Z.typeCheckConfig(u,t,this.constructor.DefaultType),t}_getMenuElement(){if(!this._menu){const t=r._getParentFromElement(this._element);t&&(this._menu=t.querySelector(O))}return this._menu}_getPlacement(){const t=e()(this._element.parentNode);let s=et;return t.hasClass(v)?s=e()(this._menu).hasClass(L)?tt:z:t.hasClass(Y)?s=nt:t.hasClass(j)?s=ot:e()(this._menu).hasClass(L)&&(s=st),s}_detectNavbar(){return e()(this._element).closest(".navbar").length>0}_getOffset(){const t={};return typeof this._config.offset=="function"?t.fn=s=>(s.offsets=f(f({},s.offsets),this._config.offset(s.offsets,this._element)),s):t.offset=this._config.offset,t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return this._config.display==="static"&&(t.modifiers.applyStyle={enabled:!1}),f(f({},t),this._config.popperConfig)}static _jQueryInterface(t){return this.each(function(){let s=e()(this).data(E);const n=typeof t=="object"?t:null;if(s||(s=new r(this,n),e()(this).data(E,s)),typeof t=="string"){if(typeof s[t]=="undefined")throw new TypeError(`No method named "${t}"`);s[t]()}})}static _clearMenus(t){if(t&&(t.which===W||t.type==="keyup"&&t.which!==w))return;const s=[].slice.call(document.querySelectorAll(m));for(let n=0,a=s.length;n<a;n++){const i=r._getParentFromElement(s[n]),p=e()(s[n]).data(E),D={relatedTarget:s[n]};if(t&&t.type==="click"&&(D.clickEvent=t),!p)continue;const at=p._menu;if(!e()(i).hasClass(c)||t&&(t.type==="click"&&/input|textarea/i.test(t.target.tagName)||t.type==="keyup"&&t.which===w)&&e().contains(i,t.target))continue;const K=e().Event(I,D);e()(i).trigger(K),!K.isDefaultPrevented()&&("ontouchstart"in document.documentElement&&e()(document.body).children().off("mouseover",null,e().noop),s[n].setAttribute("aria-expanded","false"),p._popper&&p._popper.destroy(),e()(at).removeClass(c),e()(i).removeClass(c).trigger(e().Event(b,D)))}}static _getParentFromElement(t){let s;const n=T.Z.getSelectorFromElement(t);return n&&(s=document.querySelector(n)),s||t.parentNode}static _dataApiKeydownHandler(t){if((/input|textarea/i.test(t.target.tagName)?t.which===M||t.which!==d&&(t.which!==N&&t.which!==P||e()(t.target).closest(O).length):!B.test(t.which))||this.disabled||e()(this).hasClass(g))return;const s=r._getParentFromElement(this),n=e()(s).hasClass(c);if(!n&&t.which===d)return;if(t.preventDefault(),t.stopPropagation(),!n||t.which===d||t.which===M){t.which===d&&e()(s.querySelector(m)).trigger("focus"),e()(this).trigger("click");return}const a=[].slice.call(s.querySelectorAll(J)).filter(p=>e()(p).is(":visible"));if(a.length===0)return;let i=a.indexOf(t.target);t.which===P&&i>0&&i--,t.which===N&&i<a.length-1&&i++,i<0&&(i=0),a[i].focus()}}e()(document).on(R,m,r._dataApiKeydownHandler).on(R,O,r._dataApiKeydownHandler).on(`${y} ${Z}`,r._clearMenus).on(y,m,function(C){C.preventDefault(),C.stopPropagation(),r._jQueryInterface.call(e()(this),"toggle")}).on(y,q,C=>{C.stopPropagation()}),e().fn[u]=r._jQueryInterface,e().fn[u].Constructor=r,e().fn[u].noConflict=()=>(e().fn[u]=V,r._jQueryInterface);const lt=r}}]);})();