1(()=>{"use strict";var t={156(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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function s(t,e,i){return t.concat(e).map(function(t){return r(t,i)})}function o(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function n(t,e){try{return e in t}catch(t){return!1}}function a(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=r;var u,c,d=Array.isArray(i);return d!==Array.isArray(t)?r(i,l):d?l.arrayMerge(t,i,l):(c={},(u=l).isMergeableObject(t)&&o(t).forEach(function(e){c[e]=r(t[e],u)}),o(i).forEach(function(e){(!n(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(n(t,e)&&u.isMergeableObject(i[e])?c[e]=(function(t,e){if(!e.customMerge)return a;var i=e.customMerge(t);return"function"==typeof i?i:a})(e,u)(t[e],i[e],u):c[e]=r(i[e],u))}),c)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return a(t,i,e)},{})},t.exports=a}},e={};function i(r){var s=e[r];if(void 0!==s)return s.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r=i(156),s=i.n(r);class o{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 i=o.toUpperCamelCase(t,e);return o.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>o.ucFirst(t.toLowerCase())).join(""):o.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class n{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(r),r}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,s=t.split("."),o=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=o;o=function(i){r.unsubscribe(t),e(i)}}return this.el.addEventListener(s[0],o),this.listeners.push({splitEventName:s,opts:i,cb:o}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),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}}class a{constructor(t,e={},i=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=t,this.$emitter=new n(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),s().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=o.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=o.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-options`);if(i)try{return JSON.parse(i)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return 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}}class l{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!l.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 i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===l.hasAttribute(t,e))throw Error(`The required property "${e}" does not exist!`);
1if("function"!=typeof t.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.replace(/^data(|-)/,""),s=o.toLowerCamelCase(r,"-");if(!l.isNode(t)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let n=t.dataset[s];if(void 0===n){if(i)throw Error(`The required data attribute "${e}" does not exist on ${t}!`);return n}return o.parsePrimitive(n)}static querySelector(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!l.isNode(t))throw Error("The parent node is not a valid HTML Node!");let r=t.querySelector(e)||!1;if(i&&!1===r)throw Error(`The required element "${e}" does not exist in parent node!`);return r}static querySelectorAll(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!l.isNode(t))throw Error("The parent node is not a valid HTML Node!");let r=t.querySelectorAll(e);if(0===r.length&&(r=!1),i&&!1===r)throw Error(`At least one item of "${e}" must exist in parent node!`);return r}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=` 2 input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]), 3 select:not([tabindex^="-"]):not([disabled]), 4 textarea:not([tabindex^="-"]):not([disabled]), 5 button:not([tabindex^="-"]):not([disabled]), 6 a[href]:not([tabindex^="-"]):not([disabled]), 7 [tabindex]:not([tabindex^="-"]):not([disabled]) 8 `;return t.querySelectorAll(e)}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]}}let u=Object.freeze(new class{constructor(){this.flags={},window.features&&this.init(window.features)}init(t){Object.entries(t).forEach(t=>{let[e,i]=t;this.flags[e]=i})}isActive(t){return!!Object.prototype.hasOwnProperty.call(this.flags,t)&&this.flags[t]}});class c{constructor(){window.Feature=this}static init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u.init(t)}static isActive(t){return u.isActive(t)}}class d extends a{static #t=this.options={productId:"",customValueCheckboxSelector:".flow-giftcard-radio",customValueDropdownSelector:".flow-giftcard-select",customValueInputSelector:".flow-giftcard-custom-value-input",errorFieldSelector:".flow-giftcard-input-error-subtitle",customAmountFieldValue:"custom",defaultMinAllowedValue:1,customFields:{},displayType:"dropdown",translations:window.giftcardMessages,priceFormat:void 0,currency:void 0,priceRounding:void 0};init(){this.isCustomValueAllowed=this.options.customFields.flow_gift_card_product_custom_value_min&&this.options.customFields.flow_gift_card_product_custom_value_max,this.customValueInput=l.querySelector(this.el,this.options.customValueInputSelector),this.errorField=l.querySelector(this.el,this.options.errorFieldSelector),this.registerEvents()}registerEvents(){"buttons"===this.options.displayType?(this.radioInputs=l.querySelectorAll(this.el,"label.btn"),this.radioInputs.forEach(t=>{t.addEventListener("click",this.onRadioOptionChange.bind(this))}),this.radioInputs.length>0&&this.selectRadioButton(this.radioInputs[0])):(this.customValueDropdown=l.querySelector(this.el,this.options.customValueDropdownSelector),this.customValueDropdown.addEventListener("change",this.onGiftCardTypeChange.bind(this))),this.customValueInput.addEventListener("input",this.onGiftCardValueInput.bind(this))}selectRadioButton(t){this.radioInput=t.previousElementSibling,this.radioInput.checked=!0,this.onGiftCardTypeChange()}onRadioOptionChange(t){this.radioInput=t.target.closest("label.btn").previousElementSibling,this.onGiftCardTypeChange()}onGiftCardValueInput(t){this.validateNumberInput()}getMinimumAllowedValue(){return this.options.customFields.flow_gift_card_product_custom_value_min<=this.options.defaultMinAllowedValue?this.options.defaultMinAllowedValue:this.options.customFields.flow_gift_card_product_custom_value_min}getMaximumAllowedValue(){return this.options.customFields.flow_gift_card_product_custom_value_max}
8validateNumberInput(){if(!this.isCustomValueSelected()||0===this.customValueInput.value.length)return this.updatePrice("buttons"===this.options.displayType?this.radioInput.value:this.customValueDropdown.value),this.displayErrors([]);let t=this.customValueInput.value,e=this.getMinimumAllowedValue(),i=this.getMaximumAllowedValue(),r=[];t<this.options.customFields.flow_gift_card_product_custom_value_min&&r.push(this.options.translations.minAmount.replace("%amount%",e)),t>this.options.customFields.flow_gift_card_product_custom_value_max&&r.push(this.options.translations.maxAmount.replace("%amount%",i)),this.displayErrors(r),r.length||this.updatePrice(this.customValueInput.value)}displayErrors(t){this.errorField.innerHTML=t.join("<br>"),t.length>0||!this.customValueInput.value.length?(this.show(this.errorField),this.disableBuyButton()):(this.hide(this.errorField),this.enableBuyButton())}onGiftCardTypeChange(){this.validateNumberInput(),this.isCustomValueSelected()&&this.isCustomValueAllowed?(this.show(this.customValueInput.closest(".collapse")),this.disableBuyButton()):(this.hide(this.customValueInput.closest(".collapse")),this.customValueInput.value=this.options.customAmountFieldValue,this.enableBuyButton())}isCustomValueSelected(){let t=!1;return t="buttons"===this.options.displayType?this.radioInput.value===this.options.customAmountFieldValue:this.customValueDropdown.value===this.options.customAmountFieldValue,this.customValueInput.required=t,t}show(t){c.isActive("v6.5.0.0")?new bootstrap.Collapse(t,{toggle:!1}).show():$(t).collapse("show")}hide(t){c.isActive("v6.5.0.0")?new bootstrap.Collapse(t,{toggle:!1}).hide():$(t).collapse("hide")}disableBuyButton(){l.querySelector(this.el.closest(".buy-widget"),".btn-buy").disabled=!0}enableBuyButton(){l.querySelector(this.el.closest(".buy-widget"),".btn-buy").disabled=!1}updatePrice(t){if(t===this.options.customAmountFieldValue)return;let e=l.querySelectorAll(document,".product-detail-price",!1);e&&(this._priceFormatter=new Intl.NumberFormat(this.options.priceFormat,{style:"currency",currency:this.options.currency,currencyDisplay:"code",maximumFractionDigits:this.options.priceRounding}),e.forEach(e=>{e.innerHTML=this._priceFormatter.format(t).replace(this.options.currency,"").replace(",00",",-").trim()}))}}window.PluginManager.register("GiftcardValuesPlugin",d,"[data-giftcard-values]")})();
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.