1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["ambassador-slider.plugin"],{857:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?o(Array.isArray(t)?[]:{},t,e):t}function n(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function s(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function a(t,e){try{return e in t}catch(t){return!1}}function o(t,r,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,d,u=Array.isArray(r);return u!==Array.isArray(t)?i(r,l):u?l.arrayMerge(t,r,l):(d={},(c=l).isMergeableObject(t)&&s(t).forEach(function(e){d[e]=i(t[e],c)}),s(r).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&c.isMergeableObject(r[e])?d[e]=(function(t,e){if(!e.customMerge)return o;var r=e.customMerge(t);return"function"==typeof r?r:o})(e,c)(t[e],r[e],c):d[e]=i(r[e],c))}),d)}o.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return o(t,r,e)}
1,{})},t.exports=o},735:(t,e,r)=>{r.r(e),r.d(e,{default:()=>n});var i=r(890);class n extends i.Z{init(){this._track=this.el.querySelector(".ambassador-scrollbar"),this._drag=this.el.querySelector(".ambassador-scrollbar-drag"),this._track&&this._drag&&(this._isDragging=!1,this.el.addEventListener("dragstart",t=>t.preventDefault()),this._waitForSlider())}_waitForSlider(){let t=()=>{let e=window.PluginManager.getPluginInstanceFromElement(this.el,"BaseSlider");e&&e._slider?(this._baseSliderPlugin=e,this._bindToSlider(),this._setupScrollbarDrag(),this._setupSlideLinks(),e.$emitter.subscribe("afterInitSlider",()=>{this._bindToSlider(),this._setupSlideLinks()})):requestAnimationFrame(t)};requestAnimationFrame(t)}_bindToSlider(){this._tns=this._baseSliderPlugin._slider,this._tns&&(this._updateDrag(),this._tns.events.on("indexChanged",()=>this._updateDrag()))}_updateDrag(){let{index:t,slideCount:e,items:r,cloneCount:i}=this._tns.getInfo(),n=r/e*100;this._drag.style.width=n+"%",this._drag.style.left=Math.max(0,t-i)/Math.max(1,e-r)*(100-n)+"%"}_setupSlideLinks(){this.el.querySelectorAll(".ambassador-slide-item--linked").forEach(t=>{if(t._ambassadorLinkBound)return;t._ambassadorLinkBound=!0;let e=0,r=0;t.addEventListener("pointerdown",t=>{e=t.clientX,r=t.clientY,this._isDragging=!1}),t.addEventListener("pointermove",t=>{(Math.abs(t.clientX-e)>6||Math.abs(t.clientY-r)>6)&&(this._isDragging=!0)}),t.addEventListener("click",e=>{if(this._isDragging){e.preventDefault(),this._isDragging=!1;return}let r=t.dataset.slideUrl,i="true"===t.dataset.slideNewTab;r&&(i?window.open(r,"_blank","noopener"):window.location.href=r)})})}_setupScrollbarDrag(){let t=!1,e=0,r=0,i=t=>{let{slideCount:e,items:r}=this._tns.getInfo(),i=100-r/e*100;this._tns.goTo(Math.round(Math.max(0,Math.min(t,i))/i*(e-r)))};this._track.addEventListener("click",t=>{if(t.target===this._drag)return;let e=this._track.getBoundingClientRect();i((t.clientX-e.left)/e.width*100)}),this._drag.addEventListener("mousedown",i=>{t=!0,e=i.clientX,r=parseFloat(this._drag.style.left)||0,i.preventDefault()}),document.addEventListener("mousemove",n=>{if(!t)return;let s=this._track.getBoundingClientRect();i(r+(n.clientX-e)/s.width*100)}),document.addEventListener("mouseup",()=>{t=!1}),this._drag.addEventListener("touchstart",i=>{t=!0,e=i.touches[0].clientX,r=parseFloat(this._drag.style.left)||0},{passive:!0}),document.addEventListener("touchmove",n=>{if(!t)return;let s=this._track.getBoundingClientRect();i(r+(n.touches[0].clientX-e)/s.width*100)},{passive:!0}),document.addEventListener("touchend",()=>{t=!1})}}},890:(t,e,r)=>{r.d(e,{Z:()=>l});var i=r(857),n=r.n(i);class s{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let r=s.toUpperCamelCase(t,e);return s.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>s.ucFirst(t.toLowerCase())).join(""):s.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class a{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!a.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===a.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=e.replace(/^data(|-)/,""),n=s.toLowerCamelCase(i,"-");if(!a.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let o=t.dataset[n];if(void 0===o){if(r)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return o}return s.parsePrimitive(o)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!a.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(r&&!1===i)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return i}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!a.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),r&&!1===i)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return i}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.querySelectorAll('\n input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n select:not([tabindex^="-"]):not([disabled]),\n textarea:not([tabindex^="-"]):not([disabled]),\n button:not([tabindex^="-"]):not([disabled]),\n a[href]:not([tabindex^="-"]):not([disabled]),\n [tabindex]:not
1([tabindex^="-"]):not([disabled])\n ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}class o{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=t.split("."),s=r.scope?e.bind(r.scope):e;if(r.once&&!0===r.once){let e=s;s=function(r){i.unsubscribe(t),e(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,r)=>([...r.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):t.push(r),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class l{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=s.toDashCase(this._pluginName),r=a.getDataAttribute(this.el,"data-".concat(e,"-config"),!1),i=a.getAttribute(this.el,"data-".concat(e,"-options"),!1),o=[this.constructor.options,this.options,t];r&&o.push(window.PluginConfigManager.get(this._pluginName,r));try{i&&o.push(JSON.parse(i))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(e,'-options" could not be parsed to json: ').concat(t.message))}return n().all(o.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},r=!1){if(!a.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}}}]);
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.